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,21 +1,21 @@
1
- import{Markdown as e}from"./chunk-CD7UWMPX.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.trim().toLowerCase(),B=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),_=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),L=n(()=>B.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[B,M]),A=n(()=>L.flatMap(e=>e.docs),[L]),E=(w?A.find(e=>e.slug===w):void 0)??A[0]??null,Y=e=>!!M||(C[e]??e===E?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-276JUQXK.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-R64OZ6TC.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-VNTJ7QO5.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[N,v]=a(""),[w,k]=a(null),[C,j]=a({}),M=N.trim().toLowerCase(),_=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),L=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),A=n(()=>_.map(e=>({...e,docs:e.docs.filter(L)})).filter(e=>e.docs.length>0),[_,M]),E=n(()=>A.flatMap(e=>e.docs),[A]),O=(w?E.find(e=>e.slug===w):void 0)??E[0]??null,R=e=>!!M||(C[e]??e===O?.category);/* @__PURE__ */
2
2
  return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
5
5
  /* @__PURE__ */o("h2",{className:"text-sm font-semibold text-gray-900",children:y.help.title}),u&&g&&/* @__PURE__ */o("button",{type:"button",onClick:g,className:"text-xs text-blue-600 hover:underline",children:y.help.newArticle})]}),
6
6
  /* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
7
7
  /* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
- /* @__PURE__ */o("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
- /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===L.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):L.map(e=>{const t=Y(e.key);/* @__PURE__ */
8
+ /* @__PURE__ */o("input",{type:"text",value:N,onChange:e=>v(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===A.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):A.map(e=>{const t=R(e.key);/* @__PURE__ */
10
10
  return i("div",{className:"py-0.5",children:[
11
- /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!Y(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
11
+ /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!R(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
12
12
  /* @__PURE__ */o(d,{open:t}),
13
- /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=E?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=O?.slug===e.slug;/* @__PURE__ */
14
14
  return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
15
15
  /* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
16
- /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:E?/* @__PURE__ */i(c,{children:[
16
+ /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:O?/* @__PURE__ */i(c,{children:[
17
17
  /* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
18
18
  /* @__PURE__ */i("div",{className:"min-w-0",children:[
19
- /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:E.title}),
20
- /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[E.category_label,!1===E.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(E),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
- /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(E):E.body?/* @__PURE__ */o(e,{children:E.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
19
+ /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:O.title}),
20
+ /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[O.category_label,!1===O.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(O),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(O):O.body?/* @__PURE__ */o(e,{children:O.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
@@ -1,4 +1,4 @@
1
- import{ErrorPage as r}from"./chunk-ORIXCEKO.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-7DI3VQCF.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
1
+ import{ErrorPage as r}from"./chunk-FOHOSUK3.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{useShellStrings as s}from"./chunk-VNTJ7QO5.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
2
2
  return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
3
3
  /* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
4
4
  /* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
@@ -1,4 +1,4 @@
1
- import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{jsxs as n,Fragment as o,jsx as l}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:s,isFetchingMore:a,extra:u}){const m=t().list,h=i??d,f=d>=h,p=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
1
+ import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-VNTJ7QO5.js";import{jsxs as n,Fragment as o,jsx as l}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:s,isFetchingMore:a,extra:u}){const m=t().list,h=i??d,f=d>=h,p=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
2
2
  return n(o,{children:[u,p?`${p} — `:"",f?null!=i?m.allLoaded(h,s):m.count(h,s):m.loadedOf(d,h,s),a?/* @__PURE__ */n(o,{children:[" · ",
3
3
  /* @__PURE__ */n("span",{className:"inline-flex items-center gap-1",role:"status",children:[
4
4
  /* @__PURE__ */l(e,{}),m.loadingMore]})]}):""]})}export{r as ListFooter};
@@ -1,4 +1,4 @@
1
- import{TransferProgress as e}from"./chunk-PVPMJ5G2.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-GDQJBQ5B.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function c(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function u(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
1
+ import{TransferProgress as e}from"./chunk-OS2KE6QG.js";import{Icon as r}from"./chunk-R64OZ6TC.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-VNTJ7QO5.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function c(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function u(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
2
2
  return o("div",{className:`absolute inset-0 flex items-center justify-center bg-white/60 ${n}`,children:/* @__PURE__ */o(e,{state:"busy",verb:r,pct:t})})}function l({children:e}){/* @__PURE__ */
3
3
  return o("span",{className:"absolute inset-x-1 bottom-1 truncate rounded px-2 py-0.5 text-xs text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e})}function m(e,r=""){if(!e)return!1;const t=n.exec(e);if(t)return"video"===t[1].toLowerCase();const o=r.includes("video"),i=r.includes("image")||"*"===r||""===r;return s.test(e)||o&&!i}function f({className:e="h-4 w-4"}){/* @__PURE__ */
4
4
  return o(r,{name:"close",className:e,strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})}function p({className:e="h-6 w-6"}){/* @__PURE__ */
@@ -1,9 +1,9 @@
1
- import{useOverlayTarget as e,usePopupAnchor as r,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as i}from"./chunk-ECJKIPWU.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as l}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as a}from"./chunk-CDAJKLGL.js";import{Icon as s}from"./chunk-2UO47XB4.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useHydrated as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{useRef as f,useId as u,useState as p,useEffect as b}from"react";import{createPortal as g}from"react-dom";import{jsxs as x,Fragment as y,jsx as v}from"react/jsx-runtime";var w={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},k={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function N(e,r){const t=window.innerHeight-(r.top+r.height);if("bottom"===e)return{left:r.left,width:r.width,bottom:t};const i={top:r.top,height:r.height};return"left"===e?{...i,left:r.left}:{...i,right:window.innerWidth-(r.left+r.width)}}function j({onClose:e}){const r=h().dialog;/* @__PURE__ */
2
- return v("button",{type:"button",onClick:e,"aria-label":r.close,className:"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__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function C({open:s,onClose:h,side:C="right",size:W="md",title:D,description:B,footer:J,children:U,blocking:L=!1,dirty:Q=!1,initialFocus:z,"aria-label":G,"aria-labelledby":H,"aria-describedby":I,className:P=""}){const T=f(null),V=u(),X=u(),A=u(),F=e(c()),[K,S]=p(null),E=i({open:s,dirty:Q,onClose:h,title:D,layer:K}),O=f(null),Y=r(s&&null!==F,O);if(l(s),n(T,s&&null!==F,z),a(s),b(()=>{if(s)return m(()=>(L||E(),!0),()=>T.current)},[s,L,E]),!s||!F)return null;const Z="bottom"===C,$={...Z?{maxHeight:"85vh"}:{},...Y?N(C,Y):{}};/* @__PURE__ */
3
- return x(y,{children:[/* @__PURE__ */v("span",{ref:O,hidden:!0,"data-popup-anchor":""}),g(
4
- /* @__PURE__ */v(t,{value:K,children:/* @__PURE__ */x("div",{ref:S,className:"fixed inset-0",style:{zIndex:d.overlay},role:"presentation","data-overlay-layer":"",children:[
5
- /* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30",onClick:L?void 0:E,"aria-hidden":"true"}),
6
- /* @__PURE__ */x("div",{ref:T,...o({modal:!0,titleId:D?A:void 0,labelledBy:H,label:G}),"aria-describedby":I??(B?X:U?V:void 0),"data-drawer-side":C,"data-popup-panel":"",style:$,className:["fixed flex flex-col bg-white shadow-xl",Z?"":`w-full max-w-full ${w[W]}`,Y?"":k[C],Z?"rounded-t-xl":"",P].filter(Boolean).join(" "),children:[D?/* @__PURE__ */x("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
1
+ import{useOverlayTarget as e,usePopupAnchor as r,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as i}from"./chunk-FRNSCVPN.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as l}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as a}from"./chunk-CDAJKLGL.js";import{Icon as s}from"./chunk-R64OZ6TC.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useHydrated as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-VNTJ7QO5.js";import{useRef as f,useId as u,useState as p,useEffect as b}from"react";import{createPortal as g}from"react-dom";import{jsxs as x,Fragment as y,jsx as v}from"react/jsx-runtime";var w={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},N={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function k(e,r){const t=window.innerHeight-(r.top+r.height);if("bottom"===e)return{left:r.left,width:r.width,bottom:t};const i={top:r.top,height:r.height};return"left"===e?{...i,left:r.left}:{...i,right:window.innerWidth-(r.left+r.width)}}function j({onClose:e}){const r=h().dialog;/* @__PURE__ */
2
+ return v("button",{type:"button",onClick:e,"aria-label":r.close,className:"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__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function C({open:s,onClose:h,side:C="right",size:W="md",title:D,description:T,footer:V,children:J,blocking:L=!1,dirty:z=!1,initialFocus:F,"aria-label":H,"aria-labelledby":P,"aria-describedby":Q,className:S=""}){const U=f(null),A=u(),B=u(),G=u(),I=e(c()),[O,R]=p(null),X=i({open:s,dirty:z,onClose:h,title:D,layer:O}),Z=f(null),K=r(s&&null!==I,Z);if(l(s),n(U,s&&null!==I,F),a(s),b(()=>{if(s)return m(()=>(L||X(),!0),()=>U.current)},[s,L,X]),!s||!I)return null;const Y="bottom"===C,$={...Y?{maxHeight:"85vh"}:{},...K?k(C,K):{}};/* @__PURE__ */
3
+ return x(y,{children:[/* @__PURE__ */v("span",{ref:Z,hidden:!0,"data-popup-anchor":""}),g(
4
+ /* @__PURE__ */v(t,{value:O,children:/* @__PURE__ */x("div",{ref:R,className:"fixed inset-0",style:{zIndex:d.overlay},role:"presentation","data-overlay-layer":"",children:[
5
+ /* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30",onClick:L?void 0:X,"aria-hidden":"true"}),
6
+ /* @__PURE__ */x("div",{ref:U,...o({modal:!0,titleId:D?G:void 0,labelledBy:P,label:H}),"aria-describedby":Q??(T?B:J?A:void 0),"data-drawer-side":C,"data-popup-panel":"",style:$,className:["fixed flex flex-col bg-white shadow-xl",Y?"":`w-full max-w-full ${w[W]}`,K?"":N[C],Y?"rounded-t-xl":"",S].filter(Boolean).join(" "),children:[D?/* @__PURE__ */x("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
7
7
  /* @__PURE__ */x("div",{className:"min-w-0",children:[
8
- /* @__PURE__ */v("h2",{id:A,className:"text-base font-semibold text-gray-900",children:D}),B&&/* @__PURE__ */v("p",{id:X,className:"mt-0.5 text-sm text-gray-500",children:B})]}),!L&&/* @__PURE__ */v(j,{onClose:E})]}):!L&&/* @__PURE__ */v("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */v(j,{onClose:E})}),
9
- /* @__PURE__ */x("div",{id:V,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[B&&!D&&/* @__PURE__ */v("p",{id:X,className:("mb-3 text-sm text-gray-500 "+(L?"":"pr-8")).trim(),children:B}),U]}),J&&/* @__PURE__ */v("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:J})]})]})}),F)]})}export{C as Drawer};
8
+ /* @__PURE__ */v("h2",{id:G,className:"text-base font-semibold text-gray-900",children:D}),T&&/* @__PURE__ */v("p",{id:B,className:"mt-0.5 text-sm text-gray-500",children:T})]}),!L&&/* @__PURE__ */v(j,{onClose:X})]}):!L&&/* @__PURE__ */v("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */v(j,{onClose:X})}),
9
+ /* @__PURE__ */x("div",{id:A,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[T&&!D&&/* @__PURE__ */v("p",{id:B,className:("mb-3 text-sm text-gray-500 "+(L?"":"pr-8")).trim(),children:T}),J]}),V&&/* @__PURE__ */v("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:V})]})]})}),I)]})}export{C as Drawer};
@@ -1 +1 @@
1
- import{iconButtonClasses as e}from"./chunk-UQYNPYF4.js";import{isAriaDisabled as r,swallowPress as a,describedByWith as i,OffWithReason as s}from"./chunk-XWFLIGDQ.js";import{forwardRef as d,useId as n}from"react";import{jsx as o}from"react/jsx-runtime";var t=d(function({children:d,variant:t="ghost",size:c="md",type:l="button",className:m="",pressed:b,disabledReason:p,ink:u,disabled:f,onClick:h,"aria-disabled":k,"aria-describedby":v,...y},N){const j=n(),x=(Boolean(f)||r(k))&&null!=p&&""!==p,z=x||r(k),C=/* @__PURE__ */o("button",{ref:N,type:l,className:e({variant:t,size:c,pressed:b??(!0===y["aria-pressed"]||"true"===y["aria-pressed"]),ink:u,className:m}),...y,disabled:x?void 0:f,"aria-disabled":!!z||k,"aria-describedby":i(v,x?j:void 0),onClick:z?a:h,children:d});return x?/* @__PURE__ */o(s,{reason:p,id:j,children:C}):C});export{t as IconButton_default};
1
+ import{iconButtonClasses as e}from"./chunk-UQYNPYF4.js";import{isAriaDisabled as r,swallowPress as a,describedByWith as i,OffWithReason as s}from"./chunk-TE6R53YD.js";import{forwardRef as d,useId as n}from"react";import{jsx as o}from"react/jsx-runtime";var t=d(function({children:d,variant:t="ghost",size:c="md",type:l="button",className:m="",pressed:b,disabledReason:p,ink:u,disabled:f,onClick:h,"aria-disabled":k,"aria-describedby":v,...y},N){const j=n(),Y=(Boolean(f)||r(k))&&null!=p&&""!==p,x=Y||r(k),z=/* @__PURE__ */o("button",{ref:N,type:l,className:e({variant:t,size:c,pressed:b??(!0===y["aria-pressed"]||"true"===y["aria-pressed"]),ink:u,className:m}),...y,disabled:Y?void 0:f,"aria-disabled":!!x||k,"aria-describedby":i(v,Y?j:void 0),onClick:x?a:h,children:d});return Y?/* @__PURE__ */o(s,{reason:p,id:j,children:z}):z});export{t as IconButton_default};
@@ -1,54 +1,54 @@
1
- import{toast_default as e}from"./chunk-7ELJQL7J.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{forwardRef as n,useRef as r,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as c,jsxs as s,Fragment as d}from"react/jsx-runtime";var u=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],h=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),x=n(function({src:n,filename:x,onApply:m,onCancel:g},N){const L=r(null),z=r(null),D=r(null),E=r(null),P=t().annotator,$=r(P);$.current=P;const[I,S]=o("select"),[W,B]=o(u[0]),[R,j]=o(4),[H,F]=o(24),[T,U]=o(h[0].id),[A,O]=o(!0),[K,V]=o(!1),[Z,G]=o(!1),[J,Q]=o(null),[X,q]=o(null),[Y,_]=o(6),[ee,te]=o(12),[ne,re]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[ce,se]=o(null),[de,ue]=o(1),[he,pe]=o(null),[xe,ye]=o(null),[me,ge]=o(null),fe=r(null),[we,be]=o(!1),ve=i(()=>ce?{w:ce.w*de,h:ce.h*de}:null,[ce,de]),ke=ve&&ae?ve.w/ae.w:1,Me=i(()=>ne.find(e=>e.id===oe)??null,[ne,oe]);a(()=>{"select"===I&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(F(Me.size),U(Me.font),O(Me.bold),V(Me.italic),G(Me.underline),Q(Me.borderColor),q(Me.background),_(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{E.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),re([]),ie(null)},t.onerror=()=>e.error($.current.loadFailed),t.src=n},[n]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),n=Math.max(0,t.width-32),r=Math.max(0,t.height-32);if(0===n||0===r)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>n&&(i=n,a=i/o),a>r&&(a=r,i=a*o),se({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>ne.filter(e=>"mosaic"===e.type),[ne]);a(()=>{const e=E.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const n=t.getContext("2d");n.drawImage(e,0,0);for(const e of Ne)C(n,e)},[ae,Ne,ce]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;const r=t.getScreenCTM();if(!r)return{x:0,y:0};const o=n.matrixTransform(r.inverse());return{x:o.x,y:o.y}},Le=e=>{fe.current=e,be(!0)};a(()=>{if(!we)return;const e=e=>{const t=fe.current;if(!t)return;const n=Ce(e);if("draw"===t.kind)pe(b(I,t.start,n,W,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(n.x-e.x)>1||Math.abs(n.y-e.y)>1)&&(t.points.push(n),pe({id:"",type:"draw",points:t.points.slice(),color:W,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,n));else if("move"===t.kind){const e=n.x-t.start.x,r=n.y-t.start.y;re(n=>n.map(n=>n.id===t.id?v(t.original,e,r):n))}else"resize"===t.kind&&re(e=>e.map(e=>e.id===t.id?function(e,t,n){if("arrow"===e.type)return"start"===t?{...e,x1:n.x,y1:n.y}:"end"===t?{...e,x2:n.x,y2:n.y}:e;if("text"===e.type||"draw"===e.type)return e;const r=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=r,c=i,s=o,d=a;"nw"===t&&(l=n.x,c=n.y);"ne"===t&&(s=n.x,c=n.y);"se"===t&&(s=n.x,d=n.y);"sw"===t&&(l=n.x,d=n.y);const u=M({x:l,y:c},{x:s,y:d});return{...e,x:u.x,y:u.y,w:u.w,h:u.h}}(t.original,t.corner,n):e))},t=()=>{const e=fe.current;if(fe.current=null,be(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const n={...e,id:p()};return re(e=>[...e,n]),ie(n.id),S("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:W,stroke:R};re(e=>[...e,t]),ie(t.id),S("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[we,I,W,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),re(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),re(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:A,italic:K,underline:Z}[e];"bold"===e&&O(t),"italic"===e&&V(t),"underline"===e&&G(t),oe&&re(n=>n.map(n=>n.id===oe&&"text"===n.type?{...n,[e]:t}:n))},De=e=>{Q(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Ee=e=>{q(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},Pe=e=>{if(!xe)return;const t=e??xe.value;if(!t.trim())return xe.editingId&&re(e=>e.filter(e=>e.id!==xe.editingId)),void ye(null);if(xe.editingId)re(e=>e.map(e=>e.id===xe.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:xe.x,y:xe.y,text:t,color:W,size:H,font:T,bold:A,italic:K,underline:Z,borderColor:J,background:X,padding:Y};re(t=>[...t,e]),ie(e.id),S("select")}ye(null)},$e=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const n=document.createElement("canvas");n.width=ae.w,n.height=ae.h;const r=n.getContext("2d");r.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),c=new Image;return await new Promise(e=>{c.onload=()=>e(),c.onerror=()=>e(),c.src=l}),r.drawImage(c,0,0,ae.w,ae.h),URL.revokeObjectURL(l),n};l(N,()=>({save:async()=>{const t=await $e();t&&t.toBlob(t=>{if(!t)return void e.error($.current.exportFailed);const n=URL.createObjectURL(t),r=document.createElement("a");r.href=n;const o=x.replace(/\.[^.]+$/,"");r.download=`${o}-annotated.png`,r.click(),URL.revokeObjectURL(n)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error($.current.clipboardUnsupported);const t=await $e();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success($.current.copied)}catch{e.error($.current.copyRefused)}else e.error($.current.copyFailed)},"image/png")}}),[ae,x]);const Ie=i(()=>[{id:"select",label:P.toolSelect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:P.toolDraw,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:P.toolRect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:P.toolEllipse,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:P.toolArrow,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:P.toolMosaic,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:P.toolText,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:P.toolCrop,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[P]),Se=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-on-accent":"text-ink hover:bg-gray-200"),We=Me?.type??("select"===I?null:I),Be="rect"===We||"circle"===We||"arrow"===We||"draw"===We,Re="rect"===We,je="text"===We;/* @__PURE__ */
1
+ import{toast_default as e}from"./chunk-MWKLLAJT.js";import{useShellStrings as t}from"./chunk-VNTJ7QO5.js";import{forwardRef as n,useRef as r,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as c,jsxs as s,Fragment as d}from"react/jsx-runtime";var u=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],h=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),x=n(function({src:n,filename:x,onApply:m,onCancel:g},N){const L=r(null),z=r(null),D=r(null),P=r(null),$=t().annotator,E=r($);E.current=$;const[I,W]=o("select"),[S,B]=o(u[0]),[R,j]=o(4),[T,H]=o(24),[F,U]=o(h[0].id),[A,O]=o(!0),[K,V]=o(!1),[Z,X]=o(!1),[q,G]=o(null),[J,Y]=o(null),[_,Q]=o(6),[ee,te]=o(12),[ne,re]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[ce,se]=o(null),[de,ue]=o(1),[he,pe]=o(null),[xe,ye]=o(null),[me,ge]=o(null),fe=r(null),[we,be]=o(!1),ve=i(()=>ce?{w:ce.w*de,h:ce.h*de}:null,[ce,de]),ke=ve&&ae?ve.w/ae.w:1,Me=i(()=>ne.find(e=>e.id===oe)??null,[ne,oe]);a(()=>{"select"===I&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(H(Me.size),U(Me.font),O(Me.bold),V(Me.italic),X(Me.underline),G(Me.borderColor),Y(Me.background),Q(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{P.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),re([]),ie(null)},t.onerror=()=>e.error(E.current.loadFailed),t.src=n},[n]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),n=Math.max(0,t.width-32),r=Math.max(0,t.height-32);if(0===n||0===r)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>n&&(i=n,a=i/o),a>r&&(a=r,i=a*o),se({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>ne.filter(e=>"mosaic"===e.type),[ne]);a(()=>{const e=P.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const n=t.getContext("2d");n.drawImage(e,0,0);for(const e of Ne)C(n,e)},[ae,Ne,ce]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;const r=t.getScreenCTM();if(!r)return{x:0,y:0};const o=n.matrixTransform(r.inverse());return{x:o.x,y:o.y}},Le=e=>{fe.current=e,be(!0)};a(()=>{if(!we)return;const e=e=>{const t=fe.current;if(!t)return;const n=Ce(e);if("draw"===t.kind)pe(b(I,t.start,n,S,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(n.x-e.x)>1||Math.abs(n.y-e.y)>1)&&(t.points.push(n),pe({id:"",type:"draw",points:t.points.slice(),color:S,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,n));else if("move"===t.kind){const e=n.x-t.start.x,r=n.y-t.start.y;re(n=>n.map(n=>n.id===t.id?v(t.original,e,r):n))}else"resize"===t.kind&&re(e=>e.map(e=>e.id===t.id?function(e,t,n){if("arrow"===e.type)return"start"===t?{...e,x1:n.x,y1:n.y}:"end"===t?{...e,x2:n.x,y2:n.y}:e;if("text"===e.type||"draw"===e.type)return e;const r=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=r,c=i,s=o,d=a;"nw"===t&&(l=n.x,c=n.y);"ne"===t&&(s=n.x,c=n.y);"se"===t&&(s=n.x,d=n.y);"sw"===t&&(l=n.x,d=n.y);const u=M({x:l,y:c},{x:s,y:d});return{...e,x:u.x,y:u.y,w:u.w,h:u.h}}(t.original,t.corner,n):e))},t=()=>{const e=fe.current;if(fe.current=null,be(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const n={...e,id:p()};return re(e=>[...e,n]),ie(n.id),W("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:S,stroke:R};re(e=>[...e,t]),ie(t.id),W("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[we,I,S,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),re(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),re(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:A,italic:K,underline:Z}[e];"bold"===e&&O(t),"italic"===e&&V(t),"underline"===e&&X(t),oe&&re(n=>n.map(n=>n.id===oe&&"text"===n.type?{...n,[e]:t}:n))},De=e=>{G(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Pe=e=>{Y(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},$e=e=>{if(!xe)return;const t=e??xe.value;if(!t.trim())return xe.editingId&&re(e=>e.filter(e=>e.id!==xe.editingId)),void ye(null);if(xe.editingId)re(e=>e.map(e=>e.id===xe.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:xe.x,y:xe.y,text:t,color:S,size:T,font:F,bold:A,italic:K,underline:Z,borderColor:q,background:J,padding:_};re(t=>[...t,e]),ie(e.id),W("select")}ye(null)},Ee=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const n=document.createElement("canvas");n.width=ae.w,n.height=ae.h;const r=n.getContext("2d");r.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),c=new Image;return await new Promise(e=>{c.onload=()=>e(),c.onerror=()=>e(),c.src=l}),r.drawImage(c,0,0,ae.w,ae.h),URL.revokeObjectURL(l),n};l(N,()=>({save:async()=>{const t=await Ee();t&&t.toBlob(t=>{if(!t)return void e.error(E.current.exportFailed);const n=URL.createObjectURL(t),r=document.createElement("a");r.href=n;const o=x.replace(/\.[^.]+$/,"");r.download=`${o}-annotated.png`,r.click(),URL.revokeObjectURL(n)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error(E.current.clipboardUnsupported);const t=await Ee();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success(E.current.copied)}catch{e.error(E.current.copyRefused)}else e.error(E.current.copyFailed)},"image/png")}}),[ae,x]);const Ie=i(()=>[{id:"select",label:$.toolSelect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:$.toolDraw,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:$.toolRect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:$.toolEllipse,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:$.toolArrow,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:$.toolMosaic,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:$.toolText,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:$.toolCrop,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[$]),We=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-on-accent":"text-ink hover:bg-gray-200"),Se=Me?.type??("select"===I?null:I),Be="rect"===Se||"circle"===Se||"arrow"===Se||"draw"===Se,Re="rect"===Se,je="text"===Se;/* @__PURE__ */
2
2
  return s("div",{className:"flex flex-col h-full bg-gray-100",children:[
3
- /* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-line bg-surface shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */c("button",{onClick:()=>{S(e.id),ie(null)},title:e.label,className:Se(I===e.id),children:e.icon},e.id)),
3
+ /* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-line bg-surface shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */c("button",{onClick:()=>{W(e.id),ie(null)},title:e.label,className:We(I===e.id),children:e.icon},e.id)),
4
4
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
5
- /* @__PURE__ */c("div",{className:"flex items-center gap-1",children:u.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&re(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(W===e?"ring-2 ring-blue-500 ring-offset-1":"border-gray-300"),style:{background:e}},e))}),Be&&/* @__PURE__ */s(d,{children:[
5
+ /* @__PURE__ */c("div",{className:"flex items-center gap-1",children:u.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&re(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(S===e?"ring-2 ring-blue-500 ring-offset-1":"border-gray-300"),style:{background:e}},e))}),Be&&/* @__PURE__ */s(d,{children:[
6
6
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
7
7
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
8
- /* @__PURE__ */c("span",{children:P.weight}),
8
+ /* @__PURE__ */c("span",{children:$.weight}),
9
9
  /* @__PURE__ */c("input",{type:"range",min:1,max:20,step:1,value:R,onChange:e=>{return t=Number(e.target.value),j(t),void(oe&&re(e=>e.map(e=>e.id!==oe?e:"rect"===e.type||"circle"===e.type||"arrow"===e.type||"draw"===e.type?{...e,stroke:t}:e)));var t},className:"w-16 accent-blue-500"}),
10
10
  /* @__PURE__ */c("span",{className:"tabular-nums w-5 text-right",children:R})]})]}),Re&&/* @__PURE__ */s(d,{children:[
11
11
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
12
12
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
13
- /* @__PURE__ */c("span",{children:P.radius}),
13
+ /* @__PURE__ */c("span",{children:$.radius}),
14
14
  /* @__PURE__ */c("input",{type:"range",min:0,max:48,step:1,value:ee,onChange:e=>{return t=Number(e.target.value),te(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"rect"===e.type?{...e,radius:t}:e)));var t},className:"w-16 accent-blue-500"}),
15
15
  /* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:ee})]})]}),je&&/* @__PURE__ */s(d,{children:[
16
16
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
17
- /* @__PURE__ */c("select",{value:T,onChange:e=>{return t=e.target.value,U(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:h.map(e=>/* @__PURE__ */c("option",{value:e.id,children:P[e.name]},e.id))}),
18
- /* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:Se(A),title:P.bold,children:/* @__PURE__ */c("span",{className:"font-bold",children:P.boldLetter})}),
19
- /* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:Se(K),title:P.italic,children:/* @__PURE__ */c("span",{className:"italic",children:P.italicLetter})}),
20
- /* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:Se(Z),title:P.underline,children:/* @__PURE__ */c("span",{className:"underline",children:P.underlineLetter})}),
17
+ /* @__PURE__ */c("select",{value:F,onChange:e=>{return t=e.target.value,U(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:h.map(e=>/* @__PURE__ */c("option",{value:e.id,children:$[e.name]},e.id))}),
18
+ /* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:We(A),title:$.bold,children:/* @__PURE__ */c("span",{className:"font-bold",children:$.boldLetter})}),
19
+ /* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:We(K),title:$.italic,children:/* @__PURE__ */c("span",{className:"italic",children:$.italicLetter})}),
20
+ /* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:We(Z),title:$.underline,children:/* @__PURE__ */c("span",{className:"underline",children:$.underlineLetter})}),
21
21
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
22
- /* @__PURE__ */c("span",{children:P.size}),
23
- /* @__PURE__ */c("input",{type:"range",min:10,max:96,step:1,value:H,onChange:e=>{return t=Number(e.target.value),F(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,size:t}:e)));var t},className:"w-16 accent-blue-500"}),
24
- /* @__PURE__ */c("span",{className:"tabular-nums w-7 text-right",children:H})]}),
22
+ /* @__PURE__ */c("span",{children:$.size}),
23
+ /* @__PURE__ */c("input",{type:"range",min:10,max:96,step:1,value:T,onChange:e=>{return t=Number(e.target.value),H(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,size:t}:e)));var t},className:"w-16 accent-blue-500"}),
24
+ /* @__PURE__ */c("span",{className:"tabular-nums w-7 text-right",children:T})]}),
25
25
  /* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
26
- /* @__PURE__ */c("span",{children:P.border}),J?/* @__PURE__ */s(d,{children:[
27
- /* @__PURE__ */c("input",{type:"color",value:J,onChange:e=>De(e.target.value),title:P.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
28
- /* @__PURE__ */c("button",{onClick:()=>De(null),title:P.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>De(W),title:P.addBorder,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:P.add})]}),
26
+ /* @__PURE__ */c("span",{children:$.border}),q?/* @__PURE__ */s(d,{children:[
27
+ /* @__PURE__ */c("input",{type:"color",value:q,onChange:e=>De(e.target.value),title:$.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
28
+ /* @__PURE__ */c("button",{onClick:()=>De(null),title:$.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>De(S),title:$.addBorder,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:$.add})]}),
29
29
  /* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
30
- /* @__PURE__ */c("span",{children:P.fill}),X?/* @__PURE__ */s(d,{children:[
31
- /* @__PURE__ */c("input",{type:"color",value:X,onChange:e=>Ee(e.target.value),title:P.fillColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
32
- /* @__PURE__ */c("button",{onClick:()=>Ee(null),title:P.removeFill,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>Ee("#ffffff"),title:P.addFill,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:P.add})]}),
30
+ /* @__PURE__ */c("span",{children:$.fill}),J?/* @__PURE__ */s(d,{children:[
31
+ /* @__PURE__ */c("input",{type:"color",value:J,onChange:e=>Pe(e.target.value),title:$.fillColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
32
+ /* @__PURE__ */c("button",{onClick:()=>Pe(null),title:$.removeFill,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>Pe("#ffffff"),title:$.addFill,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:$.add})]}),
33
33
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
34
- /* @__PURE__ */c("span",{children:P.padding}),
35
- /* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:Y,onChange:e=>{return t=Number(e.target.value),_(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,padding:t}:e)));var t},className:"w-14 accent-blue-500"}),
36
- /* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:Y})]})]}),
34
+ /* @__PURE__ */c("span",{children:$.padding}),
35
+ /* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:_,onChange:e=>{return t=Number(e.target.value),Q(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,padding:t}:e)));var t},className:"w-14 accent-blue-500"}),
36
+ /* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:_})]})]}),
37
37
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
38
- /* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomOut,children:"−"}),
38
+ /* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.zoomOut,children:"−"}),
39
39
  /* @__PURE__ */s("span",{className:"text-gray-600 tabular-nums w-10 text-center",children:[Math.round(100*de),"%"]}),
40
- /* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.min(4,Math.round(100*(e+.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomIn,children:"+"}),
41
- /* @__PURE__ */c("button",{onClick:()=>ue(1),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.fitHint,children:P.fit}),
40
+ /* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.min(4,Math.round(100*(e+.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.zoomIn,children:"+"}),
41
+ /* @__PURE__ */c("button",{onClick:()=>ue(1),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.fitHint,children:$.fit}),
42
42
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
43
- /* @__PURE__ */c("button",{onClick:()=>{re(e=>e.slice(0,-1)),ie(null)},disabled:0===ne.length,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-700",children:P.undo}),
43
+ /* @__PURE__ */c("button",{onClick:()=>{re(e=>e.slice(0,-1)),ie(null)},disabled:0===ne.length,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-700",children:$.undo}),
44
44
  /* @__PURE__ */s("div",{className:"ml-auto flex items-center gap-2",children:[me&&/* @__PURE__ */s(d,{children:[
45
- /* @__PURE__ */c("button",{onClick:()=>{if(!me||!E.current||!ae)return;const e=me,t=document.createElement("canvas");t.width=Math.round(e.w),t.height=Math.round(e.h);const n=t.getContext("2d"),r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const o=r.getContext("2d");o.drawImage(E.current,0,0);for(const e of Ne)C(o,e);n.drawImage(r,e.x,e.y,e.w,e.h,0,0,e.w,e.h);const i=new Image;i.onload=()=>{E.current=i,le({w:i.naturalWidth,h:i.naturalHeight}),re(t=>t.filter(e=>"mosaic"!==e.type).map(t=>v(t,-e.x,-e.y)).filter(e=>function(e,t,n){const r=k(e);return r.x+r.w>0&&r.y+r.h>0&&r.x<t&&r.y<n}(e,i.naturalWidth,i.naturalHeight))),ge(null)},i.src=t.toDataURL("image/png")},className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600",children:P.applyCrop}),
46
- /* @__PURE__ */c("button",{onClick:()=>ge(null),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",children:P.cancel})]}),m&&!me&&/* @__PURE__ */s(d,{children:[g&&/* @__PURE__ */c("button",{onClick:g,className:"px-3 py-1 rounded hover:bg-gray-200 text-gray-700 text-xs font-medium",children:P.cancel}),
47
- /* @__PURE__ */c("button",{onClick:async()=>{const t=await $e();t?t.toBlob(t=>{t?m(t):e.error($.current.exportFailed)},"image/png"):e.error($.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:P.apply})]})]})]}),
45
+ /* @__PURE__ */c("button",{onClick:()=>{if(!me||!P.current||!ae)return;const e=me,t=document.createElement("canvas");t.width=Math.round(e.w),t.height=Math.round(e.h);const n=t.getContext("2d"),r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const o=r.getContext("2d");o.drawImage(P.current,0,0);for(const e of Ne)C(o,e);n.drawImage(r,e.x,e.y,e.w,e.h,0,0,e.w,e.h);const i=new Image;i.onload=()=>{P.current=i,le({w:i.naturalWidth,h:i.naturalHeight}),re(t=>t.filter(e=>"mosaic"!==e.type).map(t=>v(t,-e.x,-e.y)).filter(e=>function(e,t,n){const r=k(e);return r.x+r.w>0&&r.y+r.h>0&&r.x<t&&r.y<n}(e,i.naturalWidth,i.naturalHeight))),ge(null)},i.src=t.toDataURL("image/png")},className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600",children:$.applyCrop}),
46
+ /* @__PURE__ */c("button",{onClick:()=>ge(null),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",children:$.cancel})]}),m&&!me&&/* @__PURE__ */s(d,{children:[g&&/* @__PURE__ */c("button",{onClick:g,className:"px-3 py-1 rounded hover:bg-gray-200 text-gray-700 text-xs font-medium",children:$.cancel}),
47
+ /* @__PURE__ */c("button",{onClick:async()=>{const t=await Ee();t?t.toBlob(t=>{t?m(t):e.error(E.current.exportFailed)},"image/png"):e.error(E.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:$.apply})]})]})]}),
48
48
  /* @__PURE__ */c("div",{ref:L,className:"flex-1 overflow-auto bg-gray-200 flex items-center justify-center p-4 relative",children:ve&&ae&&/* @__PURE__ */s("div",{className:"relative shadow-lg rounded overflow-hidden bg-white shrink-0",style:{width:ve.w,height:ve.h},children:[
49
49
  /* @__PURE__ */c("canvas",{ref:z,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block"}}),
50
- /* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(xe)return void Pe();const t=Ce(e);return void ye({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:W,stroke:R});pe(b(I,t,t,W,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[ne.map(e=>/* @__PURE__ */c(y,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&ye({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,n)=>((e,t,n)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:n,start:Ce(e),original:t})})(t,e,n)},e.id)),he&&/* @__PURE__ */c(y,{anno:{...he,id:"__preview"},preview:!0}),me&&/* @__PURE__ */c(f,{rect:me,imageSize:ae})]}),xe&&/* @__PURE__ */c(w,{pendingText:xe,color:W,size:H,font:h.find(e=>e.id===T)?.css??h[0].css,bold:A,italic:K,underline:Z,borderColor:J,background:X,padding:Y,scale:ke,onChange:e=>ye({...xe,value:e}),onCommit:Pe,onCancel:()=>ye(null)})]})}),
51
- /* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-line bg-surface text-2xs text-ink-faint shrink-0",children:"select"===I?oe?P.hintSelected:P.hintSelect:"text"===I?P.hintText:"crop"===I?P.hintCrop:"draw"===I?P.hintDraw:P.hintShape})]})});function y({anno:e,selected:t,preview:n,zoom:r=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),u=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let x;if("rect"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("circle"===e.type)x=/* @__PURE__ */c("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...u});else if("arrow"===e.type)x=/* @__PURE__ */c(g,{anno:e,interactive:u});else if("draw"===e.type)x=/* @__PURE__ */c("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("mosaic"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:t?"#3b82f6":"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...u});else{const t=h.find(t=>t.id===e.font)?.css??h[0].css,n=e.padding??0,r=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;x=/* @__PURE__ */s("g",{...u,...p,children:[r&&/* @__PURE__ */c("rect",{x:o.x-n,y:o.y-n,width:Math.max(0,o.w)+2*n,height:Math.max(0,o.h)+2*n,rx:Math.min(8,n),ry:Math.min(8,n),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
50
+ /* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(xe)return void $e();const t=Ce(e);return void ye({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:S,stroke:R});pe(b(I,t,t,S,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[ne.map(e=>/* @__PURE__ */c(y,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&ye({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,n)=>((e,t,n)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:n,start:Ce(e),original:t})})(t,e,n)},e.id)),he&&/* @__PURE__ */c(y,{anno:{...he,id:"__preview"},preview:!0}),me&&/* @__PURE__ */c(f,{rect:me,imageSize:ae})]}),xe&&/* @__PURE__ */c(w,{pendingText:xe,color:S,size:T,font:h.find(e=>e.id===F)?.css??h[0].css,bold:A,italic:K,underline:Z,borderColor:q,background:J,padding:_,scale:ke,onChange:e=>ye({...xe,value:e}),onCommit:$e,onCancel:()=>ye(null)})]})}),
51
+ /* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-line bg-surface text-2xs text-ink-faint shrink-0",children:"select"===I?oe?$.hintSelected:$.hintSelect:"text"===I?$.hintText:"crop"===I?$.hintCrop:"draw"===I?$.hintDraw:$.hintShape})]})});function y({anno:e,selected:t,preview:n,zoom:r=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),u=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let x;if("rect"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("circle"===e.type)x=/* @__PURE__ */c("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...u});else if("arrow"===e.type)x=/* @__PURE__ */c(g,{anno:e,interactive:u});else if("draw"===e.type)x=/* @__PURE__ */c("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("mosaic"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:t?"#3b82f6":"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...u});else{const t=h.find(t=>t.id===e.font)?.css??h[0].css,n=e.padding??0,r=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;x=/* @__PURE__ */s("g",{...u,...p,children:[r&&/* @__PURE__ */c("rect",{x:o.x-n,y:o.y-n,width:Math.max(0,o.w)+2*n,height:Math.max(0,o.h)+2*n,rx:Math.min(8,n),ry:Math.min(8,n),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
52
52
  /* @__PURE__ */c("text",{x:e.x,y:e.y+e.size,fill:e.color,fontSize:e.size,fontWeight:e.bold?700:400,fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":void 0,fontFamily:t,style:{userSelect:"none"},children:e.text.split("\n").map((t,n)=>/* @__PURE__ */c("tspan",{x:e.x,dy:0===n?0:1.2*e.size,children:t},n))})]})}/* @__PURE__ */
53
53
  return s("g",{children:[x,t&&!n&&/* @__PURE__ */s(d,{children:[
54
54
  /* @__PURE__ */c("rect",{"data-chrome":"selection",x:l.x-4,y:l.y-4,width:l.w+8,height:l.h+8,fill:"none",stroke:"#3b82f6",strokeWidth:2/r,strokeDasharray:`${6/r},${4/r}`,pointerEvents:"none"}),a&&/* @__PURE__ */c(m,{anno:e,zoom:r,onHandlePointerDown:a})]})]})}function m({anno:e,zoom:t,onHandlePointerDown:n}){const r=6/t,o=1.5/t,i=e=>({fill:"#fff",stroke:"#3b82f6",strokeWidth:o,pointerEvents:"all",style:{cursor:e},"data-chrome":"handle"});if("arrow"===e.type)/* @__PURE__ */
@@ -1,11 +1,11 @@
1
- import{Card as e}from"./chunk-P3RXXWXN.js";import{Select_default as a}from"./chunk-M3JNILT2.js";import{Pagination as r}from"./chunk-LXL2UCUR.js";import{Input_default as t}from"./chunk-NGLU2GKE.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-JPNAEN53.js";import{Button_default as l}from"./chunk-7DI3VQCF.js";import{Icon as c}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as m}from"./chunk-CJH2BGXY.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,N]=n("");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-ZDDYTXPK.js";import{Select_default as a}from"./chunk-G2BZ7NCM.js";import{Pagination as r}from"./chunk-Z32K3LIJ.js";import{Input_default as t}from"./chunk-2UTCGWMZ.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{Icon as c}from"./chunk-R64OZ6TC.js";import{TH_ONE_LINE as m}from"./chunk-WGLHB6WE.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
2
2
  return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
5
5
  /* @__PURE__ */d(l,{size:"sm",children:"Invite member"})]}),
6
6
  /* @__PURE__ */o(e,{padded:!1,children:[
7
7
  /* @__PURE__ */o("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-100 p-3",children:[
8
- /* @__PURE__ */d("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */d(t,{value:y,onChange:e=>N(e.target.value),placeholder:"Search members…",leftIcon:/* @__PURE__ */d(x,{})})}),
8
+ /* @__PURE__ */d("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */d(t,{value:y,onChange:e=>v(e.target.value),placeholder:"Search members…",leftIcon:/* @__PURE__ */d(x,{})})}),
9
9
  /* @__PURE__ */d("div",{className:"w-40",children:/* @__PURE__ */d(a,{value:g,onChange:f,placeholder:"All roles",options:[{value:"admin",label:"Admin"},{value:"editor",label:"Editor"},{value:"viewer",label:"Viewer"}]})}),
10
10
  /* @__PURE__ */d(l,{variant:"secondary",size:"sm",children:"Filter"})]}),
11
11
  /* @__PURE__ */o("table",{className:"w-full text-sm",children:[
@@ -1,2 +1,2 @@
1
- import{Icon as e}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-R64OZ6TC.js";import{useShellStrings as t}from"./chunk-VNTJ7QO5.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
2
2
  return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
@@ -0,0 +1,9 @@
1
+ import{Calendar as e}from"./chunk-PR42NIDL.js";import{fromDateKey as t,toDateKey as r}from"./chunk-2HMNOLKX.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-AYZY3YNC.js";import{calendarNames as i}from"./chunk-Y3JW2GW5.js";import{Icon as o}from"./chunk-R64OZ6TC.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as u}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as b}from"./chunk-VNTJ7QO5.js";import{forwardRef as f,useState as p,useRef as h,useId as v,useEffect as g}from"react";import{createPortal as y}from"react-dom";import{jsx as x,jsxs as N}from"react/jsx-runtime";var k=/^\d{4}-\d{2}-\d{2}$/,j=/^(aria|data)-/,w=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function D(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":r(e);if(k.test(e))return e;const t=new Date(e);return Number.isNaN(t.getTime())?"":r(t)}function C(e,r){const a=t(e);return a?r.longDate(a.getFullYear(),a.getMonth(),a.getDate()):""}var F=f(function({value:f,onChange:k,min:F,max:O,invalid:W,size:B,native:L,weekStartsOn:T,className:$="","aria-label":q,"aria-describedby":E,"aria-labelledby":I,id:J,name:S,disabled:Y,placeholder:z,required:U,clearable:G,form:M,title:P,tabIndex:R,autoFocus:H,onFocus:Q,onBlur:V,...Z},A){const K=G??!U,X=D(f),_=D(F),ee=D(O),te=m().datePicker,re=b(),ae=i(re),[ne,ie]=p(!1),oe=h(null),le=h(null),se=h(null),de=v(),ue=v(),ce=v(),me=d(le,ne,{popupRef:se}),[be,fe]=p(!1);u(()=>{const e=!!J&&(le.current?.labels?.length??0)>0;e!==be&&fe(e)});const pe=!q&&(!!I||be);if(g(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),g(()=>{if(ne)return c(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),L)/* @__PURE__ */
2
+ return x("input",{ref:A,type:"date",lang:re,id:J,name:S,disabled:Y,"aria-label":q,"aria-describedby":E,"aria-invalid":W||void 0,value:X,min:_||void 0,max:ee||void 0,onChange:e=>k?.(t(e.target.value)),className:a({invalid:W,size:B,className:$}),"aria-labelledby":I,required:U,form:M,title:P,tabIndex:R,autoFocus:H,onFocus:Q,onBlur:V,...Z});const he=Object.fromEntries(Object.entries(Z).filter(([e])=>j.test(e)&&!w.has(e))),ve=Z["aria-required"],ge=!!U||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,E].filter(Boolean).join(" ")||void 0,xe=r(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=z??te.placeholder;/* @__PURE__ */
3
+ return N("div",{ref:oe,className:"relative",children:[
4
+ /* @__PURE__ */x("input",{ref:A,type:"hidden",name:S,form:M,value:X}),
5
+ /* @__PURE__ */N("button",{ref:le,type:"button",...he,id:J,disabled:Y,title:P,tabIndex:R,autoFocus:H,onFocus:Q,onBlur:V,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":I,"aria-describedby":ye,"aria-label":q?`${q}${X?`, ${C(X,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:W,size:B,className:$})} flex items-center justify-between text-left`,children:[
6
+ /* @__PURE__ */x("span",{className:X?"text-ink-strongest":n,children:X?C(X,ae):ke}),
7
+ /* @__PURE__ */x(o,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */x("span",{id:ue,className:"sr-only",children:X?C(X,ae):ke}),ge&&/* @__PURE__ */x("span",{id:ce,className:"sr-only",children:te.required}),ne&&y(
8
+ /* @__PURE__ */N("div",{ref:se,id:de,role:"dialog","aria-label":q??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:s.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
9
+ /* @__PURE__ */x(e,{value:X||null,min:_||null,max:ee||null,weekStartsOn:T,onSelect:e=>{ie(!1),le.current?.focus(),k?.(t(e))}}),(K||Ne)&&/* @__PURE__ */N("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[K&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{F as DatePicker_default};
@@ -1,4 +1,4 @@
1
- import{useShellLocale as e}from"./chunk-GDQJBQ5B.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:u=""}){const h=s[i],f=Math.max(8,Math.round(.28*h)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
1
+ import{useShellLocale as e}from"./chunk-VNTJ7QO5.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:u=""}){const h=s[i],f=Math.max(8,Math.round(.28*h)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
2
2
  /* @__PURE__ */
3
3
  return l("span",{className:`relative inline-flex shrink-0 ${u}`.trim(),style:{width:h,height:h},...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:[y?/* @__PURE__ */a("img",{src:e,alt:"",onError:()=>g(!0),className:"h-full w-full rounded-full object-cover"}):/* @__PURE__ */a("span",{className:"flex h-full w-full items-center justify-center rounded-full bg-gray-100 font-medium text-gray-600",style:{fontSize:Math.round(.4*h)},children:m(t)}),c&&/* @__PURE__ */a("span",{className:`absolute bottom-0 right-0 rounded-full ring-2 ring-white ${o[c]}`,style:{width:f,height:f}})]})}function u({children:r,max:n,size:o="md",className:m=""}){const c=i.toArray(r),u=n?c.slice(0,n):c,h=n?c.length-u.length:0,f=s[o],d=Math.round(.3*f),g=e();/* @__PURE__ */
4
4
  return l("div",{className:`flex items-center ${m}`.trim(),children:[u.map((e,t)=>/* @__PURE__ */a("span",{className:"rounded-full ring-2 ring-white",style:{marginLeft:0===t?0:-d},children:e},t)),h>0&&/* @__PURE__ */l("span",{className:"flex items-center justify-center rounded-full bg-gray-200 font-medium text-gray-600 ring-2 ring-white",style:{width:f,height:f,marginLeft:-d,fontSize:Math.round(.36*f)},children:["+",t(h,g)]})]})}export{c as Avatar,u as AvatarGroup};
@@ -1,7 +1,7 @@
1
- import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},P=o(null),A=t=>e=>{P.current=t,e.currentTarget.setPointerCapture(e.pointerId)},B=t=>e=>{P.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},L=t=>()=>{P.current===t&&(P.current=null)},N=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
- return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:A(t),onPointerMove:B(t),onPointerUp:L(t),onPointerCancel:L(t)},t)};/* @__PURE__ */
1
+ import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-VNTJ7QO5.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},N=o(null),P=t=>e=>{N.current=t,e.currentTarget.setPointerCapture(e.pointerId)},A=t=>e=>{N.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},L=t=>()=>{N.current===t&&(N.current=null)},R=t=>{const e="from"===t?w:x;/* @__PURE__ */
2
+ return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:P(t),onPointerMove:A(t),onPointerUp:L(t),onPointerCancel:L(t)},t)};/* @__PURE__ */
3
3
  return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
4
4
  /* @__PURE__ */n("path",{d:F,fill:e.grid}),
5
5
  /* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
6
6
  /* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
7
- /* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),N("from"),N("to")]})})}export{a as ChartBrush};
7
+ /* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),R("from"),R("to")]})})}export{a as ChartBrush};
@@ -0,0 +1,11 @@
1
+ import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-L433UT5E.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-EOVXFXVV.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-R64OZ6TC.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-VNTJ7QO5.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",L=e=>e.stopPropagation();function U({images:r,startIndex:y=0,onClose:U,onIndexChange:V,onOpenFile:$}){const z=h().lightbox,A=d(),D=p(null),F=p(null),[J,O]=x(y),T=r.length,E=A&&T>0,I=b(e=>{if(T<2)return;const t=((J+e)%T+T)%T;O(t),V?.(t)},[J,T,V]);if(a(E),l(D,E,F),i(E),k(()=>{if(E)return f(()=>(U(),!0),()=>D.current)},[E,U]),k(()=>{if(!E)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),I("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E,I]),!E)return null;const P=r[Math.min(J,T-1)],Q=j(P),W=P.caption||n(P.url);let G;return G="video"===Q?/* @__PURE__ */v("video",{src:P.url,controls:!0,playsInline:!0,"aria-label":W,onClick:L,className:`${e} rounded-lg bg-black`}):"file"===Q?/* @__PURE__ */w("div",{onClick:L,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
2
+ /* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
3
+ /* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:W}),$?/* @__PURE__ */v(c,{size:"sm",onClick:()=>$(P),children:z.openFile}):/* @__PURE__ */v("a",{href:P.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:z.openFile})]}):/* @__PURE__ */v(t,{src:P.url,alt:W,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
+ /* @__PURE__ */w("div",{ref:D,...o({role:"dialog",modal:!0,label:z.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:U,children:[G,
5
+ /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:L,children:[
6
+ /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:z.counter(J+1,T)}),
7
+ /* @__PURE__ */v("button",{ref:F,type:"button",onClick:U,"aria-label":z.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),T>1&&/* @__PURE__ */w(N,{children:[
8
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{L(e),I(-1)},"aria-label":z.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{L(e),I(1)},"aria-label":z.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
+ /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:L,children:[
11
+ /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:W}),"file"!==Q&&/* @__PURE__ */v("a",{href:P.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:z.openOriginal})]})]}),document.body)}export{U as ImageLightbox,j as lightboxKind};
@@ -1,9 +1,9 @@
1
- import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-EKCQ7XBZ.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-GDQJBQ5B.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:j="bg-white"}){const z="right"===m,D=i().sidebar,O=a(),W=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[E,P]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),B=null!=l||null!=n,I=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:E},children:[
2
- /* @__PURE__ */f("div",{className:`flex h-full flex-col ${B?"overflow-hidden":"overflow-y-auto"} ${C}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),B?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
- /* @__PURE__ */p(t,{side:m,width:E,onResize:P,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:D.resize})]}),K=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${j}`,children:u});/* @__PURE__ */
4
- return f("div",O?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:W,top:l,fallback:D.sections}),K,
6
- /* @__PURE__ */p(v,{phone:W,bottom:n,label:D.sections,closeLabel:D.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[z?null:I,K,z?I:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
1
+ import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-WZMZ3N5B.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-R64OZ6TC.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-VNTJ7QO5.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:O="bg-white"}){const W="right"===m,j=i().sidebar,z=a(),T=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[D,P]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),R=null!=l||null!=n,E=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:D},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${R?"overflow-hidden":"overflow-y-auto"} ${C}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),R?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
+ /* @__PURE__ */p(t,{side:m,width:D,onResize:P,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:j.resize})]}),I=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${O}`,children:u});/* @__PURE__ */
4
+ return f("div",z?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
+ /* @__PURE__ */p(g,{phone:T,top:l,fallback:j.sections}),I,
6
+ /* @__PURE__ */p(v,{phone:T,bottom:n,label:j.sections,closeLabel:j.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[W?null:E,I,W?E:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
7
7
  return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
8
8
  /* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
9
9
  /* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
@@ -1,4 +1,4 @@
1
- import{Tabs as e}from"./chunk-RQDVAUXD.js";import{Card as a}from"./chunk-P3RXXWXN.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-JPNAEN53.js";import{Button_default as l}from"./chunk-7DI3VQCF.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
1
+ import{Tabs as e}from"./chunk-N5KO2IHG.js";import{Card as a}from"./chunk-ZDDYTXPK.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
2
2
  return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
@@ -1 +1 @@
1
- import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-GDQJBQ5B.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
1
+ import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-VNTJ7QO5.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
@@ -0,0 +1 @@
1
+ var r="11.10.0",a=r;export{a as APP_VERSION,r as VERSION};
@@ -1,5 +1,5 @@
1
- import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-QQ2LDC6C.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function h(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function f(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:f(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),w=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
2
- return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":L,labelsFit:R=!1}){const A=i([]),$=i(null),N="pill"===x,[D,S]=c(null),H=D??"none",W=i(()=>{});W.current=()=>{const t=$.current;if(!t||!R)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);S(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...y(t,n.length)}))},a(()=>{W.current()}),d(()=>{const e=$.current?.parentElement;if(!R||!e)return;let t=!0;const n=()=>{t&&W.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[R]);const j=(e,t)=>{for(let n=1;n<=f.length;n+=1){const r=((e+t*n)%f.length+f.length)%f.length;if(!f[r]?.disabled)return r}return null},M=e=>{const t=1===e?f.map((e,t)=>t):f.map((e,t)=>f.length-1-t);for(const e of t)if(!f[e]?.disabled)return e;return null};/* @__PURE__ */
3
- return s("div",{ref:$,role:"tablist","data-labels-shown":R?H:void 0,"aria-label":E,"aria-labelledby":L,onKeyDown:e=>{const t=f.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=j(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=j(t,-1);else if("Home"===e.key)n=M(1);else{if("End"!==e.key)return;n=M(-1)}e.preventDefault(),null!==n&&n!==t&&(g(f[n].id),A.current[n]?.focus())},className:N?o(k,F):b(k,F),children:f.map((e,o)=>{const a=e.id===p,i=R&&null!=e.icon,c="all"===H||"chosen"===H&&a,d=/* @__PURE__ */s("button",{ref:e=>{A.current[o]=e},type:"button",role:"tab",id:C?v(C,e.id):void 0,"aria-controls":C?w(C,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:N?n({selected:a,disabled:e.disabled,block:k}):h(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
1
+ import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-NJN5IKWO.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function h(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function f(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:f(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),w=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
2
+ return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":N,labelsFit:R=!1}){const A=i([]),L=i(null),$="pill"===x,[D,S]=c(null),W=D??"none",H=i(()=>{});H.current=()=>{const t=L.current;if(!t||!R)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);S(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...y(t,n.length)}))},a(()=>{H.current()}),d(()=>{const e=L.current?.parentElement;if(!R||!e)return;let t=!0;const n=()=>{t&&H.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[R]);const j=(e,t)=>{for(let n=1;n<=f.length;n+=1){const r=((e+t*n)%f.length+f.length)%f.length;if(!f[r]?.disabled)return r}return null},I=e=>{const t=1===e?f.map((e,t)=>t):f.map((e,t)=>f.length-1-t);for(const e of t)if(!f[e]?.disabled)return e;return null};/* @__PURE__ */
3
+ return s("div",{ref:L,role:"tablist","data-labels-shown":R?W:void 0,"aria-label":E,"aria-labelledby":N,onKeyDown:e=>{const t=f.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=j(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=j(t,-1);else if("Home"===e.key)n=I(1);else{if("End"!==e.key)return;n=I(-1)}e.preventDefault(),null!==n&&n!==t&&(g(f[n].id),A.current[n]?.focus())},className:$?o(k,F):b(k,F),children:f.map((e,o)=>{const a=e.id===p,i=R&&null!=e.icon,c="all"===W||"chosen"===W&&a,d=/* @__PURE__ */s("button",{ref:e=>{A.current[o]=e},type:"button",role:"tab",id:C?v(C,e.id):void 0,"aria-controls":C?w(C,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:$?n({selected:a,disabled:e.disabled,block:k}):h(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
4
4
  /* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
5
- /* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:e.label})]}):/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id),b=i?e.tooltip??e.label:e.tooltip;return null!=b&&!1!==b?/* @__PURE__ */s(l,{content:b,className:N||k?r(k):void 0,children:d},e.id):d})})}export{x as Tabs,v as tabButtonId,w as tabPanelId};
5
+ /* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:e.label})]}):/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id),b=i?e.tooltip??e.label:e.tooltip;return null!=b&&!1!==b?/* @__PURE__ */s(l,{content:b,className:$||k?r(k):void 0,children:d},e.id):d})})}export{x as Tabs,v as tabButtonId,w as tabPanelId};