efficient-shell 11.8.0 → 11.10.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 (374) hide show
  1. package/README.md +9 -0
  2. package/dist/{Browser-NMILHEUX.js → Browser-FIRNNCSC.js} +17 -17
  3. package/dist/Calculator-ELI5Z3XW.js +29 -0
  4. package/dist/{CurrencyConverter-TAWZDMT4.js → CurrencyConverter-LU7QXMOI.js} +9 -9
  5. package/dist/{Documents-SDOY3ZA3.js → Documents-CE7YKNJM.js} +24 -24
  6. package/dist/Files-ARRIIZZ6.js +88 -0
  7. package/dist/{Notepad-DZSDABU7.js → Notepad-HNED2SWM.js} +10 -10
  8. package/dist/PdfViewer-ZRDIG2L2.js +1 -0
  9. package/dist/PomodoroTimer-ZJ432VPC.js +91 -0
  10. package/dist/{Preview-6Z6K5QLK.js → Preview-OGSYTTKC.js} +38 -38
  11. package/dist/Sidebar-ETWHTFNP.js +44 -0
  12. package/dist/Spreadsheet-4HZR2TUV.js +75 -0
  13. package/dist/{Stock-HJN2BSAD.js → Stock-4BOTUHWE.js} +3 -3
  14. package/dist/{Weather-G7AOUS36.js → Weather-NDUOK3P3.js} +21 -21
  15. package/dist/{WorldClock-GE3DGYYU.js → WorldClock-FH6NFTOM.js} +4 -4
  16. package/dist/ai/index.js +78 -78
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChartTooltip.js +1 -1
  28. package/dist/charts/ChordChart.js +1 -1
  29. package/dist/charts/ColumnChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/SpecChart.js +1 -1
  42. package/dist/charts/StatTile.js +1 -1
  43. package/dist/charts/SunburstChart.js +1 -1
  44. package/dist/charts/TimeSeriesChart.js +1 -1
  45. package/dist/charts/TreemapChart.js +1 -1
  46. package/dist/charts/WaterfallChart.js +1 -1
  47. package/dist/{chunk-CD7UWMPX.js → chunk-276JUQXK.js} +1 -1
  48. package/dist/{chunk-6EIZOX6W.js → chunk-2CPYXRR2.js} +8 -8
  49. package/dist/{chunk-SXNQHIBY.js → chunk-2JTG3U5L.js} +1 -1
  50. package/dist/{chunk-NGLU2GKE.js → chunk-2UTCGWMZ.js} +3 -3
  51. package/dist/{chunk-JNQF5CBB.js → chunk-2V3LKX7G.js} +5 -5
  52. package/dist/{chunk-WDQI3FV6.js → chunk-36VIGB6J.js} +6 -6
  53. package/dist/{chunk-4XNVIKZZ.js → chunk-37JAU3U7.js} +3 -3
  54. package/dist/{chunk-DU4WEVNS.js → chunk-4L4GQW7P.js} +1 -1
  55. package/dist/chunk-4LQRLYB4.js +22 -0
  56. package/dist/{chunk-4EZIWLJJ.js → chunk-4UKPDURO.js} +1 -1
  57. package/dist/{chunk-SDDV3UCN.js → chunk-4VF66WBB.js} +12 -12
  58. package/dist/chunk-5CPRZ27M.js +28 -0
  59. package/dist/{chunk-YCWALB3A.js → chunk-5DZN6ZDE.js} +9 -9
  60. package/dist/{chunk-SS5SQMIB.js → chunk-5MGNT7XM.js} +2 -2
  61. package/dist/{chunk-EYPKBJYG.js → chunk-5PP435FL.js} +1 -1
  62. package/dist/chunk-5XVXYBIQ.js +8 -0
  63. package/dist/{chunk-EOWUUOVE.js → chunk-7N4P6LGD.js} +1 -1
  64. package/dist/chunk-7QRKZOXR.js +12 -0
  65. package/dist/{chunk-7TZV6G2F.js → chunk-A2SP4IZV.js} +1 -1
  66. package/dist/chunk-A4FCXZSY.js +8 -0
  67. package/dist/{chunk-JFV5CQN4.js → chunk-A65PRSKV.js} +4 -4
  68. package/dist/chunk-ABKCC7VB.js +9 -0
  69. package/dist/chunk-ABKFALDE.js +8 -0
  70. package/dist/{chunk-X5TZHOTI.js → chunk-AFROFSDW.js} +1 -1
  71. package/dist/chunk-AJ6HMM4P.js +20 -0
  72. package/dist/chunk-ALMBY7QO.js +6 -0
  73. package/dist/{chunk-72LJMEL6.js → chunk-B4D23ZLJ.js} +1 -1
  74. package/dist/{chunk-FXOYA2VJ.js → chunk-BAT5B2LE.js} +1 -1
  75. package/dist/{chunk-SHO35OPO.js → chunk-BXTSBORU.js} +3 -3
  76. package/dist/{chunk-47DO42IW.js → chunk-CFFT5OCV.js} +1 -1
  77. package/dist/{chunk-WOXQODYQ.js → chunk-D2BXHFYK.js} +1 -1
  78. package/dist/{chunk-RHDM7HRD.js → chunk-DGA4SO27.js} +2 -2
  79. package/dist/{chunk-OTVK7DJM.js → chunk-DH2DKQKS.js} +1 -1
  80. package/dist/{chunk-VAK5FQXH.js → chunk-DWR6RVX5.js} +4 -4
  81. package/dist/{chunk-LT6PG6UW.js → chunk-DXFG4H4V.js} +1 -1
  82. package/dist/{chunk-4TYIYL56.js → chunk-E2LRAOCL.js} +10 -10
  83. package/dist/{chunk-MS5APD3V.js → chunk-ED6HJBCO.js} +1 -1
  84. package/dist/{chunk-C764JODK.js → chunk-EMUZJMR3.js} +1 -1
  85. package/dist/chunk-EOVXFXVV.js +2 -0
  86. package/dist/{chunk-MXGDFO6A.js → chunk-EOYGTVNS.js} +5 -5
  87. package/dist/{chunk-FA5FBNWF.js → chunk-EP5BHBZQ.js} +1 -1
  88. package/dist/chunk-FBACFP4U.js +4 -0
  89. package/dist/{chunk-JFBL4PR3.js → chunk-FNMF42DQ.js} +2 -2
  90. package/dist/{chunk-ORIXCEKO.js → chunk-FOHOSUK3.js} +1 -1
  91. package/dist/{chunk-ECJKIPWU.js → chunk-FRNSCVPN.js} +1 -1
  92. package/dist/chunk-FSRHVB4A.js +9 -0
  93. package/dist/{chunk-YQFGRYEF.js → chunk-FTGA5IPI.js} +14 -14
  94. package/dist/{chunk-JPNAEN53.js → chunk-FZM3ZPW3.js} +1 -1
  95. package/dist/chunk-G2BZ7NCM.js +19 -0
  96. package/dist/{chunk-IXOL7Y3Z.js → chunk-GNWK77U7.js} +1 -1
  97. package/dist/{chunk-OPN4I565.js → chunk-GPCTDEXQ.js} +1 -1
  98. package/dist/{chunk-C6YAFZG3.js → chunk-GV5VNWPG.js} +2 -2
  99. package/dist/{chunk-JSG2AKCG.js → chunk-H5YD72OP.js} +1 -1
  100. package/dist/{chunk-RDYFZHT3.js → chunk-HBS4HYQM.js} +1 -1
  101. package/dist/{chunk-TQE6O2JA.js → chunk-HRXQCHKI.js} +3 -3
  102. package/dist/chunk-HTTICQBP.js +27 -0
  103. package/dist/{chunk-LJN77RG6.js → chunk-HWFBNYNI.js} +1 -1
  104. package/dist/chunk-HYNUJY6W.js +13 -0
  105. package/dist/{chunk-5CXFABVD.js → chunk-HYXDKY2L.js} +1 -1
  106. package/dist/{chunk-5F2AIDPY.js → chunk-IAUEISDQ.js} +9 -9
  107. package/dist/{chunk-OBJGUJIE.js → chunk-IDRAW6MT.js} +2 -2
  108. package/dist/chunk-IEHTZR5M.js +7 -0
  109. package/dist/chunk-IH2KC3NQ.js +5 -0
  110. package/dist/{chunk-RYLTVHCV.js → chunk-IKKQ4P4R.js} +12 -12
  111. package/dist/{chunk-MDYJVXWD.js → chunk-IW2QNPDG.js} +2 -2
  112. package/dist/chunk-IXSSBGRD.js +13 -0
  113. package/dist/{chunk-54NMFQMW.js → chunk-JADBOQ7S.js} +5 -5
  114. package/dist/{chunk-ZGOHRLXG.js → chunk-JGVKGEIV.js} +1 -1
  115. package/dist/{chunk-XYECIBVX.js → chunk-JJHPPTM6.js} +1 -1
  116. package/dist/{chunk-TMMNCXQT.js → chunk-KMSK6QQB.js} +1 -1
  117. package/dist/{chunk-4MBYFQOI.js → chunk-KPFYXVCO.js} +9 -9
  118. package/dist/{chunk-ZXVJL7MS.js → chunk-KZ6JVHFI.js} +1 -1
  119. package/dist/{chunk-4ULRP4Y4.js → chunk-L3RLB37Y.js} +1 -1
  120. package/dist/{chunk-ZD36QKQS.js → chunk-L433UT5E.js} +1 -1
  121. package/dist/{chunk-V6Y4OC6K.js → chunk-LCHU3ZG4.js} +8 -8
  122. package/dist/{chunk-VCMHBUKI.js → chunk-LE5LWALR.js} +1 -1
  123. package/dist/{chunk-VHF3CJVO.js → chunk-LLNWE7DR.js} +30 -30
  124. package/dist/{chunk-B634WHJ2.js → chunk-LNGLJA6K.js} +2 -2
  125. package/dist/{chunk-QVZKRROQ.js → chunk-LPTN55KO.js} +1 -1
  126. package/dist/chunk-LVHQJ5TW.js +9 -0
  127. package/dist/{chunk-AFYLVV74.js → chunk-LZJCULO7.js} +1 -1
  128. package/dist/{chunk-E6GDAV5R.js → chunk-MFDOGLFO.js} +3 -3
  129. package/dist/chunk-MG4IUKVP.js +11 -0
  130. package/dist/{chunk-SXQZ5GTA.js → chunk-MOL2ND6G.js} +6 -6
  131. package/dist/{chunk-4QK4WNPB.js → chunk-MQHUVZWM.js} +1 -1
  132. package/dist/{chunk-7ELJQL7J.js → chunk-MWKLLAJT.js} +1 -1
  133. package/dist/chunk-N3OJ47VK.js +1 -0
  134. package/dist/{chunk-RQDVAUXD.js → chunk-N5KO2IHG.js} +4 -4
  135. package/dist/chunk-N7645DNN.js +6 -0
  136. package/dist/{chunk-DGNAUGZ3.js → chunk-NFNDXE5O.js} +4 -4
  137. package/dist/{chunk-IDI3IOY4.js → chunk-NGUXPP5Q.js} +65 -65
  138. package/dist/{chunk-QQ2LDC6C.js → chunk-NJN5IKWO.js} +1 -1
  139. package/dist/{chunk-QYL26AB4.js → chunk-NSYCJTHE.js} +1 -1
  140. package/dist/chunk-NTKNM25F.js +15 -0
  141. package/dist/{chunk-IMDGMUE3.js → chunk-O4OFURPC.js} +1 -1
  142. package/dist/{chunk-5H4SWQGM.js → chunk-OE77XFOV.js} +1 -1
  143. package/dist/{chunk-DJW7CM3W.js → chunk-ONIL7WXO.js} +1 -1
  144. package/dist/{chunk-2E2SUEEE.js → chunk-OQG3XO4Y.js} +1 -1
  145. package/dist/{chunk-PVPMJ5G2.js → chunk-OS2KE6QG.js} +4 -4
  146. package/dist/{chunk-VQBEZNHC.js → chunk-OUXSI6X4.js} +1 -1
  147. package/dist/{chunk-CLTRQ7AQ.js → chunk-OYTRB237.js} +1 -1
  148. package/dist/{chunk-KTCM64DQ.js → chunk-OZEPYQ7E.js} +1 -1
  149. package/dist/{chunk-3NRQNKVP.js → chunk-P7NO3NGC.js} +11 -11
  150. package/dist/{chunk-SX5BSWTN.js → chunk-PAC4LK2N.js} +5 -5
  151. package/dist/{chunk-UEISJFZH.js → chunk-PBMAMVSE.js} +5 -5
  152. package/dist/{chunk-O3MBPAWZ.js → chunk-PC44XTGN.js} +1 -1
  153. package/dist/chunk-PEVWAJUR.js +7 -0
  154. package/dist/{chunk-6UBOLLBC.js → chunk-PMKR2BF2.js} +21 -21
  155. package/dist/{chunk-JH4ZCPHW.js → chunk-PR42NIDL.js} +10 -10
  156. package/dist/{chunk-FT3QRQWY.js → chunk-PTWKG635.js} +3 -3
  157. package/dist/{chunk-ESZHN7PV.js → chunk-QIEAZN6Z.js} +1 -1
  158. package/dist/{chunk-DQQKG46I.js → chunk-QIVIQUKB.js} +7 -7
  159. package/dist/{chunk-KQOY4RGP.js → chunk-QL5E3MU3.js} +1 -1
  160. package/dist/chunk-QRZBLNOQ.js +4 -0
  161. package/dist/{chunk-G3KXB7SP.js → chunk-QVAOSKFO.js} +11 -11
  162. package/dist/{chunk-2UO47XB4.js → chunk-R64OZ6TC.js} +26 -12
  163. package/dist/{chunk-SYZLS2JA.js → chunk-RDKIYORS.js} +1 -1
  164. package/dist/{chunk-JTMEFXRL.js → chunk-RDTKMSEK.js} +1 -1
  165. package/dist/{chunk-RRE2NNFS.js → chunk-RKL47W7I.js} +6 -6
  166. package/dist/{chunk-3V5GSTZI.js → chunk-RPTOAKLB.js} +1 -1
  167. package/dist/{chunk-LJAYUDN2.js → chunk-RQ6TC6RM.js} +1 -1
  168. package/dist/{chunk-T7PVHIXI.js → chunk-RSJLN3EG.js} +1 -1
  169. package/dist/{chunk-JQBVSPF5.js → chunk-S4FPYCUU.js} +3 -3
  170. package/dist/{chunk-SAP4YI2Y.js → chunk-SDAX6BXF.js} +1 -1
  171. package/dist/{chunk-KGSOOXA7.js → chunk-SIA3W7VE.js} +6 -6
  172. package/dist/{chunk-MTIP5DH2.js → chunk-SJQKEIS7.js} +3 -3
  173. package/dist/{chunk-OH5L6HYW.js → chunk-SXBOODCJ.js} +4 -4
  174. package/dist/{chunk-3IUPYCW3.js → chunk-SZTIP6T7.js} +1 -1
  175. package/dist/{chunk-IBS7647X.js → chunk-T2ZFXPQV.js} +21 -21
  176. package/dist/{chunk-XWFLIGDQ.js → chunk-TE6R53YD.js} +1 -1
  177. package/dist/{chunk-M4BPHBKI.js → chunk-TKE3EF2U.js} +1 -1
  178. package/dist/{chunk-XQZL6JDD.js → chunk-TURECNEK.js} +4 -4
  179. package/dist/{chunk-AWKJZSTO.js → chunk-U6IJL4Q5.js} +1 -1
  180. package/dist/{chunk-DUGYWX2R.js → chunk-U7T2ONAY.js} +2 -2
  181. package/dist/chunk-UGOSZLCD.js +14 -0
  182. package/dist/{chunk-355CRSFS.js → chunk-UIN2LUCZ.js} +13 -13
  183. package/dist/{chunk-P4VKU3SL.js → chunk-UZ7TKJRO.js} +1 -1
  184. package/dist/{chunk-BTRV3SMB.js → chunk-V6LPIDZ6.js} +1 -1
  185. package/dist/chunk-VNTJ7QO5.js +1 -0
  186. package/dist/{chunk-SL77N7VT.js → chunk-VTXCCFJ4.js} +3 -3
  187. package/dist/chunk-WB6E6CSH.js +14 -0
  188. package/dist/{chunk-CRILBBSU.js → chunk-WDZUPDNC.js} +1 -1
  189. package/dist/{chunk-CJH2BGXY.js → chunk-WGLHB6WE.js} +1 -1
  190. package/dist/{chunk-MDV7UQJD.js → chunk-WMS2DCRV.js} +10 -10
  191. package/dist/chunk-WQGBYFS3.js +8 -0
  192. package/dist/{chunk-PCTOL2FX.js → chunk-WTTXLWMK.js} +8 -8
  193. package/dist/{chunk-UGBYAVJV.js → chunk-WYSNMIZN.js} +1 -1
  194. package/dist/{chunk-EKCQ7XBZ.js → chunk-WZMZ3N5B.js} +2 -2
  195. package/dist/chunk-Y2LWUBXX.js +2 -0
  196. package/dist/{chunk-BW47XJLH.js → chunk-YGCVMPIU.js} +1 -1
  197. package/dist/{chunk-3XTSXZAC.js → chunk-YIFRSPUM.js} +10 -10
  198. package/dist/{chunk-EN5NXWT6.js → chunk-YKEB576T.js} +1 -1
  199. package/dist/{chunk-4TGZODSH.js → chunk-YM4XIO4K.js} +5 -5
  200. package/dist/chunk-YMBNVMFU.js +11 -0
  201. package/dist/{chunk-N7U622NC.js → chunk-YY5TUQS4.js} +3 -3
  202. package/dist/{chunk-LXL2UCUR.js → chunk-Z32K3LIJ.js} +1 -1
  203. package/dist/{chunk-P3RXXWXN.js → chunk-ZDDYTXPK.js} +6 -6
  204. package/dist/{chunk-X55LUERI.js → chunk-ZGQ6H2PU.js} +4 -4
  205. package/dist/{chunk-NU5HN3FZ.js → chunk-ZM2NOLT6.js} +12 -12
  206. package/dist/chunk-ZQJTLJUF.js +2 -0
  207. package/dist/{chunk-DANLBFBD.js → chunk-ZRLWE3JM.js} +1 -1
  208. package/dist/chunk-ZVEDA462.js +3 -0
  209. package/dist/{chunk-TGGUYAWA.js → chunk-ZWLOVJWN.js} +1 -1
  210. package/dist/data/DataTable.js +1 -1
  211. package/dist/data/EntityList.js +1 -1
  212. package/dist/data/Kanban.js +1 -1
  213. package/dist/data/ListFooter.js +1 -1
  214. package/dist/data/ListLoadError.js +1 -1
  215. package/dist/data/Pagination.js +1 -1
  216. package/dist/data/ResizableTable.js +1 -1
  217. package/dist/file-intake/index.js +1 -1
  218. package/dist/forms/AlignmentGrid.js +1 -1
  219. package/dist/forms/BorderInput.js +1 -1
  220. package/dist/forms/BrandAssetEditor.js +1 -1
  221. package/dist/forms/Button.js +1 -1
  222. package/dist/forms/Calendar.js +1 -1
  223. package/dist/forms/ColorPicker.js +1 -1
  224. package/dist/forms/ComposerAttachments.js +1 -1
  225. package/dist/forms/CornersInput.js +1 -1
  226. package/dist/forms/DatePicker.js +1 -1
  227. package/dist/forms/DateRangePicker.js +1 -1
  228. package/dist/forms/DateTimePicker.js +1 -1
  229. package/dist/forms/DisplayChips.js +1 -1
  230. package/dist/forms/FilePicker.js +1 -1
  231. package/dist/forms/FormErrorSummary.js +1 -1
  232. package/dist/forms/IconButton.js +1 -1
  233. package/dist/forms/IconPicker.js +1 -1
  234. package/dist/forms/ImageFocusPoint.js +1 -1
  235. package/dist/forms/Input.js +1 -1
  236. package/dist/forms/InputNumber.js +1 -1
  237. package/dist/forms/LinkPicker.d.ts +22 -0
  238. package/dist/forms/LinkPicker.js +1 -1
  239. package/dist/forms/MediaLibrary.js +1 -1
  240. package/dist/forms/MediaUploadField.js +1 -1
  241. package/dist/forms/MediaUploadGrid.js +1 -1
  242. package/dist/forms/MediaUsedInList.js +1 -1
  243. package/dist/forms/NumericKeypad.js +1 -1
  244. package/dist/forms/PictureTiles.js +1 -1
  245. package/dist/forms/PositionInput.js +1 -1
  246. package/dist/forms/RenameField.js +1 -1
  247. package/dist/forms/Segmented.js +1 -1
  248. package/dist/forms/Select.js +1 -1
  249. package/dist/forms/SidesInput.js +1 -1
  250. package/dist/forms/Slider.js +1 -1
  251. package/dist/forms/Snippet.js +1 -1
  252. package/dist/forms/SplitButton.js +1 -1
  253. package/dist/forms/TagInput.js +1 -1
  254. package/dist/forms/TextToolbar.js +1 -1
  255. package/dist/forms/TimePicker.js +1 -1
  256. package/dist/forms/WidthsBar.js +1 -1
  257. package/dist/forms/mediaLibraryMenu.js +1 -1
  258. package/dist/forms/mediaMoveItems.js +1 -1
  259. package/dist/forms/textAlign.js +1 -1
  260. package/dist/forms/useFileIntake.js +1 -1
  261. package/dist/icons/index.js +1 -1
  262. package/dist/index.js +666 -666
  263. package/dist/locales/zh-Hans.js +1 -1
  264. package/dist/map/index.js +3 -3
  265. package/dist/markdown/index.js +1 -1
  266. package/dist/page-tabs/index.js +5 -5
  267. package/dist/pdf/index.js +1 -1
  268. package/dist/shell/Accordion.js +1 -1
  269. package/dist/shell/AppUpdateBanner.js +1 -1
  270. package/dist/shell/Avatar.js +1 -1
  271. package/dist/shell/Banner.js +1 -1
  272. package/dist/shell/Breadcrumbs.js +1 -1
  273. package/dist/shell/BudgetBar.js +1 -1
  274. package/dist/shell/Card.js +1 -1
  275. package/dist/shell/ColoredBadge.js +1 -1
  276. package/dist/shell/ConfirmDialog.js +1 -1
  277. package/dist/shell/ContainerFillChart.js +1 -1
  278. package/dist/shell/ContextMenu.js +1 -1
  279. package/dist/shell/CountBadge.js +1 -1
  280. package/dist/shell/Dialog.js +1 -1
  281. package/dist/shell/Drawer.js +1 -1
  282. package/dist/shell/DropdownMenu.js +1 -1
  283. package/dist/shell/EditableGrid.js +1 -1
  284. package/dist/shell/EmptyState.js +1 -1
  285. package/dist/shell/GlobalSearch.js +1 -1
  286. package/dist/shell/HelpCenter.js +1 -1
  287. package/dist/shell/IconRail.js +1 -1
  288. package/dist/shell/ImageLightbox.js +1 -1
  289. package/dist/shell/ItemCount.js +1 -1
  290. package/dist/shell/LanguageSelect.js +1 -1
  291. package/dist/shell/Markdown.js +1 -1
  292. package/dist/shell/MetricBar.js +1 -1
  293. package/dist/shell/MetricBarLegend.js +1 -1
  294. package/dist/shell/MilestoneTimeline.js +1 -1
  295. package/dist/shell/PageHeader.js +1 -1
  296. package/dist/shell/PopupMenu.js +1 -1
  297. package/dist/shell/ProductionTimeline.js +1 -1
  298. package/dist/shell/ResizeHandle.js +1 -1
  299. package/dist/shell/Result.js +1 -1
  300. package/dist/shell/SearchableSelect.js +1 -1
  301. package/dist/shell/SettingReset.js +1 -1
  302. package/dist/shell/SettingRow.js +1 -1
  303. package/dist/shell/SidebarLayout.js +1 -1
  304. package/dist/shell/SidebarNav.js +1 -1
  305. package/dist/shell/SortableList.js +1 -1
  306. package/dist/shell/Statistic.js +1 -1
  307. package/dist/shell/StatusBadge.js +1 -1
  308. package/dist/shell/StepChain.js +1 -1
  309. package/dist/shell/Stepper.js +1 -1
  310. package/dist/shell/Tabs.js +1 -1
  311. package/dist/shell/TimeAgo.js +1 -1
  312. package/dist/shell/TimelineTrack.js +1 -1
  313. package/dist/shell/Tooltip.js +1 -1
  314. package/dist/shell/TopNav.js +1 -1
  315. package/dist/shell/TransferProgress.js +1 -1
  316. package/dist/shell/Tree.js +1 -1
  317. package/dist/shell/discardGuard.js +1 -1
  318. package/dist/shell/language.js +1 -1
  319. package/dist/shell/strings.d.ts +129 -0
  320. package/dist/shell/strings.js +1 -1
  321. package/dist/shell/toast.js +1 -1
  322. package/dist/telemetry/index.js +1 -1
  323. package/dist/templates/AuthScreen.js +1 -1
  324. package/dist/templates/ChatTemplate.js +1 -1
  325. package/dist/templates/CheckoutTemplate.js +1 -1
  326. package/dist/templates/DashboardTemplate.js +1 -1
  327. package/dist/templates/DataTablePage.js +1 -1
  328. package/dist/templates/EmailTemplate.js +1 -1
  329. package/dist/templates/ErrorBoundary.js +1 -1
  330. package/dist/templates/ErrorPage.js +1 -1
  331. package/dist/templates/FormLayoutPage.js +1 -1
  332. package/dist/templates/GalleryTemplate.js +1 -1
  333. package/dist/ui/index.js +1 -1
  334. package/dist/version.js +1 -1
  335. package/package.json +1 -1
  336. package/dist/Calculator-E7AMPGD5.js +0 -29
  337. package/dist/Files-YQWVU6KZ.js +0 -88
  338. package/dist/PdfViewer-Y3SAVADX.js +0 -1
  339. package/dist/PomodoroTimer-RAZE37BO.js +0 -91
  340. package/dist/Sidebar-GQX7UM3M.js +0 -44
  341. package/dist/Spreadsheet-Q5N5KXGP.js +0 -37
  342. package/dist/chunk-34H3CK7R.js +0 -22
  343. package/dist/chunk-56KADF2B.js +0 -11
  344. package/dist/chunk-77AQNJE2.js +0 -9
  345. package/dist/chunk-7DI3VQCF.js +0 -2
  346. package/dist/chunk-7GTUUBS2.js +0 -28
  347. package/dist/chunk-7INZ7O3A.js +0 -5
  348. package/dist/chunk-CZMSOB2T.js +0 -9
  349. package/dist/chunk-EUAC2T5D.js +0 -2
  350. package/dist/chunk-F3ZFCQGP.js +0 -4
  351. package/dist/chunk-FO6UPEZH.js +0 -7
  352. package/dist/chunk-FSUQTN34.js +0 -14
  353. package/dist/chunk-GDQJBQ5B.js +0 -1
  354. package/dist/chunk-GELPD7EY.js +0 -12
  355. package/dist/chunk-GOZO6LU2.js +0 -8
  356. package/dist/chunk-HCXIXV4E.js +0 -8
  357. package/dist/chunk-IYXNRNAF.js +0 -8
  358. package/dist/chunk-K4JQ3FQI.js +0 -2
  359. package/dist/chunk-L7XIGRIT.js +0 -6
  360. package/dist/chunk-LGDMGDSV.js +0 -14
  361. package/dist/chunk-LKTUUNGJ.js +0 -1
  362. package/dist/chunk-M3JNILT2.js +0 -19
  363. package/dist/chunk-PFKXPSOM.js +0 -6
  364. package/dist/chunk-PLK2WHZG.js +0 -27
  365. package/dist/chunk-RABYGQQU.js +0 -8
  366. package/dist/chunk-RK7MN5L5.js +0 -3
  367. package/dist/chunk-RPL4H6LE.js +0 -9
  368. package/dist/chunk-UGGHQYDN.js +0 -11
  369. package/dist/chunk-VAPSWR5Q.js +0 -13
  370. package/dist/chunk-WMHZA4EO.js +0 -4
  371. package/dist/chunk-WUAKIM2B.js +0 -7
  372. package/dist/chunk-XZAEEX2H.js +0 -13
  373. package/dist/chunk-YDMXW2Q4.js +0 -15
  374. package/dist/chunk-ZS3TIQQ4.js +0 -20
