efficient-shell 12.8.1 → 12.11.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 (345) hide show
  1. package/README.md +37 -2
  2. package/dist/{Browser-DEXVIONU.js → Browser-6O7SDMZ5.js} +16 -16
  3. package/dist/Calculator-ALPNISJT.js +29 -0
  4. package/dist/{CurrencyConverter-H4M35SIY.js → CurrencyConverter-KBY2OXQ2.js} +8 -8
  5. package/dist/Files-3NTP7YKY.js +126 -0
  6. package/dist/{Notepad-PSDXZTBI.js → Notepad-GF5GBZGV.js} +9 -9
  7. package/dist/PdfViewer-L4FJS3M6.js +1 -0
  8. package/dist/{PomodoroTimer-SKAUQXPO.js → PomodoroTimer-NGQPYDI3.js} +68 -68
  9. package/dist/{Preview-HBB2SWJY.js → Preview-KVV6SE3C.js} +30 -30
  10. package/dist/Sidebar-QOGK5LJ2.js +44 -0
  11. package/dist/{Stock-X7GEAET7.js → Stock-O7AQ2WUN.js} +2 -2
  12. package/dist/{Weather-OH5PIQLU.js → Weather-WHXA5TTP.js} +21 -21
  13. package/dist/{WorldClock-S5NSJ7ZX.js → WorldClock-CZCIVYKB.js} +6 -6
  14. package/dist/ai/index.js +34 -34
  15. package/dist/apps/ImageAnnotator.js +1 -1
  16. package/dist/apps/index.d.ts +55 -1
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.js +1 -1
  29. package/dist/charts/FlowChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/SpecChart.js +1 -1
  42. package/dist/charts/StatTile.js +1 -1
  43. package/dist/charts/SunburstChart.js +1 -1
  44. package/dist/charts/TimeSeriesChart.js +1 -1
  45. package/dist/charts/TreemapChart.js +1 -1
  46. package/dist/charts/WaterfallChart.js +1 -1
  47. package/dist/{chunk-ROM25ZMZ.js → chunk-22LU6FKN.js} +10 -10
  48. package/dist/{chunk-NC36LJCA.js → chunk-2GS2VOQT.js} +10 -10
  49. package/dist/{chunk-UK6XNW3I.js → chunk-2NZBQOA6.js} +12 -12
  50. package/dist/{chunk-4ZUV6WQT.js → chunk-2WNTDGOP.js} +1 -1
  51. package/dist/{chunk-MZG3FS5T.js → chunk-2X4U3VX2.js} +6 -6
  52. package/dist/{chunk-6JDR6T4U.js → chunk-3RDJFCIZ.js} +1 -1
  53. package/dist/{chunk-5NDONLH5.js → chunk-42BVXJZN.js} +3 -3
  54. package/dist/{chunk-3KP3EIYP.js → chunk-457SK2XV.js} +5 -5
  55. package/dist/{chunk-Z2MNXUM6.js → chunk-4GTXRVDF.js} +2 -2
  56. package/dist/{chunk-G2X5YYIQ.js → chunk-4MUE4CYB.js} +2 -2
  57. package/dist/{chunk-3CMCGOOV.js → chunk-4UQNNA4K.js} +4 -4
  58. package/dist/{chunk-NEAT7BIP.js → chunk-5G4CB3E6.js} +1 -1
  59. package/dist/{chunk-PH3P54QQ.js → chunk-5HOXR3L4.js} +1 -1
  60. package/dist/{chunk-Y4RERPFN.js → chunk-5QVCBAK2.js} +1 -1
  61. package/dist/chunk-5RT5XDHG.js +6 -0
  62. package/dist/{chunk-3UHTHQGK.js → chunk-5S4YF5XA.js} +8 -8
  63. package/dist/{chunk-OGPCFMNA.js → chunk-5WCHUZ6O.js} +1 -1
  64. package/dist/{chunk-KUUZFLT6.js → chunk-5YPCZLBW.js} +1 -1
  65. package/dist/{chunk-PT77FC5X.js → chunk-5Z6XJPAX.js} +1 -1
  66. package/dist/{chunk-B7LNSGNR.js → chunk-63J2MBXV.js} +10 -10
  67. package/dist/chunk-675RYIWR.js +7 -0
  68. package/dist/{chunk-BDWZLMIT.js → chunk-67BWG353.js} +9 -9
  69. package/dist/{chunk-SCU2CWNJ.js → chunk-6BK3KRT5.js} +18 -18
  70. package/dist/{chunk-X7APOT53.js → chunk-6BQUSUNK.js} +7 -7
  71. package/dist/{chunk-NU7LUJX5.js → chunk-6ITEA6SX.js} +1 -1
  72. package/dist/{chunk-4KJ7MLWO.js → chunk-6JLXXX4H.js} +5 -5
  73. package/dist/{chunk-C37PXEEH.js → chunk-6P7SIIG4.js} +14 -14
  74. package/dist/{chunk-CNVYM3HP.js → chunk-6YIVKPWQ.js} +1 -1
  75. package/dist/{chunk-YJIFJIXV.js → chunk-7Q4DE4CT.js} +1 -1
  76. package/dist/chunk-7XGUX3TH.js +3 -0
  77. package/dist/{chunk-NKMSGZZ3.js → chunk-A2JYBUPB.js} +5 -5
  78. package/dist/{chunk-IYPRFUTT.js → chunk-AKTEMZOT.js} +1 -1
  79. package/dist/{chunk-F6QSHKUR.js → chunk-AMSE4PMQ.js} +4 -4
  80. package/dist/{chunk-TX5FZBPQ.js → chunk-ASOVTAIT.js} +1 -1
  81. package/dist/{chunk-CD7P34VC.js → chunk-AUCNJFTP.js} +7 -7
  82. package/dist/{chunk-BGJMDP6J.js → chunk-BJAJOIVY.js} +1 -1
  83. package/dist/chunk-BR7L5NE3.js +13 -0
  84. package/dist/{chunk-DJ2XDBAO.js → chunk-BUZ5AJLR.js} +6 -6
  85. package/dist/{chunk-EOGXCGQF.js → chunk-BYDSBDVS.js} +6 -6
  86. package/dist/{chunk-YUB3TJKO.js → chunk-C3E6XFIC.js} +3 -3
  87. package/dist/{chunk-45IVWLKF.js → chunk-C7M7KYNY.js} +1 -1
  88. package/dist/chunk-CA3OC4YY.js +9 -0
  89. package/dist/{chunk-H7HRYFRQ.js → chunk-CB5FQMFB.js} +9 -9
  90. package/dist/{chunk-UOUVHHTC.js → chunk-CINGDJPM.js} +1 -1
  91. package/dist/{chunk-6LYBE7LM.js → chunk-CRRC72EE.js} +9 -9
  92. package/dist/{chunk-NS37Y5CN.js → chunk-D4K72BHN.js} +1 -1
  93. package/dist/chunk-DVYIZP7X.js +31 -0
  94. package/dist/{chunk-BFO72WQB.js → chunk-EDANELWX.js} +1 -1
  95. package/dist/chunk-EHVBJUQI.js +28 -0
  96. package/dist/{chunk-ZC3TSMFK.js → chunk-EIXMUGVZ.js} +2 -2
  97. package/dist/{chunk-7FBAZLBX.js → chunk-EVEGK57J.js} +1 -1
  98. package/dist/{chunk-7HTDD37H.js → chunk-F7BXUVN4.js} +5 -5
  99. package/dist/{chunk-XFD4BLP7.js → chunk-FOCQEWUH.js} +1 -1
  100. package/dist/chunk-FQHY6DTF.js +4 -0
  101. package/dist/{chunk-4UGFNTZ3.js → chunk-FZWAOYAM.js} +7 -7
  102. package/dist/{chunk-NEYHBQLG.js → chunk-G3VRO4CK.js} +2 -2
  103. package/dist/{chunk-FPYABAOX.js → chunk-GB2XLSR5.js} +11 -11
  104. package/dist/{chunk-TS36J7RW.js → chunk-GBEDLYND.js} +2 -2
  105. package/dist/{chunk-4EVBKID5.js → chunk-GMJ5WOB2.js} +1 -1
  106. package/dist/{chunk-4JYHS4VJ.js → chunk-GMLDGXNQ.js} +1 -1
  107. package/dist/{chunk-PPSA3QLE.js → chunk-HD7OBASH.js} +1 -1
  108. package/dist/{chunk-NPIZ2Y3P.js → chunk-HE24VQMU.js} +1 -1
  109. package/dist/{chunk-3WFJ4PYV.js → chunk-HEX3EP5F.js} +3 -3
  110. package/dist/chunk-HL3V67JZ.js +2 -0
  111. package/dist/{chunk-5Q7VFXEO.js → chunk-HRDR56SK.js} +3 -3
  112. package/dist/chunk-HULQSIX5.js +8 -0
  113. package/dist/{chunk-OY3JH66O.js → chunk-HV4VQ5XV.js} +7 -7
  114. package/dist/{chunk-E227NVFX.js → chunk-IARCNQD3.js} +1 -1
  115. package/dist/{chunk-RJKMFIM3.js → chunk-ICNGLA5O.js} +6 -6
  116. package/dist/{chunk-VVQJHQW6.js → chunk-IIMFLLYT.js} +8 -8
  117. package/dist/{chunk-GHZ4PP62.js → chunk-INFL4YZF.js} +1 -1
  118. package/dist/{chunk-Y46WPTKY.js → chunk-ISU4FCEX.js} +7 -7
  119. package/dist/chunk-ISZOD5S6.js +2 -0
  120. package/dist/{chunk-H6PFTU3L.js → chunk-J4IT5C3A.js} +1 -1
  121. package/dist/{chunk-GLJILR2Y.js → chunk-J7BMSKOM.js} +5 -5
  122. package/dist/{chunk-DW45EZHA.js → chunk-JGJWPONL.js} +5 -5
  123. package/dist/{chunk-JY2OBPVO.js → chunk-JOD5ISTB.js} +1 -1
  124. package/dist/{chunk-TRWHVG3A.js → chunk-JTZVUO3I.js} +1 -1
  125. package/dist/{chunk-YMNWUQGV.js → chunk-JVNJCRHM.js} +4 -4
  126. package/dist/{chunk-N5LVUI7R.js → chunk-KFS7WSCC.js} +11 -11
  127. package/dist/{chunk-XZH5PEML.js → chunk-KIRLSUQT.js} +5 -5
  128. package/dist/{chunk-WMLBMR4E.js → chunk-KOPTKTHN.js} +3 -3
  129. package/dist/{chunk-3LTZ4N46.js → chunk-KPHYWZXL.js} +13 -13
  130. package/dist/{chunk-HQA7SPU5.js → chunk-KRUI4LVW.js} +1 -1
  131. package/dist/chunk-KVU5IQOZ.js +7 -0
  132. package/dist/{chunk-BXU3LX44.js → chunk-KWTK6TGH.js} +1 -1
  133. package/dist/{chunk-AXTVK6LU.js → chunk-KZ7RR7EU.js} +1 -1
  134. package/dist/{chunk-ZYW4KSEE.js → chunk-LFW3CQMF.js} +4 -4
  135. package/dist/{chunk-6HH6KNJB.js → chunk-LFWRHBTM.js} +2 -2
  136. package/dist/{chunk-X5ZY35KZ.js → chunk-LS6VU6F7.js} +1 -1
  137. package/dist/{chunk-5NONOFIV.js → chunk-M4MN2GOE.js} +1 -1
  138. package/dist/{chunk-GJ23UZDQ.js → chunk-MAI2DN7N.js} +1 -1
  139. package/dist/{chunk-7B5KFESH.js → chunk-MBXCXFQO.js} +1 -1
  140. package/dist/{chunk-32WEY6O5.js → chunk-MEAJGM6F.js} +1 -1
  141. package/dist/{chunk-DNLRUZGS.js → chunk-MPTOEXED.js} +1 -1
  142. package/dist/chunk-MTP3MBZA.js +22 -0
  143. package/dist/{chunk-EUUCNDIS.js → chunk-NAWIVFAN.js} +13 -13
  144. package/dist/{chunk-54K2ADBT.js → chunk-NDAZPAQL.js} +1 -1
  145. package/dist/{chunk-SYIJRZIS.js → chunk-NOC4WIME.js} +2 -2
  146. package/dist/chunk-NOCOLZ2W.js +1 -0
  147. package/dist/{chunk-SCGBCBXP.js → chunk-NV7QRWQJ.js} +1 -1
  148. package/dist/{chunk-XK4U5MAS.js → chunk-O3YCIWHF.js} +1 -1
  149. package/dist/{chunk-MCJ4JHLE.js → chunk-OAFFHLJ4.js} +5 -5
  150. package/dist/chunk-OSNHRKX6.js +5 -0
  151. package/dist/{chunk-BTUI3MKS.js → chunk-OSQ5NRV3.js} +1 -1
  152. package/dist/{chunk-GG4ZXQXG.js → chunk-OW5LQWPU.js} +3 -3
  153. package/dist/{chunk-3I67TIGD.js → chunk-PEIRPNXT.js} +21 -21
  154. package/dist/{chunk-LGK47SEN.js → chunk-PHJFGLXB.js} +12 -12
  155. package/dist/{chunk-7FRG5CF7.js → chunk-PICRPJBL.js} +1 -1
  156. package/dist/{chunk-HS6KTFW6.js → chunk-POOPWYJL.js} +10 -10
  157. package/dist/chunk-PY7GHIYF.js +19 -0
  158. package/dist/chunk-PYBPJL5R.js +1 -0
  159. package/dist/{chunk-7HIHQR3X.js → chunk-Q3RJMQYE.js} +1 -1
  160. package/dist/{chunk-QR46K5SB.js → chunk-QBSIM4JB.js} +1 -1
  161. package/dist/{chunk-LLUHE2ZW.js → chunk-QIMMZVWV.js} +1 -1
  162. package/dist/{chunk-NHWDB7R6.js → chunk-QMNDKNK2.js} +1 -1
  163. package/dist/{chunk-RIXX6NRV.js → chunk-QQM36CYU.js} +1 -1
  164. package/dist/{chunk-J33QE4J7.js → chunk-QSK2OWT3.js} +2 -2
  165. package/dist/{chunk-2JXGTA73.js → chunk-RAQBZUU2.js} +65 -65
  166. package/dist/{chunk-YMAU4EIK.js → chunk-RGKSJBXJ.js} +8 -8
  167. package/dist/{chunk-H6IGZWC2.js → chunk-RHD4V6CE.js} +9 -9
  168. package/dist/{chunk-VQJLH2BU.js → chunk-RIF6BFEH.js} +1 -1
  169. package/dist/{chunk-TXZR5G55.js → chunk-RLGPIJHB.js} +1 -1
  170. package/dist/{chunk-R3K3LVVS.js → chunk-RQKD5AAL.js} +1 -1
  171. package/dist/{chunk-I3QFYBOP.js → chunk-SEHKTBVM.js} +1 -1
  172. package/dist/{chunk-75MSXRFY.js → chunk-SFFELHLP.js} +5 -5
  173. package/dist/{chunk-SBZCJNNP.js → chunk-SY65V6K7.js} +10 -10
  174. package/dist/{chunk-UIWGVOFH.js → chunk-T3NLFOLW.js} +2 -1
  175. package/dist/{chunk-JYD6PSDA.js → chunk-TDMZFQRB.js} +1 -1
  176. package/dist/chunk-TJSJVC6P.js +1 -0
  177. package/dist/{chunk-MX2YRSMZ.js → chunk-TKFINWY6.js} +2 -2
  178. package/dist/{chunk-MM5AFQ24.js → chunk-TVVSFXWY.js} +7 -7
  179. package/dist/{chunk-EZWWQHD3.js → chunk-UD4NESX7.js} +1 -1
  180. package/dist/{chunk-NJTFI7AA.js → chunk-UG5GKEU5.js} +1 -1
  181. package/dist/{chunk-UZZVI7EN.js → chunk-UMZJRZFN.js} +1 -1
  182. package/dist/{chunk-LTESFDTF.js → chunk-V6FHZGCL.js} +1 -1
  183. package/dist/{chunk-2UBASCOK.js → chunk-VLCHHTX6.js} +1 -1
  184. package/dist/{chunk-VROBW74Y.js → chunk-VN3A43SA.js} +1 -1
  185. package/dist/{chunk-QQXQQPCD.js → chunk-VPZOSVDF.js} +9 -9
  186. package/dist/{chunk-DPUM3H5N.js → chunk-VWNHSLFY.js} +1 -1
  187. package/dist/{chunk-HE767CVB.js → chunk-W5B7UNMJ.js} +1 -1
  188. package/dist/{chunk-H27KA5IL.js → chunk-WDAOTHX5.js} +3 -3
  189. package/dist/{chunk-R3JKZXII.js → chunk-WJBP5SND.js} +5 -5
  190. package/dist/{chunk-LLAYWMYS.js → chunk-WM2BBRT6.js} +1 -1
  191. package/dist/{chunk-XVIDD6F3.js → chunk-Y4YXZIES.js} +8 -8
  192. package/dist/chunk-YMD2F3NL.js +1 -0
  193. package/dist/{chunk-525O4AUQ.js → chunk-YRG6XJ6M.js} +8 -8
  194. package/dist/chunk-YVAJ42M2.js +8 -0
  195. package/dist/{chunk-DZBGJ6X4.js → chunk-YVIV7SKG.js} +1 -1
  196. package/dist/{chunk-53EW4M5S.js → chunk-YX4MRM7A.js} +6 -6
  197. package/dist/{chunk-EZ6SVQSV.js → chunk-Z334LCCX.js} +1 -1
  198. package/dist/{chunk-7KIDOIPY.js → chunk-Z7RXWXR5.js} +1 -1
  199. package/dist/{chunk-23WJCEYD.js → chunk-ZC6MXV4L.js} +1 -1
  200. package/dist/{chunk-7H7U3HC6.js → chunk-ZR2UWJIR.js} +4 -4
  201. package/dist/data/DataTable.js +1 -1
  202. package/dist/data/EntityList.js +1 -1
  203. package/dist/data/Kanban.js +1 -1
  204. package/dist/data/ListFooter.js +1 -1
  205. package/dist/data/ListLoadError.js +1 -1
  206. package/dist/data/Pagination.js +1 -1
  207. package/dist/data/ResizableTable.js +1 -1
  208. package/dist/file-intake/index.js +1 -1
  209. package/dist/forms/BorderInput.js +1 -1
  210. package/dist/forms/BrandAssetEditor.js +1 -1
  211. package/dist/forms/Calendar.js +1 -1
  212. package/dist/forms/ColorPicker.js +1 -1
  213. package/dist/forms/ComposerAttachments.js +1 -1
  214. package/dist/forms/CornersInput.js +1 -1
  215. package/dist/forms/DatePicker.js +1 -1
  216. package/dist/forms/DateRangePicker.js +1 -1
  217. package/dist/forms/DateTimePicker.js +1 -1
  218. package/dist/forms/DisplayChips.js +1 -1
  219. package/dist/forms/FilePicker.js +1 -1
  220. package/dist/forms/FormErrorSummary.js +1 -1
  221. package/dist/forms/IconPicker.js +1 -1
  222. package/dist/forms/ImageFocusPoint.js +1 -1
  223. package/dist/forms/Input.js +1 -1
  224. package/dist/forms/InputNumber.js +1 -1
  225. package/dist/forms/LinkPicker.js +1 -1
  226. package/dist/forms/MediaLibrary.js +1 -1
  227. package/dist/forms/MediaUploadField.js +1 -1
  228. package/dist/forms/MediaUploadGrid.js +1 -1
  229. package/dist/forms/MediaUsedInList.js +1 -1
  230. package/dist/forms/NumericKeypad.js +1 -1
  231. package/dist/forms/PositionInput.js +1 -1
  232. package/dist/forms/RenameField.js +1 -1
  233. package/dist/forms/Select.js +1 -1
  234. package/dist/forms/SidesInput.js +1 -1
  235. package/dist/forms/Slider.js +1 -1
  236. package/dist/forms/Snippet.js +1 -1
  237. package/dist/forms/SplitButton.js +1 -1
  238. package/dist/forms/TagInput.js +1 -1
  239. package/dist/forms/TextToolbar.js +1 -1
  240. package/dist/forms/TimePicker.js +1 -1
  241. package/dist/forms/UnitMenu.js +1 -1
  242. package/dist/forms/WidthsBar.js +1 -1
  243. package/dist/forms/mediaLibraryMenu.js +1 -1
  244. package/dist/forms/mediaMoveItems.js +1 -1
  245. package/dist/forms/textAlign.js +1 -1
  246. package/dist/forms/useFileIntake.js +1 -1
  247. package/dist/icons/efficient-meanings.d.ts +37 -37
  248. package/dist/icons/efficient-meanings.js +1 -1
  249. package/dist/icons/efficient.js +1 -1
  250. package/dist/icons/index.js +1 -1
  251. package/dist/index.js +665 -665
  252. package/dist/locales/zh-Hans.js +1 -1
  253. package/dist/map/index.js +2 -2
  254. package/dist/markdown/index.js +1 -1
  255. package/dist/page-tabs/index.js +5 -5
  256. package/dist/pdf/index.js +1 -1
  257. package/dist/shell/Accordion.js +1 -1
  258. package/dist/shell/AppUpdateBanner.js +1 -1
  259. package/dist/shell/Avatar.js +1 -1
  260. package/dist/shell/Banner.js +1 -1
  261. package/dist/shell/Breadcrumbs.js +1 -1
  262. package/dist/shell/BudgetBar.js +1 -1
  263. package/dist/shell/Card.js +1 -1
  264. package/dist/shell/ColoredBadge.js +1 -1
  265. package/dist/shell/ConfirmDialog.js +1 -1
  266. package/dist/shell/ContainerFillChart.js +1 -1
  267. package/dist/shell/ContextMenu.js +1 -1
  268. package/dist/shell/CountBadge.js +1 -1
  269. package/dist/shell/Dialog.js +1 -1
  270. package/dist/shell/Drawer.js +1 -1
  271. package/dist/shell/DropdownMenu.js +1 -1
  272. package/dist/shell/EditableGrid.js +1 -1
  273. package/dist/shell/EmptyState.js +1 -1
  274. package/dist/shell/GlobalSearch.js +1 -1
  275. package/dist/shell/HelpCenter.js +1 -1
  276. package/dist/shell/IconRail.js +1 -1
  277. package/dist/shell/ImageLightbox.js +1 -1
  278. package/dist/shell/ItemCount.js +1 -1
  279. package/dist/shell/LanguageSelect.js +1 -1
  280. package/dist/shell/Markdown.js +1 -1
  281. package/dist/shell/MetricBar.js +1 -1
  282. package/dist/shell/MetricBarLegend.js +1 -1
  283. package/dist/shell/MilestoneTimeline.js +1 -1
  284. package/dist/shell/PageHeader.js +1 -1
  285. package/dist/shell/PopupMenu.js +1 -1
  286. package/dist/shell/ProductionTimeline.js +1 -1
  287. package/dist/shell/ResizeHandle.js +1 -1
  288. package/dist/shell/Result.js +1 -1
  289. package/dist/shell/SearchableSelect.js +1 -1
  290. package/dist/shell/SettingReset.js +1 -1
  291. package/dist/shell/SettingRow.js +1 -1
  292. package/dist/shell/SidebarLayout.js +1 -1
  293. package/dist/shell/SidebarNav.js +1 -1
  294. package/dist/shell/SortableList.js +1 -1
  295. package/dist/shell/Statistic.js +1 -1
  296. package/dist/shell/StepChain.js +1 -1
  297. package/dist/shell/Stepper.js +1 -1
  298. package/dist/shell/TimeAgo.js +1 -1
  299. package/dist/shell/TimelineTrack.js +1 -1
  300. package/dist/shell/TopNav.js +1 -1
  301. package/dist/shell/TransferProgress.js +1 -1
  302. package/dist/shell/Tree.js +1 -1
  303. package/dist/shell/discardGuard.js +1 -1
  304. package/dist/shell/language.js +1 -1
  305. package/dist/shell/strings.d.ts +8 -0
  306. package/dist/shell/strings.js +1 -1
  307. package/dist/shell/toast.js +1 -1
  308. package/dist/telemetry/index.js +1 -1
  309. package/dist/templates/AuthScreen.js +1 -1
  310. package/dist/templates/ChatTemplate.js +1 -1
  311. package/dist/templates/CheckoutTemplate.js +1 -1
  312. package/dist/templates/DashboardTemplate.js +1 -1
  313. package/dist/templates/DataTablePage.js +1 -1
  314. package/dist/templates/EmailTemplate.js +1 -1
  315. package/dist/templates/ErrorBoundary.js +1 -1
  316. package/dist/templates/ErrorPage.js +1 -1
  317. package/dist/templates/FormLayoutPage.js +1 -1
  318. package/dist/templates/GalleryTemplate.js +1 -1
  319. package/dist/ui/index.js +1 -1
  320. package/dist/version.js +1 -1
  321. package/package.json +1 -1
  322. package/dist/Calculator-NZ2S6CAK.js +0 -29
  323. package/dist/Files-HDTNIXUC.js +0 -121
  324. package/dist/PdfViewer-GUXUWGMG.js +0 -1
  325. package/dist/Sidebar-XGAVJGOL.js +0 -44
  326. package/dist/chunk-27TJNID7.js +0 -13
  327. package/dist/chunk-43MCNASD.js +0 -1
  328. package/dist/chunk-6DZGOGB2.js +0 -1
  329. package/dist/chunk-6EHPEBGP.js +0 -5
  330. package/dist/chunk-A6WZF65N.js +0 -22
  331. package/dist/chunk-C3SE57NF.js +0 -3
  332. package/dist/chunk-GEZ45J4Z.js +0 -2
  333. package/dist/chunk-HEAGOZKJ.js +0 -6
  334. package/dist/chunk-IFIMUNID.js +0 -4
  335. package/dist/chunk-IHPAYSTJ.js +0 -8
  336. package/dist/chunk-KETGA66S.js +0 -9
  337. package/dist/chunk-KO74S3FL.js +0 -28
  338. package/dist/chunk-M54OL3YR.js +0 -2
  339. package/dist/chunk-P2C33RHT.js +0 -1
  340. package/dist/chunk-QLVH66TE.js +0 -31
  341. package/dist/chunk-SE3S362N.js +0 -7
  342. package/dist/chunk-TWFD7A3K.js +0 -1
  343. package/dist/chunk-U5DSVCWV.js +0 -8
  344. package/dist/chunk-UDVQORQM.js +0 -19
  345. package/dist/chunk-WSRM6ZQS.js +0 -7
