@baseline-ui/core 2.2.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (525) hide show
  1. package/dist/Accordion.css +10 -0
  2. package/dist/Accordion.mjs +1 -0
  3. package/dist/ActionButton.css +10 -0
  4. package/dist/ActionButton.mjs +1 -0
  5. package/dist/ActionGroup.css +10 -0
  6. package/dist/ActionGroup.mjs +1 -0
  7. package/dist/ActionIconButton.css +10 -0
  8. package/dist/ActionIconButton.mjs +1 -0
  9. package/dist/Actionable.css +10 -0
  10. package/dist/Actionable.mjs +1 -0
  11. package/dist/AlertDialog.css +10 -0
  12. package/dist/AlertDialog.mjs +1 -0
  13. package/dist/AudioPlayer.css +10 -0
  14. package/dist/AudioPlayer.mjs +1 -0
  15. package/dist/Avatar.css +10 -0
  16. package/dist/Avatar.mjs +1 -0
  17. package/dist/Box.mjs +1 -0
  18. package/dist/ButtonSelect.css +10 -0
  19. package/dist/ButtonSelect.mjs +1 -0
  20. package/dist/Calendar.css +10 -0
  21. package/dist/Calendar.mjs +1 -0
  22. package/dist/Checkbox.css +10 -0
  23. package/dist/Checkbox.mjs +1 -0
  24. package/dist/Code.css +10 -0
  25. package/dist/Code.mjs +1 -0
  26. package/dist/ColorInput.css +10 -0
  27. package/dist/ColorInput.mjs +1 -0
  28. package/dist/ColorSwatch.css +10 -0
  29. package/dist/ColorSwatch.mjs +1 -0
  30. package/dist/ColorSwatchPicker.css +10 -0
  31. package/dist/ColorSwatchPicker.mjs +1 -0
  32. package/dist/ComboBox.css +10 -0
  33. package/dist/ComboBox.mjs +1 -0
  34. package/dist/DateField.css +10 -0
  35. package/dist/DateField.mjs +1 -0
  36. package/dist/DateFormat.mjs +1 -0
  37. package/dist/DeviceProvider.mjs +1 -0
  38. package/dist/Dialog.css +10 -0
  39. package/dist/Dialog.mjs +1 -0
  40. package/dist/Disclosure.css +10 -0
  41. package/dist/Disclosure.mjs +1 -0
  42. package/dist/DomNodeRenderer.mjs +1 -0
  43. package/dist/Drawer.css +10 -0
  44. package/dist/Drawer.mjs +1 -0
  45. package/dist/Editor.css +10 -0
  46. package/dist/Editor.mjs +1 -0
  47. package/dist/FileInput.css +10 -0
  48. package/dist/FileInput.mjs +1 -0
  49. package/dist/FileList.css +10 -0
  50. package/dist/FileList.mjs +1 -0
  51. package/dist/FileUploader.css +10 -0
  52. package/dist/FileUploader.mjs +1 -0
  53. package/dist/FrameProvider.mjs +1 -0
  54. package/dist/FreehandCanvas.css +10 -0
  55. package/dist/FreehandCanvas.mjs +1 -0
  56. package/dist/GridList.css +10 -0
  57. package/dist/GridList.mjs +1 -0
  58. package/dist/Group.mjs +1 -0
  59. package/dist/I18nProvider.mjs +1 -0
  60. package/dist/Icon.mjs +1 -0
  61. package/dist/ImageDropZone.css +10 -0
  62. package/dist/ImageDropZone.mjs +1 -0
  63. package/dist/ImageGallery.css +10 -0
  64. package/dist/ImageGallery.mjs +1 -0
  65. package/dist/InlineAlert.css +10 -0
  66. package/dist/InlineAlert.mjs +1 -0
  67. package/dist/InlineToolbar.css +10 -0
  68. package/dist/InlineToolbar.mjs +10 -0
  69. package/dist/Kbd.css +10 -0
  70. package/dist/Kbd.mjs +1 -0
  71. package/dist/Link.css +10 -0
  72. package/dist/Link.mjs +1 -0
  73. package/dist/ListBox.css +10 -0
  74. package/dist/ListBox.mjs +1 -0
  75. package/dist/Markdown.css +10 -0
  76. package/dist/Markdown.mjs +1 -0
  77. package/dist/Menu.css +10 -0
  78. package/dist/Menu.mjs +1 -0
  79. package/dist/MessageFormat.mjs +1 -0
  80. package/dist/Modal.css +10 -0
  81. package/dist/Modal.mjs +1 -0
  82. package/dist/NumberFormat.mjs +1 -0
  83. package/dist/NumberInput.css +10 -0
  84. package/dist/NumberInput.mjs +1 -0
  85. package/dist/Pagination.css +10 -0
  86. package/dist/Pagination.mjs +1 -0
  87. package/dist/Panel.css +10 -0
  88. package/dist/Panel.mjs +1 -0
  89. package/dist/PointPicker.css +10 -0
  90. package/dist/PointPicker.mjs +1 -0
  91. package/dist/Popover.css +10 -0
  92. package/dist/Popover.mjs +1 -0
  93. package/dist/Portal.css +10 -0
  94. package/dist/Portal.mjs +1 -0
  95. package/dist/PortalContainerProvider.mjs +1 -0
  96. package/dist/Preview.css +10 -0
  97. package/dist/Preview.mjs +1 -0
  98. package/dist/ProgressBar.css +10 -0
  99. package/dist/ProgressBar.mjs +1 -0
  100. package/dist/ProgressSpinner.css +10 -0
  101. package/dist/ProgressSpinner.mjs +1 -0
  102. package/dist/RadioGroup.css +10 -0
  103. package/dist/RadioGroup.mjs +1 -0
  104. package/dist/Reaction.css +10 -0
  105. package/dist/Reaction.mjs +1 -0
  106. package/dist/ScrollControlButton.css +10 -0
  107. package/dist/ScrollControlButton.mjs +1 -0
  108. package/dist/SearchInput.css +10 -0
  109. package/dist/SearchInput.mjs +1 -0
  110. package/dist/Select.css +10 -0
  111. package/dist/Select.mjs +1 -0
  112. package/dist/Separator.css +10 -0
  113. package/dist/Separator.mjs +1 -0
  114. package/dist/Skeleton.css +10 -0
  115. package/dist/Skeleton.mjs +1 -0
  116. package/dist/Slider.css +10 -0
  117. package/dist/Slider.mjs +1 -0
  118. package/dist/StatusCard.css +10 -0
  119. package/dist/StatusCard.mjs +1 -0
  120. package/dist/Stepper.css +10 -0
  121. package/dist/Stepper.mjs +1 -0
  122. package/dist/Switch.css +10 -0
  123. package/dist/Switch.mjs +1 -0
  124. package/dist/Table.css +10 -0
  125. package/dist/Table.mjs +1 -0
  126. package/dist/Tabs.css +10 -0
  127. package/dist/Tabs.mjs +1 -0
  128. package/dist/Tag.css +10 -0
  129. package/dist/Tag.mjs +1 -0
  130. package/dist/TagGroup.css +10 -0
  131. package/dist/TagGroup.mjs +1 -0
  132. package/dist/TaggedPagination.css +10 -0
  133. package/dist/TaggedPagination.mjs +1 -0
  134. package/dist/Text.css +10 -0
  135. package/dist/Text.mjs +1 -0
  136. package/dist/TextInput.css +10 -0
  137. package/dist/TextInput.mjs +1 -0
  138. package/dist/ThemeProvider.css +10 -0
  139. package/dist/ThemeProvider.mjs +1 -0
  140. package/dist/TimeField.css +10 -0
  141. package/dist/TimeField.mjs +1 -0
  142. package/dist/Toast.css +10 -0
  143. package/dist/Toast.mjs +1 -0
  144. package/dist/ToggleButton.css +10 -0
  145. package/dist/ToggleButton.mjs +1 -0
  146. package/dist/ToggleIconButton.css +10 -0
  147. package/dist/ToggleIconButton.mjs +1 -0
  148. package/dist/Toolbar.css +10 -0
  149. package/dist/Toolbar.mjs +1 -0
  150. package/dist/Tooltip.css +10 -0
  151. package/dist/Tooltip.mjs +1 -0
  152. package/dist/TreeView.css +10 -0
  153. package/dist/TreeView.mjs +1 -0
  154. package/dist/UNSAFE_ListBox.css +10 -0
  155. package/dist/UNSAFE_ListBox.mjs +1 -0
  156. package/dist/Virtualizer.mjs +1 -0
  157. package/dist/chunk-22BJMDCA.mjs +10 -0
  158. package/dist/chunk-246VHB32.mjs +10 -0
  159. package/dist/chunk-2JANDORZ.mjs +11 -0
  160. package/dist/chunk-2MS356Q7.mjs +10 -0
  161. package/dist/chunk-2PH5GN2S.mjs +0 -0
  162. package/dist/chunk-2RCST7ET.mjs +10 -0
  163. package/dist/chunk-2UUKKXBD.mjs +10 -0
  164. package/dist/chunk-2VY4FAOY.mjs +10 -0
  165. package/dist/chunk-2WAKHFPS.mjs +10 -0
  166. package/dist/chunk-34TYNTXM.mjs +10 -0
  167. package/dist/chunk-3CWP2VCB.mjs +10 -0
  168. package/dist/chunk-3FYY26ED.mjs +10 -0
  169. package/dist/chunk-3HKG74G4.mjs +0 -0
  170. package/dist/chunk-3UH5CQQF.mjs +10 -0
  171. package/dist/chunk-3W6RWDIE.mjs +10 -0
  172. package/dist/chunk-3X2QM7GV.mjs +10 -0
  173. package/dist/chunk-44OUOGJ4.mjs +10 -0
  174. package/dist/chunk-4ILKZKTW.mjs +10 -0
  175. package/dist/chunk-4N6CLPAY.mjs +10 -0
  176. package/dist/chunk-4NYPVKDO.mjs +10 -0
  177. package/dist/chunk-4PYEGHW5.mjs +10 -0
  178. package/dist/chunk-4QEH5CGK.mjs +10 -0
  179. package/dist/chunk-4SW77SGW.mjs +10 -0
  180. package/dist/chunk-4WW2MVQN.mjs +0 -0
  181. package/dist/chunk-4ZJMZB5B.mjs +10 -0
  182. package/dist/chunk-535OT4US.mjs +10 -0
  183. package/dist/chunk-545KDVGI.mjs +10 -0
  184. package/dist/chunk-54IAJ3RI.mjs +0 -0
  185. package/dist/chunk-5ANNWMLJ.mjs +0 -0
  186. package/dist/chunk-5BAHJXOI.mjs +10 -0
  187. package/dist/chunk-5HXTXIE5.mjs +10 -0
  188. package/dist/chunk-5IC46G5J.mjs +10 -0
  189. package/dist/chunk-5KD2MNNX.mjs +10 -0
  190. package/dist/chunk-5ODZPQL2.mjs +10 -0
  191. package/dist/chunk-5PQHOVGX.mjs +0 -0
  192. package/dist/chunk-5ULL6IBX.mjs +10 -0
  193. package/dist/chunk-5YHNHEDK.mjs +0 -0
  194. package/dist/chunk-63KRQW56.mjs +10 -0
  195. package/dist/chunk-66CUIXA6.mjs +10 -0
  196. package/dist/chunk-66NJ7EYY.mjs +10 -0
  197. package/dist/chunk-67MPTBBY.mjs +10 -0
  198. package/dist/chunk-6F66XVOA.mjs +0 -0
  199. package/dist/chunk-6IRWW75G.mjs +10 -0
  200. package/dist/chunk-6IX6BM7C.mjs +0 -0
  201. package/dist/chunk-6XARU7F2.mjs +0 -0
  202. package/dist/chunk-6YQHZ5RZ.mjs +0 -0
  203. package/dist/chunk-6Z6HOW6T.mjs +10 -0
  204. package/dist/chunk-6ZFBX7C7.mjs +10 -0
  205. package/dist/chunk-6ZQE5SHE.mjs +10 -0
  206. package/dist/chunk-6ZV4UYEG.mjs +10 -0
  207. package/dist/chunk-77BAFSDX.mjs +10 -0
  208. package/dist/chunk-7AY6C5M5.mjs +10 -0
  209. package/dist/chunk-7FJMUUHS.mjs +10 -0
  210. package/dist/chunk-7PRJIPFA.mjs +10 -0
  211. package/dist/chunk-A24DWFQ2.mjs +10 -0
  212. package/dist/chunk-A6ZQQSAX.mjs +10 -0
  213. package/dist/chunk-AC7OXVHA.mjs +10 -0
  214. package/dist/chunk-AGUSZG6K.mjs +0 -0
  215. package/dist/chunk-AGYQLGBZ.mjs +10 -0
  216. package/dist/chunk-AKES5B6C.mjs +10 -0
  217. package/dist/chunk-AMQX3KZR.mjs +10 -0
  218. package/dist/chunk-AMW7LGCF.mjs +10 -0
  219. package/dist/chunk-AMYRLAIC.mjs +10 -0
  220. package/dist/chunk-AQYBKDT2.mjs +16 -0
  221. package/dist/chunk-AUOQSTS5.mjs +10 -0
  222. package/dist/chunk-AV4ZP5SY.mjs +10 -0
  223. package/dist/chunk-AZRPXTYJ.mjs +10 -0
  224. package/dist/chunk-B7PSE5KC.mjs +10 -0
  225. package/dist/chunk-BED7T5CL.mjs +10 -0
  226. package/dist/chunk-BGMVPFYK.mjs +10 -0
  227. package/dist/chunk-BJVFZYUV.mjs +10 -0
  228. package/dist/chunk-BKDQLDOK.mjs +10 -0
  229. package/dist/chunk-BLHN7I5Z.mjs +0 -0
  230. package/dist/chunk-BU5H25MV.mjs +10 -0
  231. package/dist/chunk-C342HL26.mjs +0 -0
  232. package/dist/chunk-C5P23FUW.mjs +10 -0
  233. package/dist/chunk-C6OMLVIQ.mjs +0 -0
  234. package/dist/chunk-CAWUDHAE.mjs +10 -0
  235. package/dist/chunk-CFDKFUTO.mjs +10 -0
  236. package/dist/chunk-CFLEBB5T.mjs +10 -0
  237. package/dist/chunk-CFRTAJP2.mjs +0 -0
  238. package/dist/chunk-CGFLGZL4.mjs +10 -0
  239. package/dist/chunk-CHTLOFCT.mjs +10 -0
  240. package/dist/chunk-CPSUI4IW.mjs +10 -0
  241. package/dist/chunk-CSPZMYVG.mjs +10 -0
  242. package/dist/chunk-CV6JQGJ3.mjs +10 -0
  243. package/dist/chunk-CWPFUB7B.mjs +10 -0
  244. package/dist/chunk-D3IZ4HBL.mjs +10 -0
  245. package/dist/chunk-D5EEZT5J.mjs +10 -0
  246. package/dist/chunk-DD5FWULD.mjs +10 -0
  247. package/dist/chunk-DECHIERQ.mjs +10 -0
  248. package/dist/chunk-DIHILOKU.mjs +10 -0
  249. package/dist/chunk-DM26KBZ3.mjs +10 -0
  250. package/dist/chunk-DOL6RDMF.mjs +10 -0
  251. package/dist/chunk-DRYSJSKA.mjs +10 -0
  252. package/dist/chunk-DY6WY36N.mjs +0 -0
  253. package/dist/chunk-E3PFPOHX.mjs +0 -0
  254. package/dist/chunk-E6VOSF6Z.mjs +10 -0
  255. package/dist/chunk-EA6GA4WC.mjs +10 -0
  256. package/dist/chunk-EK3RIYMV.mjs +10 -0
  257. package/dist/chunk-ELXWR5TS.mjs +10 -0
  258. package/dist/chunk-EMCEJKBJ.mjs +10 -0
  259. package/dist/chunk-ENDOKA57.mjs +10 -0
  260. package/dist/chunk-EU75HMPG.mjs +10 -0
  261. package/dist/chunk-EX2LI2CV.mjs +10 -0
  262. package/dist/chunk-EZXMEGV7.mjs +0 -0
  263. package/dist/chunk-F2HESRBD.mjs +10 -0
  264. package/dist/chunk-F2X474RV.mjs +10 -0
  265. package/dist/chunk-F7PGMOQF.mjs +10 -0
  266. package/dist/chunk-FJ2JRD3H.mjs +10 -0
  267. package/dist/chunk-FKYHERP4.mjs +0 -0
  268. package/dist/chunk-FP5EWPOF.mjs +10 -0
  269. package/dist/chunk-FTYXFTJV.mjs +10 -0
  270. package/dist/chunk-FWAK2OZM.mjs +10 -0
  271. package/dist/chunk-FXCHST4Z.mjs +10 -0
  272. package/dist/chunk-GCZFXILF.mjs +10 -0
  273. package/dist/chunk-GEZGEZAP.mjs +10 -0
  274. package/dist/chunk-GKODQS6E.mjs +10 -0
  275. package/dist/chunk-GOSLHCDP.mjs +0 -0
  276. package/dist/chunk-GX2IOGYR.mjs +12 -0
  277. package/dist/chunk-GXOXYPQQ.mjs +10 -0
  278. package/dist/chunk-H2LXVMBI.mjs +29 -0
  279. package/dist/chunk-HBBRMEES.mjs +10 -0
  280. package/dist/chunk-HEO2XVRN.mjs +10 -0
  281. package/dist/chunk-HI44JQA7.mjs +10 -0
  282. package/dist/chunk-HJQZW2VO.mjs +10 -0
  283. package/dist/chunk-HLDCVJXD.mjs +10 -0
  284. package/dist/chunk-HONWMHMX.mjs +10 -0
  285. package/dist/chunk-HT55YHTN.mjs +10 -0
  286. package/dist/chunk-HWOMGFBL.mjs +10 -0
  287. package/dist/chunk-HXTAOYOD.mjs +10 -0
  288. package/dist/chunk-HZHAKW6I.mjs +10 -0
  289. package/dist/chunk-I3RGYL4B.mjs +10 -0
  290. package/dist/chunk-I3YGB2BE.mjs +10 -0
  291. package/dist/chunk-IB23KCIW.mjs +10 -0
  292. package/dist/chunk-IHLJTHGQ.mjs +10 -0
  293. package/dist/chunk-ILBAZFBL.mjs +0 -0
  294. package/dist/chunk-INDVRI57.mjs +10 -0
  295. package/dist/chunk-IUQOFRI3.mjs +10 -0
  296. package/dist/chunk-IVVZSESM.mjs +10 -0
  297. package/dist/chunk-IW4GXU75.mjs +10 -0
  298. package/dist/chunk-J3MJZQUJ.mjs +10 -0
  299. package/dist/chunk-J4NO4WYU.mjs +0 -0
  300. package/dist/chunk-J7EAQSKX.mjs +10 -0
  301. package/dist/chunk-J7K7I5U2.mjs +10 -0
  302. package/dist/chunk-JBXZ6ZHP.mjs +10 -0
  303. package/dist/chunk-JDLUGVXG.mjs +10 -0
  304. package/dist/chunk-JI4SJ53O.mjs +11 -0
  305. package/dist/chunk-JJG67M2S.mjs +10 -0
  306. package/dist/chunk-JJPCZOOI.mjs +10 -0
  307. package/dist/chunk-JQ4ZGZPV.mjs +15 -0
  308. package/dist/chunk-JUXBZ2ZN.mjs +10 -0
  309. package/dist/chunk-K5RKL3WY.mjs +10 -0
  310. package/dist/chunk-K6IQ4ALU.mjs +0 -0
  311. package/dist/chunk-K6X2BHPP.mjs +10 -0
  312. package/dist/chunk-KAYY6L7Y.mjs +10 -0
  313. package/dist/chunk-KCHAWPUN.mjs +10 -0
  314. package/dist/chunk-KEVERVHK.mjs +10 -0
  315. package/dist/chunk-KG5PDPBK.mjs +10 -0
  316. package/dist/chunk-KKJ6XIU3.mjs +10 -0
  317. package/dist/chunk-KPEONVLU.mjs +10 -0
  318. package/dist/chunk-KUEDQO7P.mjs +10 -0
  319. package/dist/chunk-KY3JKXSX.mjs +10 -0
  320. package/dist/chunk-LQB4U6GF.mjs +10 -0
  321. package/dist/chunk-LQMEFFFM.mjs +10 -0
  322. package/dist/chunk-LZFTBNPW.mjs +10 -0
  323. package/dist/chunk-LZM6UK3C.mjs +10 -0
  324. package/dist/chunk-M5M3EPG5.mjs +10 -0
  325. package/dist/chunk-MEYMETYC.mjs +11 -0
  326. package/dist/chunk-MEZNZ5W6.mjs +10 -0
  327. package/dist/chunk-MFH2E2GU.mjs +10 -0
  328. package/dist/chunk-MHUFXHRU.mjs +10 -0
  329. package/dist/chunk-MI7DCFP2.mjs +10 -0
  330. package/dist/chunk-MLNPTVVX.mjs +10 -0
  331. package/dist/chunk-MRJFGHFW.mjs +10 -0
  332. package/dist/chunk-MUNFBB7D.mjs +0 -0
  333. package/dist/chunk-MVK5CB64.mjs +10 -0
  334. package/dist/chunk-MXKP7NQ4.mjs +10 -0
  335. package/dist/chunk-MZ4O6LWG.mjs +0 -0
  336. package/dist/chunk-N2XGJKZG.mjs +10 -0
  337. package/dist/chunk-N7MTFSWR.mjs +10 -0
  338. package/dist/chunk-NCADIC3I.mjs +10 -0
  339. package/dist/chunk-NGZRN4SF.mjs +10 -0
  340. package/dist/chunk-NHM3H5JU.mjs +0 -0
  341. package/dist/chunk-NKKKKVQ7.mjs +10 -0
  342. package/dist/chunk-NMTDGCRA.mjs +10 -0
  343. package/dist/chunk-NO55UIGK.mjs +0 -0
  344. package/dist/chunk-NRKHWSOP.mjs +0 -0
  345. package/dist/chunk-NSC53QWT.mjs +10 -0
  346. package/dist/chunk-NV7KQVPE.mjs +10 -0
  347. package/dist/chunk-O57ZEY3V.mjs +0 -0
  348. package/dist/chunk-O66FNQSB.mjs +10 -0
  349. package/dist/chunk-O6AE67ZY.mjs +10 -0
  350. package/dist/chunk-O7XK2WIX.mjs +10 -0
  351. package/dist/chunk-OAY74XPB.mjs +10 -0
  352. package/dist/chunk-OC42IZG2.mjs +10 -0
  353. package/dist/chunk-OMT6ZWSV.mjs +11 -0
  354. package/dist/chunk-OO7BXL2N.mjs +10 -0
  355. package/dist/chunk-P5GO3XIS.mjs +10 -0
  356. package/dist/chunk-PAQQ7MQG.mjs +10 -0
  357. package/dist/chunk-PBFIKNYZ.mjs +10 -0
  358. package/dist/chunk-PF3OQKXP.mjs +10 -0
  359. package/dist/chunk-PHZZLBH3.mjs +10 -0
  360. package/dist/chunk-PR3HWZFH.mjs +10 -0
  361. package/dist/chunk-PZTVDABF.mjs +0 -0
  362. package/dist/chunk-Q5UMLFN3.mjs +10 -0
  363. package/dist/chunk-QAUEG3EX.mjs +0 -0
  364. package/dist/chunk-QBJDGBTU.mjs +0 -0
  365. package/dist/chunk-QMDDCVAF.mjs +10 -0
  366. package/dist/chunk-QNBBJ5HC.mjs +11 -0
  367. package/dist/chunk-QY3O34WX.mjs +10 -0
  368. package/dist/chunk-RC7QITNV.mjs +10 -0
  369. package/dist/chunk-RCBUNCHV.mjs +10 -0
  370. package/dist/chunk-RELI5YAS.mjs +10 -0
  371. package/dist/chunk-RFTDIXEG.mjs +10 -0
  372. package/dist/chunk-RJC3HQDZ.mjs +10 -0
  373. package/dist/chunk-RJWPSJX2.mjs +10 -0
  374. package/dist/chunk-RMUV6NJJ.mjs +10 -0
  375. package/dist/chunk-ROHLZINC.mjs +10 -0
  376. package/dist/chunk-RSKKEGJZ.mjs +10 -0
  377. package/dist/chunk-RT4LMB6X.mjs +10 -0
  378. package/dist/chunk-RXSYDMT6.mjs +10 -0
  379. package/dist/chunk-S5XX36JC.mjs +10 -0
  380. package/dist/chunk-SAZLJ66W.mjs +10 -0
  381. package/dist/chunk-SMAYNDQQ.mjs +10 -0
  382. package/dist/chunk-TAROK7TO.mjs +10 -0
  383. package/dist/chunk-TAYP2OGC.mjs +10 -0
  384. package/dist/chunk-TDXALNX3.mjs +10 -0
  385. package/dist/chunk-TEQE6WCH.mjs +10 -0
  386. package/dist/chunk-THRAJMLX.mjs +10 -0
  387. package/dist/chunk-TI5RR7KX.mjs +10 -0
  388. package/dist/chunk-TIHKHXTS.mjs +10 -0
  389. package/dist/chunk-TJEK54BW.mjs +10 -0
  390. package/dist/chunk-TK4QXU3W.mjs +10 -0
  391. package/dist/chunk-TKQOQVZD.mjs +10 -0
  392. package/dist/chunk-TO2TQ2LE.mjs +10 -0
  393. package/dist/chunk-TO6OQF2Y.mjs +10 -0
  394. package/dist/chunk-TZ4MVY4E.mjs +10 -0
  395. package/dist/chunk-U2ODAIZG.mjs +10 -0
  396. package/dist/chunk-UCNHDT36.mjs +10 -0
  397. package/dist/chunk-UCZZLAPB.mjs +10 -0
  398. package/dist/chunk-UMABUZ67.mjs +10 -0
  399. package/dist/chunk-UQJGSVXP.mjs +10 -0
  400. package/dist/chunk-USMC34OO.mjs +10 -0
  401. package/dist/chunk-UTQ7AIPM.mjs +0 -0
  402. package/dist/chunk-UUBOEBYZ.mjs +10 -0
  403. package/dist/chunk-V3L4SVVF.mjs +10 -0
  404. package/dist/chunk-VCIX4HG7.mjs +0 -0
  405. package/dist/chunk-VDUFLHKK.mjs +10 -0
  406. package/dist/chunk-VG7J427T.mjs +10 -0
  407. package/dist/chunk-VHDXSFQC.mjs +10 -0
  408. package/dist/chunk-VLQ4S7XC.mjs +10 -0
  409. package/dist/chunk-VU2PDOBR.mjs +10 -0
  410. package/dist/chunk-VXB5SVQC.mjs +10 -0
  411. package/dist/chunk-W6QO7FPZ.mjs +10 -0
  412. package/dist/chunk-WAFYFWH4.mjs +0 -0
  413. package/dist/chunk-WAOWR7MR.mjs +10 -0
  414. package/dist/chunk-WDJ4GXWF.mjs +10 -0
  415. package/dist/chunk-WL27JGVG.mjs +10 -0
  416. package/dist/chunk-WOVAT6U4.mjs +10 -0
  417. package/dist/chunk-WSCZ34XO.mjs +10 -0
  418. package/dist/chunk-WSQGB4ZE.mjs +0 -0
  419. package/dist/chunk-WWSGOGLA.mjs +10 -0
  420. package/dist/chunk-X3AXUU3H.mjs +10 -0
  421. package/dist/chunk-XB657BXX.mjs +10 -0
  422. package/dist/chunk-XBBPWSJI.mjs +0 -0
  423. package/dist/chunk-XJGQXVMR.mjs +10 -0
  424. package/dist/chunk-XPISSX5R.mjs +10 -0
  425. package/dist/chunk-XTH6B5FE.mjs +10 -0
  426. package/dist/chunk-XVBOKL6D.mjs +10 -0
  427. package/dist/chunk-XWLESSHN.mjs +10 -0
  428. package/dist/chunk-XXANV3FM.mjs +10 -0
  429. package/dist/chunk-Y4DRSGEJ.mjs +10 -0
  430. package/dist/chunk-Y6XQJ4X2.mjs +10 -0
  431. package/dist/chunk-YB3KW7JC.mjs +10 -0
  432. package/dist/chunk-YCI6BEXQ.mjs +10 -0
  433. package/dist/chunk-YIGT3OP2.mjs +10 -0
  434. package/dist/chunk-YOBESAXG.mjs +10 -0
  435. package/dist/chunk-YS3Y5KGV.mjs +10 -0
  436. package/dist/chunk-YT36W3OS.mjs +10 -0
  437. package/dist/chunk-YV3WI6OV.mjs +10 -0
  438. package/dist/chunk-YV5CNDCW.mjs +0 -0
  439. package/dist/chunk-YVYMYKYN.mjs +10 -0
  440. package/dist/chunk-ZANUFNOL.mjs +0 -0
  441. package/dist/chunk-ZGRRD3TU.mjs +10 -0
  442. package/dist/chunk-ZLAY7NNY.mjs +10 -0
  443. package/dist/chunk-ZLDT2KDZ.mjs +10 -0
  444. package/dist/chunk-ZNN43VZV.mjs +10 -0
  445. package/dist/chunk-ZREX7XOO.mjs +10 -0
  446. package/dist/chunk-ZRWDMNNY.mjs +10 -0
  447. package/dist/chunk-ZVODDLGL.mjs +10 -0
  448. package/dist/hooks/useDevice.mjs +1 -0
  449. package/dist/hooks/useI18n.mjs +1 -0
  450. package/dist/hooks/useImage.mjs +1 -0
  451. package/dist/hooks/useIntersectionObserver.mjs +1 -0
  452. package/dist/hooks/useIsFirstRender.mjs +1 -0
  453. package/dist/hooks/useIsTouchDevice.mjs +1 -0
  454. package/dist/hooks/useLiveInteractionModality.mjs +1 -0
  455. package/dist/hooks/useLocalStorage.mjs +1 -0
  456. package/dist/hooks/useMedia.mjs +1 -0
  457. package/dist/hooks/useMutationObserver.mjs +1 -0
  458. package/dist/hooks/usePortalContainer.mjs +1 -0
  459. package/dist/hooks/usePreventFocus.mjs +1 -0
  460. package/dist/hooks/useResizeObserver.mjs +1 -0
  461. package/dist/hooks/useTextSelection.mjs +1 -0
  462. package/dist/hooks/useUndoRedo.mjs +1 -0
  463. package/dist/index.d.ts +349 -73
  464. package/dist/index.js +21 -21
  465. package/dist/index.mjs +1 -43
  466. package/dist/messageIds.mjs +1 -0
  467. package/dist/react-aria.d.ts +133 -133
  468. package/dist/react-aria.mjs +1 -0
  469. package/dist/react-stately.d.ts +82 -82
  470. package/dist/react-stately.mjs +1 -0
  471. package/dist/utils/a11y.mjs +1 -0
  472. package/dist/utils/classNames.mjs +1 -0
  473. package/dist/utils/colors.mjs +1 -0
  474. package/dist/utils/constants.mjs +10 -0
  475. package/dist/utils/devWarn.mjs +1 -0
  476. package/dist/utils/dom.mjs +1 -0
  477. package/dist/utils/invariant.mjs +1 -0
  478. package/dist/utils/isInIframe.mjs +1 -0
  479. package/dist/utils/isInShadowDOM.mjs +1 -0
  480. package/dist/utils/isRect.mjs +1 -0
  481. package/dist/utils/keyboards.mjs +1 -0
  482. package/dist/utils/math.mjs +1 -0
  483. package/dist/utils/objects.mjs +1 -0
  484. package/dist/utils/onDropOrPaste.mjs +1 -0
  485. package/dist/utils/overlays.mjs +1 -0
  486. package/dist/utils/reactAriaCompat.mjs +1 -0
  487. package/dist/utils/reactAriaComponentsCompat.mjs +1 -0
  488. package/dist/utils/resolveAriaLabelAttrs.mjs +1 -0
  489. package/dist/utils/resolvePublicUrl.mjs +10 -0
  490. package/dist/utils/strings.mjs +1 -0
  491. package/dist/utils/style.mjs +1 -0
  492. package/dist/utils/svgs.mjs +1 -0
  493. package/dist/utils/validations.mjs +1 -0
  494. package/intl/ar.json +2 -2
  495. package/intl/cs.json +2 -2
  496. package/intl/cy.json +4 -4
  497. package/intl/da.json +3 -3
  498. package/intl/de.json +3 -3
  499. package/intl/el.json +2 -2
  500. package/intl/en-GB.json +2 -2
  501. package/intl/en.json +2 -2
  502. package/intl/fi.json +3 -3
  503. package/intl/fr-CA.json +1 -1
  504. package/intl/fr.json +2 -2
  505. package/intl/he.json +3 -3
  506. package/intl/hr.json +3 -3
  507. package/intl/id.json +3 -3
  508. package/intl/ja.json +2 -2
  509. package/intl/ko.json +1 -1
  510. package/intl/ms.json +2 -2
  511. package/intl/nb-NO.json +3 -3
  512. package/intl/nl.json +4 -4
  513. package/intl/pt-PT.json +1 -1
  514. package/intl/pt.json +3 -3
  515. package/intl/ru.json +2 -2
  516. package/intl/sk.json +2 -2
  517. package/intl/sl.json +4 -4
  518. package/intl/sv.json +3 -3
  519. package/intl/th.json +1 -1
  520. package/intl/tr.json +3 -3
  521. package/intl/uk.json +1 -1
  522. package/intl/zh-Hant.json +2 -2
  523. package/messages.json +2 -2
  524. package/package.json +9 -6
  525. package/sbom.json +13 -13
