@vlrc-fe/components 3.0.3 → 3.0.5

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 (701) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +10 -1
  3. package/bin/registry.mjs +1124 -0
  4. package/bin/vlrc.mjs +102 -7
  5. package/dist/ConfirmModal.cjs +268 -1
  6. package/dist/ConfirmModal.d.ts +5 -21
  7. package/dist/ConfirmModal.d.ts.map +1 -1
  8. package/dist/ConfirmModal.js +120 -111
  9. package/dist/DataTable/DataTable.cjs +203 -1
  10. package/dist/DataTable/DataTable.js +161 -120
  11. package/dist/DataTable/components/DataTableColumnHeader.cjs +214 -1
  12. package/dist/DataTable/components/DataTableColumnHeader.d.ts +3 -3
  13. package/dist/DataTable/components/DataTableColumnHeader.d.ts.map +1 -1
  14. package/dist/DataTable/components/DataTableColumnHeader.js +201 -103
  15. package/dist/DataTable/components/DataTableFacetedFilter.cjs +332 -1
  16. package/dist/DataTable/components/DataTableFacetedFilter.d.ts +3 -3
  17. package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
  18. package/dist/DataTable/components/DataTableFacetedFilter.js +285 -181
  19. package/dist/DataTable/components/DataTablePagination.cjs +200 -1
  20. package/dist/DataTable/components/DataTablePagination.js +188 -91
  21. package/dist/DataTable/components/DataTableRowActions.cjs +172 -1
  22. package/dist/DataTable/components/DataTableRowActions.js +161 -62
  23. package/dist/DataTable/components/DataTableTable.cjs +100 -1
  24. package/dist/DataTable/components/DataTableTable.js +87 -35
  25. package/dist/DataTable/components/DataTableToolbar.cjs +112 -1
  26. package/dist/DataTable/components/DataTableToolbar.js +106 -44
  27. package/dist/DataTable/components/DataTableViewOptions.cjs +113 -1
  28. package/dist/DataTable/components/DataTableViewOptions.js +105 -44
  29. package/dist/DataTable/render/createColumns.cjs +84 -1
  30. package/dist/DataTable/render/createColumns.js +65 -44
  31. package/dist/DataTable/render/defaults.cjs +38 -1
  32. package/dist/DataTable/render/defaults.js +18 -13
  33. package/dist/Dropdown/Dropdown.cjs +255 -1
  34. package/dist/Dropdown/Dropdown.js +138 -108
  35. package/dist/Form/Form.cjs +439 -1
  36. package/dist/Form/Form.js +417 -206
  37. package/dist/Form/FormDatePicker/FormDatePicker.cjs +84 -1
  38. package/dist/Form/FormDatePicker/FormDatePicker.js +68 -65
  39. package/dist/Form/FormDatePicker/MonthPickerPanel.cjs +217 -1
  40. package/dist/Form/FormDatePicker/MonthPickerPanel.js +194 -101
  41. package/dist/Form/FormDatePicker/RangeDatePicker.cjs +144 -1
  42. package/dist/Form/FormDatePicker/RangeDatePicker.js +94 -77
  43. package/dist/Form/FormDatePicker/SingleDatePicker.cjs +191 -1
  44. package/dist/Form/FormDatePicker/SingleDatePicker.js +144 -114
  45. package/dist/Form/FormDatePicker/TimeInput.cjs +172 -1
  46. package/dist/Form/FormDatePicker/TimeInput.js +162 -79
  47. package/dist/Form/FormDatePicker/TimePicker.cjs +107 -1
  48. package/dist/Form/FormDatePicker/TimePicker.js +58 -43
  49. package/dist/Form/FormDatePicker/YearPickerPanel.cjs +184 -1
  50. package/dist/Form/FormDatePicker/YearPickerPanel.js +164 -84
  51. package/dist/Form/FormDatePicker/types.cjs +10 -1
  52. package/dist/Form/FormDatePicker/types.js +8 -3
  53. package/dist/Form/FormDatePicker/useFormDatePicker.cjs +70 -1
  54. package/dist/Form/FormDatePicker/useFormDatePicker.js +58 -31
  55. package/dist/Form/FormFileUpload/FileUpload.cjs +603 -1
  56. package/dist/Form/FormFileUpload/FileUpload.js +452 -306
  57. package/dist/Form/FormFileUpload/index.cjs +175 -1
  58. package/dist/Form/FormFileUpload/index.js +164 -50
  59. package/dist/Form/FormMultiSelect/FormMultiSelect.cjs +46 -1
  60. package/dist/Form/FormMultiSelect/FormMultiSelect.js +42 -22
  61. package/dist/Form/FormNumberInput/FormNumberInput.cjs +71 -1
  62. package/dist/Form/FormNumberInput/FormNumberInput.js +60 -58
  63. package/dist/Form/FormNumberInput/StepperControls.cjs +104 -1
  64. package/dist/Form/FormNumberInput/StepperControls.js +78 -43
  65. package/dist/Form/FormNumberInput/useFormNumberInput.cjs +72 -1
  66. package/dist/Form/FormNumberInput/useFormNumberInput.js +68 -39
  67. package/dist/Form/FormRadioGroup/FormRadio.cjs +65 -1
  68. package/dist/Form/FormRadioGroup/FormRadio.js +38 -38
  69. package/dist/Form/FormRadioGroup/useFormRadio.cjs +38 -1
  70. package/dist/Form/FormRadioGroup/useFormRadio.js +27 -16
  71. package/dist/Form/FormSelect/FormSelect.cjs +46 -1
  72. package/dist/Form/FormSelect/FormSelect.js +40 -26
  73. package/dist/Form/FormSelect/useFormSelect.cjs +58 -1
  74. package/dist/Form/FormSelect/useFormSelect.js +52 -43
  75. package/dist/Icons/Icons.cjs +155 -1
  76. package/dist/Icons/Icons.js +142 -142
  77. package/dist/Modal.cjs +131 -1
  78. package/dist/Modal.d.ts +2 -14
  79. package/dist/Modal.d.ts.map +1 -1
  80. package/dist/Modal.js +63 -54
  81. package/dist/MultiSelect/MultiSelect.cjs +210 -1
  82. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  83. package/dist/MultiSelect/MultiSelect.js +126 -117
  84. package/dist/MultiSelect/renderers.cjs +571 -1
  85. package/dist/MultiSelect/renderers.js +508 -309
  86. package/dist/MultiSelect/useMultiSelect.cjs +244 -1
  87. package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
  88. package/dist/MultiSelect/useMultiSelect.js +208 -127
  89. package/dist/MultiSelect/utils.cjs +123 -1
  90. package/dist/MultiSelect/utils.js +79 -51
  91. package/dist/Select/BaseSelect.cjs +265 -1
  92. package/dist/Select/BaseSelect.js +165 -126
  93. package/dist/Select/MultiSelectTags.cjs +129 -1
  94. package/dist/Select/MultiSelectTags.js +82 -56
  95. package/dist/Typography/Blockquote.cjs +79 -1
  96. package/dist/Typography/Blockquote.js +40 -38
  97. package/dist/Typography/Code.cjs +131 -1
  98. package/dist/Typography/Code.js +64 -58
  99. package/dist/Typography/Link.cjs +139 -1
  100. package/dist/Typography/Link.d.ts +1 -2
  101. package/dist/Typography/Link.d.ts.map +1 -1
  102. package/dist/Typography/Link.js +73 -64
  103. package/dist/Typography/Paragraph.cjs +224 -1
  104. package/dist/Typography/Paragraph.d.ts +1 -2
  105. package/dist/Typography/Paragraph.d.ts.map +1 -1
  106. package/dist/Typography/Paragraph.js +118 -108
  107. package/dist/Typography/Text.cjs +223 -1
  108. package/dist/Typography/Text.d.ts +1 -2
  109. package/dist/Typography/Text.d.ts.map +1 -1
  110. package/dist/Typography/Text.js +117 -101
  111. package/dist/Typography/Title.cjs +220 -1
  112. package/dist/Typography/Title.d.ts +1 -2
  113. package/dist/Typography/Title.d.ts.map +1 -1
  114. package/dist/Typography/Title.js +126 -104
  115. package/dist/Typography/Typography.cjs +17 -1
  116. package/dist/Typography/Typography.d.ts +8 -4
  117. package/dist/Typography/Typography.d.ts.map +1 -1
  118. package/dist/Typography/Typography.js +14 -14
  119. package/dist/Typography/index.d.ts +1 -4
  120. package/dist/Typography/index.d.ts.map +1 -1
  121. package/dist/Typography/index.js +10 -13
  122. package/dist/Typography/tooltip.cjs +42 -1
  123. package/dist/Typography/tooltip.js +34 -14
  124. package/dist/Typography/types.cjs +20 -1
  125. package/dist/Typography/types.d.ts +4 -0
  126. package/dist/Typography/types.d.ts.map +1 -1
  127. package/dist/Typography/types.js +5 -2
  128. package/dist/Typography/utils.cjs +52 -1
  129. package/dist/Typography/utils.js +48 -21
  130. package/dist/Typography/weightStyles.cjs +58 -1
  131. package/dist/Typography/weightStyles.js +26 -25
  132. package/dist/_virtual/_rolldown/runtime.cjs +32 -1
  133. package/dist/_virtual/_rolldown/runtime.js +9 -7
  134. package/dist/assets/stylex.css +167 -9
  135. package/dist/astryx.cjs +9 -1
  136. package/dist/astryx.d.ts +0 -1
  137. package/dist/astryx.d.ts.map +1 -1
  138. package/dist/astryx.js +0 -1
  139. package/dist/index.cjs +779 -1
  140. package/dist/index.d.ts +2 -3
  141. package/dist/index.d.ts.map +1 -1
  142. package/dist/index.js +119 -118
  143. package/dist/layout/Box.cjs +180 -1
  144. package/dist/layout/Box.d.ts +6 -8
  145. package/dist/layout/Box.d.ts.map +1 -1
  146. package/dist/layout/Box.js +116 -50
  147. package/dist/layout/Center.cjs +40 -1
  148. package/dist/layout/Center.d.ts +3 -3
  149. package/dist/layout/Center.d.ts.map +1 -1
  150. package/dist/layout/Center.js +39 -21
  151. package/dist/layout/Container.cjs +92 -1
  152. package/dist/layout/Container.d.ts +6 -8
  153. package/dist/layout/Container.d.ts.map +1 -1
  154. package/dist/layout/Container.js +46 -31
  155. package/dist/layout/Stack.cjs +199 -1
  156. package/dist/layout/Stack.d.ts +9 -9
  157. package/dist/layout/Stack.d.ts.map +1 -1
  158. package/dist/layout/Stack.js +186 -79
  159. package/dist/layout/index.d.ts +1 -1
  160. package/dist/layout/index.js +9 -9
  161. package/dist/lazyLoad.cjs +13 -1
  162. package/dist/lazyLoad.d.ts.map +1 -1
  163. package/dist/lazyLoad.js +9 -9
  164. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +551 -1
  165. package/dist/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +440 -234
  166. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +546 -1
  167. package/dist/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +452 -236
  168. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +330 -1
  169. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +272 -164
  170. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +150 -1
  171. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +132 -1
  172. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +90 -74
  173. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +92 -67
  174. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.cjs +11 -1
  175. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.3/node_modules/@radix-ui/number/dist/index.js +8 -7
  176. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.cjs +48 -1
  177. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.7/node_modules/@radix-ui/primitive/dist/index.js +34 -31
  178. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +145 -1
  179. package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_023ac3f94ac95798b92bc4b7f556cbda/node_modules/@radix-ui/react-alert-dialog/dist/index.js +111 -73
  180. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.cjs +38 -1
  181. package/dist/node_modules/.pnpm/@radix-ui_react-aspect-ratio@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_3fe40fa8e2833eaf8803b46e02e4c30f/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +19 -16
  182. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.cjs +126 -1
  183. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.2.6_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_c3568bdf5c60d38014d320037c857c95/node_modules/@radix-ui/react-avatar/dist/index.js +103 -72
  184. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.cjs +134 -1
  185. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.20_@types_react-dom@19.3.0_@types_react@19.3.0__@types__75f9b408b6aa016f78c6c390e6f84227/node_modules/@radix-ui/react-collapsible/dist/index.js +113 -79
  186. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.cjs +541 -1
  187. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.15_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_5961dc5beb3cb19a205dfdbd3304cbe5/node_modules/@radix-ui/react-collection/dist/index.js +459 -331
  188. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +39 -1
  189. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.js +26 -22
  190. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.cjs +304 -1
  191. package/dist/node_modules/.pnpm/@radix-ui_react-context-menu@2.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types__30d9c1a1570dd32a7a328fd93feebae9/node_modules/@radix-ui/react-context-menu/dist/index.js +234 -160
  192. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.cjs +108 -1
  193. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.2.2_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-context/dist/index.js +82 -67
  194. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.cjs +19 -1
  195. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-direction/dist/index.js +12 -10
  196. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +275 -1
  197. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@_221317ca07dfdaa6590fc49e548d4242/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +228 -127
  198. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +53 -1
  199. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.js +40 -22
  200. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +215 -1
  201. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.16_@types_react-dom@19.3.0_@types_react@19.3.0__@types__3593711fa410ee31279d746c57990974/node_modules/@radix-ui/react-focus-scope/dist/index.js +171 -117
  202. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.cjs +219 -1
  203. package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@1.1.23_@types_react-dom@19.3.0_@types_react@19.3.0__@types_r_a8ac333b78a7741970303e37358b886d/node_modules/@radix-ui/react-hover-card/dist/index.js +178 -118
  204. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.cjs +22 -1
  205. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-id/dist/index.js +17 -13
  206. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.cjs +802 -1
  207. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_bd1746795e703f342b2f4982589d4efb/node_modules/@radix-ui/react-menu/dist/index.js +648 -422
  208. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.cjs +410 -1
  209. package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1.24_@types_react-dom@19.3.0_@types_react@19.3.0__@types_reac_b8d55f7c7c6b477421e3cc1ba6fb334b/node_modules/@radix-ui/react-menubar/dist/index.js +313 -212
  210. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs +741 -1
  211. package/dist/node_modules/.pnpm/@radix-ui_react-navigation-menu@1.2.22_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_fde94e4aef42debd49119dde2ad3b250/node_modules/@radix-ui/react-navigation-menu/dist/index.js +602 -417
  212. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.cjs +246 -1
  213. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_ca4fb1e7b10e21399fbf7b38c61d930c/node_modules/@radix-ui/react-popper/dist/index.js +195 -121
  214. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.cjs +27 -1
  215. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.17_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_dcf9598b366f9d4cb930092169158fb6/node_modules/@radix-ui/react-portal/dist/index.js +20 -17
  216. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.cjs +148 -1
  217. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_rea_d7b4951725c0f0b9fd732151cb937913/node_modules/@radix-ui/react-presence/dist/index.js +115 -67
  218. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.cjs +55 -1
  219. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.10_@types_react-dom@19.3.0_@types_react@19.3.0__@types_re_b879c40dbdb8ea08e1db9842f10f20a8/node_modules/@radix-ui/react-primitive/dist/index.js +27 -21
  220. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +223 -1
  221. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_43a41e6ed06e4781ce7b1fb0f0076623/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -131
  222. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.cjs +576 -1
  223. package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_0a49b18268a9d1d70ad7e785633a1513/node_modules/@radix-ui/react-slider/dist/index.js +437 -308
  224. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.cjs +202 -1
  225. package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3.7_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@_f8723a7bd506c0f648804ec2dc0f18e3/node_modules/@radix-ui/react-switch/dist/index.js +160 -125
  226. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.cjs +159 -1
  227. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.21_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@1_2c04ca1fb5fd914a25ee24a303bd8469/node_modules/@radix-ui/react-tabs/dist/index.js +125 -93
  228. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.cjs +158 -1
  229. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.19_@types_react-dom@19.3.0_@types_react@19.3.0__@types_e645c0ca626436d86b14232bd158d09b/node_modules/@radix-ui/react-toggle-group/dist/index.js +128 -98
  230. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.cjs +39 -1
  231. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.18_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react_f121473145ec675e8ab50657e8e97e06/node_modules/@radix-ui/react-toggle/dist/index.js +29 -24
  232. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +19 -1
  233. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -11
  234. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +109 -1
  235. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.6_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +91 -68
  236. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.cjs +28 -1
  237. package/dist/node_modules/.pnpm/@radix-ui_react-use-effect-event@0.0.5_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-effect-event/dist/index.js +22 -17
  238. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +33 -1
  239. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.3_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +25 -19
  240. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +7 -1
  241. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
  242. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.cjs +25 -1
  243. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.js +18 -11
  244. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.cjs +47 -1
  245. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.4_@types_react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-size/dist/index.js +38 -28
  246. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +38 -1
  247. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.11_@types_react-dom@19.3.0_@types_react@19.3.0__@ty_ef452cff5863a129db7ebc4b37ab07c3/node_modules/@radix-ui/react-visually-hidden/dist/index.js +19 -15
  248. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +106 -1
  249. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +95 -34
  250. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.cjs +5 -1
  251. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js +3 -3
  252. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.cjs +6 -1
  253. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js +4 -4
  254. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.cjs +423 -1
  255. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js +237 -202
  256. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.cjs +45 -1
  257. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js +35 -32
  258. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.cjs +42 -1
  259. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js +37 -32
  260. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +20 -1
  261. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -5
  262. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.cjs +7 -1
  263. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js +5 -5
  264. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.cjs +27 -1
  265. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js +15 -12
  266. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.cjs +45 -1
  267. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js +41 -4
  268. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.cjs +45 -1
  269. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js +42 -4
  270. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.cjs +49 -1
  271. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js +46 -8
  272. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.cjs +358 -1
  273. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js +341 -45
  274. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.cjs +31 -1
  275. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js +28 -7
  276. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.cjs +35 -1
  277. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js +32 -8
  278. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.cjs +44 -1
  279. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js +41 -11
  280. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.cjs +49 -1
  281. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js +46 -8
  282. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.cjs +61 -1
  283. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js +58 -12
  284. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.cjs +38 -1
  285. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js +35 -3
  286. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.cjs +39 -1
  287. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js +36 -5
  288. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +8 -1
  289. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +5 -5
  290. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +50 -1
  291. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +45 -11
  292. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +27 -1
  293. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +20 -14
  294. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +18 -1
  295. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +13 -12
  296. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +77 -1
  297. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +14 -5
  298. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +31 -1
  299. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +6 -6
  300. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +11 -1
  301. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +4 -3
  302. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +210 -1
  303. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +197 -188
  304. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +122 -1
  305. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +12 -12
  306. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.cjs +28 -1
  307. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +20 -12
  308. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.cjs +34 -1
  309. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js +31 -5
  310. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.cjs +37 -1
  311. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js +32 -5
  312. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.cjs +41 -1
  313. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js +38 -7
  314. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.cjs +45 -1
  315. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js +42 -6
  316. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.cjs +56 -1
  317. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js +53 -8
  318. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.cjs +35 -1
  319. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js +32 -5
  320. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.cjs +45 -1
  321. package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js +42 -4
  322. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.cjs +34 -1
  323. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +32 -21
  324. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +39 -1
  325. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +27 -20
  326. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1391 -1
  327. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1178 -803
  328. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +7 -1
  329. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +3 -4
  330. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.cjs +369 -2
  331. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/input-otp/dist/index.js +282 -238
  332. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.cjs +625 -1
  333. package/dist/node_modules/.pnpm/react-hook-form@7.83.0_react@19.3.1/node_modules/react-hook-form/dist/index.esm.js +545 -276
  334. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.cjs +1033 -9
  335. package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-number-format/dist/react-number-format.es.js +898 -460
  336. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +47 -38
  337. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js +38 -64
  338. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +13 -1
  339. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +9 -2
  340. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/index.cjs +4 -1
  341. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +36 -1
  342. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -16
  343. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +15 -1
  344. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +10 -10
  345. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +167 -4
  346. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +144 -93
  347. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.cjs +63 -1
  348. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +45 -35
  349. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +14 -1
  350. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +11 -9
  351. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +84 -1
  352. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +75 -43
  353. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.cjs +3 -1
  354. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
  355. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +6 -1
  356. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@19.3.0_react@19.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
  357. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.cjs +1617 -1
  358. package/dist/node_modules/.pnpm/react-resizable-panels@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +1332 -874
  359. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.cjs +18 -1
  360. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/component.js +15 -7
  361. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.cjs +26 -1
  362. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/hook.js +20 -10
  363. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/index.cjs +4 -1
  364. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.cjs +40 -1
  365. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.3.0_react@19.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js +29 -16
  366. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +36 -1
  367. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +25 -14
  368. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +20 -1
  369. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +18 -3
  370. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +46 -1
  371. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +38 -19
  372. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.cjs +39 -1
  373. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.3.0_react@19.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +29 -11
  374. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.cjs +18 -1
  375. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/exports.js +13 -12
  376. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.cjs +81 -1
  377. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.3.0_react@19.3.1/node_modules/use-sidecar/dist/es2015/medium.js +58 -45
  378. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.cjs +1252 -3
  379. package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@19.3.0_@types_react@19.3.0__@types_react@19.3.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/vaul/dist/index.js +1003 -648
  380. package/dist/theme/index.cjs +63 -1
  381. package/dist/theme/index.js +31 -31
  382. package/dist/theme/spacing.cjs +93 -1
  383. package/dist/theme/spacing.js +52 -26
  384. package/dist/theme/tokens.stylex.cjs +210 -1
  385. package/dist/theme/tokens.stylex.js +58 -26
  386. package/dist/theme/types.cjs +13 -1
  387. package/dist/theme/types.js +4 -3
  388. package/dist/theme/width.cjs +39 -1
  389. package/dist/theme/width.js +16 -4
  390. package/dist/theme/zIndex.cjs +62 -1
  391. package/dist/theme/zIndex.d.ts +4 -4
  392. package/dist/theme/zIndex.d.ts.map +1 -1
  393. package/dist/theme/zIndex.js +44 -15
  394. package/dist/theme.css +167 -9
  395. package/dist/ui/accordion.cjs +431 -1
  396. package/dist/ui/accordion.d.ts +10 -10
  397. package/dist/ui/accordion.d.ts.map +1 -1
  398. package/dist/ui/accordion.js +276 -136
  399. package/dist/ui/action-bar.cjs +274 -1
  400. package/dist/ui/action-bar.d.ts +11 -11
  401. package/dist/ui/action-bar.d.ts.map +1 -1
  402. package/dist/ui/action-bar.js +204 -98
  403. package/dist/ui/alert-dialog.cjs +538 -1
  404. package/dist/ui/alert-dialog.d.ts +19 -19
  405. package/dist/ui/alert-dialog.d.ts.map +1 -1
  406. package/dist/ui/alert-dialog.js +459 -167
  407. package/dist/ui/alert.cjs +163 -1
  408. package/dist/ui/alert.d.ts +7 -7
  409. package/dist/ui/alert.d.ts.map +1 -1
  410. package/dist/ui/alert.js +111 -50
  411. package/dist/ui/aspect-ratio.cjs +24 -1
  412. package/dist/ui/aspect-ratio.d.ts +2 -2
  413. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  414. package/dist/ui/aspect-ratio.js +22 -13
  415. package/dist/ui/avatar.cjs +340 -1
  416. package/dist/ui/avatar.d.ts +10 -10
  417. package/dist/ui/avatar.d.ts.map +1 -1
  418. package/dist/ui/avatar.js +226 -115
  419. package/dist/ui/badge-overflow.cjs +66 -1
  420. package/dist/ui/badge-overflow.d.ts +5 -5
  421. package/dist/ui/badge-overflow.d.ts.map +1 -1
  422. package/dist/ui/badge-overflow.js +34 -27
  423. package/dist/ui/badge.cjs +167 -1
  424. package/dist/ui/badge.d.ts +3 -3
  425. package/dist/ui/badge.d.ts.map +1 -1
  426. package/dist/ui/badge.js +48 -42
  427. package/dist/ui/breadcrumb.cjs +508 -1
  428. package/dist/ui/breadcrumb.d.ts +15 -15
  429. package/dist/ui/breadcrumb.d.ts.map +1 -1
  430. package/dist/ui/breadcrumb.js +386 -159
  431. package/dist/ui/button.cjs +425 -1
  432. package/dist/ui/button.d.ts +3 -3
  433. package/dist/ui/button.d.ts.map +1 -1
  434. package/dist/ui/button.js +137 -117
  435. package/dist/ui/calendar.cjs +625 -1
  436. package/dist/ui/calendar.d.ts +5 -5
  437. package/dist/ui/calendar.d.ts.map +1 -1
  438. package/dist/ui/calendar.js +309 -193
  439. package/dist/ui/card.cjs +401 -1
  440. package/dist/ui/card.d.ts +15 -15
  441. package/dist/ui/card.d.ts.map +1 -1
  442. package/dist/ui/card.js +300 -119
  443. package/dist/ui/carousel.cjs +332 -1
  444. package/dist/ui/carousel.d.ts +10 -10
  445. package/dist/ui/carousel.d.ts.map +1 -1
  446. package/dist/ui/carousel.js +245 -127
  447. package/dist/ui/checkbox.cjs +163 -1
  448. package/dist/ui/checkbox.d.ts +4 -4
  449. package/dist/ui/checkbox.d.ts.map +1 -1
  450. package/dist/ui/checkbox.js +62 -58
  451. package/dist/ui/circular-progress.cjs +144 -1
  452. package/dist/ui/circular-progress.d.ts +5 -5
  453. package/dist/ui/circular-progress.d.ts.map +1 -1
  454. package/dist/ui/circular-progress.js +85 -67
  455. package/dist/ui/code-block.cjs +823 -0
  456. package/dist/ui/code-block.d.ts +89 -0
  457. package/dist/ui/code-block.d.ts.map +1 -0
  458. package/dist/ui/code-block.js +813 -0
  459. package/dist/ui/collapsible.cjs +64 -1
  460. package/dist/ui/collapsible.d.ts +4 -4
  461. package/dist/ui/collapsible.d.ts.map +1 -1
  462. package/dist/ui/collapsible.js +58 -29
  463. package/dist/ui/command.cjs +556 -1
  464. package/dist/ui/command.d.ts +19 -19
  465. package/dist/ui/command.d.ts.map +1 -1
  466. package/dist/ui/command.js +432 -163
  467. package/dist/ui/compare-slider.cjs +169 -1
  468. package/dist/ui/compare-slider.d.ts +8 -7
  469. package/dist/ui/compare-slider.d.ts.map +1 -1
  470. package/dist/ui/compare-slider.js +106 -73
  471. package/dist/ui/context-menu.cjs +810 -1
  472. package/dist/ui/context-menu.d.ts +26 -26
  473. package/dist/ui/context-menu.d.ts.map +1 -1
  474. package/dist/ui/context-menu.js +693 -229
  475. package/dist/ui/copy-button.cjs +93 -1
  476. package/dist/ui/copy-button.d.ts +1 -2
  477. package/dist/ui/copy-button.d.ts.map +1 -1
  478. package/dist/ui/copy-button.js +56 -45
  479. package/dist/ui/dialog.cjs +411 -1
  480. package/dist/ui/dialog.d.ts +18 -18
  481. package/dist/ui/dialog.d.ts.map +1 -1
  482. package/dist/ui/dialog.js +319 -131
  483. package/dist/ui/drawer.cjs +478 -1
  484. package/dist/ui/drawer.d.ts +17 -17
  485. package/dist/ui/drawer.d.ts.map +1 -1
  486. package/dist/ui/drawer.js +396 -151
  487. package/dist/ui/dropdown-menu.cjs +638 -1
  488. package/dist/ui/dropdown-menu.d.ts +26 -26
  489. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  490. package/dist/ui/dropdown-menu.js +511 -208
  491. package/dist/ui/editable.cjs +609 -1
  492. package/dist/ui/editable.d.ts +14 -14
  493. package/dist/ui/editable.d.ts.map +1 -1
  494. package/dist/ui/editable.js +479 -218
  495. package/dist/ui/empty.cjs +295 -1
  496. package/dist/ui/empty.d.ts +15 -15
  497. package/dist/ui/empty.d.ts.map +1 -1
  498. package/dist/ui/empty.js +267 -112
  499. package/dist/ui/field.cjs +621 -1
  500. package/dist/ui/field.d.ts +21 -21
  501. package/dist/ui/field.d.ts.map +1 -1
  502. package/dist/ui/field.js +468 -198
  503. package/dist/ui/file-upload-adapters.cjs +289 -1
  504. package/dist/ui/file-upload-adapters.d.ts +1 -2
  505. package/dist/ui/file-upload-adapters.d.ts.map +1 -1
  506. package/dist/ui/file-upload-adapters.js +244 -170
  507. package/dist/ui/file-upload.cjs +1480 -1
  508. package/dist/ui/file-upload.d.ts +22 -22
  509. package/dist/ui/file-upload.d.ts.map +1 -1
  510. package/dist/ui/file-upload.js +1064 -599
  511. package/dist/ui/flex.cjs +202 -1
  512. package/dist/ui/flex.d.ts +7 -6
  513. package/dist/ui/flex.d.ts.map +1 -1
  514. package/dist/ui/flex.js +111 -93
  515. package/dist/ui/form.cjs +453 -1
  516. package/dist/ui/form.d.ts +11 -11
  517. package/dist/ui/form.d.ts.map +1 -1
  518. package/dist/ui/form.js +421 -136
  519. package/dist/ui/gauge.cjs +125 -1
  520. package/dist/ui/gauge.d.ts +7 -6
  521. package/dist/ui/gauge.d.ts.map +1 -1
  522. package/dist/ui/gauge.js +60 -53
  523. package/dist/ui/grid.cjs +224 -1
  524. package/dist/ui/grid.d.ts +11 -7
  525. package/dist/ui/grid.d.ts.map +1 -1
  526. package/dist/ui/grid.js +126 -96
  527. package/dist/ui/hover-card.cjs +85 -1
  528. package/dist/ui/hover-card.d.ts +6 -6
  529. package/dist/ui/hover-card.d.ts.map +1 -1
  530. package/dist/ui/hover-card.js +57 -37
  531. package/dist/ui/index.d.ts +4 -0
  532. package/dist/ui/index.d.ts.map +1 -1
  533. package/dist/ui/input-group.cjs +322 -1
  534. package/dist/ui/input-group.d.ts +12 -12
  535. package/dist/ui/input-group.d.ts.map +1 -1
  536. package/dist/ui/input-group.js +203 -107
  537. package/dist/ui/input-otp.cjs +312 -1
  538. package/dist/ui/input-otp.d.ts +10 -10
  539. package/dist/ui/input-otp.d.ts.map +1 -1
  540. package/dist/ui/input-otp.js +217 -94
  541. package/dist/ui/input.cjs +388 -1
  542. package/dist/ui/input.d.ts +3 -3
  543. package/dist/ui/input.d.ts.map +1 -1
  544. package/dist/ui/input.js +137 -119
  545. package/dist/ui/item.cjs +585 -1
  546. package/dist/ui/item.d.ts +20 -20
  547. package/dist/ui/item.d.ts.map +1 -1
  548. package/dist/ui/item.js +460 -162
  549. package/dist/ui/kbd.cjs +115 -1
  550. package/dist/ui/kbd.d.ts +5 -5
  551. package/dist/ui/kbd.d.ts.map +1 -1
  552. package/dist/ui/kbd.js +42 -37
  553. package/dist/ui/label.cjs +67 -1
  554. package/dist/ui/label.d.ts +4 -4
  555. package/dist/ui/label.d.ts.map +1 -1
  556. package/dist/ui/label.js +51 -21
  557. package/dist/ui/marker.cjs +297 -0
  558. package/dist/ui/marker.d.ts +25 -0
  559. package/dist/ui/marker.d.ts.map +1 -0
  560. package/dist/ui/marker.js +293 -0
  561. package/dist/ui/masonry.cjs +56 -1
  562. package/dist/ui/masonry.d.ts +4 -4
  563. package/dist/ui/masonry.d.ts.map +1 -1
  564. package/dist/ui/masonry.js +40 -37
  565. package/dist/ui/menubar.cjs +907 -1
  566. package/dist/ui/menubar.d.ts +29 -29
  567. package/dist/ui/menubar.d.ts.map +1 -1
  568. package/dist/ui/menubar.js +737 -252
  569. package/dist/ui/navigation-menu.cjs +560 -1
  570. package/dist/ui/navigation-menu.d.ts +18 -18
  571. package/dist/ui/navigation-menu.d.ts.map +1 -1
  572. package/dist/ui/navigation-menu.js +442 -148
  573. package/dist/ui/pagination.cjs +575 -1
  574. package/dist/ui/pagination.d.ts +13 -13
  575. package/dist/ui/pagination.d.ts.map +1 -1
  576. package/dist/ui/pagination.js +422 -172
  577. package/dist/ui/popover.cjs +93 -1
  578. package/dist/ui/popover.d.ts +7 -7
  579. package/dist/ui/popover.d.ts.map +1 -1
  580. package/dist/ui/popover.js +61 -42
  581. package/dist/ui/progress.cjs +34 -1
  582. package/dist/ui/progress.d.ts +3 -3
  583. package/dist/ui/progress.d.ts.map +1 -1
  584. package/dist/ui/progress.js +21 -18
  585. package/dist/ui/questionnaire.cjs +682 -0
  586. package/dist/ui/questionnaire.d.ts +111 -0
  587. package/dist/ui/questionnaire.d.ts.map +1 -0
  588. package/dist/ui/questionnaire.js +670 -0
  589. package/dist/ui/radio-group.cjs +221 -1
  590. package/dist/ui/radio-group.d.ts +6 -6
  591. package/dist/ui/radio-group.d.ts.map +1 -1
  592. package/dist/ui/radio-group.js +125 -74
  593. package/dist/ui/rating.cjs +190 -1
  594. package/dist/ui/rating.d.ts +4 -3
  595. package/dist/ui/rating.d.ts.map +1 -1
  596. package/dist/ui/rating.js +96 -79
  597. package/dist/ui/resizable.cjs +174 -1
  598. package/dist/ui/resizable.d.ts +7 -7
  599. package/dist/ui/resizable.d.ts.map +1 -1
  600. package/dist/ui/resizable.js +150 -55
  601. package/dist/ui/responsive-dialog.cjs +400 -1
  602. package/dist/ui/responsive-dialog.d.ts +17 -17
  603. package/dist/ui/responsive-dialog.d.ts.map +1 -1
  604. package/dist/ui/responsive-dialog.js +372 -155
  605. package/dist/ui/row-col.cjs +508 -1
  606. package/dist/ui/row-col.d.ts +13 -11
  607. package/dist/ui/row-col.d.ts.map +1 -1
  608. package/dist/ui/row-col.js +238 -207
  609. package/dist/ui/scroll-area.cjs +129 -1
  610. package/dist/ui/scroll-area.d.ts +6 -6
  611. package/dist/ui/scroll-area.d.ts.map +1 -1
  612. package/dist/ui/scroll-area.js +92 -49
  613. package/dist/ui/segmented.cjs +169 -1
  614. package/dist/ui/segmented.d.ts +6 -5
  615. package/dist/ui/segmented.d.ts.map +1 -1
  616. package/dist/ui/segmented.js +75 -63
  617. package/dist/ui/select.cjs +484 -1
  618. package/dist/ui/select.d.ts +17 -17
  619. package/dist/ui/select.d.ts.map +1 -1
  620. package/dist/ui/select.js +353 -160
  621. package/dist/ui/separator.cjs +44 -1
  622. package/dist/ui/separator.d.ts +4 -4
  623. package/dist/ui/separator.d.ts.map +1 -1
  624. package/dist/ui/separator.js +17 -17
  625. package/dist/ui/sheet.cjs +462 -1
  626. package/dist/ui/sheet.d.ts +16 -16
  627. package/dist/ui/sheet.d.ts.map +1 -1
  628. package/dist/ui/sheet.js +331 -141
  629. package/dist/ui/sidebar.cjs +1452 -1
  630. package/dist/ui/sidebar.d.ts +48 -48
  631. package/dist/ui/sidebar.d.ts.map +1 -1
  632. package/dist/ui/sidebar.js +1057 -439
  633. package/dist/ui/signature-pad.cjs +741 -0
  634. package/dist/ui/signature-pad.d.ts +115 -0
  635. package/dist/ui/signature-pad.d.ts.map +1 -0
  636. package/dist/ui/signature-pad.js +731 -0
  637. package/dist/ui/skeleton.cjs +62 -1
  638. package/dist/ui/skeleton.d.ts +3 -3
  639. package/dist/ui/skeleton.d.ts.map +1 -1
  640. package/dist/ui/skeleton.js +50 -20
  641. package/dist/ui/slider.cjs +47 -1
  642. package/dist/ui/slider.d.ts +4 -4
  643. package/dist/ui/slider.d.ts.map +1 -1
  644. package/dist/ui/slider.js +27 -26
  645. package/dist/ui/sonner.cjs +28 -1
  646. package/dist/ui/sonner.js +24 -22
  647. package/dist/ui/spinner.cjs +73 -1
  648. package/dist/ui/spinner.d.ts +3 -3
  649. package/dist/ui/spinner.d.ts.map +1 -1
  650. package/dist/ui/spinner.js +29 -28
  651. package/dist/ui/stat.cjs +320 -1
  652. package/dist/ui/stat.d.ts +15 -15
  653. package/dist/ui/stat.d.ts.map +1 -1
  654. package/dist/ui/stat.js +275 -148
  655. package/dist/ui/stepper.cjs +785 -1
  656. package/dist/ui/stepper.d.ts +24 -24
  657. package/dist/ui/stepper.d.ts.map +1 -1
  658. package/dist/ui/stepper.js +594 -281
  659. package/dist/ui/switch.cjs +199 -1
  660. package/dist/ui/switch.d.ts +4 -4
  661. package/dist/ui/switch.d.ts.map +1 -1
  662. package/dist/ui/switch.js +79 -72
  663. package/dist/ui/table.cjs +435 -1
  664. package/dist/ui/table.d.ts +17 -17
  665. package/dist/ui/table.d.ts.map +1 -1
  666. package/dist/ui/table.js +369 -129
  667. package/dist/ui/tabs.cjs +340 -1
  668. package/dist/ui/tabs.d.ts +10 -10
  669. package/dist/ui/tabs.d.ts.map +1 -1
  670. package/dist/ui/tabs.js +204 -95
  671. package/dist/ui/tags-input.cjs +585 -1
  672. package/dist/ui/tags-input.d.ts +13 -13
  673. package/dist/ui/tags-input.d.ts.map +1 -1
  674. package/dist/ui/tags-input.js +446 -221
  675. package/dist/ui/textarea.cjs +119 -1
  676. package/dist/ui/textarea.d.ts +3 -3
  677. package/dist/ui/textarea.d.ts.map +1 -1
  678. package/dist/ui/textarea.js +37 -33
  679. package/dist/ui/timeline.cjs +583 -1
  680. package/dist/ui/timeline.d.ts +22 -22
  681. package/dist/ui/timeline.d.ts.map +1 -1
  682. package/dist/ui/timeline.js +409 -198
  683. package/dist/ui/toggle-group.cjs +128 -1
  684. package/dist/ui/toggle-group.d.ts +7 -7
  685. package/dist/ui/toggle-group.d.ts.map +1 -1
  686. package/dist/ui/toggle-group.js +92 -41
  687. package/dist/ui/toggle.cjs +145 -1
  688. package/dist/ui/toggle.d.ts +4 -4
  689. package/dist/ui/toggle.d.ts.map +1 -1
  690. package/dist/ui/toggle.js +38 -34
  691. package/dist/ui/tooltip.cjs +81 -1
  692. package/dist/ui/tooltip.d.ts +7 -7
  693. package/dist/ui/tooltip.d.ts.map +1 -1
  694. package/dist/ui/tooltip.js +50 -37
  695. package/dist/ui/useBreakpoint.cjs +91 -1
  696. package/dist/ui/useBreakpoint.js +66 -43
  697. package/dist/utils.cjs +4 -1
  698. package/dist/utils.d.ts +2 -12
  699. package/dist/utils.d.ts.map +1 -1
  700. package/dist/utils.js +3 -6
  701. package/package.json +10 -2