@@ -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-4UGFNTZ3.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-UIWGVOFH.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-43MCNASD.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),C=x.length?Math.min(...x):S,D=x.length?Math.max(...x):S,P=a(r??null)??C,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,D,q,P+i];return O||e.push(S),Math.max(...e)})(),A=Math.max(1,Math.round((T-P)/i)),I=a(p??null)??D??P,L=Math.min(Math.max(y??I,P),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=L})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>L){$=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(P).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),G=j??F,z=j?a(j.date):F?P:null,H=$?a($.date):null,J=!!(G&&$&&null!=z&&null!=H&&L>z&&L<H);let U,Z;if(J&&null!=z&&null!=H){const e=(L-z)/Math.max(H-z,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of G?.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(G?.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):G?.est_completion_date||$?.est_completion_date||null,U={id:`interp-${L}`,progress_number:_.estimated,date:new Date(L).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},Z=G}else if(U=G??t[t.length-1]??null,U){const e=t.findIndex(e=>e.id===U.id);Z=e>=0&&e<t.length-1?t[e+1]:null}else Z=null;const B={};for(const e of Z?.items??[])B[e.part_number]=e;const E=!(!d||U?.id===d),K=d?Math.min(a(p??null)??T,T):T,Q=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:P,endMs:T,totalLeadDays:A,scrubMs:L,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:E,beforeAnchor:G,nextAfter:$,displayed:U,prevReport:Z,prevByPN:B,isInterpolated:J,playing:v,startPlay:()=>{if(v)return void N();if(K<=P)return void f(K);M(!0),f(P);let e=performance.now(),t=P;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=K)return f(K),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:Q,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])),C=N.map(({ms:e})=>e),D=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:D,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:C,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:C}){const{reports:D,markers:P,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:A,setScrubMs:I,displayed:L,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:G,estCompletionMs:z}=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)}}}(D.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),I,C),J=c().production,U=d(),Z=_??J.heading,B=e=>o(e,U);if(0===D.length&&0===P.length)return null;const E=P.filter(e=>"shipment"===e.kind),K=P.filter(e=>"inspection"===e.kind),Q=P.filter(e=>"invoice"===e.kind),V=(L?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),W=L?v(L):0,X=D.find(e=>e.id===F),Y=X?N(X):G,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??Y)?/* @__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(Y))}):null,[re,ne]=p(J.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:L?/* @__PURE__ */h(y,{children:[e&&re,
5
- /* @__PURE__ */b("b",{className:"font-medium",children:N(L)}),e&&ne,
6
- /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",B(new Date(L.date).getTime())," · ",J.overall(Math.round(W))," · ",J.inStock(V)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:J.noReport})});if("rail"===S){const e=null!=z&&z>=q&&q>O,t=e?{key:"__estimate__",label:J.estimatedCompletion,dateText:B(z)}:null;/* @__PURE__ */
1
+ import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-FZWAOYAM.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-T3NLFOLW.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-TJSJVC6P.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),C=x.length?Math.min(...x):S,P=x.length?Math.max(...x):S,D=a(r??null)??C,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),T=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),q=(()=>{const e=[R,P,T,D+i];return O||e.push(S),Math.max(...e)})(),L=Math.max(1,Math.round((q-D)/i)),A=a(p??null)??P??D,I=Math.min(Math.max(y??A,D),q),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:""}})(),J=j??F,z=j?a(j.date):F?D:null,W=$?a($.date):null,Z=!!(J&&$&&null!=z&&null!=W&&I>z&&I<W);let B,E;if(Z&&null!=z&&null!=W){const e=(I-z)/Math.max(W-z,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of J?.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(J?.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):J?.est_completion_date||$?.est_completion_date||null,B={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=J}else if(B=J??t[t.length-1]??null,B){const e=t.findIndex(e=>e.id===B.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 H=!(!d||B?.id===d),K=d?Math.min(a(p??null)??q,q):q,Q=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:D,endMs:q,totalLeadDays:L,scrubMs:I,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:H,beforeAnchor:J,nextAfter:$,displayed:B,prevReport:E,prevByPN:G,isInterpolated:Z,playing:v,startPlay:()=>{if(v)return void N();if(K<=D)return void f(K);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>=K)return f(K),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:Q,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])),C=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:C,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:C}){const{reports:P,markers:D,poNumber:R,startMs:O,endMs:T,totalLeadDays:q,scrubMs:L,setScrubMs:A,displayed:I,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:J,estCompletionMs:z}=n,W=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),A,C),Z=c().production,B=d(),E=_??Z.heading,G=e=>o(e,B);if(0===P.length&&0===D.length)return null;const H=D.filter(e=>"shipment"===e.kind),K=D.filter(e=>"inspection"===e.kind),Q=D.filter(e=>"invoice"===e.kind),V=(I?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),Y=I?v(I):0,U=P.find(e=>e.id===F),X=U?N(U):J,ee=
3
+ /* @__PURE__ */h("button",{type:"button",onClick:W.toggle,"aria-pressed":W.playing,title:W.playing?Z.pause:Z.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[W.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
+ /* @__PURE__ */b("span",{children:W.playing?Z.pause:Z.play})]}),te=j&&(x??X)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{W.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??Z.backTo(String(X))}):null,[re,ne]=p(Z.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())," · ",Z.overall(Math.round(Y))," · ",Z.inStock(V)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:Z.noReport})});if("rail"===S){const e=null!=z&&z>=T&&T>O,t=e?{key:"__estimate__",label:Z.estimatedCompletion,dateText:G(z)}: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:D,markers:P,valueMs:A,activeId:L?.id??"",onChange:I,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)=>I(t),onProgress:f,onStop:H.stop}}),
8
+ /* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:T,reports:P,markers:D,valueMs:L,activeId:I?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??Z.start,end:M?.end??(e?Z.estDone:void 0)},onDragStart:W.stop,playback:{playing:W.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:W.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:Z,subject:R,meta:[`${B(O)} → ${B(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:[D.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]}),E.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]}),K.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]}),Q.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:D,markers:P,valueMs:A,activeId:L?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>I(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:E,subject:R,meta:[`${G(O)} → ${G(T)}`,Z.leadTime(q)],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"}),Z.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"})}),Z.shipment]}),K.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"})}),Z.inspection]}),Q.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"})}),Z.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:T,reports:P,markers:D,valueMs:L,activeId:I?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:W.stop,playback:{playing:W.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:W.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{UnitMenu as e}from"./chunk-EZ6SVQSV.js";import{InputNumber_default as a}from"./chunk-Z2MNXUM6.js";import{IconButton_default as i}from"./chunk-SV5RRBVA.js";import{Icon as t}from"./chunk-UIWGVOFH.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{jsx as n,jsxs as o,Fragment as d}from"react/jsx-runtime";var s="h-3.5 w-3.5",l={padding:{top:/* @__PURE__ */n(t,{name:"padding-top","aria-hidden":"true",className:s}),right:/* @__PURE__ */n(t,{name:"padding-right","aria-hidden":"true",className:s}),bottom:/* @__PURE__ */n(t,{name:"padding-bottom","aria-hidden":"true",className:s}),left:/* @__PURE__ */n(t,{name:"padding-left","aria-hidden":"true",className:s}),vertical:/* @__PURE__ */n(t,{name:"padding-y","aria-hidden":"true",className:s}),horizontal:/* @__PURE__ */n(t,{name:"padding-left-right","aria-hidden":"true",className:s})},crop:{top:/* @__PURE__ */n(t,{name:"crop-top","aria-hidden":"true",className:s}),right:/* @__PURE__ */n(t,{name:"crop-right","aria-hidden":"true",className:s}),bottom:/* @__PURE__ */n(t,{name:"crop-bottom","aria-hidden":"true",className:s}),left:/* @__PURE__ */n(t,{name:"crop-left","aria-hidden":"true",className:s}),vertical:/* @__PURE__ */n(t,{name:"crop-y","aria-hidden":"true",className:s}),horizontal:/* @__PURE__ */n(t,{name:"crop-left-right","aria-hidden":"true",className:s})}},m=/* @__PURE__ */n(t,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var c=(e,a,i)=>null===e[i]?a[i]:String(e[i]);function h(e,a){const i=i=>c(e,a,i);return i("left")!==i("right")||i("top")!==i("bottom")}function p({label:i,value:t,onChange:r,each:s,placeholder:m,words:h,min:p=0,max:u=200,step:g=4,readOnly:f,glyphs:b="padding",units:N}){const v=l[b],x=(i,o,d)=>{const s=function(e,a){const i=a.map(a=>e[a]);return i.every(e=>e===i[0])?i[0]:"mixed"}(t,i),l=i.map(e=>c(t,m,e)),b="mixed"!==s&&l.every(e=>e===l[0])?l[0]:"–";/* @__PURE__ */
1
+ import{UnitMenu as e}from"./chunk-Z334LCCX.js";import{InputNumber_default as a}from"./chunk-4GTXRVDF.js";import{IconButton_default as i}from"./chunk-SV5RRBVA.js";import{Icon as t}from"./chunk-T3NLFOLW.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{jsx as n,jsxs as o,Fragment as d}from"react/jsx-runtime";var s="h-3.5 w-3.5",l={padding:{top:/* @__PURE__ */n(t,{name:"padding-top","aria-hidden":"true",className:s}),right:/* @__PURE__ */n(t,{name:"padding-right","aria-hidden":"true",className:s}),bottom:/* @__PURE__ */n(t,{name:"padding-bottom","aria-hidden":"true",className:s}),left:/* @__PURE__ */n(t,{name:"padding-left","aria-hidden":"true",className:s}),vertical:/* @__PURE__ */n(t,{name:"padding-y","aria-hidden":"true",className:s}),horizontal:/* @__PURE__ */n(t,{name:"padding-left-right","aria-hidden":"true",className:s})},crop:{top:/* @__PURE__ */n(t,{name:"crop-top","aria-hidden":"true",className:s}),right:/* @__PURE__ */n(t,{name:"crop-right","aria-hidden":"true",className:s}),bottom:/* @__PURE__ */n(t,{name:"crop-bottom","aria-hidden":"true",className:s}),left:/* @__PURE__ */n(t,{name:"crop-left","aria-hidden":"true",className:s}),vertical:/* @__PURE__ */n(t,{name:"crop-y","aria-hidden":"true",className:s}),horizontal:/* @__PURE__ */n(t,{name:"crop-left-right","aria-hidden":"true",className:s})}},m=/* @__PURE__ */n(t,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var c=(e,a,i)=>null===e[i]?a[i]:String(e[i]);function h(e,a){const i=i=>c(e,a,i);return i("left")!==i("right")||i("top")!==i("bottom")}function p({label:i,value:t,onChange:r,each:s,placeholder:m,words:h,min:p=0,max:u=200,step:g=4,readOnly:f,glyphs:b="padding",units:N}){const v=l[b],x=(i,o,d)=>{const s=function(e,a){const i=a.map(a=>e[a]);return i.every(e=>e===i[0])?i[0]:"mixed"}(t,i),l=i.map(e=>c(t,m,e)),b="mixed"!==s&&l.every(e=>e===l[0])?l[0]:"–";/* @__PURE__ */
2
2
  return n("div",{"data-side":i.join("-"),className:"min-w-0",children:/* @__PURE__ */n(a,{value:"mixed"===s?null:s,onChange:e=>((e,a)=>{const i={...t};for(const t of e)i[t]=a;r(i)})(i,e),min:p,max:u,step:g,snap:!0,precision:0,steppers:"compact",readOnly:f,placeholder:b,prefix:d,suffix:h.unit,suffixControl:N&&/* @__PURE__ */n(e,{value:h.unit,options:N.options,onChange:N.onChange,label:N.label,disabled:f}),"aria-label":o})})};/* @__PURE__ */
3
3
  return n("div",{role:"group","aria-label":i,"data-sides":s?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */o(d,s?{children:[x(["left"],h.sides.left,v.left),x(["top"],h.sides.top,v.top),x(["right"],h.sides.right,v.right),x(["bottom"],h.sides.bottom,v.bottom)]}:{children:[x(["left","right"],h.horizontal,v.horizontal),x(["top","bottom"],h.vertical,v.vertical)]})})}function u({each:e,onChange:a,label:t,disabled:o}){/* @__PURE__ */
4
4
  return n(r,{content:t,children:/* @__PURE__ */n(i,{size:"md","aria-label":t,"aria-pressed":e,disabled:o,onClick:()=>a(!e),children:m})})}export{u as SidesEachToggle,p as SidesInput,h as sidesStartEach};
@@ -0,0 +1,7 @@
1
+ import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-JOD5ISTB.js";import{useTabLayer as n,focusableIn as o}from"./chunk-CDAJKLGL.js";import{PopupMenu as i,PopupMenuDivider as a}from"./chunk-CRRC72EE.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k="inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60",w=/(^|[\s:])!?z-/,D={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function C({trigger:C,items:E,align:L="end",side:j="bottom","aria-label":S,className:$="",triggerClassName:A,menuClassName:K="",minWidth:W=180,linkAs:H,disabled:N,id:T,"aria-describedby":I,"aria-disabled":U=!1,onOpenChange:B,footer:J,footerLabel:R}){const[q,G]=m(!1),[M,z]=m(-1),O=h(null),P=h(null),Q=h(null),V=h(null),Y=h(null),F=null!=J&&!1!==J,X=h({text:"",at:0}),Z=g(),_=g(),ee=T??_,te=h(B);te.current=B;const re=h(q);re.current=q;const ne=v(e=>{G(!1),re.current&&(re.current=!1,te.current?.(!1)),e&&P.current?.focus()},[]),oe=(t,r)=>{const n=E.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(E[i]))return i}return-1},ie=()=>Q.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!q)return;const e=e=>{const t=e.target;if(O.current?.contains(t)||ie()?.contains(t))return;const r=ie()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||ne(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>ne(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[q,ne]);const ae=v(()=>{const e=ie(),t=P.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:L,side:j});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=L},[L,j]);p(()=>{q&&ae()}),b(()=>{if(q)return u(()=>P.current,ae)},[q,ae]),b(()=>{if(!q)return;const t=Q.current,r=e(E[M])?t?.querySelector(`[data-dropdown-index="${M}"]`):null;(r??t)?.focus({preventScroll:!0})},[q,M]),b(()=>{if(q)return f(e=>"Escape"===e.key&&(ne(!0),!0),()=>V.current)},[q,ne]),n(V,q&&F);const le=h(null),se=t=>{const r=E.findIndex(t=>"radio"===t.type&&"colour"===t.mark&&t.checked&&e(t));return r>=0?r:"first"===t?oe(0,1):oe(E.length-1,-1)},de=e=>{z(se(e)),G(!0),re.current||(re.current=!0,le.current=e,B?.(!0))};p(()=>{const e=le.current;if(!q||!e)return;le.current=null;const t=se(e);t!==M&&z(t)});const ce=t(E,Z),ue="function"==typeof J?J({close:()=>ne(!0)}):J,pe={...w.test(K)?{}:{zIndex:s.popup},minWidth:W};/* @__PURE__ */
2
+ return y("div",{ref:O,className:`relative inline-flex ${$}`.trim(),children:[
3
+ /* @__PURE__ */x("button",{ref:P,id:ee,type:"button","aria-haspopup":"menu","aria-expanded":q,"aria-controls":q?Z:void 0,"aria-label":S,"aria-describedby":I,"aria-disabled":U||void 0,disabled:N,onClick:()=>{U||(q?ne(!1):de("first"))},onKeyDown:e=>{U||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),de("first")):"ArrowUp"===e.key&&(e.preventDefault(),de("last")))},className:A??`${k} ${S?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"}`,children:C}),q&&
4
+ /* @__PURE__ */x(i,{portal:!0,className:K,style:pe,children:/* @__PURE__ */y("div",{ref:V,children:[
5
+ /* @__PURE__ */x("div",{ref:Q,id:Z,role:"menu","aria-orientation":"vertical","aria-label":S,"aria-labelledby":S?void 0:ee,"aria-describedby":ce,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),z(oe(M+1,1));else if("ArrowUp"===t.key)t.preventDefault(),z(oe(M-1,-1));else if("Home"===t.key)t.preventDefault(),z(oe(0,1));else if("End"===t.key)t.preventDefault(),z(oe(E.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&Y.current?o(Y.current)[0]:void 0;e?e.focus({preventScroll:!0}):ne(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-X.current.at<500?X.current.text+n:n;X.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?M+1:Math.max(M,0),s=Q.current,d=E.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(E[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void z(n)}})(t)},children:r(E,{menuId:Z,choose:e=>{e.disabled||(ne(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>ne(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===M?0:-1,onMouseEnter:()=>{t.disabled||Y.current?.contains(document.activeElement)||z(e)}}),linkAs:H})}),F&&/* @__PURE__ */y("div",{ref:Y,role:"group","aria-label":R,"data-dropdown-footer":"",onKeyDown:e=>{const t=Y.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=o(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=Q.current?.querySelector(`[data-dropdown-index="${M}"]`);return void(t??Q.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),ne(!0))},children:[
6
+ /* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(a,{})}),
7
+ /* @__PURE__ */x("div",{style:D,children:ue})]})]})})]})}export{C as DropdownMenu,k as TRIGGER_CLASS};
@@ -1,4 +1,4 @@
1
- import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-43MCNASD.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
1
+ import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-TJSJVC6P.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
2
2
  return i(n,{content:f,describe:!1,className:`relative inline-flex shrink-0 ${u}`.trim(),children:/* @__PURE__ */o("span",{"data-item-count":"",className:`${a} ${l?"bg-blue-100 text-blue-700":"bg-[color:color-mix(in_srgb,var(--ink-faint)_14%,transparent)] text-gray-600"}`,children:[
3
3
  /* @__PURE__ */i("span",{"aria-hidden":"true",children:t(s,h)}),
4
4
  /* @__PURE__ */i("span",{className:"sr-only",children:f})]})})}export{s as ItemCount};
