efficient-shell 8.41.0 → 9.9.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 (471) hide show
  1. package/README.md +70 -20
  2. package/dist/Browser-ZPOVP4Z7.js +43 -0
  3. package/dist/Calculator-CSYRZAS5.js +29 -0
  4. package/dist/CurrencyConverter-SSR2XDIC.js +21 -0
  5. package/dist/{Documents-VVKKYYJS.js → Documents-T7JYO223.js} +14 -14
  6. package/dist/Files-HBGW3JWI.js +88 -0
  7. package/dist/Notepad-GO2QT55C.js +25 -0
  8. package/dist/PdfViewer-XSISAJZP.js +1 -0
  9. package/dist/{PomodoroTimer-ZVD3D357.js → PomodoroTimer-EV6D4OFU.js} +28 -28
  10. package/dist/{Preview-K5AJQGE7.js → Preview-Z2CRCDHA.js} +58 -58
  11. package/dist/Sidebar-Y4DTQYW2.js +43 -0
  12. package/dist/Spreadsheet-GEE77GD3.js +37 -0
  13. package/dist/Stock-6ZIQHGPH.js +16 -0
  14. package/dist/Weather-II7NFRMK.js +60 -0
  15. package/dist/WorldClock-NBLNO63Q.js +32 -0
  16. package/dist/ai/index.d.ts +35 -4
  17. package/dist/ai/index.js +46 -46
  18. package/dist/ai.css +1 -1
  19. package/dist/apps/index.js +1 -1
  20. package/dist/bin/media-host-check.js +1 -1
  21. package/dist/bin/ui-check.js +1 -1
  22. package/dist/brand.css +1 -1
  23. package/dist/charts/BoxPlotChart.js +1 -1
  24. package/dist/charts/CandlestickChart.js +1 -1
  25. package/dist/charts/CartesianPlot.js +1 -1
  26. package/dist/charts/ChartBrush.js +1 -1
  27. package/dist/charts/ChartFrame.js +1 -1
  28. package/dist/charts/ChartSkeleton.js +1 -1
  29. package/dist/charts/ChartTooltip.js +1 -1
  30. package/dist/charts/ChordChart.js +1 -1
  31. package/dist/charts/ColumnChart.js +1 -1
  32. package/dist/charts/FunnelChart.js +1 -1
  33. package/dist/charts/HeatmapChart.js +1 -1
  34. package/dist/charts/HistogramChart.js +1 -1
  35. package/dist/charts/Meter.js +1 -1
  36. package/dist/charts/PieChart.js +1 -1
  37. package/dist/charts/RadarChart.js +1 -1
  38. package/dist/charts/RadialBarChart.js +1 -1
  39. package/dist/charts/RangeChart.js +1 -1
  40. package/dist/charts/RankedBars.js +1 -1
  41. package/dist/charts/SankeyChart.js +1 -1
  42. package/dist/charts/ScatterChart.js +1 -1
  43. package/dist/charts/SpecChart.js +1 -1
  44. package/dist/charts/StatTile.js +1 -1
  45. package/dist/charts/SunburstChart.js +1 -1
  46. package/dist/charts/TimeSeriesChart.js +1 -1
  47. package/dist/charts/TreemapChart.js +1 -1
  48. package/dist/charts/WaterfallChart.js +1 -1
  49. package/dist/chunk-24K6GVNM.js +28 -0
  50. package/dist/{chunk-M2AIC7IK.js → chunk-2HEJDLPP.js} +2 -2
  51. package/dist/{chunk-BRHIRE4D.js → chunk-2MLRK7IO.js} +2 -2
  52. package/dist/chunk-2R3BVU75.js +26 -0
  53. package/dist/chunk-2YLG32JY.js +2 -0
  54. package/dist/{chunk-TZSPJIP4.js → chunk-32VV2J22.js} +1 -1
  55. package/dist/{chunk-QQCHLRKG.js → chunk-3APSMJPN.js} +1 -1
  56. package/dist/{chunk-6SMQNPWS.js → chunk-43ONX6UZ.js} +1 -1
  57. package/dist/{chunk-L7IKTEOC.js → chunk-442FFHQJ.js} +13 -13
  58. package/dist/chunk-4MVRSCQE.js +1 -0
  59. package/dist/{chunk-BT3XDH3L.js → chunk-56RAOI7O.js} +6 -6
  60. package/dist/chunk-5F7HMNCX.js +5 -0
  61. package/dist/chunk-5GUBNCTP.js +1 -0
  62. package/dist/{chunk-LGLZTJ2W.js → chunk-5JRL5LXD.js} +6 -6
  63. package/dist/{chunk-OFHCDTJM.js → chunk-5VOVNIOU.js} +1 -1
  64. package/dist/{chunk-NID6MGGC.js → chunk-5VRMQTKV.js} +8 -8
  65. package/dist/chunk-6453ISTQ.js +4 -0
  66. package/dist/chunk-6FEL5D56.js +8 -0
  67. package/dist/{chunk-MVQBVPWP.js → chunk-6KBDNYRW.js} +1 -1
  68. package/dist/{chunk-D2AUUIKG.js → chunk-6MVHRNWC.js} +1 -1
  69. package/dist/{chunk-TW7TA2AB.js → chunk-6ZHX56NM.js} +1 -1
  70. package/dist/{chunk-RNBM5JZI.js → chunk-7JGR7WPD.js} +4 -4
  71. package/dist/{chunk-BIJ7ADTZ.js → chunk-7WGOLPGM.js} +1 -1
  72. package/dist/{chunk-SXSMIMFY.js → chunk-A6RB4PIX.js} +4 -4
  73. package/dist/chunk-AC373WIU.js +8 -0
  74. package/dist/{chunk-BMPBVI7P.js → chunk-AGUA3O5O.js} +1 -1
  75. package/dist/{chunk-UVUBZL7K.js → chunk-ANFLQSGX.js} +5 -5
  76. package/dist/chunk-ARWMJSQJ.js +3 -0
  77. package/dist/chunk-AYZY3YNC.js +1 -0
  78. package/dist/{chunk-BSNWVZHW.js → chunk-B4KMHEFZ.js} +1 -1
  79. package/dist/chunk-B6YOP2IX.js +6 -0
  80. package/dist/{chunk-4VLKDANH.js → chunk-BBEOFKLY.js} +1 -1
  81. package/dist/{chunk-22S6LG6D.js → chunk-BCDG4N6L.js} +1 -1
  82. package/dist/{chunk-DFDDRKIJ.js → chunk-BCUQXILM.js} +1 -1
  83. package/dist/chunk-BGRT775Y.js +2 -0
  84. package/dist/{chunk-5TFTSYOD.js → chunk-BVTNGW5S.js} +1 -1
  85. package/dist/{chunk-TVJRENCQ.js → chunk-BWUU565Y.js} +9 -9
  86. package/dist/{chunk-BKZGI76S.js → chunk-BZBMZDLD.js} +1 -1
  87. package/dist/chunk-BZG5E7GF.js +6 -0
  88. package/dist/{chunk-SBHFEWR6.js → chunk-C4UL2UNR.js} +1 -1
  89. package/dist/{chunk-DOCUM3K7.js → chunk-CAG3TSV2.js} +1 -1
  90. package/dist/chunk-CE5BARZI.js +16 -0
  91. package/dist/chunk-CJB73MHF.js +2 -0
  92. package/dist/{chunk-N6DTTOB6.js → chunk-CKPVXDKX.js} +3 -3
  93. package/dist/chunk-CO5RKOVX.js +20 -0
  94. package/dist/chunk-CRXFSN5K.js +20 -0
  95. package/dist/chunk-CVNJSD2J.js +18 -0
  96. package/dist/{chunk-RYBJ6MMM.js → chunk-CXMTDYVI.js} +1 -1
  97. package/dist/chunk-D7IXMMZT.js +9 -0
  98. package/dist/{chunk-JUGPTBMS.js → chunk-DLNYXXNE.js} +2 -2
  99. package/dist/chunk-DNWV6N4P.js +5 -0
  100. package/dist/{chunk-KZHPX4FM.js → chunk-DWBZ3Z34.js} +2 -2
  101. package/dist/chunk-DZTAGMNY.js +100 -0
  102. package/dist/chunk-E4E7MACR.js +20 -0
  103. package/dist/{chunk-DZNG34DC.js → chunk-EFFF3FCS.js} +23 -23
  104. package/dist/{chunk-NL5G26Q7.js → chunk-EGAV5LSX.js} +1 -1
  105. package/dist/{chunk-M5P6A7KS.js → chunk-ENL5L6NR.js} +1 -1
  106. package/dist/chunk-EW3L4W2I.js +14 -0
  107. package/dist/{chunk-6GWZ5UPX.js → chunk-EWVOGTEX.js} +1 -1
  108. package/dist/{chunk-I7HDD4IM.js → chunk-EXNAAHN4.js} +2 -2
  109. package/dist/{chunk-YDYDR72S.js → chunk-F4DIVARP.js} +1 -1
  110. package/dist/{chunk-WYN5KVU4.js → chunk-F7F6Z64G.js} +3 -3
  111. package/dist/{chunk-5PY4H4ZJ.js → chunk-FBUUXK5G.js} +1 -1
  112. package/dist/chunk-FKNJSD6B.js +14 -0
  113. package/dist/{chunk-D7FT2PXG.js → chunk-FLEG5KP5.js} +5 -5
  114. package/dist/{chunk-C4YN2DNM.js → chunk-FLQZ7GQ3.js} +11 -11
  115. package/dist/{chunk-L5ND7FNA.js → chunk-FPGRKHUW.js} +12 -12
  116. package/dist/chunk-G6CTTBKE.js +9 -0
  117. package/dist/{chunk-N2SJNPFY.js → chunk-GS5AISRS.js} +4 -4
  118. package/dist/{chunk-4Y4PWKMM.js → chunk-GVC535IA.js} +3 -3
  119. package/dist/chunk-HEEY4TVP.js +8 -0
  120. package/dist/chunk-HJWTWS5E.js +8 -0
  121. package/dist/{chunk-VH6GB73Q.js → chunk-HL6JSDN3.js} +1 -1
  122. package/dist/chunk-HNQPF5QZ.js +2 -0
  123. package/dist/{chunk-WRORJNS5.js → chunk-HQMN5THW.js} +10 -10
  124. package/dist/chunk-HUF34LSW.js +15 -0
  125. package/dist/chunk-IB4333CI.js +14 -0
  126. package/dist/chunk-IGNZULKG.js +17 -0
  127. package/dist/chunk-IJIESSTX.js +5 -0
  128. package/dist/{chunk-S7VSXUKS.js → chunk-IJWFKUYA.js} +4 -4
  129. package/dist/chunk-IK2WXW2E.js +27 -0
  130. package/dist/{chunk-UZMZ2EDW.js → chunk-IMOPDLMA.js} +1 -1
  131. package/dist/{chunk-2FLYC6I2.js → chunk-IN4KV3SJ.js} +1 -1
  132. package/dist/chunk-IPTCV6CQ.js +69 -0
  133. package/dist/{chunk-FORJ75AU.js → chunk-IQWIYZB5.js} +2 -2
  134. package/dist/chunk-IX6QMUJQ.js +9 -0
  135. package/dist/{chunk-4G5VLI7E.js → chunk-JDQGHQ2C.js} +1 -1
  136. package/dist/chunk-JIW5CJXC.js +4 -0
  137. package/dist/{chunk-P42YNSKI.js → chunk-JKDEE35P.js} +1 -1
  138. package/dist/{chunk-CKZ6ZDU5.js → chunk-JS6ZSEZJ.js} +1 -1
  139. package/dist/chunk-K4D63NP3.js +12 -0
  140. package/dist/chunk-KEK47CP3.js +12 -0
  141. package/dist/chunk-KWT6GT4M.js +29 -0
  142. package/dist/chunk-L4TN4EWK.js +1 -0
  143. package/dist/{chunk-SR4XAYLC.js → chunk-L67VXJMF.js} +1 -1
  144. package/dist/chunk-LAEXWXJA.js +9 -0
  145. package/dist/{chunk-D323R2FT.js → chunk-LNARMEEZ.js} +1 -1
  146. package/dist/{chunk-CZ25A5RS.js → chunk-LNQVTH5S.js} +1 -1
  147. package/dist/chunk-LUWRPPJA.js +7 -0
  148. package/dist/chunk-M554OMPA.js +2 -0
  149. package/dist/{chunk-BVW5U7QQ.js → chunk-M5GMIQ47.js} +3 -3
  150. package/dist/{chunk-GX2GSDJP.js → chunk-MAMWQCJ6.js} +1 -1
  151. package/dist/{chunk-ZTB6EMC7.js → chunk-MV6WDGB6.js} +1 -1
  152. package/dist/chunk-MWIT4UN2.js +14 -0
  153. package/dist/{chunk-BX2IOAD5.js → chunk-N2K6OAFM.js} +1 -1
  154. package/dist/{chunk-JPRJQ6B7.js → chunk-N3JXHNID.js} +10 -10
  155. package/dist/{chunk-EYKUKN32.js → chunk-N7T63BVD.js} +4 -4
  156. package/dist/chunk-NHH2MXFU.js +2 -0
  157. package/dist/chunk-NHVXVHUR.js +23 -0
  158. package/dist/{chunk-37CCKGHU.js → chunk-NWCW22U6.js} +2 -2
  159. package/dist/{chunk-J47HXHSL.js → chunk-O5LQBBW2.js} +7 -7
  160. package/dist/{chunk-IHQX4GYD.js → chunk-OQ2EDMB2.js} +1 -1
  161. package/dist/chunk-OUSKOWNP.js +12 -0
  162. package/dist/chunk-OV2SWQPT.js +22 -0
  163. package/dist/chunk-OX2DOOOI.js +8 -0
  164. package/dist/{chunk-6KO5VTL7.js → chunk-OZAAIE4E.js} +1 -1
  165. package/dist/chunk-P3OBE43Q.js +8 -0
  166. package/dist/{chunk-2C6IG7LG.js → chunk-P3Y5RFI4.js} +2 -2
  167. package/dist/{chunk-2UXAI77F.js → chunk-P4XTWAKJ.js} +1 -1
  168. package/dist/{chunk-7PCI6AUU.js → chunk-PB7G6CJ7.js} +1 -1
  169. package/dist/chunk-PDB5W7VI.js +6 -0
  170. package/dist/chunk-PDXPMHG3.js +4 -0
  171. package/dist/chunk-POCQ7ZL4.js +3 -0
  172. package/dist/{chunk-FORUFXAN.js → chunk-PVR4KU7H.js} +5 -5
  173. package/dist/{chunk-2RBWQVDC.js → chunk-PYLNMN6E.js} +13 -13
  174. package/dist/chunk-Q7KTTDUS.js +11 -0
  175. package/dist/{chunk-3PGK3VFS.js → chunk-QC6OK3ED.js} +1 -1
  176. package/dist/{chunk-MEJK6PBN.js → chunk-QSJR7EI7.js} +3 -3
  177. package/dist/{chunk-5DFKPSJQ.js → chunk-QTV3Y3UT.js} +1 -1
  178. package/dist/chunk-QWHQJNKL.js +1 -0
  179. package/dist/chunk-QXWY3CJ2.js +11 -0
  180. package/dist/{chunk-MG7OPTLQ.js → chunk-QZKWIVZW.js} +1 -1
  181. package/dist/chunk-R2VKEMZH.js +3 -0
  182. package/dist/{chunk-EXWGPXOS.js → chunk-RBD7SB6M.js} +1 -1
  183. package/dist/chunk-RC6UHOAV.js +4 -0
  184. package/dist/{chunk-ZVEOWBXE.js → chunk-RULVWW4A.js} +6 -6
  185. package/dist/chunk-RUTUVS4H.js +1 -0
  186. package/dist/{chunk-MAOJENIB.js → chunk-RWJCKZEY.js} +1 -1
  187. package/dist/chunk-S4Z657L6.js +6 -0
  188. package/dist/{chunk-Q3OCGLW7.js → chunk-SOP447EP.js} +2 -2
  189. package/dist/{chunk-CDRXZBVR.js → chunk-TBPHW42V.js} +1 -1
  190. package/dist/chunk-TLRCTNUF.js +6 -0
  191. package/dist/{chunk-KWX6NAOR.js → chunk-TVL3JPMY.js} +1 -1
  192. package/dist/{chunk-ZX2D25LG.js → chunk-U4OGRIP6.js} +1 -1
  193. package/dist/chunk-U5N6PSXO.js +9 -0
  194. package/dist/{chunk-SZIENHKR.js → chunk-UKDJUYIV.js} +1 -1
  195. package/dist/chunk-UQYNPYF4.js +1 -0
  196. package/dist/chunk-URHGHXDN.js +1 -0
  197. package/dist/{chunk-6WWAQC5V.js → chunk-VG2R6PZV.js} +1 -1
  198. package/dist/{chunk-RWGSMZGS.js → chunk-VVAJ23SD.js} +1 -1
  199. package/dist/chunk-VVGL5O4F.js +8 -0
  200. package/dist/chunk-VVJIKS47.js +1 -0
  201. package/dist/chunk-WE7CYRZT.js +7 -0
  202. package/dist/{chunk-L3G3YHVN.js → chunk-WFHYU66E.js} +1 -1
  203. package/dist/chunk-WH3JHMEA.js +13 -0
  204. package/dist/chunk-WUKN5WUM.js +11 -0
  205. package/dist/{chunk-ET2EF5CI.js → chunk-X7PM7JOD.js} +1 -1
  206. package/dist/{chunk-4NXMMWL6.js → chunk-XD34TCRG.js} +1 -1
  207. package/dist/chunk-XI4HKNFI.js +19 -0
  208. package/dist/{chunk-Y4MI6NRI.js → chunk-XNWQ72WA.js} +1 -1
  209. package/dist/{chunk-3BSPSRK4.js → chunk-XS4HFUTW.js} +3 -3
  210. package/dist/{chunk-Y5T257HX.js → chunk-XZYAFTW4.js} +4 -4
  211. package/dist/{chunk-Z35NWGMT.js → chunk-Y44ABEW3.js} +2 -2
  212. package/dist/chunk-YWGC7J6B.js +11 -0
  213. package/dist/{chunk-MMFJBWJC.js → chunk-Z3JW77LH.js} +1 -1
  214. package/dist/chunk-ZAU2HIRH.js +21 -0
  215. package/dist/{chunk-Y53KNQKL.js → chunk-ZDMZM7HD.js} +2 -2
  216. package/dist/chunk-ZHHEMSOD.js +3 -0
  217. package/dist/chunk-ZOHQVSB3.js +27 -0
  218. package/dist/{chunk-3AKIKASU.js → chunk-ZTL2RPNY.js} +1 -1
  219. package/dist/{chunk-QVR4LBBW.js → chunk-ZYDZY6ED.js} +1 -1
  220. package/dist/data/DataTable.js +1 -1
  221. package/dist/data/Kanban.js +1 -1
  222. package/dist/data/ListFooter.js +1 -1
  223. package/dist/data/ListLoadError.js +1 -1
  224. package/dist/data/Pagination.js +1 -1
  225. package/dist/file-intake/index.js +1 -1
  226. package/dist/format/index.js +1 -1
  227. package/dist/forms/AlignmentGrid.js +1 -1
  228. package/dist/forms/BorderInput.js +1 -1
  229. package/dist/forms/BrandAssetEditor.js +1 -1
  230. package/dist/forms/Button.js +1 -1
  231. package/dist/forms/Calendar.js +1 -1
  232. package/dist/forms/ColorPicker.js +1 -1
  233. package/dist/forms/ComposerAttachments.js +1 -1
  234. package/dist/forms/CornersInput.js +1 -1
  235. package/dist/forms/DatePicker.js +1 -1
  236. package/dist/forms/DateRangePicker.js +1 -1
  237. package/dist/forms/DateTimePicker.js +1 -1
  238. package/dist/forms/DisplayChips.js +1 -1
  239. package/dist/forms/FilePicker.js +1 -1
  240. package/dist/forms/FormErrorSummary.js +1 -1
  241. package/dist/forms/FormField.js +1 -1
  242. package/dist/forms/IconButton.js +1 -1
  243. package/dist/forms/IconPicker.js +1 -1
  244. package/dist/forms/ImageFocusPoint.js +1 -1
  245. package/dist/forms/Input.js +1 -1
  246. package/dist/forms/InputNumber.js +1 -1
  247. package/dist/forms/LinkPicker.js +1 -1
  248. package/dist/forms/MediaLibrary.d.ts +6 -1
  249. package/dist/forms/MediaLibrary.js +1 -1
  250. package/dist/forms/MediaUploadField.js +1 -1
  251. package/dist/forms/MediaUploadGrid.js +1 -1
  252. package/dist/forms/MediaUsedInList.js +1 -1
  253. package/dist/forms/NumericKeypad.js +1 -1
  254. package/dist/forms/PictureTiles.js +1 -1
  255. package/dist/forms/PositionInput.js +1 -1
  256. package/dist/forms/RadioGroup.js +1 -1
  257. package/dist/forms/Segmented.js +1 -1
  258. package/dist/forms/Select.d.ts +7 -1
  259. package/dist/forms/Select.js +1 -1
  260. package/dist/forms/SidesInput.js +1 -1
  261. package/dist/forms/Slider.d.ts +7 -1
  262. package/dist/forms/Slider.js +1 -1
  263. package/dist/forms/Snippet.js +1 -1
  264. package/dist/forms/SplitButton.js +1 -1
  265. package/dist/forms/TagInput.js +1 -1
  266. package/dist/forms/TextToolbar.d.ts +1 -1
  267. package/dist/forms/TextToolbar.js +1 -1
  268. package/dist/forms/Textarea.js +1 -1
  269. package/dist/forms/TimePicker.js +1 -1
  270. package/dist/forms/WidthsBar.d.ts +7 -8
  271. package/dist/forms/WidthsBar.js +1 -1
  272. package/dist/forms/buttonStyles.js +1 -1
  273. package/dist/forms/mediaLibraryMenu.js +1 -1
  274. package/dist/forms/mediaMoveItems.js +1 -1
  275. package/dist/forms/styles.d.ts +2 -2
  276. package/dist/forms/styles.js +1 -1
  277. package/dist/forms/textAlign.d.ts +1 -1
  278. package/dist/forms/textAlign.js +1 -1
  279. package/dist/forms/useFileIntake.js +1 -1
  280. package/dist/hooks/useTheme.d.ts +1 -1
  281. package/dist/icons/efficient-glyphs.d.ts +0 -1
  282. package/dist/icons/efficient-glyphs.js +1 -1
  283. package/dist/icons/efficient-looks.js +1 -1
  284. package/dist/icons/efficient-meanings.d.ts +0 -1
  285. package/dist/icons/efficient-meanings.js +1 -1
  286. package/dist/icons/efficient.d.ts +0 -1
  287. package/dist/icons/efficient.js +1 -1
  288. package/dist/icons/glyphs/SpinnerIcon.js +1 -1
  289. package/dist/icons/index.d.ts +2 -2
  290. package/dist/icons/index.js +1 -1
  291. package/dist/icons/looks/map.js +1 -1
  292. package/dist/icons/sets.js +1 -1
  293. package/dist/index.d.ts +4 -2
  294. package/dist/index.js +695 -695
  295. package/dist/locales/zh-Hans.js +1 -1
  296. package/dist/map/index.js +12 -12
  297. package/dist/markdown/index.js +5 -5
  298. package/dist/{names-mX74Rrmy.d.ts → names-C1TgIb_2.d.ts} +1 -1
  299. package/dist/page-tabs/index.js +5 -5
  300. package/dist/pdf/index.js +1 -1
  301. package/dist/shell/Accordion.js +1 -1
  302. package/dist/shell/AppUpdateBanner.js +1 -1
  303. package/dist/shell/Avatar.js +1 -1
  304. package/dist/shell/Banner.js +1 -1
  305. package/dist/shell/Breadcrumbs.js +1 -1
  306. package/dist/shell/BudgetBar.js +1 -1
  307. package/dist/shell/Card.js +1 -1
  308. package/dist/shell/ColoredBadge.js +1 -1
  309. package/dist/shell/ConfirmDialog.js +1 -1
  310. package/dist/shell/ContainerFillChart.js +1 -1
  311. package/dist/shell/ContextMenu.js +1 -1
  312. package/dist/shell/CountBadge.js +1 -1
  313. package/dist/shell/Dialog.js +1 -1
  314. package/dist/shell/Drawer.js +1 -1
  315. package/dist/shell/DropdownMenu.js +1 -1
  316. package/dist/shell/EditableGrid.js +1 -1
  317. package/dist/shell/EmptyState.js +1 -1
  318. package/dist/shell/EmptyValue.js +1 -1
  319. package/dist/shell/GlobalSearch.js +1 -1
  320. package/dist/shell/HelpCenter.js +1 -1
  321. package/dist/shell/IconRail.js +1 -1
  322. package/dist/shell/ImageLightbox.js +1 -1
  323. package/dist/shell/ItemCount.d.ts +20 -0
  324. package/dist/shell/ItemCount.js +1 -0
  325. package/dist/shell/Kbd.js +1 -1
  326. package/dist/shell/LanguageSelect.js +1 -1
  327. package/dist/shell/Markdown.d.ts +1 -1
  328. package/dist/shell/Markdown.js +1 -1
  329. package/dist/shell/MetricBar.js +1 -1
  330. package/dist/shell/MetricBarLegend.js +1 -1
  331. package/dist/shell/MilestoneTimeline.js +1 -1
  332. package/dist/shell/PageHeader.js +1 -1
  333. package/dist/shell/Popover.js +1 -1
  334. package/dist/shell/PopupMenu.js +1 -1
  335. package/dist/shell/ProductionTimeline.js +1 -1
  336. package/dist/shell/ResizeHandle.js +1 -1
  337. package/dist/shell/Result.js +1 -1
  338. package/dist/shell/SearchableSelect.js +1 -1
  339. package/dist/shell/SettingReset.js +1 -1
  340. package/dist/shell/SettingRow.js +1 -1
  341. package/dist/shell/SidebarLayout.js +1 -1
  342. package/dist/shell/SidebarNav.d.ts +19 -5
  343. package/dist/shell/SidebarNav.js +1 -1
  344. package/dist/shell/SortableList.js +1 -1
  345. package/dist/shell/Spinner.js +1 -1
  346. package/dist/shell/Statistic.js +1 -1
  347. package/dist/shell/StatusBadge.js +1 -1
  348. package/dist/shell/StepChain.js +1 -1
  349. package/dist/shell/Tabs.js +1 -1
  350. package/dist/shell/TimeAgo.js +1 -1
  351. package/dist/shell/TimelineTrack.js +1 -1
  352. package/dist/shell/Tooltip.js +1 -1
  353. package/dist/shell/TopNav.js +1 -1
  354. package/dist/shell/TransferProgress.js +1 -1
  355. package/dist/shell/Tree.d.ts +15 -6
  356. package/dist/shell/Tree.js +1 -1
  357. package/dist/shell/language.js +1 -1
  358. package/dist/shell/strings.d.ts +24 -2
  359. package/dist/shell/strings.js +1 -1
  360. package/dist/shell/toast.js +1 -1
  361. package/dist/telemetry/index.js +1 -1
  362. package/dist/templates/AuthScreen.js +1 -1
  363. package/dist/templates/ChatTemplate.js +1 -1
  364. package/dist/templates/CheckoutTemplate.js +1 -1
  365. package/dist/templates/DashboardTemplate.js +1 -1
  366. package/dist/templates/DataTablePage.js +1 -1
  367. package/dist/templates/EmailTemplate.js +1 -1
  368. package/dist/templates/ErrorBoundary.d.ts +1 -1
  369. package/dist/templates/ErrorBoundary.js +1 -1
  370. package/dist/templates/ErrorPage.js +1 -1
  371. package/dist/templates/FormLayoutPage.js +1 -1
  372. package/dist/templates/GalleryTemplate.js +1 -1
  373. package/dist/themes.css +101 -0
  374. package/dist/tokens/colour.d.ts +42 -0
  375. package/dist/tokens/colour.js +1 -0
  376. package/dist/tokens/elevation.d.ts +3 -1
  377. package/dist/tokens/elevation.js +1 -1
  378. package/dist/ui/index.d.ts +3 -1
  379. package/dist/ui/index.js +1 -1
  380. package/dist/ui.css +266 -24
  381. package/dist/version.js +1 -1
  382. package/package.json +1 -1
  383. package/dist/Browser-4C26ZOKV.js +0 -43
  384. package/dist/Calculator-MNTQSI6M.js +0 -29
  385. package/dist/CurrencyConverter-5XTNXV6T.js +0 -21
  386. package/dist/Files-BK7OAVOI.js +0 -87
  387. package/dist/Notepad-Z5XVWR2N.js +0 -25
  388. package/dist/PdfViewer-KJCJ6EPG.js +0 -1
  389. package/dist/Sidebar-LYTGLTQJ.js +0 -43
  390. package/dist/Spreadsheet-CCTSMXEG.js +0 -37
  391. package/dist/Stock-53UOMBQW.js +0 -16
  392. package/dist/Weather-S2ZIGNSU.js +0 -60
  393. package/dist/WorldClock-A62SDKTE.js +0 -32
  394. package/dist/chunk-26AYPJSK.js +0 -5
  395. package/dist/chunk-2CGZX62Z.js +0 -29
  396. package/dist/chunk-2NMT3Y5H.js +0 -20
  397. package/dist/chunk-3ZHFKOFX.js +0 -14
  398. package/dist/chunk-454DAGYG.js +0 -19
  399. package/dist/chunk-4CANQ3B3.js +0 -1
  400. package/dist/chunk-4CFOKYVR.js +0 -12
  401. package/dist/chunk-4IU5BSVE.js +0 -2
  402. package/dist/chunk-4IVT244O.js +0 -8
  403. package/dist/chunk-4SZDP3JF.js +0 -12
  404. package/dist/chunk-5BZMSSOV.js +0 -14
  405. package/dist/chunk-5E3WCKWB.js +0 -3
  406. package/dist/chunk-63EK6S3W.js +0 -3
  407. package/dist/chunk-64WSMLXG.js +0 -2
  408. package/dist/chunk-6BCFVOG7.js +0 -22
  409. package/dist/chunk-6BLWURSG.js +0 -4
  410. package/dist/chunk-6NMDKOQA.js +0 -7
  411. package/dist/chunk-6NSCK3YX.js +0 -100
  412. package/dist/chunk-7DKPJUGU.js +0 -2
  413. package/dist/chunk-7OCNF4AI.js +0 -5
  414. package/dist/chunk-BI6ZLD4X.js +0 -11
  415. package/dist/chunk-BOBUSE33.js +0 -2
  416. package/dist/chunk-CRLSG5AY.js +0 -9
  417. package/dist/chunk-CWXKRYVY.js +0 -5
  418. package/dist/chunk-DITCVBR7.js +0 -15
  419. package/dist/chunk-DODH46ZQ.js +0 -8
  420. package/dist/chunk-DZ6B5XCG.js +0 -13
  421. package/dist/chunk-E5ALJIXV.js +0 -9
  422. package/dist/chunk-E6UCGCOC.js +0 -1
  423. package/dist/chunk-EGDJEY4K.js +0 -27
  424. package/dist/chunk-EL2RLUT6.js +0 -20
  425. package/dist/chunk-ET32NQHX.js +0 -2
  426. package/dist/chunk-ETF7LAYZ.js +0 -8
  427. package/dist/chunk-EZ3BQ6PK.js +0 -18
  428. package/dist/chunk-GATKJSGL.js +0 -8
  429. package/dist/chunk-GNPTNAZH.js +0 -4
  430. package/dist/chunk-H33Z4ZIY.js +0 -11
  431. package/dist/chunk-HTYRV4WU.js +0 -3
  432. package/dist/chunk-I4VD5D43.js +0 -8
  433. package/dist/chunk-IFDW5QW6.js +0 -2
  434. package/dist/chunk-IUMFKZY7.js +0 -4
  435. package/dist/chunk-JPP7UWQA.js +0 -4
  436. package/dist/chunk-JVIOAZHW.js +0 -14
  437. package/dist/chunk-K7KQDPLW.js +0 -27
  438. package/dist/chunk-K7U4RWXJ.js +0 -1
  439. package/dist/chunk-L73LI7FG.js +0 -8
  440. package/dist/chunk-MEYYQC43.js +0 -8
  441. package/dist/chunk-MVP6Q6KV.js +0 -1
  442. package/dist/chunk-NDO24PK6.js +0 -21
  443. package/dist/chunk-NMKADD77.js +0 -1
  444. package/dist/chunk-P5BOTIJU.js +0 -6
  445. package/dist/chunk-PCQPV6MS.js +0 -6
  446. package/dist/chunk-PF3ANJFI.js +0 -1
  447. package/dist/chunk-Q23EHOXW.js +0 -17
  448. package/dist/chunk-Q5MD3VY6.js +0 -3
  449. package/dist/chunk-QR4RM7PO.js +0 -1
  450. package/dist/chunk-REVC6YPT.js +0 -7
  451. package/dist/chunk-RGOUJFAO.js +0 -9
  452. package/dist/chunk-S2OIRC5H.js +0 -12
  453. package/dist/chunk-SB7OTZI4.js +0 -69
  454. package/dist/chunk-SRKSGUGT.js +0 -23
  455. package/dist/chunk-SURSVJA2.js +0 -6
  456. package/dist/chunk-TIQKDAON.js +0 -11
  457. package/dist/chunk-VFCWCGO3.js +0 -9
  458. package/dist/chunk-VRODVMV3.js +0 -1
  459. package/dist/chunk-VU6VPKM3.js +0 -11
  460. package/dist/chunk-W6TS6WGA.js +0 -28
  461. package/dist/chunk-WSPO4N72.js +0 -19
  462. package/dist/chunk-X6PPP6NX.js +0 -14
  463. package/dist/chunk-XLD53X4P.js +0 -9
  464. package/dist/chunk-XSPDPN5O.js +0 -26
  465. package/dist/chunk-ZK2SULCA.js +0 -16
  466. package/dist/chunk-ZNCU3UIW.js +0 -8
  467. package/dist/chunk-ZNXBKFV7.js +0 -6
  468. package/dist/icons/glyphs/QuietIcon.d.ts +0 -8
  469. package/dist/icons/glyphs/QuietIcon.js +0 -1
  470. /package/dist/{chunk-EHPZIBOL.js → chunk-DSIDJYH7.js} +0 -0
  471. /package/dist/{chunk-KJRYEKQP.js → chunk-KC54JQYK.js} +0 -0
