efficient-shell 8.22.0 → 8.23.1

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 (299) hide show
  1. package/README.md +31 -0
  2. package/dist/{Browser-VZU2MTSA.js → Browser-NSOMITHS.js} +14 -14
  3. package/dist/Calculator-WZIBSVDK.js +29 -0
  4. package/dist/{CurrencyConverter-BSQCX3HS.js → CurrencyConverter-BX5HDEX6.js} +8 -8
  5. package/dist/{Documents-NR3T434J.js → Documents-LEB2ZSZD.js} +20 -20
  6. package/dist/{Files-QMV2E74S.js → Files-4P5YEYDE.js} +23 -23
  7. package/dist/{Notepad-M5MCY5DV.js → Notepad-UNPC3Q4F.js} +10 -10
  8. package/dist/{PdfViewer-OODU3XIT.js → PdfViewer-67VBUIRD.js} +1 -1
  9. package/dist/PomodoroTimer-LBFYGZHA.js +91 -0
  10. package/dist/{Preview-QTDCPMCL.js → Preview-3FABZUXV.js} +27 -27
  11. package/dist/Sidebar-OIWVKYUU.js +43 -0
  12. package/dist/{Spreadsheet-V2EWOJML.js → Spreadsheet-AADGH3IX.js} +14 -14
  13. package/dist/{Stock-U3G45T36.js → Stock-5TKATE4I.js} +3 -3
  14. package/dist/{Weather-GEC4VHLM.js → Weather-NQJCUUUN.js} +17 -17
  15. package/dist/{WorldClock-6ORV4NHF.js → WorldClock-QYZF2JCO.js} +6 -6
  16. package/dist/ai/index.js +13 -13
  17. package/dist/apps/index.d.ts +1 -1
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/media-host-check.js +1 -1
  20. package/dist/bin/ui-check.js +1 -1
  21. package/dist/brand.css +1 -1
  22. package/dist/charts/BoxPlotChart.js +1 -1
  23. package/dist/charts/CandlestickChart.js +1 -1
  24. package/dist/charts/CartesianPlot.js +1 -1
  25. package/dist/charts/ChartBrush.js +1 -1
  26. package/dist/charts/ChartFrame.js +1 -1
  27. package/dist/charts/ChartSkeleton.js +1 -1
  28. package/dist/charts/ChordChart.js +1 -1
  29. package/dist/charts/ColumnChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/StatTile.js +1 -1
  42. package/dist/charts/SunburstChart.js +1 -1
  43. package/dist/charts/TimeSeriesChart.js +1 -1
  44. package/dist/charts/TreemapChart.js +1 -1
  45. package/dist/charts/WaterfallChart.js +1 -1
  46. package/dist/{chunk-74QAQXSB.js → chunk-2C6IG7LG.js} +1 -1
  47. package/dist/{chunk-XUQQCKKD.js → chunk-37CCKGHU.js} +1 -1
  48. package/dist/chunk-3EKWDVBV.js +29 -0
  49. package/dist/{chunk-W7ZAFS7C.js → chunk-3GHBY2FP.js} +7 -7
  50. package/dist/{chunk-C3ZZDCBU.js → chunk-3IYMTPGR.js} +18 -18
  51. package/dist/{chunk-WXIEWJF7.js → chunk-3PGK3VFS.js} +1 -1
  52. package/dist/{chunk-I2FHDMIN.js → chunk-3PNKI44X.js} +6 -6
  53. package/dist/{chunk-KFSNSDTW.js → chunk-3V5Z2BJY.js} +12 -12
  54. package/dist/{chunk-Q6A6W3DI.js → chunk-3XQGEILM.js} +1 -1
  55. package/dist/{chunk-QSN7X27F.js → chunk-4CFOKYVR.js} +7 -7
  56. package/dist/{chunk-D3BDPSVV.js → chunk-4F3IKYUO.js} +6 -6
  57. package/dist/{chunk-QUS3C264.js → chunk-4NXMMWL6.js} +1 -1
  58. package/dist/{chunk-PHYI7M45.js → chunk-4VLKDANH.js} +1 -1
  59. package/dist/{chunk-6AJM3QNG.js → chunk-4YUCXIRP.js} +1 -1
  60. package/dist/{chunk-VWMTQLVS.js → chunk-5PY4H4ZJ.js} +1 -1
  61. package/dist/{chunk-R4JU7MU2.js → chunk-64FIE4SX.js} +7 -7
  62. package/dist/chunk-6CRERVSV.js +1 -0
  63. package/dist/chunk-6NMDKOQA.js +7 -0
  64. package/dist/{chunk-PFB2NSSS.js → chunk-6WSTN5A3.js} +5 -5
  65. package/dist/{chunk-R5FFVK2W.js → chunk-72YFU346.js} +1 -1
  66. package/dist/{chunk-SDORX5C2.js → chunk-77FLITYM.js} +6 -6
  67. package/dist/{chunk-DIZW2GZP.js → chunk-7CFH6Y4T.js} +1 -1
  68. package/dist/{chunk-3UL7IB25.js → chunk-BI6ZLD4X.js} +7 -7
  69. package/dist/{chunk-X2U5XB7J.js → chunk-BMZSMXE6.js} +1 -1
  70. package/dist/chunk-BOBUSE33.js +2 -0
  71. package/dist/{chunk-VNYFGNHO.js → chunk-BRHIRE4D.js} +4 -4
  72. package/dist/{chunk-QZRH7L2E.js → chunk-BSNWVZHW.js} +1 -1
  73. package/dist/{chunk-74HUZZPT.js → chunk-BY2OWWKC.js} +1 -1
  74. package/dist/chunk-CRLSG5AY.js +9 -0
  75. package/dist/{chunk-F6YMKW5G.js → chunk-CZ25A5RS.js} +1 -1
  76. package/dist/{chunk-V4WNEJ63.js → chunk-D2AUUIKG.js} +1 -1
  77. package/dist/{chunk-RIGW3E5M.js → chunk-D7FT2PXG.js} +5 -5
  78. package/dist/{chunk-SSOLRTVS.js → chunk-DFDDRKIJ.js} +1 -1
  79. package/dist/{chunk-5EK4DFB5.js → chunk-DISSJYKV.js} +7 -7
  80. package/dist/{chunk-BUWOFJGM.js → chunk-DITCVBR7.js} +10 -10
  81. package/dist/chunk-DODH46ZQ.js +8 -0
  82. package/dist/{chunk-IMDLBXO3.js → chunk-DTSCO7VM.js} +1 -1
  83. package/dist/{chunk-ZY62UQI2.js → chunk-DZNG34DC.js} +19 -19
  84. package/dist/{chunk-YF7A3BWA.js → chunk-E5ALJIXV.js} +4 -4
  85. package/dist/chunk-E6UCGCOC.js +1 -0
  86. package/dist/{chunk-PZFETJAG.js → chunk-EJUR35JG.js} +1 -1
  87. package/dist/{chunk-DIW6WT5L.js → chunk-ERMZ75FO.js} +1 -1
  88. package/dist/{chunk-F3AROMIU.js → chunk-ETF7LAYZ.js} +6 -6
  89. package/dist/{chunk-F6YIUCIJ.js → chunk-EYKUKN32.js} +4 -4
  90. package/dist/{chunk-NYLXA2EG.js → chunk-EZ3BQ6PK.js} +7 -7
  91. package/dist/{chunk-SFWIYB4T.js → chunk-FL2PUQX7.js} +1 -1
  92. package/dist/{chunk-X7JK22X2.js → chunk-GATKJSGL.js} +5 -5
  93. package/dist/{chunk-56C5SEZ7.js → chunk-GIM2422N.js} +1 -1
  94. package/dist/{chunk-HLZZ5Q5E.js → chunk-GQACKEKW.js} +16 -16
  95. package/dist/{chunk-TCN7XUCY.js → chunk-GWIPZKZJ.js} +4 -4
  96. package/dist/chunk-H33Z4ZIY.js +11 -0
  97. package/dist/{chunk-GVNDUNQL.js → chunk-H3BC4KDE.js} +1 -1
  98. package/dist/{chunk-IUBWN3OA.js → chunk-HVX37PKU.js} +1 -1
  99. package/dist/chunk-I4VD5D43.js +8 -0
  100. package/dist/chunk-IFDW5QW6.js +2 -0
  101. package/dist/{chunk-OPFCLDVM.js → chunk-IHQX4GYD.js} +1 -1
  102. package/dist/{chunk-6PWLY2LQ.js → chunk-IZCODCSC.js} +1 -1
  103. package/dist/{chunk-KBLMTCTD.js → chunk-JEXXJK7H.js} +1 -1
  104. package/dist/{chunk-MRLQH2GZ.js → chunk-JNDBRSYZ.js} +2 -2
  105. package/dist/{chunk-ONEF47LG.js → chunk-JPP7UWQA.js} +3 -3
  106. package/dist/{chunk-TYZ4IY7F.js → chunk-JUGPTBMS.js} +2 -2
  107. package/dist/{chunk-SH6ZLK4K.js → chunk-JWIKHVF4.js} +8 -8
  108. package/dist/{chunk-L2JOLPJR.js → chunk-JYLVX2FW.js} +1 -1
  109. package/dist/{chunk-SO4WAMVA.js → chunk-K7KQDPLW.js} +5 -5
  110. package/dist/{chunk-5OGWWBJY.js → chunk-KDZUWQEG.js} +1 -1
  111. package/dist/{chunk-CJKDYVNE.js → chunk-KKSW5IZ7.js} +6 -6
  112. package/dist/{chunk-POMS7YQN.js → chunk-KZHPX4FM.js} +2 -2
  113. package/dist/{chunk-35VA5UFB.js → chunk-LK2SICMI.js} +1 -1
  114. package/dist/{chunk-3APQ5V6P.js → chunk-LLLAIPFX.js} +1 -1
  115. package/dist/{chunk-WBU7NZBP.js → chunk-M5P6A7KS.js} +1 -1
  116. package/dist/{chunk-52L6IBTN.js → chunk-MAOJENIB.js} +1 -1
  117. package/dist/{chunk-ZLGU4VYO.js → chunk-MEYYQC43.js} +5 -5
  118. package/dist/{chunk-7AINUMUA.js → chunk-MMFJBWJC.js} +1 -1
  119. package/dist/{chunk-MIZO6SQ3.js → chunk-MTXTJLFK.js} +2 -2
  120. package/dist/{chunk-BJKZYQFA.js → chunk-MXHEREC6.js} +3 -3
  121. package/dist/{chunk-BBYHBN3R.js → chunk-NHCRQ7SW.js} +1 -1
  122. package/dist/chunk-NID6MGGC.js +13 -0
  123. package/dist/{chunk-SLORZA7W.js → chunk-NMK4UQXZ.js} +12 -12
  124. package/dist/{chunk-QLAQ6ASB.js → chunk-NT26CWMZ.js} +5 -5
  125. package/dist/{chunk-GTKNEJ3X.js → chunk-NVE6L27I.js} +8 -8
  126. package/dist/{chunk-CQZEO4UV.js → chunk-NWP6IJYK.js} +9 -9
  127. package/dist/{chunk-AXQBQH55.js → chunk-OFOLUFNB.js} +15 -15
  128. package/dist/{chunk-LQHWFL5Y.js → chunk-OHVAD3NO.js} +2 -2
  129. package/dist/{chunk-IOESXYEI.js → chunk-OVVXSAGE.js} +8 -8
  130. package/dist/{chunk-Z4UKLPGE.js → chunk-PDXD6DT7.js} +1 -1
  131. package/dist/{chunk-ALYBCDHU.js → chunk-PNGL4ZW2.js} +6 -6
  132. package/dist/{chunk-2TBC254V.js → chunk-PNQ4EYYM.js} +3 -3
  133. package/dist/{chunk-JXGYIV44.js → chunk-PPFMXLEX.js} +9 -9
  134. package/dist/{chunk-IJICE6KT.js → chunk-Q3OCGLW7.js} +2 -2
  135. package/dist/{chunk-TSOBVLV5.js → chunk-QEV346OG.js} +1 -1
  136. package/dist/{chunk-D7AA5WE2.js → chunk-QFA5COE6.js} +1 -1
  137. package/dist/{chunk-ZI7P5YGF.js → chunk-QQCHLRKG.js} +1 -1
  138. package/dist/{chunk-XCHY6QVH.js → chunk-QQK3XS6H.js} +8 -8
  139. package/dist/{chunk-46M6AYFJ.js → chunk-R6DGLGB3.js} +1 -1
  140. package/dist/chunk-RGBX3EVC.js +11 -0
  141. package/dist/{chunk-GKTCCPME.js → chunk-RUQEB2ZC.js} +3 -3
  142. package/dist/{chunk-5LNFW5E4.js → chunk-RYBJ6MMM.js} +1 -1
  143. package/dist/{chunk-2RJKMYON.js → chunk-S7VSXUKS.js} +3 -3
  144. package/dist/{chunk-O3NLPJH2.js → chunk-SB7OTZI4.js} +19 -19
  145. package/dist/{chunk-5B73MLXV.js → chunk-SBHFEWR6.js} +1 -1
  146. package/dist/chunk-SG2MTCA2.js +100 -0
  147. package/dist/chunk-SXORVKIZ.js +9 -0
  148. package/dist/{chunk-CREVU3AF.js → chunk-TW7TA2AB.js} +1 -1
  149. package/dist/{chunk-JLPTSC66.js → chunk-TXS6JKFV.js} +1 -1
  150. package/dist/{chunk-DQB3ORB7.js → chunk-UB4BTRSB.js} +5 -5
  151. package/dist/{chunk-4ELYV3L6.js → chunk-UKB2I3UK.js} +1 -1
  152. package/dist/{chunk-XFIMTNUH.js → chunk-UVUBZL7K.js} +1 -1
  153. package/dist/{chunk-JGZLLQAN.js → chunk-UX6HNRFV.js} +7 -7
  154. package/dist/chunk-VTVOQS5L.js +20 -0
  155. package/dist/{chunk-V23TPYHO.js → chunk-VU6VPKM3.js} +6 -6
  156. package/dist/{chunk-WQKGBPOQ.js → chunk-WJ3XSJ6B.js} +1 -1
  157. package/dist/chunk-WSPO4N72.js +19 -0
  158. package/dist/{chunk-TJPPV7KZ.js → chunk-WTY3SXO7.js} +1 -1
  159. package/dist/{chunk-2IV4XF3Y.js → chunk-WYN5KVU4.js} +3 -3
  160. package/dist/chunk-X6PPP6NX.js +14 -0
  161. package/dist/{chunk-6DT7HG3F.js → chunk-XHBQPVNG.js} +1 -1
  162. package/dist/{chunk-5BBDUKQP.js → chunk-Y2D2YMFY.js} +12 -12
  163. package/dist/{chunk-ZVTOB4RE.js → chunk-Y4MI6NRI.js} +1 -1
  164. package/dist/{chunk-ZMLRNHMS.js → chunk-Y5T257HX.js} +3 -3
  165. package/dist/{chunk-FW2EEIDB.js → chunk-YCQVEJOT.js} +2 -2
  166. package/dist/{chunk-JACPHDTK.js → chunk-YDYDR72S.js} +1 -1
  167. package/dist/chunk-YSFLXPUS.js +7 -0
  168. package/dist/{chunk-BJEBOXTR.js → chunk-YW2DH6YQ.js} +3 -3
  169. package/dist/{chunk-U4QZIU7X.js → chunk-ZEKM6HAA.js} +2 -2
  170. package/dist/{chunk-352MVBF7.js → chunk-ZN3O2KJ7.js} +18 -18
  171. package/dist/chunk-ZNCU3UIW.js +8 -0
  172. package/dist/{chunk-FDENTKSM.js → chunk-ZNXBKFV7.js} +5 -5
  173. package/dist/{chunk-SRMRRJ5K.js → chunk-ZSRRV44J.js} +1 -1
  174. package/dist/{chunk-2JYQF3PJ.js → chunk-ZTB6EMC7.js} +1 -1
  175. package/dist/data/DataTable.js +1 -1
  176. package/dist/data/Kanban.js +1 -1
  177. package/dist/data/ListFooter.js +1 -1
  178. package/dist/data/ListLoadError.js +1 -1
  179. package/dist/data/Pagination.js +1 -1
  180. package/dist/file-intake/index.js +1 -1
  181. package/dist/forms/BorderInput.js +1 -1
  182. package/dist/forms/BrandAssetEditor.js +1 -1
  183. package/dist/forms/Calendar.js +1 -1
  184. package/dist/forms/ColorPicker.js +1 -1
  185. package/dist/forms/ComposerAttachments.js +1 -1
  186. package/dist/forms/CornersInput.js +1 -1
  187. package/dist/forms/DatePicker.js +1 -1
  188. package/dist/forms/DateRangePicker.js +1 -1
  189. package/dist/forms/DateTimePicker.js +1 -1
  190. package/dist/forms/DisplayChips.js +1 -1
  191. package/dist/forms/FilePicker.js +1 -1
  192. package/dist/forms/FormErrorSummary.js +1 -1
  193. package/dist/forms/IconPicker.js +1 -1
  194. package/dist/forms/ImageFocusPoint.js +1 -1
  195. package/dist/forms/InputNumber.js +1 -1
  196. package/dist/forms/LinkPicker.js +1 -1
  197. package/dist/forms/MediaLibrary.js +1 -1
  198. package/dist/forms/MediaUploadField.js +1 -1
  199. package/dist/forms/MediaUploadGrid.js +1 -1
  200. package/dist/forms/MediaUsedInList.js +1 -1
  201. package/dist/forms/NumericKeypad.js +1 -1
  202. package/dist/forms/PositionInput.js +1 -1
  203. package/dist/forms/Select.js +1 -1
  204. package/dist/forms/SidesInput.js +1 -1
  205. package/dist/forms/Slider.js +1 -1
  206. package/dist/forms/Snippet.js +1 -1
  207. package/dist/forms/TagInput.js +1 -1
  208. package/dist/forms/TextToolbar.js +1 -1
  209. package/dist/forms/TimePicker.js +1 -1
  210. package/dist/forms/WidthsBar.js +1 -1
  211. package/dist/forms/mediaLibraryMenu.js +1 -1
  212. package/dist/forms/mediaMoveItems.js +1 -1
  213. package/dist/forms/useFileIntake.js +1 -1
  214. package/dist/index.d.ts +18 -4
  215. package/dist/index.js +377 -377
  216. package/dist/locales/zh-Hans.js +1 -1
  217. package/dist/map/index.js +2 -2
  218. package/dist/page-tabs/index.js +5 -5
  219. package/dist/pdf/index.js +1 -1
  220. package/dist/shell/Accordion.js +1 -1
  221. package/dist/shell/AppUpdateBanner.js +1 -1
  222. package/dist/shell/Avatar.js +1 -1
  223. package/dist/shell/Banner.js +1 -1
  224. package/dist/shell/Breadcrumbs.js +1 -1
  225. package/dist/shell/BudgetBar.js +1 -1
  226. package/dist/shell/Card.js +1 -1
  227. package/dist/shell/ColoredBadge.js +1 -1
  228. package/dist/shell/ConfirmDialog.js +1 -1
  229. package/dist/shell/ContainerFillChart.js +1 -1
  230. package/dist/shell/CountBadge.js +1 -1
  231. package/dist/shell/Dialog.js +1 -1
  232. package/dist/shell/Drawer.js +1 -1
  233. package/dist/shell/EditableGrid.js +1 -1
  234. package/dist/shell/EmptyState.js +1 -1
  235. package/dist/shell/GlobalSearch.js +1 -1
  236. package/dist/shell/HelpCenter.js +1 -1
  237. package/dist/shell/IconRail.js +1 -1
  238. package/dist/shell/ImageLightbox.js +1 -1
  239. package/dist/shell/LanguageSelect.js +1 -1
  240. package/dist/shell/Markdown.js +1 -1
  241. package/dist/shell/MetricBar.js +1 -1
  242. package/dist/shell/MetricBarLegend.js +1 -1
  243. package/dist/shell/MilestoneTimeline.js +1 -1
  244. package/dist/shell/PageHeader.js +1 -1
  245. package/dist/shell/ProductionTimeline.js +1 -1
  246. package/dist/shell/ResizeHandle.js +1 -1
  247. package/dist/shell/Result.js +1 -1
  248. package/dist/shell/SearchableSelect.js +1 -1
  249. package/dist/shell/SettingReset.js +1 -1
  250. package/dist/shell/SettingRow.js +1 -1
  251. package/dist/shell/SidebarLayout.js +1 -1
  252. package/dist/shell/SidebarNav.js +1 -1
  253. package/dist/shell/SortableList.js +1 -1
  254. package/dist/shell/Statistic.js +1 -1
  255. package/dist/shell/TimeAgo.js +1 -1
  256. package/dist/shell/TimelineTrack.js +1 -1
  257. package/dist/shell/TransferProgress.js +1 -1
  258. package/dist/shell/Tree.js +1 -1
  259. package/dist/shell/language.js +1 -1
  260. package/dist/shell/strings.d.ts +5 -0
  261. package/dist/shell/strings.js +1 -1
  262. package/dist/shell/toast.js +1 -1
  263. package/dist/telemetry/index.js +1 -1
  264. package/dist/templates/AuthScreen.js +1 -1
  265. package/dist/templates/ChatTemplate.js +1 -1
  266. package/dist/templates/CheckoutTemplate.js +1 -1
  267. package/dist/templates/DashboardTemplate.js +1 -1
  268. package/dist/templates/DataTablePage.js +1 -1
  269. package/dist/templates/EmailTemplate.js +1 -1
  270. package/dist/templates/ErrorBoundary.js +1 -1
  271. package/dist/templates/ErrorPage.js +1 -1
  272. package/dist/templates/FormLayoutPage.js +1 -1
  273. package/dist/templates/GalleryTemplate.js +1 -1
  274. package/dist/{types-BOinJXUf.d.ts → types-ClT92-8Z.d.ts} +13 -1
  275. package/dist/ui/index.js +1 -1
  276. package/dist/version.js +1 -1
  277. package/package.json +1 -1
  278. package/dist/Calculator-DKZHOHOD.js +0 -29
  279. package/dist/PomodoroTimer-I423ZZOQ.js +0 -91
  280. package/dist/Sidebar-UVBEI4DQ.js +0 -43
  281. package/dist/chunk-6JCIQ7XL.js +0 -8
  282. package/dist/chunk-6UBBY54N.js +0 -2
  283. package/dist/chunk-B73YLHD2.js +0 -99
  284. package/dist/chunk-CPM3BQGV.js +0 -14
  285. package/dist/chunk-DSYIKLOK.js +0 -11
  286. package/dist/chunk-EUOFKZI3.js +0 -19
  287. package/dist/chunk-LVAGFIWK.js +0 -2
  288. package/dist/chunk-MWNZY33B.js +0 -13
  289. package/dist/chunk-NE42BDQX.js +0 -9
  290. package/dist/chunk-NHFLTKPK.js +0 -11
  291. package/dist/chunk-O5KDTFK5.js +0 -8
  292. package/dist/chunk-PMOGQHYX.js +0 -20
  293. package/dist/chunk-RPK3U2K2.js +0 -9
  294. package/dist/chunk-RPTQCFLR.js +0 -29
  295. package/dist/chunk-URFWJZTV.js +0 -7
  296. package/dist/chunk-VKMEQKYT.js +0 -1
  297. package/dist/chunk-W7NZKU27.js +0 -7
  298. package/dist/chunk-YPXVOPL4.js +0 -1
  299. package/dist/chunk-Z5TCGLCM.js +0 -8