@@ -1,4 +1,4 @@
1
- import{Banner as e}from"./chunk-6JDR6T4U.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as n}from"./chunk-43MCNASD.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
1
+ import{Banner as e}from"./chunk-3RDJFCIZ.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as n}from"./chunk-TJSJVC6P.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
2
2
  return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
3
3
  /* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
4
4
  /* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
@@ -1,4 +1,4 @@
1
- import{InputNumber_default as e}from"./chunk-Z2MNXUM6.js";import{useSettingAuto as t}from"./chunk-2NMW66P5.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{useShellStrings as n}from"./chunk-43MCNASD.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as u,useEffect as s}from"react";import{jsx as c,jsxs as m}from"react/jsx-runtime";var f=(e,t,i)=>Math.min(i,Math.max(t,e));function p(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var h=8,v=40;function x(e){return Math.max(1,...e.map(e=>(e??"").length))}function b(e,t,i,n){return Number(f(e,t,i).toFixed(n))}var y=r(null);function w({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
2
- return c(y.Provider,{value:r,children:e})}function g({value:r,onChange:a,min:w,max:g,step:S=1,shiftStep:z,precision:F,inputMin:N,inputMax:k,suffix:M,showInput:j=!0,emptyLabel:$,placeholderValue:L,stepFrom:A,label:C,"aria-labelledby":D,valueText:K,id:E,disabled:R,size:W="md",boxSize:P="sm",className:T="",auto:U}){const V=n(),q=o(),B=t(),H=U??B,I=o(),J=E??q,O=F??p(S),X=N??w,Z=k??g,G=void 0!==$||void 0!==L,Q=A??L,Y=f(r??L??w,w,g),_=d(null),[ee,te]=l(null),ie=Boolean(M);i(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,j]);const ne=e=>K?K(e):"string"==typeof M?`${e.toFixed(O)} ${M}`:void 0,re=null==r?$??(null!=L?ne(L)??String(L):void 0):ne(r),le=`calc(${x([w.toFixed(O),g.toFixed(O),r?.toFixed(O),$,L?.toFixed(O)])}ch + ${(ee?.frame??10+(ie?v:h))+2}px)`,ae=u(y),oe=o(),de=ae?.set;return i(()=>{de&&de(oe,j?le:null)},[de,oe,le,j]),s(()=>()=>de?.(oe,null),[de,oe]),/* @__PURE__ */m("div",{"data-slider":"",className:`flex w-full min-w-0 items-center gap-3 ${T}`.trim(),children:[
3
- /* @__PURE__ */c("input",{id:J,type:"range",min:w,max:g,step:S,value:Y,disabled:R,"aria-label":D?void 0:C,"aria-labelledby":D,"aria-valuetext":re,"aria-describedby":H?I:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=z;if(!i&&!(null==r&&null!=Q))return;e.preventDefault();a(b((r??Q??Y)+t*(i?z??S:S),w,g,O))},onChange:e=>a(b(Number(e.target.value),w,g,O)),className:"min-w-24 flex-1 cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 "+("sm"===W?"h-1":"h-1.5")}),j&&
4
- /* @__PURE__ */c("div",{ref:_,"data-slider-box":"",className:"shrink-0 text-xs",style:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */c(e,{value:r,onChange:e=>{null!=e?e<X||e>Z||a(e):G&&a(null)},min:X,max:Z,step:S,shiftStep:z,stepFrom:Q,precision:O,snap:!0,allowEmpty:G,suffix:M,disabled:R,placeholder:$??(null!=L?L.toFixed(O):void 0),size:P,auto:H,"aria-label":C?V.slider.value(C):void 0,"aria-labelledby":C?void 0:D})}),H&&/* @__PURE__ */c("span",{id:I,hidden:!0,children:V.settingView.auto})]})}export{g as Slider,w as SliderGroup,b as settleSliderValue,x as sliderBoxChars,p as stepDecimals};
1
+ import{InputNumber_default as e}from"./chunk-4GTXRVDF.js";import{useSettingAuto as t}from"./chunk-2NMW66P5.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{useShellStrings as n}from"./chunk-TJSJVC6P.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as u,useEffect as s}from"react";import{jsx as c,jsxs as m}from"react/jsx-runtime";var f=(e,t,i)=>Math.min(i,Math.max(t,e));function p(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var h=8,v=40;function x(e){return Math.max(1,...e.map(e=>(e??"").length))}function b(e,t,i,n){return Number(f(e,t,i).toFixed(n))}var y=r(null);function w({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
2
+ return c(y.Provider,{value:r,children:e})}function g({value:r,onChange:a,min:w,max:g,step:S=1,shiftStep:z,precision:F,inputMin:k,inputMax:N,suffix:j,showInput:$=!0,emptyLabel:L,placeholderValue:M,stepFrom:C,label:D,"aria-labelledby":K,valueText:A,id:R,disabled:T,size:V="md",boxSize:E="sm",className:J="",auto:P}){const W=n(),q=o(),B=t(),G=P??B,H=o(),I=R??q,O=F??p(S),U=k??w,X=N??g,Q=void 0!==L||void 0!==M,Y=C??M,Z=f(r??M??w,w,g),_=d(null),[ee,te]=l(null),ie=Boolean(j);i(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,$]);const ne=e=>A?A(e):"string"==typeof j?`${e.toFixed(O)} ${j}`:void 0,re=null==r?L??(null!=M?ne(M)??String(M):void 0):ne(r),le=`calc(${x([w.toFixed(O),g.toFixed(O),r?.toFixed(O),L,M?.toFixed(O)])}ch + ${(ee?.frame??10+(ie?v:h))+2}px)`,ae=u(y),oe=o(),de=ae?.set;return i(()=>{de&&de(oe,$?le:null)},[de,oe,le,$]),s(()=>()=>de?.(oe,null),[de,oe]),/* @__PURE__ */m("div",{"data-slider":"",className:`flex w-full min-w-0 items-center gap-3 ${J}`.trim(),children:[
3
+ /* @__PURE__ */c("input",{id:I,type:"range",min:w,max:g,step:S,value:Z,disabled:T,"aria-label":K?void 0:D,"aria-labelledby":K,"aria-valuetext":re,"aria-describedby":G?H:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=z;if(!i&&!(null==r&&null!=Y))return;e.preventDefault();a(b((r??Y??Z)+t*(i?z??S:S),w,g,O))},onChange:e=>a(b(Number(e.target.value),w,g,O)),className:"min-w-24 flex-1 cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 "+("sm"===V?"h-1":"h-1.5")}),$&&
4
+ /* @__PURE__ */c("div",{ref:_,"data-slider-box":"",className:"shrink-0 text-xs",style:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */c(e,{value:r,onChange:e=>{null!=e?e<U||e>X||a(e):Q&&a(null)},min:U,max:X,step:S,shiftStep:z,stepFrom:Y,precision:O,snap:!0,allowEmpty:Q,suffix:j,disabled:T,placeholder:L??(null!=M?M.toFixed(O):void 0),size:E,auto:G,"aria-label":D?W.slider.value(D):void 0,"aria-labelledby":D?void 0:K})}),G&&/* @__PURE__ */c("span",{id:H,hidden:!0,children:W.settingView.auto})]})}export{g as Slider,w as SliderGroup,b as settleSliderValue,x as sliderBoxChars,p as stepDecimals};
@@ -1,4 +1,4 @@
1
- import{IconButton_default as e}from"./chunk-SV5RRBVA.js";import{CloseGlyph as t}from"./chunk-VQJLH2BU.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-7KIDOIPY.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{Icon as i}from"./chunk-UIWGVOFH.js";import{useShellStrings as c}from"./chunk-43MCNASD.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
1
+ import{IconButton_default as e}from"./chunk-SV5RRBVA.js";import{CloseGlyph as t}from"./chunk-RIF6BFEH.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-Z7RXWXR5.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{Icon as i}from"./chunk-T3NLFOLW.js";import{useShellStrings as c}from"./chunk-TJSJVC6P.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
2
2
  return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