@@ -1,3 +1,3 @@
1
- import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{IconButton_default as r}from"./chunk-VCMHBUKI.js";import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-GDQJBQ5B.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as v}from"react/jsx-runtime";function h(e){const r=String(e),t=/e-(\d+)$/.exec(r);return t?Number(t[1]):r.split(".")[1]?.length??0}var b=(e,r)=>null==e?"":null!=r?e.toFixed(r):String(e);function y({dir:e,compact:t,label:i,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(n,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),v={tabIndex:-1,"aria-label":i,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const r=e.shiftKey;l.current(r);const t=e.currentTarget.ownerDocument.defaultView??window;t.addEventListener("pointerup",u),c.current={off:()=>t.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(r),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...v,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(r,{size:"sm",...v,children:f})}var g=l(function({value:r,onChange:n,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:N,readOnly:j,invalid:E,placeholder:D,size:B,prefix:C,suffix:M,id:O,name:U,className:F="",onBlur:K,onFocus:S,steppers:W,stepFrom:P,snap:T=!1,allowEmpty:$=!0,appearance:z="box",display:L,reportWhileTyping:I=!0,onRevert:R,"aria-label":V,"aria-labelledby":Y,"aria-describedby":A,auto:Q,...H},J){const X="bare"===z,G=e(),Z=Q??G,q=c(),_="string"==typeof M&&""!==M.trim()?M.trim():void 0,ee=e=>function(e,r){let t=e.trim();if(r&&t.endsWith(r)&&(t=t.slice(0,-r.length).trim()),t=t.replace(",","."),""===t||"-"===t||"."===t||"-."===t)return null;const n=Number(t);return Number.isFinite(n)?n:null}(e,_),re=Object.fromEntries(Object.entries(H).filter(([e])=>e.startsWith("data-"))),te=a(),[ne,ie]=u(()=>b(r,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof J?J(e):J&&(J.current=e)},[J]),ce=s(r),ue=s(r);ue.current=r;const se=Boolean(N||j),de=W??!1,pe="compact"===de,me=s(null),[fe,ve]=u(0);i(()=>{const e=me.current;if(!e)return;const r=()=>ve(Math.ceil(e.getBoundingClientRect().width));if(r(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[C]),p(()=>{ee(oe.current)!==r&&ie(b(r,x))},[r,x]);const he=e=>{if(se)return;let r=(ee(oe.current)??P??(D?ee(D):null)??0)+e;null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g);const t=x??String(w??1).split(".")[1]?.length??0;r=Number(r.toFixed(t));const i=b(r,x);oe.current=i,ie(i),n(r),Ne()},be=s(he);be.current=he;const ye=s({unit:w??1,big:k??10*(w??1),locked:se});ye.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const r=r=>{const{unit:t,big:n,locked:i}=ye.current;if(i||e.ownerDocument.activeElement!==e)return;const o=r.deltaY||r.deltaX;o&&(r.preventDefault(),be.current((o<0?1:-1)*(r.shiftKey?n:t)))};return e.addEventListener("wheel",r,{passive:!1}),()=>e.removeEventListener("wheel",r)},[]);const[ge,xe]=u(!1),[we,ke]=u(0),Ne=()=>{X&&ke(e=>e+1)};p(()=>{X&&ge&&document.activeElement===ae.current&&ae.current?.select()},[X,ge,we]);const je=s(!1);p(()=>{if(ge&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const r=ce.current;if(ee(oe.current)===r)return!1;const t=b(r,x);return oe.current=t,ie(t),ue.current!==r&&(R??n)(r),Ne(),!0})},[ge,se,x,n,R]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!$){const e=b(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&n(null),null}let r=e;const t=x??(T?Math.max(h(w??1),h(l??0)):void 0);T&&(r=function(e,r,t){const n=(e-t)/r;return t+Math.round(n+1e-9*Math.sign(e))*r}(r,w??1,l??0)),null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g),null!=t&&(r=Number(r.toFixed(t)));const i=b(r,x);return oe.current=i,ie(i),r===e&&r===ue.current||n(r),r},De=/* @__PURE__ */m("input",{ref:le,id:O,"data-number-input":"",name:U,type:"text",inputMode:0===x?"numeric":"decimal",value:!ge&&L?L(r):ne,disabled:N,readOnly:j,placeholder:D,step:w,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==r?D||void 0:`${b(r,x)}${X&&_?_:""}`,"aria-describedby":[A,Z?q:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":X?"bare":void 0,...re,autoComplete:X?"off":void 0,spellCheck:!X&&void 0,"aria-invalid":E||void 0,"aria-label":V,"aria-labelledby":Y,onChange:e=>(e=>{if(j)return;const r=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==r&&!/^-?\d*[.,]?\d*$/.test(r))return;if(ie(e),!I)return;const t=ee(e);(null!==t||$)&&n(t)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void Ne();const r=w??1,t=k??10*r,n="ArrowUp"===e.key?e.shiftKey?t:r:"ArrowDown"===e.key?-(e.shiftKey?t:r):"PageUp"===e.key?10*r:"PageDown"===e.key?10*-r:null;null===n||se||(e.preventDefault(),he(n))},onFocus:()=>{ce.current=ue.current,xe(!0),je.current=!0,S?.()},onMouseUp:X?e=>{je.current&&(je.current=!1,e.preventDefault())}:void 0,onBlur:()=>{xe(!1),je.current=!1,Ee(),K?.()},className:X?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",ge?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",F].filter(Boolean).join(" "):t({invalid:E,size:B,readOnly:j,auto:Z,className:[C?"pl-[max(var(--space-24),calc(var(--space-control-x-sm)+var(--rosh-number-prefix-width)+var(--space-icon-gap-sm)))]":"",pe?M?"pr-10":"pr-6":de?M?"pr-24":"pr-16":M?"pr-10":"","text-left tabular-nums",F].filter(Boolean).join(" ")})}),Be=Z?/* @__PURE__ */m("span",{id:q,hidden:!0,children:te.settingView.auto}):null;if(X||!C&&!M&&!de)return Be?/* @__PURE__ */f(v,{children:[De,Be]}):De;const Ce=ee(ne);/* @__PURE__ */
2
- return f("div",{className:"relative","data-number-box":"",style:C?{"--rosh-number-prefix-width":`${fe}px`}:void 0,children:[C&&/* @__PURE__ */m("span",{ref:me,className:"pointer-events-none absolute left-(--space-control-x-sm) top-1/2 -translate-y-1/2 whitespace-nowrap text-sm text-ink-faint",children:C}),De,Be,M&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${pe?"right-6":de?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:M}),de&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:pe,label:te.number.decrease,disabled:se||null!=l&&null!=Ce&&Ce<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),r=/* @__PURE__ */m(y,{dir:1,compact:pe,label:te.number.increase,disabled:se||null!=g&&null!=Ce&&Ce>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
1
+ import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{IconButton_default as r}from"./chunk-LE5LWALR.js";import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{Icon as n}from"./chunk-R64OZ6TC.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-VNTJ7QO5.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as v}from"react/jsx-runtime";function h(e){const r=String(e),t=/e-(\d+)$/.exec(r);return t?Number(t[1]):r.split(".")[1]?.length??0}var b=(e,r)=>null==e?"":null!=r?e.toFixed(r):String(e);function y({dir:e,compact:t,label:i,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(n,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),v={tabIndex:-1,"aria-label":i,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const r=e.shiftKey;l.current(r);const t=e.currentTarget.ownerDocument.defaultView??window;t.addEventListener("pointerup",u),c.current={off:()=>t.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(r),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...v,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(r,{size:"sm",...v,children:f})}var g=l(function({value:r,onChange:n,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:N,readOnly:E,invalid:j,placeholder:D,size:C,prefix:O,suffix:L,id:T,name:W,className:B="",onBlur:F,onFocus:M,steppers:S,stepFrom:K,snap:P=!1,allowEmpty:R=!0,appearance:U="box",display:$,reportWhileTyping:z=!0,onRevert:A,"aria-label":V,"aria-labelledby":Y,"aria-describedby":I,auto:J,...Q},Z){const H="bare"===U,X=e(),q=J??X,G=c(),_="string"==typeof L&&""!==L.trim()?L.trim():void 0,ee=e=>function(e,r){let t=e.trim();if(r&&t.endsWith(r)&&(t=t.slice(0,-r.length).trim()),t=t.replace(",","."),""===t||"-"===t||"."===t||"-."===t)return null;const n=Number(t);return Number.isFinite(n)?n:null}(e,_),re=Object.fromEntries(Object.entries(Q).filter(([e])=>e.startsWith("data-"))),te=a(),[ne,ie]=u(()=>b(r,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof Z?Z(e):Z&&(Z.current=e)},[Z]),ce=s(r),ue=s(r);ue.current=r;const se=Boolean(N||E),de=S??!1,pe="compact"===de,me=s(null),[fe,ve]=u(0);i(()=>{const e=me.current;if(!e)return;const r=()=>ve(Math.ceil(e.getBoundingClientRect().width));if(r(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[O]),p(()=>{ee(oe.current)!==r&&ie(b(r,x))},[r,x]);const he=e=>{if(se)return;let r=(ee(oe.current)??K??(D?ee(D):null)??0)+e;null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g);const t=x??String(w??1).split(".")[1]?.length??0;r=Number(r.toFixed(t));const i=b(r,x);oe.current=i,ie(i),n(r),Ne()},be=s(he);be.current=he;const ye=s({unit:w??1,big:k??10*(w??1),locked:se});ye.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const r=r=>{const{unit:t,big:n,locked:i}=ye.current;if(i||e.ownerDocument.activeElement!==e)return;const o=r.deltaY||r.deltaX;o&&(r.preventDefault(),be.current((o<0?1:-1)*(r.shiftKey?n:t)))};return e.addEventListener("wheel",r,{passive:!1}),()=>e.removeEventListener("wheel",r)},[]);const[ge,xe]=u(!1),[we,ke]=u(0),Ne=()=>{H&&ke(e=>e+1)};p(()=>{H&&ge&&document.activeElement===ae.current&&ae.current?.select()},[H,ge,we]);const Ee=s(!1);p(()=>{if(ge&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const r=ce.current;if(ee(oe.current)===r)return!1;const t=b(r,x);return oe.current=t,ie(t),ue.current!==r&&(A??n)(r),Ne(),!0})},[ge,se,x,n,A]);const je=()=>{const e=ee(oe.current);if(null==e){if(!R){const e=b(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&n(null),null}let r=e;const t=x??(P?Math.max(h(w??1),h(l??0)):void 0);P&&(r=function(e,r,t){const n=(e-t)/r;return t+Math.round(n+1e-9*Math.sign(e))*r}(r,w??1,l??0)),null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g),null!=t&&(r=Number(r.toFixed(t)));const i=b(r,x);return oe.current=i,ie(i),r===e&&r===ue.current||n(r),r},De=/* @__PURE__ */m("input",{ref:le,id:T,"data-number-input":"",name:W,type:"text",inputMode:0===x?"numeric":"decimal",value:!ge&&$?$(r):ne,disabled:N,readOnly:E,placeholder:D,step:w,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==r?D||void 0:`${b(r,x)}${H&&_?_:""}`,"aria-describedby":[I,q?G:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":H?"bare":void 0,...re,autoComplete:H?"off":void 0,spellCheck:!H&&void 0,"aria-invalid":j||void 0,"aria-label":V,"aria-labelledby":Y,onChange:e=>(e=>{if(E)return;const r=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==r&&!/^-?\d*[.,]?\d*$/.test(r))return;if(ie(e),!z)return;const t=ee(e);(null!==t||R)&&n(t)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=je(),void Ne();const r=w??1,t=k??10*r,n="ArrowUp"===e.key?e.shiftKey?t:r:"ArrowDown"===e.key?-(e.shiftKey?t:r):"PageUp"===e.key?10*r:"PageDown"===e.key?10*-r:null;null===n||se||(e.preventDefault(),he(n))},onFocus:()=>{ce.current=ue.current,xe(!0),Ee.current=!0,M?.()},onMouseUp:H?e=>{Ee.current&&(Ee.current=!1,e.preventDefault())}:void 0,onBlur:()=>{xe(!1),Ee.current=!1,je(),F?.()},className:H?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",ge?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",B].filter(Boolean).join(" "):t({invalid:j,size:C,readOnly:E,auto:q,className:[O?"pl-[max(var(--space-24),calc(var(--space-control-x-sm)+var(--rosh-number-prefix-width)+var(--space-icon-gap-sm)))]":"",pe?L?"pr-10":"pr-6":de?L?"pr-24":"pr-16":L?"pr-10":"","text-left tabular-nums",B].filter(Boolean).join(" ")})}),Ce=q?/* @__PURE__ */m("span",{id:G,hidden:!0,children:te.settingView.auto}):null;if(H||!O&&!L&&!de)return Ce?/* @__PURE__ */f(v,{children:[De,Ce]}):De;const Oe=ee(ne);/* @__PURE__ */
2
+ return f("div",{className:"relative","data-number-box":"",style:O?{"--rosh-number-prefix-width":`${fe}px`}:void 0,children:[O&&/* @__PURE__ */m("span",{ref:me,className:"pointer-events-none absolute left-(--space-control-x-sm) top-1/2 -translate-y-1/2 whitespace-nowrap text-sm text-ink-faint",children:O}),De,Ce,L&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${pe?"right-6":de?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:L}),de&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:pe,label:te.number.decrease,disabled:se||null!=l&&null!=Oe&&Oe<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),r=/* @__PURE__ */m(y,{dir:1,compact:pe,label:te.number.increase,disabled:se||null!=g&&null!=Oe&&Oe>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
3
3
  return f("span",pe?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[r,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,r]})})()]})});export{g as InputNumber_default};
@@ -1,2 +1,2 @@
1
- import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-GDQJBQ5B.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
1
+ import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-VNTJ7QO5.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
2
2
  return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-2UO47XB4.js";import{SpinnerRing as t}from"./chunk-R2VKEMZH.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:t,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
1
+ import{Icon as e}from"./chunk-R64OZ6TC.js";import{SpinnerRing as t}from"./chunk-R2VKEMZH.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:t,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
2
2
  /* @__PURE__ */l("button",{type:"button",onClick:()=>{h(!x),d?.(!x)},"aria-expanded":x,"aria-controls":x?g:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
3
3
  /* @__PURE__ */n(e,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(x?"rotate-90":"")}),
4
4
  /* @__PURE__ */n("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:t})]}),x&&/* @__PURE__ */n("ol",{id:g,"aria-label":m,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:p})]})}var o={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},d={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function m({status:a}){switch(a){case"active":/* @__PURE__ */
@@ -1,6 +1,6 @@
1
- import{CartesianPlot as e}from"./chunk-RABYGQQU.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-GDQJBQ5B.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),Q=Math.max(...v),A=.08*(Q-j)||1;/* @__PURE__ */
2
- return c(e,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-A,max:Q+A,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:e=>{const t=h[e],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
3
- return c(l,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
1
+ import{ChartTooltip as e}from"./chunk-36VIGB6J.js";import{CartesianPlot as l}from"./chunk-WQGBYFS3.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-VNTJ7QO5.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),L=Math.max(...v),N=.08*(L-j)||1;/* @__PURE__ */
2
+ return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-N,max:L+N,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
3
+ return c(e,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
4
4
  return n("g",{opacity:u?.45:1,children:[
5
5
  /* @__PURE__ */c("line",{x1:p,y1:l(a.high),x2:p,y2:l(a.low),stroke:h,strokeWidth:1.5}),"candle"===m?/* @__PURE__ */c("rect",{x:p-d/2,y:b,width:d,height:y,rx:1,fill:r?h:"transparent",fillOpacity:r?.85:1,stroke:h,strokeWidth:1.5}):/* @__PURE__ */n(s,{children:[
6
6
  /* @__PURE__ */c("line",{x1:p-d/2,y1:l(a.open),x2:p,y2:l(a.open),stroke:h,strokeWidth:2}),
@@ -0,0 +1,27 @@
1
+ import{Dialog as e}from"./chunk-IH2KC3NQ.js";import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-R64OZ6TC.js";import{useShellStrings as n,splitAround as o}from"./chunk-VNTJ7QO5.js";import{createContext as l,useContext as i,useState as s,useRef as a,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var f=l(()=>Promise.resolve(!1)),b=()=>i(f),g=()=>Promise.resolve(!1),p=e=>g(e),v=()=>Promise.resolve(!1),y=e=>v(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:t({variant:"primary"})}},w=t({variant:"secondary"}),C=t({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function P(){/* @__PURE__ */
2
+ return m(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j(){/* @__PURE__ */
3
+ return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F({children:t}){const[r,l]=s(!1),[i,b]=s({message:""}),[p,y]=s(0),N=a(),F=a(null),T=a(0),E=a([]),$=a(null),K=a(null),Q=c(e=>{F.current=e.id,N.current=e.resolve,y(e.id),b(e.options),l(!0)},[]),W=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++T.current,options:t,resolve:e};null===F.current?Q(r):E.current.push(r)})},[Q]),[D,O]=s(!1),[V,Y]=s({message:""}),[H,I]=s(""),J=a(),R=c(e=>(Y(e),I(""),O(!0),new Promise(e=>{J.current=e})),[]),[U,Z]=s(!1),[q,z]=s({}),[A,B]=s(""),G=a(),M=c(e=>{const t="string"==typeof e?{message:e}:e;return z(t),B(t.defaultValue??""),Z(!0),new Promise(e=>{G.current=e})},[]);u(()=>{g=W,v=R,x=M},[W,R,M]);const S=(e,t)=>{if(F.current!==e)return;const r=N.current,n=E.current.shift();n?Q(n):(F.current=null,N.current=void 0,l(!1)),r?.(t)},X=e=>{O(!1),I(""),J.current?.(e)},_=e=>{if(e){const e=A.trim();if(!e&&!q.allowEmpty)return Z(!1),void G.current?.(null);Z(!1),G.current?.(e)}else Z(!1),G.current?.(null)},ee=i.variant||(i.confirmLabel?.toLowerCase().includes("delete")||i.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===V.variant?"warning":"danger"],ne=V.confirmWord,oe=null==ne||H===ne,le=n().dialog,[ie,se]=o(le.typeToConfirm);/* @__PURE__ */
4
+ return d(f.Provider,{value:W,children:[t,
5
+ /* @__PURE__ */m(e,{open:r,onClose:()=>S(p,!1),initialFocus:$,footer:/* @__PURE__ */d(h,{children:[
6
+ /* @__PURE__ */m("button",{ref:$,type:"button",onClick:()=>S(p,!1),className:w,children:i.cancelLabel||le.cancel}),
7
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>S(p,!0),className:te.button,children:i.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
8
+ /* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
9
+ /* @__PURE__ */d("div",{className:"flex-1",children:[
10
+ /* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:i.title||le.confirmTitle}),
11
+ /* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:i.message})]})]})}),
12
+ /* @__PURE__ */d(e,{open:D,onClose:()=>X(!1),initialFocus:null!=ne?void 0:K,footer:/* @__PURE__ */d(h,{children:[
13
+ /* @__PURE__ */m("button",{ref:K,type:"button",onClick:()=>X(!1),className:w,children:V.cancelLabel||le.destructiveCancel}),
14
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>X(!0),disabled:!oe,className:re.button,children:ne??V.confirmLabel??le.destructiveConfirm})]}),children:[
15
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>X(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(j,{})}),
16
+ /* @__PURE__ */d("div",{className:"flex gap-4",children:[
17
+ /* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
18
+ /* @__PURE__ */d("div",{className:"flex-1",children:[
19
+ /* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:V.title||le.destructiveTitle}),
20
+ /* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:V.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
21
+ /* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
22
+ /* @__PURE__ */m("kbd",{className:"rounded border border-line-strong bg-surface-sunken px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),se]}),
23
+ /* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:H,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key&&H===ne&&X(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
24
+ /* @__PURE__ */d(e,{open:U,onClose:()=>_(!1),title:q.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
25
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:q.cancelLabel||le.cancel}),
26
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!q.allowEmpty&&!A.trim(),className:C,children:q.confirmLabel||le.ok})]}),children:[q.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:q.message}),
27
+ /* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:A,onChange:e=>B(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:q.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{F as ConfirmProvider,p as confirm,y as confirmDestructive,N as prompt,b as useConfirm};
@@ -1,4 +1,4 @@
1
- import{Icon as t}from"./chunk-2UO47XB4.js";import{jsxs as n,jsx as e}from"react/jsx-runtime";var r=t=>Array.isArray(t.options);function o(t){const n=[];for(const e of t)r(e)?n.push(...e.options):n.push(e);return n}function i(t,n){const e=[];for(const o of t){if(!r(o)){n(o)&&e.push(o);continue}const t=o.options.filter(n);t.length&&e.push({...o,options:t})}return e}function s(t,o,i,s=""){const a=[];let c=0;return t.forEach((t,u)=>{if(!r(t))return a.push(o(t,c)),void(c+=1);const l=`${i}-group-${u}`,p=c;c+=t.options.length,a.push(
1
+ import{Icon as t}from"./chunk-R64OZ6TC.js";import{jsxs as n,jsx as e}from"react/jsx-runtime";var r=t=>Array.isArray(t.options);function o(t){const n=[];for(const e of t)r(e)?n.push(...e.options):n.push(e);return n}function i(t,n){const e=[];for(const o of t){if(!r(o)){n(o)&&e.push(o);continue}const t=o.options.filter(n);t.length&&e.push({...o,options:t})}return e}function s(t,o,i,s=""){const a=[];let c=0;return t.forEach((t,u)=>{if(!r(t))return a.push(o(t,c)),void(c+=1);const l=`${i}-group-${u}`,p=c;c+=t.options.length,a.push(
2
2
  /* @__PURE__ */n("div",{role:"group","aria-labelledby":l,children:[
3
3
  /* @__PURE__ */e("div",{id:l,role:"presentation","data-option-group-heading":"",className:`truncate px-3 pb-1 pt-2 text-xs font-semibold text-gray-500 ${s}`.trim(),children:t.label}),t.options.map((t,n)=>o(t,p+n))]},l))}),a}function a({selected:n}){/* @__PURE__ */
4
4
  return e(t,{name:"check","aria-hidden":"true",className:"h-4 w-4 shrink-0 "+(n?"":"invisible"),strokeWidth:2.5})}function c(t,n){return t.label.toLowerCase().includes(n)||(t.sublabel?.toLowerCase().includes(n)??!1)}function u({children:t,grows:n=!1}){/* @__PURE__ */
@@ -0,0 +1,13 @@
1
+ import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-HWFBNYNI.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-2UTCGWMZ.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EOVXFXVV.js";import{Icon as p}from"./chunk-R64OZ6TC.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-NJN5IKWO.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as x,glassStyle as k}from"./chunk-5FYDNH4Y.js";import{registerModalEscapeInterceptor as N}from"./chunk-TWVUQUUD.js";import{useShellStrings as j}from"./chunk-VNTJ7QO5.js";import{useState as $,useId as D,useRef as C,useMemo as W,useEffect as S}from"react";import{createPortal as F}from"react-dom";import{jsxs as M,jsx as R}from"react/jsx-runtime";function T(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var E=["right-2","right-8","right-16"],O=[8,32,64];function z(z){const{options:L,placeholder:A,emptyOptionLabel:H,className:I="",disabled:U,id:V,filter:Y=!1,allowFreeText:B=!1,freeTextOption:J,onSearchChange:Z,loading:G=!1,error:K,onRetry:X,rightAdornment:Q,endAction:P,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=Y&&ae&&!U,ce=re||Y,ue=null!=J,de=B||ue,[he,pe]=$(!1),[me,fe]=$(-1),be=D(),ge=V??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=$(""),ke=j(),Ne=H??ke.select.none,je=e=>{xe(e),fe(-1),Z?.(e)},$e=C(null),De=C(null),Ce=C(null),We=C(null),Se=C(he);Se.current=he;const Fe=C(!1),Me=e=>{Se.current&&(Se.current=!1,e&&B&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),je(""))},Re=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?je(""):fe(t));ie([e.value]),Me(!1)}},[Te,Ee]=$(null);y(()=>{if(!Q||he)return void Ee(null);const e=We.current?.offsetWidth??0;Ee(e?e+O[Ue]+6:null)});const Oe=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=W(()=>t(L),[L]),Le=le.join("\0"),Ae=W(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Le,de]),He=Ae.join(", "),Ie=_&&ae&&!U,Ue=(Ie?1:0)+(P?1:0),[Ve,Ye]=$(null),Be=C(null),Je=C(""),Ze=C(()=>{});Ze.current=()=>{const e=De.current,t=Be.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Ae.join("\0")}`;if(o===Je.current)return;Je.current=o;let i=null;r>0&&Ae.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=T(Ae,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ye(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ze.current()}),S(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ze.current());return t.observe(e),()=>t.disconnect()},[re]);const Ge=Ae.length,Ke=!re||!Ve||Ve.shown>=Ge?He:0===Ve.shown?ke.select.selectedCount(Ge):`${Ae.slice(0,Ve.shown).join(", ")} +${Ge-Ve.shown}`,Xe=re&&null!==Ve&&(Ve.shown<Ge||Ve.cut),Qe=he&&ae&&ce;S(()=>{if(!he)return;const e=e=>{const t=e.target;$e.current?.contains(t)||Ce.current?.contains(t)||Me(!0)};document.addEventListener("mousedown",e);const t=b(()=>Me(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,B,ye,Le,z.onChange]),S(()=>{if(he)return N(e=>!("Escape"!==e.key||!Se.current)&&(Me(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Pe=W(()=>{const e=/* @__PURE__ */new Set;return n(L,t=>!e.has(t.value)&&(e.add(t.value),!0))},[L]),qe=W(()=>{if(Z)return Pe;const e=ye.trim().toLowerCase();return e?n(Pe,t=>r(t,e)):Pe},[Pe,ye,Z]),_e=W(()=>t(qe),[qe]),et=ye.trim(),tt=W(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Le]),nt=W(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
2
+ return M("div",{ref:$e,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&($e.current?.contains(t)||Ce.current?.contains(t))||Fe.current||document.activeElement!==De.current&&Me(!0)},children:[(rt=/* @__PURE__ */R("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Ke,onChange:e=>{je(e.target.value),pe(!0)},onFocus:()=>{U||(je(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(U)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Re(nt[me],me):1!==_e.length||_e[0].disabled?B&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),je("")):(ie([et]),Me(!1),De.current?.blur())):Re(_e[0],0)):"Escape"===t.key?(Me(!1),De.current?.blur()):"Tab"===t.key&&Me(!0)},placeholder:Qe?Ke:A||Ne,className:`${se?u:d} ${I} ${a[Ue]}${U?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Qe?" rosh-field-shows-choice":""}`,style:Te?{paddingRight:Te}:void 0,disabled:U}),re?/* @__PURE__ */R(f,{content:!he&&Xe?He:null,className:"block",children:rt}):rt),re&&
3
+ /* @__PURE__ */R("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */R("span",{ref:Be,className:"whitespace-pre"})}),Ue>0&&
4
+ /* @__PURE__ */M(s,{children:[Ie&&
5
+ /* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */R(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */R(p,{name:"close"}),onClick:()=>{ie([]),Me(!1)}}})}),P&&/* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */R(c,{action:P})})]}),Q&&!he&&/* @__PURE__ */R("div",{ref:We,className:`absolute top-1/2 -translate-y-1/2 ${E[Ue]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Q}),he&&F(
6
+ /* @__PURE__ */M("div",{ref:Ce,onMouseDownCapture:()=>{Fe.current=!0,setTimeout(()=>{Fe.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Oe?.left,right:Oe?.right,top:Oe?.top,bottom:Oe?.bottom,minWidth:Oe?.minWidth,width:Oe?.width,...ce&&{maxWidth:Oe?.maxWidth},visibility:Oe?void 0:"hidden",...k()},children:[re&&ae&&_&&!U&&
7
+ /* @__PURE__ */R("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${x}`,children:ke.select.clearAll}),G?
8
+ /* @__PURE__ */R(m,{size:"sm",padding:"py-2",label:ke.search.searching}):K?/* @__PURE__ */M("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
9
+ /* @__PURE__ */R("span",{className:"min-w-0 flex-1",children:K}),X&&/* @__PURE__ */R(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:X,className:"shrink-0",children:ke.list.retry})]}):null,
10
+ /* @__PURE__ */M("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Oe?.maxHeight??w},children:[0===nt.length?G||K?null:/* @__PURE__ */R("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
11
+ return M("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Re(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */R(o,{selected:n}),
12
+ /* @__PURE__ */R("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */R(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&J&&
13
+ /* @__PURE__ */R("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Re(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${x}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:J(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,T as fitChoice};
@@ -1,4 +1,4 @@
1
- import{DropdownMenu as e}from"./chunk-WUAKIM2B.js";import{Fragment as t}from"react";import{jsxs as a,jsx as r,Fragment as n}from"react/jsx-runtime";var i="relative inline-flex items-center gap-2 px-4 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40",s="bg-blue-50 text-blue-600",l="text-gray-600 hover:bg-gray-50 hover:text-gray-900";function c(){/* @__PURE__ */
1
+ import{DropdownMenu as e}from"./chunk-IEHTZR5M.js";import{Fragment as t}from"react";import{jsxs as a,jsx as r,Fragment as n}from"react/jsx-runtime";var i="relative inline-flex items-center gap-2 px-4 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40",s="bg-blue-50 text-blue-600",l="text-gray-600 hover:bg-gray-50 hover:text-gray-900";function c(){/* @__PURE__ */
2
2
  return r("span",{className:"my-3 w-px shrink-0 bg-gray-200","aria-hidden":!0})}function m({item:e,active:t,caret:i}){/* @__PURE__ */
3
3
  return a(n,{children:[e.icon&&/* @__PURE__ */r("span",{className:"h-4 w-4 shrink-0",children:e.icon}),
4
4
  /* @__PURE__ */r("span",{className:"whitespace-nowrap",children:e.label}),null!=e.badge&&/* @__PURE__ */r("span",{className:"ml-0.5 inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-gray-100 px-2 text-2xs font-semibold leading-5 text-gray-600",children:e.badge}),i&&/* @__PURE__ */r("span",{className:"-ml-1 text-xs","aria-hidden":!0,children:"▾"}),t&&/* @__PURE__ */r("span",{className:"absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-blue-600","aria-hidden":!0})]})}function d({items:n,activeKey:d,onSelect:o,brand:u,actions:b,linkAs:h,className:g}){/* @__PURE__ */
@@ -1,14 +1,14 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-ZD36QKQS.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-JTMEFXRL.js";import{ColoredBadge as u}from"./chunk-BW47XJLH.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{Tooltip as f}from"./chunk-QQ2LDC6C.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:L,hint:F,error:O,required:I,className:Q,accept:S="image/*",maxSizeBytes:z,maxFiles:B,fit:E="cover",thumbSize:P=96,placeholder:$,cta:M,acceptHint:H,showCover:R=!1,coverLabel:W,busy:J=!1,busyLabel:X,progress:q,disabled:U=!1,readOnly:G=!1,selected:Y,onItemClick:Z,onItemDoubleClick:V,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=M??te.cta,ae=W??te.cover,ne=X??te.uploading,le=g(),[ie,oe]=b(null),se=U||J,de=!(!k&&!N||se||G),ce=!!w&&!se&&!G,ue=!!j&&!se&&!G,me=!!K&&!U&&!ue,pe=!(!T||!A||se||G),fe=t(se),he=$??r(S,te),ge=d({accept:S,maxSizeBytes:z,maxFiles:B,acceptHint:H,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:P,height:P},Ke=null==Y?null:new Set(Y),Ce=!!Z,Te=P<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,S),a=e.name??o(e.url),n=R&&(e.cover??0===t);/* @__PURE__ */
2
- return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||Z(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:V?()=>V(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Z(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:E}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:E}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
- /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Te?
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-L433UT5E.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-RDTKMSEK.js";import{ColoredBadge as u}from"./chunk-YGCVMPIU.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-R64OZ6TC.js";import{Tooltip as f}from"./chunk-NJN5IKWO.js";import{useShellStrings as h}from"./chunk-VNTJ7QO5.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:T,dropType:C,onDropData:O,label:A,hint:I,error:E,required:F,className:L,accept:P="image/*",maxSizeBytes:S,maxFiles:z,fit:M="cover",thumbSize:$=96,placeholder:R,cta:H,acceptHint:W,showCover:B=!1,coverLabel:Q,busy:U=!1,busyLabel:q,progress:J,disabled:V=!1,readOnly:Y=!1,selected:G,onItemClick:Z,onItemDoubleClick:X,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=H??te.cta,ae=Q??te.cover,ne=q??te.uploading,le=g(),[ie,oe]=b(null),se=V||U,de=!(!k&&!N||se||Y),ce=!!w&&!se&&!Y,ue=!!j&&!se&&!Y,me=!!K&&!V&&!ue,pe=!(!C||!O||se||Y),fe=t(se),he=R??r(P,te),ge=d({accept:P,maxSizeBytes:S,maxFiles:z,acceptHint:W,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(C),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(C);t&&O(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:$,height:$},Ke=null==G?null:new Set(G),Te=!!Z,Ce=$<112,Oe=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,P),a=e.name??o(e.url),n=B&&(e.cover??0===t);/* @__PURE__ */
2
+ return v("div",{...Te?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Te?t=>{t.target.closest?.("button")||Z(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:X?()=>X(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);T?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&T?t=>T("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Te?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Te?a:void 0,onKeyDown:Te&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Z(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Te?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
+ /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Ce?
4
4
  /* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
5
- /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Le=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
5
+ /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Ae=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
6
6
  /* @__PURE__ */x(a,{className:"h-5 w-5"}),
7
- /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Fe=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:P+32},children:[
7
+ /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Ie=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:$+32},children:[
8
8
  /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(a,{})}),
9
9
  /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:he}),
10
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),H&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:H})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:P+32},children:/* @__PURE__ */x("span",{className:J?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
- return v(e,{label:L,labelId:L?`${le}-label`:void 0,htmlFor:le,hint:F,error:O,required:I,className:Q,children:[
12
- /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":L?`${le}-label`:void 0,"aria-describedby":O?`${le}-error`:F?`${le}-hint`:void 0,"aria-busy":J||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Fe:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
- /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof L?L:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Le]}),J&&/* @__PURE__ */x(l,{label:ne,progress:q})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
10
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),W&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:W})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:U?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
+ return v(e,{label:A,labelId:A?`${le}-label`:void 0,htmlFor:le,hint:I,error:E,required:F,className:L,children:[
12
+ /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":A?`${le}-label`:void 0,"aria-describedby":E?`${le}-error`:I?`${le}-hint`:void 0,"aria-busy":U||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Te?
13
+ /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof A?A:te.files,className:"contents",children:p.map(Oe)}):p.map(Oe),Ae]}),U&&/* @__PURE__ */x(l,{label:ne,progress:J})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
14
14
  /* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{k as FULL_BADGE_TILE_PX,N as MediaUploadGrid};
@@ -1,2 +1,2 @@
1
- import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{pad2 as t}from"./chunk-LF27WIN2.js";import{useShellLocale as n}from"./chunk-GDQJBQ5B.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/;function o(e,n){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const r=`${t(e.getHours())}:${t(e.getMinutes())}`;return n?`${r}:${t(e.getSeconds())}`:r}return a.test(e)?e:""}var s=r(function({value:t,onChange:r,min:s,max:u,invalid:m,size:l,className:c="",step:f,...v},d){const p=null!=f&&Number(f)<60,g=n();/* @__PURE__ */
2
- return i("input",{ref:d,type:"time",lang:g,step:f,"aria-invalid":m||void 0,value:o(t,p),min:o(s,p)||void 0,max:o(u,p)||void 0,onChange:e=>r?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...v})});export{s as TimePicker_default};
1
+ import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{pad2 as t}from"./chunk-LF27WIN2.js";import{useShellLocale as n}from"./chunk-VNTJ7QO5.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/;function o(e,n){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const r=`${t(e.getHours())}:${t(e.getMinutes())}`;return n?`${r}:${t(e.getSeconds())}`:r}return a.test(e)?e:""}var s=r(function({value:t,onChange:r,min:s,max:u,invalid:m,size:l,className:c="",step:f,...v},d){const p=null!=f&&Number(f)<60,N=n();/* @__PURE__ */
2
+ return i("input",{ref:d,type:"time",lang:N,step:f,"aria-invalid":m||void 0,value:o(t,p),min:o(s,p)||void 0,max:o(u,p)||void 0,onChange:e=>r?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...v})});export{s as TimePicker_default};
@@ -0,0 +1,7 @@
1
+ import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-DH2DKQKS.js";import{useTabLayer as n,focusableIn as o}from"./chunk-CDAJKLGL.js";import{PopupMenu as i,PopupMenuDivider as a}from"./chunk-QVAOSKFO.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:K,align:L="end",side:S="bottom","aria-label":j,className:A="",triggerClassName:C,menuClassName:E="",minWidth:W=180,linkAs:H,disabled:$,id:N,"aria-describedby":T,"aria-disabled":U=!1,onOpenChange:B,footer:I,footerLabel:J}){const[q,G]=m(!1),[M,O]=m(-1),Q=h(null),z=h(null),P=h(null),R=h(null),V=h(null),F=null!=I&&!1!==I,Y=h({text:"",at:0}),X=g(),Z=g(),_=N??Z,ee=h(B);ee.current=B;const te=h(q);te.current=q;const re=v(e=>{G(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&z.current?.focus()},[]),ne=(t,r)=>{const n=K.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(K[i]))return i}return-1},oe=()=>P.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!q)return;const e=e=>{const t=e.target;if(Q.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[q,re]);const ie=v(()=>{const e=oe(),t=z.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:L,side:S});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=L},[L,S]);p(()=>{q&&ie()}),b(()=>{if(q)return u(()=>z.current,ie)},[q,ie]),b(()=>{if(!q)return;const t=P.current,r=e(K[M])?t?.querySelector(`[data-dropdown-index="${M}"]`):null;(r??t)?.focus({preventScroll:!0})},[q,M]),b(()=>{if(q)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>R.current)},[q,re]),n(R,q&&F);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(K.length-1,-1),se=e=>{O(le(e)),G(!0),te.current||(te.current=!0,ae.current=e,B?.(!0))};p(()=>{const e=ae.current;if(!q||!e)return;ae.current=null;const t=le(e);t!==M&&O(t)});const de=t(K,X),ce="function"==typeof I?I({close:()=>re(!0)}):I,ue={...k.test(E)?{}:{zIndex:s.popup},minWidth:W};/* @__PURE__ */
2
+ return y("div",{ref:Q,className:`relative inline-flex ${A}`.trim(),children:[
3
+ /* @__PURE__ */x("button",{ref:z,id:_,type:"button","aria-haspopup":"menu","aria-expanded":q,"aria-controls":q?X:void 0,"aria-label":j,"aria-describedby":T,"aria-disabled":U||void 0,disabled:$,onClick:()=>{U||(q?re(!1):se("first"))},onKeyDown:e=>{U||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:C??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(j?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),q&&
4
+ /* @__PURE__ */x(i,{portal:!0,className:E,style:ue,children:/* @__PURE__ */y("div",{ref:R,children:[
5
+ /* @__PURE__ */x("div",{ref:P,id:X,role:"menu","aria-orientation":"vertical","aria-label":j,"aria-labelledby":j?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),O(ne(M+1,1));else if("ArrowUp"===t.key)t.preventDefault(),O(ne(M-1,-1));else if("Home"===t.key)t.preventDefault(),O(ne(0,1));else if("End"===t.key)t.preventDefault(),O(ne(K.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&V.current?o(V.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-Y.current.at<500?Y.current.text+n:n;Y.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?M+1:Math.max(M,0),s=P.current,d=K.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(K[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void O(n)}})(t)},children:r(K,{menuId:X,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===M?0:-1,onMouseEnter:()=>{t.disabled||V.current?.contains(document.activeElement)||O(e)}}),linkAs:H})}),F&&/* @__PURE__ */y("div",{ref:V,role:"group","aria-label":J,"data-dropdown-footer":"",onKeyDown:e=>{const t=V.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=o(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=P.current?.querySelector(`[data-dropdown-index="${M}"]`);return void(t??P.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
6
+ /* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(a,{})}),
7
+ /* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
@@ -0,0 +1,5 @@
1
+ import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-FRNSCVPN.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-R64OZ6TC.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-VNTJ7QO5.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:C,description:T,role:D="dialog",children:V,footer:W,blocking:J=!1,size:L="md",aside:F=!1,dirty:P=!1,initialFocus:Q,"aria-label":S,"aria-labelledby":U,"aria-describedby":$,className:z=""}){const A=f(null),G=h(),I=h(),O=!J,R=h(),X=p().dialog,Z=e(m()),[B,H]=x(null),K=l({open:j,dirty:P,onClose:w,title:C,layer:B}),Y=f(null),q=r(j&&null!==Z,Y),E=i(q,A);if(o(j),n(A,j&&null!==Z,Q),s(j),v(()=>{if(j)return u(()=>(J||K(),!0),()=>A.current)},[j,J,K]),!j||!Z)return null;/* @__PURE__ */
2
+ return y(g,{children:[/* @__PURE__ */k("span",{ref:Y,hidden:!0,"data-popup-anchor":""}),b(
3
+ /* @__PURE__ */k(t,{value:B,children:/* @__PURE__ */y("div",{ref:H,className:"fixed inset-0"+(F?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":F?"":void 0,children:[
4
+ /* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
5
+ /* @__PURE__ */k("div",{className:q?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:J?void 0:e=>{e.target===e.currentTarget&&K()},children:/* @__PURE__ */y("div",{ref:A,"data-popup-panel":"",style:q?{left:E?.left??0,top:E?.top??0,visibility:E?void 0:"hidden"}:void 0,...a({role:D,modal:!0,titleId:C?R:void 0,labelledBy:U,label:S}),"aria-describedby":$??(T?I:V?G:void 0),className:`${q?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[L]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${z}`.trim(),children:[C&&/* @__PURE__ */k("h2",{id:R,className:(O?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:C}),T&&/* @__PURE__ */k("p",{id:I,className:((C?"mt-1":O?"pr-8":"")+" text-sm text-gray-500").trim(),children:T}),V&&/* @__PURE__ */k("div",{id:G,className:"mt-2 text-sm text-gray-600",children:V}),W&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:W}),O&&/* @__PURE__ */k("button",{type:"button",onClick:K,"aria-label":X.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),Z)]})}export{j as Dialog};
@@ -1,15 +1,15 @@
1
- import{Popover as e}from"./chunk-7JGR7WPD.js";import{InputNumber_default as r}from"./chunk-C6YAFZG3.js";import{parseHexColor as a,hexToHsv as n,hsvToHex as o,hexReadout as t,HUE_GRADIENT as l,HEX_MAX_LENGTH as i,svFromPoint as s,hueFromPoint as c}from"./chunk-S6OB6HJB.js";import{inputClasses as u}from"./chunk-AYZY3YNC.js";import{Tooltip as d}from"./chunk-QQ2LDC6C.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{forwardRef as g,useState as p,useRef as b,useEffect as m,useId as f}from"react";import{jsx as v,jsxs as w}from"react/jsx-runtime";var x={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function k(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function C(e,r){if(!e)return y;const a=k(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function N({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",x[e],a].filter(Boolean).join(" ")}var $=g(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
2
- return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function A(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function I(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var P={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function M(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function j({value:e,onChange:r,label:i,presets:u,clearable:g=!1,fallback:f,dragWrites:x="live",disabled:N=!1,opacity:z,onOpacityChange:j,onClose:B,id:S,className:K=""}){const L=h().color,O=k(z),U=e=>{const r=k(e);N||r===O||j?.(r)},Y=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:O},E=a(f??""),[H,Q]=p(()=>n(e||E||"")),W=b(e);m(()=>{e!==W.current&&(W.current=e,e?Q(n(e)):E&&Q(n(E)))},[e]);const q=a=>{N||a===e||(W.current=a,r(a))},G=e=>{const r=a(e);r&&(Q(n(r)),q(r))},J=e=>{Q(e),q(o(e))},[X,F]=p(!1),Z=b(H);Z.current=H;const V=e=>({onPointerDown:r=>{if(N||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,Z.current);"end"===x?(F(!0),Q(a)):J(a)},onPointerMove:r=>{if(N||!(1&r.buttons))return;const a=e(r,Z.current);"end"===x?Q(a):J(a)},onPointerUp:r=>{"end"===x&&X&&(F(!1),J(e(r,Z.current)))}}),_=V((e,r)=>({...r,...s(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),ee=V((e,r)=>({...r,h:c(e.clientX,e.currentTarget.getBoundingClientRect())})),re=X?o(H):e,ae=e=>`${Math.round(100*e)}%`,ne=(u??[]).map(D),oe=a(e),te=re||E||"";/* @__PURE__ */
3
- return w("div",{id:S,className:`flex w-56 flex-col gap-3 ${N?"opacity-60":""} ${K}`.trim(),onKeyDown:e=>{"Escape"===e.key&&B&&(e.preventDefault(),e.stopPropagation(),B())},children:[(ne.length>0||g)&&/* @__PURE__ */w("div",{role:"group","aria-label":L.presets,className:"flex flex-wrap gap-2",children:[g&&/* @__PURE__ */v(d,{content:L.clear,children:/* @__PURE__ */v($,{color:"",size:"sm","aria-label":L.clear,selected:""===e,disabled:N,onClick:()=>{N||""===e||(W.current="",r(""))}})}),ne.map(e=>{const r=a(e.value),n=e.label?`${e.label} · ${t(r??e.value)}`:t(r??e.value);/* @__PURE__ */
4
- return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:N,onClick:()=>G(e.value)})},`${e.label??""}:${e.value}`)})]}),
5
- /* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*H.v),"aria-valuetext":L.squareValue(Math.round(100*H.s),Math.round(100*H.v)),"aria-disabled":N||void 0,"data-color-square":"",onKeyDown:e=>{if(N)return;const r=A(H,e.key,e.shiftKey);r&&(e.preventDefault(),J(r))},..._,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:o({h:H.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ae(H.s),top:ae(1-H.v),...P}})}),
6
- /* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(H.h),"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-hue":"",onKeyDown:e=>{if(N)return;const r=I(H.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),J({...H,h:r}))},...ee,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:l},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:H.h/360*100+"%",background:o({h:H.h,s:1,v:1}),...P}})}),j&&/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":L.opacity(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":O,"aria-valuetext":`${O}%`,"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-opacity":"",onKeyDown:e=>{if(N)return;const r=M(O,e.key,e.shiftKey);null!==r&&(e.preventDefault(),U(r))},onPointerDown:e=>{N||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),U(Y(e)))},onPointerMove:e=>{!N&&1&e.buttons&&U(Y(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${te||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${O}%`,...C(te||"black",O),...P}})}),
1
+ import{Popover as e}from"./chunk-7JGR7WPD.js";import{InputNumber_default as r}from"./chunk-GV5VNWPG.js";import{parseHexColor as a,hexToHsv as n,hsvToHex as o,hexReadout as t,HUE_GRADIENT as l,HEX_MAX_LENGTH as i,svFromPoint as s,hueFromPoint as c}from"./chunk-S6OB6HJB.js";import{inputClasses as u}from"./chunk-AYZY3YNC.js";import{Tooltip as d}from"./chunk-NJN5IKWO.js";import{useShellStrings as h}from"./chunk-VNTJ7QO5.js";import{forwardRef as g,useState as p,useRef as b,useEffect as m,useId as f}from"react";import{jsx as v,jsxs as w}from"react/jsx-runtime";var x={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function k(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function N(e,r){if(!e)return y;const a=k(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function C({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",x[e],a].filter(Boolean).join(" ")}var $=g(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
2
+ return v("button",{ref:l,type:o,"aria-pressed":a,className:C({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function P(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function M(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function j({value:e,onChange:r,label:i,presets:u,clearable:g=!1,fallback:f,dragWrites:x="live",disabled:C=!1,opacity:z,onOpacityChange:j,onClose:K,id:S,className:T=""}){const R=h().color,U=k(z),W=e=>{const r=k(e);C||r===U||j?.(r)},L=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:U},E=a(f??""),[H,J]=p(()=>n(e||E||"")),V=b(e);m(()=>{e!==V.current&&(V.current=e,e?J(n(e)):E&&J(n(E)))},[e]);const Y=a=>{C||a===e||(V.current=a,r(a))},q=e=>{const r=a(e);r&&(J(n(r)),Y(r))},G=e=>{J(e),Y(o(e))},[X,F]=p(!1),Q=b(H);Q.current=H;const Z=e=>({onPointerDown:r=>{if(C||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,Q.current);"end"===x?(F(!0),J(a)):G(a)},onPointerMove:r=>{if(C||!(1&r.buttons))return;const a=e(r,Q.current);"end"===x?J(a):G(a)},onPointerUp:r=>{"end"===x&&X&&(F(!1),G(e(r,Q.current)))}}),_=Z((e,r)=>({...r,...s(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),ee=Z((e,r)=>({...r,h:c(e.clientX,e.currentTarget.getBoundingClientRect())})),re=X?o(H):e,ae=e=>`${Math.round(100*e)}%`,ne=(u??[]).map(D),oe=a(e),te=re||E||"";/* @__PURE__ */
3
+ return w("div",{id:S,className:`flex w-56 flex-col gap-3 ${C?"opacity-60":""} ${T}`.trim(),onKeyDown:e=>{"Escape"===e.key&&K&&(e.preventDefault(),e.stopPropagation(),K())},children:[(ne.length>0||g)&&/* @__PURE__ */w("div",{role:"group","aria-label":R.presets,className:"flex flex-wrap gap-2",children:[g&&/* @__PURE__ */v(d,{content:R.clear,children:/* @__PURE__ */v($,{color:"",size:"sm","aria-label":R.clear,selected:""===e,disabled:C,onClick:()=>{C||""===e||(V.current="",r(""))}})}),ne.map(e=>{const r=a(e.value),n=e.label?`${e.label} · ${t(r??e.value)}`:t(r??e.value);/* @__PURE__ */
4
+ return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:C,onClick:()=>q(e.value)})},`${e.label??""}:${e.value}`)})]}),
5
+ /* @__PURE__ */v("div",{role:"slider",tabIndex:C?-1:0,"aria-label":R.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*H.v),"aria-valuetext":R.squareValue(Math.round(100*H.s),Math.round(100*H.v)),"aria-disabled":C||void 0,"data-color-square":"",onKeyDown:e=>{if(C)return;const r=I(H,e.key,e.shiftKey);r&&(e.preventDefault(),G(r))},..._,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:o({h:H.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ae(H.s),top:ae(1-H.v),...A}})}),
6
+ /* @__PURE__ */v("div",{role:"slider",tabIndex:C?-1:0,"aria-label":R.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(H.h),"aria-orientation":"horizontal","aria-disabled":C||void 0,"data-color-hue":"",onKeyDown:e=>{if(C)return;const r=P(H.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),G({...H,h:r}))},...ee,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:l},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:H.h/360*100+"%",background:o({h:H.h,s:1,v:1}),...A}})}),j&&/* @__PURE__ */v("div",{role:"slider",tabIndex:C?-1:0,"aria-label":R.opacity(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":U,"aria-valuetext":`${U}%`,"aria-orientation":"horizontal","aria-disabled":C||void 0,"data-color-opacity":"",onKeyDown:e=>{if(C)return;const r=M(U,e.key,e.shiftKey);null!==r&&(e.preventDefault(),W(r))},onPointerDown:e=>{C||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),W(L(e)))},onPointerMove:e=>{!C&&1&e.buttons&&W(L(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${te||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${U}%`,...N(te||"black",U),...A}})}),
7
7
  /* @__PURE__ */w("div",{className:"flex items-center gap-2",children:[
8
- /* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:C(te,j?O:null)}),
9
- /* @__PURE__ */v(T,{value:re,placeholder:!e&&E?t(E):void 0,onChange:G,label:L.hex(i),disabled:N}),j&&/* @__PURE__ */v(R,{value:O,onChange:U,label:L.opacity(i),disabled:N})]})]})}var B={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},S={sm:"h-6",md:"h-8",lg:"h-10"},K=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function T({value:e,onChange:r,label:n,placeholder:o,disabled:l,id:s,size:c="md",look:d="box",className:h=""}){const[g,b]=p(null),m="text"===d?`${K} ${S[c]} ${h}`.trim():u({size:c,className:`${B[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
10
- return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function R({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
11
- return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function L({value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:g=!1,opacity:p,onOpacityChange:b,size:m="md",align:x="start",open:y,onOpenChange:$,className:z=""}){const D=h().color,A=k(p),I=f(),P=a(s??""),M=r||P||"",B=r?t(r):P?t(P):D.none;
8
+ /* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:N(te,j?U:null)}),
9
+ /* @__PURE__ */v(O,{value:re,placeholder:!e&&E?t(E):void 0,onChange:q,label:R.hex(i),disabled:C}),j&&/* @__PURE__ */v(B,{value:U,onChange:W,label:R.opacity(i),disabled:C})]})]})}var K={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},S={sm:"h-6",md:"h-8",lg:"h-10"},T=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function O({value:e,onChange:r,label:n,placeholder:o,disabled:l,id:s,size:c="md",look:d="box",className:h=""}){const[g,b]=p(null),m="text"===d?`${T} ${S[c]} ${h}`.trim():u({size:c,className:`${K[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
10
+ return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function B({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
11
+ return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function R({value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:g=!1,opacity:p,onOpacityChange:b,size:m="md",align:x="start",open:y,onOpenChange:$,className:z=""}){const D=h().color,I=k(p),P=f(),A=a(s??""),M=r||A||"",K=r?t(r):A?t(A):D.none;
12
12
  /* @__PURE__ */
13
13
  return w("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":g?"gap-1":"gap-2"} ${z}`.trim(),children:[
14
- /* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(M,b?A:null)}),triggerLabel:D.swatch(o,B),triggerClassName:N({size:m}),"aria-label":D.panel(o),align:x,open:y,onOpenChange:$,disabled:u,children:/* @__PURE__ */v(j,{id:I,value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),g&&
15
- /* @__PURE__ */v(T,{value:r,placeholder:!r&&P?t(P):void 0,onChange:e=>{u||e===r||n(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */v(R,{value:A,onChange:e=>{u||e===A||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{L as ColorPicker,j as ColorPickerPanel,$ as ColorSwatch,T as HexInput,y as NO_COLOR_FILL,k as clampOpacity,C as colorFill,N as colorSwatchClasses,I as stepHue,M as stepOpacity,A as stepSquare};
14
+ /* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(M,b?I:null)}),triggerLabel:D.swatch(o,K),triggerClassName:C({size:m}),"aria-label":D.panel(o),align:x,open:y,onOpenChange:$,disabled:u,children:/* @__PURE__ */v(j,{id:P,value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),g&&
15
+ /* @__PURE__ */v(O,{value:r,placeholder:!r&&A?t(A):void 0,onChange:e=>{u||e===r||n(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */v(B,{value:I,onChange:e=>{u||e===I||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{R as ColorPicker,j as ColorPickerPanel,$ as ColorSwatch,O as HexInput,y as NO_COLOR_FILL,k as clampOpacity,N as colorFill,C as colorSwatchClasses,P as stepHue,M as stepOpacity,I as stepSquare};
@@ -1,2 +1,2 @@
1
- import{toast_default as t}from"./chunk-7ELJQL7J.js";import{useShellPrefs as e}from"./chunk-KC3EX26K.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(E(),R()):"none"!==t&&0!==m||E()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),E())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);E(),N(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=O(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*_[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function E(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function F(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=O(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var G="pomodoro_tasks",J="pomodoro_tasks_migrated";function L(){return Math.random().toString(36).slice(2,11)}function V(){/* @__PURE__ */
2
- return(new Date).toISOString()}var j=null,K=[],W=!1,q=null,Q=/* @__PURE__ */new Set;function X(){for(const t of Q)t()}function $(t){K=t,X()}function z(){const t=j;return t?q=t.list().then(e=>{j===t&&(K=e,W=!0,X())}).catch(()=>{j===t&&(W=!0,X())}).finally(()=>{q=null}):(K=[],W=!0,X(),Promise.resolve())}function H(t){j=t,K=[],W=!1,t?z():X()}function U(t){return Q.add(t),!j||W||q||z(),()=>{Q.delete(t)}}function Y(){return K}function Z(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=L(),n=V(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:V()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(U,Y,Y),i=o(e=>{const n=j;if(!n)return t.addTask(e);const o="tmp-"+L(),a=V(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...K,r]),n.create({...e,name:e.name.trim()}).then(t=>$(K.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(K.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=j;if(!o)return t.updateTask(e,n);$(K.map(t=>t.id===e?{...t,...n,id:e,updatedAt:V()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=j;if(!n)return t.removeTask(e);const o=K;$(K.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!j)return t.toggleDone(e);const n=K.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{j||t.setAllTasks(e)},[t]);return null===j?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(J))return;const n=localStorage.getItem(G);if(!n)return void localStorage.setItem(J,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(G),void localStorage.setItem(J,"1");const a=V(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||L(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(G),localStorage.setItem(J,"1")}catch{try{localStorage.setItem(J,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,F as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,H as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
1
+ import{toast_default as t}from"./chunk-MWKLLAJT.js";import{useShellPrefs as e}from"./chunk-KC3EX26K.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);F(),N(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=O(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*_[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=O(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var K="pomodoro_tasks",L="pomodoro_tasks_migrated";function V(){return Math.random().toString(36).slice(2,11)}function W(){/* @__PURE__ */
2
+ return(new Date).toISOString()}var j=null,E=[],J=!1,q=null,X=/* @__PURE__ */new Set;function $(){for(const t of X)t()}function z(t){E=t,$()}function H(){const t=j;return t?q=t.list().then(e=>{j===t&&(E=e,J=!0,$())}).catch(()=>{j===t&&(J=!0,$())}).finally(()=>{q=null}):(E=[],J=!0,$(),Promise.resolve())}function Q(t){j=t,E=[],J=!1,t?H():$()}function U(t){return X.add(t),!j||J||q||H(),()=>{X.delete(t)}}function Y(){return E}function Z(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=V(),n=W(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:W()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(U,Y,Y),i=o(e=>{const n=j;if(!n)return t.addTask(e);const o="tmp-"+V(),a=W(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return z([...E,r]),n.create({...e,name:e.name.trim()}).then(t=>z(E.map(e=>e.id===o?{...r,...t}:e))).catch(()=>z(E.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=j;if(!o)return t.updateTask(e,n);z(E.map(t=>t.id===e?{...t,...n,id:e,updatedAt:W()}:t)),o.update(e,n).catch(()=>{H()})},[t]),l=o(e=>{const n=j;if(!n)return t.removeTask(e);const o=E;z(E.filter(t=>t.id!==e)),n.remove(e).catch(()=>z(o))},[t]),s=o(e=>{if(!j)return t.toggleDone(e);const n=E.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{j||t.setAllTasks(e)},[t]);return null===j?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(L))return;const n=localStorage.getItem(K);if(!n)return void localStorage.setItem(L,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(K),void localStorage.setItem(L,"1");const a=W(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||V(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(K),localStorage.setItem(L,"1")}catch{try{localStorage.setItem(L,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,Q as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
@@ -0,0 +1,13 @@
1
+ import{copyToClipboard as e,selectionAt as t}from"./chunk-KMSK6QQB.js";import{ResizableTable as n}from"./chunk-UIN2LUCZ.js";import{useTableNav as r}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as o}from"./chunk-G6DKCCWH.js";import{Checkbox_default as l}from"./chunk-CGZBDI6C.js";import{ListFooter as i}from"./chunk-L3RLB37Y.js";import{ListLoadError as a}from"./chunk-BAT5B2LE.js";import{LoadingSpinner as c}from"./chunk-PC44XTGN.js";import{toast_default as d}from"./chunk-MWKLLAJT.js";import{PopupMenu as s,PopupMenuLabel as h,PopupMenuItem as m,PopupMenuDivider as u}from"./chunk-QVAOSKFO.js";import{keepsNativeMenu as p}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as f}from"./chunk-R2VKEMZH.js";import{shellHttp as g}from"./chunk-STKJA4PV.js";import{useShellStrings as y}from"./chunk-VNTJ7QO5.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:L,isLoading:N,emptyState:R,totalCount:T,isError:K,onRetry:$,errorTitle:A,errorMessage:M,tableId:E,columns:P,renderCell:F,getRowId:U=e=>e.id,sort:B,onSort:I,selected:O,setSelected:D,onRowClick:Q,onRowHover:J,getRowClassName:W,footerLabel:H,footerExtra:V,sentinelRef:Z,isFetchingNextPage:_,saveDefaultPerms:G,exportEndpoint:z,exportFilename:X="export.csv",contextActions:Y}=S,[q,ee]=k(null),te=b(null),ne=y(),re=ne.entityList,oe=e=>{D(t=>{const n=new Set(t),r=U(e);return n.has(r)?n.delete(r):n.add(r),n})},le=()=>{D(e=>{const t=L.map(U),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ie=r(L,Q,oe,le,(e,t)=>{D(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(U(L[n]));return r})},te),ae=L.filter(e=>O.has(U(e))),ce=()=>{const e=[...te.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=L[Number(e.dataset.rowIdx)];return void 0!==t&&O.has(U(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(P.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},de=()=>{ee(null);const{header:t,body:n}=ce();if(!n.length)return;const r=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${o(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${o(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(re.copiedRows(n.length),r,l)},se=async()=>{ee(null);const e=ae.map(U);if(!e.length||!z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(P.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${E}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return P.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=z.includes("?")?"&":"?";try{const n=await g.get(`${z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=X,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void d.notify(Number.isFinite(a)?re.exportTruncated(a,e.length):re.exportTruncatedUnknown(e.length));d.success(re.exported(e.length))}catch{d.error(re.exportFailed)}};if(N)/* @__PURE__ */return x(c,{});if(K&&0===L.length)/* @__PURE__ */
2
+ return x(a,{title:A,message:M,onRetry:$});if(0===L.length)/* @__PURE__ */return x(w,{children:R});const he=L.length>0&&ae.length===L.length,me=ae.length>0&&!he,ue=O.size-ae.length,pe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(l,{"aria-label":ne.table.selectAll,checked:he,indeterminate:me,onChange:le,style:{height:14,width:14}})},...P],fe=/* @__PURE__ */x(i,{selectedCount:ae.length,hiddenSelectedCount:ue,loadedCount:L.length,totalCount:T,label:H,isFetchingMore:_,extra:V}),ge=Z?/* @__PURE__ */C(w,{children:[
3
+ /* @__PURE__ */x("div",{ref:Z}),_&&/* @__PURE__ */x(f,{size:"sm",padding:"py-3",label:ne.list.loadingMore})]}):void 0;let ye=null;if(q){const{x:t,y:n,item:r,text:o,firstColumn:l}=q,i=Y?Y(ae):[],a=ae.length,c=()=>ee(null),d=void 0!==T&&T>L.length;ye=/* @__PURE__ */C(s,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
4
+ /* @__PURE__ */x(h,{children:ue>0?ne.list.selectedNotShown(a,ue):ne.list.selected(a)}),
5
+ /* @__PURE__ */x(m,{className:"font-medium",onClick:()=>{c(),Q(r)},children:re.open}),
6
+ /* @__PURE__ */x(u,{}),o&&/* @__PURE__ */x(m,{onClick:()=>{c(),e(re.copiedText,o.text,o.html)},children:re.copy}),l&&/* @__PURE__ */x(m,{onClick:()=>(t=>{ee(null);const{keys:n,body:r}=ce(),o=n.indexOf(t.key);o<0||!r.length||e(t.label,r.map(e=>e[o]).join("\n"))})(l),children:re.copyColumn(l.label)}),
7
+ /* @__PURE__ */x(m,{disabled:0===a,onClick:de,children:re.copyRows(a)}),z&&/* @__PURE__ */x(m,{onClick:se,children:re.exportSelected}),i.map((e,t)=>/* @__PURE__ */C("div",{children:[(e.divider||0===t)&&/* @__PURE__ */x(u,{}),
8
+ /* @__PURE__ */x(m,{danger:e.danger,disabled:e.disabled,onClick:()=>{c(),e.onClick(ae)},children:e.label})]},t)),
9
+ /* @__PURE__ */x(u,{}),!he&&/* @__PURE__ */x(m,{onClick:()=>{c(),D(e=>/* @__PURE__ */new Set([...e,...L.map(U)]))},children:d?re.selectAllLoaded(L.length):re.selectAll}),
10
+ /* @__PURE__ */x(m,{onClick:()=>{c(),D(/* @__PURE__ */new Set)},children:re.clearSelection}),$&&/* @__PURE__ */x(m,{onClick:()=>{c(),$()},children:re.refresh})]})}/* @__PURE__ */
11
+ return C("div",{className:"flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden",children:[
12
+ /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(n,{tableId:E,columns:pe,sort:B,onSort:I,footer:fe,afterBody:ge,saveDefaultPerms:G,children:e=>/* @__PURE__ */x("tbody",{ref:te,className:"divide-y divide-gray-100",children:L.map((n,r)=>{const o=U(n);/* @__PURE__ */
13
+ return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ie===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":O.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${W?.(n)??""}`,onClick:()=>Q(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||p(e.target))return;e.preventDefault();const r=U(n);O.has(r)||D(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?P.find(e=>e.key===o)?.label:void 0;ee({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:J?()=>J(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(l,{"aria-label":ne.table.selectRow,checked:O.has(o),onChange:()=>oe(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):F(n,e.key)},e.key))},o)})})})}),ye]})}export{S as EntityList};
@@ -1,10 +1,10 @@
1
- import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-GDQJBQ5B.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:b,sortInColumn:y,isLoading:v=!1,loadingText:N,emptyState:k,showColumnsWhenEmpty:w=!1,columnEmptyText:C,onAddItem:D,addItemText:E}){const j=t().kanban,I=r(),T=N??j.loading,M=C??j.dropHere,A=E??j.addItem,[H,O]=o(null),[$,B]=o(null),Q=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(y)for(const n of Object.keys(e))e[n].sort(y);return e},[m,f,p,y]),R=()=>{O(null),B(null)},S=i(null),q=i(/* @__PURE__ */new Map);n(()=>{if(null!==H)return;const e=S.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=q.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),q.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[Q,H]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:T}):0!==m.length||w?/* @__PURE__ */d("div",{ref:S,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=Q[e.value]??[],t=null!==$&&$.col===e.value,r=null!==H?n.findIndex(e=>g(e)===H):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
2
- return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&$&&$.col===e){const n=(Q[e]??[]).findIndex(e=>g(e)===H),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(H,e,r)}}R()})(e.value)},children:[
1
+ import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-VNTJ7QO5.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:b,sortInColumn:y,isLoading:v=!1,loadingText:N,emptyState:k,showColumnsWhenEmpty:w=!1,columnEmptyText:C,onAddItem:D,addItemText:E}){const j=t().kanban,I=r(),T=N??j.loading,M=C??j.dropHere,O=E??j.addItem,[A,H]=o(null),[$,R]=o(null),S=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(y)for(const n of Object.keys(e))e[n].sort(y);return e},[m,f,p,y]),q=()=>{H(null),R(null)},z=i(null),F=i(/* @__PURE__ */new Map);n(()=>{if(null!==A)return;const e=z.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=F.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),F.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[S,A]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:T}):0!==m.length||w?/* @__PURE__ */d("div",{ref:z,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=S[e.value]??[],t=null!==$&&$.col===e.value,r=null!==A?n.findIndex(e=>g(e)===A):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
2
+ return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(A&&$&&$.col===e){const n=(S[e]??[]).findIndex(e=>g(e)===A),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(A,e,r)}}q()})(e.value)},children:[
3
3
  /* @__PURE__ */u("div",{className:`flex items-center justify-between px-3 py-2 rounded-t-xl text-sm font-medium ${e.accent??"text-gray-700 bg-gray-100"}`,children:[
4
4
  /* @__PURE__ */u("span",{className:"flex items-center gap-2",children:[
5
5
  /* @__PURE__ */d("span",{className:`h-2 w-2 rounded-full ${e.dot??"bg-gray-400"}`}),e.label]}),
6
6
  /* @__PURE__ */d("span",{className:"text-xs opacity-70",children:a(n.length,I)})]}),
7
- /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>B(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===H;/* @__PURE__ */
7
+ /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>R(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===A;/* @__PURE__ */
8
8
  return u(s,{children:[o===r&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),
9
- /* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;B(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:R,onClick:b?()=>b(t):void 0,style:null===H?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(b?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:M})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-ink-faint opacity-0 transition hover:bg-gray-100 hover:text-ink focus-visible:opacity-100 group-hover:opacity-100",children:[
10
- /* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),A]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:k??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:j.empty})})}export{m as Kanban};
9
+ /* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{H(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==A?n.findIndex(e=>g(e)===A):-1,o=-1!==a&&a<r?r+1:r;R(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:q,onClick:b?()=>b(t):void 0,style:null===A?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(b?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:M})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-ink-faint opacity-0 transition hover:bg-gray-100 hover:text-ink focus-visible:opacity-100 group-hover:opacity-100",children:[
10
+ /* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),O]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:k??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:j.empty})})}export{m as Kanban};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-2UO47XB4.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-R64OZ6TC.js";import{useShellStrings as r}from"./chunk-VNTJ7QO5.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
3
3
  return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
4
4
  return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-2UO47XB4.js";import{useShellStrings as i}from"./chunk-GDQJBQ5B.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-R64OZ6TC.js";import{useShellStrings as i}from"./chunk-VNTJ7QO5.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
2
2
  return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
3
3
  /* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
4
4
  /* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
@@ -1 +1 @@
1
- import{toast_default as t}from"./chunk-7ELJQL7J.js";import{currentShellStrings as e}from"./chunk-GDQJBQ5B.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
1
+ import{toast_default as t}from"./chunk-MWKLLAJT.js";import{currentShellStrings as e}from"./chunk-VNTJ7QO5.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};