efficient-shell 11.12.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +10 -12
  2. package/dist/{Browser-LPGSKKLU.js → Browser-CXZAXF55.js} +17 -17
  3. package/dist/Calculator-TKQRQGTI.js +29 -0
  4. package/dist/{CurrencyConverter-N2HQT7IR.js → CurrencyConverter-WFC3TAL4.js} +12 -12
  5. package/dist/Files-QM5PW6BX.js +88 -0
  6. package/dist/{Notepad-JCWNOQET.js → Notepad-B7CKQ54M.js} +9 -9
  7. package/dist/PdfViewer-3UEC5TNN.js +1 -0
  8. package/dist/{PomodoroTimer-356JUEM3.js → PomodoroTimer-JMJORKWZ.js} +68 -68
  9. package/dist/{Preview-X7XNDI6X.js → Preview-OELV5X55.js} +27 -27
  10. package/dist/Sidebar-SZ5OGL6C.js +44 -0
  11. package/dist/{Stock-2XOOZNRR.js → Stock-R3436P6X.js} +3 -3
  12. package/dist/{Weather-ZDU2722T.js → Weather-6N3ZPO2Q.js} +18 -18
  13. package/dist/{WorldClock-PQGERFCH.js → WorldClock-BJKYHGLS.js} +6 -6
  14. package/dist/ai/index.js +58 -58
  15. package/dist/apps/index.d.ts +9 -27
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/charts/BoxPlotChart.js +1 -1
  21. package/dist/charts/CandlestickChart.js +1 -1
  22. package/dist/charts/CartesianPlot.js +1 -1
  23. package/dist/charts/ChartBrush.js +1 -1
  24. package/dist/charts/ChartFrame.js +1 -1
  25. package/dist/charts/ChartSkeleton.js +1 -1
  26. package/dist/charts/ChordChart.js +1 -1
  27. package/dist/charts/ColumnChart.js +1 -1
  28. package/dist/charts/FunnelChart.js +1 -1
  29. package/dist/charts/HeatmapChart.js +1 -1
  30. package/dist/charts/HistogramChart.js +1 -1
  31. package/dist/charts/Meter.js +1 -1
  32. package/dist/charts/PieChart.js +1 -1
  33. package/dist/charts/RadarChart.js +1 -1
  34. package/dist/charts/RadialBarChart.js +1 -1
  35. package/dist/charts/RangeChart.js +1 -1
  36. package/dist/charts/RankedBars.js +1 -1
  37. package/dist/charts/SankeyChart.js +1 -1
  38. package/dist/charts/ScatterChart.js +1 -1
  39. package/dist/charts/SpecChart.js +1 -1
  40. package/dist/charts/StatTile.js +1 -1
  41. package/dist/charts/SunburstChart.js +1 -1
  42. package/dist/charts/TimeSeriesChart.js +1 -1
  43. package/dist/charts/TreemapChart.js +1 -1
  44. package/dist/charts/WaterfallChart.js +1 -1
  45. package/dist/{chunk-7V32O5NF.js → chunk-2UO47XB4.js} +14 -30
  46. package/dist/{chunk-FEUTN4GK.js → chunk-33F35NNM.js} +1 -1
  47. package/dist/{chunk-FUHURDBL.js → chunk-34AHFST2.js} +1 -1
  48. package/dist/{chunk-UEWB6IOD.js → chunk-3LGPZAVU.js} +2 -2
  49. package/dist/{chunk-4APQHXLI.js → chunk-3YQICVUP.js} +2 -2
  50. package/dist/{chunk-IJ6HZXZY.js → chunk-46EBZ7YI.js} +1 -1
  51. package/dist/{chunk-PTVTNCD6.js → chunk-46VLN6KC.js} +1 -1
  52. package/dist/{chunk-HOEEFFE3.js → chunk-4ALGGYHV.js} +7 -7
  53. package/dist/{chunk-34AHNPW7.js → chunk-4DDL6NXB.js} +1 -1
  54. package/dist/{chunk-F33L4J3P.js → chunk-4K7BA3PD.js} +6 -6
  55. package/dist/chunk-4LNO444F.js +11 -0
  56. package/dist/{chunk-225LCPO7.js → chunk-4MERJIJJ.js} +1 -1
  57. package/dist/chunk-56YJIKVI.js +11 -0
  58. package/dist/{chunk-GJVGGYQ2.js → chunk-5EWKVVUD.js} +1 -1
  59. package/dist/chunk-5PDHKH2A.js +3 -0
  60. package/dist/{chunk-ELIWGIR7.js → chunk-62RAGXWK.js} +9 -9
  61. package/dist/{chunk-NMQGAP3H.js → chunk-63ZLF7LS.js} +1 -1
  62. package/dist/chunk-6E47JSLM.js +22 -0
  63. package/dist/{chunk-3PZI2C4R.js → chunk-6HO7244M.js} +1 -1
  64. package/dist/{chunk-4TB4CSLB.js → chunk-6KGIHI6X.js} +9 -9
  65. package/dist/{chunk-OLJUPBY4.js → chunk-6MWLOLLP.js} +1 -1
  66. package/dist/{chunk-6WPKLF6G.js → chunk-7P2WKDGB.js} +14 -14
  67. package/dist/{chunk-SPMD7UZO.js → chunk-A34PD3XT.js} +16 -16
  68. package/dist/{chunk-KVVZLEUG.js → chunk-A3AKJDLI.js} +1 -1
  69. package/dist/chunk-AEMAGYIZ.js +8 -0
  70. package/dist/{chunk-JGWUSJDD.js → chunk-AICGATHE.js} +33 -33
  71. package/dist/{chunk-OCWWEHNR.js → chunk-AIJ6OR6X.js} +2 -2
  72. package/dist/{chunk-WOOKUEED.js → chunk-AQ3LCE2U.js} +1 -1
  73. package/dist/{chunk-BOJEZKYS.js → chunk-ATURDO2C.js} +12 -12
  74. package/dist/{chunk-ZHS2VQU7.js → chunk-B7WTHCTF.js} +3 -3
  75. package/dist/{chunk-LWFH5QTJ.js → chunk-BUHTLO2K.js} +1 -1
  76. package/dist/{chunk-EQ72AP5E.js → chunk-BYLGKRIT.js} +1 -1
  77. package/dist/{chunk-D5MN3LXC.js → chunk-C4T4APD6.js} +22 -22
  78. package/dist/{chunk-IFWXC323.js → chunk-CCA4LQNB.js} +1 -1
  79. package/dist/{chunk-Y4RHGLXB.js → chunk-CFJL6MML.js} +1 -1
  80. package/dist/{chunk-UHGAT5MH.js → chunk-CJ4U4C4A.js} +5 -5
  81. package/dist/{chunk-TZXAW32T.js → chunk-CRILBBSU.js} +1 -1
  82. package/dist/{chunk-D4RVWSUT.js → chunk-CRO56LVN.js} +1 -1
  83. package/dist/{chunk-DHMOJX2Z.js → chunk-D7DRZKUI.js} +1 -1
  84. package/dist/{chunk-6S6FJJKP.js → chunk-DD2ZGHCG.js} +6 -6
  85. package/dist/{chunk-GJFTO7D4.js → chunk-DSKROZST.js} +1 -1
  86. package/dist/{chunk-LP45EML2.js → chunk-DV4B26FJ.js} +1 -1
  87. package/dist/{chunk-P75N466Z.js → chunk-DW5Y57I2.js} +2 -2
  88. package/dist/{chunk-CAIKDX2M.js → chunk-DWYCSJ6O.js} +2 -2
  89. package/dist/{chunk-7A2Y3W55.js → chunk-E47TNYYE.js} +1 -1
  90. package/dist/{chunk-IIKPM3F4.js → chunk-ED5D2O6E.js} +1 -1
  91. package/dist/{chunk-HGMQOHMK.js → chunk-EFBWQWUS.js} +1 -1
  92. package/dist/chunk-EJBR5Y4X.js +9 -0
  93. package/dist/{chunk-AO7XAAGG.js → chunk-EM6VZSNJ.js} +1 -1
  94. package/dist/{chunk-ZA2RBNRA.js → chunk-EO3IKZCP.js} +1 -1
  95. package/dist/chunk-EZBE3H2W.js +9 -0
  96. package/dist/{chunk-PMKBWDXO.js → chunk-FGWHTNC3.js} +1 -1
  97. package/dist/{chunk-UOGF37Z4.js → chunk-GCRPI3AL.js} +1 -1
  98. package/dist/{chunk-DMBA6KYQ.js → chunk-GEQC4ABV.js} +6 -6
  99. package/dist/{chunk-T74FGTLW.js → chunk-GHMDLZH4.js} +7 -7
  100. package/dist/chunk-GWDTGCQB.js +9 -0
  101. package/dist/{chunk-VEATEVMV.js → chunk-H34KI3HV.js} +9 -9
  102. package/dist/{chunk-LXQHTY3A.js → chunk-H3IGNWT7.js} +3 -3
  103. package/dist/{chunk-VZ52KKNA.js → chunk-HCKCQIWA.js} +6 -6
  104. package/dist/{chunk-I5GDAQYL.js → chunk-HK4QAI2A.js} +2 -2
  105. package/dist/{chunk-FD6XZRWA.js → chunk-HKPVHSZ3.js} +1 -1
  106. package/dist/{chunk-GS74BABV.js → chunk-HNUKXGYP.js} +1 -1
  107. package/dist/{chunk-B2AYI45X.js → chunk-HTB5AEZU.js} +6 -6
  108. package/dist/chunk-IJXMWWTM.js +9 -0
  109. package/dist/{chunk-AWQ5SOC5.js → chunk-IK37Q6LY.js} +1 -1
  110. package/dist/{chunk-TTQJQKCE.js → chunk-IS7C6OWZ.js} +8 -8
  111. package/dist/{chunk-YQLKZ5UQ.js → chunk-JAQO3TNE.js} +1 -1
  112. package/dist/chunk-JINTE3G4.js +1 -0
  113. package/dist/{chunk-SKRFI6WB.js → chunk-JQHL4B4C.js} +12 -12
  114. package/dist/{chunk-5IESW4PM.js → chunk-JSUL7UON.js} +5 -5
  115. package/dist/{chunk-KV4QPU6U.js → chunk-K46DLEIX.js} +21 -21
  116. package/dist/{chunk-LXBBJNBQ.js → chunk-KABXUBIH.js} +1 -1
  117. package/dist/{chunk-CR3YDABU.js → chunk-KRH7UAD2.js} +1 -1
  118. package/dist/{chunk-PDFV3YQB.js → chunk-KSHNA6W2.js} +1 -1
  119. package/dist/{chunk-4JJ5WT4D.js → chunk-L6OPXIZN.js} +1 -1
  120. package/dist/{chunk-ZKBGUDNB.js → chunk-LBGRLG3Y.js} +1 -1
  121. package/dist/{chunk-PL4HKGYP.js → chunk-LISPTWW3.js} +1 -1
  122. package/dist/{chunk-HJBR73GS.js → chunk-LJN77RG6.js} +1 -1
  123. package/dist/chunk-LPJGF6LK.js +27 -0
  124. package/dist/{chunk-M4AOQYSP.js → chunk-LXHTCLNX.js} +1 -1
  125. package/dist/chunk-MBY5JIGB.js +1 -0
  126. package/dist/{chunk-L2IPWMLI.js → chunk-MOBJVNLF.js} +10 -10
  127. package/dist/{chunk-R6TDZ7T5.js → chunk-MQXZZBR6.js} +1 -1
  128. package/dist/{chunk-UCAMOW53.js → chunk-MSAQGUGU.js} +4 -4
  129. package/dist/{chunk-K3IUUZO5.js → chunk-N7GFQZ2J.js} +8 -8
  130. package/dist/chunk-N7LDQZTL.js +8 -0
  131. package/dist/{chunk-CR42APAY.js → chunk-NDP2I5HK.js} +6 -6
  132. package/dist/{chunk-VVDK7XPH.js → chunk-NIBYHQLT.js} +1 -1
  133. package/dist/{chunk-KYHDDVTR.js → chunk-NK5RRBXY.js} +6 -6
  134. package/dist/{chunk-WEEQDPU3.js → chunk-NPTHHWXZ.js} +5 -5
  135. package/dist/chunk-NZISMTQE.js +7 -0
  136. package/dist/{chunk-VIDT4JLR.js → chunk-O53EQODF.js} +1 -1
  137. package/dist/{chunk-HT7SOOMD.js → chunk-OAZX7ZGB.js} +10 -10
  138. package/dist/{chunk-4EVYK6DR.js → chunk-OMCM3SIE.js} +4 -4
  139. package/dist/{chunk-WZJPASST.js → chunk-OMUC6TZT.js} +6 -6
  140. package/dist/{chunk-PETBAYS5.js → chunk-OXVRXWJL.js} +12 -12
  141. package/dist/{chunk-RBAC26J7.js → chunk-P75R4EYJ.js} +3 -3
  142. package/dist/{chunk-JJLAI6GL.js → chunk-PB6XGDLJ.js} +8 -8
  143. package/dist/{chunk-HDABS36W.js → chunk-PLDMQNKD.js} +7 -7
  144. package/dist/{chunk-6UJYRGWY.js → chunk-QMTYILTT.js} +1 -1
  145. package/dist/{chunk-5KKJAYKT.js → chunk-QTNMALBN.js} +1 -1
  146. package/dist/{chunk-ZMC25LRC.js → chunk-RBINX62X.js} +1 -1
  147. package/dist/{chunk-SAASFWKB.js → chunk-RDYFZHT3.js} +1 -1
  148. package/dist/{chunk-JRCFOZEU.js → chunk-RLTTAH46.js} +4 -4
  149. package/dist/{chunk-UTITWGVW.js → chunk-RPFONHXQ.js} +1 -1
  150. package/dist/{chunk-2XORVHF2.js → chunk-RSPCCVN4.js} +1 -1
  151. package/dist/{chunk-UVMM7AYO.js → chunk-S262RGL6.js} +1 -1
  152. package/dist/{chunk-NPT6EXHK.js → chunk-SCPPW3ZC.js} +1 -1
  153. package/dist/chunk-SOWRW647.js +6 -0
  154. package/dist/chunk-SZC35EYE.js +28 -0
  155. package/dist/{chunk-6CK44QWU.js → chunk-T4WDJ7IB.js} +29 -29
  156. package/dist/{chunk-7FCIFHO7.js → chunk-T6BGS26U.js} +1 -1
  157. package/dist/{chunk-O6VIHWYU.js → chunk-TF6DYDNQ.js} +1 -1
  158. package/dist/{chunk-JJZAYAVL.js → chunk-THSKCKAQ.js} +1 -1
  159. package/dist/{chunk-64KZ74CS.js → chunk-TLE6VHMJ.js} +7 -7
  160. package/dist/{chunk-3N2MNOV5.js → chunk-TOSUM2OI.js} +1 -1
  161. package/dist/{chunk-SEP35R2E.js → chunk-TVRKONNH.js} +1 -1
  162. package/dist/{chunk-LLSLY6BT.js → chunk-U24GFE5L.js} +1 -1
  163. package/dist/{chunk-6ETRVCMH.js → chunk-UDVUVFRS.js} +12 -12
  164. package/dist/{chunk-OMROEVOP.js → chunk-UIOKWFT4.js} +1 -1
  165. package/dist/{chunk-G3FHFWC2.js → chunk-UMFEOZ75.js} +3 -3
  166. package/dist/{chunk-N75MPMLD.js → chunk-UNJWYV6V.js} +2 -2
  167. package/dist/chunk-UYNFTF6L.js +2 -0
  168. package/dist/{chunk-AQ7CNPEE.js → chunk-VI4NLOVJ.js} +10 -10
  169. package/dist/{chunk-VU5P4ZM5.js → chunk-VNAOZVSM.js} +13 -13
  170. package/dist/{chunk-JFCCI5L2.js → chunk-VOXX4LNC.js} +1 -1
  171. package/dist/{chunk-RXVFAFEB.js → chunk-VPGQMNW3.js} +1 -1
  172. package/dist/{chunk-GRC46C4V.js → chunk-W4UYDSTI.js} +7 -7
  173. package/dist/{chunk-DXKXETTT.js → chunk-WPCNJ4UL.js} +1 -1
  174. package/dist/{chunk-LJJ7FDAQ.js → chunk-WRJP33DN.js} +2 -2
  175. package/dist/{chunk-NTUZT37J.js → chunk-WRRMZAKK.js} +4 -4
  176. package/dist/chunk-WVIUU4BZ.js +13 -0
  177. package/dist/{chunk-RMSF4UCJ.js → chunk-X3NYVMXJ.js} +1 -1
  178. package/dist/chunk-XNFZLSWW.js +7 -0
  179. package/dist/{chunk-FFNPAJLS.js → chunk-XZ2WQNOX.js} +9 -9
  180. package/dist/chunk-XZU24YKP.js +13 -0
  181. package/dist/{chunk-CXZ7PHHF.js → chunk-Y3SVPBUT.js} +6 -6
  182. package/dist/{chunk-YOXR3VKO.js → chunk-YAZENY3X.js} +1 -1
  183. package/dist/{chunk-FRH2AHPI.js → chunk-YESTUDOK.js} +1 -1
  184. package/dist/{chunk-SSM6P43S.js → chunk-YIV7CFBG.js} +2 -2
  185. package/dist/{chunk-BPJ3CQH7.js → chunk-YJOJ5MUZ.js} +11 -11
  186. package/dist/chunk-YN5K72D6.js +5 -0
  187. package/dist/chunk-YQEGMCSX.js +9 -0
  188. package/dist/{chunk-HJM4LSMM.js → chunk-YXOFUY4J.js} +1 -1
  189. package/dist/{chunk-6C6M3QXL.js → chunk-ZHFKBWBU.js} +1 -1
  190. package/dist/{chunk-SI33IE7G.js → chunk-ZITMPMUT.js} +2 -2
  191. package/dist/{chunk-XOH6QERF.js → chunk-ZKYBLZPT.js} +9 -9
  192. package/dist/{chunk-IUG4Z2ND.js → chunk-ZU3BD75E.js} +1 -1
  193. package/dist/{chunk-PVVHWLNX.js → chunk-ZU432XW4.js} +1 -1
  194. package/dist/{chunk-5UCRYSQJ.js → chunk-ZYDRBF3H.js} +5 -5
  195. package/dist/{chunk-2ZAFRGRF.js → chunk-ZYJAZ5HH.js} +1 -1
  196. package/dist/data/DataTable.js +1 -1
  197. package/dist/data/EntityList.js +1 -1
  198. package/dist/data/Kanban.js +1 -1
  199. package/dist/data/ListFooter.js +1 -1
  200. package/dist/data/ListLoadError.js +1 -1
  201. package/dist/data/Pagination.js +1 -1
  202. package/dist/data/ResizableTable.js +1 -1
  203. package/dist/file-intake/index.js +1 -1
  204. package/dist/forms/BorderInput.js +1 -1
  205. package/dist/forms/BrandAssetEditor.js +1 -1
  206. package/dist/forms/Calendar.js +1 -1
  207. package/dist/forms/ColorPicker.js +1 -1
  208. package/dist/forms/ComposerAttachments.js +1 -1
  209. package/dist/forms/CornersInput.js +1 -1
  210. package/dist/forms/DatePicker.js +1 -1
  211. package/dist/forms/DateRangePicker.js +1 -1
  212. package/dist/forms/DateTimePicker.js +1 -1
  213. package/dist/forms/DisplayChips.js +1 -1
  214. package/dist/forms/FilePicker.js +1 -1
  215. package/dist/forms/FormErrorSummary.js +1 -1
  216. package/dist/forms/IconPicker.js +1 -1
  217. package/dist/forms/ImageFocusPoint.js +1 -1
  218. package/dist/forms/Input.js +1 -1
  219. package/dist/forms/InputNumber.js +1 -1
  220. package/dist/forms/LinkPicker.js +1 -1
  221. package/dist/forms/MediaLibrary.js +1 -1
  222. package/dist/forms/MediaUploadField.js +1 -1
  223. package/dist/forms/MediaUploadGrid.js +1 -1
  224. package/dist/forms/MediaUsedInList.js +1 -1
  225. package/dist/forms/NumericKeypad.js +1 -1
  226. package/dist/forms/PositionInput.js +1 -1
  227. package/dist/forms/RenameField.js +1 -1
  228. package/dist/forms/Select.js +1 -1
  229. package/dist/forms/SidesInput.js +1 -1
  230. package/dist/forms/Slider.js +1 -1
  231. package/dist/forms/Snippet.js +1 -1
  232. package/dist/forms/SplitButton.js +1 -1
  233. package/dist/forms/TagInput.js +1 -1
  234. package/dist/forms/TextToolbar.js +1 -1
  235. package/dist/forms/TimePicker.js +1 -1
  236. package/dist/forms/WidthsBar.js +1 -1
  237. package/dist/forms/mediaLibraryMenu.js +1 -1
  238. package/dist/forms/mediaMoveItems.js +1 -1
  239. package/dist/forms/textAlign.js +1 -1
  240. package/dist/forms/useFileIntake.js +1 -1
  241. package/dist/icons/index.js +1 -1
  242. package/dist/index.js +523 -523
  243. package/dist/locales/zh-Hans.js +1 -1
  244. package/dist/map/index.js +3 -3
  245. package/dist/markdown/index.js +1 -1
  246. package/dist/page-tabs/index.js +5 -5
  247. package/dist/pdf/index.js +1 -1
  248. package/dist/shell/Accordion.js +1 -1
  249. package/dist/shell/AppUpdateBanner.js +1 -1
  250. package/dist/shell/Avatar.js +1 -1
  251. package/dist/shell/Banner.js +1 -1
  252. package/dist/shell/Breadcrumbs.js +1 -1
  253. package/dist/shell/BudgetBar.js +1 -1
  254. package/dist/shell/Card.js +1 -1
  255. package/dist/shell/ColoredBadge.js +1 -1
  256. package/dist/shell/ConfirmDialog.js +1 -1
  257. package/dist/shell/ContainerFillChart.js +1 -1
  258. package/dist/shell/ContextMenu.js +1 -1
  259. package/dist/shell/CountBadge.js +1 -1
  260. package/dist/shell/Dialog.js +1 -1
  261. package/dist/shell/Drawer.js +1 -1
  262. package/dist/shell/DropdownMenu.js +1 -1
  263. package/dist/shell/EditableGrid.js +1 -1
  264. package/dist/shell/EmptyState.js +1 -1
  265. package/dist/shell/GlobalSearch.js +1 -1
  266. package/dist/shell/HelpCenter.js +1 -1
  267. package/dist/shell/IconRail.js +1 -1
  268. package/dist/shell/ImageLightbox.js +1 -1
  269. package/dist/shell/ItemCount.js +1 -1
  270. package/dist/shell/LanguageSelect.js +1 -1
  271. package/dist/shell/Markdown.js +1 -1
  272. package/dist/shell/MetricBar.js +1 -1
  273. package/dist/shell/MetricBarLegend.js +1 -1
  274. package/dist/shell/MilestoneTimeline.js +1 -1
  275. package/dist/shell/PageHeader.js +1 -1
  276. package/dist/shell/PopupMenu.js +1 -1
  277. package/dist/shell/ProductionTimeline.js +1 -1
  278. package/dist/shell/ResizeHandle.js +1 -1
  279. package/dist/shell/Result.js +1 -1
  280. package/dist/shell/SearchableSelect.js +1 -1
  281. package/dist/shell/SettingReset.js +1 -1
  282. package/dist/shell/SettingRow.js +1 -1
  283. package/dist/shell/SidebarLayout.js +1 -1
  284. package/dist/shell/SidebarNav.js +1 -1
  285. package/dist/shell/SortableList.js +1 -1
  286. package/dist/shell/Statistic.js +1 -1
  287. package/dist/shell/StepChain.js +1 -1
  288. package/dist/shell/Stepper.js +1 -1
  289. package/dist/shell/TimeAgo.js +1 -1
  290. package/dist/shell/TimelineTrack.js +1 -1
  291. package/dist/shell/TopNav.js +1 -1
  292. package/dist/shell/TransferProgress.js +1 -1
  293. package/dist/shell/Tree.js +1 -1
  294. package/dist/shell/discardGuard.js +1 -1
  295. package/dist/shell/language.js +1 -1
  296. package/dist/shell/strings.d.ts +0 -265
  297. package/dist/shell/strings.js +1 -1
  298. package/dist/shell/toast.js +1 -1
  299. package/dist/shell.css +1 -12
  300. package/dist/telemetry/index.js +1 -1
  301. package/dist/templates/AuthScreen.js +1 -1
  302. package/dist/templates/ChatTemplate.js +1 -1
  303. package/dist/templates/CheckoutTemplate.js +1 -1
  304. package/dist/templates/DashboardTemplate.js +1 -1
  305. package/dist/templates/DataTablePage.js +1 -1
  306. package/dist/templates/EmailTemplate.js +1 -1
  307. package/dist/templates/ErrorBoundary.js +1 -1
  308. package/dist/templates/ErrorPage.js +1 -1
  309. package/dist/templates/FormLayoutPage.js +1 -1
  310. package/dist/templates/GalleryTemplate.js +1 -1
  311. package/dist/ui/index.js +1 -1
  312. package/dist/version.js +1 -1
  313. package/package.json +3 -8
  314. package/dist/Calculator-XUV5JV3O.js +0 -29
  315. package/dist/Documents-IRPS3N5T.js +0 -84
  316. package/dist/Files-VN2IOPHX.js +0 -88
  317. package/dist/PdfViewer-M4RTCNNE.js +0 -1
  318. package/dist/Sidebar-OZMJNAXN.js +0 -44
  319. package/dist/Spreadsheet-YQOVGIU7.js +0 -75
  320. package/dist/chunk-2E3K4FSQ.js +0 -13
  321. package/dist/chunk-2NRNKF46.js +0 -9
  322. package/dist/chunk-2XOH3NJZ.js +0 -27
  323. package/dist/chunk-5W3U3EVG.js +0 -7
  324. package/dist/chunk-5YP7MFPK.js +0 -1
  325. package/dist/chunk-7TVGP2SX.js +0 -8
  326. package/dist/chunk-AD27M3ZH.js +0 -9
  327. package/dist/chunk-CGA6RTVI.js +0 -9
  328. package/dist/chunk-EBGOENC3.js +0 -3
  329. package/dist/chunk-ES2LUEPN.js +0 -22
  330. package/dist/chunk-FZWSP7KJ.js +0 -28
  331. package/dist/chunk-IKKR2TYY.js +0 -9
  332. package/dist/chunk-KU4IWX6F.js +0 -2
  333. package/dist/chunk-L74WV4RJ.js +0 -6
  334. package/dist/chunk-MD6EPKOR.js +0 -11
  335. package/dist/chunk-MFP5KOQW.js +0 -9
  336. package/dist/chunk-Q7UTGO73.js +0 -11
  337. package/dist/chunk-QDL2FNP7.js +0 -8
  338. package/dist/chunk-R7KRBKFH.js +0 -5
  339. package/dist/chunk-UBQUXUD2.js +0 -7
  340. package/dist/chunk-UZTKBA7Z.js +0 -13
  341. package/dist/chunk-VTVSMRFX.js +0 -1
  342. package/dist/chunk-YXSGMPNW.js +0 -1