3
3
  return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
4
4
  return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
@@ -6,7 +6,7 @@ return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,childre
6
6
  return u("li",{className:"flex max-w-full items-center gap-2 rounded-md border border-line bg-surface-sunken py-1 pl-2 pr-1 text-xs text-ink",children:[c?/* @__PURE__ */d("img",{src:c,alt:"",className:"h-6 w-6 shrink-0 rounded object-cover"}):/* @__PURE__ */d("span",{className:"text-gray-400",children:/* @__PURE__ */d(p,{})}),
7
7
  /* @__PURE__ */d("span",{className:"min-w-0 truncate",title:e.name,children:e.name}),
8
8
  /* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:n(e.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(e.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(t,{className:"h-3.5 w-3.5"})})]},`${e.name}-${e.size}-${s}`)})})}function b({onClick:t,count:n=0,variant:r="button",label:a,disabled:i=!1}){const l=c().files,o=a??l.attach,p=n>0?`${o} (${n})`:o;return"icon"===r?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
9
- /* @__PURE__ */d(e,{"aria-label":p,onClick:t,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-accent-fill px-1 text-center text-2xs font-semibold leading-4 text-on-accent",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:t,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function x({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:x,trigger:g="button",actions:k,onReject:j,className:N="",children:v}){const L=r({accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),y=l([]);return o(()=>{j&&L.rejections.length>0&&L.rejections!==y.current&&(y.current=L.rejections,j(L.rejections))},[L.rejections,j]),/* @__PURE__ */u(h,{intake:L,dropLabel:p,className:N,children:[v,
9
+ /* @__PURE__ */d(e,{"aria-label":p,onClick:t,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-accent-fill px-1 text-center text-2xs font-semibold leading-4 text-on-accent",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:t,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function x({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:x,trigger:g="button",actions:k,onReject:j,className:N="",children:v}){const L=r({accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),R=l([]);return o(()=>{j&&L.rejections.length>0&&L.rejections!==R.current&&(R.current=L.rejections,j(L.rejections))},[L.rejections,j]),/* @__PURE__ */u(h,{intake:L,dropLabel:p,className:N,children:[v,
10
10
  /* @__PURE__ */d(f,{files:e,disabled:m,onRemove:n=>{L.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
11
11
  /* @__PURE__ */u("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[
12
12
  /* @__PURE__ */d(b,{onClick:L.open,count:e.length,variant:g,label:x,disabled:m}),k]}),
@@ -1,4 +1,4 @@
1
- import{isSafeLinkHref as e}from"./chunk-Q5Z3KHT2.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-UIWGVOFH.js";import{useShellStrings as r}from"./chunk-43MCNASD.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-EVYD6UFQ.js";import{Icon as n}from"./chunk-T3NLFOLW.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.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,4 +1,4 @@
1
- import{Avatar as e}from"./chunk-NHWDB7R6.js";import{StatCard as a,Card as t}from"./chunk-EOGXCGQF.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-3UHTHQGK.js";import{ColumnChart as l}from"./chunk-75MSXRFY.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
1
+ import{Avatar as e}from"./chunk-QMNDKNK2.js";import{StatCard as a,Card as t}from"./chunk-BYDSBDVS.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-5S4YF5XA.js";import{ColumnChart as l}from"./chunk-SFFELHLP.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
2
2
  return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
3
3
  /* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */m("div",{children:[
@@ -1,2 +1,2 @@
1
- import{fromDateKey as t,toDateKey as e}from"./chunk-2HMNOLKX.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{pad2 as r}from"./chunk-LF27WIN2.js";import{useShellLocale as i}from"./chunk-43MCNASD.js";import{forwardRef as a}from"react";import{jsx as o}from"react/jsx-runtime";var m=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/;function s(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${e(n=t)}T${r(n.getHours())}:${r(n.getMinutes())}`:m.test(t)?t:"";var n}var u=a(function({value:e,onChange:r,min:a,max:u,invalid:l,size:c,className:d="",...f},p){const v=i();/* @__PURE__ */
1
+ import{fromDateKey as t,toDateKey as e}from"./chunk-2HMNOLKX.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{pad2 as r}from"./chunk-LF27WIN2.js";import{useShellLocale as i}from"./chunk-TJSJVC6P.js";import{forwardRef as a}from"react";import{jsx as o}from"react/jsx-runtime";var m=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/;function s(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${e(n=t)}T${r(n.getHours())}:${r(n.getMinutes())}`:m.test(t)?t:"";var n}var u=a(function({value:e,onChange:r,min:a,max:u,invalid:l,size:c,className:d="",...f},p){const v=i();/* @__PURE__ */
2
2
  return o("input",{ref:p,type:"datetime-local",lang:v,"aria-invalid":l||void 0,value:s(e),min:s(a)||void 0,max:s(u)||void 0,onChange:e=>r?.(function(e){if(!m.test(e))return null;const[n,r]=e.split("T"),i=t(n),[a,o,s=0]=r.split(":").map(Number);return!i||a>23||o>59||s>59?null:(i.setHours(a,o,s),i)}(e.target.value)),className:n({invalid:l,size:c,className:d}),...f})});export{u as DateTimePicker_default};
@@ -1 +1 @@
1
- import{useShellStrings as t}from"./chunk-43MCNASD.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-TJSJVC6P.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,3 +1,3 @@
1
- import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as o}from"./chunk-43MCNASD.js";import{jsxs as t,jsx as a}from"react/jsx-runtime";function l(n){const o=n.depth?{paddingInlineStart:16*n.depth+"px"}:{};/* @__PURE__ */
1
+ import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as o}from"./chunk-TJSJVC6P.js";import{jsxs as t,jsx as a}from"react/jsx-runtime";function l(n){const o=n.depth?{paddingInlineStart:16*n.depth+"px"}:{};/* @__PURE__ */
2
2
  return t("span",{"data-move-target":"",className:"flex min-w-0 flex-col",style:o,children:[
3
3
  /* @__PURE__ */a("span",{children:n.label}),n.disabledReason&&/* @__PURE__ */a("span",{className:e(),children:n.disabledReason})]})}function r({count:e,kind:o="file",targets:t,onPick:a},r=n.media){const i=[{type:"label",key:"move-to",label:r.moveTo(e,o)}];if(!t.length)return i.push({type:"status",key:"move-nowhere",label:r.moveNowhere}),i;let s;return t.forEach((e,n)=>{(n>0&&e.group!==s||0===n&&e.group)&&(n>0&&i.push({type:"divider",key:`group-line:${n}`}),e.group&&i.push({type:"label",key:`group:${n}`,label:e.group})),s=e.group,i.push({key:e.key,label:l(e),disabled:!!e.disabledReason,onSelect:()=>a(e)})}),i}function i(e,o=n.media){const{head:t=!0,icon:a,disabled:l,key:i="move-to-menu",...s}=e,u=r(s,o);return{type:"submenu",key:i,label:o.moveToMenu,icon:a,disabled:l,maxHeight:320,items:t?u:u.slice(1)}}function s(e){return r(e,o().media)}export{r as mediaMoveItems,i as mediaMoveSubmenu,s as useMediaMoveItems};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-UIWGVOFH.js";import{SpinnerRing as t}from"./chunk-R2VKEMZH.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:t,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
1
+ import{Icon as e}from"./chunk-T3NLFOLW.js";import{SpinnerRing as t}from"./chunk-R2VKEMZH.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:t,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
2
2
  /* @__PURE__ */l("button",{type:"button",onClick:()=>{h(!x),d?.(!x)},"aria-expanded":x,"aria-controls":x?g:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
3
3
  /* @__PURE__ */n(e,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(x?"rotate-90":"")}),
4
4
  /* @__PURE__ */n("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:t})]}),x&&/* @__PURE__ */n("ol",{id:g,"aria-label":m,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:p})]})}var o={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},d={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function m({status:a}){switch(a){case"active":/* @__PURE__ */
@@ -0,0 +1,22 @@
1
+ import{ChartBrush as t}from"./chunk-KOPTKTHN.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-YVIV7SKG.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-EDANELWX.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as V}from"./chunk-2JWPNR2U.js";import{ChartTooltip as $}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as z,CHART_INK as A,STATUS_VARS as S}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as W}from"./chunk-TWVUQUUD.js";import{useShellStrings as E,useShellLocale as L}from"./chunk-TJSJVC6P.js";import{formatPercent as C,formatPlain as D}from"./chunk-C3QOHMR6.js";import{useRef as R,useState as T,useId as I,useEffect as P}from"react";import{jsx as U,jsxs as F}from"react/jsx-runtime";var O=12,K=16,Y=26,B=52,Q=t=>"number"==typeof t&&Number.isFinite(t);function H({series:H,labels:J,height:G=200,stacked:X=!1,stackMode:Z="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const Vt=E().charts,$t=L(),zt=rt??(t=>D(t,$t)),At=ot??zt,St=jt??Vt.noData,Wt=R(null),Et=x(Wt),Lt=Nt??Et,[Ct,Dt]=T(null),[Rt,Tt]=T(null),{highlighted:It}=u(),Pt=I(),Ut=ut??Rt,Ft=p(ht&&Ut?Ut[1]-Ut[0]+1:J.length,pt);if(P(()=>{if(null!==Ct)return W(t=>"Escape"===t.key&&(Dt(null),!0))},[Ct]),kt)/* @__PURE__ */
2
+ return U("div",{className:wt,ref:Wt,children:/* @__PURE__ */U(h,{height:G,width:Nt??Et})});const Ot=J,Kt=ut??Rt??[0,Math.max(0,Ot.length-1)],[Yt,Bt]=Kt,Qt=t=>Ft.slice(ht?t.slice(Yt,Bt+1):t),Ht=lt?Qt(lt):void 0,Jt=H.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(Q)).map(t=>({...t,data:Qt(t.data),pointTones:t.pointTones?Qt(t.pointTones):void 0})),Gt=t=>(ht?Yt:0)+(Ft.view?.[0]??0)+t;if(J=Qt(Ot),0===Jt.length||0===J.length)/* @__PURE__ */
3
+ return U("div",{className:wt,ref:Wt,children:/* @__PURE__ */U("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:G},children:St})});const Xt=J.map((t,e)=>Jt.reduce((t,a)=>t+(Q(a.data[e])?a.data[e]:0),0)),Zt=(t,e)=>Xt[e]>0?t/Xt[e]:null,qt=[];if(X){let t=J.map(()=>0);for(const e of Jt)t=t.map((t,a)=>t+(Q(e.data[a])?e.data[a]:0)),qt.push("percent"===Z?t.map((t,e)=>Zt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!X&&!_t&&void 0===et&&Jt.some(te)&&Jt.some(t=>!te(t)),ae=gt&&!X?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Jt.filter(t=>!te(t)):Jt).filter(t=>!re(t)),le=ee?Jt.filter(te).flatMap(t=>t.data.filter(Q)):[],ne=X?(qt.at(-1)??[]).filter(Q):oe.flatMap(t=>t.data.filter(Q)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:X&&"percent"===Z||_t||void 0!==et?null:b(X?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=X&&"percent"===Z?1:se?se.hi:et??M(Math.max(...ne,0)),me=X&&"percent"===Z?t=>C(Math.round(100*t),0,$t):zt,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),B),fe=ie?w(ie.right.ticks.map(zt),K):K,pe={left:ue,right:Math.max(ue+1,Lt-fe),top:O,bottom:G-Y},ge=j(J.length,{from:pe.left,to:pe.right}),ye=_t?V(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Jt.filter(re),Me=Math.max(0,...J.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,Q(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,Ve=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),$e=t=>e=>{e.preventDefault(),Dt(e=>{const a=(e??0)+t;return Math.min(J.length-1,Math.max(0,a))})},ze=Math.max(1,Math.ceil(J.length/Math.max(1,Math.floor(Lt/96))));/* @__PURE__ */
4
+ return F("div",{className:`relative ${wt??""}`,ref:Wt,children:[
5
+ /* @__PURE__ */F("svg",{width:"100%",height:G,viewBox:`0 0 ${Lt} ${G}`,role:"img","aria-label":Vt.overIntervals(Jt.map(t=>t.label),J.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Dt(null),onBlur:()=>Dt(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Ct&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Gt(Ct));"ArrowRight"===t.key&&$e(1)(t),"ArrowLeft"===t.key&&$e(-1)(t)},children:[
6
+ /* @__PURE__ */U("defs",{children:/* @__PURE__ */U("clipPath",{id:Pt,children:/* @__PURE__ */U("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
7
+ /* @__PURE__ */U(n,{id:Pt,fills:Jt.map((t,e)=>({color:z(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:X?.42:.3,reveal:!!xt&&vt}),Ve.map(t=>/* @__PURE__ */U("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:A.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
8
+ /* @__PURE__ */U("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:A.axis,strokeWidth:1,shapeRendering:"crispEdges"}),Ve.map(t=>/* @__PURE__ */U("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&Ve.map((t,e)=>/* @__PURE__ */U("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */U("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:A.label,children:nt}),
9
+ /* @__PURE__ */U("g",{clipPath:`url(#${Pt})`,mask:xt&&vt?`url(#${m(Pt)})`:void 0,children:Jt.map((t,e)=>{const n=z(t.slot,t.color,t.tone),m=t.mode??(X?"area":"line"),h=f(t.key,It);if("step"===m){const e=J.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>Q(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
10
+ return U("path",{d:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=J.map((a,r)=>{const o=X?qt[e]?.[r]:t.data[r];return Q(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */U("g",{opacity:h??void 0,className:"rosh-viz-mark",children:J.map((o,l)=>{const i=t.data[l];if(!Q(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Jt[t]?.key)).reduce((t,a)=>t+Math.max(0,Q(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
11
+ return U("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?S[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */U("g",{opacity:h??void 0,className:"rosh-viz-mark",children:J.map((l,c)=>{const d=X?qt[e]?.[c]:t.data[c];if(!Q(d))return null;const m=o(d);/* @__PURE__ */
12
+ return U("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=X&&e>0?J.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
13
+ return F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||X)&&
14
+ /* @__PURE__ */U("path",{d:y,fill:c(Pt,e,t.fillVariant??bt,n),stroke:"none"}),
15
+ /* @__PURE__ */U("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??S[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
16
+ return F("g",{children:[
17
+ /* @__PURE__ */U("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */U("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Jt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=z(t.slot,t.color,t.tone),l=[...t.data].map(Q).lastIndexOf(!0),n="all"===r?J.map((t,e)=>e).filter(e=>Q(X?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
18
+ return F("g",{children:[n.map(r=>{const n=X?qt[a]?.[r]:t.data[r];return Q(n)?/* @__PURE__ */U(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${J[r]}: ${t.label} ${zt(n)}`},r):null}),st&&l>=0&&Q(X?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */U("text",{x:ge.center(l)-10,y:je(t)(X?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(X?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),J.map((t,e)=>e%ze===0?/* @__PURE__ */U("text",{x:ge.center(e),y:G-8,textAnchor:"middle",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Ct&&/* @__PURE__ */U("line",{x1:ge.center(Ct),y1:pe.top,x2:ge.center(Ct),y2:pe.bottom,stroke:A.axis,strokeWidth:1}),ae&&Me>0&&
19
+ /* @__PURE__ */F("g",{pointerEvents:"none","data-column-strip":"true",children:[
20
+ /* @__PURE__ */U("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:A.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
21
+ /* @__PURE__ */U("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Me)})]}),Ft.drag&&/* @__PURE__ */U(g,{x0:ge(Ft.drag[0]),x1:ge(Ft.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),J.map((t,e)=>/* @__PURE__ */U("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Dt(e),onPointerDown:()=>Ft.press(e),onPointerEnter:()=>Ft.over(e),onPointerUp:Ft.release,onClick:yt?()=>yt(Gt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Ft.view&&/* @__PURE__ */U(y,{from:Ht?.[0]??J[0],to:Ht?.at(-1)??J[J.length-1],count:J.length,total:X&&"percent"!==Z?At(Xt.reduce((t,e)=>t+e,0)):ae?At(be.reduce((t,e)=>t+e.data.filter(Q).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Jt).filter(t=>t.data.some(Q)).map(t=>{const e=t.data.filter(Q),a=z(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=X||"column"===t.mode?At(r):Vt.zoomLevel(At(r/e.length),At(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Ft.clear}),ht&&Ot.length>2&&/* @__PURE__ */U(t,{className:"mt-1",labels:Ot,width:Lt,data:H[0]?.data??[],range:Kt,onRangeChange:t=>{ft?ft(t):Tt(t)}}),null!==Ct&&
22
+ /* @__PURE__ */U("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(Ct),ge.bandwidth,Lt),children:/* @__PURE__ */U($,{title:Ht?.[Ct]??J[Ct],rows:Jt.map((t,e)=>({key:t.key,label:t.label,color:z(t.slot,t.color,t.tone),value:Q(t.data[Ct])?X&&"percent"===Z?`${C(100*(Zt(t.data[Ct],Ct)??0),1,$t)} · ${At(t.data[Ct])}`:At(t.data[Ct]):void 0})),footnote:X&&"percent"===Z?Vt.inBucket(At(Xt[Ct])):void 0})})]})}export{H as TimeSeriesChart};
@@ -1,23 +1,23 @@
1
- import{Icon as e}from"./chunk-UIWGVOFH.js";import{LoadingSpinner as t}from"./chunk-R2VKEMZH.js";import{toast_default as n}from"./chunk-TRWHVG3A.js";import{useShellStrings as r}from"./chunk-43MCNASD.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
2
- /* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,z]=s(1),[W,_]=s(0),[D,P]=s(1),[S,A]=s(!0),[L,T]=s(!0),$=i(x.loadFailed);$.current=x.loadFailed,l(()=>{let e=!1;return T(!0),z(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(t=>{e||(j(t),_(t.numPages),T(!1))}).catch(()=>{e||(n.error($.current),T(!1))}),()=>{e=!0}},[a,g,w]),l(()=>{if(!M||!S||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});P(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,S,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:D}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,D]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const O="page"===d?x.fitPage:x.fitWidth,H="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-T3NLFOLW.js";import{LoadingSpinner as t}from"./chunk-R2VKEMZH.js";import{toast_default as n}from"./chunk-JTZVUO3I.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
2
+ /* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[j,M]=s(null),[E,z]=s(1),[P,_]=s(0),[L,T]=s(1),[W,D]=s(!0),[S,O]=s(!0),$=i(x.loadFailed);$.current=x.loadFailed,l(()=>{let e=!1;return O(!0),z(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(t=>{e||(M(t),_(t.numPages),O(!1))}).catch(()=>{e||(n.error($.current),O(!1))}),()=>{e=!0}},[a,g,w]),l(()=>{if(!j||!W||!N.current)return;const e=()=>{const e=N.current;e&&j.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});T(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[j,E,W,d]),l(()=>{if(!j||!k.current)return;let e=!1,t=null,n=null;return j.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:L}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[j,E,L]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const A="page"===d?x.fitPage:x.fitWidth,U="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
3
3
  return m("div",{className:"flex flex-col h-full",children:[
4
4
  /* @__PURE__ */m(f,{children:[
5
5
  /* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>z(e=>Math.max(1,e-1)),disabled:E<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(e,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
6
- /* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,W)}),
7
- /* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>z(e=>Math.min(W,e+1)),disabled:E>=W,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(e,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
6
+ /* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,P)}),
7
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>z(e=>Math.min(P,e+1)),disabled:E>=P,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(e,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
8
8
  /* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
9
- /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{A(!1),P(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
10
- /* @__PURE__ */m("select",{value:S?"fit":v.includes(Math.round(100*D))?Math.round(100*D):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(A(!1),P(Number(t)/100)):A(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
11
- /* @__PURE__ */u("option",{value:"fit",children:O}),!S&&!v.includes(Math.round(100*D))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*D),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
12
- /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{A(!1),P(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
13
- /* @__PURE__ */u("button",{type:"button",onClick:()=>A(!0),"aria-pressed":S,className:H+(S?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
9
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{D(!1),T(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:U,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
10
+ /* @__PURE__ */m("select",{value:W?"fit":v.includes(Math.round(100*L))?Math.round(100*L):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(D(!1),T(Number(t)/100)):D(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
11
+ /* @__PURE__ */u("option",{value:"fit",children:A}),!W&&!v.includes(Math.round(100*L))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*L),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
12
+ /* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{D(!1),T(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:U,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
13
+ /* @__PURE__ */u("button",{type:"button",onClick:()=>D(!0),"aria-pressed":W,className:U+(W?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
14
14
  /* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
15
- /* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const e=window.open("","_blank");if(!e)return void n.error(x.allowPopups);const t=[];for(let e=1;e<=W;e++)t.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(t).then(t=>{var n;e.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),e.document.write(t.map(e=>`<img src="${e}"/>`).join("")),e.document.write("</body></html>"),e.document.close(),setTimeout(()=>{e.print(),e.close()},300)})},className:H,children:[
15
+ /* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!j)return;const e=window.open("","_blank");if(!e)return void n.error(x.allowPopups);const t=[];for(let e=1;e<=P;e++)t.push(j.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(t).then(t=>{var n;e.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),e.document.write(t.map(e=>`<img src="${e}"/>`).join("")),e.document.write("</body></html>"),e.document.close(),setTimeout(()=>{e.print(),e.close()},300)})},className:U,children:[
16
16
  /* @__PURE__ */u(e,{name:"print",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.print]}),
17
- /* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:H,children:[
18
- /* @__PURE__ */u(e,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:H,children:[
17
+ /* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:U,children:[
18
+ /* @__PURE__ */u(e,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:U,children:[
19
19
  /* @__PURE__ */u(e,{name:"email",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.email]})]}),
20
- /* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<W?(e.preventDefault(),z(e=>Math.min(W,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!M)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<W&&(e.preventDefault(),z(e=>Math.min(W,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(W)))},children:L?/* @__PURE__ */u(t,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
20
+ /* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!j)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<P?(e.preventDefault(),z(e=>Math.min(P,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!j)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<P&&(e.preventDefault(),z(e=>Math.min(P,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(P)))},children:S?/* @__PURE__ */u(t,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
21
21
  /* @__PURE__ */u("style",{children:'\n.preview-pdf-textlayer {\n position: absolute;\n inset: 0;\n overflow: clip;\n line-height: 1;\n text-align: initial;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n.preview-pdf-textlayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n}\n.preview-pdf-textlayer > :not(.markedContent),\n.preview-pdf-textlayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n.preview-pdf-textlayer .markedContent {\n display: contents;\n}\n.preview-pdf-textlayer span[role="img"] {\n user-select: none;\n cursor: default;\n}\n.preview-pdf-textlayer ::selection {\n background: rgba(0, 80, 255, 0.25);\n}\n.preview-pdf-textlayer br::selection {\n background: transparent;\n}\n.preview-pdf-textlayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n user-select: none;\n}\n.preview-pdf-textlayer.selecting .endOfContent {\n top: 0;\n}\n'}),
22
22
  /* @__PURE__ */m("div",{className:"relative shadow-lg rounded",children:[
23
23
  /* @__PURE__ */u("canvas",{ref:k,className:"block rounded"}),
@@ -1 +1 @@
1
- import{getFilesStore as e,setSpreadsheetPreview as t}from"./chunk-OY3JH66O.js";import{setPdfPreview as n}from"./chunk-ESL5TDNA.js";import{toast_default as i}from"./chunk-TRWHVG3A.js";var o="react-os-shell:preview-opened";async function a(a){const{filePath:r,filename:l,kind:c,onStaged:s,load:d}=a;try{const a=d?d():e().readShortcut?.(r)??null;let f;if(a)f=await a;else{const e=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(r)}`,{credentials:"include"});if(!e.ok)return i.error(`Download failed (${e.status})`),!1;f=await e.blob()}if("csv"===c){const e=await f.text();t({csv:e,filename:l}),s?.("/spreadsheet")}else{const e=URL.createObjectURL(f);n({url:e,filename:l,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(o,{detail:{filePath:r,filename:l,kind:c}})),!0}catch(e){return i.error(e?.message||"Open failed"),!1}}export{o as PREVIEW_OPENED_EVENT,a as openPreviewFile};
1
+ import{getFilesStore as e,setSpreadsheetPreview as t}from"./chunk-HV4VQ5XV.js";import{setPdfPreview as n}from"./chunk-ESL5TDNA.js";import{toast_default as i}from"./chunk-JTZVUO3I.js";var o="react-os-shell:preview-opened";async function a(a){const{filePath:r,filename:l,kind:c,onStaged:s,load:d}=a;try{const a=d?d():e().readShortcut?.(r)??null;let f;if(a)f=await a;else{const e=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(r)}`,{credentials:"include"});if(!e.ok)return i.error(`Download failed (${e.status})`),!1;f=await e.blob()}if("csv"===c){const e=await f.text();t({csv:e,filename:l}),s?.("/spreadsheet")}else{const e=URL.createObjectURL(f);n({url:e,filename:l,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(o,{detail:{filePath:r,filename:l,kind:c}})),!0}catch(e){return i.error(e?.message||"Open failed"),!1}}export{o as PREVIEW_OPENED_EVENT,a as openPreviewFile};
@@ -1,4 +1,4 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-2JXGTA73.js";import{navIcons as r}from"./chunk-4LXCCZDM.js";import{VERSION as n}from"./chunk-TWFD7A3K.js";import{Icon as s}from"./chunk-UIWGVOFH.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-43MCNASD.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:h.preview},files:{name:"Files",version:"1.3.0",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:s}){const i=x[s],[h,v]=l(!1),N=m(()=>v(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,N,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,A]=a(b.partOf);/* @__PURE__ */
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-RAQBZUU2.js";import{navIcons as r}from"./chunk-4LXCCZDM.js";import{VERSION as n}from"./chunk-PYBPJL5R.js";import{Icon as s}from"./chunk-T3NLFOLW.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-TJSJVC6P.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:h.preview},files:{name:"Files",version:"1.4.0",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:s}){const i=x[s],[h,v]=l(!1),N=m(()=>v(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,N,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,C]=a(b.partOf);/* @__PURE__ */
2
2
  return d(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */f("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */d("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
4
4
  /* @__PURE__ */d("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:i.name}),
@@ -6,4 +6,4 @@ return d(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1
6
6
  /* @__PURE__ */d("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[s]}),
7
7
  /* @__PURE__ */f("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
8
  /* @__PURE__ */f("p",{className:"text-2xs text-ink-faint",children:[j,
9
- /* @__PURE__ */d("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),A]}),n&&/* @__PURE__ */d("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(n)})]})]})})}export{v as AboutApp,x as BUILTIN_APP_INFO};
9
+ /* @__PURE__ */d("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),C]}),n&&/* @__PURE__ */d("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(n)})]})]})})}export{v as AboutApp,x as BUILTIN_APP_INFO};
@@ -0,0 +1 @@
1
+ import{requestFilesTrashView as n}from"./chunk-HV4VQ5XV.js";var e=null;function t(n){e=n}function u(){return e}function r(){n()}var o="/files",i=null,l=null,s=0,c=/* @__PURE__ */new Set,f=()=>{l=i&&{id:i.id,request:i.request},c.forEach(n=>n())};function d(n,e){if(!i||i.id!==n)return;const{resolve:t}=i;i=null,f(),t(e)}function a(n,e){return new Promise(t=>{const u=i;s+=1,i={id:e.requestId??`files-choose-${s}`,request:e,resolve:t},f(),u?.resolve(null),n(o,{reuse:!0})})}function v(n){d(n,null)}function h(){return l}function m(n){return c.add(n),()=>{c.delete(n)}}function q(n,e){d(n,e)}function x(n,e){if(0===n.extensions.length)return!0;const t=e.lastIndexOf(".");return t>0&&n.extensions.includes(e.slice(t+1).toLowerCase())}var w=0;function V(){w+=1;let n=!1;return()=>{n||(n=!0,w-=1,setTimeout(()=>{0===w&&i&&d(i.id,null)},0))}}export{o as FILES_ROUTE,q as answerFilesChoice,x as choiceTakes,a as chooseInFiles,h as getFilesChoice,u as getFilesDemoTree,V as holdFilesChoice,r as openFilesInTrashMode,t as setFilesDemoTree,m as subscribeFilesChoice,v as withdrawFilesChoice};
@@ -1,2 +1,2 @@
1
- import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as r}from"./chunk-43MCNASD.js";import{jsx as o}from"react/jsx-runtime";function i(){const i=r().loading;/* @__PURE__ */
1
+ import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.js";import{jsx as o}from"react/jsx-runtime";function i(){const i=r().loading;/* @__PURE__ */
2
2
  return o(n,{size:"sm",padding:"p-8",label:i.label})}export{i as LoadingSpinner};
@@ -1,4 +1,4 @@
1
- import{CartesianPlot as e}from"./chunk-525O4AUQ.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-43MCNASD.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
1
+ import{CartesianPlot as e}from"./chunk-YRG6XJ6M.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-TJSJVC6P.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
2
2
  return m(e,{labels:s.map(e=>e.label),values:j,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:e=>{const i=s[e];/* @__PURE__ */
3
3
  return m(t,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
4
4
  return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
@@ -1,8 +1,8 @@
1
- import{optionMatches as e,OptionSublabel as t}from"./chunk-7HIHQR3X.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-43MCNASD.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:D,id:L,className:M="",tone:W,tooltip:E,split:H}){const[S,Y]=m(!1),[$,G]=m(""),I=d(),B=h(null),F=h(null),J=h(null),T=s(B,S),A=e=>k.find(t=>t.value===e)?.label??e,Z=p(()=>{const t=new Set(o),n=[],r=$.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,$]),z=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},K=e=>{e&&!o.includes(e)?(y([...o,e]),G("")):G("")},O=e=>y(o.filter(t=>t!==e)),P=()=>{const e=$.trim();if(H&&e)return z(e.split(H)),void G("");j&&e?K(e):G("")},Q=h(()=>{});Q.current=()=>{P(),Y(!1)},f(()=>{if(!S)return;const e=e=>{const t=e.target;B.current?.contains(t)||J.current?.contains(t)||(P(),Y(!1))};document.addEventListener("mousedown",e);const t=l(()=>Q.current());return()=>{document.removeEventListener("mousedown",e),t()}});const R=k.length>0;/* @__PURE__ */
1
+ import{optionMatches as e,OptionSublabel as t}from"./chunk-Q3RJMQYE.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-TJSJVC6P.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:D,id:L,className:M="",tone:E,tooltip:J,split:W}){const[Y,S]=m(!1),[$,G]=m(""),T=d(),B=h(null),F=h(null),H=h(null),I=s(B,Y),P=e=>k.find(t=>t.value===e)?.label??e,Q=p(()=>{const t=new Set(o),n=[],r=$.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,$]),Z=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},z=e=>{e&&!o.includes(e)?(y([...o,e]),G("")):G("")},A=e=>y(o.filter(t=>t!==e)),K=()=>{const e=$.trim();if(W&&e)return Z(e.split(W)),void G("");j&&e?z(e):G("")},O=h(()=>{});O.current=()=>{K(),S(!1)},f(()=>{if(!Y)return;const e=e=>{const t=e.target;B.current?.contains(t)||H.current?.contains(t)||(K(),S(!1))};document.addEventListener("mousedown",e);const t=l(()=>O.current());return()=>{document.removeEventListener("mousedown",e),t()}});const R=k.length>0;/* @__PURE__ */
2
2
  return g("div",{ref:B,className:"relative",children:[
3
- /* @__PURE__ */g("div",{onMouseDown:e=>{D||e.target.closest("button")||(e.preventDefault(),F.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${D?"bg-gray-50 cursor-not-allowed":""} ${M}`}),children:[o.map(e=>{const t=W?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
4
- /* @__PURE__ */x("span",{className:"truncate",children:A(e)}),!D&&/* @__PURE__ */x("button",{type:"button","aria-label":I.select.removeItem?.(A(e))??`${I.select.remove} ${A(e)}`,onClick:()=>O(e),className:n.remove,children:"×"})]},e),l=E?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
5
- /* @__PURE__ */x("input",{id:L,ref:F,type:"text",autoComplete:"off",role:"combobox","aria-expanded":S&&R,"aria-invalid":C||void 0,disabled:D,value:$,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(H){const t=e.split(H);if(t.length>1)return z(t.slice(0,-1)),void G(t[t.length-1])}G(e)})(e.target.value),Y(!0)},onFocus:()=>{!D&&R&&Y(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=$.trim(),o=n?Z.filter(t=>e(t,n.toLowerCase())):[];1===o.length?K(o[0].value):P()}else"Backspace"===t.key&&""===$&&o.length>0?O(o[o.length-1]):"Escape"===t.key?(Y(!1),G(""),F.current?.blur()):"Tab"===t.key&&(P(),Y(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),S&&R&&v(
6
- /* @__PURE__ */x("div",{ref:J,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:T?.left,right:T?.right,top:T?.top,bottom:T?.bottom,minWidth:T?.minWidth,maxWidth:T?.maxWidth??a,width:"max-content",visibility:T?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:T?.maxHeight??c},children:0===Z.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?I.select.allSelected:I.select.noMatches}):Z.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),K(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
3
+ /* @__PURE__ */g("div",{onMouseDown:e=>{D||e.target.closest("button")||(e.preventDefault(),F.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${D?"bg-gray-50 cursor-not-allowed":""} ${M}`}),children:[o.map(e=>{const t=E?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
4
+ /* @__PURE__ */x("span",{className:"truncate",children:P(e)}),!D&&/* @__PURE__ */x("button",{type:"button","aria-label":T.select.removeItem?.(P(e))??`${T.select.remove} ${P(e)}`,onClick:()=>A(e),className:n.remove,children:"×"})]},e),l=J?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
5
+ /* @__PURE__ */x("input",{id:L,ref:F,type:"text",autoComplete:"off",role:"combobox","aria-expanded":Y&&R,"aria-invalid":C||void 0,disabled:D,value:$,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(W){const t=e.split(W);if(t.length>1)return Z(t.slice(0,-1)),void G(t[t.length-1])}G(e)})(e.target.value),S(!0)},onFocus:()=>{!D&&R&&S(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=$.trim(),o=n?Q.filter(t=>e(t,n.toLowerCase())):[];1===o.length?z(o[0].value):K()}else"Backspace"===t.key&&""===$&&o.length>0?A(o[o.length-1]):"Escape"===t.key?(S(!1),G(""),F.current?.blur()):"Tab"===t.key&&(K(),S(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),Y&&R&&v(
6
+ /* @__PURE__ */x("div",{ref:H,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:I?.left,right:I?.right,top:I?.top,bottom:I?.bottom,minWidth:I?.minWidth,maxWidth:I?.maxWidth??a,width:"max-content",visibility:I?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:I?.maxHeight??c},children:0===Q.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?T.select.allSelected:T.select.noMatches}):Q.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
7
7
  /* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
8
8
  /* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
@@ -0,0 +1,5 @@
1
+ import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-MBXCXFQO.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as s,useScrollLock as n}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-T3NLFOLW.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-TJSJVC6P.js";import{useRef as f,useId as h,useState as x,useEffect as b}from"react";import{createPortal as v}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:C,description:L,role:T="dialog",children:W,footer:D,blocking:J=!1,size:F="md",aside:V=!1,dirty:X=!1,initialFocus:P,"aria-label":Q,"aria-labelledby":S,"aria-describedby":U,className:$=""}){const z=f(null),A=h(),B=h(),G=!J,I=h(),O=p().dialog,H=e(m()),[K,M]=x(null),Y=l({open:j,dirty:X,onClose:w,title:C,layer:K}),Z=f(null),q=r(j&&null!==H,Z),E=i(q,z);if(o(j),s(z,j&&null!==H,P),n(j),b(()=>{if(j)return u(()=>(J||Y(),!0),()=>z.current)},[j,J,Y]),!j||!H)return null;/* @__PURE__ */
2
+ return y(g,{children:[/* @__PURE__ */k("span",{ref:Z,hidden:!0,"data-popup-anchor":""}),v(
3
+ /* @__PURE__ */k(t,{value:K,children:/* @__PURE__ */y("div",{ref:M,className:"fixed inset-0"+(V?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":V?"":void 0,children:[
4
+ /* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm","aria-hidden":"true"}),
5
+ /* @__PURE__ */k("div",{className:q?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:J?void 0:e=>{e.target===e.currentTarget&&Y()},children:/* @__PURE__ */y("div",{ref:z,"data-popup-panel":"",style:q?{left:E?.left??0,top:E?.top??0,visibility:E?void 0:"hidden"}:void 0,...a({role:T,modal:!0,titleId:C?I:void 0,labelledBy:S,label:Q}),"aria-describedby":U??(L?B:W?A:void 0),className:`${q?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[F]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${$}`.trim(),children:[C&&/* @__PURE__ */k("h2",{id:I,className:(G?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:C}),L&&/* @__PURE__ */k("p",{id:B,className:((C?"mt-1":G?"pr-8":"")+" text-sm text-gray-500").trim(),children:L}),W&&/* @__PURE__ */k("div",{id:A,className:"mt-2 text-sm text-gray-600",children:W}),D&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:D}),G&&/* @__PURE__ */k("button",{type:"button",onClick:Y,"aria-label":O.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),H)]})}export{j as Dialog};
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-MZG3FS5T.js";import{Avatar as t}from"./chunk-NHWDB7R6.js";import{ItemCount as r}from"./chunk-BXU3LX44.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-2X4U3VX2.js";import{Avatar as t}from"./chunk-QMNDKNK2.js";import{ItemCount as r}from"./chunk-KWTK6TGH.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
2
2
  return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
3
3
  /* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
4
4
  /* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
@@ -1,5 +1,5 @@
1
- import{Icon as e}from"./chunk-UIWGVOFH.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as n}from"./chunk-43MCNASD.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,y=i(),N=["es-default-reset"];if(c&&N.push("is-changed"),k&&N.push(k),!c&&h)return N.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:N.join(" "),"aria-hidden":"true"});const x="desktop"===u,S=p??(x?j.resetName(o):j.inheritName(o)),T=b?j.backTo(b):x?j.backToDefault:j.backToAuto,g=m??(b?j.tip(S,T):S);
1
+ import{Icon as e}from"./chunk-T3NLFOLW.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as n}from"./chunk-TJSJVC6P.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,y=i(),N=["es-default-reset"];if(c&&N.push("is-changed"),k&&N.push(k),!c&&h)return N.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:N.join(" "),"aria-hidden":"true"});const T="desktop"===u,x=p??(T?j.resetName(o):j.inheritName(o)),S=b?j.backTo(b):T?j.backToDefault:j.backToAuto,g=m??(b?j.tip(x,S):x);
2
2
  /* @__PURE__ */
3
3
  return r(t,{content:g,describe:!1,children:[
4
- /* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":S,"aria-describedby":y,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
5
- /* @__PURE__ */a("span",{id:y,hidden:!0,children:T})]})}export{o as SettingReset};
4
+ /* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":x,"aria-describedby":y,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
5
+ /* @__PURE__ */a("span",{id:y,hidden:!0,children:S})]})}export{o as SettingReset};