@baseline-ui/core 3.4.0 → 3.5.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 (265) hide show
  1. package/dist/Accordion.mjs +1 -1
  2. package/dist/ActionButton.mjs +1 -1
  3. package/dist/ActionGroup.mjs +1 -1
  4. package/dist/ActionIconButton.mjs +1 -1
  5. package/dist/Actionable.mjs +1 -1
  6. package/dist/AlertDialog.css +1 -1
  7. package/dist/AlertDialog.mjs +1 -1
  8. package/dist/AudioPlayer.css +1 -1
  9. package/dist/AudioPlayer.mjs +1 -1
  10. package/dist/Avatar.mjs +1 -1
  11. package/dist/ButtonSelect.mjs +1 -1
  12. package/dist/Calendar.mjs +1 -1
  13. package/dist/ColorInput.css +1 -1
  14. package/dist/ColorInput.mjs +1 -1
  15. package/dist/ColorSwatch.mjs +1 -1
  16. package/dist/ColorSwatchPicker.mjs +1 -1
  17. package/dist/ComboBox.mjs +1 -1
  18. package/dist/DateField.mjs +1 -1
  19. package/dist/Dialog.css +1 -1
  20. package/dist/Dialog.mjs +1 -1
  21. package/dist/Disclosure.mjs +1 -1
  22. package/dist/DomNodeRenderer.mjs +1 -1
  23. package/dist/Drawer.css +1 -1
  24. package/dist/Drawer.mjs +1 -1
  25. package/dist/Editor.css +1 -1
  26. package/dist/Editor.mjs +1 -1
  27. package/dist/FileInput.mjs +1 -1
  28. package/dist/FileList.mjs +1 -1
  29. package/dist/FileUploader.mjs +1 -1
  30. package/dist/FrameProvider.mjs +1 -1
  31. package/dist/FreehandCanvas.mjs +1 -1
  32. package/dist/GridList.mjs +1 -1
  33. package/dist/Icon.mjs +1 -1
  34. package/dist/ImageDropZone.mjs +1 -1
  35. package/dist/ImageGallery.css +1 -1
  36. package/dist/ImageGallery.mjs +1 -1
  37. package/dist/InlineAlert.mjs +1 -1
  38. package/dist/InlineToolbar.mjs +1 -1
  39. package/dist/Kbd.mjs +1 -1
  40. package/dist/Link.mjs +1 -1
  41. package/dist/ListBox.mjs +1 -1
  42. package/dist/Menu.mjs +1 -1
  43. package/dist/MessageFormat.mjs +1 -1
  44. package/dist/Modal.mjs +1 -1
  45. package/dist/NumberInput.mjs +1 -1
  46. package/dist/Pagination.mjs +1 -1
  47. package/dist/Panel.mjs +1 -1
  48. package/dist/PointPicker.mjs +1 -1
  49. package/dist/Popover.mjs +1 -1
  50. package/dist/Portal.mjs +1 -1
  51. package/dist/Preview.mjs +1 -1
  52. package/dist/RadioGroup.mjs +1 -1
  53. package/dist/ScrollControlButton.mjs +1 -1
  54. package/dist/SearchInput.mjs +1 -1
  55. package/dist/Select.mjs +1 -1
  56. package/dist/Slider.css +1 -1
  57. package/dist/Slider.mjs +1 -1
  58. package/dist/Stepper.mjs +1 -1
  59. package/dist/Table.css +1 -1
  60. package/dist/Table.mjs +1 -1
  61. package/dist/Tabs.mjs +1 -1
  62. package/dist/Tag.mjs +1 -1
  63. package/dist/TagGroup.mjs +1 -1
  64. package/dist/TaggedPagination.mjs +1 -1
  65. package/dist/TextInput.mjs +1 -1
  66. package/dist/ThemeProvider.mjs +1 -1
  67. package/dist/TimeField.mjs +1 -1
  68. package/dist/Toast.mjs +1 -1
  69. package/dist/ToggleButton.mjs +1 -1
  70. package/dist/ToggleIconButton.mjs +1 -1
  71. package/dist/Toolbar.mjs +1 -1
  72. package/dist/Tooltip.mjs +1 -1
  73. package/dist/TreeView.mjs +1 -1
  74. package/dist/UNSAFE_ListBox.mjs +1 -1
  75. package/dist/Virtualizer.mjs +1 -1
  76. package/dist/{chunk-LPI2NIDI.mjs → chunk-2AKHB7Y5.mjs} +1 -1
  77. package/dist/chunk-2M2LI4MI.mjs +10 -0
  78. package/dist/chunk-2WA3KB7H.mjs +10 -0
  79. package/dist/{chunk-KGS3UWPG.mjs → chunk-3KWSJRYK.mjs} +1 -1
  80. package/dist/{chunk-AM5FU4Y7.mjs → chunk-3M3WJHOI.mjs} +1 -1
  81. package/dist/{chunk-5KJF7IQN.mjs → chunk-3UC5V5E3.mjs} +1 -1
  82. package/dist/{chunk-QUQ4VYCN.mjs → chunk-43LOJ3SH.mjs} +1 -1
  83. package/dist/{chunk-MFB3SWO7.mjs → chunk-46RUOB4U.mjs} +11 -11
  84. package/dist/{chunk-AELTF2DE.mjs → chunk-4WVW4KEK.mjs} +1 -1
  85. package/dist/{chunk-BYDJXA5A.mjs → chunk-5G6JNQQR.mjs} +1 -1
  86. package/dist/{chunk-4EANTENO.mjs → chunk-5G7ABQYJ.mjs} +1 -1
  87. package/dist/{chunk-IUXXTORQ.mjs → chunk-5W67PVZQ.mjs} +1 -1
  88. package/dist/{chunk-CTSDHAAV.mjs → chunk-676DOXEK.mjs} +2 -2
  89. package/dist/{chunk-AD3MLX6G.mjs → chunk-6GMU63H2.mjs} +1 -1
  90. package/dist/chunk-6M7PJXEE.mjs +10 -0
  91. package/dist/chunk-6Q5PNIYZ.mjs +10 -0
  92. package/dist/{chunk-R7R7JDA3.mjs → chunk-7BE6MOPW.mjs} +1 -1
  93. package/dist/chunk-7EQIV4GX.mjs +10 -0
  94. package/dist/{chunk-DZDZZRWE.mjs → chunk-7MLFM55C.mjs} +1 -1
  95. package/dist/chunk-7XLBV46W.mjs +10 -0
  96. package/dist/{chunk-BHJCYKFJ.mjs → chunk-ABXTAFKP.mjs} +1 -1
  97. package/dist/{chunk-TUJLNJPJ.mjs → chunk-AFOW62QN.mjs} +2 -2
  98. package/dist/chunk-AMVX34SS.mjs +10 -0
  99. package/dist/{chunk-7TE4MFKC.mjs → chunk-AN26QORL.mjs} +1 -1
  100. package/dist/{chunk-OYSOPCTA.mjs → chunk-BA5OA5DY.mjs} +1 -1
  101. package/dist/{chunk-4W5VP4NV.mjs → chunk-BAIVRB2I.mjs} +1 -1
  102. package/dist/{chunk-K4TTZX4T.mjs → chunk-BET5GVGQ.mjs} +1 -1
  103. package/dist/{chunk-7L5UOGZA.mjs → chunk-BPW4QRPV.mjs} +2 -2
  104. package/dist/chunk-BSSLS6MF.mjs +10 -0
  105. package/dist/{chunk-UUTMZQQA.mjs → chunk-CENNHSIS.mjs} +3 -3
  106. package/dist/{chunk-W7OTSFZS.mjs → chunk-CTBCJZEG.mjs} +1 -1
  107. package/dist/chunk-D5VU5TED.mjs +11 -0
  108. package/dist/chunk-DAI7V4TE.mjs +10 -0
  109. package/dist/chunk-DO5YROCG.mjs +10 -0
  110. package/dist/{chunk-COHK4QQW.mjs → chunk-EGLD5KVP.mjs} +2 -2
  111. package/dist/{chunk-BXNNVZOQ.mjs → chunk-EL5OYHOX.mjs} +1 -1
  112. package/dist/{chunk-CLGLEEFO.mjs → chunk-FCKJCFMD.mjs} +1 -1
  113. package/dist/chunk-FGSVPRDN.mjs +10 -0
  114. package/dist/chunk-FNCHBVLF.mjs +10 -0
  115. package/dist/chunk-GFBRKKX4.mjs +10 -0
  116. package/dist/{chunk-QU34XSML.mjs → chunk-GLAMJIYO.mjs} +2 -2
  117. package/dist/{chunk-NRQSR3G7.mjs → chunk-HABKIEKC.mjs} +1 -1
  118. package/dist/{chunk-HI44JQA7.mjs → chunk-HPUUQKKH.mjs} +2 -2
  119. package/dist/chunk-HZM2XZP4.mjs +10 -0
  120. package/dist/{chunk-ZFGTKLCU.mjs → chunk-I7SMG6PT.mjs} +1 -1
  121. package/dist/{chunk-TH4XPZEO.mjs → chunk-IM3E5JL4.mjs} +1 -1
  122. package/dist/chunk-IROFSPEN.mjs +10 -0
  123. package/dist/chunk-JRCDMRIW.mjs +10 -0
  124. package/dist/{chunk-WHN2SEWO.mjs → chunk-KHDWTXGG.mjs} +2 -2
  125. package/dist/{chunk-SVTTHYTR.mjs → chunk-KW3BKIG4.mjs} +1 -1
  126. package/dist/{chunk-EUVUJQ2Z.mjs → chunk-LBHZV4BO.mjs} +1 -1
  127. package/dist/{chunk-QJYPCVSD.mjs → chunk-LKSUUT3M.mjs} +1 -1
  128. package/dist/chunk-LQ7PGSP4.mjs +10 -0
  129. package/dist/chunk-LQHFBXCW.mjs +10 -0
  130. package/dist/{chunk-MIF6BAPG.mjs → chunk-LSPDPDB6.mjs} +1 -1
  131. package/dist/chunk-MCN5JU6E.mjs +10 -0
  132. package/dist/chunk-MHAPHPNN.mjs +10 -0
  133. package/dist/{chunk-4AG2RUAZ.mjs → chunk-NMK4W6K3.mjs} +2 -2
  134. package/dist/chunk-O23QVPUT.mjs +10 -0
  135. package/dist/{chunk-WTAJLO6E.mjs → chunk-O6FPWOHR.mjs} +1 -1
  136. package/dist/chunk-OMWMNUTI.mjs +10 -0
  137. package/dist/{chunk-YU5NRJT6.mjs → chunk-ONBEVR2G.mjs} +1 -1
  138. package/dist/{chunk-XD43CVDT.mjs → chunk-OVJT5F2R.mjs} +1 -1
  139. package/dist/{chunk-YPEAGD2G.mjs → chunk-OWQRYRWF.mjs} +1 -1
  140. package/dist/{chunk-ZZIQF6XD.mjs → chunk-PLZ6ZFEO.mjs} +1 -1
  141. package/dist/{chunk-PD5ZXNGT.mjs → chunk-QMV2O57M.mjs} +2 -2
  142. package/dist/{chunk-C2VP5IEB.mjs → chunk-QWZBZ23U.mjs} +1 -1
  143. package/dist/{chunk-E22TWF63.mjs → chunk-QXXKOFWM.mjs} +2 -2
  144. package/dist/{chunk-SZN2J2ER.mjs → chunk-R6Q7UMQS.mjs} +1 -1
  145. package/dist/chunk-SI5WP6I7.mjs +10 -0
  146. package/dist/{chunk-36ZMHBG5.mjs → chunk-T6J7G3YL.mjs} +1 -1
  147. package/dist/chunk-TTVYMCU3.mjs +10 -0
  148. package/dist/chunk-TYKMNZJ4.mjs +11 -0
  149. package/dist/chunk-TZGK36KC.mjs +10 -0
  150. package/dist/chunk-UBLCUHRL.mjs +10 -0
  151. package/dist/{chunk-IVGNOQSQ.mjs → chunk-UH6QIGD3.mjs} +1 -1
  152. package/dist/chunk-UOWKAUCQ.mjs +10 -0
  153. package/dist/{chunk-OZMADP4Z.mjs → chunk-UPJHL37C.mjs} +2 -2
  154. package/dist/chunk-USUPPN73.mjs +10 -0
  155. package/dist/{chunk-XWJJ4V3O.mjs → chunk-UYAFH4CW.mjs} +2 -2
  156. package/dist/{chunk-KJ6ZSO3I.mjs → chunk-UYUYQFOW.mjs} +1 -1
  157. package/dist/chunk-VFO35ZLL.mjs +10 -0
  158. package/dist/chunk-VXZT2JR2.mjs +10 -0
  159. package/dist/{chunk-R3HHMCE5.mjs → chunk-WFYFHANE.mjs} +1 -1
  160. package/dist/{chunk-NYCG264A.mjs → chunk-X5ORCNAU.mjs} +2 -2
  161. package/dist/chunk-X5ZTXDQ4.mjs +10 -0
  162. package/dist/{chunk-BBYODNBO.mjs → chunk-X7CKWYUD.mjs} +1 -1
  163. package/dist/{chunk-6G7EUNZW.mjs → chunk-XAM3AXXK.mjs} +1 -1
  164. package/dist/{chunk-24R46WQW.mjs → chunk-XOS3JIQX.mjs} +1 -1
  165. package/dist/{chunk-TSHZ7JSR.mjs → chunk-XQC3DSTW.mjs} +1 -1
  166. package/dist/{chunk-VETO7WNN.mjs → chunk-Y3HXPORF.mjs} +2 -2
  167. package/dist/chunk-YDUKC7QS.mjs +10 -0
  168. package/dist/{chunk-P7BN7QDF.mjs → chunk-YFBMCK5O.mjs} +1 -1
  169. package/dist/{chunk-4RSUKS23.mjs → chunk-YYU46XNM.mjs} +2 -2
  170. package/dist/{chunk-Q6PGYMYI.mjs → chunk-Z3ZMWJSV.mjs} +1 -1
  171. package/dist/chunk-Z4QTH4TB.mjs +10 -0
  172. package/dist/{chunk-UNGYVWKZ.mjs → chunk-ZA2FH3MS.mjs} +1 -1
  173. package/dist/hooks/useContainerScopedRef.mjs +1 -1
  174. package/dist/hooks/useDevice.mjs +1 -1
  175. package/dist/hooks/useI18n.mjs +1 -1
  176. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  177. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  178. package/dist/hooks/useMedia.mjs +1 -1
  179. package/dist/hooks/useMutationObserver.mjs +1 -1
  180. package/dist/hooks/usePortalContainer.mjs +1 -1
  181. package/dist/hooks/usePreventFocus.mjs +1 -1
  182. package/dist/hooks/useResizeObserver.mjs +1 -1
  183. package/dist/hooks/useTextSelection.mjs +1 -1
  184. package/dist/index.css +1 -1
  185. package/dist/index.d.ts +65 -22
  186. package/dist/index.js +21 -21
  187. package/dist/index.mjs +1 -1
  188. package/dist/messageIds.mjs +1 -1
  189. package/dist/utils/colors.mjs +1 -1
  190. package/dist/utils/dom.mjs +1 -1
  191. package/dist/utils/isInShadowDOM.mjs +1 -1
  192. package/dist/utils/keyboards.mjs +1 -1
  193. package/dist/utils/strings.mjs +1 -1
  194. package/intl/ar.json +1 -0
  195. package/intl/cs.json +1 -0
  196. package/intl/cy.json +1 -0
  197. package/intl/da.json +1 -0
  198. package/intl/de.json +1 -0
  199. package/intl/el.json +1 -0
  200. package/intl/en-GB.json +1 -0
  201. package/intl/en.json +1 -0
  202. package/intl/es.json +1 -0
  203. package/intl/fi.json +1 -0
  204. package/intl/fr-CA.json +1 -0
  205. package/intl/fr.json +1 -0
  206. package/intl/he.json +1 -0
  207. package/intl/hr.json +1 -0
  208. package/intl/id.json +1 -0
  209. package/intl/it.json +1 -0
  210. package/intl/ja.json +1 -0
  211. package/intl/ko.json +1 -0
  212. package/intl/ms.json +1 -0
  213. package/intl/nb-NO.json +1 -0
  214. package/intl/nl.json +1 -0
  215. package/intl/pl.json +1 -0
  216. package/intl/pt-PT.json +1 -0
  217. package/intl/pt.json +1 -0
  218. package/intl/ru.json +1 -0
  219. package/intl/sk.json +1 -0
  220. package/intl/sl.json +1 -0
  221. package/intl/sv.json +1 -0
  222. package/intl/th.json +1 -0
  223. package/intl/tr.json +1 -0
  224. package/intl/uk.json +1 -0
  225. package/intl/zh-Hans.json +1 -0
  226. package/intl/zh-Hant.json +1 -0
  227. package/messages.json +4 -0
  228. package/package.json +4 -4
  229. package/sbom.json +6 -6
  230. package/dist/chunk-2F3CFR22.mjs +0 -10
  231. package/dist/chunk-2LFMBQKQ.mjs +0 -10
  232. package/dist/chunk-3BEG3MEX.mjs +0 -10
  233. package/dist/chunk-3BG6K2G2.mjs +0 -10
  234. package/dist/chunk-3KCSUNRV.mjs +0 -10
  235. package/dist/chunk-4JQUB53Q.mjs +0 -10
  236. package/dist/chunk-4MHBLLHV.mjs +0 -11
  237. package/dist/chunk-5BKC373Y.mjs +0 -10
  238. package/dist/chunk-5FK5AJ7A.mjs +0 -10
  239. package/dist/chunk-5SHHWKFM.mjs +0 -10
  240. package/dist/chunk-76DKF2SK.mjs +0 -10
  241. package/dist/chunk-7MMO7S3R.mjs +0 -10
  242. package/dist/chunk-AK7XHUQW.mjs +0 -10
  243. package/dist/chunk-DAS5QGJX.mjs +0 -10
  244. package/dist/chunk-DSV6CCI6.mjs +0 -10
  245. package/dist/chunk-F7PGMOQF.mjs +0 -10
  246. package/dist/chunk-FOKMDEP7.mjs +0 -10
  247. package/dist/chunk-FPFGTGUC.mjs +0 -10
  248. package/dist/chunk-IEOHIOGL.mjs +0 -10
  249. package/dist/chunk-IWZXZ5LU.mjs +0 -10
  250. package/dist/chunk-IXRSSEHQ.mjs +0 -10
  251. package/dist/chunk-J4OPD7OL.mjs +0 -10
  252. package/dist/chunk-K7VOXFSK.mjs +0 -10
  253. package/dist/chunk-MDE2FQHX.mjs +0 -10
  254. package/dist/chunk-MYJ733MN.mjs +0 -10
  255. package/dist/chunk-NJKSUI2F.mjs +0 -10
  256. package/dist/chunk-O4DA3TPW.mjs +0 -11
  257. package/dist/chunk-ONEE6UCM.mjs +0 -10
  258. package/dist/chunk-Q4SEEMIX.mjs +0 -10
  259. package/dist/chunk-R4MOUAJW.mjs +0 -10
  260. package/dist/chunk-U3T5JTZ7.mjs +0 -10
  261. package/dist/chunk-UDMNDUBO.mjs +0 -10
  262. package/dist/chunk-VGFPT43C.mjs +0 -10
  263. package/dist/chunk-VJUBKX3W.mjs +0 -10
  264. /package/dist/{chunk-RXSX2RKA.mjs → chunk-SBGZCLF4.mjs} +0 -0
  265. /package/dist/{chunk-DAN62T2M.mjs → chunk-TIGGKOJQ.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-CLGLEEFO.mjs';import {a as a$g,b as b$4}from'./chunk-DAN62T2M.mjs';import {a as a$j}from'./chunk-4I7K4CCG.mjs';import {a as a$h}from'./chunk-YF63IQQR.mjs';import {b,c as c$1}from'./chunk-DZDZZRWE.mjs';import {c as c$3}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-3BG6K2G2.mjs';import {a as a$i}from'./chunk-NUCSMH4S.mjs';import {a as a$c}from'./chunk-UFN2OAM2.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$f}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {a as a$k}from'./chunk-66CUIXA6.mjs';import {a as a$e}from'./chunk-Y2MIU76N.mjs';import {a as a$b}from'./chunk-4QBHQCCK.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {d}from'./chunk-HH4VLTF3.mjs';import {b as b$3,a as a$d}from'./chunk-4S4GGUSH.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {a as a$a,h,l}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$8}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a as a$9}from'./chunk-6ZQE5SHE.mjs';import {b as b$5}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {HelpIcon}from'@baseline-ui/icons/16';import Nr,{useMemo,useState,useCallback,useRef}from'react';import {flushSync}from'react-dom';import {themeVars}from'@baseline-ui/tokens';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {a as a$1,e}from'./chunk-FCKJCFMD.mjs';import {a as a$g,b as b$4}from'./chunk-TIGGKOJQ.mjs';import {a as a$j}from'./chunk-4I7K4CCG.mjs';import {a as a$h}from'./chunk-YF63IQQR.mjs';import {b,c as c$1}from'./chunk-7MLFM55C.mjs';import {c as c$3}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-VXZT2JR2.mjs';import {a as a$i}from'./chunk-NUCSMH4S.mjs';import {a as a$c}from'./chunk-UFN2OAM2.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$f}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {a as a$k}from'./chunk-66CUIXA6.mjs';import {a as a$e}from'./chunk-Y2MIU76N.mjs';import {a as a$b}from'./chunk-4QBHQCCK.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {d}from'./chunk-HH4VLTF3.mjs';import {b as b$3,a as a$d}from'./chunk-4S4GGUSH.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {a as a$a,h,l}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$8}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a as a$9}from'./chunk-6ZQE5SHE.mjs';import {b as b$5}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {HelpIcon}from'@baseline-ui/icons/16';import Mr,{useMemo,useState,useCallback,useRef}from'react';import {flushSync}from'react-dom';import {themeVars}from'@baseline-ui/tokens';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {a as a$1}from'./chunk-CLGLEEFO.mjs';import {a as a$g,b as b$4}from'./chu
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var ae={"ar-AE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0623\u062F\u0627\u0629 \u0627\u0646\u062A\u0642\u0627\u0621 \u0627\u0644\u0644\u0648\u0646",colorSwatch:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0623\u0644\u0648\u0627\u0646",transparent:"\u0634\u0641\u0627\u0641",twoDimensionalSlider:"\u0645\u064F\u0646\u0632\u0644\u0642 2D"},"bg-BG":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0437\u0430 \u0438\u0437\u0431\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0446\u0432\u044F\u0442",colorSwatch:"\u0446\u0432\u0435\u0442\u043D\u0430 \u043C\u043E\u0441\u0442\u0440\u0430",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u0435\u043D",twoDimensionalSlider:"2D \u043F\u043B\u044A\u0437\u0433\u0430\u0447"},"cs-CZ":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDb\u011Br barvy",colorSwatch:"barevn\xFD vzorek",transparent:"pr\u016Fhledn\xFD",twoDimensionalSlider:"2D posuvn\xEDk"},"da-DK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farvev\xE6lger",colorSwatch:"farvepr\xF8ve",transparent:"gennemsigtig",twoDimensionalSlider:"2D-skyder"},"de-DE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farbw\xE4hler",colorSwatch:"Farbfeld",transparent:"transparent",twoDimensionalSlider:"2D-Schieberegler"},"el-GR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03B1\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",colorSwatch:"\u03C7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03CC \u03B4\u03B5\u03AF\u03B3\u03BC\u03B1",transparent:"\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AD\u03C2",twoDimensionalSlider:"\u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03C4\u03B9\u03BA\u03CC 2D"},"en-US":{colorPicker:"Color picker",twoDimensionalSlider:"2D slider",colorNameAndValue:e=>`${e.name}: ${e.value}`,colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorSwatch:"color swatch",transparent:"transparent"},"es-ES":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de color",colorSwatch:"muestra de color",transparent:"transparente",twoDimensionalSlider:"Regulador 2D"},"et-EE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rvivalija",colorSwatch:"v\xE4rvin\xE4idis",transparent:"l\xE4bipaistev",twoDimensionalSlider:"2D-liugur"},"fi-FI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rimuokkain",colorSwatch:"v\xE4rimalli",transparent:"l\xE4pin\xE4kyv\xE4",twoDimensionalSlider:"2D-liukus\xE4\xE4din"},"fr-FR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\xA0: ${e.value}`,colorPicker:"S\xE9lecteur de couleurs",colorSwatch:"\xC9chantillon de couleurs",transparent:"Transparent",twoDimensionalSlider:"Curseur\xA02D"},"he-IL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u05D1\u05D5\u05D7\u05E8 \u05D4\u05E6\u05D1\u05E2\u05D9\u05DD",colorSwatch:"\u05D3\u05D5\u05D2\u05DE\u05D9\u05EA \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3",twoDimensionalSlider:"\u05DE\u05D7\u05D5\u05D5\u05DF \u05D3\u05D5 \u05DE\u05D9\u05DE\u05D3\u05D9"},"hr-HR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Odabir boje",colorSwatch:"uzorak boje",transparent:"transparentno",twoDimensionalSlider:"2D kliza\u010D"},"hu-HU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Sz\xEDnv\xE1laszt\xF3",colorSwatch:"sz\xEDnt\xE1r",transparent:"\xE1tl\xE1tsz\xF3",twoDimensionalSlider:"2D-cs\xFAszka"},"it-IT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selettore colore",colorSwatch:"campione di colore",transparent:"trasparente",twoDimensionalSlider:"Cursore 2D"},"ja-JP":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name} : ${e.value}`,colorPicker:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC",colorSwatch:"\u30AB\u30E9\u30FC\u30B9\u30A6\u30A9\u30C3\u30C1",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u30B9\u30E9\u30A4\u30C0\u30FC"},"ko-KR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\uC0C9\uC0C1 \uD53C\uCEE4",colorSwatch:"\uC0C9\uC0C1 \uACAC\uBCF8",transparent:"\uD22C\uBA85\uB3C4",twoDimensionalSlider:"2D \uC2AC\uB77C\uC774\uB354"},"lt-LT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Spalv\u0173 parinkiklis",colorSwatch:"spalv\u0173 pavyzdys",transparent:"skaidrus",twoDimensionalSlider:"2D slankiklis"},"lv-LV":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kr\u0101su atlas\u012Bt\u0101js",colorSwatch:"kr\u0101su paraugs",transparent:"caursp\u012Bd\u012Bgs",twoDimensionalSlider:"2D sl\u012Bdnis"},"nb-NO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Fargevelger",colorSwatch:"fargekart",transparent:"gjennomsiktig",twoDimensionalSlider:"2D-glidebryter"},"nl-NL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kleurkiezer",colorSwatch:"kleurstaal",transparent:"transparant",twoDimensionalSlider:"2D-schuifregelaar"},"pl-PL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Pr\xF3bnik kolor\xF3w",colorSwatch:"pr\xF3bka koloru",transparent:"przezroczysty",twoDimensionalSlider:"Suwak 2D"},"pt-BR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cores",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"pt-PT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cor",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"ro-RO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de culori",colorSwatch:"specimen de culoare",transparent:"transparent",twoDimensionalSlider:"Glisor 2D"},"ru-RU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",colorSwatch:"\u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043E\u0431\u0440\u0430\u0437\u0435\u0446",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439",twoDimensionalSlider:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A 2D"},"sk-SK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDber farieb",colorSwatch:"vzorkovn\xEDk farieb",transparent:"transparentn\xFD",twoDimensionalSlider:"2D jazdec"},"sl-SI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Izbirnik barv",colorSwatch:"barvna paleta",transparent:"prozorno",twoDimensionalSlider:"2D drsnik"},"sr-SP":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Bira\u010D boja",colorSwatch:"Uzorak boje",transparent:"providno",twoDimensionalSlider:"2D kliza\u010D"},"sv-SE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"F\xE4rgv\xE4ljaren",colorSwatch:"f\xE4rgruta",transparent:"genomskinlig",twoDimensionalSlider:"2D-reglage"},"tr-TR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Renk Se\xE7ici",colorSwatch:"renk \xF6rne\u011Fi",transparent:"saydam",twoDimensionalSlider:"2D s\xFCrg\xFC"},"uk-UA":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0456\u0442\u0440\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",colorSwatch:"\u0437\u0440\u0430\u0437\u043E\u043A \u043A\u043E\u043B\u044C\u043E\u0440\u0443",transparent:"\u043F\u0440\u043E\u0437\u043E\u0440\u0438\u0439",twoDimensionalSlider:"\u041F\u043E\u0432\u0437\u0443\u043D\u043E\u043A 2D"},"zh-CN":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u62FE\u8272\u5668",colorSwatch:"\u989C\u8272\u8272\u677F",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u5757"},"zh-TW":{colorInputLabel:e=>`${e.label}\uFF0C${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u6AA2\u8272\u5668",colorSwatch:"\u8272\u7968",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u687F"}};var Ge=e=>[0,60,120,180,240,300,360].map(r=>e.withChannelValue("hue",r).toString("css")).join(", "),Ye=e=>`${e.withChannelValue("saturation",0)}, transparent`,Pr={hue:Ge,saturation:Ye,lightness:()=>"black, transparent, white"},wr={hue:Ge,saturation:Ye,brightness:()=>"black, transparent"};function Je({direction:e,state:r,zChannel:l,xChannel:t,yChannel:a}){return useMemo(()=>{let y=e==="rtl"?"left":"right",C={},S=r.value.getChannelValue(l);switch(r.value.getColorSpace()){case "rgb":{let i=a$1("rgb(0, 0, 0)");C={background:[`linear-gradient(to ${y}, ${i.withChannelValue(t,0)}, ${i.withChannelValue(t,255)})`,`linear-gradient(to top, ${i.withChannelValue(a,0)}, ${i.withChannelValue(a,255)})`,i.withChannelValue(l,S)].join(","),backgroundBlendMode:"screen"};break}case "hsl":{let i=r.value.getColorChannels(),s=a$1("hsl(0, 100%, 50%)").withChannelValue(l,S),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${Pr[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),C={background:c.join(", ")};break}case "hsb":{let i=r.value.getColorChannels(),s=a$1("hsb(0, 100%, 100%)").withChannelValue(l,S),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${wr[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),C={background:c.join(", ")};break}}let{x:f,y:d}=r.getThumbPosition();e==="rtl"&&(f=1-f);let z={forcedColorAdjust:"none"};return {colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...z,...C}},thumbStyleProps:{style:{position:"absolute",left:`${f*100}%`,top:`${d*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",...z}}}},[e,r,l,t,a])}function Qe(e,r){let{isDisabled:l$1,inputXRef:t,inputYRef:a,containerRef:u,"aria-label":y,xName:C,yName:S,form:f}=e,d=b$2(ae,"@react-aria/color"),{addGlobalListener:z,removeGlobalListener:i}=a$9(),{direction:s,locale:c$1}=b$1(),[n,x]=useState(null),b=useCallback((o=t)=>{o.current&&a$a(o.current);},[t]);a$b(t,r.defaultValue,r.setValue);let[v,h$1]=useState(false),[I,g]=useState(false),{xChannel:_,yChannel:m,zChannel:$}=r.channels,j$1=r.xChannelStep,N=r.yChannelStep,P=useRef(null),O=(o,p,A)=>{r.setDragging(true),h$1(true),o(),r.setDragging(false),b(p),x(A);},{keyboardProps:L}=j({shortcuts:{PageUp:()=>O(()=>{r.incrementY(r.yChannelPageStep);},a,"y"),PageDown:()=>O(()=>{r.decrementY(r.yChannelPageStep);},a,"y"),Home:()=>O(()=>{s==="rtl"?r.incrementX(r.xChannelPageStep):r.decrementX(r.xChannelPageStep);},t,"x"),End:()=>O(()=>{s==="rtl"?r.decrementX(r.xChannelPageStep):r.incrementX(r.xChannelPageStep);},t,"x")},allowRepeats:true}),Y={onMoveStart(){P.current=null,r.setDragging(true);},onMove({deltaX:o,deltaY:p,pointerType:A,shiftKey:J}){let{incrementX:U,decrementX:ue,incrementY:se,decrementY:T,xChannelPageStep:q,xChannelStep:B,yChannelPageStep:ge,yChannelStep:ke,getThumbPosition:vr,setColorFromPoint:Sr}=r;P.current==null&&(P.current=vr());let{width:xr,height:gr}=u.current?.getBoundingClientRect()||{width:0,height:0},Pe=o!==0||p!==0;if(A==="keyboard"){let we=J&&q>B?q:B,Ae=J&&ge>ke?ge:ke;o>0&&s==="ltr"||o<0&&s==="rtl"?U(we):o<0&&s==="ltr"||o>0&&s==="rtl"?ue(we):p>0?T(Ae):p<0&&se(Ae),h$1(Pe),n=Pe&&Math.abs(p)>Math.abs(o)?"y":"x",x(n);}else P.current.x+=(s==="rtl"?-1:1)*o/xr,P.current.y+=p/gr,Sr(P.current.x,P.current.y);},onMoveEnd(){M.current=false,r.setDragging(false),b(n==="x"?t:a);}},{moveProps:ur}=a$c(Y),{focusWithinProps:sr}=b$3({onFocusWithinChange:o=>{o||(h$1(false),g(false));}}),F=useRef(void 0),M=useRef(false),{moveProps:cr}=a$c({onMoveStart(){M.current&&Y.onMoveStart();},onMove(o){M.current&&Y.onMove(o);},onMoveEnd(){M.current&&Y.onMoveEnd();}}),ie=o=>{let p=b$5(u.current);r.isDragging||(F.current=o,h$1(false),b(),r.setDragging(true),typeof PointerEvent<"u"?z(p,"pointerup",R,false):(z(p,"mouseup",R,false),z(p,"touchend",R,false)));},R=o=>{let p=b$5(u.current);(o.pointerId??o.changedTouches?.[0].identifier)===F.current&&(h$1(false),b(),r.setDragging(false),F.current=void 0,M.current=false,typeof PointerEvent<"u"?i(p,"pointerup",R,false):(i(p,"mouseup",R,false),i(p,"touchend",R,false)));},pe=(o,p,A,J)=>{let U=o.getBoundingClientRect(),{width:ue,height:se}=U,T=(A-U.x)/ue,q=(J-U.y)/se;s==="rtl"&&(T=1-T);let B=b$5(u.current);T>=0&&T<=1&&q>=0&&q<=1&&!r.isDragging&&F.current===void 0&&(M.current=true,h$1(false),F.current=p,r.setColorFromPoint(T,q),b(),r.setDragging(true),typeof PointerEvent<"u"?z(B,"pointerup",E,false):(z(B,"mouseup",E,false),z(B,"touchend",E,false)));},E=o=>{let p=o.pointerId??o.changedTouches?.[0].identifier;if(M.current&&p===F.current){M.current=false,h$1(false),F.current=void 0,r.setDragging(false),b();let A=b$5(u.current);typeof PointerEvent<"u"?i(A,"pointerup",E,false):(i(A,"mouseup",E,false),i(A,"touchend",E,false));}},dr=l$1?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||pe(o.currentTarget,o.pointerId,o.clientX,o.clientY);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||pe(o.currentTarget,void 0,o.clientX,o.clientY);},onTouchStart:o=>{pe(o.currentTarget,o.changedTouches[0].identifier,o.changedTouches[0].clientX,o.changedTouches[0].clientY);}}},cr),mr=l$1?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||ie(o.pointerId);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||ie(void 0);},onTouchStart:o=>{ie(o.changedTouches[0].identifier);}}},sr,L,ur),{focusProps:yr}=a$d({onFocus:()=>{x("x");}}),{focusProps:br}=a$d({onFocus:()=>{x("y");}}),Ce=o=>{let{target:p}=o;g(true),p===t.current?r.setXValue(parseFloat(p.value)):p===a.current&&r.setYValue(parseFloat(p.value));},W=h()||l(),w=r.getDisplayColor(),ve=useCallback(o=>`${I||v?d.format("colorNameAndValue",{name:w.getChannelName(o,c$1),value:w.formatChannelValue(o,c$1)}):[d.format("colorNameAndValue",{name:w.getChannelName(o,c$1),value:w.formatChannelValue(o,c$1)}),d.format("colorNameAndValue",{name:w.getChannelName(o===m?_:m,c$1),value:w.formatChannelValue(o===m?_:m,c$1)}),d.format("colorNameAndValue",{name:w.getChannelName($,c$1),value:w.formatChannelValue($,c$1)})].join(", ")}, ${w.getColorName(c$1)}`,[c$1,w,d,I,v,_,m,$]),H=d.format("colorPicker"),_r=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),fr=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),zr=a$e({...e,"aria-label":y?`${y}, ${H}`:void 0},W?H:void 0),Se=d.format("twoDimensionalSlider"),{visuallyHiddenProps:xe}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:hr,thumbStyleProps:Cr}=Je({direction:s,state:r,xChannel:_,yChannel:m,zChannel:$});return {colorAreaProps:{...zr,...dr,...hr,role:"group"},thumbProps:{...mr,...Cr,role:"presentation"},xInputProps:{..._r,...xe,...yr,type:"range",min:r.value.getChannelRange(_).minValue,max:r.value.getChannelRange(_).maxValue,step:j$1,"aria-roledescription":Se,"aria-valuetext":ve(_),"aria-orientation":"horizontal","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(_),name:C,form:f,tabIndex:W||!n||n==="x"?void 0:-1,"aria-hidden":W||!n||n==="x"||v?void 0:"true",onChange:Ce},yInputProps:{...fr,...xe,...br,type:"range",min:r.value.getChannelRange(m).minValue,max:r.value.getChannelRange(m).maxValue,step:N,"aria-roledescription":Se,"aria-valuetext":ve(m),"aria-orientation":"vertical","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(m),name:S,form:f,tabIndex:W||n==="y"?void 0:-1,"aria-hidden":W||n==="y"||v?void 0:"true",onChange:Ce}}}function er(e,r){let{trackRef:l,inputRef:t,orientation:a,channel:u,"aria-label":y,name:C,form:S}=e,{locale:f,direction:d}=b$1();!e.label&&!y&&!e["aria-labelledby"]&&(y=r.value.getChannelName(u,f));let{groupProps:z,trackProps:i,labelProps:s,outputProps:c$1}=a$g({...e,"aria-label":y},r,l),{inputProps:n,thumbProps:x}=b$4({index:0,orientation:a,isDisabled:e.isDisabled,name:C,form:S,trackRef:l,inputRef:t},r),b=r.getDisplayColor(),v=()=>{let g;switch(a==="vertical"?g="top":d==="ltr"?g="right":g="left",u){case "hue":{let _=[0,60,120,180,240,300,360].map(m=>b.withChannelValue("hue",m).toString("css")).join(", ");return `linear-gradient(to ${g}, ${_})`}case "lightness":{let _=r.getThumbMinValue(0),m=r.getThumbMaxValue(0),$=b.withChannelValue(u,_).toString("css"),j=b.withChannelValue(u,(m-_)/2).toString("css"),N=b.withChannelValue(u,m).toString("css");return `linear-gradient(to ${g}, ${$}, ${j}, ${N})`}case "saturation":case "brightness":case "red":case "green":case "blue":case "alpha":{let _=b.withChannelValue(u,r.getThumbMinValue(0)).toString("css"),m=b.withChannelValue(u,r.getThumbMaxValue(0)).toString("css");return `linear-gradient(to ${g}, ${_}, ${m})`}default:throw new Error("Unknown color channel: "+u)}},h={forcedColorAdjust:"none"};u==="hue"?n["aria-valuetext"]+=`, ${b.getHueName(f)}`:u!=="alpha"&&(n["aria-valuetext"]+=`, ${b.getColorName(f)}`);let{visuallyHiddenProps:I}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}});return {trackProps:{...c(z,i),style:{...i.style,...h,background:v()}},inputProps:{...n,style:{...n.style,...I.style}},thumbProps:{...x,style:{...x.style,...h}},labelProps:s,outputProps:c$1}}function rr(e,r,l){let{isDisabled:t,isReadOnly:a,isRequired:u,isWheelDisabled:y,validationBehavior:C="aria",onKeyDown:S,onKeyUp:f}=e,{colorValue:d,inputValue:z,increment:i,decrement:s,incrementToMax:c$1,decrementToMin:n,commit:x,commitValidation:b}=r,v=c$2(),{spinButtonProps:h}=a$h({isDisabled:t,isReadOnly:a,isRequired:u,maxValue:16777215,minValue:0,onIncrement:i,onIncrementToMax:c$1,onDecrement:s,onDecrementToMin:n,value:d?d.toHexInt():void 0,textValue:d?d.toString("hex"):void 0}),[I,g]=useState(false),{focusWithinProps:_}=b$3({isDisabled:t,onFocusWithinChange:g}),m=useCallback(L=>{Math.abs(L.deltaY)<=Math.abs(L.deltaX)||(L.deltaY>0?i():L.deltaY<0&&s());},[s,i]);a$i({onScroll:m,isDisabled:y||t||a||!I},l);let{keyboardProps:j$1}=j({isDisabled:t||a,shortcuts:{Enter:()=>(flushSync(()=>{x();}),b(),{shouldPreventDefault:false})},onKeyDown:S,onKeyUp:f}),N=L=>{r.validate(L)&&r.setInputValue(L);},{inputProps:P,...O}=a$j({...e,id:v,value:z,defaultValue:"!",validate:void 0,[c$3]:r,type:"text",autoComplete:"off",onChange:N,onKeyDown:void 0,onKeyUp:void 0},r,l);return a$b(l,r.defaultColorValue,r.setColorValue),P=c(j$1,P,h,_,{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false",onBlur:x}),C==="native"&&(P["aria-required"]=void 0),{inputProps:P,...O}}function ne(e){let{color:r,colorName:l}=e,t=r||"#fff0",a=useMemo(()=>typeof t=="string"?a$1(t):t,[t]),{locale:u}=b$1(),y=a$8(e,{labelable:true}),C=b$2(ae,"@react-aria/color"),S=c$2(e.id);return l||(l=a.getChannelValue("alpha")===0?C.format("transparent"):a.getColorName(u)),{colorSwatchProps:{...y,role:"img","aria-roledescription":C.format("colorSwatch"),"aria-label":[l,e["aria-label"]||""].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]?`${S} ${e["aria-labelledby"]}`:void 0,id:S,style:{backgroundColor:a.toString("css"),forcedColorAdjust:"none"}},color:a||null}}var al="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6m3",nl="_1dbkl5e",il=a({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6me _1yep5z6m6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ey _1yep5z6m5 _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup82 _1yep5z611l"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),pl="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1",ul=a({defaultClassName:"_1dbkl50 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6dy _1yep5z6ez",variantClassNames:{labelPosition:{top:"_1yep5z6oy _1yep5z6oz _1yep5z6p0",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),sl="_1dbkl5l _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z69f _1yep5z69g _1yep5z69h",cl="_1dbkl5f z9nup86",dl="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv",or="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6m6",ml="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6dy _1yep5z6ez _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1",yl=a({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g9",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6nm _1yep5z6nn _1yep5z6no"}},defaultVariants:{},compoundVariants:[]}),bl="_1dbkl5v _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",_l=a({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6mf _1yep5z6hg _1yep5z6m6 _1yep5z6ey _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z613w"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z618m"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocused:false},"_1yep5z61qj"]]}),fl=a({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f9 _1yep5z6m5 _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isHovered:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z618s _1yep5z618q _1yep5z618t _1yep5z614w"},isDisabled:{true:"_1yep5z611u"}},defaultVariants:{},compoundVariants:[]}),zl="_1dbkl5g",hl="_1dbkl5u",Cl="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h",vl="_1dbkl5x",Sl="_1dbkl5w",xl="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n",gl=a({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ma _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mf _1yep5z6mi",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z618q _1yep5z614w _1yep5z618s"}},defaultVariants:{},compoundVariants:[]}),kl="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6iw _1yep5z6ix _1yep5z6iy";var Vl=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Il=a$1("#000000").toFormat("hsla"),_e="hsla",fe="hexa";function Ir(e){let r=document.createElement("canvas").getContext("2d");return a$k(r,"Failed to get canvas context"),r.fillStyle=e,r.fillStyle}function jl(e){if(typeof e=="string")try{return a$1(e).toFormat(_e)}catch{return a$1(Ir(e)).toFormat(_e)}else if(e)return e.toFormat(_e);return null}function Nl(e,r){return e?.getChannelValue("alpha")?r?.toString(fe)===e.toString(fe):!r?.getChannelValue("alpha")}function Ml(e,r,l){return r?.label?r.label:e?.getChannelValue("alpha")===0?l:e?.toString("rgba")}var ze="NONE";function Fl(e,r){let l=r?.map(a=>({id:a$1(a.color).toString(fe),label:a.label}))||[],t={id:ze,label:e};return [...l,t]}var Tl=(e,{optionProps:r,isFocusVisible:l,isSelected:t},a)=>(a$k(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...r,ref:a,className:or,children:jsx(he,{color:e.value.id,isFocusVisible:l,isSelected:t,"aria-label":e.value.label,isInteractive:true})})),tr=(e,r=4)=>{let l=e.getChannelValue("alpha")===0,t=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:l?t:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${t}`,backgroundSize:`${r}px ${r}px`}};var ar=a({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m0 _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv z9nup8a",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618v"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isFocusVisible:true},"_1344e9q6"],[{isSelected:true,isFocusVisible:true},"_1344e9q7 _1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve"],[{isSelected:true,isDisabled:true},"_1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve _1yep5z61rp"],[{isHovered:true,isSelected:false},"_1yep5z61ve _1yep5z61vb _1yep5z61v9 _1yep5z61rj"]]}),nr="_1yep5z6fa",ir="_1344e9q9 _1yep5z6fp";var he=Nr.forwardRef(({color:e,isFocusVisible:r,isSelected:l,isInteractive:t,isDisabled:a,style:u,className:y,id:C,tooltip:S,isIndeterminate:f,indeterminateIcon:d$1=HelpIcon,noneLabel:z,"data-block-id":i,"data-block-class":s,...c$1},n)=>{let x=e&&e!==ze&&(typeof e=="string"?a$1(e):e),{formatMessage:b$1}=b(),v=!x,{colorSwatchProps:h}=ne({color:v?"#000000":e}),{hoverProps:I,isHovered:g}=a$2({isDisabled:a||!t}),_=a$3({"data-focus-visible":r,"data-selected":l,"data-hovered":g,"data-block-id":i,"data-block-class":s,"data-disabled":a,"data-interactive":t,"data-indeterminate":f}),m=v?z??b$1(pr.none):h["aria-label"],$=c$1["aria-label"]??m,{tooltipProps:j}=a$4({tooltip:S,label:$}),N=jsx("div",{...c(I,_,v?{}:h),style:u,"aria-label":v?z??b$1(pr.none):h["aria-label"],role:"img",className:a$6(ar({removeBlendMode:v,isFocusVisible:r,isDisabled:!!a,isSelected:!!l,isHovered:g}),"BaselineUI-ColorSwatch",y),ref:n,id:C,...c$1,children:jsxs(a$5,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:x&&!f?tr(x,4):void 0,children:[v&&!f?jsx("div",{className:ir}):null,f&&d$1?jsx(d$1,{role:"presentation",size:16,className:nr,"aria-hidden":"true"}):null]})});return j&&!a?jsx(a$7,{...j,children:jsx(d,{children:N})}):N});he.displayName="ColorSwatch";var pr=c$1({none:{id:"bui.colorSwatch.none",defaultMessage:"None"}});export{_e as A,fe as B,jl as C,Nl as D,Ml as E,ze as F,Fl as G,Tl as H,he as I,Qe as a,rr as b,er as c,al as d,nl as e,il as f,pl as g,ul as h,sl as i,cl as j,dl as k,ml as l,yl as m,bl as n,_l as o,fl as p,zl as q,hl as r,Cl as s,vl as t,Sl as u,xl as v,gl as w,kl as x,Vl as y,Il as z};
10
+ var ne={"ar-AE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0623\u062F\u0627\u0629 \u0627\u0646\u062A\u0642\u0627\u0621 \u0627\u0644\u0644\u0648\u0646",colorSwatch:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0623\u0644\u0648\u0627\u0646",transparent:"\u0634\u0641\u0627\u0641",twoDimensionalSlider:"\u0645\u064F\u0646\u0632\u0644\u0642 2D"},"bg-BG":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0437\u0430 \u0438\u0437\u0431\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0446\u0432\u044F\u0442",colorSwatch:"\u0446\u0432\u0435\u0442\u043D\u0430 \u043C\u043E\u0441\u0442\u0440\u0430",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u0435\u043D",twoDimensionalSlider:"2D \u043F\u043B\u044A\u0437\u0433\u0430\u0447"},"cs-CZ":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDb\u011Br barvy",colorSwatch:"barevn\xFD vzorek",transparent:"pr\u016Fhledn\xFD",twoDimensionalSlider:"2D posuvn\xEDk"},"da-DK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farvev\xE6lger",colorSwatch:"farvepr\xF8ve",transparent:"gennemsigtig",twoDimensionalSlider:"2D-skyder"},"de-DE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farbw\xE4hler",colorSwatch:"Farbfeld",transparent:"transparent",twoDimensionalSlider:"2D-Schieberegler"},"el-GR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03B1\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",colorSwatch:"\u03C7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03CC \u03B4\u03B5\u03AF\u03B3\u03BC\u03B1",transparent:"\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AD\u03C2",twoDimensionalSlider:"\u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03C4\u03B9\u03BA\u03CC 2D"},"en-US":{colorPicker:"Color picker",twoDimensionalSlider:"2D slider",colorNameAndValue:e=>`${e.name}: ${e.value}`,colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorSwatch:"color swatch",transparent:"transparent"},"es-ES":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de color",colorSwatch:"muestra de color",transparent:"transparente",twoDimensionalSlider:"Regulador 2D"},"et-EE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rvivalija",colorSwatch:"v\xE4rvin\xE4idis",transparent:"l\xE4bipaistev",twoDimensionalSlider:"2D-liugur"},"fi-FI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rimuokkain",colorSwatch:"v\xE4rimalli",transparent:"l\xE4pin\xE4kyv\xE4",twoDimensionalSlider:"2D-liukus\xE4\xE4din"},"fr-FR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\xA0: ${e.value}`,colorPicker:"S\xE9lecteur de couleurs",colorSwatch:"\xC9chantillon de couleurs",transparent:"Transparent",twoDimensionalSlider:"Curseur\xA02D"},"he-IL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u05D1\u05D5\u05D7\u05E8 \u05D4\u05E6\u05D1\u05E2\u05D9\u05DD",colorSwatch:"\u05D3\u05D5\u05D2\u05DE\u05D9\u05EA \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3",twoDimensionalSlider:"\u05DE\u05D7\u05D5\u05D5\u05DF \u05D3\u05D5 \u05DE\u05D9\u05DE\u05D3\u05D9"},"hr-HR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Odabir boje",colorSwatch:"uzorak boje",transparent:"transparentno",twoDimensionalSlider:"2D kliza\u010D"},"hu-HU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Sz\xEDnv\xE1laszt\xF3",colorSwatch:"sz\xEDnt\xE1r",transparent:"\xE1tl\xE1tsz\xF3",twoDimensionalSlider:"2D-cs\xFAszka"},"it-IT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selettore colore",colorSwatch:"campione di colore",transparent:"trasparente",twoDimensionalSlider:"Cursore 2D"},"ja-JP":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name} : ${e.value}`,colorPicker:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC",colorSwatch:"\u30AB\u30E9\u30FC\u30B9\u30A6\u30A9\u30C3\u30C1",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u30B9\u30E9\u30A4\u30C0\u30FC"},"ko-KR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\uC0C9\uC0C1 \uD53C\uCEE4",colorSwatch:"\uC0C9\uC0C1 \uACAC\uBCF8",transparent:"\uD22C\uBA85\uB3C4",twoDimensionalSlider:"2D \uC2AC\uB77C\uC774\uB354"},"lt-LT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Spalv\u0173 parinkiklis",colorSwatch:"spalv\u0173 pavyzdys",transparent:"skaidrus",twoDimensionalSlider:"2D slankiklis"},"lv-LV":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kr\u0101su atlas\u012Bt\u0101js",colorSwatch:"kr\u0101su paraugs",transparent:"caursp\u012Bd\u012Bgs",twoDimensionalSlider:"2D sl\u012Bdnis"},"nb-NO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Fargevelger",colorSwatch:"fargekart",transparent:"gjennomsiktig",twoDimensionalSlider:"2D-glidebryter"},"nl-NL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kleurkiezer",colorSwatch:"kleurstaal",transparent:"transparant",twoDimensionalSlider:"2D-schuifregelaar"},"pl-PL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Pr\xF3bnik kolor\xF3w",colorSwatch:"pr\xF3bka koloru",transparent:"przezroczysty",twoDimensionalSlider:"Suwak 2D"},"pt-BR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cores",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"pt-PT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cor",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"ro-RO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de culori",colorSwatch:"specimen de culoare",transparent:"transparent",twoDimensionalSlider:"Glisor 2D"},"ru-RU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",colorSwatch:"\u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043E\u0431\u0440\u0430\u0437\u0435\u0446",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439",twoDimensionalSlider:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A 2D"},"sk-SK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDber farieb",colorSwatch:"vzorkovn\xEDk farieb",transparent:"transparentn\xFD",twoDimensionalSlider:"2D jazdec"},"sl-SI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Izbirnik barv",colorSwatch:"barvna paleta",transparent:"prozorno",twoDimensionalSlider:"2D drsnik"},"sr-SP":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Bira\u010D boja",colorSwatch:"Uzorak boje",transparent:"providno",twoDimensionalSlider:"2D kliza\u010D"},"sv-SE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"F\xE4rgv\xE4ljaren",colorSwatch:"f\xE4rgruta",transparent:"genomskinlig",twoDimensionalSlider:"2D-reglage"},"tr-TR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Renk Se\xE7ici",colorSwatch:"renk \xF6rne\u011Fi",transparent:"saydam",twoDimensionalSlider:"2D s\xFCrg\xFC"},"uk-UA":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0456\u0442\u0440\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",colorSwatch:"\u0437\u0440\u0430\u0437\u043E\u043A \u043A\u043E\u043B\u044C\u043E\u0440\u0443",transparent:"\u043F\u0440\u043E\u0437\u043E\u0440\u0438\u0439",twoDimensionalSlider:"\u041F\u043E\u0432\u0437\u0443\u043D\u043E\u043A 2D"},"zh-CN":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u62FE\u8272\u5668",colorSwatch:"\u989C\u8272\u8272\u677F",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u5757"},"zh-TW":{colorInputLabel:e=>`${e.label}\uFF0C${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u6AA2\u8272\u5668",colorSwatch:"\u8272\u7968",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u687F"}};var Ye=e=>[0,60,120,180,240,300,360].map(r=>e.withChannelValue("hue",r).toString("css")).join(", "),Je=e=>`${e.withChannelValue("saturation",0)}, transparent`,wr={hue:Ye,saturation:Je,lightness:()=>"black, transparent, white"},Ar={hue:Ye,saturation:Je,brightness:()=>"black, transparent"};function Ze({direction:e,state:r,zChannel:l,xChannel:t,yChannel:a}){return useMemo(()=>{let y=e==="rtl"?"left":"right",C={},g=r.value.getChannelValue(l);switch(r.value.getColorSpace()){case "rgb":{let i=a$1("rgb(0, 0, 0)");C={background:[`linear-gradient(to ${y}, ${i.withChannelValue(t,0)}, ${i.withChannelValue(t,255)})`,`linear-gradient(to top, ${i.withChannelValue(a,0)}, ${i.withChannelValue(a,255)})`,i.withChannelValue(l,g)].join(","),backgroundBlendMode:"screen"};break}case "hsl":{let i=r.value.getColorChannels(),s=a$1("hsl(0, 100%, 50%)").withChannelValue(l,g),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${wr[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),C={background:c.join(", ")};break}case "hsb":{let i=r.value.getColorChannels(),s=a$1("hsb(0, 100%, 100%)").withChannelValue(l,g),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${Ar[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),C={background:c.join(", ")};break}}let{x:f,y:d}=r.getThumbPosition();e==="rtl"&&(f=1-f);let z={forcedColorAdjust:"none"};return {colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...z,...C}},thumbStyleProps:{style:{position:"absolute",left:`${f*100}%`,top:`${d*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",...z}}}},[e,r,l,t,a])}function er(e,r){let{isDisabled:l$1,inputXRef:t,inputYRef:a,containerRef:u,"aria-label":y,xName:C,yName:g,form:f}=e,d=b$2(ne,"@react-aria/color"),{addGlobalListener:z,removeGlobalListener:i}=a$9(),{direction:s,locale:c$1}=b$1(),[n,v]=useState(null),b=useCallback((o=t)=>{o.current&&a$a(o.current);},[t]);a$b(t,r.defaultValue,r.setValue);let[S,h$1]=useState(false),[I,x]=useState(false),{xChannel:_,yChannel:m,zChannel:A}=r.channels,j$1=r.xChannelStep,N=r.yChannelStep,k=useRef(null),O=(o,p,w)=>{r.setDragging(true),h$1(true),o(),r.setDragging(false),b(p),v(w);},{keyboardProps:$}=j({shortcuts:{PageUp:()=>O(()=>{r.incrementY(r.yChannelPageStep);},a,"y"),PageDown:()=>O(()=>{r.decrementY(r.yChannelPageStep);},a,"y"),Home:()=>O(()=>{s==="rtl"?r.incrementX(r.xChannelPageStep):r.decrementX(r.xChannelPageStep);},t,"x"),End:()=>O(()=>{s==="rtl"?r.decrementX(r.xChannelPageStep):r.incrementX(r.xChannelPageStep);},t,"x")},allowRepeats:true}),J={onMoveStart(){k.current=null,r.setDragging(true);},onMove({deltaX:o,deltaY:p,pointerType:w,shiftKey:Z}){let{incrementX:U,decrementX:se,incrementY:ce,decrementY:T,xChannelPageStep:q,xChannelStep:B,yChannelPageStep:ke,yChannelStep:Pe,getThumbPosition:Sr,setColorFromPoint:gr}=r;k.current==null&&(k.current=Sr());let{width:xr,height:kr}=u.current?.getBoundingClientRect()||{width:0,height:0},we=o!==0||p!==0;if(w==="keyboard"){let Ae=Z&&q>B?q:B,$e=Z&&ke>Pe?ke:Pe;o>0&&s==="ltr"||o<0&&s==="rtl"?U(Ae):o<0&&s==="ltr"||o>0&&s==="rtl"?se(Ae):p>0?T($e):p<0&&ce($e),h$1(we),n=we&&Math.abs(p)>Math.abs(o)?"y":"x",v(n);}else k.current.x+=(s==="rtl"?-1:1)*o/xr,k.current.y+=p/kr,gr(k.current.x,k.current.y);},onMoveEnd(){M.current=false,r.setDragging(false),b(n==="x"?t:a);}},{moveProps:sr}=a$c(J),{focusWithinProps:cr}=b$3({onFocusWithinChange:o=>{o||(h$1(false),x(false));}}),F=useRef(void 0),M=useRef(false),{moveProps:dr}=a$c({onMoveStart(){M.current&&J.onMoveStart();},onMove(o){M.current&&J.onMove(o);},onMoveEnd(){M.current&&J.onMoveEnd();}}),pe=o=>{let p=b$5(u.current);r.isDragging||(F.current=o,h$1(false),b(),r.setDragging(true),typeof PointerEvent<"u"?z(p,"pointerup",R,false):(z(p,"mouseup",R,false),z(p,"touchend",R,false)));},R=o=>{let p=b$5(u.current);(o.pointerId??o.changedTouches?.[0].identifier)===F.current&&(h$1(false),b(),r.setDragging(false),F.current=void 0,M.current=false,typeof PointerEvent<"u"?i(p,"pointerup",R,false):(i(p,"mouseup",R,false),i(p,"touchend",R,false)));},ue=(o,p,w,Z)=>{let U=o.getBoundingClientRect(),{width:se,height:ce}=U,T=(w-U.x)/se,q=(Z-U.y)/ce;s==="rtl"&&(T=1-T);let B=b$5(u.current);T>=0&&T<=1&&q>=0&&q<=1&&!r.isDragging&&F.current===void 0&&(M.current=true,h$1(false),F.current=p,r.setColorFromPoint(T,q),b(),r.setDragging(true),typeof PointerEvent<"u"?z(B,"pointerup",E,false):(z(B,"mouseup",E,false),z(B,"touchend",E,false)));},E=o=>{let p=o.pointerId??o.changedTouches?.[0].identifier;if(M.current&&p===F.current){M.current=false,h$1(false),F.current=void 0,r.setDragging(false),b();let w=b$5(u.current);typeof PointerEvent<"u"?i(w,"pointerup",E,false):(i(w,"mouseup",E,false),i(w,"touchend",E,false));}},mr=l$1?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||ue(o.currentTarget,o.pointerId,o.clientX,o.clientY);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||ue(o.currentTarget,void 0,o.clientX,o.clientY);},onTouchStart:o=>{ue(o.currentTarget,o.changedTouches[0].identifier,o.changedTouches[0].clientX,o.changedTouches[0].clientY);}}},dr),yr=l$1?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||pe(o.pointerId);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||pe(void 0);},onTouchStart:o=>{pe(o.changedTouches[0].identifier);}}},cr,$,sr),{focusProps:br}=a$d({onFocus:()=>{v("x");}}),{focusProps:_r}=a$d({onFocus:()=>{v("y");}}),ve=o=>{let{target:p}=o;x(true),p===t.current?r.setXValue(parseFloat(p.value)):p===a.current&&r.setYValue(parseFloat(p.value));},W=h()||l(),P=r.getDisplayColor(),Se=useCallback(o=>`${I||S?d.format("colorNameAndValue",{name:P.getChannelName(o,c$1),value:P.formatChannelValue(o,c$1)}):[d.format("colorNameAndValue",{name:P.getChannelName(o,c$1),value:P.formatChannelValue(o,c$1)}),d.format("colorNameAndValue",{name:P.getChannelName(o===m?_:m,c$1),value:P.formatChannelValue(o===m?_:m,c$1)}),d.format("colorNameAndValue",{name:P.getChannelName(A,c$1),value:P.formatChannelValue(A,c$1)})].join(", ")}, ${P.getColorName(c$1)}`,[c$1,P,d,I,S,_,m,A]),H=d.format("colorPicker"),fr=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),zr=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),hr=a$e({...e,"aria-label":y?`${y}, ${H}`:void 0},W?H:void 0),ge=d.format("twoDimensionalSlider"),{visuallyHiddenProps:xe}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:Cr,thumbStyleProps:vr}=Ze({direction:s,state:r,xChannel:_,yChannel:m,zChannel:A});return {colorAreaProps:{...hr,...mr,...Cr,role:"group"},thumbProps:{...yr,...vr,role:"presentation"},xInputProps:{...fr,...xe,...br,type:"range",min:r.value.getChannelRange(_).minValue,max:r.value.getChannelRange(_).maxValue,step:j$1,"aria-roledescription":ge,"aria-valuetext":Se(_),"aria-orientation":"horizontal","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(_),name:C,form:f,tabIndex:W||!n||n==="x"?void 0:-1,"aria-hidden":W||!n||n==="x"||S?void 0:"true",onChange:ve},yInputProps:{...zr,...xe,..._r,type:"range",min:r.value.getChannelRange(m).minValue,max:r.value.getChannelRange(m).maxValue,step:N,"aria-roledescription":ge,"aria-valuetext":Se(m),"aria-orientation":"vertical","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(m),name:g,form:f,tabIndex:W||n==="y"?void 0:-1,"aria-hidden":W||n==="y"||S?void 0:"true",onChange:ve}}}function rr(e,r){let{trackRef:l,inputRef:t,orientation:a,channel:u,"aria-label":y,name:C,form:g}=e,{locale:f,direction:d}=b$1();!e.label&&!y&&!e["aria-labelledby"]&&(y=r.value.getChannelName(u,f));let{groupProps:z,trackProps:i,labelProps:s,outputProps:c$1}=a$g({...e,"aria-label":y},r,l),{inputProps:n,thumbProps:v}=b$4({index:0,orientation:a,isDisabled:e.isDisabled,name:C,form:g,trackRef:l,inputRef:t},r),b=r.getDisplayColor(),S=()=>{let x;switch(a==="vertical"?x="top":d==="ltr"?x="right":x="left",u){case "hue":{let _=[0,60,120,180,240,300,360].map(m=>b.withChannelValue("hue",m).toString("css")).join(", ");return `linear-gradient(to ${x}, ${_})`}case "lightness":{let _=r.getThumbMinValue(0),m=r.getThumbMaxValue(0),A=b.withChannelValue(u,_).toString("css"),j=b.withChannelValue(u,(m-_)/2).toString("css"),N=b.withChannelValue(u,m).toString("css");return `linear-gradient(to ${x}, ${A}, ${j}, ${N})`}case "saturation":case "brightness":case "red":case "green":case "blue":case "alpha":{let _=b.withChannelValue(u,r.getThumbMinValue(0)).toString("css"),m=b.withChannelValue(u,r.getThumbMaxValue(0)).toString("css");return `linear-gradient(to ${x}, ${_}, ${m})`}default:throw new Error("Unknown color channel: "+u)}},h={forcedColorAdjust:"none"};u==="hue"?n["aria-valuetext"]+=`, ${b.getHueName(f)}`:u!=="alpha"&&(n["aria-valuetext"]+=`, ${b.getColorName(f)}`);let{visuallyHiddenProps:I}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}});return {trackProps:{...c(z,i),style:{...i.style,...h,background:S()}},inputProps:{...n,style:{...n.style,...I.style}},thumbProps:{...v,style:{...v.style,...h}},labelProps:s,outputProps:c$1}}function or(e,r,l){let{isDisabled:t,isReadOnly:a,isRequired:u,isWheelDisabled:y,validationBehavior:C="aria",onKeyDown:g,onKeyUp:f}=e,{colorValue:d,inputValue:z,increment:i,decrement:s,incrementToMax:c$1,decrementToMin:n,commit:v,commitValidation:b}=r,S=c$2(),{spinButtonProps:h}=a$h({isDisabled:t,isReadOnly:a,isRequired:u,maxValue:16777215,minValue:0,onIncrement:i,onIncrementToMax:c$1,onDecrement:s,onDecrementToMin:n,value:d?d.toHexInt():void 0,textValue:d?d.toString("hex"):void 0}),[I,x]=useState(false),{focusWithinProps:_}=b$3({isDisabled:t,onFocusWithinChange:x}),m=useCallback($=>{Math.abs($.deltaY)<=Math.abs($.deltaX)||($.deltaY>0?i():$.deltaY<0&&s());},[s,i]);a$i({onScroll:m,isDisabled:y||t||a||!I},l);let{keyboardProps:j$1}=j({isDisabled:t||a,shortcuts:{Enter:()=>(flushSync(()=>{v();}),b(),{shouldPreventDefault:false})},onKeyDown:g,onKeyUp:f}),N=$=>{r.validate($)&&r.setInputValue($);},{inputProps:k,...O}=a$j({...e,id:S,value:z,defaultValue:"!",validate:void 0,[c$3]:r,type:"text",autoComplete:"off",onChange:N,onKeyDown:void 0,onKeyUp:void 0},r,l);return a$b(l,r.defaultColorValue,r.setColorValue),k=c(j$1,k,h,_,{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false",onBlur:v}),C==="native"&&(k["aria-required"]=void 0),{inputProps:k,...O}}function ie(e){let{color:r,colorName:l}=e,t=r||"#fff0",a=useMemo(()=>typeof t=="string"?a$1(t):t,[t]),{locale:u}=b$1(),y=a$8(e,{labelable:true}),C=b$2(ne,"@react-aria/color"),g=c$2(e.id);return l||(l=a.getChannelValue("alpha")===0?C.format("transparent"):a.getColorName(u)),{colorSwatchProps:{...y,role:"img","aria-roledescription":C.format("colorSwatch"),"aria-label":[l,e["aria-label"]||""].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]?`${g} ${e["aria-labelledby"]}`:void 0,id:g,style:{backgroundColor:a.toString("css"),forcedColorAdjust:"none"}},color:a||null}}var nl="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6m3",il="_1dbkl5e",pl=a({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6me _1yep5z6m6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ey _1yep5z6m5 _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup82 _1yep5z611l"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),ul="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1",sl=a({defaultClassName:"_1dbkl50 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6dy _1yep5z6ez",variantClassNames:{labelPosition:{top:"_1yep5z6oy _1yep5z6oz _1yep5z6p0",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),cl="_1dbkl5l _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z69f _1yep5z69g _1yep5z69h",dl="_1dbkl5f z9nup86",ml="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv",lr="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6m6",yl="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6dy _1yep5z6ez _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1",bl=a({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g9",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6nm _1yep5z6nn _1yep5z6no"}},defaultVariants:{},compoundVariants:[]}),_l="_1dbkl5v _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",fl=a({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6mf _1yep5z6hg _1yep5z6m6 _1yep5z6ey _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z613w"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z618m"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocused:false},"_1yep5z61qj"]]}),zl=a({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f9 _1yep5z6m5 _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isHovered:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z618s _1yep5z618q _1yep5z618t _1yep5z614w"},isDisabled:{true:"_1yep5z611u"}},defaultVariants:{},compoundVariants:[]}),hl="_1dbkl5g",Cl="_1dbkl5u",vl="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h",Sl="_1dbkl5x",gl="_1dbkl5w",xl="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n",kl=a({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ma _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mf _1yep5z6mi",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z618q _1yep5z614w _1yep5z618s"}},defaultVariants:{},compoundVariants:[]}),Pl="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6iw _1yep5z6ix _1yep5z6iy";var jl=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Nl=a$1("#000000").toFormat("hsla"),fe="hsla",ze="hexa";function jr(e){let r=document.createElement("canvas").getContext("2d");return a$k(r,"Failed to get canvas context"),r.fillStyle=e,r.fillStyle}function Ml(e$1){if(typeof e$1=="string")try{return e(e$1).toFormat(fe)}catch{return a$1(jr(e$1)).toFormat(fe)}else if(e$1)return e$1.toFormat(fe);return null}function Fl(e,r){return e?.getChannelValue("alpha")?r?.toString(ze)===e.toString(ze):!r?.getChannelValue("alpha")}function Tl(e,r,l){return r?.label?r.label:e?.getChannelValue("alpha")===0?l:e?.toString("rgba")}var he="NONE";function Ol(e$1,r){let l=r?.map(a=>({id:e(a.color).toString(ze),label:a.label}))||[],t={id:he,label:e$1};return [...l,t]}var Rl=(e,{optionProps:r,isFocusVisible:l,isSelected:t},a)=>(a$k(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...r,ref:a,className:lr,children:jsx(Ce,{color:e.value.id,isFocusVisible:l,isSelected:t,"aria-label":e.value.label,isInteractive:true})})),ar=(e,r=4)=>{let l=e.getChannelValue("alpha")===0,t=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:l?t:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${t}`,backgroundSize:`${r}px ${r}px`}};var nr=a({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m0 _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv z9nup8a",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618v"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isFocusVisible:true},"_1344e9q6"],[{isSelected:true,isFocusVisible:true},"_1344e9q7 _1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve"],[{isSelected:true,isDisabled:true},"_1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve _1yep5z61rp"],[{isHovered:true,isSelected:false},"_1yep5z61ve _1yep5z61vb _1yep5z61v9 _1yep5z61rj"]]}),ir="_1yep5z6fa",pr="_1344e9q9 _1yep5z6fp";var Ce=Mr.forwardRef(({color:e$1,isFocusVisible:r,isSelected:l,isInteractive:t,isDisabled:a,style:u,className:y,id:C,tooltip:g,isIndeterminate:f,indeterminateIcon:d$1=HelpIcon,noneLabel:z,"data-block-id":i,"data-block-class":s,...c$1},n)=>{let v=e$1&&e$1!==he&&(typeof e$1=="string"?e(e$1):e$1),{formatMessage:b$1}=b(),S=!v,{colorSwatchProps:h}=ie({color:S?"#000000":v}),{hoverProps:I,isHovered:x}=a$2({isDisabled:a||!t}),_=a$3({"data-focus-visible":r,"data-selected":l,"data-hovered":x,"data-block-id":i,"data-block-class":s,"data-disabled":a,"data-interactive":t,"data-indeterminate":f}),m=S?z??b$1(ur.none):h["aria-label"],A=c$1["aria-label"]??m,{tooltipProps:j}=a$4({tooltip:g,label:A}),N=jsx("div",{...c(I,_,S?{}:h),style:u,"aria-label":S?z??b$1(ur.none):h["aria-label"],role:"img",className:a$6(nr({removeBlendMode:S,isFocusVisible:r,isDisabled:!!a,isSelected:!!l,isHovered:x}),"BaselineUI-ColorSwatch",y),ref:n,id:C,...c$1,children:jsxs(a$5,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:v&&!f?ar(v,4):void 0,children:[S&&!f?jsx("div",{className:pr}):null,f&&d$1?jsx(d$1,{role:"presentation",size:16,className:ir,"aria-hidden":"true"}):null]})});return j&&!a?jsx(a$7,{...j,children:jsx(d,{children:N})}):N});Ce.displayName="ColorSwatch";var ur=c$1({none:{id:"bui.colorSwatch.none",defaultMessage:"None"}});export{fe as A,ze as B,Ml as C,Fl as D,Tl as E,he as F,Ol as G,Rl as H,Ce as I,er as a,or as b,rr as c,nl as d,il as e,pl as f,ul as g,sl as h,cl as i,dl as j,ml as k,yl as l,bl as m,_l as n,fl as o,zl as p,hl as q,Cl as r,vl as s,Sl as t,gl as u,xl as v,kl as w,Pl as x,jl as y,Nl as z};
@@ -1,4 +1,4 @@
1
- import {a as a$1,r,d}from'./chunk-K7VOXFSK.mjs';import {i,l}from'./chunk-YQHHE5AT.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {createElement,useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a as a$1,r,d}from'./chunk-OMWMNUTI.mjs';import {i,l}from'./chunk-YQHHE5AT.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {createElement,useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$1}from'./chunk-6Q5PNIYZ.mjs';import {a as a$4}from'./chunk-3DWFAHR2.mjs';import {a as a$7}from'./chunk-JZXLV6JU.mjs';import {b,c as c$1}from'./chunk-7MLFM55C.mjs';import {a as a$3}from'./chunk-O7XK2WIX.mjs';import {a as a$6}from'./chunk-DAI7V4TE.mjs';import {d}from'./chunk-4EAXDHSV.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {b as b$1,c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import h 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 z=a({defaultClassName:"siobe20 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6mh _1yep5z6mf _1yep5z6hg _1yep5z6m6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm",variantClassNames:{background:{subtle:"_1yep5z612s",medium:"_1yep5z612t"},isFocusVisible:{true:"_1yep5z618q _1yep5z618s _1yep5z618t _1yep5z614w"}},defaultVariants:{},compoundVariants:[]}),_="siobe24",v="siobe25";var x=h.forwardRef(({className:C,style:D,children:k,background:t="medium",title:i,action:p,"data-block-id":N,"data-block-class":P,onCloseRequest:R,contentStyle:B,contentClassName:j,closeLabel:I,...F},M)=>{let{formatMessage:T}=b(),m=h.useRef(null),{dialogProps:V,titleProps:q}=a$1(F,m),{focusProps:A,isFocusVisible:L}=a$2();return jsxs("div",{...c(V,A),className:a$5(z({background:t,isFocusVisible:L}),"BaselineUI-Drawer",C),"data-block-id":N,"data-block-class":P,style:D,ref:b$1(M,m),children:[jsxs(a$3,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:_,children:[jsx(a$4,{type:"title",size:"sm",elementType:i?"h2":"span",...q,className:a$5(d,v),children:i}),jsxs(a$3,{children:[p?jsx(a$6,{...p,variant:"secondary"}):null,jsx(a$6,{variant:"secondary",size:"md",icon:XIcon,onPress:R,"aria-label":I??T(E.close)})]})]}),jsx(a$7,{variant:t==="subtle"?"primary":"secondary"}),jsx(a$3,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...B},className:a$5(j,"BaselineUI-Drawer-Content"),children:k})]})});x.displayName="Drawer";var E=c$1({close:{id:"bui.drawer.close",defaultMessage:"Close"}});export{x as a};
@@ -0,0 +1,10 @@
1
+ import {c}from'./chunk-BGQRLALS.mjs';import {i as i$1}from'./chunk-KUDCYGII.mjs';import {a as a$1}from'./chunk-SVIYLH7R.mjs';import {e}from'./chunk-ETM4MNG4.mjs';import {a,i,h}from'./chunk-SD43KVTU.mjs';import {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
+ function E(r,e$1){let{role:d="dialog",isEntering:b}=r,i$2=e([],e$1);i$2=r["aria-label"]?void 0:i$2;let a$2=e([],e$1);a$2=d==="alertdialog"&&!r["aria-describedby"]?a$2:void 0;let o=useRef(false);useEffect(()=>{if(b||!e$1.current)return;let t=a(e$1.current),l=i(t);if(!h(e$1.current,l)){i$1(e$1.current);let n=setTimeout(()=>{let g=i(t);(g===e$1.current||g===t.body)&&(o.current=true,e$1.current&&(e$1.current.blur(),i$1(e$1.current)),o.current=false);},500);return ()=>{clearTimeout(n);}}},[e$1,b]),c();let m=useRef(false);useEffect(()=>{if(process.env.NODE_ENV!=="production"&&!m.current&&e$1.current){let t=e$1.current,l=t.hasAttribute("aria-label"),n=t.hasAttribute("aria-labelledby");!l&&!n&&(console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),m.current=true);}});let O=r["aria-describedby"]??a$2;return {dialogProps:{...a$1(r,{labelable:true}),role:d,tabIndex:-1,"aria-labelledby":r["aria-labelledby"]??i$2,"aria-describedby":O,onBlur:t=>{o.current&&t.stopPropagation();}},titleProps:{id:i$2},contentProps:{id:a$2}}}export{E as a};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-XD43CVDT.mjs';import {e}from'./chunk-K7VOXFSK.mjs';import {t}from'./chunk-YQHHE5AT.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {jsx}from'react/jsx-runtime';/**
1
+ import {a}from'./chunk-OVJT5F2R.mjs';import {e}from'./chunk-OMWMNUTI.mjs';import {t}from'./chunk-YQHHE5AT.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$5}from'./chunk-PYV5J322.mjs';import {a as a$1,b}from'./chunk-SZTFMBPY.mjs';import {c as c$1}from'./chunk-PG3WDHSK.mjs';import {a}from'./chunk-7SQRBY7N.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {c as c$2}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import w 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 A=w.forwardRef(({className:F,validationState:s,variant:H="primary",labelPosition:r="top",inputStyle:d,inputClassName:v,isMultiLine:t=false,rows:N,inputRef:D,"data-block-id":L,"data-block-class":h,...e},k)=>{let B=w.useRef(null),a$6=D??B,{inputProps:o,labelProps:O,descriptionProps:j,errorMessageProps:C,validationErrors:U}=a({...e,inputElementType:t?"textarea":"input",validationState:s==="error"||e.errorMessage?"invalid":s?"valid":void 0},a$6),n=e.errorMessage||U.join(" "),m=c(),V=a$1({...e,errorMessage:n})==="warningMessage",W=b({...e,errorMessage:n,descriptionProps:j,errorMessageProps:C,warningMessageProps:{id:m},labelPosition:r});n&&(s="error");let{isFocused:u,focusProps:c$3,isFocusVisible:_}=a$2(),f=V?{"aria-describedby":[o["aria-describedby"],m].filter(Boolean).join(" ")}:null,T=a$3({"data-readonly":e.isReadOnly,"data-disabled":e.isDisabled,"data-validation-state":s,"data-focused":u,"data-focus-visible":_}),g=a$4(c$1({isDisabled:e.isDisabled,labelPosition:r,isMultiLine:t}),"BaselineUI-TextInput-Input",v);return jsx(a$5,{variant:H,labelProps:O,isFocused:u,message:W,ref:k,labelPosition:r,className:a$4("BaselineUI-TextInput",F),validationState:s,isMultiLine:t,"data-block-id":L,"data-block-class":h,...e,children:t?jsx("textarea",{...c$2(o,c$3,T,f),className:g,style:d,rows:N,ref:a$6}):jsx("input",{...c$2(o,c$3,T,f),className:g,style:d,ref:a$6})})});A.displayName="TextInput";export{A as a};
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-XXANV3FM.mjs';import {b as b$3}from'./chunk-F7PGMOQF.mjs';import {a,b as b$1,c}from'./chunk-LJZ7ZS4C.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {useContext,useMemo,useEffect}from'react';/**
1
+ import {a as a$1}from'./chunk-XXANV3FM.mjs';import {b as b$3}from'./chunk-2WA3KB7H.mjs';import {a,b as b$1,c}from'./chunk-LJZ7ZS4C.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {useContext,useMemo,useEffect}from'react';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$7}from'./chunk-NV7KQVPE.mjs';import {a as a$c}from'./chunk-KVIV5RTE.mjs';import {a as a$4}from'./chunk-4WVW4KEK.mjs';import {a as a$3}from'./chunk-TAYP2OGC.mjs';import {c as c$2}from'./chunk-5MUEJ5WI.mjs';import {b as b$1,c as c$1,a as a$d}from'./chunk-RO5ZRU3Y.mjs';import {B}from'./chunk-TYKMNZJ4.mjs';import {a as a$2}from'./chunk-CY6W27WG.mjs';import {b,c as c$3}from'./chunk-7MLFM55C.mjs';import {a as a$9,b as b$3}from'./chunk-AFOW62QN.mjs';import {a as a$b}from'./chunk-O7XK2WIX.mjs';import {b as b$2}from'./chunk-K5RYVERS.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-FPM5UJRF.mjs';import {a as a$a}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {a as a$6}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$e}from'./chunk-ETM4MNG4.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import Z,{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 Q=Z.forwardRef(({className:t,style:u,isInline:n=true,accept:i="image/*",defaultImageSrc:g,imageSrc:s,imageAlt:X,pickerButtonLabel:Y,isDisabled:r,onDrop:$,onPaste:S,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:ue,onFileTypeError:me,...m},pe)=>{let f=Z.useRef(null),h=Z.useRef(null),{formatMessage:fe}=b(),ce=e=>!w||e.size<=w?true:(ue?.(e),false),de=e=>xe(e,i)?true:(me?.(e),false),F=e=>de(e)&&ce(e),[ge,c$3]=a(s,g||null,e=>{a$1(typeof e!="string"),m.onValueChange?.(e?[e]:[]);}),l=Te(ge),{fieldProps:ye,labelProps:Pe}=a$2({...m,ref:f}),{dropProps:he,isDropTarget:I}=B({ref:f,isDisabled:r,onDrop:async e=>{let o=await a$3({items:e.items});o.length&&F(o[0])&&c$3(o[0]),$?.(e);},...m}),{clipboardProps:Fe}=a$4({onPaste:async e=>{if(r)return;let o=await a$3({items:e});o.length&&F(o[0])&&c$3(o[0]),S?.(e);},...m}),Ie=()=>{c$3(null),h.current&&(h.current.value="");},be={type:"file",onChange:e=>{let o=[...e.target.files];o.length&&F(o[0])?c$3(o[0]):o.length&&(e.target.value=""),m.onChange?.(e);},accept:i,disabled:r},{focusProps:ve,isFocused:Ce,isFocusVisible:b$4}=a$5({within:true}),{hoverProps:Le,isHovered:B$1}=a$6({isDisabled:r}),{imgProps:Re,isLoading:Ze,isLoaded:v}=a$7({src:l,alt:X||""}),we={label:Y||fe(Ae.selectImage),onPress:()=>f.current?.click(),variant:"secondary",isDisabled:r,excludeFromTabOrder:true,className:a$8(a$9({isFocusVisible:b$4}),{[b$1]:I&&!r},se),style:re},Be=a$a({"data-loaded":v,"data-block-id":te,"data-block-class":oe,"data-hovered":B$1,"data-focused":Ce,"data-drop-target":I,"data-disabled":r,"data-focus-visible":b$4});return jsxs(a$b,{...Be,className:a$8("BaselineUI-ImageDropZone",t),display:"flex",flexDirection:"column",alignItems:"center",style:u,ref:pe,children:[jsxs("label",{...c(he,Le,ve,Pe),className:a$8(a$d({isInline:n,isHovered:B$1,isDisabled:r,hasLoadedImage:!!l&&v,showFocusRing:I||!!l&&b$4}),le),style:ae,ref:f,children:[jsx(b$2,{children:jsx("input",{...c(ye,Fe,be),ref:h})}),!l&&jsx(b$3,{...we}),!!l&&(Ze?jsx(a$c,{}):jsx("img",{className:c$1({isInline:n,isDisabled:r,hasLoadedImage:!!l&&v&&ee}),...Re}))]}),P||y?jsx("div",{style:ie,className:a$8(c$2({isInline:n,isDisabled:r}),ne),children:(l||!P)&&y?jsx(b$3,{size:"sm",variant:"ghost",label:y,isDisabled:r,onPress:Ie}):jsx(b$3,{size:"sm",variant:"ghost",label:P,isDisabled:true})}):null]})});Q.displayName="ImageDropZone";function Te(t){let[u,n]=useState();if(a$e(()=>{if(!t||typeof t=="string"){n(void 0);return}let i=URL.createObjectURL(t);return n(i),()=>{URL.revokeObjectURL(i);}},[t]),!!t)return typeof t=="string"?t:u}function xe(t,u){if(!u)return true;let n=u.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean);if(n.length===0)return true;let i=t.type.toLowerCase(),g=t.name.toLowerCase();return n.some(s=>s==="*/*"?true:s.startsWith(".")?g.endsWith(s):i?s.endsWith("/*")?i.startsWith(s.slice(0,-1)):i===s:true)}var Ae=c$3({selectImage:{defaultMessage:"Select Image",id:"bui.imageDropZone.selectImage"}});export{Q as a};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-P7BN7QDF.mjs';import {a as a$3}from'./chunk-R4MOUAJW.mjs';import {a as a$2}from'./chunk-E22TWF63.mjs';import {b,c}from'./chunk-DZDZZRWE.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {a as a$1}from'./chunk-RSKKEGJZ.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {PauseIcon,PlayIcon}from'@baseline-ui/icons/24';import i from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a}from'./chunk-YFBMCK5O.mjs';import {a as a$3}from'./chunk-FNCHBVLF.mjs';import {a as a$2}from'./chunk-QXXKOFWM.mjs';import {b,c}from'./chunk-7MLFM55C.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {a as a$1}from'./chunk-RSKKEGJZ.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {PauseIcon,PlayIcon}from'@baseline-ui/icons/24';import i from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-BIDNNBRG.mjs';import {c}from'./chunk-NJKSUI2F.mjs';import {a as a$1}from'./chunk-NQIZ3U7Q.mjs';import {e}from'./chunk-AYQN3OH2.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/8';import R from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$3}from'./chunk-BIDNNBRG.mjs';import {d}from'./chunk-IROFSPEN.mjs';import {a as a$1}from'./chunk-NQIZ3U7Q.mjs';import {e}from'./chunk-AYQN3OH2.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {b,c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/8';import R from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {a as a$3}from'./chunk-BIDNNBRG.mjs';import {c}from'./chunk-NJKSUI2F.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var w=a({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m5 _1yep5z6m6 _1yep5z6m0 _1yep5z6dy _1yep5z6lq z9nup88",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9","success-secondary":"oom8bsa","warning-secondary":"oom8bsb","error-secondary":"oom8bsc","success-tertiary":"oom8bsd","warning-tertiary":"oom8bse","error-tertiary":"oom8bsf"},isDisabled:{true:"oom8bsg"},isFocusVisible:{true:"oom8bsh"},isHovered:{true:"oom8bsi"},size:{sm:"oom8bsj",md:"oom8bsk",lg:"oom8bsl"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:true},"oom8bsm"],[{variant:"secondary",isHovered:true},"oom8bsn"],[{variant:"tertiary",isHovered:true},"oom8bso"],[{variant:"ghost",isHovered:true},"oom8bsp"],[{variant:"success",isHovered:true},"oom8bsq"],[{variant:"warning",isHovered:true},"oom8bsr"],[{variant:"error",isHovered:true},"oom8bss"],[{variant:"primary",isFocusVisible:true},"oom8bst"],[{variant:"tertiary",isFocusVisible:true},"oom8bsu"],[{variant:"success",isFocusVisible:true},"oom8bsv"],[{variant:"success-secondary",isHovered:true},"oom8bsw"],[{variant:"success-secondary",isFocusVisible:true},"oom8bsx"],[{variant:"success-tertiary",isHovered:true},"oom8bsy"],[{variant:"success-tertiary",isFocusVisible:true},"oom8bsz"],[{variant:"warning",isFocusVisible:true},"oom8bs10"],[{variant:"warning-secondary",isHovered:true},"oom8bs11"],[{variant:"warning-secondary",isFocusVisible:true},"oom8bs12"],[{variant:"warning-tertiary",isHovered:true},"oom8bs13"],[{variant:"warning-tertiary",isFocusVisible:true},"oom8bs14"],[{variant:"error",isFocusVisible:true},"oom8bs15"],[{variant:"error-secondary",isHovered:true},"oom8bs16"],[{variant:"error-secondary",isFocusVisible:true},"oom8bs17"],[{variant:"error-tertiary",isHovered:true},"oom8bs18"],[{variant:"error-tertiary",isFocusVisible:true},"oom8bs19"]]}),n=a({defaultClassName:"oom8bs1a _1yep5z6lq",variantClassNames:{isDisabled:{true:"oom8bs1b"},isFocusVisible:{true:"oom8bs1c"},isHovered:{true:"_1yep5z611p"},variant:{primary:"_1yep5z611w",secondary:"_1yep5z611s",tertiary:"_1yep5z611x",ghost:"_1yep5z611x",popover:"_1yep5z611s",toolbar:"_1yep5z611s",success:"_1yep5z611v",warning:"_1yep5z611v",error:"_1yep5z611v","success-secondary":"_1yep5z6113","warning-secondary":"_1yep5z6118","error-secondary":"_1yep5z610y","success-tertiary":"_1yep5z6112","warning-tertiary":"_1yep5z6117","error-tertiary":"_1yep5z610x"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:true},"_1yep5z61of"],[{variant:"ghost",isHovered:true},"_1yep5z61oh"],[{variant:"tertiary",isFocusVisible:true},"_1yep5z61of"],[{variant:"success-secondary",isHovered:true},"_1yep5z61nn"],[{variant:"success-tertiary",isHovered:true},"_1yep5z61oe"],[{variant:"success-tertiary",isFocusVisible:true},"_1yep5z61oe"],[{variant:"warning-secondary",isHovered:true},"_1yep5z61ns"],[{variant:"warning-tertiary",isHovered:true},"_1yep5z61oe"],[{variant:"warning-tertiary",isFocusVisible:true},"_1yep5z61oe"],[{variant:"error-secondary",isHovered:true},"_1yep5z61ni"],[{variant:"error-tertiary",isHovered:true},"_1yep5z61oe"],[{variant:"error-tertiary",isFocusVisible:true},"_1yep5z61oe"],[{variant:"secondary",isDisabled:true},"_1yep5z61od"],[{variant:"tertiary",isDisabled:true},"_1yep5z61od"],[{variant:"ghost",isDisabled:true},"_1yep5z61od"],[{variant:"popover",isDisabled:true},"_1yep5z61od"],[{variant:"toolbar",isDisabled:true},"_1yep5z61od"],[{variant:"success-secondary",isDisabled:true},"_1yep5z61od"],[{variant:"success-tertiary",isDisabled:true},"_1yep5z61od"],[{variant:"warning-secondary",isDisabled:true},"_1yep5z61od"],[{variant:"warning-tertiary",isDisabled:true},"_1yep5z61od"],[{variant:"error-secondary",isDisabled:true},"_1yep5z61od"],[{variant:"error-tertiary",isDisabled:true},"_1yep5z61od"]]});var q={sm:16,md:20,lg:24},F=R.forwardRef((D,C)=>{let[k,B]=e(D,C,a$1),{label:x,style:t,className:a,iconStart:c$2,iconEnd:u,variant:r="primary",elementType:p="button",isDisabled:e$1,size:m="sm","data-block-id":N,"data-block-class":h,slot:G,...A}=k,{buttonProps:P,isPressed:j,ref:I,isFocusVisible:o,isFocused:T,isHovered:s,uiStateOptions:b$1}=c({...A,elementType:p,isDisabled:e$1}),d=q[m],E=a$2({"data-block-id":N,"data-block-class":h,"data-disabled":e$1,"data-focused":T,"data-focus-visible":o,"data-hovered":s,"data-pressed":j});return jsxs(p,{...c$1(P,E),className:a$4(w({isDisabled:!!e$1,isFocusVisible:o,isHovered:s,variant:r,size:m}),"BaselineUI-ActionButton",typeof a=="function"?a(b$1):a),style:typeof t=="function"?t(b$1):t,ref:b(B,I),children:[!!c$2&&jsx(c$2,{size:d,className:n({variant:r,isDisabled:e$1,isFocusVisible:o,isHovered:s})}),x,!!u&&jsx(u,{size:d,className:n({variant:r,isDisabled:e$1,isFocusVisible:o,isHovered:s})}),r==="popover"&&jsx(CaretDownIcon,{size:8,className:a$3})]})});F.displayName="ActionButton";export{w as a,F as b};
10
+ var w=a({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m5 _1yep5z6m6 _1yep5z6m0 _1yep5z6dy _1yep5z6lq z9nup88",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9","success-secondary":"oom8bsa","warning-secondary":"oom8bsb","error-secondary":"oom8bsc","success-tertiary":"oom8bsd","warning-tertiary":"oom8bse","error-tertiary":"oom8bsf"},isDisabled:{true:"oom8bsg"},isFocusVisible:{true:"oom8bsh"},isHovered:{true:"oom8bsi"},size:{sm:"oom8bsj",md:"oom8bsk",lg:"oom8bsl"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:true},"oom8bsm"],[{variant:"secondary",isHovered:true},"oom8bsn"],[{variant:"tertiary",isHovered:true},"oom8bso"],[{variant:"ghost",isHovered:true},"oom8bsp"],[{variant:"success",isHovered:true},"oom8bsq"],[{variant:"warning",isHovered:true},"oom8bsr"],[{variant:"error",isHovered:true},"oom8bss"],[{variant:"primary",isFocusVisible:true},"oom8bst"],[{variant:"tertiary",isFocusVisible:true},"oom8bsu"],[{variant:"success",isFocusVisible:true},"oom8bsv"],[{variant:"success-secondary",isHovered:true},"oom8bsw"],[{variant:"success-secondary",isFocusVisible:true},"oom8bsx"],[{variant:"success-tertiary",isHovered:true},"oom8bsy"],[{variant:"success-tertiary",isFocusVisible:true},"oom8bsz"],[{variant:"warning",isFocusVisible:true},"oom8bs10"],[{variant:"warning-secondary",isHovered:true},"oom8bs11"],[{variant:"warning-secondary",isFocusVisible:true},"oom8bs12"],[{variant:"warning-tertiary",isHovered:true},"oom8bs13"],[{variant:"warning-tertiary",isFocusVisible:true},"oom8bs14"],[{variant:"error",isFocusVisible:true},"oom8bs15"],[{variant:"error-secondary",isHovered:true},"oom8bs16"],[{variant:"error-secondary",isFocusVisible:true},"oom8bs17"],[{variant:"error-tertiary",isHovered:true},"oom8bs18"],[{variant:"error-tertiary",isFocusVisible:true},"oom8bs19"]]}),n=a({defaultClassName:"oom8bs1a _1yep5z6lq",variantClassNames:{isDisabled:{true:"oom8bs1b"},isFocusVisible:{true:"oom8bs1c"},isHovered:{true:"_1yep5z611p"},variant:{primary:"_1yep5z611w",secondary:"_1yep5z611s",tertiary:"_1yep5z611x",ghost:"_1yep5z611x",popover:"_1yep5z611s",toolbar:"_1yep5z611s",success:"_1yep5z611v",warning:"_1yep5z611v",error:"_1yep5z611v","success-secondary":"_1yep5z6113","warning-secondary":"_1yep5z6118","error-secondary":"_1yep5z610y","success-tertiary":"_1yep5z6112","warning-tertiary":"_1yep5z6117","error-tertiary":"_1yep5z610x"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:true},"_1yep5z61of"],[{variant:"ghost",isHovered:true},"_1yep5z61oh"],[{variant:"tertiary",isFocusVisible:true},"_1yep5z61of"],[{variant:"success-secondary",isHovered:true},"_1yep5z61nn"],[{variant:"success-tertiary",isHovered:true},"_1yep5z61oe"],[{variant:"success-tertiary",isFocusVisible:true},"_1yep5z61oe"],[{variant:"warning-secondary",isHovered:true},"_1yep5z61ns"],[{variant:"warning-tertiary",isHovered:true},"_1yep5z61oe"],[{variant:"warning-tertiary",isFocusVisible:true},"_1yep5z61oe"],[{variant:"error-secondary",isHovered:true},"_1yep5z61ni"],[{variant:"error-tertiary",isHovered:true},"_1yep5z61oe"],[{variant:"error-tertiary",isFocusVisible:true},"_1yep5z61oe"],[{variant:"secondary",isDisabled:true},"_1yep5z61od"],[{variant:"tertiary",isDisabled:true},"_1yep5z61od"],[{variant:"ghost",isDisabled:true},"_1yep5z61od"],[{variant:"popover",isDisabled:true},"_1yep5z61od"],[{variant:"toolbar",isDisabled:true},"_1yep5z61od"],[{variant:"success-secondary",isDisabled:true},"_1yep5z61od"],[{variant:"success-tertiary",isDisabled:true},"_1yep5z61od"],[{variant:"warning-secondary",isDisabled:true},"_1yep5z61od"],[{variant:"warning-tertiary",isDisabled:true},"_1yep5z61od"],[{variant:"error-secondary",isDisabled:true},"_1yep5z61od"],[{variant:"error-tertiary",isDisabled:true},"_1yep5z61od"]]});var q={sm:16,md:20,lg:24},F=R.forwardRef((D,C)=>{let[k,B]=e(D,C,a$1),{label:x,style:t,className:a,iconStart:c$1,iconEnd:u,variant:r="primary",elementType:p="button",isDisabled:e$1,size:m="sm","data-block-id":N,"data-block-class":h,slot:G,...A}=k,{buttonProps:P,isPressed:j,ref:I,isFocusVisible:o,isFocused:T,isHovered:s,uiStateOptions:b$1}=d({...A,elementType:p,isDisabled:e$1}),d$1=q[m],E=a$2({"data-block-id":N,"data-block-class":h,"data-disabled":e$1,"data-focused":T,"data-focus-visible":o,"data-hovered":s,"data-pressed":j});return jsxs(p,{...c(P,E),className:a$4(w({isDisabled:!!e$1,isFocusVisible:o,isHovered:s,variant:r,size:m}),"BaselineUI-ActionButton",typeof a=="function"?a(b$1):a),style:typeof t=="function"?t(b$1):t,ref:b(B,I),children:[!!c$1&&jsx(c$1,{size:d$1,className:n({variant:r,isDisabled:e$1,isFocusVisible:o,isHovered:s})}),x,!!u&&jsx(u,{size:d$1,className:n({variant:r,isDisabled:e$1,isFocusVisible:o,isHovered:s})}),r==="popover"&&jsx(CaretDownIcon,{size:8,className:a$3})]})});F.displayName="ActionButton";export{w as a,F as b};
@@ -0,0 +1,10 @@
1
+ import {b}from'./chunk-HZM2XZP4.mjs';import {c as c$1}from'./chunk-XQC3DSTW.mjs';import {I}from'./chunk-676DOXEK.mjs';import {a as a$1}from'./chunk-3DWFAHR2.mjs';import {a}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-VXZT2JR2.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {d}from'./chunk-HH4VLTF3.mjs';import {a as a$3}from'./chunk-SVIYLH7R.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens';import U,{useMemo,useState,useEffect}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 R="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",j="_1yep5z61sj _1yep5z61sk _1yep5z61sl _1yep5z61ih _1yep5z61ii _1yep5z61ij";var T=U.forwardRef(({className:c$2,style:s,items:t,optionsContainerClassName:d,label:o,icon:i,value:a$4,defaultValue:p,onChange:m,isDisabled:u,optionClassName:L,optionStyle:D,labelPosition:C="top","data-block-id":E,"data-block-class":F,shouldFocusWrap:M,tooltip:v=true,...l},K)=>{let P=useMemo(()=>t.map(e=>({id:e.color,label:e.label})),[t]),b$1=e=>(t.find(y=>y.color===e)??t.find(y=>b(y.color,e)))?.color??e,z=c(),[k,q]=useState(!!a$4);return a$4&&!k&&q(true),useEffect(()=>{!o&&!l["aria-label"]&&!l["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[o,l]),jsxs(a,{...a$3(l),className:a$2("BaselineUI-ColorSwatchPicker",c$2),"data-block-id":E,"data-block-class":F,display:"flex",flexDirection:C==="top"?"column":"row",alignItems:C==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:s,ref:K,children:[i||o?jsxs(a,{display:"flex",alignItems:"center",gap:"md",children:[i?jsx(i,{"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary"})}):null,o?jsx(a$1,{id:z,type:"label",size:"sm",children:o}):null]}):null,jsx(c$1,{className:a$2(j,d),selectionMode:"single",items:P,orientation:"horizontal",defaultSelectedKeys:p?[b$1(p)]:void 0,disabledKeys:u?P.map(e=>e.id):void 0,isDisabled:u,selectedKeys:a$4?[b$1(a$4)]:k?[]:void 0,onSelectionChange:e=>{m?.([...e][0]);},optionClassName:L,optionStyle:D,renderOption:(...e)=>J(...e,v),shouldFocusWrap:M,...l,"aria-labelledby":o?z:l["aria-labelledby"]})]})});T.displayName="ColorSwatchPicker";var J=({key:c,textValue:s},{isSelected:t,isFocusVisible:d$1,isDisabled:o,optionProps:i},a,p)=>{let{tooltipProps:m}=a$4({label:s,tooltip:p});return jsx(a$5,{...m,children:jsx(d,{children:jsx("li",{...i,"data-disabled":o||void 0,className:a$2(R,i.className),ref:a,children:jsx(I,{isFocusVisible:d$1,color:c,isSelected:t,"aria-label":s,isInteractive:true,isDisabled:o,tooltip:false})})})})};export{T as a};
@@ -1,4 +1,4 @@
1
- import {c}from'./chunk-K7VOXFSK.mjs';import {a,d,b as b$3}from'./chunk-R3HHMCE5.mjs';import {b as b$1}from'./chunk-6G7EUNZW.mjs';import {c as c$1}from'./chunk-PD5ZXNGT.mjs';import {b as b$4,a as a$b}from'./chunk-DF2D7NE6.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {a as a$6}from'./chunk-I7LPPUZS.mjs';import {a as a$1}from'./chunk-7SQRBY7N.mjs';import {c as c$2,d as d$2}from'./chunk-W6QO7FPZ.mjs';import {c as c$4}from'./chunk-C4WHTPLY.mjs';import {b}from'./chunk-KG2EHFYA.mjs';import {a as a$a}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-JJG67M2S.mjs';import {c as c$3}from'./chunk-J4OPD7OL.mjs';import {a as a$4}from'./chunk-Y2MIU76N.mjs';import {a as a$8}from'./chunk-AI6WQPRX.mjs';import {a as a$9}from'./chunk-FPM5UJRF.mjs';import {a as a$3}from'./chunk-4QBHQCCK.mjs';import {j,d as d$1}from'./chunk-KUDCYGII.mjs';import {o,i}from'./chunk-PPHSLODC.mjs';import {a as a$2,c as c$5}from'./chunk-3WKDIXCM.mjs';import {c as c$6}from'./chunk-ETM4MNG4.mjs';import {i as i$1,a as a$7,h,j as j$1}from'./chunk-SD43KVTU.mjs';import {useRef,useMemo,useEffect,useState,useCallback}from'react';/**
1
+ import {c}from'./chunk-OMWMNUTI.mjs';import {a,d,b as b$3}from'./chunk-WFYFHANE.mjs';import {b as b$1}from'./chunk-XAM3AXXK.mjs';import {c as c$1}from'./chunk-QMV2O57M.mjs';import {b as b$4,a as a$b}from'./chunk-DF2D7NE6.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {a as a$1}from'./chunk-7SQRBY7N.mjs';import {c as c$2,d as d$2}from'./chunk-W6QO7FPZ.mjs';import {c as c$4}from'./chunk-C4WHTPLY.mjs';import {a as a$6}from'./chunk-I7LPPUZS.mjs';import {b}from'./chunk-KG2EHFYA.mjs';import {a as a$a}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-JJG67M2S.mjs';import {c as c$3}from'./chunk-TZGK36KC.mjs';import {a as a$4}from'./chunk-Y2MIU76N.mjs';import {a as a$8}from'./chunk-AI6WQPRX.mjs';import {a as a$9}from'./chunk-FPM5UJRF.mjs';import {a as a$3}from'./chunk-4QBHQCCK.mjs';import {j,d as d$1}from'./chunk-KUDCYGII.mjs';import {o,i}from'./chunk-PPHSLODC.mjs';import {a as a$2,c as c$5}from'./chunk-3WKDIXCM.mjs';import {c as c$6}from'./chunk-ETM4MNG4.mjs';import {i as i$1,a as a$7,h,j as j$1}from'./chunk-SD43KVTU.mjs';import {useRef,useMemo,useEffect,useState,useCallback}from'react';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {b}from'./chunk-4JQUB53Q.mjs';import {a}from'./chunk-OO7BXL2N.mjs';import {useContext}from'react';/**
1
+ import {b}from'./chunk-YDUKC7QS.mjs';import {a}from'./chunk-OO7BXL2N.mjs';import {useContext}from'react';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a,b}from'./chunk-UUTMZQQA.mjs';import {b as b$1,a as a$3}from'./chunk-I7LPPUZS.mjs';import {a as a$1}from'./chunk-NRQSR3G7.mjs';import {b as b$2}from'./chunk-4S4GGUSH.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$2}from'./chunk-ETM4MNG4.mjs';import {a as a$4}from'./chunk-SD43KVTU.mjs';/**
1
+ import {a,b}from'./chunk-CENNHSIS.mjs';import {a as a$1}from'./chunk-HABKIEKC.mjs';import {b as b$1,a as a$3}from'./chunk-I7LPPUZS.mjs';import {b as b$2}from'./chunk-4S4GGUSH.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$2}from'./chunk-ETM4MNG4.mjs';import {a as a$4}from'./chunk-SD43KVTU.mjs';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$a}from'./chunk-5HXTXIE5.mjs';import {a as a$3}from'./chunk-MZIQ27JP.mjs';import {d,a as a$9,c as c$2,b as b$3}from'./chunk-5MUEJ5WI.mjs';import {a as a$8}from'./chunk-RO5ZRU3Y.mjs';import {a as a$5}from'./chunk-3DWFAHR2.mjs';import {a}from'./chunk-R6TFTLMV.mjs';import {b,c as c$3}from'./chunk-DZDZZRWE.mjs';import {b as b$2}from'./chunk-TUJLNJPJ.mjs';import {a as a$6}from'./chunk-VGFPT43C.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-2VY4FAOY.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {c as c$1,b as b$4}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {UndoIcon,RedoIcon}from'@baseline-ui/icons/16';import {getStroke}from'perfect-freehand';import h,{useState,useCallback,useEffect,useMemo,useRef}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
1
+ import {a as a$a}from'./chunk-5HXTXIE5.mjs';import {a as a$3}from'./chunk-MZIQ27JP.mjs';import {d,a as a$9,c as c$2,b as b$3}from'./chunk-5MUEJ5WI.mjs';import {a as a$8}from'./chunk-RO5ZRU3Y.mjs';import {a as a$5}from'./chunk-3DWFAHR2.mjs';import {a}from'./chunk-R6TFTLMV.mjs';import {b,c as c$3}from'./chunk-7MLFM55C.mjs';import {b as b$2}from'./chunk-AFOW62QN.mjs';import {a as a$6}from'./chunk-DAI7V4TE.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-2VY4FAOY.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {c as c$1,b as b$4}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {UndoIcon,RedoIcon}from'@baseline-ui/icons/16';import {getStroke}from'perfect-freehand';import h,{useState,useCallback,useEffect,useMemo,useRef}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import c from'react';/**
1
+ import r from'dompurify';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import c from'react';/**
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- function o(e){let r=c.useRef(null),n=()=>({get current(){return r.current},set current(u){r.current=u;}}),t=c.useRef({portalContainer:e,ref:n()});return t.current.portalContainer!==e&&(t.current={portalContainer:e,ref:n()}),t.current.ref}export{o as a};
10
+ var i=e=>e.charAt(0).toUpperCase()+e.slice(1),s=e=>typeof DOMParser>"u"?e.replaceAll(/<[^<>]*>/g,""):new DOMParser().parseFromString(r.sanitize(e),"text/html").body.textContent||"";export{i as a,s as b};
@@ -0,0 +1,10 @@
1
+ import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-4QEH5CGK.mjs';import {createContext,forwardRef,useEffect,useImperativeHandle,useMemo,useContext}from'react';import {usePanelRef,Panel,useGroupRef,useDefaultLayout,Group,Separator}from'react-resizable-panels';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 b=createContext({});function h(){return useContext(b)}function m(e){return typeof e=="number"?`${e}%`:e}var S=forwardRef(({className:e,isCollapsible:r=false,id:t,onResize:i,defaultSize:d,minSize:f,maxSize:p,collapsedSize:u,...P},o)=>{let a$1=usePanelRef(),g=c(),c$1=t??g,{autoSaveId:l}=h();return useEffect(()=>{l&&!t&&console.warn("Panel: A stable `id` prop is required for size persistence to work correctly when `autoSaveId` is set on the parent `PanelGroup`. Without it, panel sizes will not be saved or restored.");},[l,t]),useImperativeHandle(o,()=>({resize:n=>a$1.current?.resize(n)})),jsx(Panel,{className:a("BaselineUI-Panel",e),collapsible:r,panelRef:a$1,id:c$1,defaultSize:m(d),minSize:m(f),maxSize:m(p),collapsedSize:m(u),onResize:i?n=>{i(n.asPercentage);}:void 0,...P})});S.displayName="Panel";var U={getItem:()=>null,setItem:()=>{}},V={getItem:e=>{try{return localStorage.getItem(e)}catch{return null}},setItem:(e,r)=>{try{localStorage.setItem(e,r);}catch(t){if(t?.name!=="SecurityError")throw t}}},q=forwardRef(({className:e,autoSaveId:r,direction:t,onLayout:i,...d},f)=>{let p=useGroupRef();useImperativeHandle(f,()=>({setLayout:o=>{let a=p.current;if(!a)return;let g=a.getLayout(),c=Object.keys(g);if(c.length>0){let l={};for(let n of c)n in o&&(l[n]=o[n]);a.setLayout(l);}else a.setLayout(o);}}));let u=useDefaultLayout({id:r??"",storage:r?V:U}),P=useMemo(()=>({autoSaveId:r}),[r]);return jsx(b.Provider,{value:P,children:jsx(Group,{className:a("BaselineUI-PanelGroup",e),groupRef:p,orientation:t,defaultLayout:r?u.defaultLayout:void 0,onLayoutChanged:o=>{r&&u.onLayoutChanged(o),i&&i(o);},...d})})});q.displayName="PanelGroup";var z="_6abhjk0";var D=({className:e,isDisabled:r=false,...t})=>jsx(Separator,{disabled:r,className:a(z,"BaselineUI-PanelResizeHandle",e),...t});D.displayName="PanelResizeHandle";export{S as a,q as b,D as c};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-CIPPPD6E.mjs';import {c as c$1}from'./chunk-GMALMQWI.mjs';import {a as a$4,b as b$2}from'./chunk-MDE2FQHX.mjs';import {f as f$1,g}from'./chunk-J4OPD7OL.mjs';import {a as a$5,b as b$3}from'./chunk-GQIS4QBN.mjs';import {b}from'./chunk-4S4GGUSH.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {b as b$1}from'./chunk-S4HLMIFK.mjs';import {h,j as j$2}from'./chunk-PPHSLODC.mjs';import {a as a$3}from'./chunk-3WKDIXCM.mjs';import {a as a$1}from'./chunk-ETM4MNG4.mjs';import {a as a$2,f,e,j as j$3,b as b$4,i}from'./chunk-SD43KVTU.mjs';import {useRef,useEffect}from'react';/**
1
+ import {a}from'./chunk-CIPPPD6E.mjs';import {c as c$1}from'./chunk-GMALMQWI.mjs';import {a as a$4,b as b$2}from'./chunk-SI5WP6I7.mjs';import {g,h as h$1}from'./chunk-TZGK36KC.mjs';import {a as a$5,b as b$3}from'./chunk-GQIS4QBN.mjs';import {b}from'./chunk-4S4GGUSH.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {b as b$1}from'./chunk-S4HLMIFK.mjs';import {h,j as j$2}from'./chunk-PPHSLODC.mjs';import {a as a$3}from'./chunk-3WKDIXCM.mjs';import {a as a$1}from'./chunk-ETM4MNG4.mjs';import {a as a$2,f,e,j as j$3,b as b$4,i}from'./chunk-SD43KVTU.mjs';import {useRef,useEffect}from'react';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,9 +7,9 @@ import {a}from'./chunk-CIPPPD6E.mjs';import {c as c$1}from'./chunk-GMALMQWI.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var c=[];function Y(e,l){let{onClose:o,shouldCloseOnBlur:r,isOpen:t,isDismissable:n=false,isKeyboardDismissDisabled:i=false,shouldCloseOnInteractOutside:s}=e,f=useRef();useEffect(()=>{if(t&&!c.includes(l))return c.push(l),()=>{let a=c.indexOf(l);a>=0&&c.splice(a,1);}},[t,l]);let m=()=>{c[c.length-1]===l&&o&&o();},d=a=>{let M=c[c.length-1];f.current=M,(!s||s(j$3(a)))&&M===l&&a.stopPropagation();},u=a=>{(!s||s(j$3(a)))&&(c[c.length-1]===l&&a.stopPropagation(),f.current===l&&m()),f.current=void 0;},{keyboardProps:b$1}=j$1({shortcuts:{Escape:()=>{if(!i){m();return}return false}}});a({ref:l,onInteractOutside:n&&t?u:void 0,onInteractOutsideStart:d});let{focusWithinProps:g}=b({isDisabled:!r,onBlurWithin:a=>{!a.relatedTarget||c$1(a.relatedTarget)||(!s||s(a.relatedTarget))&&o?.();}});return {overlayProps:{...b$1,...g},underlayProps:{}}}var E=new WeakMap;function ce(e={},l){let{isDisabled:o,root:r,UNSTABLE_overrideFocus:t}=e;a$1(()=>{if(o)return;let n=r?.ownerDocument??a$2(l?.current),i=E.get(n);return i||(i={count:0},E.set(n,i)),i.count++,i.count===1&&(h()&&j$2()?i.restore=U(n):i.restore=G(r??n.documentElement,t)),()=>{let s=E.get(n);s&&(s.count--,s.count===0&&(s.restore?.(),E.delete(n)));}},[o,r,t]);}function G(e,l){let o=e.ownerDocument,t=(o.defaultView??window).innerWidth-e.clientWidth,n=e===o.documentElement;return a$3(n&&t>0&&("scrollbarGutter"in e.style?f(e,"scrollbar-gutter","stable"):f(e,"padding-right",`${t}px`)),f(e,"overflow","hidden"),l&&k(o),l&&f$1()&&j(o))}function U(e$1){let l=f(e$1.documentElement,"overflow","hidden"),o,r=false,t=d=>{let u=j$3(d);o=a$5(u,true)?u:b$3(u,true),r=false;let b=u.ownerDocument.defaultView.getSelection();b&&!b.isCollapsed&&b.containsNode(u,true)&&(r=true);let g=b$4(u);d.composedPath().some(a=>a instanceof g.HTMLInputElement&&a.type==="range")&&(r=true),"selectionStart"in u&&"selectionEnd"in u&&u.selectionStart<u.selectionEnd&&i(a$2(u))===u&&(r=true);},n=e$1.createElement("style"),i$1=b$1(e$1);i$1&&(n.nonce=i$1),n.textContent=`
10
+ var c=[];function Y(e,l){let{onClose:o,shouldCloseOnBlur:r,isOpen:t,isDismissable:n=false,isKeyboardDismissDisabled:i=false,shouldCloseOnInteractOutside:s}=e,f=useRef();useEffect(()=>{if(t&&!c.includes(l))return c.push(l),()=>{let a=c.indexOf(l);a>=0&&c.splice(a,1);}},[t,l]);let m=()=>{c[c.length-1]===l&&o&&o();},d=a=>{let M=c[c.length-1];f.current=M,(!s||s(j$3(a)))&&M===l&&a.stopPropagation();},u=a=>{(!s||s(j$3(a)))&&(c[c.length-1]===l&&a.stopPropagation(),f.current===l&&m()),f.current=void 0;},{keyboardProps:b$1}=j$1({shortcuts:{Escape:()=>{if(!i){m();return}return false}}});a({ref:l,onInteractOutside:n&&t?u:void 0,onInteractOutsideStart:d});let{focusWithinProps:g}=b({isDisabled:!r,onBlurWithin:a=>{!a.relatedTarget||c$1(a.relatedTarget)||(!s||s(a.relatedTarget))&&o?.();}});return {overlayProps:{...b$1,...g},underlayProps:{}}}var E=new WeakMap;function ce(e={},l){let{isDisabled:o,root:r,UNSTABLE_overrideFocus:t}=e;a$1(()=>{if(o)return;let n=r?.ownerDocument??a$2(l?.current),i=E.get(n);return i||(i={count:0},E.set(n,i)),i.count++,i.count===1&&(h()&&j$2()?i.restore=U(n):i.restore=G(r??n.documentElement,t)),()=>{let s=E.get(n);s&&(s.count--,s.count===0&&(s.restore?.(),E.delete(n)));}},[o,r,t]);}function G(e,l){let o=e.ownerDocument,t=(o.defaultView??window).innerWidth-e.clientWidth,n=e===o.documentElement;return a$3(n&&t>0&&("scrollbarGutter"in e.style?f(e,"scrollbar-gutter","stable"):f(e,"padding-right",`${t}px`)),f(e,"overflow","hidden"),l&&k(o),l&&g()&&j(o))}function U(e$1){let l=f(e$1.documentElement,"overflow","hidden"),o,r=false,t=d=>{let u=j$3(d);o=a$5(u,true)?u:b$3(u,true),r=false;let b=u.ownerDocument.defaultView.getSelection();b&&!b.isCollapsed&&b.containsNode(u,true)&&(r=true);let g=b$4(u);d.composedPath().some(a=>a instanceof g.HTMLInputElement&&a.type==="range")&&(r=true),"selectionStart"in u&&"selectionEnd"in u&&u.selectionStart<u.selectionEnd&&i(a$2(u))===u&&(r=true);},n=e$1.createElement("style"),i$1=b$1(e$1);i$1&&(n.nonce=i$1),n.textContent=`
11
11
  @layer {
12
12
  * {
13
13
  overscroll-behavior: contain;
14
14
  }
15
- }`.trim(),e$1.head.prepend(n);let s=d=>{if(!(d.touches.length===2||r)){if(!o||o===e$1.documentElement||o===e$1.body){d.preventDefault();return}o.scrollHeight===o.clientHeight&&o.scrollWidth===o.clientWidth&&d.preventDefault();}},f$1=k(e$1),m=a$3(e(e$1,"touchstart",t,{passive:false,capture:true}),e(e$1,"touchmove",s,{passive:false,capture:true}),j(e$1));return ()=>{l(),m(),n.remove(),f$1();}}function j(e$1){return e(e$1,"blur",o=>{let r=j$3(o),t=o.relatedTarget;t&&g(t)?t.focus():t||r.parentElement?.closest("[tabindex]")?.focus({preventScroll:true});},true)}function k(e){let l=e.defaultView??window,o=l.HTMLElement.prototype.focus;return Reflect.defineProperty(l.HTMLElement.prototype,"focus",{configurable:true,writable:true,value:function(r){if(o.call(this,{...r,preventScroll:true}),!r||!r.preventScroll){let t=()=>{i(e)===this&&_(this,e);};a$4(n=>n?t():b$2(()=>t()));}}}),()=>{Reflect.defineProperty(l.HTMLElement.prototype,"focus",{configurable:true,writable:true,value:o});}}function _(e,l){let o=l.scrollingElement||l.documentElement,r=e;for(;r&&r!==o&&r.isConnected;){let t=b$3(r);if(t!==l.documentElement&&t!==l.body&&t!==r){let n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(i.top<n.top||i.bottom>n.top+r.clientHeight){let s=n.bottom,f=l.defaultView?.visualViewport;f&&(s=Math.min(s,f.offsetTop+f.height));let m=i.top-n.top-((s-n.top)/2-i.height/2);t.scrollTo({top:Math.max(0,Math.min(t.scrollHeight-t.clientHeight,t.scrollTop+m)),behavior:"smooth"});}}r=t.parentElement;}}export{Y as a,ce as b};
15
+ }`.trim(),e$1.head.prepend(n);let s=d=>{if(!(d.touches.length===2||r)){if(!o||o===e$1.documentElement||o===e$1.body){d.preventDefault();return}o.scrollHeight===o.clientHeight&&o.scrollWidth===o.clientWidth&&d.preventDefault();}},f$1=k(e$1),m=a$3(e(e$1,"touchstart",t,{passive:false,capture:true}),e(e$1,"touchmove",s,{passive:false,capture:true}),j(e$1));return ()=>{l(),m(),n.remove(),f$1();}}function j(e$1){return e(e$1,"blur",o=>{let r=j$3(o),t=o.relatedTarget;t&&h$1(t)?t.focus():t||r.parentElement?.closest("[tabindex]")?.focus({preventScroll:true});},true)}function k(e){let l=e.defaultView??window,o=l.HTMLElement.prototype.focus;return Reflect.defineProperty(l.HTMLElement.prototype,"focus",{configurable:true,writable:true,value:function(r){if(o.call(this,{...r,preventScroll:true}),!r||!r.preventScroll){let t=()=>{i(e)===this&&_(this,e);};a$4(n=>n?t():b$2(()=>t()));}}}),()=>{Reflect.defineProperty(l.HTMLElement.prototype,"focus",{configurable:true,writable:true,value:o});}}function _(e,l){let o=l.scrollingElement||l.documentElement,r=e;for(;r&&r!==o&&r.isConnected;){let t=b$3(r);if(t!==l.documentElement&&t!==l.body&&t!==r){let n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(i.top<n.top||i.bottom>n.top+r.clientHeight){let s=n.bottom,f=l.defaultView?.visualViewport;f&&(s=Math.min(s,f.offsetTop+f.height));let m=i.top-n.top-((s-n.top)/2-i.height/2);t.scrollTo({top:Math.max(0,Math.min(t.scrollHeight-t.clientHeight,t.scrollTop+m)),behavior:"smooth"});}}r=t.parentElement;}}export{Y as a,ce as b};
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-4SW77SGW.mjs';import {a as a$7}from'./chunk-AK7XHUQW.mjs';import {a as a$3}from'./chunk-UDMNDUBO.mjs';import {a as a$1}from'./chunk-3DWFAHR2.mjs';import {a as a$8}from'./chunk-JZXLV6JU.mjs';import {b,c as c$1}from'./chunk-DZDZZRWE.mjs';import {b as b$1}from'./chunk-TUJLNJPJ.mjs';import {a as a$4}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-VGFPT43C.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import Y from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
1
+ import {a as a$2}from'./chunk-4SW77SGW.mjs';import {a as a$7}from'./chunk-7EQIV4GX.mjs';import {a as a$3}from'./chunk-DO5YROCG.mjs';import {a as a$1}from'./chunk-3DWFAHR2.mjs';import {a as a$8}from'./chunk-JZXLV6JU.mjs';import {b,c as c$1}from'./chunk-7MLFM55C.mjs';import {b as b$1}from'./chunk-AFOW62QN.mjs';import {a as a$4}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-DAI7V4TE.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import Y from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,11 @@
1
+ import {a as a$6}from'./chunk-SZCVQU55.mjs';import {a as a$2}from'./chunk-YS3Z53YT.mjs';import {a as a$e}from'./chunk-JBXZ6ZHP.mjs';import {a as a$b}from'./chunk-BPW4QRPV.mjs';import {a as a$d}from'./chunk-3DWFAHR2.mjs';import {a as a$c}from'./chunk-O7XK2WIX.mjs';import {a as a$a}from'./chunk-HABKIEKC.mjs';import {a as a$4}from'./chunk-LQHFBXCW.mjs';import {a as a$8}from'./chunk-CIPPPD6E.mjs';import {a as a$9,b as b$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {a as a$7}from'./chunk-4S4GGUSH.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {b,c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$3,b as b$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import R,{useContext,useMemo,useRef,useCallback,useEffect,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {PlusIcon}from'@baseline-ui/icons/12';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';import Ze from'just-camel-case';import*as it from'comlink';/**
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 vt={node:null,setNode:()=>{},coordinates:null,setCoordinates:()=>{},displayId:void 0,setDisplayId:()=>{},boundsRef:{current:null},isDisabled:false,cursorNode:null,setCursorNode:()=>{},children:null,setChildren:()=>{}},h=R.createContext(vt),ke=R.memo(({children:e,isDisabled:t=false})=>{let[n,r]=R.useState(null),[a,i]=R.useState(null),[s,c]=R.useState(null),p=R.useRef(null),[o,l]=R.useState(null),[m,k]=R.useState(),u=R.useMemo(()=>({node:n,setNode:r,coordinates:o,setCoordinates:l,displayId:m,setDisplayId:k,boundsRef:p,isDisabled:t,cursorNode:a,setCursorNode:i,children:s,setChildren:c}),[n,o,m,l,r,p,t,a,i,s,c]);return jsx(h.Provider,{value:u,children:e})});ke.displayName="PointPicker";var Ee="m0xg2me";var _e="m0xg2md _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mh _1yep5z6mg _1yep5z6ho",Re="m0xg2mj",ze="_1yep5z6fa",De="m0xg2mk m0xg2mj",Ie=a({defaultClassName:"m0xg2m0",variantClassNames:{isDisabled:{true:"m0xg2m1",false:"m0xg2m2"},isIndicatorVisible:{true:"m0xg2m3",false:"m0xg2m4"}},defaultVariants:{},compoundVariants:[[{isDisabled:false,isIndicatorVisible:true},"m0xg2m5"],[{isDisabled:false,isIndicatorVisible:false},"m0xg2m6"]]}),Me="m0xg2m8",Ne="m0xg2mb",Z="m0xg2ma _1yep5z6hp _1yep5z6mf",Ae="m0xg2m9 _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z6hg _1yep5z6mf _1yep5z6it _1yep5z6iu _1yep5z6iv",Le="m0xg2m7",Te="m0xg2mc",Se="m0xg2mf";var $=a$1(_e,"BaselineUI-PointPicker-GridLine"),kt=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:$,"data-grid-line-type":"vertical",style:{height:e.y-5,transform:`translate(${e.x}px, 0) translate(-1px, 0) scaleX(0.5)`}}),jsx("div",{className:$,"data-grid-line-type":"vertical",style:{height:`calc(100% - ${e.y+4}px)`,transform:`translate(${e.x}px, ${e.y+5}px) translate(-1px, 0) scaleX(0.5)`}})]}),Et=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:$,"data-grid-line-type":"horizontal",style:{width:e.x-5,transform:`translate(0, ${e.y}px) translate(0, -1px) scaleY(0.5)`}}),jsx("div",{className:$,"data-grid-line-type":"horizontal",style:{width:`calc(100% - ${e.x+4}px)`,transform:`translate(${e.x+5}px, ${e.y}px) translate(0, -1px) scaleY(0.5)`}})]}),Oe=({gridLines:e})=>{let{isDisabled:t,boundsRef:n,coordinates:r}=useContext(h),a=useMemo(()=>{let i=typeof e=="function"?e({coordinates:r,boundingRect:n.current}):e;return typeof i=="boolean"?i?r:void 0:i?.coordinates},[e,r,n]);return a&&!t?jsxs(Fragment,{children:[jsx(kt,{coordinates:a}),jsx(Et,{coordinates:a})]}):null};var Rt=new Set(["ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Home","End","PageUp","PageDown"]);function He({coordinates:e,setCoordinates:t,boundsRef:n,rootRef:r,onKeyDown:a,onKeyUp:i}){let{isDisabled:s}=useContext(h);return j({isDisabled:s,onKeyDown:c=>{a?.(c);let p=c.shiftKey?10:1,o=e&&Rt.has(c.key)?r.current?.getBoundingClientRect():void 0;if(!o||!e){c.isDefaultPrevented()||c.continuePropagation();return}n.current=o;let l;switch(c.key){case "ArrowRight":{c.preventDefault(),l={x:a$e(e.x+p,0,o.width),y:a$e(e.y,0,o.height)};break}case "ArrowLeft":{c.preventDefault(),l={x:a$e(e.x-p,0,o.width),y:a$e(e.y,0,o.height)};break}case "ArrowDown":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:a$e(e.y+p,0,o.height)};break}case "ArrowUp":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:a$e(e.y-p,0,o.height)};break}case "Home":{c.preventDefault(),l={x:0,y:a$e(e.y,0,o.height)};break}case "End":{c.preventDefault(),l={x:o.width,y:a$e(e.y,0,o.height)};break}case "PageUp":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:0};break}case "PageDown":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:o.height};break}default:{c.isDefaultPrevented()||c.continuePropagation();return}}l&&t(l);},onKeyUp:i})}function Ue(){let{node:e,coordinates:t}=useContext(h);return useMemo(()=>{if(!e||!t)return {x:0,y:0};let{left:n,top:r}=e.getBoundingClientRect();return {x:t.x+n,y:t.y+r}},[t,e])}var{color:Be}=themeVars,$e=R.forwardRef(({modality:e},t)=>e==="keyboard"?jsxs("svg",{width:92,height:92,viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,className:Re,children:[jsxs("g",{filter:"url(#filter0_d_11407_457970)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49 43V4h-6v39H4v6h39v39h6V49h39v-6H49zm38 5H48v39h-4V48H5v-4h39V5h4v39h39v4zm-5 28v6h-6v6h12V76h-6zm5 11H77v-4h6v-6h4v10zm-77-5v-6H4v12h12v-6h-6zm5 5H5V77h4v6h6v4zM76 4v6h6v6h6V4H76zm11 11h-4V9h-6V5h10v10zM4 4v12h6v-6h6V4H4zm11 5H9v6H5V5h10v4z",fill:Be.background.positive.subtle}),jsx("path",{d:"M48 44v4h39v-4H48zm-4 4v39h4V48h-4zM5 44v4h39v-4H5zM44 5v39h4V5h-4zm39 72v6h-6v4h10V77h-4zM9 83v-6H5v10h10v-4H9zM77 5v4h6v6h4V5H77zM5 5v10h4V9h6V5H5z",fill:Be.background.positive.interactive.enabled})]}),jsx("defs",{children:jsxs("filter",{id:"filter0_d_11407_457970",x:0,y:0,width:92,height:92,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsx("feOffset",{}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_11407_457970"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_11407_457970",result:"shape"})]})})]}):jsx(PlusIcon,{className:De,ref:t}));$e.displayName="PointPickerIndicatorIcon";var Lt=({trailingElement:e})=>{let{cursorNode:t}=useContext(h),[n,r]=useState({width:0,height:0});return useEffect(()=>{if(!t)return;let a=t.getBoundingClientRect();r(a);let i=new ResizeObserver(s=>{r({width:s[0].contentRect.width,height:s[0].contentRect.height});});return i.observe(t),()=>{i.disconnect();}},[t]),e?jsx(a$c,{position:"absolute",style:{left:0,top:0,zIndex:0,transform:`translate(${n.width/2}px, ${n.height/2}px)`},className:"BaselineUI-PointPickerContent-TrailingElement",children:e}):null},ee=R.forwardRef(({renderTrailingElement:e,renderCursor:t},n)=>{let{coordinates:r,isDisabled:a,node:i}=useContext(h),s=a$2({ownerDocument:a$3(i)}),c=!!(r&&!a),p=useMemo(()=>e?.(),[e]),o=Ue(),l=useMemo(()=>{if(!r)return null;let m=t?.({coordinates:r,modality:s});return m===void 0?jsx($e,{modality:s}):m},[t,r,s]);return c?jsxs(a$4,{style:{left:o.x,top:o.y},className:a$1(Le,"BaselineUI-PointPickerContent-Cursor"),ref:n,children:[l,p?jsx(Lt,{trailingElement:p}):null]}):null});ee.displayName="PointPickerIndicator";var Ke=R.forwardRef(({children:e,className:t,style:n,"data-block-id":r,"data-block-class":a,onFocusChange:i,onBlur:s,onFocus:c$1,onKeyDown:p,onKeyUp:o,gridLines:l=true,elementHandle:m,onMove:k,onPress:u,onPressStart:v,onPressEnd:b$1,renderTrailingElement:w,renderCursor:E},D)=>{let{setNode:C,node:_,coordinates:x,setCoordinates:z,displayId:Y,boundsRef:I,isDisabled:y,setCursorNode:st,setChildren:K}=useContext(h),A=useRef(null),ce=useRef(null),ue=a$2({ownerDocument:a$3(_)}),M=useCallback(d=>{z(d??null),k?.({coordinates:d,boundingRect:I.current});},[z,k,I]);useEffect(()=>{if(!y)return K(e),()=>{K(null);}},[e,y,K]),useEffect(()=>{let d=A.current;if(!d||y)return;let U=T=>{let H=d.getBoundingClientRect();I.current=H;let gt="clientX"in T?T.clientX:T.touches[0].clientX,xt="clientY"in T?T.clientY:T.touches[0].clientY,Pt={x:a$e(gt-H.left,0,H.width),y:a$e(xt-H.top,0,H.height)};M(Pt);},L=()=>{M(null);};return d.addEventListener("mousemove",U),d.addEventListener("touchmove",U,{passive:true}),d.addEventListener("mouseleave",L),d.addEventListener("touchend",L),d.addEventListener("touchcancel",L),()=>{d.removeEventListener("mousemove",U),d.removeEventListener("touchmove",U),d.removeEventListener("mouseleave",L),d.removeEventListener("touchend",L),d.removeEventListener("touchcancel",L);}},[I,y,M]);let{pressProps:at}=d({isDisabled:y,onPress:d=>{d.pointerType==="keyboard"?x&&u?.({...d,x:x.x,y:x.y}):u?.(d);},onPressStart:v,onPressEnd:b$1}),{focusProps:lt,isFocusVisible:ct,isFocused:ut}=a$5();a$6({ref:ce,isDisabled:y}),useImperativeHandle(m,()=>({focus:()=>{y||A.current?.focus();}}));let{focusProps:dt}=a$7({isDisabled:y,onFocusChange:i,onFocus:c$1,onBlur:s});function pt(){ue==="keyboard"&&setTimeout(()=>{let d=A.current?.getBoundingClientRect();d&&(I.current=d,M({x:a$e(d.width/2,0,d.width),y:a$e(d.height/2,0,d.height)}));},0);}function mt(){M(null);}let{keyboardProps:ft}=He({coordinates:x,setCoordinates:M,boundsRef:I,rootRef:A,onKeyDown:p,onKeyUp:o});a$8({isDisabled:y,ref:A,onInteractOutside:()=>{M(null);}});let ht=!!(x&&!y),yt=a$9({"data-focus-visible":ct,"data-focused":ut,"data-disabled":y,"data-block-id":r,"data-block-class":a,"data-active":x&&!y,"data-modality":ue});return jsxs(Fragment,{children:[jsx(ee,{renderTrailingElement:w,renderCursor:E,ref:st}),jsxs("div",{...c(lt,dt,{onFocus:pt,onBlur:mt},y?{}:c(ft,at)),ref:b(D,A,C),className:a$1(Ie({isDisabled:!!y,isIndicatorVisible:!!ht}),"BaselineUI-PointPicker-Content",t),tabIndex:y?void 0:0,style:n,"aria-controls":Y,"data-testid":"point-picker-content",...yt,children:[jsx(Oe,{gridLines:l}),jsx("div",{className:Ee,ref:ce,children:e})]})]})});Ke.displayName="PointPickerContent";function Xe(e,t,n){let[r,a]=useState(0),i=s=>{a(s),n();};return useGranularEffect(()=>{if(!e||t==="trailing")return;let s=new ResizeObserver(c=>{i(c[0].contentRect.width);});return i(e.getBoundingClientRect().width),s.observe(e),()=>{s.disconnect();}},[e,t],[n]),r}function jt(e,t){return t==="indicator"?e:e?.querySelector(".BaselineUI-PointPickerContent-TrailingElement")??null}var ne=R.forwardRef(({children:e,className:t,crossOffset:n,offset:r,placement:a="bottom start",anchorElement:i="indicator"},s)=>{let c=useRef(null),{cursorNode:p,coordinates:o}=useContext(h),l=Xe(p,i,()=>{u();}),m=jt(p,i),{overlayProps:k,updatePosition:u}=a$a({overlayRef:c,placement:a,targetRef:{get current(){return m}},crossOffset:n??l,offset:r});return useGranularEffect(()=>{u();},[o,n,r],[u]),o?jsx(a$4,{className:a$1(Se,t),ref:s,children:jsx("div",{ref:c,...k,children:e})}):null});ne.displayName="Floater";var tt=8,Xt=7,qt=7,re=R.memo(({children:e,scale:t,renderMagnifierContent:n})=>{let r=useRef(null),{coordinates:a,boundsRef:i,node:s}=useContext(h),c=useRef([]);a$6({ref:r}),useEffect(()=>{if(!r.current||n)return;let l=r.current.querySelectorAll("canvas"),m=[],k=r.current.ownerDocument;for(let u of l){let v=u.getContext("2d");if(!v)continue;let b=u.clientWidth,w=u.clientHeight,E=u.width,D=u.height,C=v.getImageData(0,0,E,D);m.push({el:u,width:E,height:D,image:C});let _=k.createElement("canvas");_.width=E,_.height=D;let x=_.getContext("2d");x&&x.drawImage(u,0,0),u.width=b*t,u.height=w*t,u.style.width=`${b}px`,u.style.height=`${w}px`,v.scale(t,t),v.drawImage(_,0,0,b,w);}return c.current=m,()=>{for(let{el:u,width:v,height:b,image:w}of c.current)u.width=v,u.height=b,u.getContext("2d")?.putImageData(w,0,0);}},[s,t,n]);let p=useMemo(()=>n?n({coordinates:a,boundingRect:i.current,children:e}):e?R.cloneElement(e,{key:"magnifier-content"}):null,[n,a,i,e]),o=useMemo(()=>!i.current||!a?null:{x:a.x/i.current.width,y:a.y/i.current.height},[i,a]);return o?jsx("div",{style:{left:0,transform:`scale(${t}) translate(calc(-${o.x*100}% + ${tt*Xt/(2*t)}px), calc(-${o.y*100}% + ${tt*qt/(2*t)}px))`},className:a$1(Te,"BaselineUI-PointPickerDisplay-Magnifier"),children:jsx("div",{style:Jt(s),ref:r,inert:"true",children:p})}):null});re.displayName="Magnifier";function Zt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],a=e.getPropertyValue(r);a&&t.push([r,a]);}for(let n of e)if(n.startsWith("--")){let r=e.getPropertyValue(n);r&&t.push([n,r]);}return Object.fromEntries(t)}function Jt(e){if(!e)return {};let n=b$1(e).getComputedStyle(e),r=e.getBoundingClientRect(),a={...Zt(n),position:"static",margin:"0px",left:"0px",top:"0px",transform:"none","-webkit-text-fill-color":"inherit","-webkit-text-stroke-color":"inherit",width:`${r.width}px`,height:`${r.height}px`,interactivity:"inert"};return Object.fromEntries(Object.entries(a).map(([i,s])=>i.startsWith("--")?[i,s]:i.startsWith("-")?[a$b(Ze(i)),s]:[Ze(i),s]))}var nn=7,rn=7,on={scale:2},sn={crossOffset:void 0,offset:void 0,placement:"bottom start",anchorElement:"indicator"},rt=R.forwardRef(({className:e,style:t,description:n,magnifier:r=true,"data-block-id":a,"data-block-class":i,floating:s=false,renderMagnifierContent:c},p)=>{let{coordinates:o,boundsRef:l,setDisplayId:m,isDisabled:k,children:u,cursorNode:v}=useContext(h),b=c$1(),w=useMemo(()=>b$2(r,on),[r]),E=useMemo(()=>typeof n=="function"?n({coordinates:o?{x:o.x,y:o.y}:null,boundingRect:l.current}):n,[n,o,l]),D=!k&&!!w&&o,C=useMemo(()=>b$2(s,sn),[s]);useEffect(()=>((!C||C&&v)&&m(b),()=>{m(void 0);}),[v,b,m,C]);let _=jsxs(a$c,{ref:C?void 0:p,className:a$1(Me,"BaselineUI-PointPicker-Display",e),backgroundColor:"background.primary.subtle",boxShadow:"medium",borderRadius:"sm",outlineWidth:1,outlineColor:"border.medium",outlineOffset:-1,outlineStyle:"solid",paddingY:"md",paddingLeft:"md",paddingRight:E?.length?"xl":"md",display:"flex",flexDirection:"row",gap:"lg",alignItems:"center",style:t,id:b,"data-block-id":a,"data-block-class":i,"data-variant":C?"floating":"auto","data-testid":"point-picker-display",children:[w?jsxs("div",{className:Ae,children:[D?jsx(re,{scale:w.scale,renderMagnifierContent:c,children:u}):null,Array.from({length:nn*rn}).map((x,z)=>z===24?jsx("div",{className:a$1(Z,Ne)},z):jsx("div",{className:Z},z))]}):null,E?.length?jsx(a$c,{display:"flex",gap:"lg",flexDirection:"column",children:E?.map(({label:x,icon:z},Y)=>jsxs(a$c,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(z,{size:12,className:ze}),jsx(a$d,{type:"label",size:"sm",children:x})]},x+Y))}):null]});return C?jsx(ne,{ref:p,...C,className:"BaselineUI-PointPicker-Floater",children:_}):_});rt.displayName="PointPickerDisplay";function se(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return URL.revokeObjectURL(n),r}function ae(){return se('var Y=Object.defineProperty;var Z=(n,t,e)=>t in n?Y(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var M=(n,t,e)=>Z(n,typeof t!="symbol"?t+"":t,e);var F=Symbol("Comlink.proxy"),J=Symbol("Comlink.endpoint"),Q=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.finalizer"),T=Symbol("Comlink.thrown"),B=n=>typeof n=="object"&&n!==null||typeof n=="function",q={canHandle:n=>B(n)&&n[F],serialize(n){let{port1:t,port2:e}=new MessageChannel;return U(n,t),[e,[e]]},deserialize(n){return n.start(),et(n)}},X={canHandle:n=>B(n)&&T in n,serialize({value:n}){let t;return n instanceof Error?t={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:t={isError:!1,value:n},[t,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},H=new Map([["proxy",q],["throw",X]]);function tt(n,t){for(let e of n)if(t===e||e==="*"||e instanceof RegExp&&e.test(t))return!0;return!1}function U(n,t=globalThis,e=["*"]){t.addEventListener("message",function r(s){if(!s||!s.data)return;if(!tt(e,s.origin)){console.warn(`Invalid origin \'${s.origin}\' for comlink proxy`);return}let{id:o,type:c,path:u}=Object.assign({path:[]},s.data),i=(s.data.argumentList||[]).map(m),a;try{let l=u.slice(0,-1).reduce((f,y)=>f[y],n),h=u.reduce((f,y)=>f[y],n);switch(c){case"GET":a=h;break;case"SET":l[u.slice(-1)[0]]=m(s.data.value),a=!0;break;case"APPLY":a=h.apply(l,i);break;case"CONSTRUCT":{let f=new h(...i);a=at(f)}break;case"ENDPOINT":{let{port1:f,port2:y}=new MessageChannel;U(n,y),a=ot(f,[f])}break;case"RELEASE":a=void 0;break;default:return}}catch(l){a={value:l,[T]:0}}Promise.resolve(a).catch(l=>({value:l,[T]:0})).then(l=>{let[h,f]=_(l);t.postMessage(Object.assign(Object.assign({},h),{id:o}),f),c==="RELEASE"&&(t.removeEventListener("message",r),V(t),z in n&&typeof n[z]=="function"&&n[z]())}).catch(l=>{let[h,f]=_({value:new TypeError("Unserializable return value"),[T]:0});t.postMessage(Object.assign(Object.assign({},h),{id:o}),f)})}),t.start&&t.start()}function nt(n){return n.constructor.name==="MessagePort"}function V(n){nt(n)&&n.close()}function et(n,t){let e=new Map;return n.addEventListener("message",function(s){let{data:o}=s;if(!o||!o.id)return;let c=e.get(o.id);if(c)try{c(o)}finally{e.delete(o.id)}}),I(n,e,[],t)}function S(n){if(n)throw new Error("Proxy has been released and is not useable")}function $(n){return A(n,new Map,{type:"RELEASE"}).then(()=>{V(n)})}var P=new WeakMap,R="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{let t=(P.get(n)||0)-1;P.set(n,t),t===0&&$(n)});function rt(n,t){let e=(P.get(t)||0)+1;P.set(t,e),R&&R.register(n,t,n)}function st(n){R&&R.unregister(n)}function I(n,t,e=[],r=function(){}){let s=!1,o=new Proxy(r,{get(c,u){if(S(s),u===Q)return()=>{st(o),$(n),t.clear(),s=!0};if(u==="then"){if(e.length===0)return{then:()=>o};let i=A(n,t,{type:"GET",path:e.map(a=>a.toString())}).then(m);return i.then.bind(i)}return I(n,t,[...e,u])},set(c,u,i){S(s);let[a,l]=_(i);return A(n,t,{type:"SET",path:[...e,u].map(h=>h.toString()),value:a},l).then(m)},apply(c,u,i){S(s);let a=e[e.length-1];if(a===J)return A(n,t,{type:"ENDPOINT"}).then(m);if(a==="bind")return I(n,t,e.slice(0,-1));let[l,h]=D(i);return A(n,t,{type:"APPLY",path:e.map(f=>f.toString()),argumentList:l},h).then(m)},construct(c,u){S(s);let[i,a]=D(u);return A(n,t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:i},a).then(m)}});return rt(o,n),o}function it(n){return Array.prototype.concat.apply([],n)}function D(n){let t=n.map(_);return[t.map(e=>e[0]),it(t.map(e=>e[1]))]}var W=new WeakMap;function ot(n,t){return W.set(n,t),n}function at(n){return Object.assign(n,{[F]:!0})}function _(n){for(let[t,e]of H)if(e.canHandle(n)){let[r,s]=e.serialize(n);return[{type:"HANDLER",name:t,value:r},s]}return[{type:"RAW",value:n},W.get(n)||[]]}function m(n){switch(n.type){case"HANDLER":return H.get(n.name).deserialize(n.value);case"RAW":return n.value}}function A(n,t,e,r){return new Promise(s=>{let o=ct();t.set(o,s),n.start&&n.start(),n.postMessage(Object.assign({id:o},e),r)})}function ct(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var G=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],L=1,x=8,d=new Uint32Array(96),C=class n{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[e,r]=new Uint8Array(t,0,2);if(e!==219)throw new Error("Data does not appear to be in a KDBush format.");let s=r>>4;if(s!==L)throw new Error(`Got v${s} data when expected v${L}.`);let o=G[r&15];if(!o)throw new Error("Unrecognized array type.");let[c]=new Uint16Array(t,2,1),[u]=new Uint32Array(t,4,1);return new n(u,c,o,void 0,t)}constructor(t,e=64,r=Float64Array,s=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let c=G.indexOf(this.ArrayType),u=t*2*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(c<0)throw new Error(`Unexpected typed array class: ${r}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,x,t),this.coords=new r(o,x+i+a,t*2),this._pos=t*2,this._finished=!0;else{let l=this.data=new s(x+u+i+a);this.ids=new this.IndexArrayType(l,x,t),this.coords=new r(l,x+i+a,t*2),this._pos=0,this._finished=!1,new Uint8Array(l,0,2).set([219,(L<<4)+c]),new Uint16Array(l,2,1)[0]=e,new Uint32Array(l,4,1)[0]=t}}add(t,e){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return N(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=[];for(;i>0;){let l=d[--i],h=d[--i],f=d[--i];if(h-f<=u){for(let g=f;g<=h;g++){let E=c[2*g],k=c[2*g+1];E>=t&&E<=r&&k>=e&&k<=s&&a.push(o[g])}continue}let y=f+h>>1,w=c[2*y],p=c[2*y+1];w>=t&&w<=r&&p>=e&&p<=s&&a.push(o[y]),(l===0?t<=w:e<=p)&&(d[i++]=f,d[i++]=y-1,d[i++]=1-l),(l===0?r>=w:s>=p)&&(d[i++]=y+1,d[i++]=h,d[i++]=1-l)}return a}within(t,e,r){let s=[];return this.withinInto(t,e,r,s),s}withinInto(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=0,l=r*r;for(;i>0;){let h=d[--i],f=d[--i],y=d[--i];if(f-y<=u){for(let E=y;E<=f;E++)j(c[2*E],c[2*E+1],t,e)<=l&&(s[a++]=o[E]);continue}let w=y+f>>1,p=c[2*w],g=c[2*w+1];j(p,g,t,e)<=l&&(s[a++]=o[w]),(h===0?t-r<=p:e-r<=g)&&(d[i++]=y,d[i++]=w-1,d[i++]=1-h),(h===0?t+r>=p:e+r>=g)&&(d[i++]=w+1,d[i++]=f,d[i++]=1-h)}return a}};function N(n,t,e,r,s,o){if(s-r<=e)return;let c=r+s>>1;K(n,t,c,r,s,o),N(n,t,e,r,c-1,1-o),N(n,t,e,c+1,s,1-o)}function K(n,t,e,r,s,o){for(;s>r;){if(s-r>600){let a=s-r+1,l=e-r+1,h=Math.log(a),f=.5*Math.exp(2*h/3),y=.5*Math.sqrt(h*f*(a-f)/a)*(l-a/2<0?-1:1),w=Math.max(r,Math.floor(e-l*f/a+y)),p=Math.min(s,Math.floor(e+(a-l)*f/a+y));K(n,t,e,w,p,o)}let c=t[2*e+o],u=r,i=s;for(b(n,t,r,e),t[2*s+o]>c&&b(n,t,r,s);u<i;){for(b(n,t,u,i),u++,i--;t[2*u+o]<c;)u++;for(;t[2*i+o]>c;)i--}t[2*r+o]===c?b(n,t,r,i):(i++,b(n,t,i,s)),i<=e&&(r=i+1),e<=i&&(s=i-1)}}function b(n,t,e,r){O(n,e,r),O(t,2*e,2*r),O(t,2*e+1,2*r+1)}function O(n,t,e){let r=n[t];n[t]=n[e],n[e]=r}function j(n,t,e,r){let s=n-e,o=t-r;return s*s+o*o}var v=class{constructor(){M(this,"index",null);M(this,"xCoords",null);M(this,"yCoords",null)}buildIndex(t){this.clear(),this.xCoords=new Float64Array(t.length),this.yCoords=new Float64Array(t.length);for(let[r,s]of t.entries())this.xCoords[r]=s.x,this.yCoords[r]=s.y;let e=new C(t.length);for(let r=0;r<t.length;r++)e.add(this.xCoords[r],this.yCoords[r]);return e.finish(),this.index=e,e.data}clear(){this.index=null,this.xCoords=null,this.yCoords=null}findNearestPoint(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return null;let s=this.index.within(t,e,r);if(s.length===0)return null;let o=s[0],c=1/0;for(let u of s){let i=t-this.xCoords[u],a=e-this.yCoords[u],l=i*i+a*a;l<c&&(c=l,o=u)}return{x:this.xCoords[o],y:this.yCoords[o]}}findPointsInRadius(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return[];let s=this.index.within(t,e,r),o=Array.from({length:s.length});for(let[c,u]of s.entries())o[c]={x:this.xCoords[u],y:this.yCoords[u]};return o}};U(new v);\n/*! Bundled license information:\n\ncomlink/dist/esm/comlink.mjs:\n (**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n *)\n*/\n')}function an({snapPoints:e,snapRadius:t=50}){let n=useRef(null),r=useRef(null),a=useRef(false),i=useCallback(()=>{if(a.current)return null;if(!r.current){let o=new ae;r.current={worker:o,api:it.wrap(o)};}return r.current.api},[]);useEffect(()=>(a.current=false,i(),()=>{a.current=true,r.current?.worker.terminate(),r.current=null,n.current=null;}),[i]);let s=useCallback(()=>{let o=i();if(!e?.length||!o)return null;if(n.current?.points!==e){let l={points:e,built:o.buildIndex(e)};n.current=l,l.built.catch(()=>{n.current===l&&(n.current=null);});}return {api:o,built:n.current.built}},[e,i]);useEffect(()=>{s()?.built.catch(()=>{});},[s]);let c=useCallback(async o=>{let l=s();if(!l)return null;let[,m]=await Promise.all([l.built,l.api.findNearestPoint(o.x,o.y,t)]);return m},[s,t]),p=useCallback(async o=>{let l=s();if(!l)return [];let[,m]=await Promise.all([l.built,l.api.findPointsInRadius(o.x,o.y,t)]);return m},[s,t]);return {findNearestPoint:c,findPointsInRadius:p}}
11
+ export{ke as a,Ke as b,rt as c,an as d};
@@ -0,0 +1,10 @@
1
+ import {a as a$1}from'./chunk-VXZT2JR2.mjs';import {a as a$4,b as b$1}from'./chunk-BIDNNBRG.mjs';import {c,d}from'./chunk-IROFSPEN.mjs';import {a as a$2}from'./chunk-NQIZ3U7Q.mjs';import {e}from'./chunk-AYQN3OH2.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/8';import k,{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={xxs:8,xs:12,sm:16,md:20,lg:24},D=k.forwardRef((t,a$2)=>{let o=a(a$2),{tooltipProps:n}=c(t,o);return n?jsx(a$1,{...n,children:jsx(u,{...t,ref:o})}):jsx(u,{...t,ref:o})});D.displayName="ActionIconButton";var u=k.forwardRef((t,a)=>{let[o,n]=e(t,a,a$2),{className:s,style:i,icon:O,size:m="md",variant:p="primary",UNSAFE_isVisuallyInteractiveOnly:r,elementType:f=r?"div":"button",isExcludedFromRovingFocus:b$2,isDisabled:l,dragProps:_,"data-block-id":H,"data-block-class":V,"aria-label":c,"aria-labelledby":d$1,slot:W,...I}=o,{draggable:w,onDragStart:M,onDrag:U,onDragEnd:h}=o;useEffect(()=>{!c&&!d$1&&!r&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[c,d$1,r]);let{buttonProps:z,isPressed:q,ref:G,isFocusVisible:y,isFocused:Y,isHovered:A,uiStateOptions:B}=d({...I,"aria-label":c,"aria-labelledby":d$1,isDisabled:l,excludeFromTabOrder:I.excludeFromTabOrder??b$2,elementType:f}),Z=a$3({"data-block-id":H,"data-block-class":V,"data-focused":Y,"data-focus-visible":y,"data-disabled":l,"data-hovered":A,"data-pressed":q,"data-bui-avoid-focus":b$2});return jsxs(f,{...c$1(z,Z,_,{draggable:w,onDragStart:M,onDrag:U,onDragEnd:h}),className:a$5(b$1({variant:p,size:m,isDisabled:!!l,isFocusVisible:y,isHovered:A}),"BaselineUI-ActionIconButton",typeof s=="function"?s(B):s),ref:b(n,G),style:typeof i=="function"?i(B):i,...r&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(O,{role:"presentation",size:K[m]}),p==="popover"&&jsx(CaretDownIcon,{size:8,className:a$4})]})});u.displayName="ActionIconButtonCore";export{D as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$3}from'./chunk-6M7PJXEE.mjs';import {c}from'./chunk-YYU46XNM.mjs';import {a as a$2}from'./chunk-6Q5PNIYZ.mjs';import {b as b$1}from'./chunk-YDUKC7QS.mjs';import {a as a$5,b as b$3}from'./chunk-IROFSPEN.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {b as b$2,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {assignInlineVars}from'@vanilla-extract/dynamic';import b,{useContext,useState,useEffect,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 $="var(--cjv3et0)",G=a({defaultClassName:"cjv3et1 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g9 _1yep5z6mf _1yep5z6mh",variantClassNames:{size:{sm:"cjv3et2",md:"cjv3et3",lg:"cjv3et4",content:"cjv3et5"},variant:{primary:"_1yep5z613z",ghost:"cjv3et7"},overlayType:{modal:"cjv3et8",popover:"cjv3et9"},isDrawer:{true:"cjv3eta _1yep5z6yy _1yep5z6yz _1yep5z6z0 _1yep5z6zm _1yep5z6zn _1yep5z6zo _1yep5z618m"},isFocusVisible:{true:"_1yep5z61rf _1yep5z61v9 _1yep5z61vb _1yep5z61vd"}},defaultVariants:{},compoundVariants:[]});function J(e,t){let o=e["aria-label"],l=e["aria-labelledby"],[s,r]=useState(()=>o||"");return useEffect(()=>{if(o){r(o);return}if(!l){r("");return}let a=a$6(t?.current),d=t?.current?.getRootNode()??a,T=l.split(/\s+/).filter(Boolean),i=()=>{let c=T.map(f=>b$3(t?.current,f)),u=c.filter(Boolean).join(" ");return u&&r(u),c.every(f=>f!==void 0)};if(i())return;let g=d===a?a.body:d,p=new MutationObserver(()=>{i()&&p.disconnect();});return p.observe(g,{childList:true,subtree:true}),()=>{p.disconnect();}},[o,l,t]),s}var z=b.createContext({titleProps:{}}),X=b.forwardRef(({children:e,className:t,style:o,inheritDrawer:l,size:s="md",variant:r="primary","data-block-id":a,"data-block-class":d,drawerBackground:T,...i},g)=>{let p=b.useRef(null),c$2=b.useRef(null),{containerWidth:u,shouldContainOverlays:f}=useContext(b$1),{isDrawer:_,closeDrawer:Z,dialogStyle:w,setDialogElement:R,isWithinModal:h}=useContext(c),y=b.useId(),L=_&&!!l,m=L&&!i["aria-label"]&&!i["aria-labelledby"],[x,ee]=useState();useEffect(()=>{let n=c$2.current;if(!m||!n)return;let H=()=>{ee(a$5(n,y)?.textContent??null);};H();let V=new MutationObserver(H);return V.observe(n,{characterData:true,childList:true,subtree:true}),()=>{V.disconnect();}},[m,y]);let N=x?.trim()??"",E=x===void 0||N!=="",te=J(i,c$2),oe=m?N:te,{focusProps:re,isFocusVisible:M}=a$1(),{dialogProps:ae,titleProps:j}=a$2(i,p),ie=useMemo(()=>({titleProps:j}),[j]),le=useMemo(()=>m?{titleProps:{id:y},isTitleHidden:E}:{titleProps:{}},[m,y,E]);return L?jsx(z.Provider,{value:le,children:jsx(a$3,{title:oe,onCloseRequest:Z,className:t,style:{...w,...o},...i,"aria-labelledby":m&&x!==null?y:i["aria-labelledby"],"data-drawer":true,"data-block-id":a,"data-block-class":d,ref:b$2(g,c$2,n=>{R(n);}),background:T,children:e})}):jsx(z.Provider,{value:ie,children:jsx("section",{...c$1(ae,re),"data-block-id":a,"data-block-class":d,"data-focus-visible":M||void 0,"data-overlay-type":h?"modal":"popover",ref:b$2(p,g,n=>{R(n);}),style:{...w,...o,...assignInlineVars({[$]:u&&f?`${u}px`:"100vw"})},className:a$4(G({size:_?"content":s,variant:r,isDrawer:_,isFocusVisible:M,overlayType:h?"modal":"popover"}),"BaselineUI-Dialog",t),children:e})})});X.displayName="Dialog";var Y=b.forwardRef(({children:e,className:t,style:o},l)=>{let{titleProps:s,isTitleHidden:r}=useContext(z),a=r?{display:"none"}:null;return b.isValidElement(e)?b.cloneElement(e,{...s,...r?{hidden:true}:null,ref:l,className:a$4(e.props.className,t),style:{...e.props.style,...o,...a}}):jsx("h3",{...s,hidden:r,ref:l,className:t,style:{...o,...a},children:e})});Y.displayName="DialogTitle";export{X as a,Y as b};