@@ -1,868 +1,1187 @@
1
1
  // ../../node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js
2
- function e(e) {
3
- return typeof e == "number";
2
+ function isNumber(subject) {
3
+ return typeof subject === "number";
4
4
  }
5
- function t(e) {
6
- return typeof e == "string";
5
+ function isString(subject) {
6
+ return typeof subject === "string";
7
7
  }
8
- function n(e) {
9
- return typeof e == "boolean";
8
+ function isBoolean(subject) {
9
+ return typeof subject === "boolean";
10
10
  }
11
- function r(e) {
12
- return Object.prototype.toString.call(e) === "[object Object]";
11
+ function isObject(subject) {
12
+ return Object.prototype.toString.call(subject) === "[object Object]";
13
13
  }
14
- function i(e) {
15
- return Math.abs(e);
14
+ function mathAbs(n) {
15
+ return Math.abs(n);
16
16
  }
17
- function a(e) {
18
- return Math.sign(e);
17
+ function mathSign(n) {
18
+ return Math.sign(n);
19
19
  }
20
- function o(e, t) {
21
- return i(e - t);
20
+ function deltaAbs(valueB, valueA) {
21
+ return mathAbs(valueB - valueA);
22
22
  }
23
- function s(e, t) {
24
- return e === 0 || t === 0 || i(e) <= i(t) ? 0 : i(o(i(e), i(t)) / e);
23
+ function factorAbs(valueB, valueA) {
24
+ if (valueB === 0 || valueA === 0) return 0;
25
+ if (mathAbs(valueB) <= mathAbs(valueA)) return 0;
26
+ return mathAbs(deltaAbs(mathAbs(valueB), mathAbs(valueA)) / valueB);
25
27
  }
26
- function c(e) {
27
- return Math.round(e * 100) / 100;
28
+ function roundToTwoDecimals(num) {
29
+ return Math.round(num * 100) / 100;
28
30
  }
29
- function l(e) {
30
- return m(e).map(Number);
31
+ function arrayKeys(array) {
32
+ return objectKeys(array).map(Number);
31
33
  }
32
- function u(e) {
33
- return e[d(e)];
34
+ function arrayLast(array) {
35
+ return array[arrayLastIndex(array)];
34
36
  }
35
- function d(e) {
36
- return Math.max(0, e.length - 1);
37
+ function arrayLastIndex(array) {
38
+ return Math.max(0, array.length - 1);
37
39
  }
38
- function f(e, t) {
39
- return t === d(e);
40
+ function arrayIsLastIndex(array, index) {
41
+ return index === arrayLastIndex(array);
40
42
  }
41
- function p(e, t = 0) {
42
- return Array.from(Array(e), (e, n) => t + n);
43
+ function arrayFromNumber(n, startAt = 0) {
44
+ return Array.from(Array(n), (_, i) => startAt + i);
43
45
  }
44
- function m(e) {
45
- return Object.keys(e);
46
+ function objectKeys(object) {
47
+ return Object.keys(object);
46
48
  }
47
- function h(e, t) {
48
- return [e, t].reduce((e, t) => (m(t).forEach((n) => {
49
- let i = e[n], a = t[n];
50
- e[n] = r(i) && r(a) ? h(i, a) : a;
51
- }), e), {});
49
+ function objectsMergeDeep(objectA, objectB) {
50
+ return [objectA, objectB].reduce((mergedObjects, currentObject) => {
51
+ objectKeys(currentObject).forEach((key) => {
52
+ const valueA = mergedObjects[key];
53
+ const valueB = currentObject[key];
54
+ mergedObjects[key] = isObject(valueA) && isObject(valueB) ? objectsMergeDeep(valueA, valueB) : valueB;
55
+ });
56
+ return mergedObjects;
57
+ }, {});
52
58
  }
53
- function g(e, t) {
54
- return t.MouseEvent !== void 0 && e instanceof t.MouseEvent;
59
+ function isMouseEvent(evt, ownerWindow) {
60
+ return typeof ownerWindow.MouseEvent !== "undefined" && evt instanceof ownerWindow.MouseEvent;
55
61
  }
56
- function _(e, n) {
57
- let r = {
58
- start: i,
59
- center: a,
60
- end: o
62
+ function Alignment(align, viewSize) {
63
+ const predefined = {
64
+ start,
65
+ center,
66
+ end
61
67
  };
62
- function i() {
68
+ function start() {
63
69
  return 0;
64
70
  }
65
- function a(e) {
66
- return o(e) / 2;
71
+ function center(n) {
72
+ return end(n) / 2;
67
73
  }
68
- function o(e) {
69
- return n - e;
74
+ function end(n) {
75
+ return viewSize - n;
70
76
  }
71
- function s(i, a) {
72
- return t(e) ? r[e](i) : e(n, i, a);
77
+ function measure(n, index) {
78
+ if (isString(align)) return predefined[align](n);
79
+ return align(viewSize, n, index);
73
80
  }
74
- return { measure: s };
81
+ return { measure };
75
82
  }
76
- function v() {
77
- let e = [];
78
- function t(t, n, i, a = { passive: !0 }) {
79
- let o;
80
- if ("addEventListener" in t) t.addEventListener(n, i, a), o = () => t.removeEventListener(n, i, a);
81
- else {
82
- let e = t;
83
- e.addListener(i), o = () => e.removeListener(i);
83
+ function EventStore() {
84
+ let listeners = [];
85
+ function add(node, type, handler, options = { passive: true }) {
86
+ let removeListener;
87
+ if ("addEventListener" in node) {
88
+ node.addEventListener(type, handler, options);
89
+ removeListener = () => node.removeEventListener(type, handler, options);
90
+ } else {
91
+ const legacyMediaQueryList = node;
92
+ legacyMediaQueryList.addListener(handler);
93
+ removeListener = () => legacyMediaQueryList.removeListener(handler);
84
94
  }
85
- return e.push(o), r;
95
+ listeners.push(removeListener);
96
+ return self;
86
97
  }
87
- function n() {
88
- e = e.filter((e) => e());
98
+ function clear() {
99
+ listeners = listeners.filter((remove) => remove());
89
100
  }
90
- let r = {
91
- add: t,
92
- clear: n
101
+ const self = {
102
+ add,
103
+ clear
93
104
  };
94
- return r;
105
+ return self;
95
106
  }
96
- function y(e, t, n, r) {
97
- let i = v(), a = 1e3 / 60, o = null, s = 0, c = 0;
98
- function l() {
99
- i.add(e, "visibilitychange", () => {
100
- e.hidden && m();
107
+ function Animations(ownerDocument, ownerWindow, update, render) {
108
+ const documentVisibleHandler = EventStore();
109
+ const fixedTimeStep = 1e3 / 60;
110
+ let lastTimeStamp = null;
111
+ let accumulatedTime = 0;
112
+ let animationId = 0;
113
+ function init() {
114
+ documentVisibleHandler.add(ownerDocument, "visibilitychange", () => {
115
+ if (ownerDocument.hidden) reset();
101
116
  });
102
117
  }
103
- function u() {
104
- p(), i.clear();
118
+ function destroy() {
119
+ stop();
120
+ documentVisibleHandler.clear();
105
121
  }
106
- function d(e) {
107
- if (!c) return;
108
- o || (o = e, n(), n());
109
- let i = e - o;
110
- for (o = e, s += i; s >= a;) n(), s -= a;
111
- r(s / a), c &&= t.requestAnimationFrame(d);
122
+ function animate(timeStamp) {
123
+ if (!animationId) return;
124
+ if (!lastTimeStamp) {
125
+ lastTimeStamp = timeStamp;
126
+ update();
127
+ update();
128
+ }
129
+ const timeElapsed = timeStamp - lastTimeStamp;
130
+ lastTimeStamp = timeStamp;
131
+ accumulatedTime += timeElapsed;
132
+ while (accumulatedTime >= fixedTimeStep) {
133
+ update();
134
+ accumulatedTime -= fixedTimeStep;
135
+ }
136
+ render(accumulatedTime / fixedTimeStep);
137
+ if (animationId) animationId = ownerWindow.requestAnimationFrame(animate);
112
138
  }
113
- function f() {
114
- c ||= t.requestAnimationFrame(d);
139
+ function start() {
140
+ if (animationId) return;
141
+ animationId = ownerWindow.requestAnimationFrame(animate);
115
142
  }
116
- function p() {
117
- t.cancelAnimationFrame(c), o = null, s = 0, c = 0;
143
+ function stop() {
144
+ ownerWindow.cancelAnimationFrame(animationId);
145
+ lastTimeStamp = null;
146
+ accumulatedTime = 0;
147
+ animationId = 0;
118
148
  }
119
- function m() {
120
- o = null, s = 0;
149
+ function reset() {
150
+ lastTimeStamp = null;
151
+ accumulatedTime = 0;
121
152
  }
122
153
  return {
123
- init: l,
124
- destroy: u,
125
- start: f,
126
- stop: p,
127
- update: n,
128
- render: r
154
+ init,
155
+ destroy,
156
+ start,
157
+ stop,
158
+ update,
159
+ render
129
160
  };
130
161
  }
131
- function b(e, t) {
132
- let n = t === "rtl", r = e === "y", i = r ? "y" : "x", a = r ? "x" : "y", o = !r && n ? -1 : 1, s = u(), c = d();
133
- function l(e) {
134
- let { height: t, width: n } = e;
135
- return r ? t : n;
136
- }
137
- function u() {
138
- return r ? "top" : n ? "right" : "left";
139
- }
140
- function d() {
141
- return r ? "bottom" : n ? "left" : "right";
142
- }
143
- function f(e) {
144
- return e * o;
162
+ function Axis(axis, contentDirection) {
163
+ const isRightToLeft = contentDirection === "rtl";
164
+ const isVertical = axis === "y";
165
+ const scroll = isVertical ? "y" : "x";
166
+ const cross = isVertical ? "x" : "y";
167
+ const sign = !isVertical && isRightToLeft ? -1 : 1;
168
+ const startEdge = getStartEdge();
169
+ const endEdge = getEndEdge();
170
+ function measureSize(nodeRect) {
171
+ const { height, width } = nodeRect;
172
+ return isVertical ? height : width;
173
+ }
174
+ function getStartEdge() {
175
+ if (isVertical) return "top";
176
+ return isRightToLeft ? "right" : "left";
177
+ }
178
+ function getEndEdge() {
179
+ if (isVertical) return "bottom";
180
+ return isRightToLeft ? "left" : "right";
181
+ }
182
+ function direction(n) {
183
+ return n * sign;
145
184
  }
146
185
  return {
147
- scroll: i,
148
- cross: a,
149
- startEdge: s,
150
- endEdge: c,
151
- measureSize: l,
152
- direction: f
186
+ scroll,
187
+ cross,
188
+ startEdge,
189
+ endEdge,
190
+ measureSize,
191
+ direction
153
192
  };
154
193
  }
155
- function x(e = 0, t = 0) {
156
- let n = i(e - t);
157
- function r(t) {
158
- return t < e;
194
+ function Limit(min = 0, max = 0) {
195
+ const length = mathAbs(min - max);
196
+ function reachedMin(n) {
197
+ return n < min;
159
198
  }
160
- function a(e) {
161
- return e > t;
199
+ function reachedMax(n) {
200
+ return n > max;
162
201
  }
163
- function o(e) {
164
- return r(e) || a(e);
202
+ function reachedAny(n) {
203
+ return reachedMin(n) || reachedMax(n);
165
204
  }
166
- function s(n) {
167
- return o(n) ? r(n) ? e : t : n;
205
+ function constrain(n) {
206
+ if (!reachedAny(n)) return n;
207
+ return reachedMin(n) ? min : max;
168
208
  }
169
- function c(e) {
170
- return n ? e - n * Math.ceil((e - t) / n) : e;
209
+ function removeOffset(n) {
210
+ if (!length) return n;
211
+ return n - length * Math.ceil((n - max) / length);
171
212
  }
172
213
  return {
173
- length: n,
174
- max: t,
175
- min: e,
176
- constrain: s,
177
- reachedAny: o,
178
- reachedMax: a,
179
- reachedMin: r,
180
- removeOffset: c
214
+ length,
215
+ max,
216
+ min,
217
+ constrain,
218
+ reachedAny,
219
+ reachedMax,
220
+ reachedMin,
221
+ removeOffset
181
222
  };
182
223
  }
183
- function S(e, t, n) {
184
- let { constrain: r } = x(0, e), a = e + 1, o = s(t);
185
- function s(e) {
186
- return n ? i((a + e) % a) : r(e);
187
- }
188
- function c() {
189
- return o;
190
- }
191
- function l(e) {
192
- return o = s(e), f;
193
- }
194
- function u(e) {
195
- return d().set(c() + e);
196
- }
197
- function d() {
198
- return S(e, c(), n);
199
- }
200
- let f = {
201
- get: c,
202
- set: l,
203
- add: u,
204
- clone: d
224
+ function Counter(max, start, loop) {
225
+ const { constrain } = Limit(0, max);
226
+ const loopEnd = max + 1;
227
+ let counter = withinLimit(start);
228
+ function withinLimit(n) {
229
+ return !loop ? constrain(n) : mathAbs((loopEnd + n) % loopEnd);
230
+ }
231
+ function get() {
232
+ return counter;
233
+ }
234
+ function set(n) {
235
+ counter = withinLimit(n);
236
+ return self;
237
+ }
238
+ function add(n) {
239
+ return clone().set(get() + n);
240
+ }
241
+ function clone() {
242
+ return Counter(max, get(), loop);
243
+ }
244
+ const self = {
245
+ get,
246
+ set,
247
+ add,
248
+ clone
205
249
  };
206
- return f;
250
+ return self;
207
251
  }
208
- function C(e, t, r, c, l, u, d, f, p, m, h, _, y, b, S, C, w, T, E) {
209
- let { cross: D, direction: O } = e, k = [
252
+ function DragHandler(axis, rootNode, ownerDocument, ownerWindow, target, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, baseFriction, watchDrag) {
253
+ const { cross: crossAxis, direction } = axis;
254
+ const focusNodes = [
210
255
  "INPUT",
211
256
  "SELECT",
212
257
  "TEXTAREA"
213
- ], A = { passive: !1 }, j = v(), M = v(), ee = x(50, 225).constrain(b.measure(20)), te = {
258
+ ];
259
+ const nonPassiveEvent = { passive: false };
260
+ const initEvents = EventStore();
261
+ const dragEvents = EventStore();
262
+ const goToNextThreshold = Limit(50, 225).constrain(percentOfView.measure(20));
263
+ const snapForceBoost = {
214
264
  mouse: 300,
215
265
  touch: 400
216
- }, ne = {
266
+ };
267
+ const freeForceBoost = {
217
268
  mouse: 500,
218
269
  touch: 600
219
- }, re = S ? 43 : 25, ie = !1, N = 0, P = 0, F = !1, I = !1, L = !1, R = !1;
220
- function ae(e) {
221
- if (!E) return;
222
- function r(t) {
223
- (n(E) || E(e, t)) && ue(t);
270
+ };
271
+ const baseSpeed = dragFree ? 43 : 25;
272
+ let isMoving = false;
273
+ let startScroll = 0;
274
+ let startCross = 0;
275
+ let pointerIsDown = false;
276
+ let preventScroll = false;
277
+ let preventClick = false;
278
+ let isMouse = false;
279
+ function init(emblaApi) {
280
+ if (!watchDrag) return;
281
+ function downIfAllowed(evt) {
282
+ if (isBoolean(watchDrag) || watchDrag(emblaApi, evt)) down(evt);
283
+ }
284
+ const node = rootNode;
285
+ initEvents.add(node, "dragstart", (evt) => evt.preventDefault(), nonPassiveEvent).add(node, "touchmove", () => void 0, nonPassiveEvent).add(node, "touchend", () => void 0).add(node, "touchstart", downIfAllowed).add(node, "mousedown", downIfAllowed).add(node, "touchcancel", up).add(node, "contextmenu", up).add(node, "click", click, true);
286
+ }
287
+ function destroy() {
288
+ initEvents.clear();
289
+ dragEvents.clear();
290
+ }
291
+ function addDragEvents() {
292
+ const node = isMouse ? ownerDocument : rootNode;
293
+ dragEvents.add(node, "touchmove", move, nonPassiveEvent).add(node, "touchend", up).add(node, "mousemove", move, nonPassiveEvent).add(node, "mouseup", up);
294
+ }
295
+ function isFocusNode(node) {
296
+ const nodeName = node.nodeName || "";
297
+ return focusNodes.includes(nodeName);
298
+ }
299
+ function forceBoost() {
300
+ return (dragFree ? freeForceBoost : snapForceBoost)[isMouse ? "mouse" : "touch"];
301
+ }
302
+ function allowedForce(force, targetChanged) {
303
+ const next = index.add(mathSign(force) * -1);
304
+ const baseForce = scrollTarget.byDistance(force, !dragFree).distance;
305
+ if (dragFree || mathAbs(force) < goToNextThreshold) return baseForce;
306
+ if (skipSnaps && targetChanged) return baseForce * .5;
307
+ return scrollTarget.byIndex(next.get(), 0).distance;
308
+ }
309
+ function down(evt) {
310
+ const isMouseEvt = isMouseEvent(evt, ownerWindow);
311
+ isMouse = isMouseEvt;
312
+ preventClick = dragFree && isMouseEvt && !evt.buttons && isMoving;
313
+ isMoving = deltaAbs(target.get(), location.get()) >= 2;
314
+ if (isMouseEvt && evt.button !== 0) return;
315
+ if (isFocusNode(evt.target)) return;
316
+ pointerIsDown = true;
317
+ dragTracker.pointerDown(evt);
318
+ scrollBody.useFriction(0).useDuration(0);
319
+ target.set(location);
320
+ addDragEvents();
321
+ startScroll = dragTracker.readPoint(evt);
322
+ startCross = dragTracker.readPoint(evt, crossAxis);
323
+ eventHandler.emit("pointerDown");
324
+ }
325
+ function move(evt) {
326
+ if (!isMouseEvent(evt, ownerWindow) && evt.touches.length >= 2) return up(evt);
327
+ const lastScroll = dragTracker.readPoint(evt);
328
+ const lastCross = dragTracker.readPoint(evt, crossAxis);
329
+ const diffScroll = deltaAbs(lastScroll, startScroll);
330
+ const diffCross = deltaAbs(lastCross, startCross);
331
+ if (!preventScroll && !isMouse) {
332
+ if (!evt.cancelable) return up(evt);
333
+ preventScroll = diffScroll > diffCross;
334
+ if (!preventScroll) return up(evt);
335
+ }
336
+ const diff = dragTracker.pointerMove(evt);
337
+ if (diffScroll > dragThreshold) preventClick = true;
338
+ scrollBody.useFriction(.3).useDuration(.75);
339
+ animation.start();
340
+ target.add(direction(diff));
341
+ evt.preventDefault();
342
+ }
343
+ function up(evt) {
344
+ const targetChanged = scrollTarget.byDistance(0, false).index !== index.get();
345
+ const rawForce = dragTracker.pointerUp(evt) * forceBoost();
346
+ const force = allowedForce(direction(rawForce), targetChanged);
347
+ const forceFactor = factorAbs(rawForce, force);
348
+ const speed = baseSpeed - 10 * forceFactor;
349
+ const friction = baseFriction + forceFactor / 50;
350
+ preventScroll = false;
351
+ pointerIsDown = false;
352
+ dragEvents.clear();
353
+ scrollBody.useDuration(speed).useFriction(friction);
354
+ scrollTo.distance(force, !dragFree);
355
+ isMouse = false;
356
+ eventHandler.emit("pointerUp");
357
+ }
358
+ function click(evt) {
359
+ if (preventClick) {
360
+ evt.stopPropagation();
361
+ evt.preventDefault();
362
+ preventClick = false;
224
363
  }
225
- let i = t;
226
- j.add(i, "dragstart", (e) => e.preventDefault(), A).add(i, "touchmove", () => void 0, A).add(i, "touchend", () => void 0).add(i, "touchstart", r).add(i, "mousedown", r).add(i, "touchcancel", V).add(i, "contextmenu", V).add(i, "click", de, !0);
227
- }
228
- function oe() {
229
- j.clear(), M.clear();
230
- }
231
- function se() {
232
- let e = R ? r : t;
233
- M.add(e, "touchmove", B, A).add(e, "touchend", V).add(e, "mousemove", B, A).add(e, "mouseup", V);
234
- }
235
- function ce(e) {
236
- let t = e.nodeName || "";
237
- return k.includes(t);
238
- }
239
- function le() {
240
- return (S ? ne : te)[R ? "mouse" : "touch"];
241
- }
242
- function z(e, t) {
243
- let n = _.add(a(e) * -1), r = h.byDistance(e, !S).distance;
244
- return S || i(e) < ee ? r : w && t ? r * .5 : h.byIndex(n.get(), 0).distance;
245
- }
246
- function ue(e) {
247
- let t = g(e, c);
248
- R = t, L = S && t && !e.buttons && ie, ie = o(l.get(), d.get()) >= 2, t && e.button !== 0 || ce(e.target) || (F = !0, u.pointerDown(e), m.useFriction(0).useDuration(0), l.set(d), se(), N = u.readPoint(e), P = u.readPoint(e, D), y.emit("pointerDown"));
249
- }
250
- function B(e) {
251
- if (!g(e, c) && e.touches.length >= 2) return V(e);
252
- let t = u.readPoint(e), n = u.readPoint(e, D), r = o(t, N), i = o(n, P);
253
- if (!I && !R && (!e.cancelable || (I = r > i, !I))) return V(e);
254
- let a = u.pointerMove(e);
255
- r > C && (L = !0), m.useFriction(.3).useDuration(.75), f.start(), l.add(O(a)), e.preventDefault();
256
- }
257
- function V(e) {
258
- let t = h.byDistance(0, !1).index !== _.get(), n = u.pointerUp(e) * le(), r = z(O(n), t), i = s(n, r), a = re - 10 * i, o = T + i / 50;
259
- I = !1, F = !1, M.clear(), m.useDuration(a).useFriction(o), p.distance(r, !S), R = !1, y.emit("pointerUp");
260
- }
261
- function de(e) {
262
- L &&= (e.stopPropagation(), e.preventDefault(), !1);
263
364
  }
264
- function H() {
265
- return F;
365
+ function pointerDown() {
366
+ return pointerIsDown;
266
367
  }
267
368
  return {
268
- init: ae,
269
- destroy: oe,
270
- pointerDown: H
369
+ init,
370
+ destroy,
371
+ pointerDown
271
372
  };
272
373
  }
273
- function w(e, t) {
274
- let n, r;
275
- function a(e) {
276
- return e.timeStamp;
277
- }
278
- function o(n, r) {
279
- let i = `client${(r || e.scroll) === "x" ? "X" : "Y"}`;
280
- return (g(n, t) ? n : n.touches[0])[i];
281
- }
282
- function s(e) {
283
- return n = e, r = e, o(e);
284
- }
285
- function c(e) {
286
- let t = o(e) - o(r), i = a(e) - a(n) > 170;
287
- return r = e, i && (n = e), t;
288
- }
289
- function l(e) {
290
- if (!n || !r) return 0;
291
- let t = o(r) - o(n), s = a(e) - a(n), c = a(e) - a(r) > 170, l = t / s;
292
- return s && !c && i(l) > .1 ? l : 0;
374
+ function DragTracker(axis, ownerWindow) {
375
+ const logInterval = 170;
376
+ let startEvent;
377
+ let lastEvent;
378
+ function readTime(evt) {
379
+ return evt.timeStamp;
380
+ }
381
+ function readPoint(evt, evtAxis) {
382
+ const coord = `client${(evtAxis || axis.scroll) === "x" ? "X" : "Y"}`;
383
+ return (isMouseEvent(evt, ownerWindow) ? evt : evt.touches[0])[coord];
384
+ }
385
+ function pointerDown(evt) {
386
+ startEvent = evt;
387
+ lastEvent = evt;
388
+ return readPoint(evt);
389
+ }
390
+ function pointerMove(evt) {
391
+ const diff = readPoint(evt) - readPoint(lastEvent);
392
+ const expired = readTime(evt) - readTime(startEvent) > logInterval;
393
+ lastEvent = evt;
394
+ if (expired) startEvent = evt;
395
+ return diff;
396
+ }
397
+ function pointerUp(evt) {
398
+ if (!startEvent || !lastEvent) return 0;
399
+ const diffDrag = readPoint(lastEvent) - readPoint(startEvent);
400
+ const diffTime = readTime(evt) - readTime(startEvent);
401
+ const expired = readTime(evt) - readTime(lastEvent) > logInterval;
402
+ const force = diffDrag / diffTime;
403
+ return diffTime && !expired && mathAbs(force) > .1 ? force : 0;
293
404
  }
294
405
  return {
295
- pointerDown: s,
296
- pointerMove: c,
297
- pointerUp: l,
298
- readPoint: o
406
+ pointerDown,
407
+ pointerMove,
408
+ pointerUp,
409
+ readPoint
299
410
  };
300
411
  }
301
- function T() {
302
- function e(e) {
303
- let { offsetTop: t, offsetLeft: n, offsetWidth: r, offsetHeight: i } = e;
412
+ function NodeRects() {
413
+ function measure(node) {
414
+ const { offsetTop, offsetLeft, offsetWidth, offsetHeight } = node;
304
415
  return {
305
- top: t,
306
- right: n + r,
307
- bottom: t + i,
308
- left: n,
309
- width: r,
310
- height: i
416
+ top: offsetTop,
417
+ right: offsetLeft + offsetWidth,
418
+ bottom: offsetTop + offsetHeight,
419
+ left: offsetLeft,
420
+ width: offsetWidth,
421
+ height: offsetHeight
311
422
  };
312
423
  }
313
- return { measure: e };
424
+ return { measure };
314
425
  }
315
- function E(e) {
316
- function t(t) {
317
- return t / 100 * e;
426
+ function PercentOfView(viewSize) {
427
+ function measure(n) {
428
+ return viewSize * (n / 100);
318
429
  }
319
- return { measure: t };
430
+ return { measure };
320
431
  }
321
- function D(e, t, r, a, o, s, c) {
322
- let l = [e].concat(a), u, d, f = [], p = !1;
323
- function m(e) {
324
- return o.measureSize(c.measure(e));
325
- }
326
- function h(o) {
327
- if (!s) return;
328
- d = m(e), f = a.map(m);
329
- function c(n) {
330
- for (let r of n) {
331
- if (p) return;
332
- let n = r.target === e, s = a.indexOf(r.target), c = n ? d : f[s];
333
- if (i(m(n ? e : a[s]) - c) >= .5) {
334
- o.reInit(), t.emit("resize");
432
+ function ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize, nodeRects) {
433
+ const observeNodes = [container].concat(slides);
434
+ let resizeObserver;
435
+ let containerSize;
436
+ let slideSizes = [];
437
+ let destroyed = false;
438
+ function readSize(node) {
439
+ return axis.measureSize(nodeRects.measure(node));
440
+ }
441
+ function init(emblaApi) {
442
+ if (!watchResize) return;
443
+ containerSize = readSize(container);
444
+ slideSizes = slides.map(readSize);
445
+ function defaultCallback(entries) {
446
+ for (const entry of entries) {
447
+ if (destroyed) return;
448
+ const isContainer = entry.target === container;
449
+ const slideIndex = slides.indexOf(entry.target);
450
+ const lastSize = isContainer ? containerSize : slideSizes[slideIndex];
451
+ if (mathAbs(readSize(isContainer ? container : slides[slideIndex]) - lastSize) >= .5) {
452
+ emblaApi.reInit();
453
+ eventHandler.emit("resize");
335
454
  break;
336
455
  }
337
456
  }
338
457
  }
339
- u = new ResizeObserver((e) => {
340
- (n(s) || s(o, e)) && c(e);
341
- }), r.requestAnimationFrame(() => {
342
- l.forEach((e) => u.observe(e));
458
+ resizeObserver = new ResizeObserver((entries) => {
459
+ if (isBoolean(watchResize) || watchResize(emblaApi, entries)) defaultCallback(entries);
460
+ });
461
+ ownerWindow.requestAnimationFrame(() => {
462
+ observeNodes.forEach((node) => resizeObserver.observe(node));
343
463
  });
344
464
  }
345
- function g() {
346
- p = !0, u && u.disconnect();
465
+ function destroy() {
466
+ destroyed = true;
467
+ if (resizeObserver) resizeObserver.disconnect();
347
468
  }
348
469
  return {
349
- init: h,
350
- destroy: g
470
+ init,
471
+ destroy
351
472
  };
352
473
  }
353
- function O(e, t, n, r, o, s) {
354
- let c = 0, l = 0, u = o, d = s, f = e.get(), p = 0;
355
- function m() {
356
- let t = r.get() - e.get(), i = !u, o = 0;
357
- return i ? (c = 0, n.set(r), e.set(r), o = t) : (n.set(e), c += t / u, c *= d, f += c, e.add(c), o = f - p), l = a(o), p = f, C;
358
- }
359
- function h() {
360
- return i(r.get() - t.get()) < .001;
361
- }
362
- function g() {
363
- return u;
364
- }
365
- function _() {
366
- return l;
367
- }
368
- function v() {
369
- return c;
370
- }
371
- function y() {
372
- return x(o);
373
- }
374
- function b() {
375
- return S(s);
376
- }
377
- function x(e) {
378
- return u = e, C;
379
- }
380
- function S(e) {
381
- return d = e, C;
382
- }
383
- let C = {
384
- direction: _,
385
- duration: g,
386
- velocity: v,
387
- seek: m,
388
- settled: h,
389
- useBaseFriction: b,
390
- useBaseDuration: y,
391
- useFriction: S,
392
- useDuration: x
474
+ function ScrollBody(location, offsetLocation, previousLocation, target, baseDuration, baseFriction) {
475
+ let scrollVelocity = 0;
476
+ let scrollDirection = 0;
477
+ let scrollDuration = baseDuration;
478
+ let scrollFriction = baseFriction;
479
+ let rawLocation = location.get();
480
+ let rawLocationPrevious = 0;
481
+ function seek() {
482
+ const displacement = target.get() - location.get();
483
+ const isInstant = !scrollDuration;
484
+ let scrollDistance = 0;
485
+ if (isInstant) {
486
+ scrollVelocity = 0;
487
+ previousLocation.set(target);
488
+ location.set(target);
489
+ scrollDistance = displacement;
490
+ } else {
491
+ previousLocation.set(location);
492
+ scrollVelocity += displacement / scrollDuration;
493
+ scrollVelocity *= scrollFriction;
494
+ rawLocation += scrollVelocity;
495
+ location.add(scrollVelocity);
496
+ scrollDistance = rawLocation - rawLocationPrevious;
497
+ }
498
+ scrollDirection = mathSign(scrollDistance);
499
+ rawLocationPrevious = rawLocation;
500
+ return self;
501
+ }
502
+ function settled() {
503
+ return mathAbs(target.get() - offsetLocation.get()) < .001;
504
+ }
505
+ function duration() {
506
+ return scrollDuration;
507
+ }
508
+ function direction() {
509
+ return scrollDirection;
510
+ }
511
+ function velocity() {
512
+ return scrollVelocity;
513
+ }
514
+ function useBaseDuration() {
515
+ return useDuration(baseDuration);
516
+ }
517
+ function useBaseFriction() {
518
+ return useFriction(baseFriction);
519
+ }
520
+ function useDuration(n) {
521
+ scrollDuration = n;
522
+ return self;
523
+ }
524
+ function useFriction(n) {
525
+ scrollFriction = n;
526
+ return self;
527
+ }
528
+ const self = {
529
+ direction,
530
+ duration,
531
+ velocity,
532
+ seek,
533
+ settled,
534
+ useBaseFriction,
535
+ useBaseDuration,
536
+ useFriction,
537
+ useDuration
393
538
  };
394
- return C;
539
+ return self;
395
540
  }
396
- function k(e, t, n, r, a) {
397
- let o = a.measure(10), s = a.measure(50), c = x(.1, .99), l = !1;
398
- function u() {
399
- return !(l || !e.reachedAny(n.get()) || !e.reachedAny(t.get()));
400
- }
401
- function d(a) {
402
- if (!u()) return;
403
- let l = i(e[e.reachedMin(t.get()) ? "min" : "max"] - t.get()), d = n.get() - t.get(), f = c.constrain(l / s);
404
- n.subtract(d * f), !a && i(d) < o && (n.set(e.constrain(n.get())), r.useDuration(25).useBaseFriction());
541
+ function ScrollBounds(limit, location, target, scrollBody, percentOfView) {
542
+ const pullBackThreshold = percentOfView.measure(10);
543
+ const edgeOffsetTolerance = percentOfView.measure(50);
544
+ const frictionLimit = Limit(.1, .99);
545
+ let disabled = false;
546
+ function shouldConstrain() {
547
+ if (disabled) return false;
548
+ if (!limit.reachedAny(target.get())) return false;
549
+ if (!limit.reachedAny(location.get())) return false;
550
+ return true;
551
+ }
552
+ function constrain(pointerDown) {
553
+ if (!shouldConstrain()) return;
554
+ const diffToEdge = mathAbs(limit[limit.reachedMin(location.get()) ? "min" : "max"] - location.get());
555
+ const diffToTarget = target.get() - location.get();
556
+ const friction = frictionLimit.constrain(diffToEdge / edgeOffsetTolerance);
557
+ target.subtract(diffToTarget * friction);
558
+ if (!pointerDown && mathAbs(diffToTarget) < pullBackThreshold) {
559
+ target.set(limit.constrain(target.get()));
560
+ scrollBody.useDuration(25).useBaseFriction();
561
+ }
405
562
  }
406
- function f(e) {
407
- l = !e;
563
+ function toggleActive(active) {
564
+ disabled = !active;
408
565
  }
409
566
  return {
410
- shouldConstrain: u,
411
- constrain: d,
412
- toggleActive: f
567
+ shouldConstrain,
568
+ constrain,
569
+ toggleActive
413
570
  };
414
571
  }
415
- function A(e, t, n, r, i) {
416
- let a = x(-t + e, 0), s = m(), c = p(), l = h();
417
- function d(e, t) {
418
- return o(e, t) <= 1;
419
- }
420
- function p() {
421
- let e = s[0], t = u(s);
422
- return x(s.lastIndexOf(e), s.indexOf(t) + 1);
423
- }
424
- function m() {
425
- return n.map((e, t) => {
426
- let { min: r, max: i } = a, o = a.constrain(e), s = !t, c = f(n, t);
427
- return s ? i : c || d(r, o) ? r : d(i, o) ? i : o;
428
- }).map((e) => parseFloat(e.toFixed(3)));
429
- }
430
- function h() {
431
- if (t <= e + i) return [a.max];
432
- if (r === "keepSnaps") return s;
433
- let { min: n, max: o } = c;
434
- return s.slice(n, o);
572
+ function ScrollContain(viewSize, contentSize, snapsAligned, containScroll, pixelTolerance) {
573
+ const scrollBounds = Limit(-contentSize + viewSize, 0);
574
+ const snapsBounded = measureBounded();
575
+ const scrollContainLimit = findScrollContainLimit();
576
+ const snapsContained = measureContained();
577
+ function usePixelTolerance(bound, snap) {
578
+ return deltaAbs(bound, snap) <= 1;
579
+ }
580
+ function findScrollContainLimit() {
581
+ const startSnap = snapsBounded[0];
582
+ const endSnap = arrayLast(snapsBounded);
583
+ return Limit(snapsBounded.lastIndexOf(startSnap), snapsBounded.indexOf(endSnap) + 1);
584
+ }
585
+ function measureBounded() {
586
+ return snapsAligned.map((snapAligned, index) => {
587
+ const { min, max } = scrollBounds;
588
+ const snap = scrollBounds.constrain(snapAligned);
589
+ const isFirst = !index;
590
+ const isLast = arrayIsLastIndex(snapsAligned, index);
591
+ if (isFirst) return max;
592
+ if (isLast) return min;
593
+ if (usePixelTolerance(min, snap)) return min;
594
+ if (usePixelTolerance(max, snap)) return max;
595
+ return snap;
596
+ }).map((scrollBound) => parseFloat(scrollBound.toFixed(3)));
597
+ }
598
+ function measureContained() {
599
+ if (contentSize <= viewSize + pixelTolerance) return [scrollBounds.max];
600
+ if (containScroll === "keepSnaps") return snapsBounded;
601
+ const { min, max } = scrollContainLimit;
602
+ return snapsBounded.slice(min, max);
435
603
  }
436
604
  return {
437
- snapsContained: l,
438
- scrollContainLimit: c
605
+ snapsContained,
606
+ scrollContainLimit
439
607
  };
440
608
  }
441
- function j(e, t, n) {
442
- let r = t[0];
443
- return { limit: x(n ? r - e : u(t), r) };
609
+ function ScrollLimit(contentSize, scrollSnaps, loop) {
610
+ const max = scrollSnaps[0];
611
+ return { limit: Limit(loop ? max - contentSize : arrayLast(scrollSnaps), max) };
444
612
  }
445
- function M(e, t, n, r) {
446
- let i = .1, { reachedMin: a, reachedMax: o } = x(t.min + i, t.max + i);
447
- function s(e) {
448
- return e === 1 ? o(n.get()) : e === -1 && a(n.get());
449
- }
450
- function c(t) {
451
- if (!s(t)) return;
452
- let n = t * -1 * e;
453
- r.forEach((e) => e.add(n));
454
- }
455
- return { loop: c };
613
+ function ScrollLooper(contentSize, limit, location, vectors) {
614
+ const jointSafety = .1;
615
+ const { reachedMin, reachedMax } = Limit(limit.min + jointSafety, limit.max + jointSafety);
616
+ function shouldLoop(direction) {
617
+ if (direction === 1) return reachedMax(location.get());
618
+ if (direction === -1) return reachedMin(location.get());
619
+ return false;
620
+ }
621
+ function loop(direction) {
622
+ if (!shouldLoop(direction)) return;
623
+ const loopDistance = contentSize * (direction * -1);
624
+ vectors.forEach((v) => v.add(loopDistance));
625
+ }
626
+ return { loop };
456
627
  }
457
- function ee(e) {
458
- let { max: t, length: n } = e;
459
- function r(e) {
460
- let r = e - t;
461
- return n ? r / -n : 0;
628
+ function ScrollProgress(limit) {
629
+ const { max, length } = limit;
630
+ function get(n) {
631
+ const currentLocation = n - max;
632
+ return length ? currentLocation / -length : 0;
462
633
  }
463
- return { get: r };
634
+ return { get };
464
635
  }
465
- function te(e, t, n, r, a) {
466
- let { startEdge: o, endEdge: s } = e, { groupSlides: c } = a, l = p().map(t.measure), d = m(), f = h();
467
- function p() {
468
- return c(r).map((e) => u(e)[s] - e[0][o]).map(i);
636
+ function ScrollSnaps(axis, alignment, containerRect, slideRects, slidesToScroll) {
637
+ const { startEdge, endEdge } = axis;
638
+ const { groupSlides } = slidesToScroll;
639
+ const alignments = measureSizes().map(alignment.measure);
640
+ const snaps = measureUnaligned();
641
+ const snapsAligned = measureAligned();
642
+ function measureSizes() {
643
+ return groupSlides(slideRects).map((rects) => arrayLast(rects)[endEdge] - rects[0][startEdge]).map(mathAbs);
469
644
  }
470
- function m() {
471
- return r.map((e) => n[o] - e[o]).map((e) => -i(e));
645
+ function measureUnaligned() {
646
+ return slideRects.map((rect) => containerRect[startEdge] - rect[startEdge]).map((snap) => -mathAbs(snap));
472
647
  }
473
- function h() {
474
- return c(d).map((e) => e[0]).map((e, t) => e + l[t]);
648
+ function measureAligned() {
649
+ return groupSlides(snaps).map((g) => g[0]).map((snap, index) => snap + alignments[index]);
475
650
  }
476
651
  return {
477
- snaps: d,
478
- snapsAligned: f
652
+ snaps,
653
+ snapsAligned
479
654
  };
480
655
  }
481
- function ne(e, t, n, r, i, a) {
482
- let { groupSlides: o } = i, { min: s, max: c } = r, l = m();
483
- function m() {
484
- let r = o(a), i = !e || t === "keepSnaps";
485
- return n.length === 1 ? [a] : i ? r : r.slice(s, c).map((e, t, n) => {
486
- let r = !t, i = f(n, t);
487
- return r ? p(u(n[0]) + 1) : i ? p(d(a) - u(n)[0] + 1, u(n)[0]) : e;
656
+ function SlideRegistry(containSnaps, containScroll, scrollSnaps, scrollContainLimit, slidesToScroll, slideIndexes) {
657
+ const { groupSlides } = slidesToScroll;
658
+ const { min, max } = scrollContainLimit;
659
+ const slideRegistry = createSlideRegistry();
660
+ function createSlideRegistry() {
661
+ const groupedSlideIndexes = groupSlides(slideIndexes);
662
+ const doNotContain = !containSnaps || containScroll === "keepSnaps";
663
+ if (scrollSnaps.length === 1) return [slideIndexes];
664
+ if (doNotContain) return groupedSlideIndexes;
665
+ return groupedSlideIndexes.slice(min, max).map((group, index, groups) => {
666
+ const isFirst = !index;
667
+ const isLast = arrayIsLastIndex(groups, index);
668
+ if (isFirst) return arrayFromNumber(arrayLast(groups[0]) + 1);
669
+ if (isLast) return arrayFromNumber(arrayLastIndex(slideIndexes) - arrayLast(groups)[0] + 1, arrayLast(groups)[0]);
670
+ return group;
488
671
  });
489
672
  }
490
- return { slideRegistry: l };
673
+ return { slideRegistry };
491
674
  }
492
- function re(e, t, n, r, o) {
493
- let { reachedAny: s, removeOffset: c, constrain: l } = r;
494
- function d(e) {
495
- return e.concat().sort((e, t) => i(e) - i(t))[0];
496
- }
497
- function f(n) {
498
- let r = e ? c(n) : l(n), { index: a } = t.map((e, t) => ({
499
- diff: p(e - r, 0),
500
- index: t
501
- })).sort((e, t) => i(e.diff) - i(t.diff))[0];
675
+ function ScrollTarget(loop, scrollSnaps, contentSize, limit, targetVector) {
676
+ const { reachedAny, removeOffset, constrain } = limit;
677
+ function minDistance(distances) {
678
+ return distances.concat().sort((a, b) => mathAbs(a) - mathAbs(b))[0];
679
+ }
680
+ function findTargetSnap(target) {
681
+ const distance = loop ? removeOffset(target) : constrain(target);
682
+ const { index } = scrollSnaps.map((snap, index) => ({
683
+ diff: shortcut(snap - distance, 0),
684
+ index
685
+ })).sort((d1, d2) => mathAbs(d1.diff) - mathAbs(d2.diff))[0];
502
686
  return {
503
- index: a,
504
- distance: r
687
+ index,
688
+ distance
505
689
  };
506
690
  }
507
- function p(t, r) {
508
- let i = [
509
- t,
510
- t + n,
511
- t - n
691
+ function shortcut(target, direction) {
692
+ const targets = [
693
+ target,
694
+ target + contentSize,
695
+ target - contentSize
512
696
  ];
513
- if (!e) return t;
514
- if (!r) return d(i);
515
- let o = i.filter((e) => a(e) === r);
516
- return o.length ? d(o) : u(i) - n;
697
+ if (!loop) return target;
698
+ if (!direction) return minDistance(targets);
699
+ const matchingTargets = targets.filter((t) => mathSign(t) === direction);
700
+ if (matchingTargets.length) return minDistance(matchingTargets);
701
+ return arrayLast(targets) - contentSize;
517
702
  }
518
- function m(e, n) {
703
+ function byIndex(index, direction) {
519
704
  return {
520
- index: e,
521
- distance: p(t[e] - o.get(), n)
705
+ index,
706
+ distance: shortcut(scrollSnaps[index] - targetVector.get(), direction)
522
707
  };
523
708
  }
524
- function h(n, r) {
525
- let i = o.get() + n, { index: a, distance: c } = f(i), l = !e && s(i);
526
- return !r || l ? {
527
- index: a,
528
- distance: n
529
- } : {
530
- index: a,
531
- distance: n + p(t[a] - c, 0)
709
+ function byDistance(distance, snap) {
710
+ const target = targetVector.get() + distance;
711
+ const { index, distance: targetSnapDistance } = findTargetSnap(target);
712
+ const reachedBound = !loop && reachedAny(target);
713
+ if (!snap || reachedBound) return {
714
+ index,
715
+ distance
716
+ };
717
+ return {
718
+ index,
719
+ distance: distance + shortcut(scrollSnaps[index] - targetSnapDistance, 0)
532
720
  };
533
721
  }
534
722
  return {
535
- byDistance: h,
536
- byIndex: m,
537
- shortcut: p
723
+ byDistance,
724
+ byIndex,
725
+ shortcut
538
726
  };
539
727
  }
540
- function ie(e, t, n, r, i, a, o) {
541
- function s(i) {
542
- let s = i.distance, c = i.index !== t.get();
543
- a.add(s), s && (r.duration() ? e.start() : (e.update(), e.render(1), e.update())), c && (n.set(t.get()), t.set(i.index), o.emit("select"));
728
+ function ScrollTo(animation, indexCurrent, indexPrevious, scrollBody, scrollTarget, targetVector, eventHandler) {
729
+ function scrollTo(target) {
730
+ const distanceDiff = target.distance;
731
+ const indexDiff = target.index !== indexCurrent.get();
732
+ targetVector.add(distanceDiff);
733
+ if (distanceDiff) {
734
+ if (scrollBody.duration()) animation.start();
735
+ else {
736
+ animation.update();
737
+ animation.render(1);
738
+ animation.update();
739
+ }
740
+ }
741
+ if (indexDiff) {
742
+ indexPrevious.set(indexCurrent.get());
743
+ indexCurrent.set(target.index);
744
+ eventHandler.emit("select");
745
+ }
544
746
  }
545
- function c(e, t) {
546
- s(i.byDistance(e, t));
747
+ function distance(n, snap) {
748
+ scrollTo(scrollTarget.byDistance(n, snap));
547
749
  }
548
- function l(e, n) {
549
- let r = t.clone().set(e);
550
- s(i.byIndex(r.get(), n));
750
+ function index(n, direction) {
751
+ const targetIndex = indexCurrent.clone().set(n);
752
+ scrollTo(scrollTarget.byIndex(targetIndex.get(), direction));
551
753
  }
552
754
  return {
553
- distance: c,
554
- index: l
755
+ distance,
756
+ index
555
757
  };
556
758
  }
557
- function N(t, r, i, a, o, s, c, l) {
558
- let u = {
559
- passive: !0,
560
- capture: !0
561
- }, d = 0;
562
- function f(f) {
563
- if (!l) return;
564
- function m(n) {
565
- if ((/* @__PURE__ */ new Date()).getTime() - d > 10) return;
566
- c.emit("slideFocusStart"), t.scrollLeft = 0;
567
- let r = i.findIndex((e) => e.includes(n));
568
- e(r) && (o.useDuration(0), a.index(r, 0), c.emit("slideFocus"));
759
+ function SlideFocus(root, slides, slideRegistry, scrollTo, scrollBody, eventStore, eventHandler, watchFocus) {
760
+ const focusListenerOptions = {
761
+ passive: true,
762
+ capture: true
763
+ };
764
+ let lastTabPressTime = 0;
765
+ function init(emblaApi) {
766
+ if (!watchFocus) return;
767
+ function defaultCallback(index) {
768
+ if ((/* @__PURE__ */ new Date()).getTime() - lastTabPressTime > 10) return;
769
+ eventHandler.emit("slideFocusStart");
770
+ root.scrollLeft = 0;
771
+ const group = slideRegistry.findIndex((group) => group.includes(index));
772
+ if (!isNumber(group)) return;
773
+ scrollBody.useDuration(0);
774
+ scrollTo.index(group, 0);
775
+ eventHandler.emit("slideFocus");
569
776
  }
570
- s.add(document, "keydown", p, !1), r.forEach((e, t) => {
571
- s.add(e, "focus", (e) => {
572
- (n(l) || l(f, e)) && m(t);
573
- }, u);
777
+ eventStore.add(document, "keydown", registerTabPress, false);
778
+ slides.forEach((slide, slideIndex) => {
779
+ eventStore.add(slide, "focus", (evt) => {
780
+ if (isBoolean(watchFocus) || watchFocus(emblaApi, evt)) defaultCallback(slideIndex);
781
+ }, focusListenerOptions);
574
782
  });
575
783
  }
576
- function p(e) {
577
- e.code === "Tab" && (d = (/* @__PURE__ */ new Date()).getTime());
784
+ function registerTabPress(event) {
785
+ if (event.code === "Tab") lastTabPressTime = (/* @__PURE__ */ new Date()).getTime();
578
786
  }
579
- return { init: f };
787
+ return { init };
580
788
  }
581
- function P(t) {
582
- let n = t;
583
- function r() {
584
- return n;
789
+ function Vector1D(initialValue) {
790
+ let value = initialValue;
791
+ function get() {
792
+ return value;
585
793
  }
586
- function i(e) {
587
- n = s(e);
794
+ function set(n) {
795
+ value = normalizeInput(n);
588
796
  }
589
- function a(e) {
590
- n += s(e);
797
+ function add(n) {
798
+ value += normalizeInput(n);
591
799
  }
592
- function o(e) {
593
- n -= s(e);
800
+ function subtract(n) {
801
+ value -= normalizeInput(n);
594
802
  }
595
- function s(t) {
596
- return e(t) ? t : t.get();
803
+ function normalizeInput(n) {
804
+ return isNumber(n) ? n : n.get();
597
805
  }
598
806
  return {
599
- get: r,
600
- set: i,
601
- add: a,
602
- subtract: o
807
+ get,
808
+ set,
809
+ add,
810
+ subtract
603
811
  };
604
812
  }
605
- function F(e, t) {
606
- let n = e.scroll === "x" ? o : s, r = t.style, i = null, a = !1;
607
- function o(e) {
608
- return `translate3d(${e}px,0px,0px)`;
609
- }
610
- function s(e) {
611
- return `translate3d(0px,${e}px,0px)`;
612
- }
613
- function l(t) {
614
- if (a) return;
615
- let o = c(e.direction(t));
616
- o !== i && (r.transform = n(o), i = o);
617
- }
618
- function u(e) {
619
- a = !e;
620
- }
621
- function d() {
622
- a || (r.transform = "", t.getAttribute("style") || t.removeAttribute("style"));
813
+ function Translate(axis, container) {
814
+ const translate = axis.scroll === "x" ? x : y;
815
+ const containerStyle = container.style;
816
+ let previousTarget = null;
817
+ let disabled = false;
818
+ function x(n) {
819
+ return `translate3d(${n}px,0px,0px)`;
820
+ }
821
+ function y(n) {
822
+ return `translate3d(0px,${n}px,0px)`;
823
+ }
824
+ function to(target) {
825
+ if (disabled) return;
826
+ const newTarget = roundToTwoDecimals(axis.direction(target));
827
+ if (newTarget === previousTarget) return;
828
+ containerStyle.transform = translate(newTarget);
829
+ previousTarget = newTarget;
830
+ }
831
+ function toggleActive(active) {
832
+ disabled = !active;
833
+ }
834
+ function clear() {
835
+ if (disabled) return;
836
+ containerStyle.transform = "";
837
+ if (!container.getAttribute("style")) container.removeAttribute("style");
623
838
  }
624
839
  return {
625
- clear: d,
626
- to: l,
627
- toggleActive: u
840
+ clear,
841
+ to,
842
+ toggleActive
628
843
  };
629
844
  }
630
- function I(e, t, n, r, i, a, o, s, c) {
631
- let u = .5, d = l(i), f = l(i).reverse(), p = v().concat(y());
632
- function m(e, t) {
633
- return e.reduce((e, t) => e - i[t], t);
634
- }
635
- function h(e, t) {
636
- return e.reduce((e, n) => m(e, t) > 0 ? e.concat([n]) : e, []);
845
+ function SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, location, slides) {
846
+ const roundingSafety = .5;
847
+ const ascItems = arrayKeys(slideSizesWithGaps);
848
+ const descItems = arrayKeys(slideSizesWithGaps).reverse();
849
+ const loopPoints = startPoints().concat(endPoints());
850
+ function removeSlideSizes(indexes, from) {
851
+ return indexes.reduce((a, i) => {
852
+ return a - slideSizesWithGaps[i];
853
+ }, from);
854
+ }
855
+ function slidesInGap(indexes, gap) {
856
+ return indexes.reduce((a, i) => {
857
+ return removeSlideSizes(a, gap) > 0 ? a.concat([i]) : a;
858
+ }, []);
637
859
  }
638
- function g(e) {
639
- return a.map((n, i) => ({
640
- start: n - r[i] + u + e,
641
- end: n + t - u + e
860
+ function findSlideBounds(offset) {
861
+ return snaps.map((snap, index) => ({
862
+ start: snap - slideSizes[index] + roundingSafety + offset,
863
+ end: snap + viewSize - roundingSafety + offset
642
864
  }));
643
865
  }
644
- function _(t, r, i) {
645
- let a = g(r);
646
- return t.map((t) => {
647
- let r = i ? 0 : -n, o = i ? n : 0, l = i ? "end" : "start", u = a[t][l];
866
+ function findLoopPoints(indexes, offset, isEndEdge) {
867
+ const slideBounds = findSlideBounds(offset);
868
+ return indexes.map((index) => {
869
+ const initial = isEndEdge ? 0 : -contentSize;
870
+ const altered = isEndEdge ? contentSize : 0;
871
+ const boundEdge = isEndEdge ? "end" : "start";
872
+ const loopPoint = slideBounds[index][boundEdge];
648
873
  return {
649
- index: t,
650
- loopPoint: u,
651
- slideLocation: P(-1),
652
- translate: F(e, c[t]),
653
- target: () => s.get() > u ? r : o
874
+ index,
875
+ loopPoint,
876
+ slideLocation: Vector1D(-1),
877
+ translate: Translate(axis, slides[index]),
878
+ target: () => location.get() > loopPoint ? initial : altered
654
879
  };
655
880
  });
656
881
  }
657
- function v() {
658
- let e = o[0];
659
- return _(h(f, e), n, !1);
882
+ function startPoints() {
883
+ const gap = scrollSnaps[0];
884
+ return findLoopPoints(slidesInGap(descItems, gap), contentSize, false);
660
885
  }
661
- function y() {
662
- let e = t - o[0] - 1;
663
- return _(h(d, e), -n, !0);
886
+ function endPoints() {
887
+ const gap = viewSize - scrollSnaps[0] - 1;
888
+ return findLoopPoints(slidesInGap(ascItems, gap), -contentSize, true);
664
889
  }
665
- function b() {
666
- return p.every(({ index: e }) => m(d.filter((t) => t !== e), t) <= .1);
890
+ function canLoop() {
891
+ return loopPoints.every(({ index }) => {
892
+ return removeSlideSizes(ascItems.filter((i) => i !== index), viewSize) <= .1;
893
+ });
667
894
  }
668
- function x() {
669
- p.forEach((e) => {
670
- let { target: t, translate: n, slideLocation: r } = e, i = t();
671
- i !== r.get() && (n.to(i), r.set(i));
895
+ function loop() {
896
+ loopPoints.forEach((loopPoint) => {
897
+ const { target, translate, slideLocation } = loopPoint;
898
+ const shiftLocation = target();
899
+ if (shiftLocation === slideLocation.get()) return;
900
+ translate.to(shiftLocation);
901
+ slideLocation.set(shiftLocation);
672
902
  });
673
903
  }
674
- function S() {
675
- p.forEach((e) => e.translate.clear());
904
+ function clear() {
905
+ loopPoints.forEach((loopPoint) => loopPoint.translate.clear());
676
906
  }
677
907
  return {
678
- canLoop: b,
679
- clear: S,
680
- loop: x,
681
- loopPoints: p
908
+ canLoop,
909
+ clear,
910
+ loop,
911
+ loopPoints
682
912
  };
683
913
  }
684
- function L(e, t, r) {
685
- let i, a = !1;
686
- function o(o) {
687
- if (!r) return;
688
- function s(e) {
689
- for (let n of e) if (n.type === "childList") {
690
- o.reInit(), t.emit("slidesChanged");
914
+ function SlidesHandler(container, eventHandler, watchSlides) {
915
+ let mutationObserver;
916
+ let destroyed = false;
917
+ function init(emblaApi) {
918
+ if (!watchSlides) return;
919
+ function defaultCallback(mutations) {
920
+ for (const mutation of mutations) if (mutation.type === "childList") {
921
+ emblaApi.reInit();
922
+ eventHandler.emit("slidesChanged");
691
923
  break;
692
924
  }
693
925
  }
694
- i = new MutationObserver((e) => {
695
- a || (n(r) || r(o, e)) && s(e);
696
- }), i.observe(e, { childList: !0 });
926
+ mutationObserver = new MutationObserver((mutations) => {
927
+ if (destroyed) return;
928
+ if (isBoolean(watchSlides) || watchSlides(emblaApi, mutations)) defaultCallback(mutations);
929
+ });
930
+ mutationObserver.observe(container, { childList: true });
697
931
  }
698
- function s() {
699
- i && i.disconnect(), a = !0;
932
+ function destroy() {
933
+ if (mutationObserver) mutationObserver.disconnect();
934
+ destroyed = true;
700
935
  }
701
936
  return {
702
- init: o,
703
- destroy: s
937
+ init,
938
+ destroy
704
939
  };
705
940
  }
706
- function R(e, t, n, r) {
707
- let i = {}, a = null, o = null, s, c = !1;
708
- function l() {
709
- s = new IntersectionObserver((e) => {
710
- c || (e.forEach((e) => {
711
- let n = t.indexOf(e.target);
712
- i[n] = e;
713
- }), a = null, o = null, n.emit("slidesInView"));
941
+ function SlidesInView(container, slides, eventHandler, threshold) {
942
+ const intersectionEntryMap = {};
943
+ let inViewCache = null;
944
+ let notInViewCache = null;
945
+ let intersectionObserver;
946
+ let destroyed = false;
947
+ function init() {
948
+ intersectionObserver = new IntersectionObserver((entries) => {
949
+ if (destroyed) return;
950
+ entries.forEach((entry) => {
951
+ const index = slides.indexOf(entry.target);
952
+ intersectionEntryMap[index] = entry;
953
+ });
954
+ inViewCache = null;
955
+ notInViewCache = null;
956
+ eventHandler.emit("slidesInView");
714
957
  }, {
715
- root: e.parentElement,
716
- threshold: r
717
- }), t.forEach((e) => s.observe(e));
718
- }
719
- function u() {
720
- s && s.disconnect(), c = !0;
721
- }
722
- function d(e) {
723
- return m(i).reduce((t, n) => {
724
- let r = parseInt(n), { isIntersecting: a } = i[r];
725
- return (e && a || !e && !a) && t.push(r), t;
958
+ root: container.parentElement,
959
+ threshold
960
+ });
961
+ slides.forEach((slide) => intersectionObserver.observe(slide));
962
+ }
963
+ function destroy() {
964
+ if (intersectionObserver) intersectionObserver.disconnect();
965
+ destroyed = true;
966
+ }
967
+ function createInViewList(inView) {
968
+ return objectKeys(intersectionEntryMap).reduce((list, slideIndex) => {
969
+ const index = parseInt(slideIndex);
970
+ const { isIntersecting } = intersectionEntryMap[index];
971
+ if (inView && isIntersecting || !inView && !isIntersecting) list.push(index);
972
+ return list;
726
973
  }, []);
727
974
  }
728
- function f(e = !0) {
729
- if (e && a) return a;
730
- if (!e && o) return o;
731
- let t = d(e);
732
- return e && (a = t), e || (o = t), t;
975
+ function get(inView = true) {
976
+ if (inView && inViewCache) return inViewCache;
977
+ if (!inView && notInViewCache) return notInViewCache;
978
+ const slideIndexes = createInViewList(inView);
979
+ if (inView) inViewCache = slideIndexes;
980
+ if (!inView) notInViewCache = slideIndexes;
981
+ return slideIndexes;
733
982
  }
734
983
  return {
735
- init: l,
736
- destroy: u,
737
- get: f
984
+ init,
985
+ destroy,
986
+ get
738
987
  };
739
988
  }
740
- function ae(e, t, n, r, a, o) {
741
- let { measureSize: s, startEdge: c, endEdge: l } = e, d = n[0] && a, p = _(), m = v(), h = n.map(s), g = y();
742
- function _() {
743
- if (!d) return 0;
744
- let e = n[0];
745
- return i(t[c] - e[c]);
746
- }
747
- function v() {
748
- if (!d) return 0;
749
- let e = o.getComputedStyle(u(r));
750
- return parseFloat(e.getPropertyValue(`margin-${l}`));
751
- }
752
- function y() {
753
- return n.map((e, t, n) => {
754
- let r = !t, i = f(n, t);
755
- return r ? h[t] + p : i ? h[t] + m : n[t + 1][c] - e[c];
756
- }).map(i);
989
+ function SlideSizes(axis, containerRect, slideRects, slides, readEdgeGap, ownerWindow) {
990
+ const { measureSize, startEdge, endEdge } = axis;
991
+ const withEdgeGap = slideRects[0] && readEdgeGap;
992
+ const startGap = measureStartGap();
993
+ const endGap = measureEndGap();
994
+ const slideSizes = slideRects.map(measureSize);
995
+ const slideSizesWithGaps = measureWithGaps();
996
+ function measureStartGap() {
997
+ if (!withEdgeGap) return 0;
998
+ const slideRect = slideRects[0];
999
+ return mathAbs(containerRect[startEdge] - slideRect[startEdge]);
1000
+ }
1001
+ function measureEndGap() {
1002
+ if (!withEdgeGap) return 0;
1003
+ const style = ownerWindow.getComputedStyle(arrayLast(slides));
1004
+ return parseFloat(style.getPropertyValue(`margin-${endEdge}`));
1005
+ }
1006
+ function measureWithGaps() {
1007
+ return slideRects.map((rect, index, rects) => {
1008
+ const isFirst = !index;
1009
+ const isLast = arrayIsLastIndex(rects, index);
1010
+ if (isFirst) return slideSizes[index] + startGap;
1011
+ if (isLast) return slideSizes[index] + endGap;
1012
+ return rects[index + 1][startEdge] - rect[startEdge];
1013
+ }).map(mathAbs);
757
1014
  }
758
1015
  return {
759
- slideSizes: h,
760
- slideSizesWithGaps: g,
761
- startGap: p,
762
- endGap: m
1016
+ slideSizes,
1017
+ slideSizesWithGaps,
1018
+ startGap,
1019
+ endGap
763
1020
  };
764
1021
  }
765
- function oe(t, n, r, a, o, s, c, f, p) {
766
- let { startEdge: m, endEdge: h, direction: g } = t, _ = e(r);
767
- function v(e, t) {
768
- return l(e).filter((e) => e % t === 0).map((n) => e.slice(n, n + t));
769
- }
770
- function y(e) {
771
- return e.length ? l(e).reduce((t, r, l) => {
772
- let _ = u(t) || 0, v = _ === 0, y = r === d(e), b = o[m] - s[_][m], x = o[m] - s[r][h], S = !a && v ? g(c) : 0, C = i(x - (!a && y ? g(f) : 0) - (b + S));
773
- return l && C > n + p && t.push(r), y && t.push(e.length), t;
774
- }, []).map((t, n, r) => {
775
- let i = Math.max(r[n - 1] || 0);
776
- return e.slice(i, t);
777
- }) : [];
778
- }
779
- function b(e) {
780
- return _ ? v(e, r) : y(e);
781
- }
782
- return { groupSlides: b };
783
- }
784
- function se(e, t, n, r, i, a, o) {
785
- let { align: s, axis: c, direction: f, startIndex: p, loop: m, duration: h, dragFree: g, dragThreshold: x, inViewThreshold: se, slidesToScroll: ce, skipSnaps: le, containScroll: z, watchResize: ue, watchSlides: B, watchDrag: V, watchFocus: de } = a, H = T(), U = H.measure(t), fe = n.map(H.measure), W = b(c, f), G = W.measureSize(U), pe = E(G), me = _(s, G), he = !m && !!z, { slideSizes: ge, slideSizesWithGaps: _e, startGap: ve, endGap: ye } = ae(W, U, fe, n, m || !!z, i), be = oe(W, G, ce, m, U, fe, ve, ye, 2), { snaps: xe, snapsAligned: Se } = te(W, me, U, fe, be), K = -u(xe) + u(_e), { snapsContained: Ce, scrollContainLimit: we } = A(G, K, Se, z, 2), q = he ? Ce : Se, { limit: J } = j(K, q, m), Y = S(d(q), p, m), Te = Y.clone(), Ee = l(n), De = ({ dragHandler: e, scrollBody: t, scrollBounds: n, options: { loop: r } }) => {
786
- r || n.constrain(e.pointerDown()), t.seek();
787
- }, Oe = ({ scrollBody: e, translate: t, location: n, offsetLocation: r, previousLocation: i, scrollLooper: a, slideLooper: o, dragHandler: s, animation: c, eventHandler: l, scrollBounds: u, options: { loop: d } }, f) => {
788
- let p = e.settled(), m = !u.shouldConstrain(), h = d ? p : p && m, g = h && !s.pointerDown();
789
- g && c.stop();
790
- let _ = n.get() * f + i.get() * (1 - f);
791
- r.set(_), d && (a.loop(e.direction()), o.loop()), t.to(r.get()), g && l.emit("settle"), h || l.emit("scroll");
792
- }, ke = y(r, i, () => De(Be), (e) => Oe(Be, e)), Ae = .68, X = q[Y.get()], je = P(X), Me = P(X), Z = P(X), Q = P(X), $ = O(je, Z, Me, Q, h, Ae), Ne = re(m, q, K, J, Q), Pe = ie(ke, Y, Te, $, Ne, Q, o), Fe = ee(J), Ie = v(), Le = R(t, n, o, se), { slideRegistry: Re } = ne(he, z, q, we, be, Ee), ze = N(e, n, Re, Pe, $, Ie, o, de), Be = {
793
- ownerDocument: r,
794
- ownerWindow: i,
795
- eventHandler: o,
796
- containerRect: U,
797
- slideRects: fe,
798
- animation: ke,
799
- axis: W,
800
- dragHandler: C(W, e, r, i, Q, w(W, i), je, ke, Pe, $, Ne, Y, o, pe, g, x, le, Ae, V),
801
- eventStore: Ie,
802
- percentOfView: pe,
803
- index: Y,
804
- indexPrevious: Te,
805
- limit: J,
806
- location: je,
807
- offsetLocation: Z,
808
- previousLocation: Me,
809
- options: a,
810
- resizeHandler: D(t, o, i, n, W, ue, H),
811
- scrollBody: $,
812
- scrollBounds: k(J, Z, Q, $, pe),
813
- scrollLooper: M(K, J, Z, [
814
- je,
815
- Z,
816
- Me,
817
- Q
1022
+ function SlidesToScroll(axis, viewSize, slidesToScroll, loop, containerRect, slideRects, startGap, endGap, pixelTolerance) {
1023
+ const { startEdge, endEdge, direction } = axis;
1024
+ const groupByNumber = isNumber(slidesToScroll);
1025
+ function byNumber(array, groupSize) {
1026
+ return arrayKeys(array).filter((i) => i % groupSize === 0).map((i) => array.slice(i, i + groupSize));
1027
+ }
1028
+ function bySize(array) {
1029
+ if (!array.length) return [];
1030
+ return arrayKeys(array).reduce((groups, rectB, index) => {
1031
+ const rectA = arrayLast(groups) || 0;
1032
+ const isFirst = rectA === 0;
1033
+ const isLast = rectB === arrayLastIndex(array);
1034
+ const edgeA = containerRect[startEdge] - slideRects[rectA][startEdge];
1035
+ const edgeB = containerRect[startEdge] - slideRects[rectB][endEdge];
1036
+ const gapA = !loop && isFirst ? direction(startGap) : 0;
1037
+ const chunkSize = mathAbs(edgeB - (!loop && isLast ? direction(endGap) : 0) - (edgeA + gapA));
1038
+ if (index && chunkSize > viewSize + pixelTolerance) groups.push(rectB);
1039
+ if (isLast) groups.push(array.length);
1040
+ return groups;
1041
+ }, []).map((currentSize, index, groups) => {
1042
+ const previousSize = Math.max(groups[index - 1] || 0);
1043
+ return array.slice(previousSize, currentSize);
1044
+ });
1045
+ }
1046
+ function groupSlides(array) {
1047
+ return groupByNumber ? byNumber(array, slidesToScroll) : bySize(array);
1048
+ }
1049
+ return { groupSlides };
1050
+ }
1051
+ function Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler) {
1052
+ const { align, axis: scrollAxis, direction, startIndex, loop, duration, dragFree, dragThreshold, inViewThreshold, slidesToScroll: groupSlides, skipSnaps, containScroll, watchResize, watchSlides, watchDrag, watchFocus } = options;
1053
+ const pixelTolerance = 2;
1054
+ const nodeRects = NodeRects();
1055
+ const containerRect = nodeRects.measure(container);
1056
+ const slideRects = slides.map(nodeRects.measure);
1057
+ const axis = Axis(scrollAxis, direction);
1058
+ const viewSize = axis.measureSize(containerRect);
1059
+ const percentOfView = PercentOfView(viewSize);
1060
+ const alignment = Alignment(align, viewSize);
1061
+ const containSnaps = !loop && !!containScroll;
1062
+ const { slideSizes, slideSizesWithGaps, startGap, endGap } = SlideSizes(axis, containerRect, slideRects, slides, loop || !!containScroll, ownerWindow);
1063
+ const slidesToScroll = SlidesToScroll(axis, viewSize, groupSlides, loop, containerRect, slideRects, startGap, endGap, pixelTolerance);
1064
+ const { snaps, snapsAligned } = ScrollSnaps(axis, alignment, containerRect, slideRects, slidesToScroll);
1065
+ const contentSize = -arrayLast(snaps) + arrayLast(slideSizesWithGaps);
1066
+ const { snapsContained, scrollContainLimit } = ScrollContain(viewSize, contentSize, snapsAligned, containScroll, pixelTolerance);
1067
+ const scrollSnaps = containSnaps ? snapsContained : snapsAligned;
1068
+ const { limit } = ScrollLimit(contentSize, scrollSnaps, loop);
1069
+ const index = Counter(arrayLastIndex(scrollSnaps), startIndex, loop);
1070
+ const indexPrevious = index.clone();
1071
+ const slideIndexes = arrayKeys(slides);
1072
+ const update = ({ dragHandler, scrollBody, scrollBounds, options: { loop } }) => {
1073
+ if (!loop) scrollBounds.constrain(dragHandler.pointerDown());
1074
+ scrollBody.seek();
1075
+ };
1076
+ const render = ({ scrollBody, translate, location, offsetLocation, previousLocation, scrollLooper, slideLooper, dragHandler, animation, eventHandler, scrollBounds, options: { loop } }, alpha) => {
1077
+ const shouldSettle = scrollBody.settled();
1078
+ const withinBounds = !scrollBounds.shouldConstrain();
1079
+ const hasSettled = loop ? shouldSettle : shouldSettle && withinBounds;
1080
+ const hasSettledAndIdle = hasSettled && !dragHandler.pointerDown();
1081
+ if (hasSettledAndIdle) animation.stop();
1082
+ const interpolatedLocation = location.get() * alpha + previousLocation.get() * (1 - alpha);
1083
+ offsetLocation.set(interpolatedLocation);
1084
+ if (loop) {
1085
+ scrollLooper.loop(scrollBody.direction());
1086
+ slideLooper.loop();
1087
+ }
1088
+ translate.to(offsetLocation.get());
1089
+ if (hasSettledAndIdle) eventHandler.emit("settle");
1090
+ if (!hasSettled) eventHandler.emit("scroll");
1091
+ };
1092
+ const animation = Animations(ownerDocument, ownerWindow, () => update(engine), (alpha) => render(engine, alpha));
1093
+ const friction = .68;
1094
+ const startLocation = scrollSnaps[index.get()];
1095
+ const location = Vector1D(startLocation);
1096
+ const previousLocation = Vector1D(startLocation);
1097
+ const offsetLocation = Vector1D(startLocation);
1098
+ const target = Vector1D(startLocation);
1099
+ const scrollBody = ScrollBody(location, offsetLocation, previousLocation, target, duration, friction);
1100
+ const scrollTarget = ScrollTarget(loop, scrollSnaps, contentSize, limit, target);
1101
+ const scrollTo = ScrollTo(animation, index, indexPrevious, scrollBody, scrollTarget, target, eventHandler);
1102
+ const scrollProgress = ScrollProgress(limit);
1103
+ const eventStore = EventStore();
1104
+ const slidesInView = SlidesInView(container, slides, eventHandler, inViewThreshold);
1105
+ const { slideRegistry } = SlideRegistry(containSnaps, containScroll, scrollSnaps, scrollContainLimit, slidesToScroll, slideIndexes);
1106
+ const slideFocus = SlideFocus(root, slides, slideRegistry, scrollTo, scrollBody, eventStore, eventHandler, watchFocus);
1107
+ const engine = {
1108
+ ownerDocument,
1109
+ ownerWindow,
1110
+ eventHandler,
1111
+ containerRect,
1112
+ slideRects,
1113
+ animation,
1114
+ axis,
1115
+ dragHandler: DragHandler(axis, root, ownerDocument, ownerWindow, target, DragTracker(axis, ownerWindow), location, animation, scrollTo, scrollBody, scrollTarget, index, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, friction, watchDrag),
1116
+ eventStore,
1117
+ percentOfView,
1118
+ index,
1119
+ indexPrevious,
1120
+ limit,
1121
+ location,
1122
+ offsetLocation,
1123
+ previousLocation,
1124
+ options,
1125
+ resizeHandler: ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize, nodeRects),
1126
+ scrollBody,
1127
+ scrollBounds: ScrollBounds(limit, offsetLocation, target, scrollBody, percentOfView),
1128
+ scrollLooper: ScrollLooper(contentSize, limit, offsetLocation, [
1129
+ location,
1130
+ offsetLocation,
1131
+ previousLocation,
1132
+ target
818
1133
  ]),
819
- scrollProgress: Fe,
820
- scrollSnapList: q.map(Fe.get),
821
- scrollSnaps: q,
822
- scrollTarget: Ne,
823
- scrollTo: Pe,
824
- slideLooper: I(W, G, K, ge, _e, xe, q, Z, n),
825
- slideFocus: ze,
826
- slidesHandler: L(t, o, B),
827
- slidesInView: Le,
828
- slideIndexes: Ee,
829
- slideRegistry: Re,
830
- slidesToScroll: be,
831
- target: Q,
832
- translate: F(W, t)
1134
+ scrollProgress,
1135
+ scrollSnapList: scrollSnaps.map(scrollProgress.get),
1136
+ scrollSnaps,
1137
+ scrollTarget,
1138
+ scrollTo,
1139
+ slideLooper: SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, offsetLocation, slides),
1140
+ slideFocus,
1141
+ slidesHandler: SlidesHandler(container, eventHandler, watchSlides),
1142
+ slidesInView,
1143
+ slideIndexes,
1144
+ slideRegistry,
1145
+ slidesToScroll,
1146
+ target,
1147
+ translate: Translate(axis, container)
833
1148
  };
834
- return Be;
1149
+ return engine;
835
1150
  }
836
- function ce() {
837
- let e = {}, t;
838
- function n(e) {
839
- t = e;
840
- }
841
- function r(t) {
842
- return e[t] || [];
843
- }
844
- function i(e) {
845
- return r(e).forEach((n) => n(t, e)), c;
846
- }
847
- function a(t, n) {
848
- return e[t] = r(t).concat([n]), c;
849
- }
850
- function o(t, n) {
851
- return e[t] = r(t).filter((e) => e !== n), c;
852
- }
853
- function s() {
854
- e = {};
855
- }
856
- let c = {
857
- init: n,
858
- emit: i,
859
- off: o,
860
- on: a,
861
- clear: s
1151
+ function EventHandler() {
1152
+ let listeners = {};
1153
+ let api;
1154
+ function init(emblaApi) {
1155
+ api = emblaApi;
1156
+ }
1157
+ function getListeners(evt) {
1158
+ return listeners[evt] || [];
1159
+ }
1160
+ function emit(evt) {
1161
+ getListeners(evt).forEach((e) => e(api, evt));
1162
+ return self;
1163
+ }
1164
+ function on(evt, cb) {
1165
+ listeners[evt] = getListeners(evt).concat([cb]);
1166
+ return self;
1167
+ }
1168
+ function off(evt, cb) {
1169
+ listeners[evt] = getListeners(evt).filter((e) => e !== cb);
1170
+ return self;
1171
+ }
1172
+ function clear() {
1173
+ listeners = {};
1174
+ }
1175
+ const self = {
1176
+ init,
1177
+ emit,
1178
+ off,
1179
+ on,
1180
+ clear
862
1181
  };
863
- return c;
1182
+ return self;
864
1183
  }
865
- var le = {
1184
+ var defaultOptions = {
866
1185
  align: "center",
867
1186
  axis: "x",
868
1187
  container: null,
@@ -872,145 +1191,201 @@ var le = {
872
1191
  slidesToScroll: 1,
873
1192
  inViewThreshold: 0,
874
1193
  breakpoints: {},
875
- dragFree: !1,
1194
+ dragFree: false,
876
1195
  dragThreshold: 10,
877
- loop: !1,
878
- skipSnaps: !1,
1196
+ loop: false,
1197
+ skipSnaps: false,
879
1198
  duration: 25,
880
1199
  startIndex: 0,
881
- active: !0,
882
- watchDrag: !0,
883
- watchResize: !0,
884
- watchSlides: !0,
885
- watchFocus: !0
1200
+ active: true,
1201
+ watchDrag: true,
1202
+ watchResize: true,
1203
+ watchSlides: true,
1204
+ watchFocus: true
886
1205
  };
887
- function z(e) {
888
- function t(e, t) {
889
- return h(e, t || {});
1206
+ function OptionsHandler(ownerWindow) {
1207
+ function mergeOptions(optionsA, optionsB) {
1208
+ return objectsMergeDeep(optionsA, optionsB || {});
890
1209
  }
891
- function n(n) {
892
- let r = n.breakpoints || {};
893
- return t(n, m(r).filter((t) => e.matchMedia(t).matches).map((e) => r[e]).reduce((e, n) => t(e, n), {}));
1210
+ function optionsAtMedia(options) {
1211
+ const optionsAtMedia = options.breakpoints || {};
1212
+ return mergeOptions(options, objectKeys(optionsAtMedia).filter((media) => ownerWindow.matchMedia(media).matches).map((media) => optionsAtMedia[media]).reduce((a, mediaOption) => mergeOptions(a, mediaOption), {}));
894
1213
  }
895
- function r(t) {
896
- return t.map((e) => m(e.breakpoints || {})).reduce((e, t) => e.concat(t), []).map(e.matchMedia);
1214
+ function optionsMediaQueries(optionsList) {
1215
+ return optionsList.map((options) => objectKeys(options.breakpoints || {})).reduce((acc, mediaQueries) => acc.concat(mediaQueries), []).map(ownerWindow.matchMedia);
897
1216
  }
898
1217
  return {
899
- mergeOptions: t,
900
- optionsAtMedia: n,
901
- optionsMediaQueries: r
1218
+ mergeOptions,
1219
+ optionsAtMedia,
1220
+ optionsMediaQueries
902
1221
  };
903
1222
  }
904
- function ue(e) {
905
- let t = [];
906
- function n(n, r) {
907
- return t = r.filter(({ options: t }) => e.optionsAtMedia(t).active !== !1), t.forEach((t) => t.init(n, e)), r.reduce((e, t) => Object.assign(e, { [t.name]: t }), {});
1223
+ function PluginsHandler(optionsHandler) {
1224
+ let activePlugins = [];
1225
+ function init(emblaApi, plugins) {
1226
+ activePlugins = plugins.filter(({ options }) => optionsHandler.optionsAtMedia(options).active !== false);
1227
+ activePlugins.forEach((plugin) => plugin.init(emblaApi, optionsHandler));
1228
+ return plugins.reduce((map, plugin) => Object.assign(map, { [plugin.name]: plugin }), {});
908
1229
  }
909
- function r() {
910
- t = t.filter((e) => e.destroy());
1230
+ function destroy() {
1231
+ activePlugins = activePlugins.filter((plugin) => plugin.destroy());
911
1232
  }
912
1233
  return {
913
- init: n,
914
- destroy: r
1234
+ init,
1235
+ destroy
915
1236
  };
916
1237
  }
917
- function B(e, n, r) {
918
- let i = e.ownerDocument, a = i.defaultView, o = z(a), s = ue(o), c = v(), l = ce(), { mergeOptions: u, optionsAtMedia: d, optionsMediaQueries: f } = o, { on: p, off: m, emit: h } = l, g = k, _ = !1, y, b = u(le, B.globalOptions), x = u(b), S = [], C, w, T;
919
- function E() {
920
- let { container: n, slides: r } = x;
921
- w = (t(n) ? e.querySelector(n) : n) || e.children[0];
922
- let i = t(r) ? w.querySelectorAll(r) : r;
923
- T = [].slice.call(i || w.children);
924
- }
925
- function D(t) {
926
- let n = se(e, w, T, i, a, t, l);
927
- return t.loop && !n.slideLooper.canLoop() ? D(Object.assign({}, t, { loop: !1 })) : n;
928
- }
929
- function O(e, t) {
930
- _ || (b = u(b, e), x = d(b), S = t || S, E(), y = D(x), f([b, ...S.map(({ options: e }) => e)]).forEach((e) => c.add(e, "change", k)), x.active && (y.translate.to(y.location.get()), y.animation.init(), y.slidesInView.init(), y.slideFocus.init(H), y.eventHandler.init(H), y.resizeHandler.init(H), y.slidesHandler.init(H), y.options.loop && y.slideLooper.loop(), w.offsetParent && T.length && y.dragHandler.init(H), C = s.init(H, S)));
931
- }
932
- function k(e, t) {
933
- let n = P();
934
- A(), O(u({ startIndex: n }, e), t), l.emit("reInit");
935
- }
936
- function A() {
937
- y.dragHandler.destroy(), y.eventStore.clear(), y.translate.clear(), y.slideLooper.clear(), y.resizeHandler.destroy(), y.slidesHandler.destroy(), y.slidesInView.destroy(), y.animation.destroy(), s.destroy(), c.clear();
938
- }
939
- function j() {
940
- _ || (_ = !0, c.clear(), A(), l.emit("destroy"), l.clear());
941
- }
942
- function M(e, t, n) {
943
- x.active && !_ && (y.scrollBody.useBaseFriction().useDuration(t === !0 ? 0 : x.duration), y.scrollTo.index(e, n || 0));
944
- }
945
- function ee(e) {
946
- M(y.index.add(1).get(), e, -1);
947
- }
948
- function te(e) {
949
- M(y.index.add(-1).get(), e, 1);
950
- }
951
- function ne() {
952
- return y.index.add(1).get() !== P();
953
- }
954
- function re() {
955
- return y.index.add(-1).get() !== P();
956
- }
957
- function ie() {
958
- return y.scrollSnapList;
959
- }
960
- function N() {
961
- return y.scrollProgress.get(y.offsetLocation.get());
962
- }
963
- function P() {
964
- return y.index.get();
965
- }
966
- function F() {
967
- return y.indexPrevious.get();
968
- }
969
- function I() {
970
- return y.slidesInView.get();
971
- }
972
- function L() {
973
- return y.slidesInView.get(!1);
974
- }
975
- function R() {
976
- return C;
977
- }
978
- function ae() {
979
- return y;
980
- }
981
- function oe() {
982
- return e;
983
- }
984
- function V() {
985
- return w;
986
- }
987
- function de() {
988
- return T;
989
- }
990
- let H = {
991
- canScrollNext: ne,
992
- canScrollPrev: re,
993
- containerNode: V,
994
- internalEngine: ae,
995
- destroy: j,
996
- off: m,
997
- on: p,
998
- emit: h,
999
- plugins: R,
1000
- previousScrollSnap: F,
1001
- reInit: g,
1002
- rootNode: oe,
1003
- scrollNext: ee,
1004
- scrollPrev: te,
1005
- scrollProgress: N,
1006
- scrollSnapList: ie,
1007
- scrollTo: M,
1008
- selectedScrollSnap: P,
1009
- slideNodes: de,
1010
- slidesInView: I,
1011
- slidesNotInView: L
1238
+ function EmblaCarousel(root, userOptions, userPlugins) {
1239
+ const ownerDocument = root.ownerDocument;
1240
+ const ownerWindow = ownerDocument.defaultView;
1241
+ const optionsHandler = OptionsHandler(ownerWindow);
1242
+ const pluginsHandler = PluginsHandler(optionsHandler);
1243
+ const mediaHandlers = EventStore();
1244
+ const eventHandler = EventHandler();
1245
+ const { mergeOptions, optionsAtMedia, optionsMediaQueries } = optionsHandler;
1246
+ const { on, off, emit } = eventHandler;
1247
+ const reInit = reActivate;
1248
+ let destroyed = false;
1249
+ let engine;
1250
+ let optionsBase = mergeOptions(defaultOptions, EmblaCarousel.globalOptions);
1251
+ let options = mergeOptions(optionsBase);
1252
+ let pluginList = [];
1253
+ let pluginApis;
1254
+ let container;
1255
+ let slides;
1256
+ function storeElements() {
1257
+ const { container: userContainer, slides: userSlides } = options;
1258
+ container = (isString(userContainer) ? root.querySelector(userContainer) : userContainer) || root.children[0];
1259
+ const customSlides = isString(userSlides) ? container.querySelectorAll(userSlides) : userSlides;
1260
+ slides = [].slice.call(customSlides || container.children);
1261
+ }
1262
+ function createEngine(options) {
1263
+ const engine = Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler);
1264
+ if (options.loop && !engine.slideLooper.canLoop()) return createEngine(Object.assign({}, options, { loop: false }));
1265
+ return engine;
1266
+ }
1267
+ function activate(withOptions, withPlugins) {
1268
+ if (destroyed) return;
1269
+ optionsBase = mergeOptions(optionsBase, withOptions);
1270
+ options = optionsAtMedia(optionsBase);
1271
+ pluginList = withPlugins || pluginList;
1272
+ storeElements();
1273
+ engine = createEngine(options);
1274
+ optionsMediaQueries([optionsBase, ...pluginList.map(({ options }) => options)]).forEach((query) => mediaHandlers.add(query, "change", reActivate));
1275
+ if (!options.active) return;
1276
+ engine.translate.to(engine.location.get());
1277
+ engine.animation.init();
1278
+ engine.slidesInView.init();
1279
+ engine.slideFocus.init(self);
1280
+ engine.eventHandler.init(self);
1281
+ engine.resizeHandler.init(self);
1282
+ engine.slidesHandler.init(self);
1283
+ if (engine.options.loop) engine.slideLooper.loop();
1284
+ if (container.offsetParent && slides.length) engine.dragHandler.init(self);
1285
+ pluginApis = pluginsHandler.init(self, pluginList);
1286
+ }
1287
+ function reActivate(withOptions, withPlugins) {
1288
+ const startIndex = selectedScrollSnap();
1289
+ deActivate();
1290
+ activate(mergeOptions({ startIndex }, withOptions), withPlugins);
1291
+ eventHandler.emit("reInit");
1292
+ }
1293
+ function deActivate() {
1294
+ engine.dragHandler.destroy();
1295
+ engine.eventStore.clear();
1296
+ engine.translate.clear();
1297
+ engine.slideLooper.clear();
1298
+ engine.resizeHandler.destroy();
1299
+ engine.slidesHandler.destroy();
1300
+ engine.slidesInView.destroy();
1301
+ engine.animation.destroy();
1302
+ pluginsHandler.destroy();
1303
+ mediaHandlers.clear();
1304
+ }
1305
+ function destroy() {
1306
+ if (destroyed) return;
1307
+ destroyed = true;
1308
+ mediaHandlers.clear();
1309
+ deActivate();
1310
+ eventHandler.emit("destroy");
1311
+ eventHandler.clear();
1312
+ }
1313
+ function scrollTo(index, jump, direction) {
1314
+ if (!options.active || destroyed) return;
1315
+ engine.scrollBody.useBaseFriction().useDuration(jump === true ? 0 : options.duration);
1316
+ engine.scrollTo.index(index, direction || 0);
1317
+ }
1318
+ function scrollNext(jump) {
1319
+ scrollTo(engine.index.add(1).get(), jump, -1);
1320
+ }
1321
+ function scrollPrev(jump) {
1322
+ scrollTo(engine.index.add(-1).get(), jump, 1);
1323
+ }
1324
+ function canScrollNext() {
1325
+ return engine.index.add(1).get() !== selectedScrollSnap();
1326
+ }
1327
+ function canScrollPrev() {
1328
+ return engine.index.add(-1).get() !== selectedScrollSnap();
1329
+ }
1330
+ function scrollSnapList() {
1331
+ return engine.scrollSnapList;
1332
+ }
1333
+ function scrollProgress() {
1334
+ return engine.scrollProgress.get(engine.offsetLocation.get());
1335
+ }
1336
+ function selectedScrollSnap() {
1337
+ return engine.index.get();
1338
+ }
1339
+ function previousScrollSnap() {
1340
+ return engine.indexPrevious.get();
1341
+ }
1342
+ function slidesInView() {
1343
+ return engine.slidesInView.get();
1344
+ }
1345
+ function slidesNotInView() {
1346
+ return engine.slidesInView.get(false);
1347
+ }
1348
+ function plugins() {
1349
+ return pluginApis;
1350
+ }
1351
+ function internalEngine() {
1352
+ return engine;
1353
+ }
1354
+ function rootNode() {
1355
+ return root;
1356
+ }
1357
+ function containerNode() {
1358
+ return container;
1359
+ }
1360
+ function slideNodes() {
1361
+ return slides;
1362
+ }
1363
+ const self = {
1364
+ canScrollNext,
1365
+ canScrollPrev,
1366
+ containerNode,
1367
+ internalEngine,
1368
+ destroy,
1369
+ off,
1370
+ on,
1371
+ emit,
1372
+ plugins,
1373
+ previousScrollSnap,
1374
+ reInit,
1375
+ rootNode,
1376
+ scrollNext,
1377
+ scrollPrev,
1378
+ scrollProgress,
1379
+ scrollSnapList,
1380
+ scrollTo,
1381
+ selectedScrollSnap,
1382
+ slideNodes,
1383
+ slidesInView,
1384
+ slidesNotInView
1012
1385
  };
1013
- return O(n, r), setTimeout(() => l.emit("init"), 0), H;
1386
+ activate(userOptions, userPlugins);
1387
+ setTimeout(() => eventHandler.emit("init"), 0);
1388
+ return self;
1014
1389
  }
1015
- B.globalOptions = void 0;
1016
- export { B as default };
1390
+ EmblaCarousel.globalOptions = void 0;
1391
+ export { EmblaCarousel as default };