@@ -1,15 +1,15 @@
1
- import{keepsNativeMenu as e}from"./chunk-5QFPTDQF.js";import{optionNoteClass as t}from"./chunk-QR4RM7PO.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{createContext as u,forwardRef as d,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function M(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function T(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function E(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var $=u(null),L=u(!1);function R({children:t,style:n,className:a="",onClose:c,minWidth:u=180,portal:d=!1}){const p=h(null),b=m(),[x,v]=f([]),M=h();g(()=>()=>clearTimeout(M.current),[]);const T=i(),E=y(()=>{const e=()=>clearTimeout(M.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),M.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,x,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=s(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const L=W(),R=/(^|[\s:])!?z-/.test(a),j=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===L?"py-1":"large"===L?"py-2":"py-1"} ${a}`,onContextMenu:t=>{e(t.target)||t.preventDefault()},style:{...R?{}:{zIndex:o.menu},minWidth:u,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k($.Provider,{value:E,children:t})});return d?T?w(j,document.body):null:j}function j(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 not-disabled:not-aria-disabled:hover:bg-blue-50 not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var B=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function P({kind:e,checked:t}){/* @__PURE__ */
2
- return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&B}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&B})}var D=d(function({onClick:e,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:u,id:d,onMouseEnter:h},f){const g=p($),y=m(),b=null!=s&&!1!==s,w=`${d??y}-label`,N=`${d??y}-note`,C=p(L),M=j(o,i,r),T=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
3
- return x("button",{ref:f,id:d,role:"radio"===T?"menuitemradio":"checkbox"===T?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":T?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:u,onClick:()=>{e?.(),g&&g.depth>0&&"checkbox"!==T&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:M.className,style:M.style,children:[T&&/* @__PURE__ */k(P,{kind:T,checked:!!l}),b?
1
+ import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{keepsNativeMenu as t}from"./chunk-5QFPTDQF.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{createContext as d,forwardRef as u,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function T(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function E(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function M(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var $=d(null),L=d(!1);function j({children:e,style:n,className:a="",onClose:c,minWidth:d=180,portal:u=!1}){const p=h(null),b=m(),[x,v]=f([]),T=h();g(()=>()=>clearTimeout(T.current),[]);const E=i(),M=y(()=>{const e=()=>clearTimeout(T.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),T.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,x,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=s(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const L=W(),j=/(^|[\s:])!?z-/.test(a),B=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===L?"py-1":"large"===L?"py-2":"py-1"} ${a}`,onContextMenu:e=>{t(e.target)||e.preventDefault()},style:{...j?{}:{zIndex:o.menu},minWidth:d,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k($.Provider,{value:M,children:e})});return u?E?w(B,document.body):null:B}function B(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-accent-tint text-blue-700":"text-ink not-disabled:not-aria-disabled:hover:bg-accent-tint not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var D=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function R({kind:e,checked:t}){/* @__PURE__ */
2
+ return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&D}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&D})}var F=u(function({onClick:t,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:d,id:u,onMouseEnter:h},f){const g=p($),y=m(),b=null!=s&&!1!==s,w=`${u??y}-label`,N=`${u??y}-note`,C=p(L),T=B(o,i,r),E=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
3
+ return x("button",{ref:f,id:u,role:"radio"===E?"menuitemradio":"checkbox"===E?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":E?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{t?.(),g&&g.depth>0&&"checkbox"!==E&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:T.className,style:T.style,children:[E&&/* @__PURE__ */k(R,{kind:E,checked:!!l}),b?
4
4
  /* @__PURE__ */x("span",{className:"block min-w-0 flex-1 py-2",children:[
5
- /* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(F,{children:c}),
5
+ /* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(H,{children:c}),
6
6
  /* @__PURE__ */k("span",{id:w,className:"min-w-0",children:n})]}),
7
- /* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:t(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(F,{children:c}),n]})]})});function F({children:e}){/* @__PURE__ */
8
- return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var A=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function H(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function I(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function S({label:t,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:u,rowProps:d}){const f=p($),N=m(),C=h(null),M=h(null),L=h(),R=h(!1),B=`${N}-menu`;g(()=>()=>clearTimeout(L.current),[]);const P=f?.depth??0,D=f?.path[P],F=!!D&&D.key===N&&!o,S=b(e=>{if(!f||o||!C.current)return;clearTimeout(L.current),R.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=P>0&&(f.path[P-1]?.flipped??!1),a=E(r.left,r.right,c,window.innerWidth,4,i);f.open(P,{key:N,y:t.top,...a})},[f,o,P,N,c]),z=e=>{f?.closeBelow(P),C.current?.focus()};g(()=>{if(F)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>P+1)&&(z(),!0)),()=>M.current)}),a(()=>{if(!F||!D)return;const e=()=>{const e=M.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=P>0&&(f?.path[P-1]?.flipped??!1),o=e.offsetWidth||c,i=E(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=T(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{F&&R.current&&(R.current=!1,I(M.current)[0]?.focus())},[F]);const q=y(()=>f&&{...f,depth:P+1},[f,P]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const Q=j(!1,o,i,F),U=W();/* @__PURE__ */
7
+ /* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:e(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(H,{children:c}),n]})]})});function H({children:e}){/* @__PURE__ */
8
+ return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var P=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function A(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function I(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function S({label:e,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:d,rowProps:u}){const f=p($),N=m(),C=h(null),T=h(null),L=h(),j=h(!1),D=`${N}-menu`;g(()=>()=>clearTimeout(L.current),[]);const R=f?.depth??0,F=f?.path[R],H=!!F&&F.key===N&&!o,S=b(e=>{if(!f||o||!C.current)return;clearTimeout(L.current),j.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=R>0&&(f.path[R-1]?.flipped??!1),a=M(r.left,r.right,c,window.innerWidth,4,i);f.open(R,{key:N,y:t.top,...a})},[f,o,R,N,c]),z=e=>{f?.closeBelow(R),C.current?.focus()};g(()=>{if(H)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>R+1)&&(z(),!0)),()=>T.current)}),a(()=>{if(!H||!F)return;const e=()=>{const e=T.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=R>0&&(f?.path[R-1]?.flipped??!1),o=e.offsetWidth||c,i=M(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=E(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{H&&j.current&&(j.current=!1,I(T.current)[0]?.focus())},[H]);const U=y(()=>f&&{...f,depth:R+1},[f,R]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const q=B(!1,o,i,H),J=W();/* @__PURE__ */
9
9
  return x(v,{children:[
10
- /* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":F,"aria-controls":F?B:void 0,disabled:o,"data-popup-submenu-row":!0,className:Q.className,style:Q.style,onClick:e=>{const t=0===e.detail;F?t&&I(M.current)[0]?.focus():S(t)},...d,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),S(!0))},onMouseEnter:()=>{d?.onMouseEnter?.(),o||(f.cancelClose(),F?f.closeBelow(P+1):(clearTimeout(L.current),L.current=setTimeout(()=>S(!1),120)))},onMouseLeave:()=>{clearTimeout(L.current),f.scheduleClose(P)},children:[n,
11
- /* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:t}),A]}),F&&w(
12
- /* @__PURE__ */k("div",{ref:M,id:B,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===U?"py-1":"large"===U?"py-2":"py-1"),style:{left:D.left,top:D.y,minWidth:c,maxHeight:void 0===u?"calc(100vh - 16px)":`min(${"number"==typeof u?`${u}px`:u}, calc(100vh - 16px))`,zIndex:H(f.root.current)+P+1,animation:(D.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=I(M.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),z())},onMouseEnter:()=>{f.cancelClose(),clearTimeout(L.current)},onMouseLeave:()=>f.scheduleClose(P+1),onContextMenu:t=>{e(t.target)||t.preventDefault()},children:/* @__PURE__ */k($.Provider,{value:q,children:r})}),document.body)]})}function z(){const e=W();/* @__PURE__ */
13
- return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function q(){const e=W(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function Q({children:e}){/* @__PURE__ */
14
- return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:q(),children:e})}function U({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
15
- return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{P as MenuCheckMark,U as MenuIcon,L as MenuSemanticsContext,R as PopupMenu,z as PopupMenuDivider,D as PopupMenuItem,Q as PopupMenuLabel,S as PopupSubmenu,T as clampMenuTop,C as closeMenuBelow,j as itemLook,E as menuPanelLeft,q as menuTextRowStyle,N as openMenuLevel,M as resolveMenuLevels};
10
+ /* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":H,"aria-controls":H?D:void 0,disabled:o,"data-popup-submenu-row":!0,className:q.className,style:q.style,onClick:e=>{const t=0===e.detail;H?t&&I(T.current)[0]?.focus():S(t)},...u,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),S(!0))},onMouseEnter:()=>{u?.onMouseEnter?.(),o||(f.cancelClose(),H?f.closeBelow(R+1):(clearTimeout(L.current),L.current=setTimeout(()=>S(!1),120)))},onMouseLeave:()=>{clearTimeout(L.current),f.scheduleClose(R)},children:[n,
11
+ /* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:e}),P]}),H&&w(
12
+ /* @__PURE__ */k("div",{ref:T,id:D,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===J?"py-1":"large"===J?"py-2":"py-1"),style:{left:F.left,top:F.y,minWidth:c,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:A(f.root.current)+R+1,animation:(F.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=I(T.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),z())},onMouseEnter:()=>{f.cancelClose(),clearTimeout(L.current)},onMouseLeave:()=>f.scheduleClose(R+1),onContextMenu:e=>{t(e.target)||e.preventDefault()},children:/* @__PURE__ */k($.Provider,{value:U,children:r})}),document.body)]})}function z(){const e=W();/* @__PURE__ */
13
+ return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function U(){const e=W(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function q({children:e}){/* @__PURE__ */
14
+ return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:U(),children:e})}function J({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
15
+ return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{R as MenuCheckMark,J as MenuIcon,L as MenuSemanticsContext,j as PopupMenu,z as PopupMenuDivider,F as PopupMenuItem,q as PopupMenuLabel,S as PopupSubmenu,E as clampMenuTop,C as closeMenuBelow,B as itemLook,M as menuPanelLeft,U as menuTextRowStyle,N as openMenuLevel,T as resolveMenuLevels};
@@ -0,0 +1,9 @@
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as a}from"./chunk-VVGL5O4F.js";import{Segmented as i}from"./chunk-CKPVXDKX.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-GVC535IA.js";import{TransferProgress as u}from"./chunk-IJWFKUYA.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-F4DIVARP.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{useShellStrings as b}from"./chunk-QWHQJNKL.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:F,onFile:R,label:C,hint:U,error:P,required:V,className:I,accept:K="image/*",maxSizeBytes:O,fit:$="cover",height:z=112,placeholder:A,cta:H,acceptHint:W,showFilename:q=!0,allowReplace:B=!0,allowRemove:D=!0,replaceLabel:S,removeLabel:G,busy:J=!1,busyLabel:Q,choosingLabel:X,pickFailedLabel:Y,progress:_,disabled:M=!1,kind:E,onKindChange:T,focus:Z,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=H??ie.cta,oe=E??(/video/.test(K)&&!/image/.test(K)?"video":"image"),re="string"==typeof G&&G?G:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=J||ne,me=ne&&!J?X??ie.choosing:Q??ie.uploading,he=P??(se?Y??ie.pickFailed:void 0),pe=e=>{if(!F)return;ce(!1);const a=F(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=M||ue,ke=!!w&&(t(w,K)||w===ve),je=A??o(K,ie),xe=S??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{F?pe(e):R?R(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:K,maxSizeBytes:O,acceptHint:W,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Fe=()=>{ye||(F?pe():we.open())},Re=w?r(w):"",Ce=!ke&&!!ee,Ue=M||!B&&!D?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[B&&/* @__PURE__ */k("button",{id:Ce?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Fe(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
2
+ /* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
3
+ /* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),D&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ce?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Ce?void 0:{height:z},children:[Ce?
4
+ /* @__PURE__ */j(a,{value:Z??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Re||void 0,className:"h-full w-full",style:{objectFit:$}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Re,className:"h-full w-full",style:{objectFit:$,objectPosition:Z||void 0}}),q&&w&&/* @__PURE__ */j(n,{children:Re}),Ue,ue&&/* @__PURE__ */j(l,{label:me,progress:_,rounded:"rounded-md"})]}),Ve=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Fe(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":V||void 0,"aria-describedby":he?`${be}-error`:U?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:z},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:_}):/* @__PURE__ */k(x,{children:[
5
+ /* @__PURE__ */j("span",{className:"text-ink-faintest",children:/* @__PURE__ */j(s,{})}),
6
+ /* @__PURE__ */j("span",{className:"px-3 text-xs text-ink-faint",children:je}),
7
+ /* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),W&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:W})]})});/* @__PURE__ */
8
+ return k(e,{label:C,htmlFor:be,hint:U,error:he,required:V,className:I,children:[T&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>T(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof C&&C?C:ie.upload})}),w?Pe:Ve,!F&&/* @__PURE__ */j("input",{...we.inputProps}),
9
+ /* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
@@ -1,4 +1,4 @@
1
- import{InputNumber_default as e}from"./chunk-5E3WCKWB.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{Icon as a}from"./chunk-FSPFV4MI.js";import{Tooltip as i}from"./chunk-22S6LG6D.js";import{useShellStrings as n}from"./chunk-E6UCGCOC.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:C,id:j,className:A=""}){const N=n(),K=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[M,D]=l(0),R=o(null);/* @__PURE__ */
2
- return t("div",{id:j,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
3
- /* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:N.corners.radiusMark}),suffix:N.corners.unit,steppers:"compact",disabled:y,"aria-label":b??N.corners.radius})}),
4
- /* @__PURE__ */s("div",{ref:R,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(R.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:K.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?C:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===M?0:-1,onFocus:()=>D(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
1
+ import{InputNumber_default as e}from"./chunk-ZHHEMSOD.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{Icon as a}from"./chunk-FSPFV4MI.js";import{Tooltip as i}from"./chunk-BCDG4N6L.js";import{useShellStrings as n}from"./chunk-QWHQJNKL.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:j,id:N,className:A=""}){const M=n(),C=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[D,K]=l(0),R=o(null);/* @__PURE__ */
2
+ return t("div",{id:N,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
3
+ /* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:M.corners.radiusMark}),suffix:M.corners.unit,steppers:"compact",disabled:y,"aria-label":b??M.corners.radius})}),
4
+ /* @__PURE__ */s("div",{ref:R,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(R.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:C.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?j:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===D?0:-1,onFocus:()=>K(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
@@ -1,5 +1,5 @@
1
- import{TransferProgress as e}from"./chunk-S7VSXUKS.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-E6UCGCOC.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 u(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 c(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-IJWFKUYA.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-QWHQJNKL.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
- return o("span",{className:"absolute inset-x-1 bottom-1 truncate rounded px-2 py-0.5 text-xs text-white",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__ */
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__ */
5
- return o(r,{name:"upload",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}export{d as BusyOverlay,f as CloseGlyph,l as FilenameBadge,p as UploadGlyph,u as dropzoneClass,m as isVideoUrl,i as mediaFileName,a as mediaPromptLine,c as zoneFocusClass};
5
+ return o(r,{name:"upload",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}export{d as BusyOverlay,f as CloseGlyph,l as FilenameBadge,p as UploadGlyph,c as dropzoneClass,m as isVideoUrl,i as mediaFileName,a as mediaPromptLine,u as zoneFocusClass};
@@ -0,0 +1,8 @@
1
+ import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-QWHQJNKL.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:N,xDomain:$,yDomain:j,xScale:w="linear",yScale:R="linear",radiusRange:L=[4,22],className:U,emptyLabel:S}){const D=m().charts,W=h(),C=z??(e=>f(e,W)),P=N??(e=>f(e,W)),Q=S??D.noObservations,T=u(null),E=n(T),F=v??E,O=p(),[V,B]=d(null);x(()=>{if(null!==V)return c(e=>"Escape"===e.key&&(B(null),!0))},[V]);const H=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),I=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),J=$||j?I.map(e=>({...e,points:e.points.filter(e=>H(e.x,$)&&H(e.y,j))})).filter(e=>e.points.length>0):I,K=I.reduce((e,t)=>e+t.points.length,0)-J.reduce((e,t)=>e+t.points.length,0);if(0===J.length)/* @__PURE__ */
2
+ return y("div",{className:U,ref:T,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:Q})});const X=J.flatMap(e=>e.points),Z=X.some(e=>null!=e.size),Y=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(X.map(e=>e.y),j,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(P),_),le=Math.max(ie+1,F-q),re=ee(X.map(e=>e.x),$,w,{from:ie,to:le}),oe=i([0,Math.max(...X.map(e=>e.size??1))],{from:L[0],to:L[1]}),ne=V?J[V.s]:void 0,ae=V&&ne?ne.points[V.i]:void 0,se=J.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
3
+ return g("div",{className:`relative ${U??""}`,ref:T,children:[
4
+ /* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${F} ${k}`,role:"img","aria-label":D.scatter(J.map(e=>e.label),A??D.yAxis,M??D.xAxis)+(K>0?`. ${D.outsideRange(K)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>B(null),onBlur:()=>B(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=V?se.findIndex(e=>e.s===V.s&&e.i===V.i):0;B(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
5
+ /* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:O,children:/* @__PURE__ */y("rect",{x:ie-L[1],y:Y-L[1],width:le-ie+2*L[1],height:k-G-Y+2*L[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
6
+ /* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
7
+ /* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:P(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:C(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
8
+ /* @__PURE__ */y("g",{clipPath:`url(#${O})`,children:J.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:Z?oe(l.size??0):L[0]+1,fill:i,fillOpacity:V&&V.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>B({s:t,i:r})},`${e.key}-${r}`))})})]}),V&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??D.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:C(ae.x)},{key:"y",label:A??D.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:P(ae.y)},...null!=ae.size?[{key:"size",label:D.size,color:a.muted,value:f(ae.size,W)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
@@ -0,0 +1,8 @@
1
+ import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-QWHQJNKL.js";import{formatPercent as n}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function i(l,e){const t=s(l);if(null==t)return"no-reading";const n=s(e);return null==n||0===n?"no-budget":t>n?"over":"within"}var r=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:f,formatDuration:h,formatValue:x,pace:b,emptyLabel:g,noBudgetLabel:p,size:v="sm",ariaLabel:N,className:y=""}){const w=l().meter,M=e(),$=x??h??(l=>function(l,e=t.meter){const n=Math.round(l),a=Math.floor(n/3600),u=Math.floor(n%3600/60),s=n%60;return a>0?e.hoursMinutes(a,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=g??w.noReading,L=p??w.noBudget,j=s(o),B=s(d),Q=null!=B&&B>0?B:null,H=s(c)??0,R="over"===i(o,d),z=null!=Q?Q+H:null,C=null!=Q&&null!=z?r(Q/z*100):null,D=R&&H>0,F=null==z||null==j?0:R?D?C??0:0:r(j/z*100),J=D?C??0:0,K=R?D&&null!=z&&null!=j?r(j/z*100):100:0,O=Math.max(0,K-J),S=s(b),V=null!=S&&null!=z?r(S/z*100):null,W=null!=j&&null!=Q?j/Q*100:null,q=null!=W?n(Math.round(W),0,M):null!=j?$(j):"—",A=f??(null==j?k:null==Q?L:`${$(j)} / ${$(Q)}`),E="md"===v?"h-2":"h-1.5",G=R?"text-red-600":null!=j?"text-gray-900":"text-gray-400",I=null!=j&&null!=Q&&null!=z?/* @__PURE__ */a("div",{role:"meter","aria-label":N??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":z,"aria-valuenow":Math.min(z,j),"aria-valuetext":w.ofBudget(q),className:`relative mt-2 ${E} overflow-hidden rounded-full bg-gray-200`,children:[(!R||D)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${F}%`}}),O>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${J}%`,width:`${O}%`}}),H>0&&null!=C&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${C}%`}}),null!=V&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${V}%`}})]}):null;/* @__PURE__ */
2
+ return a("div","md"===v?{className:y,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
3
+ /* @__PURE__ */a("div",{className:"mt-1 flex items-baseline gap-2",children:[
4
+ /* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${G}`,children:q}),
5
+ /* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:A})]}),I]}:{className:y,children:[
6
+ /* @__PURE__ */a("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
7
+ /* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${G}`,children:q}),
8
+ /* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:A})]}),I]})}export{m as BudgetBar,i as budgetState};
@@ -1,4 +1,4 @@
1
- import{Tooltip as e}from"./chunk-22S6LG6D.js";import{jsxs as r,Fragment as n,jsx as i}from"react/jsx-runtime";var l=e=>!0===e||"true"===e;function o(e){e.preventDefault(),e.stopPropagation()}var t=(e,r)=>[e,r].filter(Boolean).join(" ")||void 0;function a({reason:l,id:o,block:t=!1,children:a}){/* @__PURE__ */
1
+ import{Tooltip as e}from"./chunk-BCDG4N6L.js";import{jsxs as r,Fragment as n,jsx as i}from"react/jsx-runtime";var l=e=>!0===e||"true"===e;function o(e){e.preventDefault(),e.stopPropagation()}var t=(e,r)=>[e,r].filter(Boolean).join(" ")||void 0;function a({reason:l,id:o,block:t=!1,children:a}){/* @__PURE__ */
2
2
  return r(n,{children:[
3
3
  /* @__PURE__ */i(e,{content:l,describe:!1,className:t?"relative flex w-full":"relative inline-flex",children:a}),
4
4
  /* @__PURE__ */i("span",{id:o,className:"sr-only",children:l})]})}export{a as OffWithReason,t as describedByWith,l as isAriaDisabled,o as swallowPress};
@@ -0,0 +1,2 @@
1
+ import{EMPTY_VALUE as a}from"./chunk-36BRD5J3.js";import{jsx as e}from"react/jsx-runtime";function r({label:r="Not available"}){/* @__PURE__ */
2
+ return e("span",{className:"text-ink-faintest",role:"img","aria-label":r,children:a})}export{r as EmptyValue};
@@ -1,23 +1,23 @@
1
- import{toast_default as e}from"./chunk-4NXMMWL6.js";import{Icon as t}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as n}from"./chunk-Q5MD3VY6.js";import{useShellStrings as r}from"./chunk-E6UCGCOC.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
2
- /* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,z]=s(1),[P,_]=s(0),[D,W]=s(1),[L,S]=s(!0),[$,O]=s(!0),T=i(x.loadFailed);T.current=x.loadFailed,l(()=>{let t=!1;return O(!0),z(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(e=>{t||(j(e),_(e.numPages),O(!1))}).catch(()=>{t||(e.error(T.current),O(!1))}),()=>{t=!0}},[a,g,w]),l(()=>{if(!M||!L||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});W(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,L,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:D}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,D]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const A="page"===d?x.fitPage:x.fitWidth,U="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
1
+ import{toast_default as e}from"./chunk-XD34TCRG.js";import{Icon as t}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as r}from"./chunk-QWHQJNKL.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
2
+ /* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,z]=s(1),[P,_]=s(0),[D,W]=s(1),[L,S]=s(!0),[T,$]=s(!0),A=i(x.loadFailed);A.current=x.loadFailed,l(()=>{let t=!1;return $(!0),z(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(e=>{t||(j(e),_(e.numPages),$(!1))}).catch(()=>{t||(e.error(A.current),$(!1))}),()=>{t=!0}},[a,g,w]),l(()=>{if(!M||!L||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});W(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,L,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:D}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,D]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const O="page"===d?x.fitPage:x.fitWidth,H="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
3
3
  return m("div",{className:"flex flex-col h-full",children:[
4
4
  /* @__PURE__ */m(f,{children:[
5
5
  /* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>z(e=>Math.max(1,e-1)),disabled:E<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
6
6
  /* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,P)}),
7
7
  /* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>z(e=>Math.min(P,e+1)),disabled:E>=P,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
8
8
  /* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
9
- /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{S(!1),W(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:U,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
9
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{S(!1),W(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
10
10
  /* @__PURE__ */m("select",{value:L?"fit":v.includes(Math.round(100*D))?Math.round(100*D):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(S(!1),W(Number(t)/100)):S(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
11
- /* @__PURE__ */u("option",{value:"fit",children:A}),!L&&!v.includes(Math.round(100*D))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*D),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
12
- /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{S(!1),W(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:U,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
13
- /* @__PURE__ */u("button",{type:"button",onClick:()=>S(!0),"aria-pressed":L,className:U+(L?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
11
+ /* @__PURE__ */u("option",{value:"fit",children:O}),!L&&!v.includes(Math.round(100*D))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*D),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
12
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{S(!1),W(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
13
+ /* @__PURE__ */u("button",{type:"button",onClick:()=>S(!0),"aria-pressed":L,className:H+(L?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
14
14
  /* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
15
- /* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=P;e++)n.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:U,children:[
15
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=P;e++)n.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:H,children:[
16
16
  /* @__PURE__ */u(t,{name:"print",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.print]}),
17
- /* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:U,children:[
18
- /* @__PURE__ */u(t,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:U,children:[
17
+ /* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:H,children:[
18
+ /* @__PURE__ */u(t,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:H,children:[
19
19
  /* @__PURE__ */u(t,{name:"email",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.email]})]}),
20
- /* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<P?(e.preventDefault(),z(e=>Math.min(P,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!M)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<P&&(e.preventDefault(),z(e=>Math.min(P,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(P)))},children:$?/* @__PURE__ */u(n,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
20
+ /* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<P?(e.preventDefault(),z(e=>Math.min(P,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!M)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<P&&(e.preventDefault(),z(e=>Math.min(P,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(P)))},children:T?/* @__PURE__ */u(n,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
21
21
  /* @__PURE__ */u("style",{children:'\n.preview-pdf-textlayer {\n position: absolute;\n inset: 0;\n overflow: clip;\n line-height: 1;\n text-align: initial;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n.preview-pdf-textlayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n}\n.preview-pdf-textlayer > :not(.markedContent),\n.preview-pdf-textlayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n.preview-pdf-textlayer .markedContent {\n display: contents;\n}\n.preview-pdf-textlayer span[role="img"] {\n user-select: none;\n cursor: default;\n}\n.preview-pdf-textlayer ::selection {\n background: rgba(0, 80, 255, 0.25);\n}\n.preview-pdf-textlayer br::selection {\n background: transparent;\n}\n.preview-pdf-textlayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n user-select: none;\n}\n.preview-pdf-textlayer.selecting .endOfContent {\n top: 0;\n}\n'}),
22
22
  /* @__PURE__ */m("div",{className:"relative shadow-lg rounded",children:[
23
23
  /* @__PURE__ */u("canvas",{ref:k,className:"block rounded"}),
@@ -0,0 +1,15 @@
1
+ import{AccessibleTable as e}from"./chunk-TBPHW42V.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-QWHQJNKL.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:N=4,formatValue:M,animate:j=!0,className:W,emptyLabel:$}){const C=m().charts,F=c(),L=M??(e=>h(e,F)),R=$??C.nothingToCompare,T=p(),[w,A]=u(null),{highlighted:H}=a(),Q=x;if(k.length<3||0===Q.length)/* @__PURE__ */
2
+ return d("p",{className:`text-sm text-gray-500 ${W??""}`,children:R});const U=y/2,z=y/2,B=y/2-46,E=n(k.length),V=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...Q.map(e=>e.values[t]??0).filter(Number.isFinite))),Y=(e,t)=>{const r=Math.max(0,Math.min(1,t/V[e])),l=E.center(e)-E.step/2;return[U+B*r*Math.cos(l),z+B*r*Math.sin(l)]},J=(e,t)=>null!==w?w!==e:null!==H&&H!==t,O=null!==w?Q[w]:void 0;/* @__PURE__ */
3
+ return f("div",{className:`relative ${W??""}`,children:[
4
+ /* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":T,onMouseLeave:()=>A(null),children:[
5
+ /* @__PURE__ */d("title",{id:T,children:C.acrossMeasures(Q.map(e=>e.label),k.length)}),Array.from({length:N},(e,r)=>{const l=B*(r+1)/N;return"circle"===v?/* @__PURE__ */d("circle",{cx:U,cy:z,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(U,z,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=Y(t,V[t]);/* @__PURE__ */
6
+ return f("g",{children:[
7
+ /* @__PURE__ */d("line",{x1:U,y1:z,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
8
+ /* @__PURE__ */d("text",{x:U+(B+18)*Math.cos(E.center(t)-E.step/2),y:z+(B+18)*Math.sin(E.center(t)-E.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
9
+ /* @__PURE__ */d(r,{id:T,reveal:!!j&&"center-out"}),Q.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>Y(r,e.values[r]??0));/* @__PURE__ */
10
+ return f("g",{opacity:J(t,e.key)?.3:1,onMouseEnter:()=>A(t),mask:j?`url(#${l(T)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
11
+ /* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),O&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:O.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(w,3,O.color,O.tone),value:L(O.values[t]??0)}))})}),
12
+ /* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:Q.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
13
+ /* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
14
+ /* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
15
+ /* @__PURE__ */d(e,{caption:C.acrossMeasures(Q.map(e=>e.label),k.length),head:[C.tableSeries,...k.map(e=>e.label)],rows:Q.map(e=>[e.label,...k.map((t,r)=>L(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
@@ -0,0 +1,14 @@
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-GVC535IA.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-F4DIVARP.js";import{ColoredBadge as u}from"./chunk-X7PM7JOD.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-QWHQJNKL.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:F,hint:I,error:P,required:L,className:O,accept:S="image/*",maxSizeBytes:z,maxFiles:M,fit:$="cover",thumbSize:E=96,placeholder:H,cta:R,acceptHint:B,showCover:Q=!1,coverLabel:W,busy:V=!1,busyLabel:q,progress:G,disabled:J=!1,readOnly:U=!1,selected:X,onItemClick:Y,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=R??te.cta,ae=W??te.cover,ne=q??te.uploading,le=g(),[ie,oe]=b(null),se=J||V,de=!(!k&&!N||se||U),ce=!!w&&!se&&!U,ue=!!j&&!se&&!U,me=!!K&&!J&&!ue,pe=!(!T||!A||se||U),fe=t(se),he=H??r(S,te),ge=d({accept:S,maxSizeBytes:z,maxFiles:M,acceptHint:B,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:E,height:E},Ke=null==X?null:new Set(X),Ce=!!Y,Te=E<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,S),a=e.name??o(e.url),n=Q&&(e.cover??0===t);/* @__PURE__ */
2
+ return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:Z?()=>Z(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:$}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:$}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
+ /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Te?
4
+ /* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
5
+ /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Fe=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
6
+ /* @__PURE__ */x(a,{className:"h-5 w-5"}),
7
+ /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Ie=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:E+32},children:[
8
+ /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(a,{})}),
9
+ /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:he}),
10
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),B&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:B})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:E+32},children:/* @__PURE__ */x("span",{className:V?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
+ return v(e,{label:F,labelId:F?`${le}-label`:void 0,htmlFor:le,hint:I,error:P,required:L,className:O,children:[
12
+ /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":F?`${le}-label`:void 0,"aria-describedby":P?`${le}-error`:I?`${le}-hint`:void 0,"aria-busy":V||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
+ /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof F?F:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Fe]}),V&&/* @__PURE__ */x(l,{label:ne,progress:G})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
14
+ /* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{k as FULL_BADGE_TILE_PX,N as MediaUploadGrid};
@@ -0,0 +1,17 @@
1
+ import{SidebarLayout as e}from"./chunk-5JRL5LXD.js";import{Avatar as t}from"./chunk-Z3JW77LH.js";import{Input_default as a}from"./chunk-MAMWQCJ6.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{useState as s}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
2
+ return n("div",{className:"h-full",children:/* @__PURE__ */n(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */n("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */l("button",{onClick:()=>o(e.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(e.id===d?"bg-blue-50/50":""),children:[
3
+ /* @__PURE__ */n(t,{name:e.name,status:e.status}),
4
+ /* @__PURE__ */l("div",{className:"min-w-0 flex-1",children:[
5
+ /* @__PURE__ */l("div",{className:"flex items-center justify-between gap-2",children:[
6
+ /* @__PURE__ */n("span",{className:"truncate text-sm font-medium text-gray-900",children:e.name}),
7
+ /* @__PURE__ */n("span",{className:"shrink-0 text-2xs text-ink-faintest",children:e.time})]}),
8
+ /* @__PURE__ */n("div",{className:"truncate text-xs text-gray-500",children:e.last})]})]},e.id))}),children:/* @__PURE__ */l("div",{className:"flex h-full flex-col",children:[
9
+ /* @__PURE__ */l("div",{className:"flex items-center gap-3 border-b border-gray-200 p-3",children:[
10
+ /* @__PURE__ */n(t,{name:c.name,status:c.status,size:"sm"}),
11
+ /* @__PURE__ */l("div",{children:[
12
+ /* @__PURE__ */n("div",{className:"text-sm font-medium text-gray-900",children:c.name}),
13
+ /* @__PURE__ */n("div",{className:"text-xs text-gray-400 capitalize",children:c.status})]})]}),
14
+ /* @__PURE__ */n("div",{className:"flex flex-1 flex-col gap-2 overflow-auto bg-gray-50 p-4",children:m.map((e,t)=>/* @__PURE__ */n("div",{className:"flex "+(e.mine?"justify-end":"justify-start"),children:/* @__PURE__ */n("div",{style:{maxWidth:"75%"},className:"rounded-2xl px-3 py-2 text-sm "+(e.mine?"bg-blue-600 text-white":"bg-white text-gray-800 shadow-sm"),children:e.text})},t))}),
15
+ /* @__PURE__ */l("form",{className:"flex items-center gap-2 border-t border-gray-200 p-3",onSubmit:e=>e.preventDefault(),children:[
16
+ /* @__PURE__ */n("div",{className:"flex-1",children:/* @__PURE__ */n(a,{placeholder:"Type a message…"})}),
17
+ /* @__PURE__ */n(i,{type:"submit",children:"Send"})]})]})})})}export{d as ChatTemplate};
@@ -0,0 +1,5 @@
1
+ import{InputNumber_default as e}from"./chunk-ZHHEMSOD.js";import{useSettingAuto as t,useInSettingRow as i}from"./chunk-L65BESIE.js";import{useShellStrings as n}from"./chunk-QWHQJNKL.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as s,useEffect as u,useLayoutEffect as c}from"react";import{jsx as m,jsxs as f}from"react/jsx-runtime";var p=(e,t,i)=>Math.min(i,Math.max(t,e));function h(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var v=8,x=40;function b(e){return Math.max(1,...e.map(e=>(e??"").length))}var w="undefined"==typeof window?u:c;function y(e,t,i,n){return Number(p(e,t,i).toFixed(n))}var g=r(null);function S({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
2
+ return m(g.Provider,{value:r,children:e})}function z({value:r,onChange:a,min:c,max:S,step:z=1,shiftStep:F,precision:$,inputMin:k,inputMax:L,suffix:N,showInput:j=!0,emptyLabel:E,placeholderValue:K,stepFrom:M,label:A,"aria-labelledby":C,valueText:D,id:H,disabled:R,size:W="md",boxSize:B="sm",className:I="",auto:O}){const Q=n(),V=o(),q=t(),J=O??q,P=o(),T=H??V,U=$??h(z),Z=k??c,G=L??S,X=void 0!==E||void 0!==K,Y=M??K,_=p(r??K??c,c,S),ee=d(null),[te,ie]=l(null),ne=Boolean(N);w(()=>{const e=()=>{const e=ee.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||ie(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ne,j]);const re=e=>D?D(e):"string"==typeof N?`${e.toFixed(U)} ${N}`:void 0,le=null==r?E??(null!=K?re(K)??String(K):void 0):re(r),ae=`calc(${b([c.toFixed(U),S.toFixed(U),r?.toFixed(U),E,K?.toFixed(U)])}ch + ${(te?.frame??10+(ne?x:v))+2}px)`,oe=s(g),de=o(),se=oe?.set;w(()=>{se&&se(de,j?ae:null)},[se,de,ae,j]),u(()=>()=>se?.(de,null),[se,de]);const ue=i();/* @__PURE__ */
3
+ return f("div",{"data-slider":"",className:`flex w-full min-w-0 items-center ${ue?"flex-wrap gap-2":"gap-3"} ${I}`.trim(),children:[
4
+ /* @__PURE__ */m("input",{id:T,type:"range",min:c,max:S,step:z,value:_,disabled:R,"aria-label":C?void 0:A,"aria-labelledby":C,"aria-valuetext":le,"aria-describedby":J?P:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=F;if(!i&&!(null==r&&null!=Y))return;e.preventDefault();a(y((r??Y??_)+t*(i?F??z:z),c,S,U))},onChange:e=>a(y(Number(e.target.value),c,S,U)),className:`min-w-24 flex-1 ${ue?"basis-24":""} cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 ${"sm"===W?"h-1":"h-1.5"}`}),j&&
5
+ /* @__PURE__ */m("div",{ref:ee,"data-slider-box":"",className:ue?"ml-auto shrink-0":"shrink-0 text-xs",style:ue?void 0:{width:oe?.width??ae,...te?{fontSize:te.fontSize}:{}},children:/* @__PURE__ */m(e,{value:r,onChange:e=>{null!=e?e<Z||e>G||a(e):X&&a(null)},min:Z,max:G,step:z,shiftStep:F,stepFrom:Y,precision:U,snap:!0,allowEmpty:X,suffix:N,disabled:R,placeholder:E??(null!=K?K.toFixed(U):void 0),size:ue?void 0:B,auto:J,"aria-label":A?Q.slider.value(A):void 0,"aria-labelledby":A?void 0:C})}),J&&/* @__PURE__ */m("span",{id:P,hidden:!0,children:Q.settingView.auto})]})}export{z as Slider,S as SliderGroup,y as settleSliderValue,b as sliderBoxChars,h as stepDecimals};
@@ -1,6 +1,6 @@
1
- import{GROUP_COLORS as e}from"./chunk-D323R2FT.js";import{SpinnerRing as r}from"./chunk-Q5MD3VY6.js";import{Tooltip as n}from"./chunk-22S6LG6D.js";import{useShellStrings as l}from"./chunk-E6UCGCOC.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
1
+ import{GROUP_COLORS as e}from"./chunk-LNARMEEZ.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-QWHQJNKL.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
2
2
  return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
3
3
  return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
4
- /* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,C=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
5
- return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null==$&&/* @__PURE__ */t(r,{ink:""}),
6
- /* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof y?C(y):/* @__PURE__ */i(a,{children:[y,C("")&&` ${C("")}`]})}),d&&/* @__PURE__ */t(o,{label:k,glyph:"×",onClick:d})]})}export{c as TransferProgress};
4
+ /* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const N=u??g.uploading,y=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),$="string"==typeof N?g.cancelVerb(N.toLowerCase()):g.cancel,k=e=>[e,m,null==y?"":`${y}%`].filter(Boolean).join(" ");/* @__PURE__ */
5
+ return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null==y&&/* @__PURE__ */t(r,{ink:""}),
6
+ /* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof N?k(N):/* @__PURE__ */i(a,{children:[N,k("")&&` ${k("")}`]})}),d&&/* @__PURE__ */t(o,{label:$,glyph:"×",onClick:d})]})}export{c as TransferProgress};
@@ -0,0 +1,27 @@
1
+ import{Dialog as e}from"./chunk-6453ISTQ.js";import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{useShellStrings as n,splitAround as o}from"./chunk-QWHQJNKL.js";import{createContext as l,useContext as i,useState as s,useRef as a,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var f=l(()=>Promise.resolve(!1)),b=()=>i(f),g=()=>Promise.resolve(!1),p=e=>g(e),v=()=>Promise.resolve(!1),y=e=>v(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:t({variant:"primary"})}},w=t({variant:"secondary"}),C=t({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function P(){/* @__PURE__ */
2
+ return m(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F(){/* @__PURE__ */
3
+ return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j({children:t}){const[r,l]=s(!1),[i,b]=s({message:""}),[p,y]=s(0),N=a(),j=a(null),E=a(0),T=a([]),Q=a(null),W=a(null),$=c(e=>{j.current=e.id,N.current=e.resolve,y(e.id),b(e.options),l(!0)},[]),K=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++E.current,options:t,resolve:e};null===j.current?$(r):T.current.push(r)})},[$]),[D,I]=s(!1),[S,V]=s({message:""}),[Y,H]=s(""),J=a(),M=c(e=>(V(e),H(""),I(!0),new Promise(e=>{J.current=e})),[]),[U,q]=s(!1),[z,A]=s({}),[B,G]=s(""),O=a(),R=c(e=>{const t="string"==typeof e?{message:e}:e;return A(t),G(t.defaultValue??""),q(!0),new Promise(e=>{O.current=e})},[]);u(()=>{g=K,v=M,x=R},[K,M,R]);const X=(e,t)=>{if(j.current!==e)return;const r=N.current,n=T.current.shift();n?$(n):(j.current=null,N.current=void 0,l(!1)),r?.(t)},Z=e=>{I(!1),H(""),J.current?.(e)},_=e=>{if(e){const e=B.trim();if(!e&&!z.allowEmpty)return q(!1),void O.current?.(null);q(!1),O.current?.(e)}else q(!1),O.current?.(null)},ee=i.variant||(i.confirmLabel?.toLowerCase().includes("delete")||i.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===S.variant?"warning":"danger"],ne=S.confirmWord,oe=null==ne||Y===ne,le=n().dialog,[ie,se]=o(le.typeToConfirm);/* @__PURE__ */
4
+ return d(f.Provider,{value:K,children:[t,
5
+ /* @__PURE__ */m(e,{open:r,onClose:()=>X(p,!1),initialFocus:Q,footer:/* @__PURE__ */d(h,{children:[
6
+ /* @__PURE__ */m("button",{ref:Q,type:"button",onClick:()=>X(p,!1),className:w,children:i.cancelLabel||le.cancel}),
7
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>X(p,!0),className:te.button,children:i.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
8
+ /* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
9
+ /* @__PURE__ */d("div",{className:"flex-1",children:[
10
+ /* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:i.title||le.confirmTitle}),
11
+ /* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:i.message})]})]})}),
12
+ /* @__PURE__ */d(e,{open:D,onClose:()=>Z(!1),initialFocus:null!=ne?void 0:W,footer:/* @__PURE__ */d(h,{children:[
13
+ /* @__PURE__ */m("button",{ref:W,type:"button",onClick:()=>Z(!1),className:w,children:S.cancelLabel||le.destructiveCancel}),
14
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??S.confirmLabel??le.destructiveConfirm})]}),children:[
15
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(F,{})}),
16
+ /* @__PURE__ */d("div",{className:"flex gap-4",children:[
17
+ /* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
18
+ /* @__PURE__ */d("div",{className:"flex-1",children:[
19
+ /* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:S.title||le.destructiveTitle}),
20
+ /* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:S.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
21
+ /* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
22
+ /* @__PURE__ */m("kbd",{className:"rounded border border-line-strong bg-surface-sunken px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),se]}),
23
+ /* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:Y,onChange:e=>H(e.target.value),onKeyDown:e=>{"Enter"===e.key&&Y===ne&&Z(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
24
+ /* @__PURE__ */d(e,{open:U,onClose:()=>_(!1),title:z.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
25
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:z.cancelLabel||le.cancel}),
26
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!z.allowEmpty&&!B.trim(),className:C,children:z.confirmLabel||le.ok})]}),children:[z.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:z.message}),
27
+ /* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:B,onChange:e=>G(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:z.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{j as ConfirmProvider,p as confirm,y as confirmDestructive,N as prompt,b as useConfirm};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-E6UCGCOC.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-QWHQJNKL.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
3
3
  return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
4
4
  return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
@@ -1,2 +1,2 @@
1
- import{SpinnerRing as t}from"./chunk-Q5MD3VY6.js";import{jsx as e}from"react/jsx-runtime";function i({size:i=18,className:r}){/* @__PURE__ */
1
+ import{SpinnerRing as t}from"./chunk-R2VKEMZH.js";import{jsx as e}from"react/jsx-runtime";function i({size:i=18,className:r}){/* @__PURE__ */
2
2
  return e(t,{className:r,ink:"",style:r?void 0:{width:i,height:i}})}export{i as SpinnerIcon};