@@ -1,16 +1,16 @@
1
- import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-7V32O5NF.js";import{TH_ONE_LINE as n}from"./chunk-WGLHB6WE.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{glassStyle as s}from"./chunk-5FYDNH4Y.js";import{useShellStrings as i}from"./chunk-5YP7MFPK.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),S=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:C,allColumns:_,onResizeStart:z,onDragStart:P,onDragOver:$,onDrop:L,onDragEnd:W,toggleColumn:B,resetColumns:E,draggedIdx:F,dropGap:I}=t(f,S),{hasAnyPerm:K}=r(),R=i().columns,[T,Y]=c(!1),[A,G]=c(!1),[O,U]=c(!1),H=m(null),J=k.length>0&&K(k);e(H,h(()=>{T&&Y(!1)},[T]));const M=C.reduce((e,t)=>e+t.width,0),Q=C.map(e=>`${e.width}px`),V={tableLayout:"fixed",width:M,minWidth:"100%"},X=m(null),Z=h(e=>{const t=X.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),q=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
1
+ import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as n}from"./chunk-WGLHB6WE.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{glassStyle as s}from"./chunk-5FYDNH4Y.js";import{useShellStrings as i}from"./chunk-MBY5JIGB.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),S=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:C,allColumns:_,onResizeStart:z,onDragStart:B,onDragOver:$,onDrop:I,onDragEnd:L,toggleColumn:W,resetColumns:E,draggedIdx:G,dropGap:P}=t(f,S),{hasAnyPerm:R}=r(),T=i().columns,[U,Y]=c(!1),[A,J]=c(!1),[K,O]=c(!1),X=m(null),F=k.length>0&&R(k);e(X,h(()=>{U&&Y(!1)},[U]));const H=C.reduce((e,t)=>e+t.width,0),M=C.map(e=>`${e.width}px`),Q={tableLayout:"fixed",width:H,minWidth:"100%"},V=m(null),Z=h(e=>{const t=V.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),q=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
2
2
  return u("div",{className:"flex flex-col flex-1 min-h-0 "+(w?"-mx-4":""),children:[
3
- /* @__PURE__ */p("div",{ref:X,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:V,children:[
4
- /* @__PURE__ */p("colgroup",{children:C.map((e,t)=>/* @__PURE__ */p("col",{style:{width:Q[t]}},e.key))}),
3
+ /* @__PURE__ */p("div",{ref:V,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:Q,children:[
4
+ /* @__PURE__ */p("colgroup",{children:C.map((e,t)=>/* @__PURE__ */p("col",{style:{width:M[t]}},e.key))}),
5
5
  /* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:C.map((e,t)=>{const r=g.find(t=>t.key===e.key),o=r?.sortField??("_select"!==e.key?e.key:void 0),l=x&&o&&x.field===o,a="_select"===e.key;/* @__PURE__ */
6
- return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${F===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>P(t),onDragOver:a?void 0:e=>$(t,e),onDrop:a?void 0:e=>L(t,e),onDragEnd:a?void 0:W,style:a?void 0:{cursor:"grab"},children:[
7
- /* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),I===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===C.length-1&&I===C.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
6
+ return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${G===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>B(t),onDragOver:a?void 0:e=>$(t,e),onDrop:a?void 0:e=>I(t,e),onDragEnd:a?void 0:L,style:a?void 0:{cursor:"grab"},children:[
7
+ /* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),P===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===C.length-1&&P===C.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
8
8
  /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto overflow-x-auto min-h-0",onScroll:Z,children:[
9
- /* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:V,children:[
10
- /* @__PURE__ */p("colgroup",{children:C.map((e,t)=>/* @__PURE__ */p("col",{style:{width:Q[t]}},e.key))}),N(C)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
9
+ /* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:Q,children:[
10
+ /* @__PURE__ */p("colgroup",{children:C.map((e,t)=>/* @__PURE__ */p("col",{style:{width:M[t]}},e.key))}),N(C)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
11
11
  /* @__PURE__ */p("span",{children:b}),
12
- /* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:H,children:[w&&q&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?R.hideSelection:R.showSelection,children:D?R.selectDone:R.select}),
13
- /* @__PURE__ */p("button",{onClick:E,className:"text-2xs text-ink-faintest hover:text-gray-600",children:R.reset}),
14
- /* @__PURE__ */p("button",{onClick:()=>Y(!T),className:"text-gray-400 hover:text-gray-600",title:R.choose,children:/* @__PURE__ */p(l,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),T&&/* @__PURE__ */u("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:s(),children:[
15
- /* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:R.heading}),_.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */u("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
16
- /* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>B(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),J&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{G(!0);const e=_.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),U(!0),setTimeout(()=>U(!1),2e3)}catch{}G(!1)},disabled:A,className:"text-2xs w-full text-center py-1 rounded "+(O?"text-green-600":"text-ink-faint hover:text-blue-600"),children:A?"...":O?R.savedDefault:R.saveDefault})})]})]})]})]})}export{f as ResizableTable};
12
+ /* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:X,children:[w&&q&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?T.hideSelection:T.showSelection,children:D?T.selectDone:T.select}),
13
+ /* @__PURE__ */p("button",{onClick:E,className:"text-2xs text-ink-faintest hover:text-gray-600",children:T.reset}),
14
+ /* @__PURE__ */p("button",{onClick:()=>Y(!U),className:"text-gray-400 hover:text-gray-600",title:T.choose,children:/* @__PURE__ */p(l,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),U&&/* @__PURE__ */u("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:s(),children:[
15
+ /* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:T.heading}),_.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */u("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
16
+ /* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>W(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),F&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{J(!0);const e=_.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),O(!0),setTimeout(()=>O(!1),2e3)}catch{}J(!1)},disabled:A,className:"text-2xs w-full text-center py-1 rounded "+(K?"text-green-600":"text-ink-faint hover:text-blue-600"),children:A?"...":K?T.savedDefault:T.saveDefault})})]})]})]})]})}export{f as ResizableTable};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-WEEQDPU3.js";import{Select_default as a}from"./chunk-SPMD7UZO.js";import{Pagination as r}from"./chunk-225LCPO7.js";import{Input_default as t}from"./chunk-GS74BABV.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{Icon as c}from"./chunk-7V32O5NF.js";import{TH_ONE_LINE as m}from"./chunk-WGLHB6WE.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-NPTHHWXZ.js";import{Select_default as a}from"./chunk-A34PD3XT.js";import{Pagination as r}from"./chunk-4MERJIJJ.js";import{Input_default as t}from"./chunk-HNUKXGYP.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-FZM3ZPW3.js";import{Button_default as l}from"./chunk-EOVXFXVV.js";import{Icon as c}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as m}from"./chunk-WGLHB6WE.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
2
2
  return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
@@ -1,4 +1,4 @@
1
- import{AccessibleTable as e}from"./chunk-5PP435FL.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-36VIGB6J.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-5YP7MFPK.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[P,w]=u(null),{highlighted:F}=r(),L=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",L),0===L.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const C=Math.max(...L.map(e=>e.depth))+1,E=f/2,I=f/2,z=(f/2-8-b)/C,A=L.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),B=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,K=e=>null!==P?e.id===P:null===F||e.branchKey===F,R=P?L.find(e=>e.id===P):void 0,V=e=>c(e.value/A*100,1,$);/* @__PURE__ */
1
+ import{AccessibleTable as e}from"./chunk-5PP435FL.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-36VIGB6J.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-MBY5JIGB.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[w,B]=u(null),{highlighted:I}=r(),L=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",L),0===L.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const C=Math.max(...L.map(e=>e.depth))+1,E=f/2,F=f/2,P=(f/2-8-b)/C,z=L.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),A=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,G=e=>null!==w?e.id===w:null===I||e.branchKey===I,R=w?L.find(e=>e.id===w):void 0,V=e=>c(e.value/z*100,1,$);/* @__PURE__ */
2
2
  return d("div",{className:`relative ${g??""}`,children:[
3
- /* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(A),C),onMouseLeave:()=>w(null),children:[L.map(e=>/* @__PURE__ */s("path",{d:t(E,I,b+e.depth*z+v/2,b+(e.depth+1)*z-v/2,e.start,e.end),fill:B(e),fillOpacity:K(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>w(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:E,y:I+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),R&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:R.label,rows:[{key:"value",label:M.value,color:B(R),value:j(R.value)},{key:"share",label:M.share,color:a.muted,value:V(R)}]})}),
4
- /* @__PURE__ */s(e,{caption:M.sunburst(j(A),C),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:L.map(e=>[e.depth+1,e.label,j(e.value),V(e)])})]})}export{f as SunburstChart};
3
+ /* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(z),C),onMouseLeave:()=>B(null),children:[L.map(e=>/* @__PURE__ */s("path",{d:t(E,F,b+e.depth*P+v/2,b+(e.depth+1)*P-v/2,e.start,e.end),fill:A(e),fillOpacity:G(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>B(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:E,y:F+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),R&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:R.label,rows:[{key:"value",label:M.value,color:A(R),value:j(R.value)},{key:"share",label:M.share,color:a.muted,value:V(R)}]})}),
4
+ /* @__PURE__ */s(e,{caption:M.sunburst(j(z),C),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:L.map(e=>[e.depth+1,e.label,j(e.value),V(e)])})]})}export{f as SunburstChart};
@@ -1,5 +1,5 @@
1
- import{ChartTooltip as t}from"./chunk-36VIGB6J.js";import{CartesianPlot as a}from"./chunk-QDL2FNP7.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-5YP7MFPK.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let k=0;const M=c.map(t=>{if(t.total){const a={from:0,to:k,value:k,total:!0};return{...t,...a}}const a=k;return k+=t.value,{...t,from:a,to:k,value:t.value,total:!1}}),j=M.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
2
- return i(a,{labels:c.map(t=>t.label),values:j,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(M[0]?.from??0),y(k)),tooltip:a=>{const e=M[a],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
1
+ import{ChartTooltip as t}from"./chunk-36VIGB6J.js";import{CartesianPlot as a}from"./chunk-N7LDQZTL.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-MBY5JIGB.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let k=0;const M=c.map(t=>{if(t.total){const a={from:0,to:k,value:k,total:!0};return{...t,...a}}const a=k;return k+=t.value,{...t,from:a,to:k,value:t.value,total:!1}}),L=M.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
2
+ return i(a,{labels:c.map(t=>t.label),values:L,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(M[0]?.from??0),y(k)),tooltip:a=>{const e=M[a],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
3
3
  return i(t,{title:e?.label,rows:[{key:"step",color:o,label:e?.total?v.balance:e.value>=0?v.increase:v.decrease,value:e?.total?y(e.to):`${e.value>=0?"+":"−"}${y(Math.abs(e.value))}`},...e?.total?[]:[{key:"running",label:v.runningTotal,color:l.neutral,value:y(e.to)}]]})},children:({x:t,y:a,active:o})=>/* @__PURE__ */s("g",{children:[g&&M.slice(0,-1).map((l,o)=>
4
4
  /* @__PURE__ */i("line",{x1:t.end(o),y1:a(l.to),x2:t(o+1),y2:a(l.to),stroke:e.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${o}`)),M.map((e,r)=>{const n=e.total?l.neutral:e.value>=0?l.good:l.critical,s=Math.min(a(e.from),a(e.to)),c=Math.max(1,Math.abs(a(e.to)-a(e.from)));/* @__PURE__ */
5
5
  return i("rect",{x:t(r),y:s,width:Math.max(1,t.bandwidth),height:c,rx:b,fill:n,fillOpacity:null===o||o===r?1:.45},r)})]})})}export{c as WaterfallChart};
@@ -0,0 +1,2 @@
1
+ import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-PLDMQNKD.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-7TC3LJQM.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-MBY5JIGB.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:M}){const b=l(Date.now,null),j=[],C=[],x=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const L=i(g??null);let N,w,H=!0;0===j.length?(w=L??b??0,N=w-30*a,H=null!==L||null!==b):(N=j[0].ms,w=L??j[j.length-1].ms,w-N<a&&(w=N+a));const J=j.length>0?Math.max(0,Math.round((w-N)/a)):0,K=u??(J>0?x.duration(J):void 0),O=[j.length>0?x.started(t(j[0].ms,D)):void 0,K,C.length>0?x.reached(j.length,p.length):void 0],B=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),Q={};for(const e of j)e.phase&&(Q[e.phase]=Q[e.phase]||[]).push(e.ms);const T=Object.entries(Q).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),G="rail"===v,I=H&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:G?"spread":"compressed",labels:G?"none":"lanes",items:B,pending:C,phases:T,startMs:N,endMs:w,todayMs:b??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:M,ariaLabel:x.milestones(m)})});/* @__PURE__ */
2
+ return h("div",G?{className:"shrink-0","data-timeline-variant":"rail",children:I}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:O,children:I})})}export{m as MilestoneTimeline};
@@ -1,15 +1,15 @@
1
- import{AccessibleTable as e}from"./chunk-5PP435FL.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-36VIGB6J.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-5YP7MFPK.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:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:F}){const C=m().charts,W=c(),w=N??(e=>h(e,W)),L=F??C.nothingToCompare,P=p(),[R,A]=u(null),{highlighted:Y}=a(),z=x;if(k.length<3||0===z.length)/* @__PURE__ */
2
- return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:L});const B=y/2,E=y/2,T=y/2-46,U=n(k.length),V=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...z.map(e=>e.values[t]??0).filter(Number.isFinite))),H=(e,t)=>{const r=Math.max(0,Math.min(1,t/V[e])),l=U.center(e)-U.step/2;return[B+T*r*Math.cos(l),E+T*r*Math.sin(l)]},J=(e,t)=>null!==R?R!==e:null!==Y&&Y!==t,O=null!==R?z[R]:void 0;/* @__PURE__ */
1
+ import{AccessibleTable as e}from"./chunk-5PP435FL.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-36VIGB6J.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-MBY5JIGB.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:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:C}){const F=m().charts,W=c(),w=N??(e=>h(e,W)),B=C??F.nothingToCompare,L=p(),[R,A]=u(null),{highlighted:Y}=a(),z=x;if(k.length<3||0===z.length)/* @__PURE__ */
2
+ return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:B});const E=y/2,J=y/2,P=y/2-46,T=n(k.length),U=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...z.map(e=>e.values[t]??0).filter(Number.isFinite))),V=(e,t)=>{const r=Math.max(0,Math.min(1,t/U[e])),l=T.center(e)-T.step/2;return[E+P*r*Math.cos(l),J+P*r*Math.sin(l)]},G=(e,t)=>null!==R?R!==e:null!==Y&&Y!==t,H=null!==R?z[R]:void 0;/* @__PURE__ */
3
3
  return f("div",{className:`relative ${$??""}`,children:[
4
- /* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":P,onMouseLeave:()=>A(null),children:[
5
- /* @__PURE__ */d("title",{id:P,children:C.acrossMeasures(z.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=T*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:B,cy:E,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(B,E,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=H(t,V[t]);/* @__PURE__ */
4
+ /* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":L,onMouseLeave:()=>A(null),children:[
5
+ /* @__PURE__ */d("title",{id:L,children:F.acrossMeasures(z.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=P*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:E,cy:J,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(E,J,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=V(t,U[t]);/* @__PURE__ */
6
6
  return f("g",{children:[
7
- /* @__PURE__ */d("line",{x1:B,y1:E,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
8
- /* @__PURE__ */d("text",{x:B+(T+18)*Math.cos(U.center(t)-U.step/2),y:E+(T+18)*Math.sin(U.center(t)-U.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
9
- /* @__PURE__ */d(r,{id:P,reveal:!!j&&"center-out"}),z.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>H(r,e.values[r]??0));/* @__PURE__ */
10
- return f("g",{opacity:J(t,e.key)?.3:1,onMouseEnter:()=>A(t),mask:j?`url(#${l(P)})`: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(R,3,O.color,O.tone),value:w(O.values[t]??0)}))})}),
7
+ /* @__PURE__ */d("line",{x1:E,y1:J,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
8
+ /* @__PURE__ */d("text",{x:E+(P+18)*Math.cos(T.center(t)-T.step/2),y:J+(P+18)*Math.sin(T.center(t)-T.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
9
+ /* @__PURE__ */d(r,{id:L,reveal:!!j&&"center-out"}),z.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>V(r,e.values[r]??0));/* @__PURE__ */
10
+ return f("g",{opacity:G(t,e.key)?.3:1,onMouseEnter:()=>A(t),mask:j?`url(#${l(L)})`: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)})]}),H&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:H.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(R,3,H.color,H.tone),value:w(H.values[t]??0)}))})}),
12
12
  /* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:z.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
13
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
14
  /* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
15
- /* @__PURE__ */d(e,{caption:C.acrossMeasures(z.map(e=>e.label),k.length),head:[C.tableSeries,...k.map(e=>e.label)],rows:z.map(e=>[e.label,...k.map((t,r)=>w(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
15
+ /* @__PURE__ */d(e,{caption:F.acrossMeasures(z.map(e=>e.label),k.length),head:[F.tableSeries,...k.map(e=>e.label)],rows:z.map(e=>[e.label,...k.map((t,r)=>w(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
@@ -1,15 +1,15 @@
1
- import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-HDABS36W.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-7V32O5NF.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-5YP7MFPK.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const x=t.map(e=>a(e.date)).filter(e=>null!=e),S=l(Date.now,null)??Math.max(0,...x,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),P=x.length?Math.min(...x):S,C=x.length?Math.max(...x):S,D=a(r??null)??P,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),T=(()=>{const e=[R,C,q,D+i];return O||e.push(S),Math.max(...e)})(),A=Math.max(1,Math.round((T-D)/i)),L=a(p??null)??C??D,I=Math.min(Math.max(y??L,D),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=I})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>I){$=t[e];break}}const F=(()=>{if(j||!$||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(D).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),z=j??F,B=j?a(j.date):F?D:null,H=$?a($.date):null,J=!!(z&&$&&null!=B&&null!=H&&I>B&&I<H);let K,E;if(J&&null!=B&&null!=H){const e=(I-B)/Math.max(H-B,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of z?.items??[])r[e.part_number]=e;const n={};for(const e of $?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(z?.est_completion_date),s=a($?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):z?.est_completion_date||$?.est_completion_date||null,K={id:`interp-${I}`,progress_number:_.estimated,date:new Date(I).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},E=z}else if(K=z??t[t.length-1]??null,K){const e=t.findIndex(e=>e.id===K.id);E=e>=0&&e<t.length-1?t[e+1]:null}else E=null;const G={};for(const e of E?.items??[])G[e.part_number]=e;const Q=!(!d||K?.id===d),V=d?Math.min(a(p??null)??T,T):T,W=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:D,endMs:T,totalLeadDays:A,scrubMs:I,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:Q,beforeAnchor:z,nextAfter:$,displayed:K,prevReport:E,prevByPN:G,isInterpolated:J,playing:v,startPlay:()=>{if(v)return void N();if(V<=D)return void f(V);M(!0),f(D);let e=performance.now(),t=D;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=V)return f(V),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:W,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),x=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),S=new Map(N.map(({report:e,ms:t})=>[e.id,t])),P=N.map(({ms:e})=>e),C=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
2
- return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:x,markers:C,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=S.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:P,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:x,variant:S="card",onPlayStart:P}){const{reports:C,markers:D,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:A,setScrubMs:L,displayed:I,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:z,estCompletionMs:B}=n,H=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(C.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),L,P),J=c().production,K=d(),E=_??J.heading,G=e=>o(e,K);if(0===C.length&&0===D.length)return null;const Q=D.filter(e=>"shipment"===e.kind),V=D.filter(e=>"inspection"===e.kind),W=D.filter(e=>"invoice"===e.kind),Y=(I?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),Z=I?v(I):0,U=C.find(e=>e.id===F),X=U?N(U):z,ee=
3
- /* @__PURE__ */h("button",{type:"button",onClick:H.toggle,"aria-pressed":H.playing,title:H.playing?J.pause:J.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[H.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
- /* @__PURE__ */b("span",{children:H.playing?J.pause:J.play})]}),te=j&&(x??X)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{H.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??J.backTo(String(X))}):null,[re,ne]=p(J.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:I?/* @__PURE__ */h(y,{children:[e&&re,
5
- /* @__PURE__ */b("b",{className:"font-medium",children:N(I)}),e&&ne,
6
- /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",G(new Date(I.date).getTime())," · ",J.overall(Math.round(Z))," · ",J.inStock(Y)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:J.noReport})});if("rail"===S){const e=null!=B&&B>=q&&q>O,t=e?{key:"__estimate__",label:J.estimatedCompletion,dateText:G(B)}:null;/* @__PURE__ */
1
+ import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-PLDMQNKD.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-2UO47XB4.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-MBY5JIGB.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const x=t.map(e=>a(e.date)).filter(e=>null!=e),S=l(Date.now,null)??Math.max(0,...x,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),D=x.length?Math.min(...x):S,P=x.length?Math.max(...x):S,C=a(r??null)??D,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),T=(()=>{const e=[R,P,q,C+i];return O||e.push(S),Math.max(...e)})(),L=Math.max(1,Math.round((T-C)/i)),I=a(p??null)??P??C,A=Math.min(Math.max(y??I,C),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=A})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>A){$=t[e];break}}const F=(()=>{if(j||!$||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(C).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),B=j??F,J=j?a(j.date):F?C:null,z=$?a($.date):null,G=!!(B&&$&&null!=J&&null!=z&&A>J&&A<z);let K,Q;if(G&&null!=J&&null!=z){const e=(A-J)/Math.max(z-J,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of B?.items??[])r[e.part_number]=e;const n={};for(const e of $?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(B?.est_completion_date),s=a($?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):B?.est_completion_date||$?.est_completion_date||null,K={id:`interp-${A}`,progress_number:_.estimated,date:new Date(A).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},Q=B}else if(K=B??t[t.length-1]??null,K){const e=t.findIndex(e=>e.id===K.id);Q=e>=0&&e<t.length-1?t[e+1]:null}else Q=null;const E={};for(const e of Q?.items??[])E[e.part_number]=e;const H=!(!d||K?.id===d),U=d?Math.min(a(p??null)??T,T):T,X=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:C,endMs:T,totalLeadDays:L,scrubMs:A,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:H,beforeAnchor:B,nextAfter:$,displayed:K,prevReport:Q,prevByPN:E,isInterpolated:G,playing:v,startPlay:()=>{if(v)return void N();if(U<=C)return void f(U);M(!0),f(C);let e=performance.now(),t=C;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=U)return f(U),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:X,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),x=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),S=new Map(N.map(({report:e,ms:t})=>[e.id,t])),D=N.map(({ms:e})=>e),P=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
2
+ return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:x,markers:P,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=S.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:D,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:x,variant:S="card",onPlayStart:D}){const{reports:P,markers:C,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:L,setScrubMs:I,displayed:A,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:B,estCompletionMs:J}=n,z=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(P.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),I,D),G=c().production,K=d(),Q=_??G.heading,E=e=>o(e,K);if(0===P.length&&0===C.length)return null;const H=C.filter(e=>"shipment"===e.kind),U=C.filter(e=>"inspection"===e.kind),X=C.filter(e=>"invoice"===e.kind),Y=(A?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),Z=A?v(A):0,V=P.find(e=>e.id===F),W=V?N(V):B,ee=
3
+ /* @__PURE__ */h("button",{type:"button",onClick:z.toggle,"aria-pressed":z.playing,title:z.playing?G.pause:G.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[z.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
+ /* @__PURE__ */b("span",{children:z.playing?G.pause:G.play})]}),te=j&&(x??W)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{z.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??G.backTo(String(W))}):null,[re,ne]=p(G.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:A?/* @__PURE__ */h(y,{children:[e&&re,
5
+ /* @__PURE__ */b("b",{className:"font-medium",children:N(A)}),e&&ne,
6
+ /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",E(new Date(A.date).getTime())," · ",G.overall(Math.round(Z))," · ",G.inStock(Y)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:G.noReport})});if("rail"===S){const e=null!=J&&J>=q&&q>O,t=e?{key:"__estimate__",label:G.estimatedCompletion,dateText:E(J)}:null;/* @__PURE__ */
7
7
  return h("div",{className:"shrink-0","data-timeline-variant":"rail",children:[
8
- /* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:C,markers:D,valueMs:A,activeId:I?.id??"",onChange:L,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??J.start,end:M?.end??(e?J.estDone:void 0)},onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>L(t),onProgress:f,onStop:H.stop}}),
8
+ /* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:P,markers:C,valueMs:L,activeId:A?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??G.start,end:M?.end??(e?G.estDone:void 0)},onDragStart:z.stop,playback:{playing:z.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:z.stop}}),
9
9
  /* @__PURE__ */h("div",{className:"rosh-tl-railrow","data-timeline-part":"rail-row",children:[ee,te,ae(!1)]})]})}/* @__PURE__ */
10
- return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:E,subject:R,meta:[`${G(O)} → ${G(q)}`,J.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
11
- /* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[C.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
12
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),J.report]}),Q.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
13
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),J.shipment]}),V.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
14
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),J.inspection]}),W.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
15
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),J.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:C,markers:D,valueMs:A,activeId:I?.id??"",onChange:L,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>L(t),onProgress:f,onStop:H.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
10
+ return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:Q,subject:R,meta:[`${E(O)} → ${E(q)}`,G.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
11
+ /* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[P.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
12
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),G.report]}),H.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
13
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),G.shipment]}),U.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
14
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),G.inspection]}),X.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
15
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),G.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:P,markers:C,valueMs:L,activeId:A?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:z.stop,playback:{playing:z.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:z.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
@@ -1,4 +1,4 @@
1
- import{useShellLanguage as e}from"./chunk-UVMM7AYO.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-SPMD7UZO.js";import{Icon as t}from"./chunk-7V32O5NF.js";import{useShellStrings as l}from"./chunk-5YP7MFPK.js";import{jsxs as s,jsx as i}from"react/jsx-runtime";function r(e){const a=Math.max(0,...e.map(e=>[...e].reduce((e,a)=>e+((a.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(a+3.5))/10}function m({size:a="sm",className:m=""}){const{language:o,languages:c,setLanguage:g}=e(),u=l().language;return c.length<2?null:/* @__PURE__ */s("span",{className:`inline-flex items-center gap-2 text-ink-faint ${m}`.trim(),children:[
1
+ import{useShellLanguage as e}from"./chunk-S262RGL6.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-A34PD3XT.js";import{Icon as t}from"./chunk-2UO47XB4.js";import{useShellStrings as l}from"./chunk-MBY5JIGB.js";import{jsxs as s,jsx as i}from"react/jsx-runtime";function r(e){const a=Math.max(0,...e.map(e=>[...e].reduce((e,a)=>e+((a.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(a+3.5))/10}function m({size:a="sm",className:m=""}){const{language:o,languages:c,setLanguage:g}=e(),u=l().language;return c.length<2?null:/* @__PURE__ */s("span",{className:`inline-flex items-center gap-2 text-ink-faint ${m}`.trim(),children:[
2
2
  /* @__PURE__ */i(t,{name:"globe","aria-hidden":!0,className:"h-4 w-4 shrink-0"}),
3
3
  /* @__PURE__ */i("span",{className:"block",style:{width:`${r(c.map(e=>e.name))}em`},children:/* @__PURE__ */i(n,{size:a,touchSize:a,"aria-label":u.title,value:o,onChange:e=>{g(e)},options:c.map(({tag:e,name:a})=>({value:e,label:a,lang:e}))})})]})}function o({description:n,className:t=""}){const{language:r,languages:m,setLanguage:o}=e(),c=l().language;return m.length<2?null:/* @__PURE__ */s("div",{className:`space-y-4 ${t}`.trim(),children:[
4
4
  /* @__PURE__ */s("div",{children:[
@@ -1,4 +1,4 @@
1
- import{isSafeLinkHref as e}from"./chunk-Q5Z3KHT2.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{Icon as n}from"./chunk-7V32O5NF.js";import{useShellStrings as r}from"./chunk-5YP7MFPK.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
1
+ import{isSafeLinkHref as e}from"./chunk-Q5Z3KHT2.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as r}from"./chunk-MBY5JIGB.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
2
2
  return a("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",onClick:l&&r?e=>{(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&r(l)&&e.preventDefault()}:void 0,children:n})}function u(e){const t=[];let n,r=0,l=0;const s=new RegExp(c.source,"g");for(;null!==(n=s.exec(e));)n.index>r&&t.push(e.slice(r,n.index)),void 0!==n[1]?t.push(
3
3
  /* @__PURE__ */i("span",{className:"text-gray-400",children:["[",n[1],"]"]},l++)):void 0!==n[3]?t.push(
4
4
  /* @__PURE__ */a(d,{href:n[4],children:n[3]},l++)):void 0!==n[5]?t.push(
@@ -1,11 +1,11 @@
1
- import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-5YP7MFPK.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
2
- return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const j=r().meter,B=s(),F=w??j.noData,P=null!=p&&Number.isFinite(p)?p:null,A=Number.isFinite(f)&&f>0?f:null;null==A&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const C=e(v,"MetricBar"),D=null!=P?C??t(l(P,g,b)):null,E=n(g),G=n(b),L=null!=P&&null!=A?x(P/A*100):0,R=null!=P?(y??(a=>100===A?u(a,1,B):m(a,B)))(P):"—",S=null!=P&&null!=A&&(null!=E||null!=G),z="md"===k||"lg"===k,H=z?"h-2":"h-1.5",K=null!=P&&null!=A,O=/* @__PURE__ */c("div",{...K?{role:"meter","aria-label":$??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":A,"aria-valuenow":Math.min(A,Math.max(0,P)),"aria-valuetext":R}:{"aria-hidden":!0},className:K&&D?`relative mt-2 ${H} rounded-full bg-gray-200`:`relative mt-2 ${H} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[K&&
3
- /* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${D?D.fill:"bg-gray-400"}`,style:{width:`${L}%`}}),S&&null!=A&&null!=E&&/* @__PURE__ */o(d,{at:x(E/A*100),title:j.warningAt(E),className:i.warning}),S&&null!=A&&null!=G&&/* @__PURE__ */o(d,{at:x(G/A*100),title:j.criticalAt(G),className:i.critical})]}),Q=D?D.ink:null!=P?"text-gray-900":"text-gray-400";if(z){const a="lg"===k;/* @__PURE__ */
1
+ import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-MBY5JIGB.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
2
+ return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const B=r().meter,j=s(),A=w??B.noData,F=null!=p&&Number.isFinite(p)?p:null,G=Number.isFinite(f)&&f>0?f:null;null==G&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const C=e(v,"MetricBar"),D=null!=F?C??t(l(F,g,b)):null,E=n(g),L=n(b),P=null!=F&&null!=G?x(F/G*100):0,R=null!=F?(y??(a=>100===G?u(a,1,j):m(a,j)))(F):"—",S=null!=F&&null!=G&&(null!=E||null!=L),z="md"===k||"lg"===k,H=z?"h-2":"h-1.5",I=null!=F&&null!=G,J=/* @__PURE__ */c("div",{...I?{role:"meter","aria-label":$??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":G,"aria-valuenow":Math.min(G,Math.max(0,F)),"aria-valuetext":R}:{"aria-hidden":!0},className:I&&D?`relative mt-2 ${H} rounded-full bg-gray-200`:`relative mt-2 ${H} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[I&&
3
+ /* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${D?D.fill:"bg-gray-400"}`,style:{width:`${P}%`}}),S&&null!=G&&null!=E&&/* @__PURE__ */o(d,{at:x(E/G*100),title:B.warningAt(E),className:i.warning}),S&&null!=G&&null!=L&&/* @__PURE__ */o(d,{at:x(L/G*100),title:B.criticalAt(L),className:i.critical})]}),O=D?D.ink:null!=F?"text-gray-900":"text-gray-400";if(z){const a="lg"===k;/* @__PURE__ */
4
4
  return c("div",{className:M,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
5
5
  /* @__PURE__ */c("div",{className:"mt-1 flex items-baseline gap-2",children:[
6
- /* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${Q}`,children:R}),
7
- /* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=P?N:F})]}),O]})}/* @__PURE__ */
6
+ /* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${O}`,children:R}),
7
+ /* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=F?N:A})]}),J]})}/* @__PURE__ */
8
8
  return c("div",{className:M,children:[
9
9
  /* @__PURE__ */c("div",{className:"flex items-baseline gap-2",children:[null!=h&&/* @__PURE__ */o("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:h}),
10
- /* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${Q}`,children:R}),
11
- /* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=P?N:F})]}),O]})}export{h as MetricBar};
10
+ /* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${O}`,children:R}),
11
+ /* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=F?N:A})]}),J]})}export{h as MetricBar};
@@ -1,2 +1,2 @@
1
- import{Input_default as e}from"./chunk-GS74BABV.js";import{useState as r,useRef as t}from"react";import{jsx as o}from"react/jsx-runtime";function n({value:n,label:a,onDone:u}){const[l,c]=r(n),i=t(!1),p=e=>{i.current||(i.current=!0,u(e))};/* @__PURE__ */
1
+ import{Input_default as e}from"./chunk-HNUKXGYP.js";import{useState as r,useRef as t}from"react";import{jsx as o}from"react/jsx-runtime";function n({value:n,label:a,onDone:u}){const[l,c]=r(n),i=t(!1),p=e=>{i.current||(i.current=!0,u(e))};/* @__PURE__ */
2
2
  return o(e,{size:"sm",autoFocus:!0,"aria-label":a,value:l,onChange:e=>c(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key?(e.preventDefault(),p(l.trim()||n)):"Escape"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(l.trim()||n),onClick:e=>e.stopPropagation()})}export{n as RenameField};
@@ -1,5 +1,5 @@
1
- import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-36VIGB6J.js";import{CartesianPlot as t}from"./chunk-QDL2FNP7.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-5YP7MFPK.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:M,emptyLabel:F,radius:N=3}){const O=o().charts,P=n(),V=w??(e=>h(e,P)),A=v??O.range,C=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),Q=r(0,j,L);/* @__PURE__ */
2
- return s(t,{labels:d,values:C,height:k,width:g,max:b,min:x,formatValue:V,yAxisLabel:y,className:M,emptyLabel:F,bandPadding:"bar"===p?.34:0,ariaLabel:O.rangeLabel(A,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:O.high,color:Q,value:null==u[e]?void 0:V(u[e].high)},{key:"low",label:O.low,color:Q,value:null==u[e]?void 0:V(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:N,fill:Q,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
1
+ import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-36VIGB6J.js";import{CartesianPlot as t}from"./chunk-N7LDQZTL.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-MBY5JIGB.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:L,tone:j,label:v,className:M,emptyLabel:N,radius:O=3}){const V=o().charts,A=n(),B=w??(e=>h(e,A)),C=v??V.range,F=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),Q=r(0,L,j);/* @__PURE__ */
2
+ return s(t,{labels:d,values:F,height:k,width:g,max:b,min:x,formatValue:B,yAxisLabel:y,className:M,emptyLabel:N,bandPadding:"bar"===p?.34:0,ariaLabel:V.rangeLabel(C,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:V.high,color:Q,value:null==u[e]?void 0:B(u[e].high)},{key:"low",label:V.low,color:Q,value:null==u[e]?void 0:B(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:O,fill:Q,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
3
3
  return m(c,{children:[
4
4
  /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:Q,fillOpacity:.2,stroke:"none"}),
5
5
  /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:Q,strokeWidth:2,strokeLinejoin:"round"}),
@@ -1,4 +1,4 @@
1
- import{ChartSkeleton as e}from"./chunk-5KKJAYKT.js";import{ChartHighlightProvider as r,useHighlight as a}from"./chunk-CNYAHYE6.js";import{CHART_INK as t,resolveSeriesColor as s}from"./chunk-TZFACUMR.js";import{useShellStrings as l}from"./chunk-5YP7MFPK.js";import{jsx as n,jsxs as o,Fragment as c}from"react/jsx-runtime";function i({shape:e,colour:r}){const a="shrink-0";switch(e){case"circle":/* @__PURE__ */
1
+ import{ChartSkeleton as e}from"./chunk-QTNMALBN.js";import{ChartHighlightProvider as r,useHighlight as a}from"./chunk-CNYAHYE6.js";import{CHART_INK as t,resolveSeriesColor as s}from"./chunk-TZFACUMR.js";import{useShellStrings as l}from"./chunk-MBY5JIGB.js";import{jsx as n,jsxs as o,Fragment as c}from"react/jsx-runtime";function i({shape:e,colour:r}){const a="shrink-0";switch(e){case"circle":/* @__PURE__ */
2
2
  return n("span",{className:`${a} h-2.5 w-2.5 rounded-full`,style:{backgroundColor:r}});case"circle-outline":/* @__PURE__ */
3
3
  return n("span",{className:`${a} h-2.5 w-2.5 rounded-full border-2`,style:{borderColor:r}});case"rounded-square-outline":/* @__PURE__ */
4
4
  return n("span",{className:`${a} h-2.5 w-2.5 rounded-sm border-2`,style:{borderColor:r}});case"square":/* @__PURE__ */
@@ -8,10 +8,10 @@ return n("span",{className:`${a} h-3.5 w-1 rounded-full`,style:{backgroundColor:
8
8
  return n("span",{className:`${a} h-2.5 w-2.5 rounded-sm`,style:{backgroundColor:r}})}}function d({entries:e,interactive:r,fallbackSwatch:t,onClick:l}){const{highlighted:d,setHighlighted:u}=a();/* @__PURE__ */
9
9
  return n("ul",{className:"m-0 flex flex-wrap items-center gap-x-4 gap-y-1 p-0",children:e.map((e,a)=>{const h=r&&null!==d&&d!==e.key,m=/* @__PURE__ */o(c,{children:[
10
10
  /* @__PURE__ */n(i,{shape:e.swatch??t,colour:s(a,e.color,e.tone)}),e.label]});/* @__PURE__ */
11
- return n("li",{className:"list-none",children:r||l?/* @__PURE__ */n("button",{type:"button",onClick:l?()=>l(e.key):void 0,"aria-pressed":l?Boolean(e.pressed):void 0,onMouseEnter:r?()=>u(e.key):void 0,onMouseLeave:r?()=>u(null):void 0,onFocus:r?()=>u(e.key):void 0,onBlur:r?()=>u(null):void 0,className:"flex items-center gap-2 rounded text-xs text-gray-600 transition-opacity rosh-focus-outline "+(h?"opacity-40":""),children:m}):/* @__PURE__ */n("span",{className:"flex items-center gap-2 text-xs text-gray-600",children:m})},e.key)})})}function u({title:a,subtitle:s,legend:c,table:i,tableLabel:u,busy:h=!1,loading:m=!1,skeletonVariant:p="area",skeletonHeight:b,interactiveLegend:g=!0,legendSwatch:y="rounded-square",onLegendClick:f,actions:k,children:x,className:N}){const w=l().charts;/* @__PURE__ */
12
- return n(r,{children:/* @__PURE__ */o("section",{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-gray-200 bg-white p-5 ${N??""}`,"aria-busy":h||m||void 0,children:[
11
+ return n("li",{className:"list-none",children:r||l?/* @__PURE__ */n("button",{type:"button",onClick:l?()=>l(e.key):void 0,"aria-pressed":l?Boolean(e.pressed):void 0,onMouseEnter:r?()=>u(e.key):void 0,onMouseLeave:r?()=>u(null):void 0,onFocus:r?()=>u(e.key):void 0,onBlur:r?()=>u(null):void 0,className:"flex items-center gap-2 rounded text-xs text-gray-600 transition-opacity rosh-focus-outline "+(h?"opacity-40":""),children:m}):/* @__PURE__ */n("span",{className:"flex items-center gap-2 text-xs text-gray-600",children:m})},e.key)})})}function u({title:a,subtitle:s,legend:c,table:i,tableLabel:u,busy:h=!1,loading:m=!1,skeletonVariant:p="area",skeletonHeight:b,interactiveLegend:g=!0,legendSwatch:y="rounded-square",onLegendClick:f,actions:k,children:N,className:x}){const w=l().charts;/* @__PURE__ */
12
+ return n(r,{children:/* @__PURE__ */o("section",{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-gray-200 bg-white p-5 ${x??""}`,"aria-busy":h||m||void 0,children:[
13
13
  /* @__PURE__ */o("header",{className:"flex items-start justify-between gap-4",children:[
14
14
  /* @__PURE__ */o("div",{className:"min-w-0",children:[
15
- /* @__PURE__ */n("h3",{className:"text-base font-semibold text-ink-strongest",children:a}),s&&/* @__PURE__ */n("p",{className:"mt-0.5 text-sm text-gray-500",children:s})]}),k&&/* @__PURE__ */n("div",{className:"shrink-0",children:k})]}),m?/* @__PURE__ */n(e,{variant:p,height:b}):/* @__PURE__ */n("div",{className:h?"opacity-60 transition-opacity":"transition-opacity",children:x}),!m&&c&&c.length>1&&/* @__PURE__ */n(d,{entries:c,interactive:g,fallbackSwatch:y,onClick:f}),!m&&i&&/* @__PURE__ */o("details",{className:"border-t border-gray-100 pt-3",children:[
15
+ /* @__PURE__ */n("h3",{className:"text-base font-semibold text-ink-strongest",children:a}),s&&/* @__PURE__ */n("p",{className:"mt-0.5 text-sm text-gray-500",children:s})]}),k&&/* @__PURE__ */n("div",{className:"shrink-0",children:k})]}),m?/* @__PURE__ */n(e,{variant:p,height:b}):/* @__PURE__ */n("div",{className:h?"opacity-60 transition-opacity":"transition-opacity",children:N}),!m&&c&&c.length>1&&/* @__PURE__ */n(d,{entries:c,interactive:g,fallbackSwatch:y,onClick:f}),!m&&i&&/* @__PURE__ */o("details",{className:"border-t border-gray-100 pt-3",children:[
16
16
  /* @__PURE__ */n("summary",{className:"cursor-pointer text-sm font-medium text-gray-600 rosh-focus-outline",children:u??w.showTable}),
17
17
  /* @__PURE__ */n("div",{className:"mt-3 overflow-x-auto",style:{color:t.label},children:i})]})]})})}export{u as ChartFrame};
@@ -0,0 +1,13 @@
1
+ import{navIcons as e}from"./chunk-4LXCCZDM.js";import{Icon as t}from"./chunk-2UO47XB4.js";import{isValidElement as r,cloneElement as n}from"react";import{jsx as o,jsxs as i}from"react/jsx-runtime";var l="react-os-shell:spreadsheet-preview-update",a=null,d=0;function s(e){const t=++d,r={token:t,data:e};return a=r,{update(e){a===r&&(r.data=e),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(l,{detail:{token:t,data:e}}))}}}function c(){return a}function f(e){a===e&&(a=null)}var p=["from-blue-500 to-blue-700","from-indigo-500 to-purple-600","from-purple-500 to-pink-600","from-pink-500 to-rose-600","from-red-500 to-rose-600","from-orange-500 to-red-600","from-amber-500 to-orange-600","from-yellow-500 to-amber-500","from-lime-500 to-green-600","from-green-500 to-emerald-600","from-emerald-500 to-teal-600","from-teal-500 to-cyan-600","from-cyan-500 to-sky-600","from-sky-500 to-blue-600","from-violet-500 to-fuchsia-600"];function u(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r);return p[Math.abs(t)%p.length]}var h={order:"text-blue-600",purchase_order:"text-purple-600",invoice:"text-green-600",client:"text-indigo-600",manufacturer:"text-orange-600",shipment:"text-teal-600",part_number:"text-gray-600",project:"text-pink-600",mould:"text-red-600",design:"text-cyan-600",brand:"text-amber-600",price_sheet:"text-emerald-600",folder:"text-yellow-600",page:"text-blue-500"},m={order:"SO",purchase_order:"PO",invoice:"INV",client:"CLI",manufacturer:"MFR",shipment:"DN",part_number:"PN",project:"PRJ",mould:"MLD",design:"DSN",brand:"BRD",price_sheet:"PS",vendor_invoice:"VI",vendor_payment:"VP",warranty_claim:"WC",qc_report:"QC",vendor_shipment:"GRN",bank_account:"BA",wheel_finish:"WF",weight_log:"WL",production_progress:"PP",vendor_price_sheet:"VPS",proposal:"PR",folder:"FLD"},w={pdf:"PDF",dxf:"DXF","3d":"STP",image:"IMG",csv:"CSV"},y={pdf:"text-red-600",dxf:"text-blue-600","3d":"text-purple-600",image:"text-emerald-600",csv:"text-green-600"};function g({className:e}){/* @__PURE__ */
2
+ return o(t,{name:"folder",look:"solid",className:e})}function x(t,r){return r&&e[r]||(t?e[t]:void 0)}var b=/* @__PURE__ */o("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */o("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6z"})});function v({entityType:e,isSelected:t,entityId:l,label:a,fileKind:d}){const s="preview-file"===e&&d,c=s?y[d]:null,f=s?w[d]:null;if("folder"===e)/* @__PURE__ */
3
+ return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o(g,{className:"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]"})});if("page"===e){const e=x(l,a),i=u(l||a||"page");/* @__PURE__ */
4
+ return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o("span",{className:`h-11 w-11 rounded-xl bg-gradient-to-br ${i} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`,children:e&&r(e)?n(e,{className:"h-7 w-7 text-white"}):b})})}/* @__PURE__ */
5
+ return i("div",{className:"w-12 h-12 relative flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:[
6
+ /* @__PURE__ */i("svg",{className:`w-10 h-12 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)] ${c??h[e]??"text-gray-500"}`,viewBox:"0 0 40 48",fill:"none",children:[
7
+ /* @__PURE__ */o("path",{d:"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z",fill:"white",fillOpacity:"0.92"}),
8
+ /* @__PURE__ */o("path",{d:"M26 0l10 10H30a4 4 0 01-4-4V0z",fill:"currentColor",fillOpacity:"0.2"}),
9
+ /* @__PURE__ */o("path",{d:"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.5"})]}),
10
+ /* @__PURE__ */o("span",{className:`absolute inset-0 flex items-center justify-center text-3xs font-bold pt-2 ${c??h[e]??"text-gray-600"}`,children:f??m[e]??e.slice(0,3).toUpperCase()})]})}function _({item:e}){if("folder"===e.entityType)/* @__PURE__ */
11
+ return o(g,{className:"h-4 w-4 shrink-0 text-amber-500"});if("page"===e.entityType){const t=x(e.entityId,e.label);/* @__PURE__ */
12
+ return o("span",{className:`h-4 w-4 rounded bg-gradient-to-br ${u(e.entityId||e.label||"page")} flex items-center justify-center text-white shrink-0`,children:t&&r(t)?n(t,{className:"h-3 w-3 text-white"}):/* @__PURE__ */o("span",{className:"h-1.5 w-1.5 rounded-[2px] border border-white/80"})})}const i=("preview-file"===e.entityType&&e.fileKind?y[e.fileKind]:h[e.entityType])??"text-gray-400";/* @__PURE__ */
13
+ return o(t,{name:"page",className:`h-4 w-4 shrink-0 ${i}`,strokeWidth:1.5})}function k(e){return"preview-file"===e.entityType&&e.fileKind?w[e.fileKind]:"page"===e.entityType?"App":"folder"===e.entityType?"Folder":m[e.entityType]??e.entityType.slice(0,3).toUpperCase()}var N=null,C=/* @__PURE__ */new Set;function j(e){N=e,C.forEach(e=>e())}function I(e){return C.add(e),()=>{C.delete(e)}}function T(){return N}var E="__REACT_OS_SHELL_FILES_VIEW__",P="react-os-shell:files-show-trash",S="react-os-shell:files-open-desktop-folder";function L(){"undefined"!=typeof window&&(window[E]="trash",window.dispatchEvent(new CustomEvent(P)))}function V(e){"undefined"!=typeof window&&(window[E]={view:"desktop-folder",folderId:e},window.dispatchEvent(new CustomEvent(S,{detail:{folderId:e}})))}function M(){if("undefined"==typeof window)return null;const e=window[E];return"trash"===e?"trash":e&&"object"==typeof e&&"desktop-folder"===e.view&&"string"==typeof e.folderId?e:null}function D(){const e=M();return"undefined"!=typeof window&&(window[E]=null),e}export{_ as DesktopItemMiniIcon,S as FILES_OPEN_DESKTOP_FOLDER_EVENT,P as FILES_SHOW_TRASH_EVENT,v as FileIconTile,g as FolderGlyph,l as SPREADSHEET_PREVIEW_UPDATE_EVENT,f as claimSpreadsheetPreviewStage,D as consumeFilesViewRequest,k as desktopItemTypeLabel,T as getDesktopFoldersSnapshot,M as peekFilesViewRequest,c as peekSpreadsheetPreviewStage,j as publishDesktopFolders,V as requestFilesDesktopFolderView,L as requestFilesTrashView,s as setSpreadsheetPreview,I as subscribeDesktopFolders};
@@ -1,4 +1,4 @@
1
- import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-5YP7MFPK.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
1
+ import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-MBY5JIGB.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
2
2
  return s("div",{className:`flex flex-col gap-0.5 rounded-lg border border-gray-200 bg-white p-4 ${f??""}`,children:[
3
3
  /* @__PURE__ */o("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:i}),
4
4
  /* @__PURE__ */s("span",{className:"flex items-baseline gap-2",children:[
@@ -0,0 +1,7 @@
1
+ import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-5PP435FL.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as a}from"./chunk-36VIGB6J.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-MBY5JIGB.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:j}){const M=n().charts,w=m(),N=y??(e=>h(e,w)),B=j??M.nothingToBreakDown,$=c(null),C=r($),F=v??C,[G,P]=u(null),{highlighted:Y}=l(),z=e(p,F,d);if(0===z.length)/* @__PURE__ */
2
+ return s("div",{className:b,ref:$,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:B})});const A=k??i(0),I=Math.max(...z.map(e=>e.value),1),L=e=>34+e/I*62,V=e=>`color-mix(in oklab, ${A} ${L(e).toFixed(0)}%, ${o.surface})`,D=e=>L(e)>=55?o.surface:o.label,E=G??Y,H=G?z.find(e=>e.key===G):void 0;/* @__PURE__ */
3
+ return f("div",{className:`relative ${b??""}`,ref:$,children:[
4
+ /* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${F} ${d}`,role:"img","aria-label":M.treemap(p.length),onMouseLeave:()=>P(null),children:z.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
5
+ return f("g",{opacity:E&&E!==e.key?.55:1,onMouseEnter:()=>P(e.key),children:[
6
+ /* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:V(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:D(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:D(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),H&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(a,{title:H.label,rows:[{key:"value",label:M.value,color:V(H.value),value:N(H.value)}]})}),
7
+ /* @__PURE__ */s(t,{caption:M.treemap(p.length),head:[M.tableItem,M.value],rows:z.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
@@ -1,15 +1,15 @@
1
- import{CountBadge as e}from"./chunk-VVDK7XPH.js";import{SettingRowNameContext as i,SettingAutoContext as n}from"./chunk-2NMW66P5.js";import{isShown as a}from"./chunk-HCP7WOAL.js";import{useShellStrings as t}from"./chunk-5YP7MFPK.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:V,className:A=""}){const F=t();if(!a(j,P,V))return null;const T="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:F.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
1
+ import{CountBadge as e}from"./chunk-NIBYHQLT.js";import{SettingRowNameContext as i,SettingAutoContext as n}from"./chunk-2NMW66P5.js";import{isShown as a}from"./chunk-HCP7WOAL.js";import{useShellStrings as t}from"./chunk-MBY5JIGB.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:B,className:I=""}){const T=t();if(!a(j,P,B))return null;const A="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:T.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
2
2
  /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{dot:!0,tone:"accent"})}),
3
- /* @__PURE__ */s("span",{className:"sr-only",children:F.settingView.edited})]}):null,W=null!=f&&!1!==f;if("compact"===k){const e=m(u),a=m(h);if(!e&&!a)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),A&&c.push(A);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
4
- /* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),T]}),y=e=>/* @__PURE__ */s(i.Provider,{value:t,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
3
+ /* @__PURE__ */s("span",{className:"sr-only",children:T.settingView.edited})]}):null,W=null!=f&&!1!==f;if("compact"===k){const e=m(u),a=m(h);if(!e&&!a)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),I&&c.push(I);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
4
+ /* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),A]}),y=e=>/* @__PURE__ */s(i.Provider,{value:t,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
5
5
  return r("div",{className:c.join(" "),children:[
6
- /* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),W&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),a&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const H=c,I=void 0!==u||void 0===N&&null==h,K=null==u||""===u,M=y?"text-gray-500":"text-gray-800",q=K?"text-gray-400":y?"text-gray-500":"text-gray-900",z=`${H.text} font-medium ${M}`,B=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:z,children:l}):/* @__PURE__ */s("span",{id:g,className:z,children:l}),C=/* @__PURE__ */s(i.Provider,{value:g,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:K?b:u})}),D=[$?"border-t border-line-subtle first:border-t-0":"",H.pad,A].filter(Boolean).join(" "),L=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${H.bodyTop} border-t border-line-subtle ${H.bodyPad}`,children:N});/* @__PURE__ */
7
- return r("div",W?{className:D,children:[
6
+ /* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),W&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),a&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const F=c,H=void 0!==u||void 0===N&&null==h,L=null==u||""===u,M=y?"text-gray-500":"text-gray-800",V=L?"text-gray-400":y?"text-gray-500":"text-gray-900",Y=`${F.text} font-medium ${M}`,q=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:Y,children:l}):/* @__PURE__ */s("span",{id:g,className:Y,children:l}),z=/* @__PURE__ */s(i.Provider,{value:g,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:L?b:u})}),C=[$?"border-t border-line-subtle first:border-t-0":"",F.pad,I].filter(Boolean).join(" "),G=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${F.bodyTop} border-t border-line-subtle ${F.bodyPad}`,children:N});/* @__PURE__ */
7
+ return r("div",W?{className:C,children:[
8
8
  /* @__PURE__ */r("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
9
- /* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${M}`,children:[null!=o&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),B,T]})}),
9
+ /* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${M}`,children:[null!=o&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),q,A]})}),
10
10
  /* @__PURE__ */r("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[
11
- /* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${H.text} ${y?"text-ink-faint":"text-ink-strongest"}`,children:f}),null!=h&&/* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:h})]})]}),x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==u&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${H.text} ${q}`,children:C}),L]}:{className:D,children:[
12
- /* @__PURE__ */r("div",{className:`flex items-center justify-between ${H.gap}`,children:[
11
+ /* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${F.text} ${y?"text-ink-faint":"text-ink-strongest"}`,children:f}),null!=h&&/* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:h})]})]}),x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==u&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${F.text} ${V}`,children:z}),G]}:{className:C,children:[
12
+ /* @__PURE__ */r("div",{className:`flex items-center justify-between ${F.gap}`,children:[
13
13
  /* @__PURE__ */r("div",{className:"min-w-0 flex-1",children:[null!=o?
14
14
  /* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${M}`,children:[
15
- /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),B,T]}):T?/* @__PURE__ */r("div",{className:"flex min-w-0 items-center gap-2",children:[B,T]}):B,x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),null!=h?/* @__PURE__ */r("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[I&&/* @__PURE__ */s("div",{className:`${H.text} ${q}`,children:C}),h]}):I&&/* @__PURE__ */s("div",{className:`shrink-0 ${H.text} ${q}`,children:C})]}),L]})}export{o as SettingRow};
15
+ /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),q,A]}):A?/* @__PURE__ */r("div",{className:"flex min-w-0 items-center gap-2",children:[q,A]}):q,x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),null!=h?/* @__PURE__ */r("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[H&&/* @__PURE__ */s("div",{className:`${F.text} ${V}`,children:z}),h]}):H&&/* @__PURE__ */s("div",{className:`shrink-0 ${F.text} ${V}`,children:z})]}),G]})}export{o as SettingRow};
@@ -0,0 +1,13 @@
1
+ import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-LJN77RG6.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-HNUKXGYP.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EOVXFXVV.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-NJN5IKWO.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as x,glassStyle as k}from"./chunk-5FYDNH4Y.js";import{registerModalEscapeInterceptor as N}from"./chunk-TWVUQUUD.js";import{useShellStrings as j}from"./chunk-MBY5JIGB.js";import{useState as $,useId as D,useRef as C,useMemo as S,useEffect as W}from"react";import{createPortal as M}from"react-dom";import{jsxs as R,jsx as E}from"react/jsx-runtime";function F(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var L=["right-2","right-8","right-16"],O=[8,32,64];function z(z){const{options:T,placeholder:A,emptyOptionLabel:B,className:U="",disabled:Y,id:H,filter:I=!1,allowFreeText:J=!1,freeTextOption:G,onSearchChange:V,loading:X=!1,error:K,onRetry:P,rightAdornment:Z,endAction:Q,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=I&&ae&&!Y,ce=re||I,ue=null!=G,de=J||ue,[he,pe]=$(!1),[me,fe]=$(-1),be=D(),ge=H??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=$(""),ke=j(),Ne=B??ke.select.none,je=e=>{xe(e),fe(-1),V?.(e)},$e=C(null),De=C(null),Ce=C(null),Se=C(null),We=C(he);We.current=he;const Me=C(!1),Re=e=>{We.current&&(We.current=!1,e&&J&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),je(""))},Ee=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?je(""):fe(t));ie([e.value]),Re(!1)}},[Fe,Le]=$(null);y(()=>{if(!Z||he)return void Le(null);const e=Se.current?.offsetWidth??0;Le(e?e+O[Ye]+6:null)});const Oe=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(T),[T]),Te=le.join("\0"),Ae=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Te,de]),Be=Ae.join(", "),Ue=_&&ae&&!Y,Ye=(Ue?1:0)+(Q?1:0),[He,Ie]=$(null),Je=C(null),Ge=C(""),Ve=C(()=>{});Ve.current=()=>{const e=De.current,t=Je.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Ae.join("\0")}`;if(o===Ge.current)return;Ge.current=o;let i=null;r>0&&Ae.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=F(Ae,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ie(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ve.current()}),W(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ve.current());return t.observe(e),()=>t.disconnect()},[re]);const Xe=Ae.length,Ke=!re||!He||He.shown>=Xe?Be:0===He.shown?ke.select.selectedCount(Xe):`${Ae.slice(0,He.shown).join(", ")} +${Xe-He.shown}`,Pe=re&&null!==He&&(He.shown<Xe||He.cut),Ze=he&&ae&&ce;W(()=>{if(!he)return;const e=e=>{const t=e.target;$e.current?.contains(t)||Ce.current?.contains(t)||Re(!0)};document.addEventListener("mousedown",e);const t=b(()=>Re(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,J,ye,Te,z.onChange]),W(()=>{if(he)return N(e=>!("Escape"!==e.key||!We.current)&&(Re(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Qe=S(()=>{const e=/* @__PURE__ */new Set;return n(T,t=>!e.has(t.value)&&(e.add(t.value),!0))},[T]),qe=S(()=>{if(V)return Qe;const e=ye.trim().toLowerCase();return e?n(Qe,t=>r(t,e)):Qe},[Qe,ye,V]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Te]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
2
+ return R("div",{ref:$e,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&($e.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==De.current&&Re(!0)},children:[(rt=/* @__PURE__ */E("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Ke,onChange:e=>{je(e.target.value),pe(!0)},onFocus:()=>{Y||(je(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(Y)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Ee(nt[me],me):1!==_e.length||_e[0].disabled?J&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),je("")):(ie([et]),Re(!1),De.current?.blur())):Ee(_e[0],0)):"Escape"===t.key?(Re(!1),De.current?.blur()):"Tab"===t.key&&Re(!0)},placeholder:Ze?Ke:A||Ne,className:`${se?u:d} ${U} ${a[Ye]}${Y?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ze?" rosh-field-shows-choice":""}`,style:Fe?{paddingRight:Fe}:void 0,disabled:Y}),re?/* @__PURE__ */E(f,{content:!he&&Pe?Be:null,className:"block",children:rt}):rt),re&&
3
+ /* @__PURE__ */E("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */E("span",{ref:Je,className:"whitespace-pre"})}),Ye>0&&
4
+ /* @__PURE__ */R(s,{children:[Ue&&
5
+ /* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */E(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */E(p,{name:"close"}),onClick:()=>{ie([]),Re(!1)}}})}),Q&&/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */E(c,{action:Q})})]}),Z&&!he&&/* @__PURE__ */E("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${L[Ye]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Z}),he&&M(
6
+ /* @__PURE__ */R("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Oe?.left,right:Oe?.right,top:Oe?.top,bottom:Oe?.bottom,minWidth:Oe?.minWidth,width:Oe?.width,...ce&&{maxWidth:Oe?.maxWidth},visibility:Oe?void 0:"hidden",...k()},children:[re&&ae&&_&&!Y&&
7
+ /* @__PURE__ */E("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${x}`,children:ke.select.clearAll}),X?
8
+ /* @__PURE__ */E(m,{size:"sm",padding:"py-2",label:ke.search.searching}):K?/* @__PURE__ */R("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
9
+ /* @__PURE__ */E("span",{className:"min-w-0 flex-1",children:K}),P&&/* @__PURE__ */E(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:P,className:"shrink-0",children:ke.list.retry})]}):null,
10
+ /* @__PURE__ */R("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Oe?.maxHeight??w},children:[0===nt.length?X||K?null:/* @__PURE__ */E("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
11
+ return R("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Ee(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */E(o,{selected:n}),
12
+ /* @__PURE__ */E("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */E(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&G&&
13
+ /* @__PURE__ */E("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Ee(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${x}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:G(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,F as fitChoice};
@@ -1,7 +1,7 @@
1
- import{writeClipboard as e}from"./chunk-JJZAYAVL.js";import{IconButton_default as r}from"./chunk-LE5LWALR.js";import{toast_default as t}from"./chunk-KVVZLEUG.js";import{Icon as n}from"./chunk-7V32O5NF.js";import{useShellStrings as a}from"./chunk-5YP7MFPK.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
1
+ import{writeClipboard as e}from"./chunk-THSKCKAQ.js";import{IconButton_default as r}from"./chunk-LE5LWALR.js";import{toast_default as t}from"./chunk-A3AKJDLI.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as a}from"./chunk-MBY5JIGB.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
2
2
  return s(n,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
3
- return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:N=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":L,className:V=""}){const[A,C]=i(!1),T=o(null),B=a().copy;c(()=>()=>{T.current&&clearTimeout(T.current)},[]);const E=l(async()=>{await e(n)?(C(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{C(!1),T.current=null},2e3),v?.(n)):t.error(B.failed)},[n,v,B]),{box:F,button:J}=p[g],K=!N;/* @__PURE__ */
4
- return m("div",{id:K?void 0:j,"aria-describedby":K?void 0:L,className:["inline-flex max-w-full items-center rounded-md",u[k],F,V].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
5
- /* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(w?"whitespace-pre-wrap break-all":"truncate"),title:w?void 0:n,children:y??n}),!N&&/* @__PURE__ */m(d,{children:[
6
- /* @__PURE__ */s(r,{id:j,"aria-label":x?B.copyLabel(x):B.copy,"aria-describedby":L,onClick:E,className:`${J} text-gray-400`,children:/* @__PURE__ */s(A?h:b,{})}),
7
- /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:A?B.copied:""})]})]})}export{y as Snippet};
3
+ return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:v=!1,onCopy:w,multiline:N=!1,id:j,"aria-describedby":B,className:L=""}){const[A,C]=i(!1),T=o(null),K=a().copy;c(()=>()=>{T.current&&clearTimeout(T.current)},[]);const I=l(async()=>{await e(n)?(C(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{C(!1),T.current=null},2e3),w?.(n)):t.error(K.failed)},[n,w,K]),{box:J,button:z}=p[g],D=!v;/* @__PURE__ */
4
+ return m("div",{id:D?void 0:j,"aria-describedby":D?void 0:B,className:["inline-flex max-w-full items-center rounded-md",u[k],J,L].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
5
+ /* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(N?"whitespace-pre-wrap break-all":"truncate"),title:N?void 0:n,children:y??n}),!v&&/* @__PURE__ */m(d,{children:[
6
+ /* @__PURE__ */s(r,{id:j,"aria-label":x?K.copyLabel(x):K.copy,"aria-describedby":B,onClick:I,className:`${z} text-gray-400`,children:/* @__PURE__ */s(A?h:b,{})}),
7
+ /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:A?K.copied:""})]})]})}export{y as Snippet};
@@ -1 +1 @@
1
- import{useShellStrings as t}from"./chunk-5YP7MFPK.js";import{useRef as e,useEffect as r,useCallback as n}from"react";function i({open:i,dirty:o,onClose:c,title:s,layer:u}){const a=t().dialog,d=e(!1),l=e(!1),m=e({dirty:o,onClose:c,title:s,strings:a});return r(()=>{m.current={dirty:o,onClose:c,title:s,strings:a}}),r(()=>{i||(d.current=!1)},[i]),r(()=>{if(!i||"auto"!==o||!u)return;const t=t=>{u.contains(t.target)&&(d.current=!0)};return document.addEventListener("input",t,!0),document.addEventListener("change",t,!0),()=>{document.removeEventListener("input",t,!0),document.removeEventListener("change",t,!0)}},[i,o,u]),n(()=>{const{dirty:t,onClose:e,title:r,strings:n}=m.current;if(l.current)return;("auto"===t?d.current:t)?(l.current=!0,import("./shell/ConfirmDialog.js").then(({confirm:t})=>t({title:n.discardTitle,message:n.discardMessage("string"==typeof r?r:void 0),confirmLabel:n.discardConfirm,cancelLabel:n.keepEditing,variant:"warning"})).then(t=>{l.current=!1,t&&(d.current=!1,m.current.onClose())})):e()},[])}export{i as useDiscardGuard};
1
+ import{useShellStrings as t}from"./chunk-MBY5JIGB.js";import{useRef as e,useEffect as r,useCallback as n}from"react";function i({open:i,dirty:o,onClose:c,title:s,layer:u}){const a=t().dialog,d=e(!1),l=e(!1),m=e({dirty:o,onClose:c,title:s,strings:a});return r(()=>{m.current={dirty:o,onClose:c,title:s,strings:a}}),r(()=>{i||(d.current=!1)},[i]),r(()=>{if(!i||"auto"!==o||!u)return;const t=t=>{u.contains(t.target)&&(d.current=!0)};return document.addEventListener("input",t,!0),document.addEventListener("change",t,!0),()=>{document.removeEventListener("input",t,!0),document.removeEventListener("change",t,!0)}},[i,o,u]),n(()=>{const{dirty:t,onClose:e,title:r,strings:n}=m.current;if(l.current)return;("auto"===t?d.current:t)?(l.current=!0,import("./shell/ConfirmDialog.js").then(({confirm:t})=>t({title:n.discardTitle,message:n.discardMessage("string"==typeof r?r:void 0),confirmLabel:n.discardConfirm,cancelLabel:n.keepEditing,variant:"warning"})).then(t=>{l.current=!1,t&&(d.current=!1,m.current.onClose())})):e()},[])}export{i as useDiscardGuard};
@@ -1,2 +1,2 @@
1
- import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-5YP7MFPK.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
1
+ import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-MBY5JIGB.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
2
2
  return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};
@@ -1,6 +1,6 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-GJVGGYQ2.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-ZKBGUDNB.js";import{useShellStrings as l}from"./chunk-5YP7MFPK.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},B){const $=m(),z=l().files,C=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),F=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-5EWKVVUD.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-LBGRLG3Y.js";import{useShellStrings as l}from"./chunk-MBY5JIGB.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},B){const $=m(),z=l().files,C=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),q=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
2
2
  return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
3
- /* @__PURE__ */o("button",{ref:B,type:"button",id:$,disabled:y,onClick:C.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":F,...C.zoneProps,className:t(C.dragOver,y,a(y),"px-4 py-6"),children:[
3
+ /* @__PURE__ */o("button",{ref:B,type:"button",id:$,disabled:y,onClick:C.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":q,...C.zoneProps,className:t(C.dragOver,y,a(y),"px-4 py-6"),children:[
4
4
  /* @__PURE__ */o("span",{children:[
5
5
  /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
6
6
  /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),