@@ -1,4 +1,4 @@
1
- import{CloseGlyph as e}from"./chunk-IMDLBXO3.js";import{humanSize as t,useFileIntake as n,FileIntakeAlert as r}from"./chunk-JACPHDTK.js";import{IconButton_default as a}from"./chunk-4CANQ3B3.js";import{Button_default as s}from"./chunk-4IU5BSVE.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{useShellStrings as c}from"./chunk-VKMEQKYT.js";import{useRef as o,useEffect as l}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
1
+ import{CloseGlyph as e}from"./chunk-DTSCO7VM.js";import{humanSize as t,useFileIntake as n,FileIntakeAlert as r}from"./chunk-YDYDR72S.js";import{IconButton_default as a}from"./chunk-4CANQ3B3.js";import{Button_default as s}from"./chunk-4IU5BSVE.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{useShellStrings as c}from"./chunk-E6UCGCOC.js";import{useRef as o,useEffect as l}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,8 +6,8 @@ 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-gray-200 bg-gray-50 py-1 pl-2 pr-1 text-xs text-gray-700",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:n.name,children:n.name}),
8
8
  /* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:t(n.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(n.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(e,{className:"h-3.5 w-3.5"})})]},`${n.name}-${n.size}-${s}`)})})}function f({onClick:e,count:t=0,variant:n="button",label:r,disabled:i=!1}){const o=c().files,l=r??o.attach,p=t>0?`${l} (${t})`:l;return"icon"===n?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
9
- /* @__PURE__ */d(a,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),t>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-blue-600 px-1 text-center text-2xs font-semibold leading-4 text-white",children:t})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function g({files:e,onChange:t,accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:g,trigger:x="button",actions:j,onReject:k,className:N="",children:v}){const L=n({accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),y=o([]);return l(()=>{k&&L.rejections.length>0&&L.rejections!==y.current&&(y.current=L.rejections,k(L.rejections))},[L.rejections,k]),/* @__PURE__ */u(h,{intake:L,dropLabel:p,className:N,children:[v,
10
- /* @__PURE__ */d(b,{files:e,disabled:m,onRemove:n=>{L.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
9
+ /* @__PURE__ */d(a,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),t>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-blue-600 px-1 text-center text-2xs font-semibold leading-4 text-white",children:t})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function g({files:e,onChange:t,accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:g,trigger:x="button",actions:j,onReject:k,className:N="",children:v}){const y=n({accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),L=o([]);return l(()=>{k&&y.rejections.length>0&&y.rejections!==L.current&&(L.current=y.rejections,k(y.rejections))},[y.rejections,k]),/* @__PURE__ */u(h,{intake:y,dropLabel:p,className:N,children:[v,
10
+ /* @__PURE__ */d(b,{files:e,disabled:m,onRemove:n=>{y.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
- /* @__PURE__ */d(f,{onClick:L.open,count:e.length,variant:x,label:g,disabled:m}),j]}),
13
- /* @__PURE__ */d(r,{rejections:L.rejections})]})}export{f as AttachButton,h as AttachmentDropZone,b as AttachmentList,g as ComposerAttachments,m as PaperclipGlyph};
12
+ /* @__PURE__ */d(f,{onClick:y.open,count:e.length,variant:x,label:g,disabled:m}),j]}),
13
+ /* @__PURE__ */d(r,{rejections:y.rejections})]})}export{f as AttachButton,h as AttachmentDropZone,b as AttachmentList,g as ComposerAttachments,m as PaperclipGlyph};
@@ -1,4 +1,4 @@
1
- import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var a=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,l=r=>e(r.trim());function c(e){const r=[];let t,c=0,o=0;for(a.lastIndex=0;null!==(t=a.exec(e));)t.index>c&&r.push(e.slice(c,t.index)),void 0!==t[1]?r.push(
1
+ import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var a=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,l=r=>e(r.trim());function c(e){const r=[];let t,c=0,o=0;for(a.lastIndex=0;null!==(t=a.exec(e));)t.index>c&&r.push(e.slice(c,t.index)),void 0!==t[1]?r.push(
2
2
  /* @__PURE__ */s("span",{className:"text-gray-400",children:["[",t[1],"]"]},o++)):void 0!==t[3]?r.push(
3
3
  /* @__PURE__ */n("a",{href:l(t[4])?t[4]:void 0,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:t[3]},o++)):void 0!==t[5]?r.push(
4
4
  /* @__PURE__ */n("strong",{className:"font-semibold text-gray-900",children:t[5]},o++)):void 0!==t[6]?r.push(
@@ -1,4 +1,4 @@
1
- import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-52L6IBTN.js";import{Tooltip as n}from"./chunk-22S6LG6D.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),b="button[data-icon-rail-button]:not([disabled])";function f(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[y,v]=i(null),w="none"===d?"none":g?y??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);v(e({buttons:r,orientation:n,...f(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==y&&F.current!==y&&(F.current=y,k.current?.(y))},[g,y]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
1
+ import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-MAOJENIB.js";import{Tooltip as n}from"./chunk-22S6LG6D.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),b="button[data-icon-rail-button]:not([disabled])";function f(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[y,v]=i(null),w="none"===d?"none":g?y??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);v(e({buttons:r,orientation:n,...f(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==y&&F.current!==y&&(F.current=y,k.current?.(y))},[g,y]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
2
2
  return c("div",{ref:p,role:"toolbar","aria-label":t,"aria-orientation":n,"data-orientation":n,onKeyDown:e=>{const t=p.current;if(!t)return;const r=[...t.querySelectorAll(b)],o=r.indexOf(e.target);if(o<0)return;const a="vertical"===n?"ArrowUp":"ArrowLeft",i="vertical"===n?"ArrowDown":"ArrowRight",l=e.key===i?(o+1)%r.length:e.key===a?(o-1+r.length)%r.length:"Home"===e.key?0:"End"===e.key?r.length-1:-1;if(!(l<0)){e.preventDefault();for(const e of r)e.tabIndex=e===r[l]?0:-1;r[l].focus()}},"data-labels":"none"===d?void 0:d,"data-labels-shown":"none"===d?void 0:w,className:`flex gap-1 ${"vertical"===n?"flex-col items-center":"flex-row items-center"} ${s}`.trim(),children:/* @__PURE__ */c(h.Provider,{value:{labels:d,shown:w},children:o})})}function p({label:e,icon:r,active:o,disabled:a,onClick:i,badge:l,tooltipSide:b="right",className:f=""}){const m=!0===o,{labels:p,shown:g}=s(h),y=void 0===l||!1===l||0===l?r:/* @__PURE__ */c(t,{count:"number"==typeof l?l:void 0,dot:!0===l,max:99,children:r}),v="none"!==p,w=v&&("all"===g||"chosen"===g&&m),x=/* @__PURE__ */c("button",{type:"button","data-icon-rail-button":"","aria-label":e,"aria-pressed":"boolean"==typeof o?o:void 0,disabled:a,onClick:a?void 0:i,className:[`relative inline-flex ${v?"beside"===p?"h-9 min-w-9 justify-center px-2":"min-h-9 min-w-9 flex-col justify-center px-1 py-1":"h-9 w-9 justify-center"} shrink-0 items-center rounded-lg transition-colors`,"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-40",m?"bg-blue-50 text-blue-700":"text-gray-600 not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-gray-900",f].filter(Boolean).join(" "),children:v?/* @__PURE__ */d(u,{children:[
3
3
  /* @__PURE__ */c("span",{"data-icon-rail-glyph":"",className:"inline-flex shrink-0 items-center justify-center",children:y}),
4
4
  /* @__PURE__ */c("span",{"data-icon-rail-word":"","aria-hidden":"true",className:["overflow-hidden whitespace-nowrap text-xs font-medium leading-none",w?"beside"===p?"ml-2":"mt-1":"max-h-0 max-w-0"].join(" "),children:e})]}):y});/* @__PURE__ */
@@ -1,8 +1,8 @@
1
- import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-MIZO6SQ3.js";import{Button_default as i}from"./chunk-4IU5BSVE.js";import{Tooltip as l}from"./chunk-22S6LG6D.js";import{useShellStrings as a}from"./chunk-VKMEQKYT.js";import{useId as s,useRef as c,useState as d,useEffect as u,Fragment as h}from"react";import{jsxs as f,jsx as m}from"react/jsx-runtime";var p=(e,t,r)=>Math.min(r,Math.max(t,e)),v=e=>e.reduce((e,t)=>e+t,0),g=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var y,b="w-0.5",w=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var x=["text-blue-700","text-gray-600"];function k({count:k,value:$,onChange:C,label:N,"aria-labelledby":P,readOnly:M=!1,disabled:j=!1,footer:S=!0,className:z=""}){const R=a().widths,B=s(),K=p(Math.round(k)||1,1,n),A=e($,K),D=A??[...t[K]??[]],E=[...D,100-v(D)],O=M||j,T=c(null),I=c({onChange:C,shown:D,locked:O,n:K,stored:A});I.current={onChange:C,shown:D,locked:O,n:K,stored:A};const L=t=>{const{onChange:r,shown:n,locked:o,n:i}=I.current;if(o)return!1;const l=e(t,i);return!(!l||g(l,n))&&(r(l),!0)},G=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=p(Math.round(n),r,o-r),i[t+1]=o-i[t],L(i.slice(0,-1))&&(ie.current=null)},H=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=E[e]+E[e+1],i="ArrowRight"===t.key?E[e]+n:"ArrowLeft"===t.key?E[e]-n:"PageUp"===t.key?E[e]+10:"PageDown"===t.key?E[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),G(E,e,i))},U=c(null),[V,F]=d(null),Q=()=>{U.current=null,F(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>Q,[]);const W=e=>t=>{if(0!==t.button||O)return;t.preventDefault();const r=T.current?.getBoundingClientRect().width??0;r<=0||(U.current={i:e,x:t.clientX,width:r,from:E,moved:!1,pointer:t.pointerId},F(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},X=e=>{const t=U.current;if(!t)return;if(0===e.buttons)return void Q();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}G(t.from,t.i,t.from[t.i]+r/t.width*100)},q=e=>{const t=U.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),Q())},J=(e,t)=>{const{shown:n}=I.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=p(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-v(n)],e,t);return L(o.slice(0,-1))?o:null},[Y,Z]=d(0);u(()=>{const e=T.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Z(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const _=c(null),[ee,te]=d(null),[re,ne]=d([]),oe=(e,t)=>te(r=>t?e:r===e?null:r),ie=c(null),le=(e,t)=>{const r=ie.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=I.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:g(l,a))||n(r.stored),!0},ae=E.join(",");u(()=>{const e=null===ee?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===y&&(y=document.createElement("canvas").getContext("2d")),!y)return[];const o=y;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(_.current,ee);ne(t=>g(t,e)?t:e)},[ee,ae,Y]);const se=E.slice(0,-1).map((e,t)=>v(E.slice(0,t+1)));/* @__PURE__ */
2
- return f("div",{role:"group","aria-label":P?void 0:N,"aria-labelledby":P,"aria-describedby":K>1?B:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${j?"opacity-60":""} ${z}`.trim(),children:[
1
+ import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-MTXTJLFK.js";import{Button_default as i}from"./chunk-4IU5BSVE.js";import{Tooltip as l}from"./chunk-22S6LG6D.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{useId as s,useRef as c,useState as d,useEffect as u,Fragment as h}from"react";import{jsxs as f,jsx as m}from"react/jsx-runtime";var p=(e,t,r)=>Math.min(r,Math.max(t,e)),v=e=>e.reduce((e,t)=>e+t,0),g=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var y,b="w-0.5",w=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var x=["text-blue-700","text-gray-600"];function k({count:k,value:C,onChange:$,label:N,"aria-labelledby":P,readOnly:j=!1,disabled:M=!1,footer:z=!0,className:R=""}){const S=a().widths,B=s(),T=p(Math.round(k)||1,1,n),A=e(C,T),D=A??[...t[T]??[]],E=[...D,100-v(D)],K=j||M,O=c(null),L=c({onChange:$,shown:D,locked:K,n:T,stored:A});L.current={onChange:$,shown:D,locked:K,n:T,stored:A};const G=t=>{const{onChange:r,shown:n,locked:o,n:i}=L.current;if(o)return!1;const l=e(t,i);return!(!l||g(l,n))&&(r(l),!0)},I=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=p(Math.round(n),r,o-r),i[t+1]=o-i[t],G(i.slice(0,-1))&&(ie.current=null)},U=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=E[e]+E[e+1],i="ArrowRight"===t.key?E[e]+n:"ArrowLeft"===t.key?E[e]-n:"PageUp"===t.key?E[e]+10:"PageDown"===t.key?E[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),I(E,e,i))},F=c(null),[H,X]=d(null),J=()=>{F.current=null,X(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>J,[]);const V=e=>t=>{if(0!==t.button||K)return;t.preventDefault();const r=O.current?.getBoundingClientRect().width??0;r<=0||(F.current={i:e,x:t.clientX,width:r,from:E,moved:!1,pointer:t.pointerId},X(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},W=e=>{const t=F.current;if(!t)return;if(0===e.buttons)return void J();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}I(t.from,t.i,t.from[t.i]+r/t.width*100)},q=e=>{const t=F.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),J())},Q=(e,t)=>{const{shown:n}=L.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=p(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-v(n)],e,t);return G(o.slice(0,-1))?o:null},[Y,Z]=d(0);u(()=>{const e=O.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Z(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const _=c(null),[ee,te]=d(null),[re,ne]=d([]),oe=(e,t)=>te(r=>t?e:r===e?null:r),ie=c(null),le=(e,t)=>{const r=ie.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=L.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:g(l,a))||n(r.stored),!0},ae=E.join(",");u(()=>{const e=null===ee?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===y&&(y=document.createElement("canvas").getContext("2d")),!y)return[];const o=y;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(_.current,ee);ne(t=>g(t,e)?t:e)},[ee,ae,Y]);const se=E.slice(0,-1).map((e,t)=>v(E.slice(0,t+1)));/* @__PURE__ */
2
+ return f("div",{role:"group","aria-label":P?void 0:N,"aria-labelledby":P,"aria-describedby":T>1?B:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${R}`.trim(),children:[
3
3
  /* @__PURE__ */f("div",{ref:_,"data-widths-bar":"",className:"relative h-8",children:[
4
- /* @__PURE__ */m("div",{ref:T,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-white",children:E.map((e,t)=>/* @__PURE__ */m("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${x[t%2]} ${t%2==0?"bg-blue-50":""}`,children:1===K&&/* @__PURE__ */m("span",{"data-widths-label":"",children:`${e}%`})},t))}),
5
- /* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-gray-300"}),K>1&&E.map((e,t)=>/* @__PURE__ */f(h,{children:[(()=>{const n=ee===t,i=v(E.slice(0,t)),l=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
6
- return m("div",{className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${i+e/2}% - ${l} / 2), calc(100% - ${l}))`,width:l},children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>Y>0&&Y*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(K-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:M,disabled:j,"aria-label":R.column(t+1),"aria-describedby":B,"data-widths-label":"",onChange:e=>{null===e||le(t,e)||J(t,e)},onRevert:e=>((e,t)=>{I.current.locked||null===t||le(e,t)||J(e,t)})(t,e),onFocus:()=>{ie.current={column:t,share:e,stored:I.current.stored},oe(t,!0)},onBlur:()=>oe(t,!1),className:`absolute inset-0 text-xs font-medium ${x[t%2]} ${re.includes(t)&&!n?"opacity-0":""}`})})})(),t<K-1&&/* @__PURE__ */m("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${se[t]}%`},children:/* @__PURE__ */m(l,{content:R.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */m("div",{role:"separator",tabIndex:j?-1:0,"aria-orientation":"vertical","aria-label":R.divider(t+1,t+2),"aria-valuenow":E[t],"aria-valuemin":r,"aria-valuemax":E[t]+E[t+1]-r,"aria-valuetext":R.dividerValue(t+1,E[t],t+2,E[t+1]),"aria-disabled":O||void 0,onKeyDown:O?void 0:H(t),onPointerDown:W(t),onPointerMove:X,onPointerUp:q,onPointerCancel:q,onLostPointerCapture:()=>{U.current&&Q()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(O?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */m("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(O?`${b} bg-gray-300`:`bg-blue-600 transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${V===t?"w-1":w}`)})})})})]},t))]}),K>1&&!S&&/* @__PURE__ */m("span",{id:B,className:"sr-only",children:R.hint(K,r)}),K>1&&S&&/* @__PURE__ */m("div",{"data-widths-footer":"",className:"@container",children:/* @__PURE__ */f("div",{className:"flex items-center justify-between gap-2 @max-[264px]:flex-col @max-[264px]:items-end",children:[
7
- /* @__PURE__ */m("span",{id:B,"data-widths-hint":"",className:"text-2xs leading-tight text-gray-500 @max-[264px]:self-stretch",children:R.hint(K,r)}),
8
- /* @__PURE__ */m(i,{variant:"secondary",size:"sm",disabled:O,onClick:()=>{O||void 0===$||C(void 0)},className:"shrink-0",children:R.reset})]})})]})}export{k as WidthsBar};
4
+ /* @__PURE__ */m("div",{ref:O,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-white",children:E.map((e,t)=>/* @__PURE__ */m("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${x[t%2]} ${t%2==0?"bg-blue-50":""}`,children:1===T&&/* @__PURE__ */m("span",{"data-widths-label":"",children:`${e}%`})},t))}),
5
+ /* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-gray-300"}),T>1&&E.map((e,t)=>/* @__PURE__ */f(h,{children:[(()=>{const n=ee===t,i=v(E.slice(0,t)),l=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
6
+ return m("div",{className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${i+e/2}% - ${l} / 2), calc(100% - ${l}))`,width:l},children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>Y>0&&Y*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(T-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:j,disabled:M,"aria-label":S.column(t+1),"aria-describedby":B,"data-widths-label":"",onChange:e=>{null===e||le(t,e)||Q(t,e)},onRevert:e=>((e,t)=>{L.current.locked||null===t||le(e,t)||Q(e,t)})(t,e),onFocus:()=>{ie.current={column:t,share:e,stored:L.current.stored},oe(t,!0)},onBlur:()=>oe(t,!1),className:`absolute inset-0 text-xs font-medium ${x[t%2]} ${re.includes(t)&&!n?"opacity-0":""}`})})})(),t<T-1&&/* @__PURE__ */m("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${se[t]}%`},children:/* @__PURE__ */m(l,{content:S.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */m("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":S.divider(t+1,t+2),"aria-valuenow":E[t],"aria-valuemin":r,"aria-valuemax":E[t]+E[t+1]-r,"aria-valuetext":S.dividerValue(t+1,E[t],t+2,E[t+1]),"aria-disabled":K||void 0,onKeyDown:K?void 0:U(t),onPointerDown:V(t),onPointerMove:W,onPointerUp:q,onPointerCancel:q,onLostPointerCapture:()=>{F.current&&J()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(K?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */m("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(K?`${b} bg-gray-300`:`bg-blue-600 transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${H===t?"w-1":w}`)})})})})]},t))]}),T>1&&!z&&/* @__PURE__ */m("span",{id:B,className:"sr-only",children:S.hint(T,r)}),T>1&&z&&/* @__PURE__ */m("div",{"data-widths-footer":"",className:"@container",children:/* @__PURE__ */f("div",{className:"flex items-center justify-between gap-2 @max-[264px]:flex-col @max-[264px]:items-end",children:[
7
+ /* @__PURE__ */m("span",{id:B,"data-widths-hint":"",className:"text-2xs leading-tight text-gray-500 @max-[264px]:self-stretch",children:S.hint(T,r)}),
8
+ /* @__PURE__ */m(i,{variant:"secondary",size:"sm",disabled:K,onClick:()=>{K||void 0===C||$(void 0)},className:"shrink-0",children:S.reset})]})})]})}export{k as WidthsBar};
@@ -0,0 +1,20 @@
1
+ import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-UQBPKZUR.js";import{useSettingAuto as d}from"./chunk-E4Z5OXBI.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-JFSYWEHD.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-QR4RM7PO.js";import{Icon as m}from"./chunk-KIBL6M3T.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-E6UCGCOC.js";import{forwardRef as w,useId as k,useState as N,useRef as $,useMemo as D,useCallback as j,useEffect as E,useLayoutEffect as T}from"react";import{createPortal as C}from"react-dom";import{jsxs as I,jsx as O,Fragment as S}from"react/jsx-runtime";var H=w(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},w){const N=t,$=x(),D=d(),j=f??D,E=k(),T=/* @__PURE__ */I("select",{ref:w,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,j?E:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:n}),
2
+ /* @__PURE__ */O(R,{items:r})]});return j?/* @__PURE__ */I(S,{children:[T,
3
+ /* @__PURE__ */O("span",{id:E,hidden:!0,children:$.settingView.auto})]}):T});function R({items:e}){const t=e=>/* @__PURE__ */O("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
4
+ return O(S,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */O("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var z=w(function({value:l,onChange:u,options:w,placeholder:H,invalid:z,className:B="",id:U,disabled:K,size:A,touchSize:P,title:V,multiple:W,renderOption:F,renderValue:L,valueText:M,readOnly:G=!1,footer:J,changed:Q=!1,auto:q,"aria-describedby":X,"aria-label":Y,"aria-labelledby":Z,..._},ee){const[te,re]=N(!1),[ne,ie]=N(-1),ae=$(null),le=$(null),oe=$(null),de=$(null),se=$([]),ce=()=>de.current??oe.current,ue=!!J?.length,pe="sm"===A,me=pe?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",ve=p(pe),[he,fe]=N(null),be=x(),ge=$(te);ge.current=te;const ye=$({buffer:"",timer:null}),xe=k(),we=`${xe}-listbox`,ke=U??`${xe}-trigger`,Ne=e=>`${xe}-opt-${e}`,$e=`${xe}-changed`,De=d(),je=q??De,Ee=`${xe}-auto`,Te=[X,Q?$e:void 0,je?Ee:void 0].filter(Boolean).join(" ")||void 0,Ce=D(()=>i(w),[w]),Ie=W?l:[],Oe=u,Se=f(le,te,{matchTriggerWidth:!0,...J?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),He="undefined"==typeof window?E:T,Re=`${te}|${Se?.top}|${Se?.bottom}|${Se?.maxHeight}|${w.length}`;He(()=>{fe(null)},[Re]),He(()=>{const e=oe.current;if(!te||!e||null!==he)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&fe(Math.floor(i))},[te,he,Re]);const ze=W?Ce.findIndex(e=>Ie.includes(e.value)):Ce.findIndex(e=>e.value===l),Be=W?Ce.filter(e=>Ie.includes(e.value)).map(e=>e.label).join(", ")||void 0:ze>=0?Ce[ze].label:void 0,Ue=!W&&ze>=0?Ce[ze].lang:void 0,Ke=W?Ce.filter(e=>Ie.includes(e.value)):ze>=0?[Ce[ze]]:[],Ae=L&&Ke.length?L(Ke):void 0,Pe=void 0!==Ae&&M?M(Ke):void 0,Ve=j((e=!0)=>{re(!1),ie(-1),e&&le.current?.focus()},[]),We=j(()=>{K||G||(ie(ze>=0?ze:e(Ce)),re(!0))},[K,G,Ce,ze]),Fe=j(e=>{const t=Ce[e];if(t&&!t.disabled){if(W){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ie(e)}Oe(t.value),Ve()}},[Ce,W,l,Oe,Ve]);E(()=>{if(!te)return;return y(e=>!("Escape"!==e.key||!ge.current)&&(Ve(),!0),ce)},[te,Ve]),E(()=>{if(!te)return;const e=e=>{const t=e.target;ae.current?.contains(t)||ce()?.contains(t)||Ve(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ve(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[te,Ve]),E(()=>{!te||ne<0||oe.current?.querySelector(`#${CSS.escape(Ne(ne))}`)?.scrollIntoView({block:"nearest"})},[te,ne]);const Le=j(e=>{const r=ye.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=te?ne:ze,i=t(Ce,r.buffer,n);i<0||(te?ie(i):W?(ie(i),re(!0)):Fe(i))},[te,ne,ze,Ce,Fe,W]),Me=te?a(w,(e,t)=>{const r=(n=e.value,W?Ie.includes(n):l===n);var n;const i=t===ne;/* @__PURE__ */
5
+ return I("div",{id:Ne(t),role:"option",lang:e.description||F?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ie(t)},onClick:()=>Fe(t),className:`mx-1 cursor-pointer truncate rounded-lg ${me}${W?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[W&&/* @__PURE__ */O(o,{selected:r}),F?/* @__PURE__ */O("span",{className:"block min-w-0 flex-1 truncate",children:F(e,{selected:r,active:i})}):W?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1",children:[
6
+ /* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",children:e.label}),e.description&&/* @__PURE__ */O("span",{className:ve,children:e.description})]}):e.description?
7
+ /* @__PURE__ */I(S,{children:[
8
+ /* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",children:e.label}),
9
+ /* @__PURE__ */O("span",{className:ve,children:e.description})]}):e.label]},e.value)},xe,"mx-1"):null,Ge=void 0!==Ae?
10
+ /* @__PURE__ */I("span",{className:"relative block min-w-0 truncate",children:[
11
+ /* @__PURE__ */O("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ae}),
12
+ /* @__PURE__ */O("span",{lang:void 0===Pe?Ue:void 0,className:"sr-only",children:Pe??Be})]}):/* @__PURE__ */O("span",{lang:Ue,className:"block truncate "+(void 0===Be?"text-gray-400":""),children:Be??H??" "}),Je={zIndex:h.popup,left:Se?.left,top:Se?.top,bottom:Se?.bottom,width:Se?.width,maxHeight:Se?.maxHeight??b,visibility:Se?void 0:"hidden",...g()},Qe=/* @__PURE__ */O("div",{ref:oe,id:we,role:"listbox","aria-labelledby":Z??(Y?void 0:ke),"aria-label":Z?void 0:Y,"aria-multiselectable":W||void 0,className:ue?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:ue?null!==he?{maxHeight:he}:void 0:null!==he?{...Je,maxHeight:he}:Je,children:Me}),qe=ue?/* @__PURE__ */I("div",{ref:de,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Je,children:[Qe,
13
+ /* @__PURE__ */O("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:J.map((e,t)=>/* @__PURE__ */I("button",{ref:e=>{se.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ve(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(J?.length??0)-1,n=t=>{e.preventDefault(),se.current[t]?.focus()},i=()=>{e.preventDefault(),le.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Ve());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ve()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${me} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-gray-400":"cursor-pointer text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */O(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
14
+ /* @__PURE__ */O("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Qe;/* @__PURE__ */
15
+ return I("div",{ref:ae,className:"relative",children:[
16
+ /* @__PURE__ */O("button",{ref:le,id:ke,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":te,"aria-controls":te?we:void 0,"aria-activedescendant":te&&ne>=0?Ne(ne):void 0,"aria-invalid":z||void 0,"aria-describedby":Te,"aria-label":Y,"aria-labelledby":Z,title:V,disabled:K,"aria-readonly":G||void 0,onClick:()=>te?Ve():We(),onKeyDown:t=>{if(!K&&!G)switch(t.key){case"ArrowDown":return t.preventDefault(),void(te?ie(e=>n(Ce,e,1)):We());case"ArrowUp":return t.preventDefault(),void(te?ie(e=>n(Ce,e,-1)):We());case"Home":return void(te&&(t.preventDefault(),ie(e(Ce))));case"End":return void(te&&(t.preventDefault(),ie(r(Ce))));case"Enter":return void(te&&(t.preventDefault(),Fe(ne)));case" ":return t.preventDefault(),void(te?Fe(ne):We());case"Escape":return void(te&&(t.preventDefault(),t.stopPropagation(),Ve()));case"Tab":return te&&ue&&!t.shiftKey?(t.preventDefault(),void se.current[0]?.focus()):void(te&&Ve(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:s({invalid:z,size:A,readOnly:G,auto:je,className:`${G?"":"pr-8 "}text-left ${B}`.trim()}),children:Q?
17
+ /* @__PURE__ */I("span",{className:"flex min-w-0 items-center gap-1",children:[Ge,
18
+ /* @__PURE__ */O("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Ge}),Q&&/* @__PURE__ */O("span",{id:$e,hidden:!0,children:be.select.changed}),je&&/* @__PURE__ */O("span",{id:Ee,hidden:!0,children:be.settingView.auto}),!G&&/* @__PURE__ */O(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
19
+ /* @__PURE__ */I("select",{ref:ee,value:l,multiple:W||void 0,onChange:e=>Oe(W?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:K,"aria-hidden":"true",tabIndex:-1,className:"sr-only",..._,children:[void 0!==H&&!W&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:H}),
20
+ /* @__PURE__ */O(R,{items:w})]}),te&&C(qe,document.body)]})}),B=w(function({touchSize:e="touch",...t},r){const n=u();return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */O(H,{ref:r,...t,size:e}):/* @__PURE__ */O(z,{ref:r,...t}):/* @__PURE__ */O(z,{ref:r,...t,size:e})});export{H as NativeSelect,B as Select_default};
@@ -1,9 +1,9 @@
1
- import{useShellLocale as e}from"./chunk-VKMEQKYT.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as a,Children as d}from"react";import{jsxs as t,jsx as i}from"react/jsx-runtime";var n={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-gray-200",warning:"border-amber-300",current:"border-gray-200"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:g="",style:x,tone:y="neutral"}){const f=n[m??(o?"md":"none")],N=a(),v=a(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,C=A?"section":"div",K=`rounded-(--radius-card) border ${l[y]} bg-white shadow-sm ${h}`.trim(),M=d.toArray(e).length>0,Q=M?"border-b border-gray-100 ":"",B="current"===y,E=B?"text-base font-semibold text-blue-700":"text-base font-semibold text-gray-900",H=B?"rounded-t-(--radius-card) bg-blue-50 ":"",L=`${Q}${H}${f.edge} ${E}`;/* @__PURE__ */
2
- return t(C,{className:K,style:x,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...B?{"aria-current":!0}:{},children:[$?
3
- /* @__PURE__ */t("div",{className:`${Q}${H}${f.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${E}`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?/* @__PURE__ */i(j,{id:N,className:E,children:r}):/* @__PURE__ */i("div",{className:E,children:r}),
4
- /* @__PURE__ */i("p",{id:v,className:B?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-gray-500",children:s})]}):null!=r&&(null!=u?
5
- /* @__PURE__ */t("div",{className:`${L} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?
6
- /* @__PURE__ */i(j,{id:N,className:L,children:r}):/* @__PURE__ */i("div",{className:L,children:r})),M&&/* @__PURE__ */i("div",{className:[f.body,g].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */i("div",{className:`border-t border-gray-100 ${f.edge}`,children:c})]})}function c({label:a,value:d,icon:n,delta:l,className:s=""}){const c=e(),o="number"==typeof d&&c?r(d,c):d,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
1
+ import{useShellLocale as e}from"./chunk-E6UCGCOC.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as a,Children as d}from"react";import{jsxs as t,jsx as i}from"react/jsx-runtime";var n={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-gray-200",warning:"border-amber-300",current:"border-gray-200"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:g="",style:x,tone:y="neutral"}){const f=n[m??(o?"md":"none")],N=a(),v=a(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,C=null!=p&&""!==p,k=w||C,A=k?"section":"div",O=`rounded-(--radius-card) border ${l[y]} bg-white shadow-sm ${h}`.trim(),B=d.toArray(e).length>0,E=B?"border-b border-gray-100 ":"",G="current"===y,H=G?"text-base font-semibold text-blue-700":"text-base font-semibold text-gray-900",L=G?"rounded-t-(--radius-card) bg-blue-50 ":"",M=`${E}${L}${f.edge} ${H}`;/* @__PURE__ */
2
+ return t(A,{className:O,style:x,...C?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&k?{"aria-describedby":v}:{},...G?{"aria-current":!0}:{},children:[$?
3
+ /* @__PURE__ */t("div",{className:`${E}${L}${f.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${H}`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?/* @__PURE__ */i(j,{id:N,className:H,children:r}):/* @__PURE__ */i("div",{className:H,children:r}),
4
+ /* @__PURE__ */i("p",{id:v,className:G?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-gray-500",children:s})]}):null!=r&&(null!=u?
5
+ /* @__PURE__ */t("div",{className:`${M} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?
6
+ /* @__PURE__ */i(j,{id:N,className:M,children:r}):/* @__PURE__ */i("div",{className:M,children:r})),B&&/* @__PURE__ */i("div",{className:[f.body,g].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */i("div",{className:`border-t border-gray-100 ${f.edge}`,children:c})]})}function c({label:a,value:d,icon:n,delta:l,className:s=""}){const c=e(),o="number"==typeof d&&c?r(d,c):d,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
7
7
  return t("div",{className:`rounded-(--radius-card) border border-gray-200 bg-white p-4 shadow-sm ${s}`.trim(),children:[
8
8
  /* @__PURE__ */t("div",{className:"flex items-center justify-between text-gray-500",children:[
9
9
  /* @__PURE__ */i("span",{className:"text-xs font-medium uppercase tracking-wide",children:a}),n]}),
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as i}from"./chunk-VKMEQKYT.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as i}from"./chunk-E6UCGCOC.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
2
2
  return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
3
3
  /* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
4
4
  /* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
@@ -0,0 +1,19 @@
1
+ import{ChartBrush as t}from"./chunk-EYKUKN32.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as l,areaFrom as n}from"./chunk-VFC6QUEN.js";import{ChartDefs as i,MOTION as o,stagger as s,fillFor as c,dashFor as h,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as d}from"./chunk-Y4MI6NRI.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{ChartTooltip as p}from"./chunk-P5BOTIJU.js";import{tooltipBesideBand as g}from"./chunk-MG7A3R75.js";import{pairedAxes as k,niceAxis as y,niceMax as x,linearScale as v,axisGutter as b,bandScale as M,ladderScale as N}from"./chunk-2JWPNR2U.js";import{usePlotWidth as j}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as $,CHART_INK as w,STATUS_VARS as A}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as R}from"./chunk-TWVUQUUD.js";import{useShellStrings as V,useShellLocale as C}from"./chunk-E6UCGCOC.js";import{formatPercent as L,formatPlain as U}from"./chunk-C3QOHMR6.js";import{useRef as W,useState as z,useId as E,useEffect as I}from"react";import{jsx as S,jsxs as D}from"react/jsx-runtime";var O=12,Y=16,B=26,F=52,P=t=>"number"==typeof t&&Number.isFinite(t);function T({series:T,labels:K,height:G=200,stacked:Q=!1,stackMode:H="value",levels:J,curve:Z="linear",tension:X=0,max:q,yTickCount:_=4,formatValue:tt,formatTooltipValue:et,tooltipLabels:at,yAxisLabel:rt,referenceLines:lt,labelEndpoints:nt=!1,dots:it,dotVariant:ot="border",pulse:st=!1,brush:ct=!1,range:ht,onRangeChange:mt,loading:dt=!1,animate:ut=!0,reveal:ft="left-to-right",fillVariant:pt="gradient",gridStyle:gt="solid",width:kt,className:yt,emptyLabel:xt}){const vt=V().charts,bt=C(),Mt=tt??(t=>U(t,bt)),Nt=et??Mt,jt=xt??vt.noData,$t=W(null),wt=j($t),At=kt??wt,[Rt,Vt]=z(null),[Ct,Lt]=z(null),{highlighted:Ut}=u(),Wt=E();if(I(()=>{if(null!==Rt)return R(t=>"Escape"===t.key&&(Vt(null),!0))},[Rt]),dt)/* @__PURE__ */
2
+ return S("div",{className:yt,ref:$t,children:/* @__PURE__ */S(d,{height:G,width:kt??wt})});const zt=K,Et=ht??Ct??[0,Math.max(0,zt.length-1)],[It,St]=Et,Dt=t=>ct?t.slice(It,St+1):t,Ot=T.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(P)).map(t=>({...t,data:Dt(t.data)}));if(K=Dt(zt),0===Ot.length||0===K.length)/* @__PURE__ */
3
+ return S("div",{className:yt,ref:$t,children:/* @__PURE__ */S("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:G},children:jt})});const Yt=K.map((t,e)=>Ot.reduce((t,a)=>t+(P(a.data[e])?a.data[e]:0),0)),Bt=(t,e)=>Yt[e]>0?t/Yt[e]:null,Ft=[];if(Q){let t=K.map(()=>0);for(const e of Ot)t=t.map((t,a)=>t+(P(e.data[a])?e.data[a]:0)),Ft.push("percent"===H?t.map((t,e)=>Bt(t,e)):[...t])}const Pt=!!J&&J.length>0,Tt=t=>"right"===t.axis,Kt=!Q&&!Pt&&void 0===q&&Ot.some(Tt)&&Ot.some(t=>!Tt(t)),Gt=Kt?Ot.filter(t=>!Tt(t)):Ot,Qt=Kt?Ot.filter(Tt).flatMap(t=>t.data.filter(P)):[],Ht=Q?(Ft.at(-1)??[]).filter(P):Gt.flatMap(t=>t.data.filter(P)),Jt=Kt?k([Math.min(0,...Ht),Math.max(0,...Ht)],[Math.min(0,...Qt),Math.max(0,...Qt)],{intervals:_+1,integerLeft:Ht.every(Number.isInteger),integerRight:Qt.every(Number.isInteger)}):null,Zt=Jt?Jt.left:Q&&"percent"===H||Pt||void 0!==q?null:y(Q?0:Math.min(0,...Ht),Math.max(0,...Ht),{intervals:_+1,integer:Ht.every(Number.isInteger)}),Xt=Zt?Zt.lo:0,qt=Q&&"percent"===H?1:Zt?Zt.hi:q??x(Math.max(...Ht,0)),_t=Q&&"percent"===H?t=>L(Math.round(100*t),0,bt):Mt,te=Pt?J:Zt?Zt.ticks:v([Xt,qt],{from:0,to:1}).ticks(_+1),ee=b(te.map(_t),F),ae=Jt?b(Jt.right.ticks.map(Mt),Y):Y,re={left:ee,right:Math.max(ee+1,At-ae),top:O,bottom:G-B},le=M(K.length,{from:re.left,to:re.right}),ne=Pt?N(J,{from:re.bottom,to:re.top}):null,ie=v([Xt,qt],{from:re.bottom,to:re.top}),oe=ie(Math.max(Xt,0)),se=t=>ne?ne(t):ie(t),ce=Jt?v([Jt.right.lo,Jt.right.hi],{from:re.bottom,to:re.top}):null,he=t=>ce&&Tt(t)?ce:se,me=ne?ne.levels.map(t=>({value:t,y:ne(t)})):te.map(t=>({value:t,y:ie(t)})),de=t=>e=>{e.preventDefault(),Vt(e=>{const a=(e??0)+t;return Math.min(K.length-1,Math.max(0,a))})},ue=Math.max(1,Math.ceil(K.length/Math.max(1,Math.floor(At/96))));/* @__PURE__ */
4
+ return D("div",{className:`relative ${yt??""}`,ref:$t,children:[
5
+ /* @__PURE__ */D("svg",{width:"100%",height:G,viewBox:`0 0 ${At} ${G}`,role:"img","aria-label":vt.overIntervals(Ot.map(t=>t.label),K.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Vt(null),onBlur:()=>Vt(null),onKeyDown:t=>{"ArrowRight"===t.key&&de(1)(t),"ArrowLeft"===t.key&&de(-1)(t)},children:[
6
+ /* @__PURE__ */S("defs",{children:/* @__PURE__ */S("clipPath",{id:Wt,children:/* @__PURE__ */S("rect",{x:re.left,y:re.top,width:re.right-re.left,height:re.bottom-re.top})})}),
7
+ /* @__PURE__ */S(i,{id:Wt,fills:Ot.map((t,e)=>({color:$(t.slot,t.color,t.tone),variant:t.fillVariant??pt})),fadeFrom:Q?.42:.3,reveal:!!ut&&ft}),me.map(t=>/* @__PURE__ */S("line",{x1:re.left,y1:t.y,x2:re.right,y2:t.y,stroke:w.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===gt?"3 3":void 0},`grid-${t.value}`)),
8
+ /* @__PURE__ */S("line",{x1:re.left,y1:oe,x2:re.right,y2:oe,stroke:w.axis,strokeWidth:1,shapeRendering:"crispEdges"}),me.map(t=>/* @__PURE__ */S("text",{x:re.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:w.label,style:{fontVariantNumeric:"tabular-nums"},children:_t(t.value)},`ytick-${t.value}`)),Jt&&me.map((t,e)=>/* @__PURE__ */S("text",{x:re.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:w.label,style:{fontVariantNumeric:"tabular-nums"},children:Mt(Jt.right.ticks[e])},`ytick-r-${t.value}`)),rt&&/* @__PURE__ */S("text",{x:12,y:(re.top+re.bottom)/2,transform:`rotate(-90 12 ${(re.top+re.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:w.label,children:rt}),
9
+ /* @__PURE__ */S("g",{clipPath:`url(#${Wt})`,mask:ut&&ft?`url(#${m(Wt)})`:void 0,children:Ot.map((t,e)=>{const i=$(t.slot,t.color,t.tone),m=t.mode??(Q?"area":"line"),d=f(t.key,Ut);if("step"===m){const e=K.map((e,a)=>({start:le(a),end:le.end(a),value:t.data[a]})).filter(t=>P(t.value)).map(e=>({start:e.start,end:e.end,y:he(t)(e.value)}));/* @__PURE__ */
10
+ return S("path",{d:a(e),fill:"none",stroke:i,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:d??void 0,className:"rosh-viz-mark"},t.key)}const u=K.map((a,r)=>{const l=Q?Ft[e]?.[r]:t.data[r];return P(l)?[le.center(r),he(t)(l)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*le.bandwidth),r="solid"===t.fillVariant,l=he(t);/* @__PURE__ */
11
+ return S("g",{opacity:d??void 0,className:"rosh-viz-mark",children:K.map((n,c)=>{const h=Q?Ft[e]?.[c]:t.data[c];if(!P(h))return null;const m=l(h);/* @__PURE__ */
12
+ return S("rect",{x:le.center(c)-a/2,y:Math.min(m,oe),width:a,height:Math.abs(oe-m),rx:2,fill:i,fillOpacity:r?1:.35,className:ut?o.rise:void 0,style:ut?s(c,26):void 0},c)})},t.key)}const p=r(u,Z,X),g=Q&&e>0?K.map((t,a)=>[le.center(a),se(Ft[e-1]?.[a]??0)-2]):null,k=g?l(p,g):n(p,u,oe);/* @__PURE__ */
13
+ return D("g",{opacity:d??void 0,className:"rosh-viz-mark",children:[("area"===m||Q)&&
14
+ /* @__PURE__ */S("path",{d:k,fill:c(Wt,e,t.fillVariant??pt,i),stroke:"none"}),
15
+ /* @__PURE__ */S("path",{d:p,fill:"none",stroke:i,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:h(t.stroke??(t.forecast?"animated-dashed":"solid")),className:ut&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?o.march:void 0})]},t.key)})}),lt?.map((t,e)=>{const a=t.color??A[t.tone??"critical"],r=se(t.value);/* @__PURE__ */
16
+ return D("g",{children:[
17
+ /* @__PURE__ */S("line",{x1:re.left,y1:r,x2:re.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */S("text",{x:re.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(it??(nt?"last":"none"))&&Ot.map((t,a)=>{if("column"===t.mode)return null;const r=it??(nt?"last":"none"),l=$(t.slot,t.color,t.tone),n=[...t.data].map(P).lastIndexOf(!0),i="all"===r?K.map((t,e)=>e).filter(e=>P(Q?Ft[a]?.[e]:t.data[e])):n>=0?[n]:[];/* @__PURE__ */
18
+ return D("g",{children:[i.map(r=>{const i=Q?Ft[a]?.[r]:t.data[r];return P(i)?/* @__PURE__ */S(e,{cx:le.center(r),cy:he(t)(i),color:l,variant:ot,pulse:st&&r===n,title:`${K[r]}: ${t.label} ${Mt(i)}`},r):null}),nt&&n>=0&&P(Q?Ft[a]?.[n]:t.data[n])&&/* @__PURE__ */S("text",{x:le.center(n)-10,y:he(t)(Q?Ft[a]?.[n]:t.data[n])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:w.label,style:{fontVariantNumeric:"tabular-nums"},children:Mt(Q?Ft[a]?.[n]:t.data[n])})]},`dots-${t.key}`)}),K.map((t,e)=>e%ue===0?/* @__PURE__ */S("text",{x:le.center(e),y:G-8,textAnchor:"middle",fontSize:11,fill:w.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Rt&&/* @__PURE__ */S("line",{x1:le.center(Rt),y1:re.top,x2:le.center(Rt),y2:re.bottom,stroke:w.axis,strokeWidth:1}),K.map((t,e)=>/* @__PURE__ */S("rect",{x:le(e),y:re.top,width:Math.max(1,le.bandwidth),height:re.bottom-re.top,fill:"transparent",onMouseEnter:()=>Vt(e)},`hit-${e}`))]}),ct&&zt.length>2&&/* @__PURE__ */S(t,{className:"mt-1",labels:zt,width:At,data:T[0]?.data??[],range:Et,onRangeChange:t=>{mt?mt(t):Lt(t)}}),null!==Rt&&
19
+ /* @__PURE__ */S("div",{className:"pointer-events-none absolute top-2 z-10",style:g(le.center(Rt),le.bandwidth,At),children:/* @__PURE__ */S(p,{title:at?.[Rt]??K[Rt],rows:Ot.map((t,e)=>({key:t.key,label:t.label,color:$(t.slot,t.color,t.tone),value:P(t.data[Rt])?Q&&"percent"===H?`${L(100*(Bt(t.data[Rt],Rt)??0),1,bt)} · ${Nt(t.data[Rt])}`:Nt(t.data[Rt]):void 0})),footnote:Q&&"percent"===H?vt.inBucket(Nt(Yt[Rt])):void 0})})]})}export{T as TimeSeriesChart};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as r}from"./chunk-VKMEQKYT.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as r}from"./chunk-E6UCGCOC.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
3
3
  return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
4
4
  return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
@@ -1,6 +1,6 @@
1
- import{MOTION as e,stagger as a}from"./chunk-465RRWBY.js";import{autoHighlightIndex as t}from"./chunk-CNYAHYE6.js";import{seriesColor as s,STATUS_VARS as l,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as r}from"./chunk-VKMEQKYT.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsx as o,jsxs as h}from"react/jsx-runtime";function c({rows:c,max:u,formatValue:d,emphasisKey:p,highlight:g="none",emphasisTone:x,barHeight:f=12,rowGap:y=30,animate:b=!0,labelFont:N="sans",className:k,emptyLabel:v}){const $=i().charts,j=r(),w=d??(e=>m(e,j)),M=v??$.nothingToRank;if(0===c.length)/* @__PURE__ */
2
- return o("p",{className:`text-sm text-gray-500 ${k??""}`,children:M});const F=t(c.map(e=>e.value),g),R=p??(null===F?void 0:c[F]?.key),C=u??Math.max(...c.map(e=>e.value).filter(Number.isFinite),0),T=s(0);/* @__PURE__ */
3
- return o("ol",{className:`m-0 list-none p-0 ${k??""}`,style:{display:"grid",rowGap:`${Math.max(4,y-f)}px`},children:c.map((t,i)=>{const r=t.key===R,m=r?x?l[x]:s(1):R?n.muted:T,c=Number.isFinite(t.value)?t.value:null,u=null!==c&&C>0?Math.max(0,Math.min(1,c/C)):0;/* @__PURE__ */
1
+ import{MOTION as e,stagger as a}from"./chunk-465RRWBY.js";import{autoHighlightIndex as t}from"./chunk-CNYAHYE6.js";import{seriesColor as s,STATUS_VARS as l,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as r}from"./chunk-E6UCGCOC.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsx as o,jsxs as h}from"react/jsx-runtime";function c({rows:c,max:u,formatValue:d,emphasisKey:p,highlight:g="none",emphasisTone:x,barHeight:f=12,rowGap:y=30,animate:b=!0,labelFont:N="sans",className:k,emptyLabel:v}){const $=i().charts,j=r(),w=d??(e=>m(e,j)),C=v??$.nothingToRank;if(0===c.length)/* @__PURE__ */
2
+ return o("p",{className:`text-sm text-gray-500 ${k??""}`,children:C});const M=t(c.map(e=>e.value),g),F=p??(null===M?void 0:c[M]?.key),R=u??Math.max(...c.map(e=>e.value).filter(Number.isFinite),0),G=s(0);/* @__PURE__ */
3
+ return o("ol",{className:`m-0 list-none p-0 ${k??""}`,style:{display:"grid",rowGap:`${Math.max(4,y-f)}px`},children:c.map((t,i)=>{const r=t.key===F,m=r?x?l[x]:s(1):F?n.muted:G,c=Number.isFinite(t.value)?t.value:null,u=null!==c&&R>0?Math.max(0,Math.min(1,c/R)):0;/* @__PURE__ */
4
4
  return h("li",{className:"grid gap-1",children:[
5
5
  /* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-3",children:[
6
6
  /* @__PURE__ */h("span",{className:`truncate ${"mono"===N?"font-mono ":""}text-xs text-gray-600 ${r?"font-semibold":""}`,title:t.label,children:[t.label,r&&/* @__PURE__ */o("span",{className:"sr-only",children:` ${$.emphasised}`})]}),
@@ -0,0 +1,14 @@
1
+ import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-E6UCGCOC.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,L=i(),S=y??(e=>h(e,L)),j=A??N.noStages,z=c(),[C,V]=m(null),{highlighted:w}=e(),E=s(null),F=l(E,560),U=$??F;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const W=b??a(0),Z=p??54*x.length,B=Math.max(...x.map(e=>e.value),1),H="bars"===v,O=H?Math.round(Math.min(132,Math.max(80,.24*U))):Math.round(Math.min(168,Math.max(104,.38*U))),P=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},R=e=>{const t=P(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},T=H?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=R(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,Y=U-O-T,G=Math.max(H?2:0,Math.min(M,Y)),I=e=>Math.max(G,Y*Math.max(0,e/B)),J=e=>I(e)/2,Q=O+Y/2,X=e=>46+e/Math.max(1,x.length-1)*54,q=e=>`color-mix(in oklab, ${W} ${X(e).toFixed(0)}%, ${n.surface})`,D=e=>X(e)>=55?n.surface:n.label,K=(e,t)=>null!==C?C!==e:null!==w&&w!==t,_=null!==C?x[C]:void 0;/* @__PURE__ */
2
+ return f("div",{className:`relative ${k??""}`,ref:E,children:[
3
+ /* @__PURE__ */f("svg",{width:"100%",height:Z,viewBox:`0 0 ${U} ${Z}`,role:"img","aria-labelledby":z,onMouseLeave:()=>V(null),children:[
4
+ /* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*Z/x.length+g/2,a=(t+1)*Z/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,L),i=.62*o.length*12+12;if(H){const u=O,h=u+I(e.value),{count:c,drop:m}=R(t);/* @__PURE__ */
5
+ return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>V(t),children:[
6
+ /* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:q(t)}),
7
+ /* @__PURE__ */d("text",{x:O-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:D(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
8
+ /* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
9
+ /* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=J(e.value),c="cone"===v?J(x[t+1]?.value??e.value):h,m=P(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
10
+ return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>V(t),children:[
11
+ /* @__PURE__ */d("path",{d:`M${Q-h},${l} L${Q+h},${l} L${Q+c},${a} L${Q-c},${a} Z`,fill:q(t)}),
12
+ /* @__PURE__ */d("text",{x:O-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
13
+ /* @__PURE__ */f("text",{x:O-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[S(e.value),null!=m?` · −${u(m,1,L)}`:""]}),
14
+ /* @__PURE__ */d("text",{x:s?Q:Q+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?D(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==C&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(t,{title:_.label,rows:[{key:"value",label:N.count,color:q(C),value:S(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...C>0&&x[C-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[C-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-V23TPYHO.js";import{Select_default as l}from"./chunk-PMOGQHYX.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-TJPPV7KZ.js";import{Button_default as d}from"./chunk-4IU5BSVE.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
1
+ import{Card as e}from"./chunk-VU6VPKM3.js";import{Select_default as l}from"./chunk-VTVOQS5L.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-WTY3SXO7.js";import{Button_default as d}from"./chunk-4IU5BSVE.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
2
2
  return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
3
3
  /* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
4
4
  /* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
@@ -1,15 +1,15 @@
1
- import{TimelineCard as e}from"./chunk-SURSVJA2.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-ZY62UQI2.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-YDEIXM2A.js";import{Icon as s}from"./chunk-KIBL6M3T.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-VKMEQKYT.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const x=t.map(e=>a(e.date)).filter(e=>null!=e),S=l(Date.now,null)??Math.max(0,...x,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),D=x.length?Math.min(...x):S,P=x.length?Math.max(...x):S,C=a(r??null)??D,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),T=(()=>{const e=[R,P,q,C+i];return O||e.push(S),Math.max(...e)})(),I=Math.max(1,Math.round((T-C)/i)),A=a(p??null)??P??C,L=Math.min(Math.max(y??A,C),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(C).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),K=j??F,E=j?a(j.date):F?C:null,Y=$?a($.date):null,z=!!(K&&$&&null!=E&&null!=Y&&L>E&&L<Y);let B,J;if(z&&null!=E&&null!=Y){const e=(L-E)/Math.max(Y-E,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of K?.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(K?.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):K?.est_completion_date||$?.est_completion_date||null,B={id:`interp-${L}`,progress_number:_.estimated,date:new Date(L).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},J=K}else if(B=K??t[t.length-1]??null,B){const e=t.findIndex(e=>e.id===B.id);J=e>=0&&e<t.length-1?t[e+1]:null}else J=null;const Q={};for(const e of J?.items??[])Q[e.part_number]=e;const U=!(!d||B?.id===d),V=d?Math.min(a(p??null)??T,T):T,G=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:C,endMs:T,totalLeadDays:I,scrubMs:L,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:U,beforeAnchor:K,nextAfter:$,displayed:B,prevReport:J,prevByPN:Q,isInterpolated:z,playing:v,startPlay:()=>{if(v)return void N();if(V<=C)return void f(V);M(!0),f(C);let e=performance.now(),t=C;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=V)return f(V),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:G,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),x=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),S=new Map(N.map(({report:e,ms:t})=>[e.id,t])),D=N.map(({ms:e})=>e),P=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
2
- return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:x,markers:P,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=S.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:D,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:x,variant:S="card",onPlayStart:D}){const{reports:P,markers:C,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:I,setScrubMs:A,displayed:L,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:K,estCompletionMs:E}=n,Y=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,D),z=c().production,B=d(),J=_??z.heading,Q=e=>o(e,B);if(0===P.length&&0===C.length)return null;const U=C.filter(e=>"shipment"===e.kind),V=C.filter(e=>"inspection"===e.kind),G=C.filter(e=>"invoice"===e.kind),H=(L?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),X=L?v(L):0,Z=P.find(e=>e.id===F),W=Z?N(Z):K,ee=
3
- /* @__PURE__ */h("button",{type:"button",onClick:Y.toggle,"aria-pressed":Y.playing,title:Y.playing?z.pause:z.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[Y.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
- /* @__PURE__ */b("span",{children:Y.playing?z.pause:z.play})]}),te=j&&(x??W)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{Y.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??z.backTo(String(W))}):null,[re,ne]=p(z.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:L?/* @__PURE__ */h(y,{children:[e&&re,
1
+ import{TimelineCard as e}from"./chunk-SURSVJA2.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-DZNG34DC.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-YDEIXM2A.js";import{Icon as s}from"./chunk-KIBL6M3T.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-E6UCGCOC.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),C=l(Date.now,null)??Math.max(0,...x,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),S=x.length?Math.min(...x):C,D=x.length?Math.max(...x):C,P=a(r??null)??S,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(C),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:""}})(),E=j??F,G=j?a(j.date):F?P:null,z=$?a($.date):null,B=!!(E&&$&&null!=G&&null!=z&&L>G&&L<z);let J,K;if(B&&null!=G&&null!=z){const e=(L-G)/Math.max(z-G,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of E?.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(E?.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):E?.est_completion_date||$?.est_completion_date||null,J={id:`interp-${L}`,progress_number:_.estimated,date:new Date(L).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},K=E}else if(J=E??t[t.length-1]??null,J){const e=t.findIndex(e=>e.id===J.id);K=e>=0&&e<t.length-1?t[e+1]:null}else K=null;const U={};for(const e of K?.items??[])U[e.part_number]=e;const H=!(!d||J?.id===d),V=d?Math.min(a(p??null)??T,T):T,X=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:H,beforeAnchor:E,nextAfter:$,displayed:J,prevReport:K,prevByPN:U,isInterpolated:B,playing:v,startPlay:()=>{if(v)return void N();if(V<=P)return void f(V);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>=V)return f(V),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:X,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),x=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),C=new Map(N.map(({report:e,ms:t})=>[e.id,t])),S=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=C.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:S,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:C="card",onPlayStart:S}){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:E,estCompletionMs:G}=n,z=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(D.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),I,S),B=c().production,J=d(),K=_??B.heading,U=e=>o(e,J);if(0===D.length&&0===P.length)return null;const H=P.filter(e=>"shipment"===e.kind),V=P.filter(e=>"inspection"===e.kind),X=P.filter(e=>"invoice"===e.kind),Y=(L?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),Z=L?v(L):0,Q=D.find(e=>e.id===F),W=Q?N(Q):E,ee=
3
+ /* @__PURE__ */h("button",{type:"button",onClick:z.toggle,"aria-pressed":z.playing,title:z.playing?B.pause:B.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[z.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
4
+ /* @__PURE__ */b("span",{children:z.playing?B.pause:B.play})]}),te=j&&(x??W)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{z.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??B.backTo(String(W))}):null,[re,ne]=p(B.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:L?/* @__PURE__ */h(y,{children:[e&&re,
5
5
  /* @__PURE__ */b("b",{className:"font-medium",children:N(L)}),e&&ne,
6
- /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",Q(new Date(L.date).getTime())," · ",z.overall(Math.round(X))," · ",z.inStock(H)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:z.noReport})});if("rail"===S){const e=null!=E&&E>=q&&q>O,t=e?{key:"__estimate__",label:z.estimatedCompletion,dateText:Q(E)}:null;/* @__PURE__ */
6
+ /* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",U(new Date(L.date).getTime())," · ",B.overall(Math.round(Z))," · ",B.inStock(Y)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:B.noReport})});if("rail"===C){const e=null!=G&&G>=q&&q>O,t=e?{key:"__estimate__",label:B.estimatedCompletion,dateText:U(G)}: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:P,markers:C,valueMs:I,activeId:L?.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:Y.stop,playback:{playing:Y.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:Y.stop}}),
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??B.start,end:M?.end??(e?B.estDone:void 0)},onDragStart:z.stop,playback:{playing:z.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:z.stop}}),
9
9
  /* @__PURE__ */h("div",{className:"rosh-tl-railrow","data-timeline-part":"rail-row",children:[ee,te,ae(!1)]})]})}/* @__PURE__ */
10
- return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:J,subject:R,meta:[`${Q(O)} → ${Q(q)}`,z.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
11
- /* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[P.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
12
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),z.report]}),U.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]}),V.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
14
- /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),z.inspection]}),G.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:q,reports:P,markers:C,valueMs:I,activeId:L?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:Y.stop,playback:{playing:Y.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:Y.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:K,subject:R,meta:[`${U(O)} → ${U(q)}`,B.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"}),B.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"})}),B.shipment]}),V.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
14
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),B.inspection]}),X.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
15
+ /* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),B.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:z.stop,playback:{playing:z.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:z.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
@@ -1,4 +1,4 @@
1
- import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
1
+ import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
2
2
  return i("div",{className:n,children:/* @__PURE__ */s("svg",{width:"100%",height:o,viewBox:`0 0 ${a} ${o}`,role:"img","aria-label":p,"aria-busy":"true",children:[
3
3
  /* @__PURE__ */i("defs",{children:/* @__PURE__ */s("linearGradient",{id:d,x1:"0",y1:"0",x2:"1",y2:"0",children:[
4
4
  /* @__PURE__ */i("stop",{offset:"0%",stopColor:r.surface,stopOpacity:"0"}),
@@ -1,7 +1,7 @@
1
- import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-VKMEQKYT.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
1
+ import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-E6UCGCOC.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",C=p?t[p]:void 0,b=g?t[g]:a(0);/* @__PURE__ */
2
2
  return s("div",{className:`flex flex-col gap-0.5 rounded-lg border border-gray-200 bg-white p-4 ${f??""}`,children:[
3
3
  /* @__PURE__ */o("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:i}),
4
4
  /* @__PURE__ */s("span",{className:"flex items-baseline gap-2",children:[
5
- /* @__PURE__ */o("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:m}),c&&/* @__PURE__ */o("span",{className:"text-sm font-medium text-gray-500",children:c})]}),N&&/* @__PURE__ */s("span",{className:"text-xs font-medium",style:b?{color:b}:void 0,children:[
5
+ /* @__PURE__ */o("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:m}),c&&/* @__PURE__ */o("span",{className:"text-sm font-medium text-gray-500",children:c})]}),N&&/* @__PURE__ */s("span",{className:"text-xs font-medium",style:C?{color:C}:void 0,children:[
6
6
  /* @__PURE__ */o("span",{"aria-hidden":"true",children:d[N].glyph})," ",l(Math.abs(h),w),
7
- /* @__PURE__ */s("span",{className:"sr-only",children:[" ",y[d[N].word]]})]}),u&&u.length>1&&/* @__PURE__ */o(e,{data:u,height:26,stroke:k,strokeWidth:2,className:"mt-2 w-full"}),x&&/* @__PURE__ */o("span",{className:"mt-1 text-xs text-gray-500",children:x})]})}export{i as StatTile};
7
+ /* @__PURE__ */s("span",{className:"sr-only",children:[" ",y[d[N].word]]})]}),u&&u.length>1&&/* @__PURE__ */o(e,{data:u,height:26,stroke:b,strokeWidth:2,className:"mt-2 w-full"}),x&&/* @__PURE__ */o("span",{className:"mt-1 text-xs text-gray-500",children:x})]})}export{i as StatTile};
@@ -1,3 +1,3 @@
1
- import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as a}from"./chunk-KIBL6M3T.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as s}from"./chunk-VKMEQKYT.js";import{useRef as n,useId as d,useEffect as c}from"react";import{jsxs as m,jsx as u}from"react/jsx-runtime";var f={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl"};function h({open:h,onClose:x,title:p,description:b,role:g="dialog",children:v,footer:y,blocking:k=!1,size:N="md",initialFocus:j,"aria-label":w,"aria-labelledby":C,"aria-describedby":K,className:L=""}){const W=n(null),T=d(),D=d(),I=!k,Q=d(),U=s().dialog;return r(h),i(W,h,j),t(h),c(()=>{if(h)return o(()=>(k||x(),!0),()=>W.current)},[h,k,x]),h?/* @__PURE__ */m("div",{className:"fixed inset-0",style:{zIndex:l.overlay},role:"presentation",children:[
1
+ import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as a}from"./chunk-KIBL6M3T.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as s}from"./chunk-E6UCGCOC.js";import{useRef as n,useId as d,useEffect as c}from"react";import{jsxs as m,jsx as u}from"react/jsx-runtime";var f={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl"};function h({open:h,onClose:x,title:p,description:b,role:g="dialog",children:v,footer:y,blocking:k=!1,size:N="md",initialFocus:j,"aria-label":w,"aria-labelledby":C,"aria-describedby":L,className:W=""}){const U=n(null),D=d(),G=d(),I=!k,K=d(),T=s().dialog;return r(h),i(U,h,j),t(h),c(()=>{if(h)return o(()=>(k||x(),!0),()=>U.current)},[h,k,x]),h?/* @__PURE__ */m("div",{className:"fixed inset-0",style:{zIndex:l.overlay},role:"presentation",children:[
2
2
  /* @__PURE__ */u("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
3
- /* @__PURE__ */u("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:k?void 0:e=>{e.target===e.currentTarget&&x()},children:/* @__PURE__ */m("div",{ref:W,...e({role:g,modal:!0,titleId:p?Q:void 0,labelledBy:C,label:w}),"aria-describedby":K??(b?D:v?T:void 0),className:`relative max-h-full w-full ${f[N]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${L}`.trim(),children:[p&&/* @__PURE__ */u("h2",{id:Q,className:(I?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:p}),b&&/* @__PURE__ */u("p",{id:D,className:((p?"mt-1":I?"pr-8":"")+" text-sm text-gray-500").trim(),children:b}),v&&/* @__PURE__ */u("div",{id:T,className:"mt-2 text-sm text-gray-600",children:v}),y&&/* @__PURE__ */u("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:y}),I&&/* @__PURE__ */u("button",{type:"button",onClick:x,"aria-label":U.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__ */u(a,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]}):null}export{h as Dialog};
3
+ /* @__PURE__ */u("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:k?void 0:e=>{e.target===e.currentTarget&&x()},children:/* @__PURE__ */m("div",{ref:U,...e({role:g,modal:!0,titleId:p?K:void 0,labelledBy:C,label:w}),"aria-describedby":L??(b?G:v?D:void 0),className:`relative max-h-full w-full ${f[N]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${W}`.trim(),children:[p&&/* @__PURE__ */u("h2",{id:K,className:(I?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:p}),b&&/* @__PURE__ */u("p",{id:G,className:((p?"mt-1":I?"pr-8":"")+" text-sm text-gray-500").trim(),children:b}),v&&/* @__PURE__ */u("div",{id:D,className:"mt-2 text-sm text-gray-600",children:v}),y&&/* @__PURE__ */u("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:y}),I&&/* @__PURE__ */u("button",{type:"button",onClick:x,"aria-label":T.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__ */u(a,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]}):null}export{h as Dialog};
@@ -1 +1 @@
1
- import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-VKMEQKYT.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,L]=n([]),b=r(0),A="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,A)});L(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,A,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>L([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),b.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(b.current=Math.max(0,b.current-1),0===b.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),b.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
1
+ import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-E6UCGCOC.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,C]=n([]),L=r(0),b="string"==typeof d?d:"",A=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,b)});C(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,b,u,f,m,e,g]),j=s(()=>{h||y.current?.click()},[h]),k=s(()=>C([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>A(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),L.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(L.current=Math.max(0,L.current-1),0===L.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),L.current=0,v(!1),A(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),A(t))}},open:j,take:A,dragOver:x,rejections:D,clearRejections:k}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
@@ -0,0 +1,7 @@
1
+ import{writeClipboard as e}from"./chunk-5PY4H4ZJ.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{toast_default as t}from"./chunk-4NXMMWL6.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
2
+ return s(n,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
3
+ return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:N="bordered",hideCopyButton:k=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":C,className:B=""}){const[T,L]=i(!1),M=o(null),z=a().copy;c(()=>()=>{M.current&&clearTimeout(M.current)},[]);const A=l(async()=>{await e(n)?(L(!0),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{L(!1),M.current=null},2e3),v?.(n)):t.error(z.failed)},[n,v,z]),{box:E,button:G}=p[g],H=!k;/* @__PURE__ */
4
+ return m("div",{id:H?void 0:j,"aria-describedby":H?void 0:C,className:["inline-flex max-w-full items-center rounded-md",u[N],E,B].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
5
+ /* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(w?"whitespace-pre-wrap break-all":"truncate"),title:w?void 0:n,children:y??n}),!k&&/* @__PURE__ */m(d,{children:[
6
+ /* @__PURE__ */s(r,{id:j,"aria-label":x?z.copyLabel(x):z.copy,"aria-describedby":C,onClick:A,className:`${G} text-gray-400`,children:/* @__PURE__ */s(T?h:b,{})}),
7
+ /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:T?z.copied:""})]})]})}export{y as Snippet};
@@ -1,8 +1,8 @@
1
- import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as o}from"./chunk-KIBL6M3T.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as l}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-VKMEQKYT.js";import{useRef as n,useId as d,useEffect as c}from"react";import{jsxs as m,jsx as h}from"react/jsx-runtime";var f={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},u={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function b({onClose:e}){const r=a().dialog;/* @__PURE__ */
2
- return h("button",{type:"button",onClick:e,"aria-label":r.close,className:"rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */h(o,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function p({open:o,onClose:a,side:p="right",size:x="md",title:g,description:y,footer:v,children:k,blocking:N=!1,initialFocus:w,"aria-label":j,"aria-labelledby":C,"aria-describedby":K,className:L=""}){const W=n(null),z=d(),B=d(),D=d();if(r(o),i(W,o,w),t(o),c(()=>{if(o)return l(()=>(N||a(),!0),()=>W.current)},[o,N,a]),!o)return null;const I="bottom"===p,Q=I?{maxHeight:"85vh"}:void 0;/* @__PURE__ */
1
+ import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as o}from"./chunk-KIBL6M3T.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as l}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{useRef as n,useId as d,useEffect as c}from"react";import{jsxs as m,jsx as h}from"react/jsx-runtime";var f={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},u={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function b({onClose:e}){const r=a().dialog;/* @__PURE__ */
2
+ return h("button",{type:"button",onClick:e,"aria-label":r.close,className:"rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */h(o,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function p({open:o,onClose:a,side:p="right",size:x="md",title:g,description:y,footer:v,children:k,blocking:N=!1,initialFocus:w,"aria-label":j,"aria-labelledby":C,"aria-describedby":L,className:W=""}){const U=n(null),z=d(),B=d(),D=d();if(r(o),i(U,o,w),t(o),c(()=>{if(o)return l(()=>(N||a(),!0),()=>U.current)},[o,N,a]),!o)return null;const G="bottom"===p,I=G?{maxHeight:"85vh"}:void 0;/* @__PURE__ */
3
3
  return m("div",{className:"fixed inset-0",style:{zIndex:s.overlay},role:"presentation",children:[
4
4
  /* @__PURE__ */h("div",{className:"fixed inset-0 bg-black/30",onClick:N?void 0:a,"aria-hidden":"true"}),
5
- /* @__PURE__ */m("div",{ref:W,...e({modal:!0,titleId:g?D:void 0,labelledBy:C,label:j}),"aria-describedby":K??(y?B:k?z:void 0),"data-drawer-side":p,style:Q,className:["fixed flex flex-col bg-white shadow-xl",I?"":`w-full max-w-full ${f[x]}`,u[p],I?"rounded-t-xl":"",L].filter(Boolean).join(" "),children:[g?/* @__PURE__ */m("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
5
+ /* @__PURE__ */m("div",{ref:U,...e({modal:!0,titleId:g?D:void 0,labelledBy:C,label:j}),"aria-describedby":L??(y?B:k?z:void 0),"data-drawer-side":p,style:I,className:["fixed flex flex-col bg-white shadow-xl",G?"":`w-full max-w-full ${f[x]}`,u[p],G?"rounded-t-xl":"",W].filter(Boolean).join(" "),children:[g?/* @__PURE__ */m("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
6
6
  /* @__PURE__ */m("div",{className:"min-w-0",children:[
7
7
  /* @__PURE__ */h("h2",{id:D,className:"text-base font-semibold text-gray-900",children:g}),y&&/* @__PURE__ */h("p",{id:B,className:"mt-0.5 text-sm text-gray-500",children:y})]}),!N&&/* @__PURE__ */h(b,{onClose:a})]}):!N&&/* @__PURE__ */h("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */h(b,{onClose:a})}),
8
8
  /* @__PURE__ */m("div",{id:z,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[y&&!g&&/* @__PURE__ */h("p",{id:B,className:("mb-3 text-sm text-gray-500 "+(N?"":"pr-8")).trim(),children:y}),k]}),v&&/* @__PURE__ */h("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:v})]})]})}export{p as Drawer};
@@ -1,2 +1,2 @@
1
- import{useShellPrefs as t}from"./chunk-KC3EX26K.js";import{toast_default as e}from"./chunk-QUS3C264.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);F(),N(s,{volume:u,repeat:d});const t="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(t)}catch{}try{e.info(t)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=O(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*_[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=O(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var V="pomodoro_tasks",j="pomodoro_tasks_migrated";function E(){return Math.random().toString(36).slice(2,11)}function K(){/* @__PURE__ */
2
- return(new Date).toISOString()}var W=null,q=[],J=!1,L=null,Q=/* @__PURE__ */new Set;function U(){for(const t of Q)t()}function X(t){q=t,U()}function $(){const t=W;return t?L=t.list().then(e=>{W===t&&(q=e,J=!0,U())}).catch(()=>{W===t&&(J=!0,U())}).finally(()=>{L=null}):(q=[],J=!0,U(),Promise.resolve())}function z(t){W=t,q=[],J=!1,t?$():U()}function H(t){return Q.add(t),!W||J||L||$(),()=>{Q.delete(t)}}function Y(){return q}function Z(){const e=function(){const{prefs:e,save:n}=t(),r=a(()=>{const t=e.todo_tasks;return Array.isArray(t)?t:[]},[e.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=E(),n=K(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:K()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(H,Y,Y),i=o(t=>{const n=W;if(!n)return e.addTask(t);const o="tmp-"+E(),a=K(),r={done:!1,...t,name:t.name.trim(),id:o,createdAt:a,updatedAt:a};return X([...q,r]),n.create({...t,name:t.name.trim()}).then(t=>X(q.map(e=>e.id===o?{...r,...t}:e))).catch(()=>X(q.filter(t=>t.id!==o))),o},[e]),c=o((t,n)=>{const o=W;if(!o)return e.updateTask(t,n);X(q.map(e=>e.id===t?{...e,...n,id:t,updatedAt:K()}:e)),o.update(t,n).catch(()=>{$()})},[e]),l=o(t=>{const n=W;if(!n)return e.removeTask(t);const o=q;X(q.filter(e=>e.id!==t)),n.remove(t).catch(()=>X(o))},[e]),s=o(t=>{if(!W)return e.toggleDone(t);const n=q.find(e=>e.id===t);n&&c(t,{done:!n.done})},[e,c]),u=o(t=>{W||e.setAllTasks(t)},[e]);return null===W?e:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(j))return;const n=localStorage.getItem(V);if(!n)return void localStorage.setItem(j,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(V),void localStorage.setItem(j,"1");const a=K(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||E(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(V),localStorage.setItem(j,"1")}catch{try{localStorage.setItem(j,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,z as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
1
+ import{useShellPrefs as t}from"./chunk-KC3EX26K.js";import{toast_default as e}from"./chunk-4NXMMWL6.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);F(),N(s,{volume:u,repeat:d});const t="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(t)}catch{}try{e.info(t)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=O(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*_[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=O(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var V="pomodoro_tasks",W="pomodoro_tasks_migrated";function j(){return Math.random().toString(36).slice(2,11)}function E(){/* @__PURE__ */
2
+ return(new Date).toISOString()}var K=null,L=[],X=!1,q=null,J=/* @__PURE__ */new Set;function $(){for(const t of J)t()}function z(t){L=t,$()}function H(){const t=K;return t?q=t.list().then(e=>{K===t&&(L=e,X=!0,$())}).catch(()=>{K===t&&(X=!0,$())}).finally(()=>{q=null}):(L=[],X=!0,$(),Promise.resolve())}function Q(t){K=t,L=[],X=!1,t?H():$()}function U(t){return J.add(t),!K||X||q||H(),()=>{J.delete(t)}}function Y(){return L}function Z(){const e=function(){const{prefs:e,save:n}=t(),r=a(()=>{const t=e.todo_tasks;return Array.isArray(t)?t:[]},[e.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=j(),n=E(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:E()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(U,Y,Y),i=o(t=>{const n=K;if(!n)return e.addTask(t);const o="tmp-"+j(),a=E(),r={done:!1,...t,name:t.name.trim(),id:o,createdAt:a,updatedAt:a};return z([...L,r]),n.create({...t,name:t.name.trim()}).then(t=>z(L.map(e=>e.id===o?{...r,...t}:e))).catch(()=>z(L.filter(t=>t.id!==o))),o},[e]),c=o((t,n)=>{const o=K;if(!o)return e.updateTask(t,n);z(L.map(e=>e.id===t?{...e,...n,id:t,updatedAt:E()}:e)),o.update(t,n).catch(()=>{H()})},[e]),l=o(t=>{const n=K;if(!n)return e.removeTask(t);const o=L;z(L.filter(e=>e.id!==t)),n.remove(t).catch(()=>z(o))},[e]),s=o(t=>{if(!K)return e.toggleDone(t);const n=L.find(e=>e.id===t);n&&c(t,{done:!n.done})},[e,c]),u=o(t=>{K||e.setAllTasks(t)},[e]);return null===K?e:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(W))return;const n=localStorage.getItem(V);if(!n)return void localStorage.setItem(W,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(V),void localStorage.setItem(W,"1");const a=E(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||j(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(V),localStorage.setItem(W,"1")}catch{try{localStorage.setItem(W,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,Q as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};