@@ -0,0 +1,10 @@
1
+ import {a as a$6}from'./chunk-VLQ4S7XC.mjs';import {a as a$e}from'./chunk-VG7J427T.mjs';import {k,j as j$1,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-RC7QITNV.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-7AY6C5M5.mjs';import {p}from'./chunk-SMAYNDQQ.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-KKJ6XIU3.mjs';import {b as b$6}from'./chunk-246VHB32.mjs';import {b as b$7}from'./chunk-OC42IZG2.mjs';import {b as b$8}from'./chunk-PAQQ7MQG.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-Y6XQJ4X2.mjs';import {a as a$d}from'./chunk-MEYMETYC.mjs';import {a as a$c,b as b$2}from'./chunk-J7EAQSKX.mjs';import {d,h,e,f,g as g$1}from'./chunk-IW4GXU75.mjs';import {a as a$f}from'./chunk-NSC53QWT.mjs';import {a as a$m}from'./chunk-SAZLJ66W.mjs';import {b,c as c$2}from'./chunk-GX2IOGYR.mjs';import {a as a$t}from'./chunk-M5M3EPG5.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-J3MJZQUJ.mjs';import {a as a$7}from'./chunk-O7XK2WIX.mjs';import {a as a$j}from'./chunk-MEZNZ5W6.mjs';import {a as a$a}from'./chunk-YV3WI6OV.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$r}from'./chunk-4ZJMZB5B.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$p}from'./chunk-4PYEGHW5.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$q}from'./chunk-X3AXUU3H.mjs';import {a as a$s}from'./chunk-545KDVGI.mjs';import {a}from'./chunk-YS3Y5KGV.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {d as d$2}from'./chunk-Y4DRSGEJ.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-TZ4MVY4E.mjs';import {a as a$n}from'./chunk-KEVERVHK.mjs';import {c as c$3}from'./chunk-JDLUGVXG.mjs';import {e as e$2,g as g$2}from'./chunk-AUOQSTS5.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import q,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var $=new WeakMap;function de(t,e,a){let{keyboardDelegate:n,isDisabled:p,isRequired:S,name:c,form:s,validationBehavior:y="aria"}=t,x=a$l({usage:"search",sensitivity:"base"}),l=useMemo(()=>n||new b$6(e.collection,e.disabledKeys,a,x),[n,e.collection,e.disabledKeys,x,a]),{menuTriggerProps:u,menuProps:r}=c$4({isDisabled:p,type:"listbox"},e,a),d=m=>{if(e.selectionManager.selectionMode!=="multiple")switch(m.key){case "ArrowLeft":{m.preventDefault();let T=e.selectedKey!=null?l.getKeyAbove?.(e.selectedKey):l.getFirstKey?.();T!=null&&e.setSelectedKey(T);break}case "ArrowRight":{m.preventDefault();let T=e.selectedKey!=null?l.getKeyBelow?.(e.selectedKey):l.getFirstKey?.();T!=null&&e.setSelectedKey(T);break}}},{typeSelectProps:o}=b$7({keyboardDelegate:l,selectionManager:e.selectionManager,onTypeSelect(m){e.setSelectedKey(m);}}),{isInvalid:g,validationErrors:b,validationDetails:C}=e.displayValidation,{labelProps:O,fieldProps:i,descriptionProps:M,errorMessageProps:f}=a$m({...t,labelElementType:"span",isInvalid:g,errorMessage:t.errorMessage||b,ref:a});e.selectionManager.selectionMode==="multiple"&&(o={});let B=a$n(t,{labelable:true}),P=c$1(o,u,i),h=c$3();return $.set(e,{isDisabled:p,isRequired:S,name:c,form:s,validationBehavior:y}),{labelProps:{...O,onClick:()=>{t.isDisabled||(a.current?.focus(),d$2("keyboard"));}},triggerProps:c$1(B,{...P,isDisabled:p,onKeyDown:a$o(P.onKeyDown,d,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[h,P["aria-labelledby"],P["aria-label"]&&!P["aria-labelledby"]?P.id:null].filter(Boolean).join(" "),onFocus(m){e.isFocused||(t.onFocus&&t.onFocus(m),t.onFocusChange&&t.onFocusChange(true),e.setFocused(true));},onBlur(m){e.isOpen||(t.onBlur&&t.onBlur(m),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));}}),valueProps:{id:h},menuProps:{...r,onAction:void 0,autoFocus:e.focusStrategy||true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,disallowEmptySelection:true,linkBehavior:"selection",onBlur:m=>{e$2(m.currentTarget,m.relatedTarget)||(t.onBlur&&t.onBlur(m),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));},"aria-labelledby":[i["aria-labelledby"],P["aria-label"]&&!i["aria-labelledby"]?P.id:null].filter(Boolean).join(" ")},descriptionProps:M,errorMessageProps:f,isInvalid:g,validationErrors:b,validationDetails:C,hiddenSelectProps:{isDisabled:p,name:c,label:t.label,state:e,triggerRef:a,form:s}}}function bt(t,e,a){let n=$.get(e)||{},{autoComplete:p,name:S=n.name,form:c=n.form,isDisabled:s=n.isDisabled}=t,{validationBehavior:y,isRequired:x}=n,{visuallyHiddenProps:l}=a$r({style:{position:"fixed",top:0,left:0}});a$s(t.selectRef,e.defaultValue,e.setValue),a$t({validationBehavior:y,focus:()=>a.current?.focus()},e,t.selectRef);let u=e.setValue,r=useCallback(d=>{let o=g$2(d);o.multiple?u(Array.from(o.selectedOptions,g=>g.value)):u(d.currentTarget.value);},[u]);return {containerProps:{...l,"aria-hidden":true,"data-react-aria-prevent-focus":true,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:p,disabled:s,multiple:e.selectionManager.selectionMode==="multiple",required:y==="native"&&x,name:S,form:c,value:e.value??"",onChange:r,onInput:r}}}function ue(t){let{state:e,triggerRef:a,label:n,name:p,form:S,isDisabled:c}=t,s=useRef(null),y=useRef(null),{containerProps:x,selectProps:l}=bt({...t,selectRef:e.collection.size<=300?s:y},e,a),u=Array.isArray(e.value)?e.value:[e.value];if(e.collection.size<=300)return jsx("div",{...x,"data-testid":"hidden-select-container",children:jsxs("label",{children:[n,jsxs("select",{...l,ref:s,children:[jsx("option",{value:"",label:"\xA0",children:"\xA0"}),[...e.collection.getKeys()].map(r=>{let d=e.collection.getItem(r);if(d&&d.type==="item")return jsx("option",{value:d.key,children:d.textValue},d.key)}),e.collection.size===0&&p&&u.map((r,d)=>jsx("option",{value:r??""},d))]})]})});if(p){let r=$.get(e)||{},{validationBehavior:d}=r;u.length===0&&(u=[null]);let o=u.map((g,b)=>{let C={type:"hidden",autoComplete:l.autoComplete,name:p,form:S,disabled:c,value:g??""};return d==="native"?jsx("input",{...C,ref:b===0?y:null,style:{display:"none"},type:"text",required:b===0?l.required:false,onChange:()=>{}},b):jsx("input",{...C,ref:b===0?y:null},b)});return jsx(Fragment,{children:o})}return null}function pe(t){let{selectionMode:e="single",shouldCloseOnSelect:a=e==="single"}=t,n=a$p(t),[p,S]=useState(null),c=useMemo(()=>t.defaultValue!==void 0?t.defaultValue:e==="single"?t.defaultSelectedKey??null:[],[t.defaultValue,t.defaultSelectedKey,e]),s=useMemo(()=>t.value!==void 0?t.value:e==="single"?t.selectedKey:void 0,[t.value,t.selectedKey,e]),[y,x]=a$q(s,c,t.onChange),l=e==="single"&&Array.isArray(y)?y[0]:y,u=i=>{if(e==="single"){let M=Array.isArray(i)?i[0]??null:i;x(M),M!==l&&t.onSelectionChange?.(M);}else {let M=[];Array.isArray(i)?M=i:i!=null&&(M=[i]),x(M);}},r=b$8({...t,selectionMode:e,disallowEmptySelection:e==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>Bt(l),[l]),onSelectionChange:i=>{if(i!=="all"){if(e==="single"){let M=i.values().next().value??null;u(M);}else u([...i]);a&&n.close(),g.commitValidation();}}}),d=r.selectionManager.firstSelectedKey,o=useMemo(()=>[...r.selectionManager.selectedKeys].map(i=>r.collection.getItem(i)).filter(i=>i!=null),[r.selectionManager.selectedKeys,r.collection]),g=d$3({...t,value:Array.isArray(l)&&l.length===0?null:l}),[b,C]=useState(false),[O]=useState(l);return {...g,...r,...n,value:l,defaultValue:c??O,setValue:u,selectedKey:d,setSelectedKey:u,selectedItem:o[0]??null,selectedItems:o,defaultSelectedKey:t.defaultSelectedKey??(t.selectionMode==="single"?O:null),focusStrategy:p,open(i=null){(r.collection.size!==0||t.allowsEmptyCollection)&&(S(i),n.open());},toggle(i=null){(r.collection.size!==0||t.allowsEmptyCollection)&&(S(i),n.toggle());},isFocused:b,setFocused:C}}function Bt(t){if(t!==void 0)return t===null?[]:Array.isArray(t)?t:[t]}var j=q.forwardRef(({variant:t,isOpen:e,validationState:a$9="valid",valueProps:n,className:p,style:S,value:c$2,"data-block-id":s,"data-block-class":y,fallbackValue:x,selectionMode:l="single",onRemove:u,maxCount:r=2,moreLabel:d$1,...o},g$1)=>{let{formatMessage:b$2}=b(),C=c$2?.[0]??null,O=C?.label??x,i$1=C?.icon??null,M=q.useRef(null),f=!!(l==="multiple"&&c$2&&c$2?.length>0),{buttonProps:B,isPressed:P}=a({...o,elementType:"div",isDisabled:o.isDisabled||o.isReadOnly},M),{hoverProps:h$1,isHovered:m}=a$1({isDisabled:o.isDisabled}),{focusProps:T,isFocused:N,isFocusVisible:A}=a$2(),F=a$3({isReadOnly:o.isReadOnly,validationState:a$9});o.isReadOnly&&(B.disabled=false);let V=a$4({"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly,"data-focused":N,"data-focus-visible":A,"data-hovered":m,"data-pressed":P,"data-open":e,"data-block-id":s,"data-block-class":y}),w=o["aria-labelledby"],ae=useCallback(()=>{a$5(Array.isArray(c$2),"value must be an array");let U=c$2.slice(0,r),H=c$2.slice(r),W=[...U,...H.length>0?[{label:(typeof d$1=="function"?d$1({count:H.length}):d$1)??b$2(It.more,{count:H.length}),id:"remaining-value"}]:[]];return jsx(a$6,{items:W,onRemove:o.isReadOnly?void 0:X=>{X.has("remaining-value")?u?.(new Set(H.map(E=>E.id))):u?.(X);},"aria-labelledby":w,className:k,isDisabled:o.isDisabled})},[c$2,r,b$2,d$1,w,o.isDisabled,u,o.isReadOnly]),z=l==="multiple";return jsxs("div",{...c$1(z?Object.fromEntries(Object.entries(B).filter(([U])=>U.startsWith("on"))):c$1(B,T),h$1,V),ref:z?g$1:b$1(g$1,M),className:a$8(i({isFocused:A,isDisabled:!!o.isDisabled,isOpen:e,isHovered:m,variant:t,isReadOnly:!!o.isReadOnly,areTagsVisible:f}),h({variant:t,isHovered:m,isFocused:A,validationState:a$9,isDisabled:!!o.isDisabled,isReadOnly:o.isReadOnly}),p,"BaselineUI-Select-Button"),"data-testid":"select-button",style:S,children:[jsxs(a$7,{display:"flex",flexDirection:"row",alignItems:"center",gap:"md",flex:1,paddingRight:"md",children:[l==="multiple"&&c$2&&c$2.length>0?ae():jsxs("span",{className:k,children:[i$1?jsx(i$1,{size:24}):null,jsx("span",{...n,children:O})]}),F?jsx("span",{"aria-hidden":true,className:a$8(d({validationState:a$9,isReadOnly:!!o.isReadOnly}),j$1),children:jsx(F,{size:16})}):null]}),jsx("div",{...z?{...c$1(B,T),ref:M}:{},className:g,children:jsx(CaretDownIcon,{size:8,className:c({isOpen:e})})})]})});j.displayName="SelectButton";var It=c$2({more:{id:"bui.select.more",defaultMessage:"+{count} more"}});var xt=q.createContext({state:null,popoverAnchorRef:null}),Se=q.forwardRef(({className:t,style:e$2,labelPosition:a="top",variant:n="primary","data-block-id":p$1,"data-block-class":S,onTriggerPress:c,placement:s="bottom start",triggerClassName:y,triggerStyle:x,state:l,optionStyle:u,optionClassName:r,showSectionHeader:d,hideSelectAll:o,hideClear:g,clearLabel:b$1,searchLabel:C,selectAllLabel:O,moreLabel:i,renderTrigger:M=({buttonProps:P,selectedValue:h,valueProps:m,isOpen:T,ref:N,selectionMode:A,onRemove:F,maxCount:V})=>jsx(j,{...P,className:y,style:x,isOpen:T,isReadOnly:f$2.isReadOnly,ref:N,variant:n,validationState:f$2.validationState,valueProps:m,value:h,fallbackValue:f$2.placeholder,selectionMode:A,onRemove:F,maxCount:V,moreLabel:i}),...f$2},B)=>{let{popoverAnchorRef:P}=useContext(xt),h=q.useRef(null),{formatMessage:m}=b(),T=C??m(ye.search),N=useContext(a$9),{isVirtualized:A}=useContext(p),F=a$a(f$2.portalContainer),{labelProps:V,triggerProps:w,valueProps:ae,menuProps:z,descriptionProps:U,errorMessageProps:H}=de({...a$b(f$2),validationState:f$2.validationState==="error"?"invalid":"valid"},l,h),W=c$3(),X=a$c(f$2)==="warningMessage",E=b$2({...f$2,descriptionProps:U,errorMessageProps:H,warningMessageProps:{id:W},labelPosition:a}),ht=l.selectedItems?.map(_=>_.value)??null;return jsxs(Fragment,{children:[jsxs("div",{style:e$2,className:a$8(g$1({labelPosition:a}),"BaselineUI-Select",t),"data-block-id":p$1,"data-block-class":S,ref:B,children:[f$2.label||E?jsxs("div",{className:f({labelPosition:a,hasMessage:!!E}),children:[f$2.label?jsx("div",{...V,className:a$8(e,"BaselineUI-Select-Label"),children:f$2.label}):null,a==="start"&&E]}):null,jsx(ue,{state:l,triggerRef:h,isDisabled:f$2.isDisabled,label:f$2.label,name:f$2.name}),M({buttonProps:c$1({onPressStart:c,"aria-labelledby":V.id},w,X?{"aria-describedby":[w["aria-describedby"],W].filter(Boolean).join(" ")}:null),selectedValue:ht,valueProps:ae,isOpen:l.isOpen,ref:h,selectionMode:f$2.selectionMode??"single",onRemove:_=>{l.selectionManager.setSelectedKeys(new Set([...l.selectionManager.selectedKeys].filter(ne=>!_.has(ne))));},maxCount:f$2.maxCount??2}),a==="top"&&E]}),l?jsx(b$3.Provider,{value:l,children:jsx(a$d,{placement:s,state:l,portalContainer:F,offset:2,triggerRef:P||h,style:e$2,className:"BaselineUI-Select-Popover",...f$2,children:jsxs(a$7,{display:"flex",flex:1,flexDirection:"column",className:f$1,children:[N?jsxs(Fragment,{children:[jsx(a$e,{size:"sm","aria-label":T,placeholder:T,className:a$8(h$1,"BaselineUI-Select-SearchInput"),autoFocus:true}),jsx(a$f,{})]}):null,jsx(a$g.Provider,{value:z,children:jsx(q$1,{label:f$2.label,escapeKeyBehavior:"none",className:e$1({isVirtualized:A}),optionStyle:u,optionClassName:r,showSectionHeader:d})}),l.selectionManager.selectionMode==="multiple"&&(!o||!g)&&jsxs(a$7,{display:"flex",flexDirection:"row",className:d$1,children:[!o&&jsx(b$4,{variant:"ghost",size:"md",label:O??m(ye.selectAll),"data-testid":"select-all-button",onPress:()=>{if(l.selectionManager.isSelectAll)return;let ne=[...l.collection.getKeys()].filter(ge=>!l.selectionManager.disabledKeys.has(ge)&&l.selectionManager.canSelectItem(ge));l.selectionManager.setSelectedKeys(new Set(ne));},className:b$5}),!o&&!g&&jsx(a$f,{orientation:"vertical"}),!g&&jsx(b$4,{variant:"ghost",label:b$1??m(ye.clear),size:"md","data-testid":"select-clear-button",onPress:()=>{l.selectionManager.isEmpty||l.selectionManager.clearSelection();},className:b$5})]})]})})}):null]})});Se.displayName="SelectCore";var Pt=q.forwardRef(({collection:t,...e},a)=>{let n=pe({...e,collection:t,validationState:e.validationState==="error"?"invalid":"valid",children:void 0});return jsx(Se,{...e,ref:a,state:n})});Pt.displayName="SelectStandalone";var le=q.forwardRef(({optionStyle:t,optionClassName:e,showSectionHeader:a,...n$1},p)=>{let{state:S}=useContext(xt);useEffect(()=>{a$5(S||n$1.items,"Select: A `state` that can be passed via context or `items` are required.");},[n$1.items,S]);let c=useMemo(()=>({renderOption:(s,y)=>jsx(n,{...y,item:s,selectionIcon:y.selectionMode==="multiple"?"checkbox":"checkmark"}),optionStyle:t,optionClassName:e,showSectionHeader:a}),[t,e,a]);return S?jsx(Se,{...n$1,optionStyle:t,optionClassName:e,showSectionHeader:a,ref:p,state:S}):jsx(a$h,{items:n$1.items,listBoxProps:c,children:s=>jsx(Pt,{collection:s,...n$1,ref:p})})});le.displayName="Select";var ye=c$2({selectAll:{id:"bui.select.selectAll",defaultMessage:"Select All"},clear:{id:"bui.select.clear",defaultMessage:"Clear"},search:{id:"bui.select.search",defaultMessage:"Search"}});var Ct=q.forwardRef(({className:t,style:e,variant:a,"data-block-id":n,icon:p,tooltip:S=true,iconTooltip:c=true,...s},y)=>{let x=q.useRef(null),{tooltipProps:l}=a$i({label:s["aria-label"],tooltip:S}),u=useCallback(({buttonProps:r,selectedValue:d,valueProps:o,isOpen:g,ref:b})=>jsx(a$j,{...l,children:jsx(j,{...r,isOpen:g,isReadOnly:s.isReadOnly,ref:b,variant:a,validationState:s.validationState,value:d,fallbackValue:s.placeholder,valueProps:o,moreLabel:s.moreLabel})}),[s,l,a]);return jsxs(a$7,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$8("BaselineUI-IconSelect",t),"data-block-id":n,style:e,ref:b$1(y,x),children:[p?jsx(a$k,{icon:p,label:s["aria-label"],tooltip:c,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(le,{...s,renderTrigger:u})]})});Ct.displayName="IconSelect";export{pe as a,xt as b,le as c,Ct as d};
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-4QEH5CGK.mjs';import y from'markdown-it';import c,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var o="_1t55bp71",r="_1yep5z6e3 _1yep5z6eu _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69i _1yep5z69j _1yep5z69k",i="_1t55bp70";var u=y(),p=c.forwardRef(({className:n,style:l,children:t,"data-block-id":d,"data-block-class":b,showCaret:s},g)=>{let m=useMemo(()=>{let a=t;return (!t||Array.isArray(t)&&t.length===0)&&(a=""),u.render(a)},[t]);return jsx("div",{className:a(r,i,{[o]:s},"BaselineUI-Markdown",n),"data-block-id":d,"data-block-class":b,style:l,ref:g,dangerouslySetInnerHTML:{__html:m}})});p.displayName="Markdown";export{p as a};
@@ -0,0 +1,10 @@
1
+ import {createContext,useMemo,useContext,useState,useRef,useEffect}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var h={badInput:false,customError:false,patternMismatch:false,rangeOverflow:false,rangeUnderflow:false,stepMismatch:false,tooLong:false,tooShort:false,typeMismatch:false,valueMissing:false,valid:true},L={...h,customError:true,valid:false},s={isInvalid:false,validationDetails:h,validationErrors:[]},Y=createContext({}),D="__reactAriaFormValidationState";function z(t){if(t[D]){let{realtimeValidation:a,displayValidation:e,updateValidation:r,resetValidation:o,commitValidation:l}=t[D];return {realtimeValidation:a,displayValidation:e,updateValidation:r,resetValidation:o,commitValidation:l}}return b(t)}function b(t){let{isInvalid:a,validationState:e,name:r,value:o,builtinValidation:l,validate:f,validationBehavior:d="aria"}=t;e&&(a||=e==="invalid");let v=a!==void 0?{isInvalid:a,validationErrors:[],validationDetails:L}:null,m=useMemo(()=>{if(!f||o==null)return null;let i=j(f,o);return C(i)},[f,o]);l?.validationDetails.valid&&(l=void 0);let n=useContext(Y),I=useMemo(()=>r?Array.isArray(r)?r.flatMap(i=>g(n[i])):g(n[r]):[],[n,r]),[M,_]=useState(n),[x,c]=useState(false);n!==M&&(_(n),c(false));let E=useMemo(()=>C(x?[]:I),[x,I]),A=useRef(s),[p,T]=useState(s),u=useRef(s),O=()=>{if(!P)return;S(false);let i=m||l||A.current;R(i,u.current)||(u.current=i,T(i));},[P,S]=useState(false);return useEffect(O),{realtimeValidation:v||E||m||l||s,displayValidation:d==="native"?v||E||p:v||E||m||l||p,updateValidation(i){d==="aria"&&!R(p,i)?T(i):A.current=i;},resetValidation(){let i=s;R(i,u.current)||(u.current=i,T(i)),d==="native"&&S(false),c(true);},commitValidation(){d==="native"&&S(true),c(true);}}}function g(t){return t?Array.isArray(t)?t:[t]:[]}function j(t,a){if(typeof t=="function"){let e=t(a);if(e&&typeof e!="boolean")return g(e)}return []}function C(t){return t.length?{isInvalid:true,validationErrors:t,validationDetails:L}:null}function R(t,a){return t===a?true:!!t&&!!a&&t.isInvalid===a.isInvalid&&t.validationErrors.length===a.validationErrors.length&&t.validationErrors.every((e,r)=>e===a.validationErrors[r])&&Object.entries(t.validationDetails).every(([e,r])=>a.validationDetails[e]===r)}export{s as a,Y as b,D as c,z as d};
File without changes
@@ -0,0 +1,10 @@
1
+ import {c as c$1,a}from'./chunk-JDLUGVXG.mjs';import {useState,useRef,useCallback}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function c(o=true){let[a$1,e]=useState(o),t=useRef(false),n=useCallback(f=>{t.current=true,e(!!f);},[]);return a(()=>{t.current||e(false);},[]),[n,a$1]}function p(o=true){let a=c$1(),[e,t]=c(o);return {id:t?a:void 0,ref:e}}export{p as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$7}from'./chunk-NV7KQVPE.mjs';import {a as a$c}from'./chunk-YCI6BEXQ.mjs';import {a as a$4}from'./chunk-TKQOQVZD.mjs';import {a as a$3}from'./chunk-TAYP2OGC.mjs';import {c as c$2}from'./chunk-ELXWR5TS.mjs';import {b as b$1,c as c$1,a as a$d}from'./chunk-ROHLZINC.mjs';import {B}from'./chunk-OMT6ZWSV.mjs';import {a as a$2}from'./chunk-SAZLJ66W.mjs';import {b,c as c$3}from'./chunk-GX2IOGYR.mjs';import {a as a$9,b as b$3}from'./chunk-J3MJZQUJ.mjs';import {a as a$b}from'./chunk-O7XK2WIX.mjs';import {b as b$2}from'./chunk-4ZJMZB5B.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-X3AXUU3H.mjs';import {a as a$a}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-K6X2BHPP.mjs';import {a as a$6}from'./chunk-3FYY26ED.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import Z,{useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var K=Z.forwardRef(({className:s,style:p,isInline:a$e=true,accept:l="image/*",defaultImageSrc:g,imageSrc:r,imageAlt:Q,pickerButtonLabel:X,isDisabled:o,onDrop:Y,onPaste:$,includeCheckeredBackground:ee=true,"data-block-id":te,"data-block-class":oe,pickerButtonStyle:re,pickerButtonClassName:se,footerClassName:ne,footerStyle:ie,clearLabel:y,placeholder:P,labelStyle:ae,labelClassName:le,maxFileSize:w,onFileSizeError:me,onFileTypeError:ue,...m},pe)=>{let f=Z.useRef(null),h=Z.useRef(null),{formatMessage:fe}=b(),ce=e=>!w||e.size<=w?true:(me?.(e),false),de=e=>Te(e,l)?true:(ue?.(e),false),F=e=>de(e)&&ce(e),[B$1,c$3]=a(r,g||null,e=>{a$1(typeof e!="string"),m.onValueChange?.(e?[e]:[]);}),i=useMemo(()=>Ne(B$1||void 0),[B$1]),{fieldProps:ge,labelProps:ye}=a$2({...m,ref:f}),{dropProps:Pe,isDropTarget:I}=B({ref:f,onDrop:async e=>{if(o)return;let t=await a$3({items:e.items});t.length&&F(t[0])&&c$3(t[0]),Y?.(e);},...m}),{clipboardProps:he}=a$4({onPaste:async e=>{if(o)return;let t=await a$3({items:e});t.length&&F(t[0])&&c$3(t[0]),$?.(e);},...m}),Fe=()=>{c$3(null),h.current&&(h.current.value="");},Ie={type:"file",onChange:e=>{let t=[...e.target.files];t.length&&F(t[0])?c$3(t[0]):t.length&&(e.target.value=""),m.onChange?.(e);},accept:l,disabled:o},{focusProps:Ce,isFocused:ve,isFocusVisible:C}=a$5({within:true}),{hoverProps:be,isHovered:N}=a$6({isDisabled:o}),{imgProps:Le,isLoading:Re,isLoaded:v}=a$7({src:i,alt:Q||""}),Ze={label:X||fe(xe.selectImage),onPress:()=>f.current?.click(),variant:"secondary",isDisabled:o,excludeFromTabOrder:true,className:a$8(a$9({isFocusVisible:C}),{[b$1]:I&&!o},se),style:re},we=a$a({"data-loaded":v,"data-block-id":te,"data-block-class":oe,"data-hovered":N,"data-focused":ve,"data-drop-target":I,"data-disabled":o,"data-focus-visible":C});return jsxs(a$b,{...we,className:a$8("BaselineUI-ImageDropZone",s),display:"flex",flexDirection:"column",alignItems:"center",style:p,ref:pe,children:[jsxs("label",{...c(Pe,be,Ce,ye),className:a$8(a$d({isInline:a$e,isHovered:N,isDisabled:o,hasLoadedImage:!!i&&v,showFocusRing:I||!!i&&C}),le),style:ae,ref:f,children:[jsx(b$2,{children:jsx("input",{...c(ge,he,Ie),ref:h})}),!i&&jsx(b$3,{...Ze}),!!i&&(Re?jsx(a$c,{}):jsx("img",{className:c$1({isInline:a$e,isDisabled:o,hasLoadedImage:!!i&&v&&ee}),...Le}))]}),P||y?jsx("div",{style:ie,className:a$8(c$2({isInline:a$e,isDisabled:o}),ne),children:(i||!P)&&y?jsx(b$3,{size:"sm",variant:"ghost",label:y,isDisabled:o,onPress:Fe}):jsx(b$3,{size:"sm",variant:"ghost",label:P,isDisabled:true})}):null]})});K.displayName="ImageDropZone";function Ne(s){return !s||typeof s=="string"?s:URL.createObjectURL(s)}function Te(s,p){if(!p)return true;let a=p.split(",").map(r=>r.trim().toLowerCase()).filter(Boolean);if(a.length===0)return true;let l=s.type.toLowerCase(),g=s.name.toLowerCase();return a.some(r=>r==="*/*"?true:r.startsWith(".")?g.endsWith(r):l?r.endsWith("/*")?l.startsWith(r.slice(0,-1)):l===r:true)}var xe=c$3({selectImage:{defaultMessage:"Select Image",id:"bui.imageDropZone.selectImage"}});export{K as a};
@@ -0,0 +1,10 @@
1
+ import {a,b as b$1}from'./chunk-2RCST7ET.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {useMemo}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var c=new WeakMap;function d(i){let t=c.get(i);return t||(t=new a(i),c.set(i,t)),t}function l(i,t){return t&&a.getGlobalDictionaryForPackage(t)||d(i)}function m(i,t){let{locale:r}=b(),n=l(i,t);return useMemo(()=>new b$1(r,n),[r,n])}export{l as a,m as b};
@@ -0,0 +1,10 @@
1
+ import {a as a$2}from'./chunk-GEZGEZAP.mjs';import {a as a$4}from'./chunk-FJ2JRD3H.mjs';import {g,e,h,a as a$1,i,c}from'./chunk-YVYMYKYN.mjs';import {b as b$1}from'./chunk-246VHB32.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {useGranularEffect}from'granular-hooks';import P,{useCallback,useImperativeHandle}from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function F(t,o,r){let{direction:i$1}=b(),n=g({...t,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!t.enableReorder,getItems:t.getItems||(p=>[...p].map(l=>{let c=o.collection.getItem(l);return a(c,"Expected item to be defined."),{"text/plain":c.textValue}}))});e(t,n,r);let a$2=h({...t,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:e$1}=a$1({...t,keyboardDelegate:new b$1({collection:o.collection,disabledKeys:o.disabledKeys,ref:r,orientation:t.orientation,layout:t.layout,direction:i$1}),dropTargetDelegate:new i(o.collection,r)},a$2,r);return {collectionProps:e$1,dragState:n,dropState:a$2}}function G({type:t="listbox",handle:o},r,i){let n=useCallback(e=>t==="listbox"?i.current?.querySelector(`[data-key="${e}"][role="option"]`):i.current?.querySelector(`[data-key="${e}"][role="row"]`),[t,i]),a=useCallback((e,p)=>{let l=n(e);l&&l?.scrollIntoView({block:"nearest",inline:"nearest",...p});},[n]);useImperativeHandle(o,()=>({scrollIntoView:a,setFocusedKey:e=>{r.selectionManager.setFocused(true),r.selectionManager.setFocusedKey(e),a(e),n(e)?.focus();}}),[a,r.selectionManager,n]),useGranularEffect(()=>{let e=r.selectionManager.focusedKey;a$2(i.current)&&e&&a(e);},[r.selectionManager.focusedKey],[a,i]);}var Q=({dropState:t,orientation:o="vertical",dropIndicatorStyle:r,dropIndicatorClassName:i,renderDropIndicator:n=({isDropTarget:e,isHidden:p,dropIndicatorProps:l,orientation:c},R)=>p?null:jsx("li",{...l,ref:R,"data-drop-target":e,className:a$3(a$4({isDropTarget:e,orientation:c}),"BaselineUI-DropIndicator",i),style:r}),...a})=>{let e=P.useRef(null),{dropIndicatorProps:p,isHidden:l,isDropTarget:c$1}=c(a,t,e);return n({dropIndicatorProps:{...p,role:"option"},isHidden:l,isDropTarget:c$1,orientation:o},e)};export{F as a,G as b,Q as c};
@@ -0,0 +1,10 @@
1
+ import {b}from'./chunk-5ODZPQL2.mjs';import {a as a$1}from'./chunk-NSC53QWT.mjs';import {a as a$8}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-RXSYDMT6.mjs';import {a as a$9}from'./chunk-X3AXUU3H.mjs';import {a as a$6}from'./chunk-YS3Y5KGV.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {c as c$1,a as a$b}from'./chunk-JDLUGVXG.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {CaretUpIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon,CircleFilledIcon,ErrorCircleIcon,WarningIcon}from'@baseline-ui/icons/16';import W,{useRef,useCallback,useEffect}from'react';import {flushSync}from'react-dom';import {jsxs,jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function _(n,r,t){let{isDisabled:s}=n,a=c$1(),o=c$1(),p=b$1(),i=useRef(null),f=useCallback(()=>{i.current=requestAnimationFrame(()=>{t.current&&t.current.setAttribute("hidden","until-found");}),flushSync(()=>{r.toggle();});},[t,r]);a$a(t,"beforematch",f);let l=useRef(null);return a$b(()=>{if(i.current&&cancelAnimationFrame(i.current),t.current&&!p){let e=t.current;l.current==null||typeof e.getAnimations!="function"?r.isExpanded?(e.removeAttribute("hidden"),e.style.setProperty("--disclosure-panel-width","auto"),e.style.setProperty("--disclosure-panel-height","auto")):(e.setAttribute("hidden","until-found"),e.style.setProperty("--disclosure-panel-width","0px"),e.style.setProperty("--disclosure-panel-height","0px")):r.isExpanded!==l.current&&(r.isExpanded?(e.removeAttribute("hidden"),e.style.setProperty("--disclosure-panel-width",e.scrollWidth+"px"),e.style.setProperty("--disclosure-panel-height",e.scrollHeight+"px"),Promise.all(e.getAnimations().map(d=>d.finished)).then(()=>{e.style.setProperty("--disclosure-panel-width","auto"),e.style.setProperty("--disclosure-panel-height","auto");}).catch(()=>{})):(e.style.setProperty("--disclosure-panel-width",e.scrollWidth+"px"),e.style.setProperty("--disclosure-panel-height",e.scrollHeight+"px"),window.getComputedStyle(e).height,e.style.setProperty("--disclosure-panel-width","0px"),e.style.setProperty("--disclosure-panel-height","0px"),Promise.all(e.getAnimations().map(d=>d.finished)).then(()=>e.setAttribute("hidden","until-found")).catch(()=>{}))),l.current=r.isExpanded;}},[s,t,r.isExpanded,p]),useEffect(()=>()=>{i.current&&cancelAnimationFrame(i.current);},[]),{buttonProps:{id:a,"aria-expanded":r.isExpanded,"aria-controls":o,onPress:e=>{!s&&e.pointerType!=="keyboard"&&r.toggle();},isDisabled:s,onPressStart(e){e.pointerType==="keyboard"&&!s&&r.toggle();}},panelProps:{id:o,role:"group","aria-labelledby":a,"aria-hidden":!r.isExpanded,hidden:p?!r.isExpanded:void 0}}}function g(n){let[r,t]=a$9(n.isExpanded,n.defaultExpanded||false,n.onExpandedChange),s=useCallback(()=>{t(true);},[t]),a=useCallback(()=>{t(false);},[t]),o=useCallback(()=>{t(!r);},[t,r]);return {isExpanded:r,setExpanded:t,expand:s,collapse:a,toggle:o}}var q=a({defaultClassName:"wf9zfn0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6m1 _1yep5z6lz",variantClassNames:{variant:{active:"_1yep5z6136 _1yep5z6124",warning:"_1yep5z6136 _1yep5z6124",error:"_1yep5z6136 _1yep5z6124",success:"_1yep5z6136 _1yep5z6124",denied:"_1yep5z6136 _1yep5z6124","warning-tinted":"_1yep5z612x _1yep5z611u","error-tinted":"_1yep5z612p _1yep5z611m","active-tinted":"_1yep5z6131 _1yep5z611y","success-tinted":"_1yep5z612t _1yep5z611q","denied-tinted":"_1yep5z6137 _1yep5z6127"}},defaultVariants:{},compoundVariants:[]}),M=a({defaultClassName:"wf9zfnb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ly _1yep5z6ln _1yep5z6la _1yep5z6lr _1yep5z6ls _1yep5z6lp",variantClassNames:{isFocusVisible:{true:"_1yep5z617w _1yep5z6140 _1yep5z617y"},isHovered:{true:"wf9zfnd"},variant:{active:"wf9zfne",warning:"wf9zfnf",error:"wf9zfng",success:"wf9zfnh",denied:"wf9zfni","warning-tinted":"wf9zfnj","error-tinted":"wf9zfnk","active-tinted":"wf9zfnl","success-tinted":"wf9zfnm","denied-tinted":"wf9zfnn"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocusVisible:false},"_1yep5z61ty _1yep5z61tx"],[{variant:"active",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"warning",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"error",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"success",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"denied",isHovered:true,isFocusVisible:false},"_1yep5z61q6"],[{variant:"active-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61q1"],[{variant:"warning-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61px"],[{variant:"error-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61pp"],[{variant:"success-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61pt"],[{variant:"denied-tinted",isHovered:true,isFocusVisible:false},"_1yep5z61q6"]]}),k="wf9zfno",L={active:"wf9zfnp",warning:"wf9zfnq",error:"wf9zfnr",success:"wf9zfns",denied:"wf9zfnt","active-tinted":"wf9zfnu","warning-tinted":"wf9zfnv","error-tinted":"wf9zfnw","success-tinted":"wf9zfnx","denied-tinted":"wf9zfny"},O=a({defaultClassName:"wf9zfnz _1yep5z6f5",variantClassNames:{isPopupOpen:{true:"wf9zfn10",false:"wf9zfn11"}},defaultVariants:{},compoundVariants:[]});var se={warning:WarningIcon,error:ErrorCircleIcon,info:CircleFilledIcon,success:CheckmarkIcon},G=W.forwardRef(({className:n,style:r,children:t,title:s,description:a,variant:o="active",icon:p=se[o],headerClassName:i,headerStyle:f,panelClassName:l,panelStyle:e,shouldTruncateTitle:d,...y},m)=>{let u=g(y),v=useRef(null),z=useRef(null),{buttonProps:K,panelProps:Q}=_(y,u,z);return jsxs("div",{className:a$2(q({variant:o}),"BaselineUI-Disclosure",n),style:r,ref:m,"data-expanded":u.isExpanded,children:[jsx(J,{ref:v,...K,variant:o,title:s,description:a,icon:p,className:i,style:f,isExpanded:u.isExpanded,shouldTruncateTitle:d}),jsxs("div",{ref:z,...Q,className:a$2(k,"BaselineUI-Disclosure-Panel",l),style:e,"data-expanded":u.isExpanded,children:[jsx(a$1,{className:L[o]}),t]})]})});G.displayName="Disclosure";var J=W.forwardRef(({className:n,style:r,variant:t="active",icon:s,title:a,description:o,shouldTruncateTitle:p,...i},f)=>{let{isFocusVisible:l,focusProps:e}=a$3(),{hoverProps:d,isHovered:y}=a$4({}),m=a$5(f),{buttonProps:u,isPressed:v}=a$6(i,m),z=a$7({"data-focus-visible":l,"data-hovered":y,"data-pressed":v});return jsx("button",{...c(u,e,d),ref:m,className:a$2(M({isFocusVisible:l,isHovered:y,variant:t}),"BaselineUI-Disclosure-Header",n),style:r,...z,children:jsx(b,{title:a,description:o,variant:t,icon:s,shouldTruncateTitle:p,renderTrailingElement:()=>jsx(a$8,{padding:"sm",display:"inline-flex",children:jsx(CaretUpIcon,{size:12,className:O({isPopupOpen:i.isExpanded})})}),style:{border:"none"}})})});J.displayName="DisclosureHeader";export{G as a};
File without changes
@@ -0,0 +1,10 @@
1
+ import {d as d$1}from'./chunk-BGMVPFYK.mjs';import {d,c as c$1}from'./chunk-AQYBKDT2.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {b as b$1,u}from'./chunk-MRJFGHFW.mjs';import {b as b$2,c}from'./chunk-TZ4MVY4E.mjs';import {b}from'./chunk-AUOQSTS5.mjs';import p,{useEffect,useRef,useContext,useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var E=p.forwardRef(({children:a$1,...t},o)=>{o=a(o);let{pressProps:l}=d({...t,ref:o}),{focusableProps:n}=d$1(t,o),s=p.Children.only(a$1);useEffect(()=>{if(process.env.NODE_ENV==="production")return;let r=o.current;if(!r||!(r instanceof b(r).Element)){console.error("<Pressable> child must forward its ref to a DOM element.");return}if(!t.isDisabled&&!b$1(r)){console.warn("<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(r.localName!=="button"&&r.localName!=="input"&&r.localName!=="select"&&r.localName!=="textarea"&&r.localName!=="a"&&r.localName!=="area"&&r.localName!=="summary"){let e=r.getAttribute("role");e?e!=="application"&&e!=="button"&&e!=="checkbox"&&e!=="combobox"&&e!=="gridcell"&&e!=="link"&&e!=="menuitem"&&e!=="menuitemcheckbox"&&e!=="menuitemradio"&&e!=="option"&&e!=="radio"&&e!=="searchbox"&&e!=="separator"&&e!=="slider"&&e!=="spinbutton"&&e!=="switch"&&e!=="tab"&&e!=="textbox"&&e!=="treeitem"&&console.warn(`<Pressable> child must have an interactive ARIA role. Got "${e}".`):console.warn("<Pressable> child must have an interactive ARIA role.");}},[o,t.isDisabled]);let x=parseInt(p.version,10)<19?s.ref:s.props.ref;return p.cloneElement(s,{...c(l,n,s.props),ref:b$2(x,o)})});var C=p.forwardRef(({children:a$1,...t},o)=>{let l=useRef(false),n=useContext(c$1),s=c(n||{},{...t,register(){l.current=true,n&&n.register();}});return s.ref=a(o||n?.ref),u(n,s.ref),useEffect(()=>{l.current||(process.env.NODE_ENV!=="production"&&console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),l.current=true);},[]),jsx(c$1.Provider,{value:s,children:a$1})});function O({children:a}){let t=useMemo(()=>({register:()=>{}}),[]);return jsx(c$1.Provider,{value:t,children:a})}export{E as a,C as b,O as c};
@@ -0,0 +1,10 @@
1
+ import c,{useState,useRef,useEffect,useReducer,useCallback}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var g=typeof document<"u"?c.useInsertionEffect??c.useLayoutEffect:()=>{};function A(n,i,l){let[a,s]=useState(n||i),o=useRef(a),d=useRef(n!==void 0),t=n!==void 0;useEffect(()=>{let e=d.current;e!==t&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${e?"controlled":"uncontrolled"} to ${t?"controlled":"uncontrolled"}.`),d.current=t;},[t]);let r=t?n:a;g(()=>{o.current=r;});let[,T]=useReducer(()=>({}),{}),S=useCallback((e,...C)=>{let u=typeof e=="function"?e(o.current):e;Object.is(o.current,u)||(o.current=u,s(u),T(),l?.(u,...C));},[l]);return [r,S]}export{A as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import C from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var h=a({defaultClassName:"bpklwa7 z9nup88",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"bpklwac"]]}),v=a({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),g="bpklwad",y=a({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),x="bpklwa6",S=a({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var R=C.forwardRef(({className:V,label:r,labelPosition:d="top",statusLabel:l,style:D,"data-block-id":P,"data-block-class":O,...a},L)=>{let c$1=C.useRef(null),t=a$1(a),{inputProps:H,isPressed:I,labelProps:B}=a$2({...a,children:r},t,c$1),{isFocusVisible:s,focusProps:F}=a$3(),{hoverProps:T,isHovered:U}=a$4({isDisabled:a.isDisabled}),K=a$5({"data-block-id":P,"data-block-class":O,"data-focused":s,"data-disabled":a.isDisabled,"data-focus-visible":s,"data-selected":t.isSelected,"data-readonly":a.isReadOnly,"data-hovered":U,"data-pressed":I}),p=jsx("div",{className:a$6(h({isSelected:t.isSelected,isDisabled:!!a.isDisabled,isFocused:s,isReadOnly:!!a.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:a$6(v({isSelected:t.isSelected,isDisabled:a.isDisabled,isReadOnly:a.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...c(K,B,T),className:a$6(y({labelPosition:d}),"BaselineUI-Switch",V),style:D,ref:L,children:[r?jsx("span",{className:a$6(g,"BaselineUI-Switch-Label"),children:r}):null,jsx(b,{children:jsx("input",{...c(H,F),ref:c$1})}),l?jsxs("div",{className:S({labelPosition:d}),children:[jsx("span",{className:a$6("BaselineUI-Switch-Status-Label",x),children:t.isSelected?l.on:l.off}),p]}):p]})});R.displayName="Switch";export{R as a};
File without changes
@@ -0,0 +1,10 @@
1
+ import {a as a$b}from'./chunk-WAOWR7MR.mjs';import {c as c$3,a as a$c,b as b$5}from'./chunk-BKDQLDOK.mjs';import {b}from'./chunk-J7EAQSKX.mjs';import {e,f,g}from'./chunk-IW4GXU75.mjs';import {a as a$5}from'./chunk-SAZLJ66W.mjs';import {a as a$a}from'./chunk-M5M3EPG5.mjs';import {d}from'./chunk-W6QO7FPZ.mjs';import {c}from'./chunk-JJPCZOOI.mjs';import {d as d$1}from'./chunk-KUEDQO7P.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-4ZJMZB5B.mjs';import {a as a$4}from'./chunk-X3AXUU3H.mjs';import {a as a$9}from'./chunk-545KDVGI.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$7}from'./chunk-K6X2BHPP.mjs';import {d as d$3}from'./chunk-BGMVPFYK.mjs';import {b as b$2}from'./chunk-YB3KW7JC.mjs';import {a as a$8}from'./chunk-3FYY26ED.mjs';import {d as d$2}from'./chunk-AQYBKDT2.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$6}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.mjs';import {b as b$4,g as g$1}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import Oe,{useMemo,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var C=new WeakMap;function F(e,a,o){let{value:i,children:d,"aria-label":s,"aria-labelledby":p,onPressStart:t,onPressEnd:l,onPressChange:u,onPress:b,onPressUp:v,onClick:R}=e,r=e.isDisabled||a.isDisabled,D=d!=null,P=s!=null||p!=null;!D&&!P&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let y=a.selectedValue===i,g=z=>{z.stopPropagation(),a.setSelectedValue(i);},{pressProps:V,isPressed:_}=d$2({onPressStart:t,onPressEnd:l,onPressChange:u,onPress:b,onPressUp:v,onClick:R,isDisabled:r}),{pressProps:h,isPressed:G}=d$2({onPressStart:t,onPressEnd:l,onPressChange:u,onPressUp:v,onClick:R,isDisabled:r,onPress(z){b?.(z),a.setSelectedValue(i),o.current?.focus();}}),{focusableProps:c}=d$3(c$1(e,{onFocus:()=>a.setLastFocusedValue(i)}),o),m=c$1(V,c),x=a$6(e,{labelable:true}),n=-1;a.selectedValue!=null?a.selectedValue===i&&(n=0):(a.lastFocusedValue===i||a.lastFocusedValue==null)&&(n=0),r&&(n=void 0);let{name:O,form:xe,descriptionId:De,errorMessageId:_e,validationBehavior:E}=C.get(a);a$9(o,a.defaultSelectedValue,a.setSelectedValue),a$a({validationBehavior:E},a,o);let H=a$b();return {labelProps:c$1(h,useMemo(()=>({onClick:z=>z.preventDefault(),onMouseDown:z=>z.preventDefault()}),[])),inputProps:c$1(x,{...m,type:"radio",name:O,form:xe,tabIndex:n,disabled:r,required:a.isRequired&&E==="native",checked:y,value:i,onChange:g,"aria-describedby":[e["aria-describedby"],H.id,a.isInvalid?_e:null,De].filter(Boolean).join(" ")||void 0}),descriptionProps:H,isDisabled:r,isSelected:y,isPressed:_||G}}function N(e,a,o){let{name:i,form:d,isReadOnly:s,isRequired:p,isDisabled:t,orientation:l="vertical",validationBehavior:u="aria"}=e,{direction:b}=b$1(),{isInvalid:v,validationErrors:R,validationDetails:r}=a.displayValidation,{labelProps:D,fieldProps:P,descriptionProps:y,errorMessageProps:g}=a$5({...e,labelElementType:"span",isInvalid:a.isInvalid,errorMessage:e.errorMessage||R,ref:o}),V=a$6(e,{labelable:true}),{focusWithinProps:_}=b$2({onBlurWithin(c){e.onBlur?.(c),a.selectedValue||a.setLastFocusedValue(null);},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),h=c=>{let m;switch(c.key){case "ArrowRight":b==="rtl"&&l!=="vertical"?m="prev":m="next";break;case "ArrowLeft":b==="rtl"&&l!=="vertical"?m="next":m="prev";break;case "ArrowDown":m="next";break;case "ArrowUp":m="prev";break;default:return}c.preventDefault();let x=d$1(c.currentTarget,{from:g$1(c),accept:O=>O instanceof b$4(O).HTMLInputElement&&O.type==="radio"}),n;m==="next"?(n=x.nextNode(),n||(x.currentNode=c.currentTarget,n=x.firstChild())):(n=x.previousNode(),n||(x.currentNode=c.currentTarget,n=x.lastChild())),n&&(n.focus(),a.setSelectedValue(n.value));},G=c$2(i);return C.set(a,{name:G,form:d,descriptionId:y.id,errorMessageId:g.id,validationBehavior:u}),{radioGroupProps:c$1(V,{role:"radiogroup",onKeyDown:h,"aria-invalid":a.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":s||void 0,"aria-required":p||void 0,"aria-disabled":t||void 0,"aria-orientation":l,...P,..._}),labelProps:D,descriptionProps:y,errorMessageProps:g,isInvalid:v,validationErrors:R,validationDetails:r}}var Ie=Math.round(Math.random()*1e10),he=0;function w(e){let a=useMemo(()=>e.name||`radio-group-${Ie}-${++he}`,[e.name]),[o,i]=a$4(e.value,e.defaultValue??null,e.onChange),[d$1]=useState(o),[s,p]=useState(null),t=d({...e,value:o}),l=b=>{!e.isReadOnly&&!e.isDisabled&&(i(b),t.commitValidation());},u=t.displayValidation.isInvalid;return {...t,name:a,selectedValue:o,defaultSelectedValue:e.value!==void 0?d$1:e.defaultValue??null,setSelectedValue:l,lastFocusedValue:s,setLastFocusedValue:p,isDisabled:e.isDisabled||false,isReadOnly:e.isReadOnly||false,isRequired:e.isRequired||false,validationState:e.validationState||(u?"invalid":null),isInvalid:u}}var be="_1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69c _1yep5z69d _1yep5z69e",ye=a({defaultClassName:"cw3m0n5 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Re="cw3m0n4",Pe="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6lk",ve=a({defaultClassName:"cw3m0n0 _1yep5z61j6 _1yep5z61j7 _1yep5z61j8 _1yep5z61ju _1yep5z61jv _1yep5z61jw _1yep5z61ki _1yep5z61kj _1yep5z61kk _1yep5z61l6 _1yep5z61l7 _1yep5z61l8 _1yep5z61nb _1yep5z61tg",variantClassNames:{isHovered:{true:"cw3m0n1"},isReadOnly:{true:"cw3m0n2"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isReadOnly:false},"cw3m0n3"]]});var Le=({label:e,description:a},{isSelected:o,isFocusVisible:i,isDisabled:d,optionLabelPosition:s,isHovered:p,isReadOnly:t})=>jsxs("div",{className:b$5({labelPosition:s}),children:[jsx("div",{className:a$3(c$3({isSelected:o,isFocusVisible:i,isDisabled:d,isReadOnly:t,isHovered:p}),ve({isHovered:p})),children:o?jsx("div",{className:Re}):null}),e?jsxs("div",{className:be,children:[jsx("span",{className:a$c({isDisabled:d}),children:e}),a?jsx("span",{className:ye({isDisabled:d}),children:a}):null]}):null]}),ge=({state:e,renderOption:a=Le,item:o,optionLabelPosition:i="end",optionStyle:d,optionClassName:s,isReadOnly:p,...t})=>{let l=!!t.isDisabled||!!t.disabledValues?.includes(o.id),u=Oe.useRef(null),{inputProps:b,isPressed:v,isSelected:R,labelProps:r}=F({...t,isDisabled:l,children:o.label,value:o.id},e,u),{focusProps:D,isFocusVisible:P,isFocused:y}=a$7(),{hoverProps:g,isHovered:V}=a$8({isDisabled:l},u),_=a$2({"data-selected":R,"data-focused":y,"data-focus-visible":P,"data-hovered":V,"data-disabled":l,"data-pressed":v,"data-read-only":p});return jsxs("label",{...c$1(r,g,_),style:d,className:a$3("BaselineUI-Radio-Item",s),children:[jsx(b$3,{children:jsx("input",{...c$1(b,D),ref:u})}),a(o,{isFocusVisible:P,isSelected:R,isFocused:y,isHovered:V,isDisabled:l,optionLabelPosition:i,isReadOnly:p})]})};var Ge=Oe.forwardRef(({className:e$1,style:a,optionsContainerClassName:o,optionsContainerStyle:i,items:d,labelPosition:s="top",renderOption:p,"aria-label":t,"aria-labelledby":l,"aria-describedby":u,"aria-details":b$1,"data-block-id":v,"data-block-class":R,...r},D)=>{let P=a$1(D),y=w(r),{radioGroupProps:g$1,labelProps:V,descriptionProps:_,errorMessageProps:h}=N({...r,"aria-label":t,"aria-labelledby":l,"aria-describedby":u,"aria-details":b$1},y,P),G=b({...r,descriptionProps:_,errorMessageProps:h,labelPosition:s}),c$2=a$2({"data-orientation":r.orientation,"data-block-id":v,"data-block-class":R,"data-disabled":r.isDisabled,"data-readonly":r.isReadOnly});return jsxs("div",{...c$1(g$1,c$2),className:a$3(g({labelPosition:s}),"BaselineUI-RadioGroup",e$1),style:a,ref:P,children:[r.label||G?jsxs("div",{className:f({labelPosition:s,hasMessage:!!G}),children:[jsx("span",{...V,className:a$3(e,"BaselineUI-RadioGroup-Label"),children:r.label}),s==="start"&&G]}):null,jsx("div",{className:a$3(Pe,{[c]:r.isDisabled},o),style:i,children:d.map(m=>jsx(ge,{state:y,renderOption:p,item:m,...r,value:m.id},m.id))}),s==="top"&&G]})});Ge.displayName="RadioGroup";export{Ge as a};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var d=Object.defineProperty;var e=(c,a)=>{for(var b in a)d(c,b,{get:a[b],enumerable:true});};export{e as a};
@@ -0,0 +1,10 @@
1
+ import {d as d$1,e}from'./chunk-AUOQSTS5.mjs';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var d=class{filter;root;whatToShow;_doc;_walkerStack=[];_currentNode;_currentSetFor=new Set;constructor(t,e,r,o){this._doc=t,this.root=e,this.filter=o??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=e,this._walkerStack.unshift(t.createTreeWalker(e,r,this._acceptNode));let i=e.shadowRoot;if(i){let n=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(n);}}_acceptNode=t=>{if(t.nodeType===Node.ELEMENT_NODE){let e=t.shadowRoot;if(e){let r=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(r),NodeFilter.FILTER_ACCEPT}else {if(typeof this.filter=="function")return this.filter(t);if(this.filter?.acceptNode)return this.filter.acceptNode(t);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP};get currentNode(){return this._currentNode}set currentNode(t){if(!e(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");let e$1=[],r=t,o=t;for(this._currentNode=t;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let n=r,s=this._doc.createTreeWalker(n,this.whatToShow,{acceptNode:this._acceptNode});e$1.push(s),s.currentNode=o,this._currentSetFor.add(s),r=o=n.host;}else r=r.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});e$1.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=e$1;}get doc(){return this._doc}firstChild(){let t=this.currentNode,e$1=this.nextNode();return e(t,e$1)?(e$1&&(this.currentNode=e$1),e$1):(this.currentNode=t,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){let r;if(typeof this.filter=="function"?r=this.filter(t):this.filter?.acceptNode&&(r=this.filter.acceptNode(t)),r===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let o=this.nextNode();return o&&(this.currentNode=o),o}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}else return null}previousNode(){let t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let r=this.previousNode();return r&&(this.currentNode=r),r}else return null;return null}let e=t.previousNode();if(e){if(e.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(e):this.filter?.acceptNode&&(o=this.filter.acceptNode(e)),o===NodeFilter.FILTER_ACCEPT)return e&&(this.currentNode=e),e;let i=this.lastChild();return i&&(this.currentNode=i),i}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.previousNode();return r&&(this.currentNode=r),r}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}};function N(l,t,e,r){return d$1()?new d(l,t,e,r):l.createTreeWalker(t,e,r)}export{N as a};
@@ -0,0 +1,10 @@
1
+ import {c}from'./chunk-ZNN43VZV.mjs';import {b,c as c$1,a as a$1}from'./chunk-BKDQLDOK.mjs';import {a}from'./chunk-4QEH5CGK.mjs';import {CheckmarkIcon,MinusIcon}from'@baseline-ui/icons/12';import P from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var y=({label:r,...c})=>{let{isSelected:t,isIndeterminate:e,isFocusVisible:n,isDisabled:s,isReadOnly:l,isHovered:a,isInvalid:k}=c;return jsxs(Fragment,{children:[jsxs("div",{className:c$1({isSelected:t&&!e,isIndeterminate:e,isFocusVisible:n,isDisabled:s,isReadOnly:l,hasError:k,isHovered:a}),children:[t&&!e?jsx(CheckmarkIcon,{size:12}):null,e?jsx(MinusIcon,{size:12}):null]}),r?jsx("span",{className:a$1({isDisabled:s}),children:r}):null]})},d=P.forwardRef(({className:r,style:c$1,label:t,labelPosition:e="end",slot:n,...s},l)=>jsx(c,{...s,className:a(b({labelPosition:e}),"BaselineUI-Checkbox",r),style:c$1,slot:n,ref:l,children:a=>jsx(y,{label:t,...a})}));d.displayName="Checkbox";export{d as a};
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-JDLUGVXG.mjs';import {useState}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var c=0,s=new WeakMap;function y(t,u){let[l,d]=useState();return a(()=>{if(!t)return;let n=u?.current?.getRootNode()||document,m=n?.ownerDocument||document,o=s.get(n);o||(o=new Map,s.set(n,o));let e=o.get(t);if(e)d(e.element.id);else {let i=`react-aria-description-${c++}`;d(i);let r=m.createElement("div");r.id=i,r.style.display="none",r.textContent=t,"body"in n?n.body.appendChild(r):n.appendChild(r),e={refCount:0,element:r},o.set(t,e);}return e.refCount++,()=>{e&&--e.refCount===0&&(e.element.remove(),o.delete(t));}},[t]),{"aria-describedby":t?l:void 0}}export{y as a};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function o(t){return t.split("/").pop()?.split(".").shift()}function i(t){let n={};for(let r of Object.keys(t)){let e=o(r)??"";n[e]=t[r];}return n}export{i as a};
@@ -0,0 +1,10 @@
1
+ import {d as d$1}from'./chunk-66NJ7EYY.mjs';import {o,l,d as d$2,s,a as a$2}from'./chunk-MRJFGHFW.mjs';import {a as a$1,b as b$1,g as g$1,f}from'./chunk-AUOQSTS5.mjs';import {b as b$2}from'./chunk-RMUV6NJJ.mjs';import {useState,useEffect}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var u=null,d="keyboard",E=new Set,v=new Map,a=false,g=false,R={Tab:true,Escape:true};function b(e,n){for(let t of E)t(e,n);}function _(e){return !(e.metaKey||!d$2()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function m(e){a=true,!o.isOpening&&_(e)&&(u="keyboard",d="keyboard",b("keyboard",e));}function i(e){u="pointer",d="pointerType"in e?e.pointerType:"mouse",(e.type==="mousedown"||e.type==="pointerdown")&&(a=true,b("pointer",e));}function D(e){!o.isOpening&&l(e)&&(a=true,u="virtual",d="virtual");}function I(e){let n=g$1(e),t="nodeType"in n&&n.nodeType===Node.DOCUMENT_NODE,o=t?n.defaultView||window:b$1(n),l=t?n:a$1(n);n===o||n===l||d$1||!e.isTrusted||(!a&&!g&&(u="virtual",d="virtual",b("virtual",e)),a=false,g=false);}function O(){d$1||(a=false,g=true);}function y(e){if(typeof window>"u"||typeof document>"u")return;let n=b$1(e),t=a$1(e);if(v.get(n))return;let o=n.HTMLElement.prototype.focus;Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:true,writable:true,value:function(){a=true,o.apply(this,arguments);}}),t.addEventListener("keydown",m,true),t.addEventListener("keyup",m,true),t.addEventListener("click",D,true),n.addEventListener("focus",I,true),n.addEventListener("blur",O,false),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",i,true),t.addEventListener("pointermove",i,true),t.addEventListener("pointerup",i,true)):process.env.NODE_ENV==="test"&&(t.addEventListener("mousedown",i,true),t.addEventListener("mousemove",i,true),t.addEventListener("mouseup",i,true)),n.addEventListener("beforeunload",()=>{P(e);},{once:true}),v.set(n,{focus:o});}var P=(e,n)=>{let t=b$1(e),o=a$1(e);n&&o.removeEventListener("DOMContentLoaded",n),v.has(t)&&(Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:true,writable:true,value:v.get(t).focus}),o.removeEventListener("keydown",m,true),o.removeEventListener("keyup",m,true),o.removeEventListener("click",D,true),t.removeEventListener("focus",I,true),t.removeEventListener("blur",O,false),typeof PointerEvent<"u"?(o.removeEventListener("pointerdown",i,true),o.removeEventListener("pointermove",i,true),o.removeEventListener("pointerup",i,true)):process.env.NODE_ENV==="test"&&(o.removeEventListener("mousedown",i,true),o.removeEventListener("mousemove",i,true),o.removeEventListener("mouseup",i,true)),v.delete(t));};function j(e){let n=a$1(e),t;return n.readyState!=="loading"?y(e):(t=()=>{y(e);},n.addEventListener("DOMContentLoaded",t)),()=>P(e,t)}typeof document<"u"&&j();function S(){return u!=="pointer"}function K(){return u}function ee(e){u=e,d=e==="pointer"?"mouse":e,b(e,null);}function te(){return d}function ne(){y();let[e,n]=useState(u);return useEffect(()=>{let t=()=>{n(u);};return E.add(t),()=>{E.delete(t);}},[]),b$2()?null:e}var G=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function B(e,n,t){let o=t?g$1(t):void 0,l=a$1(o),r=b$1(o),W=typeof r<"u"?r.HTMLInputElement:HTMLInputElement,C=typeof r<"u"?r.HTMLTextAreaElement:HTMLTextAreaElement,N=typeof r<"u"?r.HTMLElement:HTMLElement,A=typeof r<"u"?r.KeyboardEvent:KeyboardEvent,c=f(l);return e=e||c instanceof W&&!G.has(c.type)||c instanceof C||c instanceof N&&c.isContentEditable,!(e&&n==="keyboard"&&t instanceof A&&!R[t.key])}function oe(e={}){let{isTextInput:n,autoFocus:t}=e,[o,l]=useState(t||S());return U(r=>{l(r);},[n],{isTextInput:n}),{isFocusVisible:o}}function U(e,n,t){y(),useEffect(()=>{if(t?.enabled===false)return;let o=(l,r)=>{B(!!t?.isTextInput,l,r)&&e(S());};return E.add(o),()=>{E.delete(o);}},n);}function de(e){if(!e.isConnected)return;let n=a$1(e);if(K()==="virtual"){let t=f(n);s(()=>{let o=f(n);(o===t||o===n.body)&&e.isConnected&&a$2(e);},e);}else a$2(e);}export{j as a,S as b,K as c,ee as d,te as e,ne as f,oe as g,U as h,de as i};
@@ -0,0 +1,10 @@
1
+ import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$1}from'./chunk-MEZNZ5W6.mjs';import {a}from'./chunk-VDUFLHKK.mjs';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var d=({icon:p,tooltip:r,label:c,isFocusable:e=true,...s})=>{let{tooltipProps:l}=a({label:c,tooltip:r,offset:9});return jsx(a$1,{...l,children:({triggerProps:f,triggerRef:m})=>jsx(a$2,{display:"inline-flex",...f,ref:m,tabIndex:e?0:void 0,"data-testid":"icon-with-tooltip",children:jsx(p,{...s})})})};export{d as a};
@@ -0,0 +1,10 @@
1
+ import {c,b,a as a$2}from'./chunk-66NJ7EYY.mjs';import {a}from'./chunk-6ZQE5SHE.mjs';import {e,g,a as a$1,f}from'./chunk-AUOQSTS5.mjs';import {useRef,useCallback}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function k(p){let{isDisabled:F,onBlurWithin:s,onFocusWithin:n,onFocusWithinChange:e$1}=p,r=useRef({isFocusWithin:false}),{addGlobalListener:c$1,removeAllGlobalListeners:f$1}=a(),o=useCallback(t=>{e(t.currentTarget,g(t))&&r.current.isFocusWithin&&!e(t.currentTarget,t.relatedTarget)&&(r.current.isFocusWithin=false,f$1(),s&&s(t),e$1&&e$1(false));},[s,e$1,r,f$1]),i=c(o),m=useCallback(t=>{if(!e(t.currentTarget,g(t)))return;let h=g(t),E=a$1(h),A=f(E);if(!r.current.isFocusWithin&&A===h){n&&n(t),e$1&&e$1(true),r.current.isFocusWithin=true,i(t);let T=t.currentTarget;c$1(E,"focus",w=>{let d=g(w);if(r.current.isFocusWithin&&!e(T,d)){let b$1=new E.defaultView.FocusEvent("blur",{relatedTarget:d});b(b$1,T);let C=a$2(b$1);o(C);}},{capture:true});}},[n,e$1,i,c$1,o]);return F?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:o}}}function J(p){let{isDisabled:F,onFocus:s,onBlur:n,onFocusChange:e}=p,r=useCallback(o=>{if(g(o)===o.currentTarget)return n&&n(o),e&&e(false),true},[n,e]),c$1=c(r),f$1=useCallback(o=>{let i=g(o),m=a$1(i),t=m?f(m):f();i===o.currentTarget&&i===t&&(s&&s(o),e&&e(true),c$1(o));},[e,s,c$1]);return {focusProps:{onFocus:!F&&(s||e||n)?f$1:void 0,onBlur:!F&&(n||e)?r:void 0}}}export{J as a,k as b};
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-LZFTBNPW.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon as ErrorAltCircleFilledIcon$1}from'@baseline-ui/icons/16';import {CheckCircleFilledIcon,ErrorAltCircleFilledIcon}from'@baseline-ui/icons/20';import {assignInlineVars}from'@vanilla-extract/dynamic';import F from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var p="_1azy5686",m="_1azy5685",d="var(--_1azy5680)",y="_1azy5688",f="_1azy5689",g="_1azy5681 z9nup81",v="_1azy5682";var u="_1azy5687";var M={sm:16,md:20},V={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon$1],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon]},z=F.forwardRef(({className:C,style:k,size:c="md",variant:e="active","data-block-id":_,"data-block-class":b,...o},x)=>{let{labelProps:P,progressBarProps:h}=a({...o,isIndeterminate:true}),r=M[c],s=r/2-2,S=2*s*Math.PI,t=V[c][e==="success"?0:1];return jsxs("div",{className:a$1(g,"BaselineUI-ProgressSpinner",C),ref:x,style:{...assignInlineVars({[d]:`${S}px`}),...k},"data-block-id":_,"data-block-class":b,children:[jsxs("div",{...h,className:v,children:[(e==="active"||e==="inactive")&&jsxs("svg",{height:r,width:r,viewBox:`0 0 ${r} ${r}`,children:[jsx("circle",{role:"presentation",className:p,cx:r/2,cy:r/2,r:s,fill:"none",stroke:"none"}),e==="active"&&jsx("circle",{role:"presentation",className:m,cx:r/2,cy:r/2,r:s,fill:"none",stroke:"none"})]}),e==="success"&&jsx(t,{className:u,size:r}),e==="error"&&jsx(t,{className:y,size:r})]}),o.label?jsx("span",{...P,className:f,children:o.label}):null]})});z.displayName="ProgressSpinner";export{z as a};
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-3FYY26ED.mjs';import i from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var p=i.forwardRef(({className:e,style:a$1,children:t,"data-block-id":d,"data-block-class":s,role:l="group",isDisabled:o,...m},c)=>{let{hoverProps:u,isHovered:f}=a({isDisabled:o});return jsx("div",{...u,role:l,"data-hovered":f,"data-disabled":o,"data-block-id":d,"data-block-class":s,className:e,style:a$1,...m,ref:c,children:t})});p.displayName="Group";export{p as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$4}from'./chunk-CFLEBB5T.mjs';import {a as a$3}from'./chunk-MEZNZ5W6.mjs';import {a as a$2,c}from'./chunk-PBFIKNYZ.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import T,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var x=a({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),S=a({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup82 _1yep5z611a"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:true},"_1yep5z61u0 _1yep5z61tz _1yep5z61tx _1yep5z61qd _1yep5z61nd"],[{isSelected:false,isHovered:true,isDisabled:false},"_1yep5z6g3"],[{isSelected:false,isFocusVisible:true,isDisabled:false},"_1yep5z61u0 _1yep5z61tz _1yep5z61q3 _1yep5z61tx"],[{isSelected:true,isFocusVisible:true,isDisabled:false},"_1j5skr7k _1yep5z61ty _1yep5z61tx _1yep5z61q4 _1yep5z61ne"],[{isSelected:true,isFocusVisible:false,isDisabled:false},"_1yep5z61tx _1yep5z61tz _1yep5z61q3 _1yep5z61u0"]]}),B=a({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617x _1yep5z617w _1yep5z6140 _1yep5z617u"},isSelected:{true:"_1yep5z6119"},isDisabled:{true:"z9nup82 _1yep5z611a"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isHovered:true},"_1yep5z61nc"]]}),C=a({defaultClassName:"_1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617x _1yep5z617w _1yep5z6140 _1yep5z617u"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup82 _1yep5z611a"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isHovered:true},"_1yep5z61o9"],[{isSelected:true,isDisabled:false},"_1yep5z61o9 _1yep5z61ng"],[{isSelected:true,isDisabled:true},"_1yep5z61o9 _1yep5z61nd"]]}),V=a({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6lp _1yep5z6lq _1yep5z6lk _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup82 _1yep5z611c"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false},"_1j5skr7c _1yep5z61nf"],[{isSelected:false,isDisabled:true},"_1j5skr7d _1yep5z61nd"],[{isSelected:false,isHovered:true},"_1yep5z61o9"],[{isSelected:false,isFocusVisible:true},"_1yep5z61u0 _1yep5z61tz _1yep5z61q3 _1yep5z61tx"],[{isSelected:true,isFocusVisible:true},"_1j5skr7e _1yep5z61ty _1yep5z61tx _1yep5z61q4"]]});var E={xxs:8,xs:12,sm:16,md:20,lg:24},I=T.forwardRef((e,t)=>{let s=a$1(t),{tooltipProps:p}=a$2(e,s);return p?jsx(a$3,{...p,children:jsx(l,{...e,ref:t})}):jsx(l,{...e,ref:t})});I.displayName="ToggleIconButton";var l=T.forwardRef(({className:e,style:t,icon:s,size:p="md",variant:a="primary","data-block-id":D,"data-block-class":h,..._},F)=>{let o=a$4(_),{buttonProps:N,isPressed:w,ref:H,isFocusVisible:z,isFocused:q,isHovered:n,uiStateOptions:u}=c(_,o),P=useMemo(()=>typeof s=="function"?s:o.isSelected?s.selected:s.unselected,[s,o.isSelected]),y={isSelected:o.isSelected,isHovered:n,isFocusVisible:z,isDisabled:!!_.isDisabled},R=a$5({"data-hovered":n,"data-selected":o.isSelected,"data-focus-visible":z,"data-disabled":_.isDisabled,"data-block-id":D,"data-block-class":h,"data-focused":q,"data-pressed":w});return jsx("button",{...c$1(N,R),className:a$6(a==="toolbar"&&V(y),a==="primary"&&S(y),a==="secondary"&&B(y),a==="tertiary"&&C(y),x({size:p}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(u):e),style:typeof t=="function"?t(u):t,ref:b(H,F),children:jsx(P,{size:E[p]})})});l.displayName="ToggleIconButtonCore";export{I as a};
@@ -0,0 +1,10 @@
1
+ import {d as d$1}from'./chunk-BGMVPFYK.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-KEVERVHK.mjs';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function g(t,i){let{elementType:e="button",isDisabled:n,onPress:f,onPressStart:d$2,onPressEnd:m,onPressUp:b,onPressChange:c$1,preventFocusOnPress:B,allowFocusWhenDisabled:A,onClick:T,href:P,target:x,rel:E,type:s="button"}=t,r;e==="button"?r={type:s,disabled:n,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:r={role:"button",href:e==="a"&&!n?P:void 0,target:e==="a"?x:void 0,type:e==="input"?s:void 0,disabled:e==="input"?n:void 0,"aria-disabled":!n||e==="input"?void 0:n,rel:e==="a"?E:void 0};let{pressProps:M,isPressed:L}=d({onPressStart:d$2,onPressEnd:m,onPressChange:c$1,onPress:f,onPressUp:b,onClick:T,isDisabled:n,preventFocusOnPress:B,ref:i}),{focusableProps:o}=d$1(t,i);A&&(o.tabIndex=n?-1:o.tabIndex);let O=c(o,M,a(t,{labelable:true}));return {isPressed:L,buttonProps:c(r,O,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}export{g as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$5,b as b$2,e}from'./chunk-5ULL6IBX.mjs';import {a as a$1}from'./chunk-YS3Y5KGV.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {f}from'./chunk-Y4DRSGEJ.mjs';import {a as a$3}from'./chunk-3FYY26ED.mjs';import {b as b$1,c}from'./chunk-TZ4MVY4E.mjs';import {a,b}from'./chunk-AUOQSTS5.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {ArrowDownCircleFilledIcon}from'@baseline-ui/icons/16';import {AnimatePresence,motion}from'motion/react';import s,{useCallback,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var k="_8kqf970 _1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z614v _1yep5z614w _1yep5z614x _1yep5z6154 _1yep5z6155 _1yep5z6156 _1yep5z615m _1yep5z615n _1yep5z615o _1yep5z6z9 _1yep5z6vi _1yep5z6vj _1yep5z6vk _1yep5z617s _1yep5z6101";var x=2,H=s.forwardRef(({className:L,style:A,hideForKeyboard:T,scrollRef:o,label:F,delay:i=1500,smoothScroll:I=true,"data-block-id":q,"data-block-class":R},N)=>{let e$1=s.useRef(null),D=f(),[M,c$1]=s.useState(false),r=useCallback(()=>{let t=o?.current||a(e$1.current).body;return b(t).getComputedStyle(t).flexDirection==="column-reverse"?t.scrollTop+x>=0:t.scrollTop+t.clientHeight+x>=t.scrollHeight},[o]),[O,p]=s.useState(r),{buttonProps:X,isPressed:Y}=a$1({onPress:()=>{let t=o?.current||a(e$1.current).body;t.scrollTo({top:t.scrollHeight,behavior:I?"smooth":"auto"});}},e$1),{focusProps:U,isFocused:V,isFocusVisible:m}=a$2(),{hoverProps:j,isHovered:u}=a$3({}),W=a$4({"data-block-id":q,"data-block-class":R,"data-pressed":Y,"data-focus-visible":m,"data-hovered":u,"data-focused":V});return useEffect(()=>{p(r());},[r]),useEffect(()=>{let t=o?.current||a(e$1.current).body,y="onscrollend"in b(t),l=()=>{setTimeout(()=>{c$1(false),p(r());},i);},d=()=>{c$1(true),y||l();};return t.addEventListener("scroll",d),t.addEventListener("scrollend",l),()=>{t.removeEventListener("scroll",d),t.removeEventListener("scrollend",l);}},[o,i,r]),jsx(AnimatePresence,{initial:false,children:(!T||D!=="keyboard")&&!M&&!O?jsxs(motion.button,{initial:{opacity:0,transform:"translateX(-50%) translateY(10px)"},animate:{opacity:1,transform:"translateX(-50%) translateY(0)"},exit:{opacity:0,transform:"translateX(-50%) translateY(10px)"},transition:{duration:.3},...c(X,U,j,W),className:a$6(k,b$2({isFocusVisible:m,variant:"high-contrast",isHovered:u}),e({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",L),style:A,ref:b$1(N,e$1),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:a$5({variant:"high-contrast"})}),F]}):null})});H.displayName="ScrollControlButton";export{H as a};
@@ -0,0 +1,10 @@
1
+ import {b}from'./chunk-QMDDCVAF.mjs';import {a}from'./chunk-OO7BXL2N.mjs';import {useContext}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function u(t){let o=useContext(a),{portalContainer:i}=useContext(b);return t||o||i||void 0}export{u as a};
File without changes
@@ -0,0 +1,10 @@
1
+ import {l,q,e,B,o,p,u,h,d as d$1,A,g,v,x,z,f,i,m,c as c$2,r,t,s,n,j,a as a$4,b as b$4,w}from'./chunk-OMT6ZWSV.mjs';import {b as b$1}from'./chunk-WL27JGVG.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$2,b as b$3}from'./chunk-MVK5CB64.mjs';import {a as a$1}from'./chunk-XWLESSHN.mjs';import {d}from'./chunk-Y4DRSGEJ.mjs';import {i as i$1,g as g$1,l as l$1,m as m$1}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a,c}from'./chunk-JDLUGVXG.mjs';import {a as a$3}from'./chunk-6ZQE5SHE.mjs';import {b as b$2,g as g$2}from'./chunk-AUOQSTS5.mjs';import {flushSync}from'react-dom';import Je,{useState,useRef,useImperativeHandle,useEffect,useCallback,version}from'react';import {jsx}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var Ze=Je.forwardRef(function(e,o){let t=e.children,[g,n]=useState(null),v=useRef(null),d=useRef(void 0);return useImperativeHandle(o,()=>(h,K)=>{let T=t(h),O,p,b;T&&typeof T=="object"&&"element"in T?(O=T.element,p=T.x,b=T.y):O=T,flushSync(()=>{n(O);}),K(v.current,p,b),d.current=requestAnimationFrame(()=>{n(null);});},[t]),useEffect(()=>()=>{d.current&&cancelAnimationFrame(d.current);},[]),g?jsx("div",{style:{zIndex:-100,position:"fixed",top:0,left:-1e5},ref:v,children:g}):null});function Be(a,e,o,t,g=false,n=false){switch(t){case "left":return g?te(a,e,o,n,"left"):re(a,e,o,n,"left");case "right":return g?re(a,e,o,n,"right"):te(a,e,o,n,"right");case "up":return re(a,e,o,n);case "down":return te(a,e,o,n)}}function te(a,e,o,t=false,g=null){if(!o)return {type:"root"};if(o.type==="root"){let n=a.getFirstKey?.()??null;return n!=null?{type:"item",key:n,dropPosition:"before"}:null}if(o.type==="item"){let n=null;g?n=g==="right"?a.getKeyRightOf?.(o.key,{includeDisabled:true}):a.getKeyLeftOf?.(o.key,{includeDisabled:true}):n=a.getKeyBelow?.(o.key,{includeDisabled:true});let v=oe(e,o.key,d=>e.getKeyAfter(d));if(n!=null&&n!==v)return {type:"item",key:n,dropPosition:o.dropPosition};switch(o.dropPosition){case "before":return {type:"item",key:o.key,dropPosition:"on"};case "on":{let d=e.getItem(o.key),h=n!=null?e.getItem(n):null;return d&&h&&h.level>=d.level?{type:"item",key:h.key,dropPosition:"before"}:{type:"item",key:o.key,dropPosition:"after"}}case "after":{let d=e.getItem(o.key),h=d?.nextKey!=null?e.getItem(d.nextKey):null;for(;h!=null&&h.type!=="item";)h=h.nextKey!=null?e.getItem(h.nextKey):null;if(d&&h==null&&d.parentKey!=null){let K=e.getItem(d.parentKey),T=K?.nextKey!=null?e.getItem(K.nextKey):null;if(T?.type==="item")return {type:"item",key:T.key,dropPosition:"before"};if(K?.type==="item")return {type:"item",key:K.key,dropPosition:"after"}}if(h)return {type:"item",key:h.key,dropPosition:"on"}}}}return t?{type:"root"}:null}function re(a,e,o,t=false,g=null){if(!o||t&&o.type==="root"){let n=null,v=a.getLastKey?.();for(;v!=null;){let d=e.getItem(v);if(d?.type!=="item")break;n=v,v=d?.parentKey;}return n!=null?{type:"item",key:n,dropPosition:"after"}:null}if(o.type==="item"){let n=null;g?n=g==="left"?a.getKeyLeftOf?.(o.key,{includeDisabled:true}):a.getKeyRightOf?.(o.key,{includeDisabled:true}):n=a.getKeyAbove?.(o.key,{includeDisabled:true});let v=oe(e,o.key,d=>e.getKeyBefore(d));if(n!=null&&n!==v)return {type:"item",key:n,dropPosition:o.dropPosition};switch(o.dropPosition){case "before":{let d=e.getItem(o.key);if(d&&d.prevKey!=null){let h=Fe(e,d.prevKey);if(h)return h}return n!=null?{type:"item",key:n,dropPosition:"on"}:{type:"root"}}case "on":return {type:"item",key:o.key,dropPosition:"before"};case "after":{let d=Fe(e,o.key);return d||{type:"item",key:o.key,dropPosition:"on"}}}}return o.type!=="root"?{type:"root"}:null}function Fe(a,e){let o=a.getItem(e),t=oe(a,e,n=>a.getKeyAfter(n)),g=t!=null?a.getItem(t):null;if(o&&g&&g.level>o.level){let n=null;if("lastChildKey"in o)for(n=o.lastChildKey!=null?a.getItem(o.lastChildKey):null;n&&n.type!=="item"&&n.prevKey!=null;)n=a.getItem(n.prevKey);else n=Array.from(o.childNodes).findLast(v=>v.type==="item")||null;if(n)return {type:"item",key:n.key,dropPosition:"after"}}return null}function oe(a,e,o){let t=o(e),g=t!=null?a.getItem(t):null;for(;g&&g.type!=="item";)t=o(g.key),g=t!=null?a.getItem(t):null;return t}var $=20;function He(a){let e=useRef(null),o=useRef(true),t=useRef(true);useEffect(()=>{if(a.current){e.current=a$2(a.current)?a.current:b$3(a.current);let v=window.getComputedStyle(e.current);o.current=/(auto|scroll)/.test(v.overflowX),t.current=/(auto|scroll)/.test(v.overflowY);}},[a]);let g=useRef({timer:void 0,dx:0,dy:0}).current;useEffect(()=>()=>{g.timer&&(cancelAnimationFrame(g.timer),g.timer=void 0);},[g]);let n=useCallback(()=>{o.current&&e.current&&(e.current.scrollLeft+=g.dx),t.current&&e.current&&(e.current.scrollTop+=g.dy),g.timer&&(g.timer=requestAnimationFrame(n));},[e,g]);return {move(v,d){if(!i$1()||g$1()||!e.current)return;let h=e.current.getBoundingClientRect(),K=$,T=$,O=h.height-$,p=h.width-$;v<K||v>p||d<T||d>O?(v<K?g.dx=v-K:v>p&&(g.dx=v-p),d<T?g.dy=d-T:d>O&&(g.dy=d-O),g.timer||(g.timer=requestAnimationFrame(n))):this.stop();},stop(){g.timer&&(cancelAnimationFrame(g.timer),g.timer=void 0);}}}function tt(a$1,e$1,o$1){let t=useRef({props:a$1,state:e$1,nextTarget:null,dropOperation:null}).current;t.props=a$1,t.state=e$1;let g=useCallback(async p=>{let{onInsert:b,onRootDrop:u,onItemDrop:c,onReorder:s,onMove:m,acceptedDragTypes:D="all",shouldAcceptItemDrop:i}=t.props,{draggingKeys:l$1}=l,f=q(o$1),{target:r,dropOperation:y,items:w}=p,P=w;(D!=="all"||i)&&(P=w.filter(I=>{let E;return I.kind==="directory"?E=new Set([e]):E=I.kind==="file"?new Set([I.type]):I.types,D==="all"||D.some(C=>E.has(C))?r.type==="item"&&r.dropPosition==="on"&&i?i(r,E):true:false})),P.length>0&&(r.type==="root"&&u&&await u({items:P,dropOperation:y}),r.type==="item"&&(r.dropPosition==="on"&&c&&await c({items:P,dropOperation:y,isInternal:f,target:r}),m&&f&&await m({keys:l$1,dropOperation:y,target:r}),r.dropPosition!=="on"&&(!f&&b&&await b({items:P,dropOperation:y,target:r}),f&&s&&await s({keys:l$1,dropOperation:y,target:r}))));},[t,o$1]),n=He(o$1),{dropProps:v}=B({ref:o$1,onDropEnter(){t.nextTarget!=null&&e$1.setTarget(t.nextTarget);},onDropMove(p){t.nextTarget!=null&&e$1.setTarget(t.nextTarget);},getDropOperationForPoint(p,b,u,c){let{draggingKeys:s,dropCollectionRef:m}=l,D=q(o$1),i=f=>e$1.getDropOperation({target:f,types:p,allowedOperations:b,isInternal:D,draggingKeys:s})!=="cancel",l$1=a$1.dropTargetDelegate.getDropTargetFromPoint(u,c,i);if(!l$1)return t.dropOperation="cancel",t.nextTarget=null,"cancel";if(t.dropOperation=e$1.getDropOperation({target:l$1,types:p,allowedOperations:b,isInternal:D,draggingKeys:s}),t.dropOperation==="cancel"){let f={type:"root"},r=e$1.getDropOperation({target:f,types:p,allowedOperations:b,isInternal:D,draggingKeys:s});r!=="cancel"&&(l$1=f,t.dropOperation=r);}return l$1&&t.dropOperation!=="cancel"&&o$1?.current!==m?.current&&o(o$1),t.nextTarget=t.dropOperation==="cancel"?null:l$1,t.dropOperation},onDropExit(){o(void 0),e$1.setTarget(null),n.stop();},onDropActivate(p){e$1.target?.type==="item"&&typeof a$1.onDropActivate=="function"&&a$1.onDropActivate({type:"dropactivate",x:p.x,y:p.y,target:e$1.target});},onDrop(p$1){o(o$1),e$1.target&&K(p$1,e$1.target);let{draggingCollectionRef:b}=l;b==null&&p();}}),d$2=useRef(null),h$1=useCallback(()=>{let{state:p}=t;if(d$2.current){let{target:b,collection:u,selectedKeys:c,focusedKey:s,isInternal:m,draggingKeys:D}=d$2.current;if(p.collection.size>u.size&&p.selectionManager.isSelectionEqual(c)){let i=new Set,l=p.collection.getFirstKey();for(;l!=null;){let f=p.collection.getItem(l);f?.type==="item"&&!u.getItem(f.key)&&i.add(f.key),f?.hasChildNodes&&p.collection.getItem(f.lastChildKey)?.type==="item"?l=f.firstChildKey:l=p.collection.getKeyAfter(l);}if(p.selectionManager.setSelectedKeys(i),p.selectionManager.focusedKey===s){let f=i.keys().next().value;if(f!=null){let r=p.collection.getItem(f),y=d$2.current.target,w=p.collection.expandedKeys?p.collection.expandedKeys.has(r?.parentKey):false;r&&(r?.type==="cell"||y.type==="item"&&y.dropPosition==="on"&&!w)&&(f=r.parentKey),f!=null&&p.selectionManager.setFocusedKey(f),p.selectionManager.selectionMode==="none"&&d("keyboard");}}}else s!=null&&p.selectionManager.focusedKey===s&&m&&b.type==="item"&&b.dropPosition!=="on"&&D.has(p.collection.getItem(s)?.parentKey)?(p.selectionManager.setFocusedKey(p.collection.getItem(s)?.parentKey??null),d("keyboard")):p.selectionManager.focusedKey===s&&b.type==="item"&&b.dropPosition==="on"&&p.collection.getItem(b.key)!=null?(p.selectionManager.setFocusedKey(b.key),d("keyboard")):p.selectionManager.focusedKey!=null&&!p.selectionManager.isSelected(p.selectionManager.focusedKey)&&d("keyboard");p.selectionManager.setFocused(true);}},[t]),K=useCallback((p,b)=>{let{state:u}=t;d$2.current={timeout:void 0,focusedKey:u.selectionManager.focusedKey,collection:u.collection,selectedKeys:u.selectionManager.selectedKeys,draggingKeys:l.draggingKeys,isInternal:q(o$1),target:b},(t.props.onDrop||g)({type:"drop",x:p.x,y:p.y,target:b,items:p.items,dropOperation:p.dropOperation}),d$2.current.timeout=setTimeout(()=>{h$1(),d$2.current=null;},50);},[t,g,o$1,h$1]);useEffect(()=>()=>{d$2.current&&clearTimeout(d$2.current.timeout);},[]),a(()=>{d$2.current&&e$1.collection!==d$2.current.collection&&h$1();});let{direction:T}=b();useEffect(()=>{if(!o$1.current)return;let p=(c,s=true,m="down")=>Be(t.props.keyboardDelegate,t.state.collection,c,m,T==="rtl",s),b=(c,s=true)=>p(c,s,"up"),u$1=(c,s,m,D,i=true)=>{let l$1=0,f,{draggingKeys:r}=l,y=q(o$1);do{let w=D(c,i);if(!w)return null;c=w,f=t.state.getDropOperation({target:w,types:s,allowedOperations:m,isInternal:y,draggingKeys:r}),c.type==="root"&&l$1++;}while(f==="cancel"&&!t.state.isDropTarget(c)&&l$1<2);return f==="cancel"?null:c};return u({element:o$1.current,preventFocusOnDrop:true,getDropOperation(c,s){if(t.state.target){let{draggingKeys:D}=l,i=q(o$1);return t.state.getDropOperation({target:t.state.target,types:c,allowedOperations:s,isInternal:i,draggingKeys:D})}return u$1(null,c,s,p)?"move":"cancel"},onDropEnter(c,s){let m=h(s.items),D=t.state.selectionManager,i=null;o(o$1);let l$1=D.focusedKey,f="after",r=l$1!=null?t.state.collection.getItem(l$1):null;if(r?.type==="cell"&&(l$1=r.parentKey),l$1!=null&&D.isSelected(l$1)&&(D.selectedKeys.size>1&&D.firstSelectedKey===l$1?f="before":l$1=D.lastSelectedKey),l$1!=null){i={type:"item",key:l$1,dropPosition:f};let{draggingKeys:y}=l,w=q(o$1);t.state.getDropOperation({target:i,types:m,allowedOperations:s.allowedDropOperations,isInternal:w,draggingKeys:y})==="cancel"&&(i=u$1(i,m,s.allowedDropOperations,p,false)??u$1(i,m,s.allowedDropOperations,b,false));}i||(i=u$1(null,m,s.allowedDropOperations,p)),t.state.setTarget(i);},onDropExit(){o(void 0),t.state.setTarget(null);},onDropTargetEnter(c){t.state.setTarget(c);},onDropActivate(c,s){s?.type==="item"&&s?.dropPosition==="on"&&typeof t.props.onDropActivate=="function"&&t.props.onDropActivate({type:"dropactivate",x:c.x,y:c.y,target:s});},onDrop(c,s){o(o$1),t.state.target&&K(c,s||t.state.target);},onKeyDown(c,s){let{keyboardDelegate:m}=t.props,D=h(s.items);switch(c.key){case "ArrowDown":{if(m.getKeyBelow){let i=u$1(t.state.target,D,s.allowedDropOperations,(l,f)=>p(l,f,"down"));t.state.setTarget(i);}break}case "ArrowUp":{if(m.getKeyAbove){let i=u$1(t.state.target,D,s.allowedDropOperations,(l,f)=>p(l,f,"up"));t.state.setTarget(i);}break}case "ArrowLeft":{if(m.getKeyLeftOf){let i=u$1(t.state.target,D,s.allowedDropOperations,(l,f)=>p(l,f,"left"));t.state.setTarget(i);}break}case "ArrowRight":{if(m.getKeyRightOf){let i=u$1(t.state.target,D,s.allowedDropOperations,(l,f)=>p(l,f,"right"));t.state.setTarget(i);}break}case "Home":{if(m.getFirstKey){let i=u$1(null,D,s.allowedDropOperations,p);t.state.setTarget(i);}break}case "End":{if(m.getLastKey){let i=u$1(null,D,s.allowedDropOperations,b);t.state.setTarget(i);}break}case "PageDown":{if(m.getKeyPageBelow){let i=t.state.target;if(!i)i=u$1(null,D,s.allowedDropOperations,p);else {let l$1=m.getFirstKey?.();i.type==="item"&&(l$1=i.key);let f=null;l$1!=null&&(f=m.getKeyPageBelow(l$1));let r=i.type==="item"?i.dropPosition:"after";if((f==null||i.type==="item"&&i.key===m.getLastKey?.())&&(f=m.getLastKey?.()??null,r="after"),f==null)break;i={type:"item",key:f,dropPosition:r};let{draggingCollectionRef:y,draggingKeys:w}=l,P=y?.current===o$1?.current;t.state.getDropOperation({target:i,types:D,allowedOperations:s.allowedDropOperations,isInternal:P,draggingKeys:w})==="cancel"&&(i=u$1(i,D,s.allowedDropOperations,p,false)??u$1(i,D,s.allowedDropOperations,b,false));}t.state.setTarget(i??t.state.target);}break}case "PageUp":{if(!m.getKeyPageAbove)break;let i=t.state.target;if(!i)i=u$1(null,D,s.allowedDropOperations,b);else if(i.type==="item"){if(i.key===m.getFirstKey?.())i={type:"root"};else {let y=m.getKeyPageAbove(i.key),w=i.dropPosition;if(y==null&&(y=m.getFirstKey?.(),w="before"),y==null)break;i={type:"item",key:y,dropPosition:w};}let{draggingKeys:l$1}=l,f=q(o$1);t.state.getDropOperation({target:i,types:D,allowedOperations:s.allowedDropOperations,isInternal:f,draggingKeys:l$1})==="cancel"&&(i=u$1(i,D,s.allowedDropOperations,b,false)??u$1(i,D,s.allowedDropOperations,p,false));}t.state.setTarget(i??t.state.target);break}}t.props.onKeyDown?.(c);}})},[t,o$1,K,T]);let O=c();return d$1.set(e$1,{id:O,ref:o$1}),{collectionProps:c$1(v,{id:O,"aria-describedby":null})}}function ie(a,e,o){let{dropProps:t}=A(o),g$1=g(e);useEffect(()=>{if(o.current)return v({element:o.current,target:a.target,getDropOperation(T,O){let{draggingKeys:p}=l,b=q(g$1);return e.getDropOperation({target:a.target,types:T,allowedOperations:O,isInternal:b,draggingKeys:p})},activateButtonRef:a.activateButtonRef})},[o,a.target,e,g$1,a.activateButtonRef]);let n=x(),{draggingKeys:v$1}=l,d=q(g$1),h$1=n&&e.getDropOperation({target:a.target,types:h(n.dragTarget.items),allowedOperations:n.dragTarget.allowedDropOperations,isInternal:d,draggingKeys:v$1})!=="cancel",K=e.isDropTarget(a.target);return useEffect(()=>{n&&K&&o.current&&o.current.focus();},[K,n,o]),{dropProps:{...t,"aria-hidden":!n||h$1?void 0:"true"},isDropTarget:K}}function rt(a,e,o){let{target:t}=a,{collection:g}=e,n=b$1(z,"@react-aria/dnd"),v=x(),{dropProps:d}=ie(a,e,o),h=c(),K=u=>u==null?"":g.getTextValue?.(u)??g.getItem(u)?.textValue??"",T="",O;if(t.type==="root")T=n.format("dropOnRoot"),O=`${h} ${f(e)}`;else if(t.dropPosition==="on")T=n.format("dropOnItem",{itemText:K(t.key)});else {let u,c;if(t.dropPosition==="before"){let s=g.getItem(t.key)?.prevKey,m=s!=null?g.getItem(s):null;u=m?.type==="item"?m.key:null;}else u=t.key;if(t.dropPosition==="after"){let s=g.getItem(t.key)?.nextKey,m=s!=null?g.getItem(s):null;c=m?.type==="item"?m.key:null;}else c=t.key;u!=null&&c!=null?T=n.format("insertBetween",{beforeItemText:K(u),afterItemText:K(c)}):u!=null?T=n.format("insertAfter",{itemText:K(u)}):c!=null&&(T=n.format("insertBefore",{itemText:K(c)}));}let p=e.isDropTarget(t),b=v?d["aria-hidden"]:"true";return {dropIndicatorProps:{...d,id:h,"aria-roledescription":n.format("dropIndicator"),"aria-label":T,"aria-labelledby":O,"aria-hidden":b,tabIndex:-1},isDropTarget:p,isHidden:!p&&!!b}}var Ve={keyboard:{start:"dragDescriptionKeyboard",end:"endDragKeyboard"},touch:{start:"dragDescriptionTouch",end:"endDragTouch"},virtual:{start:"dragDescriptionVirtual",end:"endDragVirtual"}};function Ye(a){let{hasDragButton:e,isDisabled:o,elementRef:t$1}=a,g=b$1(z,"@react-aria/dnd"),n=useRef({options:a,x:0,y:0}).current;n.options=a;let v=useRef(null),[d,h]=useState(false),K=r=>{v.current=r,h(!!r);},{addGlobalListener:T,removeAllGlobalListeners:O}=a$3(),p=useRef(null),b=r=>{if(r.defaultPrevented)return;if(r.stopPropagation(),p.current==="virtual"){r.preventDefault(),m(g$2(r)),p.current=null;return}typeof a.onDragStart=="function"&&a.onDragStart({type:"dragstart",x:r.clientX,y:r.clientY});let y=a.getItems();r.dataTransfer.clearData?.(),j(r.dataTransfer,y);let w=7;if(typeof a.getAllowedDropOperations=="function"){let E=a.getAllowedDropOperations();w=0;for(let C of E)w|=a$4[C]||0;}t(w);let P=b$4[w]||"none";r.dataTransfer.effectAllowed=P==="cancel"?"none":P,typeof a.preview?.current=="function"&&a.preview.current(y,(E,C,N)=>{if(!E)return;let x=E.getBoundingClientRect(),ge=r.currentTarget.getBoundingClientRect(),Z=r.clientX-ge.x,Q=r.clientY-ge.y;(Z>x.width||Q>x.height)&&(Z=x.width/2,Q=x.height/2);let H=Z,j=Q;typeof C=="number"&&typeof N=="number"&&(H=C,j=N),H=Math.max(0,Math.min(H,x.width)),j=Math.max(0,Math.min(j,x.height));let _e=2*Math.round(x.height/2);E.style.height=`${_e}px`,r.dataTransfer.setDragImage(E,H,j);}),T(b$2(g$2(r)),"drop",E=>{E.preventDefault(),E.stopPropagation(),console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.");},{once:true}),n.x=r.clientX,n.y=r.clientY;let I=g$2(r);requestAnimationFrame(()=>{K(I);});},u=r=>{r.stopPropagation(),!(r.clientX===n.x&&r.clientY===n.y)&&(typeof a.onDragMove=="function"&&a.onDragMove({type:"dragmove",x:r.clientX,y:r.clientY}),n.x=r.clientX,n.y=r.clientY);},c=r$1=>{if(r$1.stopPropagation(),typeof a.onDragEnd=="function"){let y={type:"dragend",x:r$1.clientX,y:r$1.clientY,dropOperation:c$2[r$1.dataTransfer.dropEffect]};r&&(y.dropOperation=c$2[r]),a.onDragEnd(y);}K(null),O(),t(0),s(void 0);};useEffect(()=>()=>{if(v.current&&(!v.current.isConnected||parseInt(version,10)<17)){if(typeof n.options.onDragEnd=="function"){let r$1={type:"dragend",x:0,y:0,dropOperation:c$2[r||"none"]};n.options.onDragEnd(r$1);}K(null),t(0),s(void 0);}},[n]);let s$1=r=>{r.pointerType!=="keyboard"&&r.pointerType!=="virtual"||m(r.target);},m=r=>{if(typeof n.options.onDragStart=="function"){let y=r.getBoundingClientRect();n.options.onDragStart({type:"dragstart",x:y.x+y.width/2,y:y.y+y.height/2});}w({element:r,items:n.options.getItems(),allowedDropOperations:typeof n.options.getAllowedDropOperations=="function"?n.options.getAllowedDropOperations():["move","copy","link"],onDragEnd(y){K(null),typeof n.options.onDragEnd=="function"&&n.options.onDragEnd(y);}},g),K(r);},D=i(),i$1=d?Ve[D].end:Ve[D].start,l=a$1(g.format(i$1),t$1),f={};return e||(f={...l,onPointerDown(r){if(p.current=m$1(r.nativeEvent)?"virtual":r.pointerType,r.width<1&&r.height<1)p.current="virtual";else {let y=r.currentTarget.getBoundingClientRect(),w=r.clientX-y.x,P=r.clientY-y.y,I=y.width/2,E=y.height/2;Math.abs(w-I)<=.5&&Math.abs(P-E)<=.5?p.current="virtual":p.current=r.pointerType;}},onKeyDownCapture(r){g$2(r)===r.currentTarget&&r.key==="Enter"&&(r.preventDefault(),r.stopPropagation());},onKeyUpCapture(r){g$2(r)===r.currentTarget&&r.key==="Enter"&&(r.preventDefault(),r.stopPropagation(),m(g$2(r)));},onClick(r){(l$1(r.nativeEvent)||p.current==="virtual")&&(r.preventDefault(),r.stopPropagation(),m(g$2(r)));}}),o?{dragProps:{draggable:"false"},dragButtonProps:{},isDragging:false}:{dragProps:{...f,draggable:"true",onDragStart:b,onDrag:u,onDragEnd:c},dragButtonProps:{...l,onPress:s$1},isDragging:d}}var it={keyboard:{selected:"dragSelectedKeyboard",notSelected:"dragDescriptionKeyboard"},touch:{selected:"dragSelectedLongPress",notSelected:"dragDescriptionLongPress"},virtual:{selected:"dragDescriptionVirtual",notSelected:"dragDescriptionVirtual"}};function at(a,e,o){let t=b$1(z,"@react-aria/dnd"),g=e.isDisabled||e.selectionManager.isDisabled(a.key),{dragProps:n$1,dragButtonProps:v}=Ye({elementRef:o,getItems(){return e.getItems(a.key)},preview:e.preview,getAllowedDropOperations:e.getAllowedDropOperations,hasDragButton:a.hasDragButton,onDragStart(u){e.startDrag(a.key,u),n(e.draggingKeys);},onDragMove(u){e.moveDrag(u);},onDragEnd(u){let{dropOperation:c}=u,s=c==="cancel"?false:q();e.endDrag({...u,keys:e.draggingKeys,isInternal:s}),p();}}),d=e.collection.getItem(a.key),h=e.getKeysForDrag(a.key).size,K=h>1&&e.selectionManager.isSelected(a.key),T,O,p$1=i();if(!a.hasDragButton&&e.selectionManager.selectionMode!=="none"){let u=it[p$1][K?"selected":"notSelected"];a.hasAction&&p$1==="keyboard"&&(u+="Alt"),K?O=t.format(u,{count:h}):O=t.format(u),delete n$1.onClick;}else if(K)T=t.format("dragSelectedItems",{count:h});else {let u=e.collection.getTextValue?.(a.key)??d?.textValue??"";T=t.format("dragItem",{itemText:u});}let b=a$1(O,o);if(O&&Object.assign(n$1,b),!a.hasDragButton&&a.hasAction){let{onKeyDownCapture:u,onKeyUpCapture:c}=n$1;p$1==="touch"&&delete n$1["aria-describedby"],n$1.onKeyDownCapture=s=>{s.altKey&&u?.(s);},n$1.onKeyUpCapture=s=>{s.altKey&&c?.(s);};}return {dragProps:g?{}:n$1,dragButtonProps:{...v,isDisabled:g,"aria-label":T}}}function pt(a,e,o){let{draggingCollectionRef:t}=l;e.draggingKeys.size>0&&t?.current!==o.current&&m(o);}function gt(a){let{getItems:e,isDisabled:o,collection:t,selectionManager:g,onDragStart:n,onDragMove:v,onDragEnd:d,preview:h,getAllowedDropOperations:K}=a,[,T]=useState(false),O=useRef(new Set),p=useRef(null),b=u=>{let c=new Set;if(g.isSelected(u))for(let s of g.selectedKeys){let m=t.getItem(s);if(m){let D=false,i=m.parentKey;for(;i!=null;){if(g.selectedKeys.has(i)){D=true;break}let l=t.getItem(i);i=l?l.parentKey:null;}D||c.add(s);}}else c.add(u);return c};return {collection:t,selectionManager:g,get draggedKey(){return p.current},get draggingKeys(){return O.current},isDragging(u){return O.current.has(u)},getKeysForDrag:b,getItems(u){let c=b(u),s=[];for(let m of c){let D=t.getItem(m)?.value;D!=null&&s.push(D);}return e(b(u),s)},isDisabled:o,preview:h,getAllowedDropOperations:K,startDrag(u,c){let s=b(u);O.current=s,p.current=u,g.setFocused(false),T(true),typeof n=="function"&&n({...c,keys:s});},moveDrag(u){typeof v=="function"&&v({...u,keys:O.current});},endDrag(u){let{isInternal:c}=u;typeof d=="function"&&d({...u,keys:O.current,isInternal:c}),O.current=new Set,p.current=null,T(false);}}}function ft(a){let{acceptedDragTypes:e="all",isDisabled:o,onInsert:t,onRootDrop:g,onItemDrop:n,onReorder:v,onMove:d,shouldAcceptItemDrop:h,collection:K,selectionManager:T,onDropEnter:O,getDropOperation:p,onDrop:b}=a,[u,c]=useState(null),s=useRef(null),m=i=>{if(i.dropPosition==="before"){let l=K.getItem(i.key);return l&&l.prevKey!=null?{type:"item",key:l.prevKey,dropPosition:"after"}:null}else if(i.dropPosition==="after"){let l=K.getItem(i.key);return l&&l.nextKey!=null?{type:"item",key:l.nextKey,dropPosition:"before"}:null}return null},D=useCallback(i=>{let{target:l,types:f,allowedOperations:r,isInternal:y,draggingKeys:w}=i;if(o||!l)return "cancel";if(e==="all"||e.some(P=>f.has(P))){let P=t&&l.type==="item"&&!y&&(l.dropPosition==="before"||l.dropPosition==="after"),I=v&&l.type==="item"&&y&&(l.dropPosition==="before"||l.dropPosition==="after")&&yt(K,l,w),E=l.type!=="item"||l.dropPosition!=="on"||!h||h(l,f),C=d&&l.type==="item"&&y&&E,N=g&&l.type==="root"&&!y,x=n&&l.type==="item"&&l.dropPosition==="on"&&!(y&&l.key!=null&&w.has(l.key))&&E;if(b||P||I||C||N||x)return p?p(l,f,r):r[0]}return "cancel"},[o,K,e,p,t,g,n,h,v,d,b]);return {collection:K,selectionManager:T,isDisabled:o,target:u,setTarget(i){if(this.isDropTarget(i))return;let l=s.current;l&&typeof a.onDropExit=="function"&&a.onDropExit({type:"dropexit",x:0,y:0,target:l}),i&&typeof O=="function"&&O({type:"dropenter",x:0,y:0,target:i}),s.current=i??null,c(i??null);},isDropTarget(i){let l=s.current;return !l||!i?false:pe(i,l)?true:i?.type==="item"&&l?.type==="item"&&i.key!==l.key&&i.dropPosition!==l.dropPosition&&i.dropPosition!=="on"&&l.dropPosition!=="on"?pe(m(i),l)||pe(i,m(l)):false},getDropOperation(i){let{target:l,isInternal:f,draggingKeys:r}=i;if(f&&l.type==="item"&&r.size>0){if(r.has(l.key)&&l.dropPosition==="on")return "cancel";let y=l.key;for(;y!=null;){let P=K.getItem(y)?.parentKey;if(P!=null&&r.has(P))return "cancel";y=P??null;}}return D(i)}}}function pe(a,e){if(!a)return !e;switch(a.type){case "root":return e?.type==="root";case "item":return e?.type==="item"&&e?.key===a.key&&e?.dropPosition===a.dropPosition}}function yt(a,e,o){let t=a.getItem(e.key);for(let g of o)if(a.getItem(g)?.parentKey!==t?.parentKey)return false;return true}var se=class{collection;ref;layout;orientation;direction;constructor(e,o,t){this.collection=e,this.ref=o,this.layout=t?.layout||"stack",this.orientation=t?.orientation||"vertical",this.direction=t?.direction||"ltr";}getPrimaryStart(e){return this.orientation==="horizontal"?e.left:e.top}getPrimaryEnd(e){return this.orientation==="horizontal"?e.right:e.bottom}getSecondaryStart(e){return this.orientation==="horizontal"?e.top:e.left}getSecondaryEnd(e){return this.orientation==="horizontal"?e.bottom:e.right}getFlowStart(e){return this.layout==="stack"?this.getPrimaryStart(e):this.getSecondaryStart(e)}getFlowEnd(e){return this.layout==="stack"?this.getPrimaryEnd(e):this.getSecondaryEnd(e)}getFlowSize(e){return this.getFlowEnd(e)-this.getFlowStart(e)}getDropTargetFromPoint(e,o,t){if(this.collection[Symbol.iterator]().next().done||!this.ref.current)return {type:"root"};let g=this.ref.current.getBoundingClientRect(),n=this.orientation==="horizontal"?e:o,v=this.orientation==="horizontal"?o:e;n+=this.getPrimaryStart(g),v+=this.getSecondaryStart(g);let d=this.layout==="stack"?n:v,h=this.orientation==="horizontal"&&this.direction==="rtl",K=this.layout==="grid"&&this.orientation==="vertical"&&this.direction==="rtl",T=this.layout==="stack"?h:K,O=this.ref.current?.dataset.collection,p=this.ref.current.querySelectorAll(O?`[data-collection="${CSS.escape(O)}"]`:"[data-key]"),b=new Map,u=b$2(this.ref.current);for(let l of p)l instanceof u.HTMLElement&&l.dataset.key!=null&&b.set(l.dataset.key,l);let c=[...this.collection].filter(l=>l.type==="item");if(c.length<1)return {type:"root"};let s=0,m=c.length;for(;s<m;){let l=Math.floor((s+m)/2),f=c[l],r=b.get(String(f.key));if(!r)break;let y=r.getBoundingClientRect(),w=P=>{P?s=l+1:m=l;};if(n<this.getPrimaryStart(y))w(h);else if(n>this.getPrimaryEnd(y))w(!h);else if(v<this.getSecondaryStart(y))w(K);else if(v>this.getSecondaryEnd(y))w(!K);else {let P={type:"item",key:f.key,dropPosition:"on"};if(t(P))d<=this.getFlowStart(y)+5&&t({...P,dropPosition:"before"})?P.dropPosition=T?"after":"before":d>=this.getFlowEnd(y)-5&&t({...P,dropPosition:"after"})&&(P.dropPosition=T?"before":"after");else {let I=this.getFlowStart(y)+this.getFlowSize(y)/2;d<=I&&t({...P,dropPosition:"before"})?P.dropPosition=T?"after":"before":d>=I&&t({...P,dropPosition:"after"})&&(P.dropPosition=T?"before":"after");}return P}}let D=c[Math.min(s,c.length-1)];return g=b.get(String(D.key))?.getBoundingClientRect(),g&&(n<this.getPrimaryStart(g)||Math.abs(d-this.getFlowStart(g))<Math.abs(d-this.getFlowEnd(g)))?{type:"item",key:D.key,dropPosition:T?"after":"before"}:{type:"item",key:D.key,dropPosition:T?"before":"after"}}};export{tt as a,ie as b,rt as c,at as d,pt as e,Ze as f,gt as g,ft as h,se as i};
File without changes
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-22BJMDCA.mjs';import {a as a$1}from'./chunk-JDLUGVXG.mjs';import {b}from'./chunk-AUOQSTS5.mjs';import {breakpoints}from'@baseline-ui/tokens';import m,{useContext,useMemo,useCallback}from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function x(o){let{breakpoints:n=breakpoints}=useContext(a),r=useMemo(()=>({tablet:`screen and (min-width: ${n.tablet}px)`,desktop:`screen and (min-width: ${n.desktop}px)`}),[n]),s=useCallback(()=>{let e=b(typeof window>"u"?void 0:o),t=e.matchMedia(r.tablet);return e.matchMedia(r.desktop).matches?"desktop":t.matches?"tablet":"mobile"},[o,r]),[a$2,p]=m.useState(s);return a$1(()=>{let e=b(o),t=()=>{p(s());};return e.addEventListener("resize",t),t(),()=>{e.removeEventListener("resize",t);}},[o,s]),a$2}export{x as a};
@@ -0,0 +1,10 @@
1
+ import {a}from'./chunk-JDLUGVXG.mjs';import t from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function v(e,u,o){let n=t.useRef(null),s=t.useRef(o);a(()=>{s.current=o;});let i=JSON.stringify(u);return t.useEffect(()=>{if(!e)return;let r=new MutationObserver((f,l)=>{s.current(f,l);});return n.current=r,r.observe(e,u),()=>{r.disconnect(),n.current=null;}},[e,i]),n.current}export{v as a};