efficient-shell 12.13.0 → 12.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/README.md +5 -1
  2. package/dist/{Browser-OFC3QRX3.js → Browser-V35ERC75.js} +14 -14
  3. package/dist/{Calculator-RP4UPGG7.js → Calculator-FY7CWH3U.js} +22 -22
  4. package/dist/{CurrencyConverter-HZWRB62S.js → CurrencyConverter-X2ZMKSB6.js} +9 -9
  5. package/dist/Files-5QCSSGZO.js +141 -0
  6. package/dist/{Notepad-77VJ4DK4.js → Notepad-2AXGNMRM.js} +10 -10
  7. package/dist/PdfViewer-F2TCC5UD.js +1 -0
  8. package/dist/PomodoroTimer-LQM4OSNO.js +91 -0
  9. package/dist/{Preview-DXEYBUYC.js → Preview-NI7HTAAW.js} +36 -36
  10. package/dist/Sidebar-ADAIERCI.js +44 -0
  11. package/dist/{Stock-WK45DFIC.js → Stock-ENUIGK4M.js} +3 -3
  12. package/dist/{Weather-BVKZQI4R.js → Weather-QRQVA3LE.js} +21 -21
  13. package/dist/{WorldClock-L3BQXXQX.js → WorldClock-QJOV3TND.js} +6 -6
  14. package/dist/ai/index.js +79 -79
  15. package/dist/apps/ImageAnnotator.js +1 -1
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/charts/BoxPlotChart.js +1 -1
  21. package/dist/charts/CandlestickChart.js +1 -1
  22. package/dist/charts/CartesianPlot.js +1 -1
  23. package/dist/charts/ChartBrush.js +1 -1
  24. package/dist/charts/ChartFrame.js +1 -1
  25. package/dist/charts/ChartSkeleton.js +1 -1
  26. package/dist/charts/ChordChart.js +1 -1
  27. package/dist/charts/ColumnChart.js +1 -1
  28. package/dist/charts/FunnelChart.js +1 -1
  29. package/dist/charts/HeatmapChart.js +1 -1
  30. package/dist/charts/HistogramChart.js +1 -1
  31. package/dist/charts/Meter.js +1 -1
  32. package/dist/charts/PieChart.js +1 -1
  33. package/dist/charts/RadarChart.js +1 -1
  34. package/dist/charts/RadialBarChart.js +1 -1
  35. package/dist/charts/RangeChart.js +1 -1
  36. package/dist/charts/RankedBars.js +1 -1
  37. package/dist/charts/SankeyChart.js +1 -1
  38. package/dist/charts/ScatterChart.js +1 -1
  39. package/dist/charts/SpecChart.js +1 -1
  40. package/dist/charts/StatTile.js +1 -1
  41. package/dist/charts/SunburstChart.js +1 -1
  42. package/dist/charts/TimeSeriesChart.js +1 -1
  43. package/dist/charts/TreemapChart.js +1 -1
  44. package/dist/charts/WaterfallChart.js +1 -1
  45. package/dist/{chunk-YX4MRM7A.js → chunk-232YPI2L.js} +6 -6
  46. package/dist/{chunk-W4NVTD5Q.js → chunk-24JKQX2N.js} +4 -4
  47. package/dist/{chunk-5EKNXSQG.js → chunk-24LO6OH4.js} +1 -1
  48. package/dist/{chunk-EDANELWX.js → chunk-2DYVVHZA.js} +1 -1
  49. package/dist/{chunk-RKYWKMUK.js → chunk-2NZ7CVMW.js} +1 -1
  50. package/dist/{chunk-GCVIUXKL.js → chunk-2ZPNA7L7.js} +1 -1
  51. package/dist/{chunk-45HQXTA6.js → chunk-3A6FYWFQ.js} +1 -1
  52. package/dist/{chunk-ITGFHWYG.js → chunk-3HZS3BAZ.js} +12 -12
  53. package/dist/{chunk-27ZJQUDS.js → chunk-3N5OI6VM.js} +1 -1
  54. package/dist/{chunk-JTZVUO3I.js → chunk-3YBXA72C.js} +1 -1
  55. package/dist/{chunk-4XS4DO4T.js → chunk-42XSMAIK.js} +1 -1
  56. package/dist/{chunk-2GS2VOQT.js → chunk-4BKJ6A5H.js} +9 -9
  57. package/dist/{chunk-Y23BITKG.js → chunk-4I4WZHMV.js} +1 -1
  58. package/dist/{chunk-JGJWPONL.js → chunk-4IHYWLWE.js} +5 -5
  59. package/dist/{chunk-KIRLSUQT.js → chunk-4LOHQ4QB.js} +5 -5
  60. package/dist/{chunk-YVAJ42M2.js → chunk-4Y33Y4OX.js} +6 -6
  61. package/dist/{chunk-654DGV5Q.js → chunk-56XKHWNL.js} +1 -1
  62. package/dist/chunk-574SLTKO.js +8 -0
  63. package/dist/{chunk-MFZPTS7W.js → chunk-5MH5N76F.js} +4 -4
  64. package/dist/{chunk-UYTFNR4W.js → chunk-5VGIIMON.js} +1 -1
  65. package/dist/{chunk-5ZQY42QX.js → chunk-5WZ53AS5.js} +1 -1
  66. package/dist/{chunk-YFDS6KF3.js → chunk-6A26HUVK.js} +1 -1
  67. package/dist/{chunk-LRKFMR4K.js → chunk-6KITIRNZ.js} +2 -2
  68. package/dist/{chunk-GB2XLSR5.js → chunk-74JMBOQH.js} +10 -10
  69. package/dist/{chunk-6YIVKPWQ.js → chunk-75H4BWNC.js} +1 -1
  70. package/dist/{chunk-AUCNJFTP.js → chunk-7K3FYCRZ.js} +9 -9
  71. package/dist/{chunk-4NLCXHWN.js → chunk-7X2P6IH3.js} +4 -4
  72. package/dist/{chunk-SEHKTBVM.js → chunk-7ZJRBFHA.js} +1 -1
  73. package/dist/chunk-A4PFVMQ2.js +7 -0
  74. package/dist/{chunk-BFCIOWYI.js → chunk-AELSVMXH.js} +1 -1
  75. package/dist/{chunk-JZKACEXW.js → chunk-AQZUTW7N.js} +8 -8
  76. package/dist/{chunk-ZV6WLVD3.js → chunk-B2KQ3T7Q.js} +6 -6
  77. package/dist/chunk-BHHFVIAD.js +2 -0
  78. package/dist/{chunk-EQ2KTDOU.js → chunk-BWYOTLJL.js} +3 -3
  79. package/dist/{chunk-GMJ5WOB2.js → chunk-CBVKGAZH.js} +1 -1
  80. package/dist/{chunk-BYDSBDVS.js → chunk-CEIIQRK5.js} +6 -6
  81. package/dist/{chunk-GMLDGXNQ.js → chunk-CJ3MI2NH.js} +1 -1
  82. package/dist/{chunk-FZWAOYAM.js → chunk-CMJD5URC.js} +9 -9
  83. package/dist/{chunk-EO6MOQOZ.js → chunk-DCNSQGHJ.js} +12 -12
  84. package/dist/chunk-DG2TGWXI.js +15 -0
  85. package/dist/{chunk-D4K72BHN.js → chunk-DGHSCKOE.js} +4 -4
  86. package/dist/{chunk-GBEDLYND.js → chunk-DJXXY23A.js} +2 -2
  87. package/dist/{chunk-EKDXJQIP.js → chunk-DJYZ2EF4.js} +10 -10
  88. package/dist/{chunk-Q64F2EXW.js → chunk-EDX55XGV.js} +6 -6
  89. package/dist/{chunk-QULE4LAC.js → chunk-EEAY7FJW.js} +17 -17
  90. package/dist/{chunk-WMIU2VR5.js → chunk-EEB5XPWP.js} +2 -2
  91. package/dist/{chunk-ZLFZJX6M.js → chunk-EGCHJHRR.js} +8 -8
  92. package/dist/chunk-ENFXDIIZ.js +8 -0
  93. package/dist/{chunk-U35TIWEP.js → chunk-EZ6O5TQ3.js} +16 -16
  94. package/dist/{chunk-CB5FQMFB.js → chunk-FI6IJTAJ.js} +12 -12
  95. package/dist/{chunk-JVNJCRHM.js → chunk-FJVZ2W55.js} +1 -1
  96. package/dist/{chunk-EAXPSAHZ.js → chunk-FQHPGREQ.js} +9 -9
  97. package/dist/{chunk-NBUL37WB.js → chunk-FUTLZ6BC.js} +1 -1
  98. package/dist/chunk-FVKXDF2Q.js +12 -0
  99. package/dist/{chunk-QGFAQVUO.js → chunk-G3E4CD77.js} +6 -6
  100. package/dist/{chunk-AG6Y62TP.js → chunk-G6LSBF3P.js} +69 -69
  101. package/dist/{chunk-SFFELHLP.js → chunk-GC4N4UQM.js} +5 -5
  102. package/dist/{chunk-4UQNNA4K.js → chunk-GEVNBBM7.js} +1 -1
  103. package/dist/{chunk-M2VCZAMQ.js → chunk-GOEHP2XM.js} +3 -3
  104. package/dist/{chunk-G3VRO4CK.js → chunk-GUHCKMC7.js} +2 -2
  105. package/dist/{chunk-B7HTKDT3.js → chunk-H32UNWVU.js} +5 -5
  106. package/dist/chunk-HGOWQO63.js +1 -0
  107. package/dist/{chunk-NHIP2S4E.js → chunk-HJF4UZOA.js} +13 -13
  108. package/dist/{chunk-5T4WTFBC.js → chunk-I3TVRNUT.js} +1 -1
  109. package/dist/{chunk-5NCR64CE.js → chunk-IIC76MWQ.js} +1 -1
  110. package/dist/{chunk-6BNLDGST.js → chunk-ILIPEY3D.js} +1 -1
  111. package/dist/{chunk-FSZ3TNAR.js → chunk-JAVTQART.js} +1 -1
  112. package/dist/{chunk-HEX3EP5F.js → chunk-JFGJJNT2.js} +4 -4
  113. package/dist/chunk-JSHMIMAJ.js +1 -0
  114. package/dist/{chunk-SWB32OKH.js → chunk-JTGRLXZN.js} +1 -1
  115. package/dist/{chunk-NV7QRWQJ.js → chunk-JZBLOIL7.js} +1 -1
  116. package/dist/{chunk-O3YCIWHF.js → chunk-KAKJ7ENS.js} +2 -2
  117. package/dist/{chunk-YPZXE67U.js → chunk-KSMEWOCE.js} +1 -1
  118. package/dist/{chunk-LTN4AQYG.js → chunk-KX53AB74.js} +1 -1
  119. package/dist/chunk-L7MWAC2P.js +6 -0
  120. package/dist/{chunk-WJBP5SND.js → chunk-LIWBCIRZ.js} +4 -4
  121. package/dist/{chunk-NORR52Z3.js → chunk-LIX6KTZJ.js} +1 -1
  122. package/dist/{chunk-P3GBQBDC.js → chunk-LQVQX5B2.js} +1 -1
  123. package/dist/{chunk-WQV7VQ5Z.js → chunk-MRLXGLNZ.js} +1 -1
  124. package/dist/{chunk-KWTK6TGH.js → chunk-MWTCGJAI.js} +1 -1
  125. package/dist/{chunk-6JLXXX4H.js → chunk-N2445WHJ.js} +12 -12
  126. package/dist/{chunk-5POLDDQW.js → chunk-NBNYKV3D.js} +7 -7
  127. package/dist/{chunk-I5UM6UZF.js → chunk-NKP5WCEA.js} +6 -6
  128. package/dist/{chunk-MEAJGM6F.js → chunk-NOGSS432.js} +1 -1
  129. package/dist/{chunk-V6FHZGCL.js → chunk-OM6VWUAZ.js} +1 -1
  130. package/dist/{chunk-EIXMUGVZ.js → chunk-OOWPLQD5.js} +2 -2
  131. package/dist/{chunk-NOEAEXIZ.js → chunk-OVD3ECM7.js} +1 -1
  132. package/dist/chunk-PCZSE6CC.js +5 -0
  133. package/dist/{chunk-UG5GKEU5.js → chunk-QADNVFV5.js} +1 -1
  134. package/dist/{chunk-BET6KEY2.js → chunk-QPYVCG74.js} +12 -12
  135. package/dist/chunk-QU23OGAX.js +27 -0
  136. package/dist/{chunk-VCNTSE3H.js → chunk-R7QEGRKE.js} +1 -1
  137. package/dist/{chunk-ZR2UWJIR.js → chunk-RBS3AWE7.js} +1 -1
  138. package/dist/{chunk-WM2BBRT6.js → chunk-RF3ZFTAU.js} +1 -1
  139. package/dist/{chunk-HYQBYMJX.js → chunk-RMDVKQJE.js} +2 -2
  140. package/dist/{chunk-42BVXJZN.js → chunk-RZ2DWX4N.js} +5 -5
  141. package/dist/{chunk-PDCCNHTP.js → chunk-SDL4VWFU.js} +1 -1
  142. package/dist/{chunk-VPZOSVDF.js → chunk-SE6IQZYW.js} +9 -9
  143. package/dist/chunk-SNLGA2PZ.js +1 -0
  144. package/dist/{chunk-ISU4FCEX.js → chunk-SR4W2SYQ.js} +4 -4
  145. package/dist/{chunk-TJCJLKJB.js → chunk-T3JSUBIF.js} +1 -1
  146. package/dist/{chunk-SY65V6K7.js → chunk-T7D73HT7.js} +9 -9
  147. package/dist/chunk-TU2L7NW3.js +7 -0
  148. package/dist/{chunk-VLCHHTX6.js → chunk-TYQ2JL4J.js} +1 -1
  149. package/dist/{chunk-QQ5XCRZM.js → chunk-UEEELXEN.js} +8 -8
  150. package/dist/{chunk-LMUB2EAD.js → chunk-UULBPDAH.js} +8 -8
  151. package/dist/chunk-UWLGKMH5.js +9 -0
  152. package/dist/{chunk-Z7RXWXR5.js → chunk-V4XR4MOS.js} +1 -1
  153. package/dist/{chunk-4MUE4CYB.js → chunk-VBLCYL4L.js} +1 -1
  154. package/dist/chunk-VDYF3WPJ.js +2 -0
  155. package/dist/{chunk-MAI2DN7N.js → chunk-VEQ45GAH.js} +1 -1
  156. package/dist/{chunk-HE24VQMU.js → chunk-VFHKD7TQ.js} +1 -1
  157. package/dist/{chunk-TCMAWDBL.js → chunk-VJXPT53M.js} +18 -18
  158. package/dist/{chunk-P44RCA6Z.js → chunk-VP2GI3UP.js} +8 -8
  159. package/dist/{chunk-44VAZ2EL.js → chunk-VYRVSTI6.js} +9 -9
  160. package/dist/{chunk-QQM36CYU.js → chunk-W2663E4S.js} +3 -3
  161. package/dist/{chunk-QMNDKNK2.js → chunk-WESNFWM4.js} +1 -1
  162. package/dist/{chunk-NGQZI7HP.js → chunk-WLUJQLXG.js} +1 -1
  163. package/dist/chunk-WNOXHJVT.js +9 -0
  164. package/dist/{chunk-EVEGK57J.js → chunk-WPG3ZHYT.js} +1 -1
  165. package/dist/{chunk-QCOXJXGZ.js → chunk-WQ4YKWN2.js} +1 -1
  166. package/dist/{chunk-YVIV7SKG.js → chunk-WXZZGHET.js} +1 -1
  167. package/dist/{chunk-BGBSEPPH.js → chunk-WYGUHCJ2.js} +8 -8
  168. package/dist/{chunk-BM5QI2L6.js → chunk-XG5ER6GJ.js} +6 -6
  169. package/dist/{chunk-ASOVTAIT.js → chunk-XHSMDUEW.js} +3 -3
  170. package/dist/{chunk-YMJOFWW6.js → chunk-XKJGJNY2.js} +3 -3
  171. package/dist/{chunk-6P7SIIG4.js → chunk-XKNKRKHH.js} +14 -14
  172. package/dist/chunk-XQWHKXLS.js +22 -0
  173. package/dist/{chunk-GOKJZKLV.js → chunk-XU3YOWEG.js} +1 -1
  174. package/dist/{chunk-SXHNZFUY.js → chunk-Y6E7IRK2.js} +1 -1
  175. package/dist/{chunk-5HOXR3L4.js → chunk-Y7KDCC6E.js} +1 -1
  176. package/dist/chunk-YHB6MJYD.js +28 -0
  177. package/dist/{chunk-AKTEMZOT.js → chunk-YO26RV3H.js} +1 -1
  178. package/dist/{chunk-SEMV4NCH.js → chunk-YU52WMSH.js} +1 -1
  179. package/dist/chunk-YX2OOGV7.js +4 -0
  180. package/dist/{chunk-RQKD5AAL.js → chunk-Z66QBDNU.js} +1 -1
  181. package/dist/{chunk-IARCNQD3.js → chunk-ZGWXSHVM.js} +1 -1
  182. package/dist/{chunk-AXFNOY2L.js → chunk-ZTRKM3B5.js} +7 -7
  183. package/dist/data/DataTable.js +1 -1
  184. package/dist/data/EntityList.js +1 -1
  185. package/dist/data/Kanban.js +1 -1
  186. package/dist/data/ListFooter.js +1 -1
  187. package/dist/data/ListLoadError.js +1 -1
  188. package/dist/data/Pagination.js +1 -1
  189. package/dist/data/ResizableTable.js +1 -1
  190. package/dist/file-intake/index.js +1 -1
  191. package/dist/forms/BorderInput.js +1 -1
  192. package/dist/forms/BrandAssetEditor.js +1 -1
  193. package/dist/forms/Calendar.js +1 -1
  194. package/dist/forms/ColorPicker.js +1 -1
  195. package/dist/forms/ComposerAttachments.js +1 -1
  196. package/dist/forms/CornersInput.js +1 -1
  197. package/dist/forms/DatePicker.js +1 -1
  198. package/dist/forms/DateRangePicker.js +1 -1
  199. package/dist/forms/DateTimePicker.js +1 -1
  200. package/dist/forms/DisplayChips.js +1 -1
  201. package/dist/forms/FilePicker.js +1 -1
  202. package/dist/forms/FormErrorSummary.js +1 -1
  203. package/dist/forms/IconPicker.js +1 -1
  204. package/dist/forms/ImageFocusPoint.js +1 -1
  205. package/dist/forms/InputNumber.js +1 -1
  206. package/dist/forms/LinkPicker.js +1 -1
  207. package/dist/forms/MediaLibrary.js +1 -1
  208. package/dist/forms/MediaUploadField.js +1 -1
  209. package/dist/forms/MediaUploadGrid.js +1 -1
  210. package/dist/forms/MediaUsedInList.js +1 -1
  211. package/dist/forms/NumericKeypad.js +1 -1
  212. package/dist/forms/PositionInput.js +1 -1
  213. package/dist/forms/Select.js +1 -1
  214. package/dist/forms/SidesInput.js +1 -1
  215. package/dist/forms/Slider.js +1 -1
  216. package/dist/forms/Snippet.js +1 -1
  217. package/dist/forms/TagInput.js +1 -1
  218. package/dist/forms/TextToolbar.js +1 -1
  219. package/dist/forms/TimePicker.js +1 -1
  220. package/dist/forms/WidthsBar.js +1 -1
  221. package/dist/forms/mediaLibraryMenu.js +1 -1
  222. package/dist/forms/mediaMoveItems.js +1 -1
  223. package/dist/forms/textAlign.js +1 -1
  224. package/dist/forms/useFileIntake.js +1 -1
  225. package/dist/index.js +665 -665
  226. package/dist/locales/zh-Hans.js +1 -1
  227. package/dist/map/index.js +2 -2
  228. package/dist/page-tabs/index.js +5 -5
  229. package/dist/pdf/index.js +1 -1
  230. package/dist/shell/Accordion.js +1 -1
  231. package/dist/shell/AppUpdateBanner.js +1 -1
  232. package/dist/shell/Avatar.js +1 -1
  233. package/dist/shell/Banner.js +1 -1
  234. package/dist/shell/Breadcrumbs.js +1 -1
  235. package/dist/shell/BudgetBar.js +1 -1
  236. package/dist/shell/Card.js +1 -1
  237. package/dist/shell/ColoredBadge.js +1 -1
  238. package/dist/shell/ConfirmDialog.js +1 -1
  239. package/dist/shell/ContainerFillChart.js +1 -1
  240. package/dist/shell/CountBadge.js +1 -1
  241. package/dist/shell/Dialog.js +1 -1
  242. package/dist/shell/Drawer.js +1 -1
  243. package/dist/shell/EditableGrid.js +1 -1
  244. package/dist/shell/EmptyState.js +1 -1
  245. package/dist/shell/GlobalSearch.js +1 -1
  246. package/dist/shell/HelpCenter.js +1 -1
  247. package/dist/shell/IconRail.js +1 -1
  248. package/dist/shell/ImageLightbox.js +1 -1
  249. package/dist/shell/ItemCount.js +1 -1
  250. package/dist/shell/LanguageSelect.js +1 -1
  251. package/dist/shell/Markdown.js +1 -1
  252. package/dist/shell/MetricBar.js +1 -1
  253. package/dist/shell/MetricBarLegend.js +1 -1
  254. package/dist/shell/MilestoneTimeline.js +1 -1
  255. package/dist/shell/PageHeader.js +1 -1
  256. package/dist/shell/ProductionTimeline.js +1 -1
  257. package/dist/shell/ResizeHandle.js +1 -1
  258. package/dist/shell/Result.js +1 -1
  259. package/dist/shell/SearchableSelect.js +1 -1
  260. package/dist/shell/SettingReset.js +1 -1
  261. package/dist/shell/SettingRow.js +1 -1
  262. package/dist/shell/SidebarLayout.js +1 -1
  263. package/dist/shell/SidebarNav.js +1 -1
  264. package/dist/shell/SortableList.js +1 -1
  265. package/dist/shell/Statistic.js +1 -1
  266. package/dist/shell/TimeAgo.js +1 -1
  267. package/dist/shell/TimelineTrack.js +1 -1
  268. package/dist/shell/TransferProgress.js +1 -1
  269. package/dist/shell/Tree.js +1 -1
  270. package/dist/shell/discardGuard.js +1 -1
  271. package/dist/shell/globalSearchModel.js +1 -1
  272. package/dist/shell/language.js +1 -1
  273. package/dist/shell/strings.d.ts +2 -0
  274. package/dist/shell/strings.js +1 -1
  275. package/dist/shell/toast.js +1 -1
  276. package/dist/telemetry/index.js +1 -1
  277. package/dist/templates/AuthScreen.js +1 -1
  278. package/dist/templates/ChatTemplate.js +1 -1
  279. package/dist/templates/CheckoutTemplate.js +1 -1
  280. package/dist/templates/DashboardTemplate.js +1 -1
  281. package/dist/templates/DataTablePage.js +1 -1
  282. package/dist/templates/EmailTemplate.js +1 -1
  283. package/dist/templates/ErrorBoundary.js +1 -1
  284. package/dist/templates/ErrorPage.js +1 -1
  285. package/dist/templates/FormLayoutPage.js +1 -1
  286. package/dist/templates/GalleryTemplate.js +1 -1
  287. package/dist/ui/index.js +1 -1
  288. package/dist/version.js +1 -1
  289. package/package.json +1 -1
  290. package/dist/Files-HBJGKKO2.js +0 -141
  291. package/dist/PdfViewer-BFP2WCMQ.js +0 -1
  292. package/dist/PomodoroTimer-ME3BMHKR.js +0 -91
  293. package/dist/Sidebar-FU7TD5FQ.js +0 -44
  294. package/dist/chunk-4WWK6FHD.js +0 -1
  295. package/dist/chunk-675RYIWR.js +0 -7
  296. package/dist/chunk-6VB4TBU6.js +0 -9
  297. package/dist/chunk-7ADTFFEM.js +0 -5
  298. package/dist/chunk-CA3OC4YY.js +0 -9
  299. package/dist/chunk-EAIHBASJ.js +0 -28
  300. package/dist/chunk-FQHY6DTF.js +0 -4
  301. package/dist/chunk-GFOJM52T.js +0 -15
  302. package/dist/chunk-HL3V67JZ.js +0 -2
  303. package/dist/chunk-HLZJLFVR.js +0 -12
  304. package/dist/chunk-HULQSIX5.js +0 -8
  305. package/dist/chunk-ISZOD5S6.js +0 -2
  306. package/dist/chunk-J7CHHY7O.js +0 -6
  307. package/dist/chunk-JB3JD2XK.js +0 -22
  308. package/dist/chunk-KOPTKTHN.js +0 -7
  309. package/dist/chunk-MXITMJCT.js +0 -27
  310. package/dist/chunk-TJSJVC6P.js +0 -1
  311. package/dist/chunk-WGRS6QBT.js +0 -1
  312. package/dist/chunk-YRG6XJ6M.js +0 -8
@@ -1,11 +1,11 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-NOEAEXIZ.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-Z7RXWXR5.js";import{useShellStrings as l}from"./chunk-TJSJVC6P.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},C){const $=m(),z=l().files,O=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),R=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
2
- return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
3
- /* @__PURE__ */o("button",{ref:C,type:"button",id:$,disabled:y,onClick:O.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":R,...O.zoneProps,className:t(O.dragOver,y,a(y),"px-4 py-6"),children:[
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-OVD3ECM7.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-V4XR4MOS.js";import{useShellStrings as l}from"./chunk-JSHMIMAJ.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},M){const C=m(),O=l().files,$=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),z=j?`${C}-error`:N?`${C}-hint`:void 0;/* @__PURE__ */
2
+ return o(e,{label:g,htmlFor:C,hint:N,error:j,required:k,className:v,children:[
3
+ /* @__PURE__ */o("button",{ref:M,type:"button",id:C,disabled:y,onClick:$.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":z,...$.zoneProps,className:t($.dragOver,y,a(y),"px-4 py-6"),children:[
4
4
  /* @__PURE__ */o("span",{children:[
5
- /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
6
- /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
- /* @__PURE__ */d("input",{...O.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
5
+ /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?O.chooseMany:O.chooseOne}),
6
+ /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?O.dragMany:O.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
+ /* @__PURE__ */d("input",{...$.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
8
8
  /* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
9
- /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
10
- /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{O.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
- /* @__PURE__ */d(s,{rejections:O.rejections})]})});export{p as FilePicker_default};
9
+ /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,O)}),
10
+ /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{$.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":O.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
+ /* @__PURE__ */d(s,{rejections:$.rejections})]})});export{p as FilePicker_default};
@@ -1,7 +1,7 @@
1
- import{useShellStrings as e,useShellLocale as a}from"./chunk-TJSJVC6P.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{useState as i,useId as d}from"react";import{jsx as r,jsxs as c,Fragment as s}from"react/jsx-runtime";var o={band:"es-group-head",row:"es-group-sub"},l=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("");function t({items:t,defaultOpenIds:u=[],openIds:p,onOpenChange:m,allowMultiple:h=!1,level:N=3,tier:g="band",keepMounted:b=!1,className:$=""}){const v=e(),f=a(),[x,y]=i(u),I=d(),j=`h${N}`,k=p??x;/* @__PURE__ */
2
- return r("div",{"data-accordion":g,className:$||void 0,children:t.map(e=>{const a=k.includes(e.id),i=e.headId??`${I}-${l(e.id)}-head`,d=e.headId?`${e.headId}-body`:`${I}-${l(e.id)}-panel`,t=a||b;/* @__PURE__ */
1
+ import{useShellStrings as e,useShellLocale as a}from"./chunk-JSHMIMAJ.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{useState as i,useId as d}from"react";import{jsx as r,jsxs as c,Fragment as s}from"react/jsx-runtime";var o={band:"es-group-head",row:"es-group-sub"},l=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("");function t({items:t,defaultOpenIds:u=[],openIds:p,onOpenChange:m,allowMultiple:h=!1,level:N=3,tier:g="band",keepMounted:b=!1,className:$=""}){const v=e(),f=a(),[x,y]=i(u),I=d(),M=`h${N}`,j=p??x;/* @__PURE__ */
2
+ return r("div",{"data-accordion":g,className:$||void 0,children:t.map(e=>{const a=j.includes(e.id),i=e.headId??`${I}-${l(e.id)}-head`,d=e.headId?`${e.headId}-body`:`${I}-${l(e.id)}-panel`,t=a||b;/* @__PURE__ */
3
3
  return c("div",{className:e.className?`es-group ${e.className}`:"es-group",children:[
4
- /* @__PURE__ */r(j,{className:"es-group-title",children:/* @__PURE__ */c("button",{type:"button",id:i,disabled:e.disabled,"aria-expanded":a,"aria-controls":t?d:void 0,onClick:()=>(e=>{const a=k.includes(e)?k.filter(a=>a!==e):h?[...k,e]:[e];void 0===p&&y(a),m?.(a)})(e.id),className:o[g],children:[null!=e.icon&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-icon",children:e.icon}),e.title,"number"==typeof e.count&&e.count>0&&
4
+ /* @__PURE__ */r(M,{className:"es-group-title",children:/* @__PURE__ */c("button",{type:"button",id:i,disabled:e.disabled,"aria-expanded":a,"aria-controls":t?d:void 0,onClick:()=>(e=>{const a=j.includes(e)?j.filter(a=>a!==e):h?[...j,e]:[e];void 0===p&&y(a),m?.(a)})(e.id),className:o[g],children:[null!=e.icon&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-icon",children:e.icon}),e.title,"number"==typeof e.count&&e.count>0&&
5
5
  /* @__PURE__ */c(s,{children:[
6
6
  /* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-count",children:n(e.count,f)}),
7
7
  /* @__PURE__ */r("span",{className:"sr-only",children:v.accordion.changed(n(e.count,f))})]}),
@@ -1,4 +1,4 @@
1
- import{useShellLocale as e}from"./chunk-TJSJVC6P.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:u=""}){const h=s[i],f=Math.max(8,Math.round(.28*h)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
1
+ import{useShellLocale as e}from"./chunk-JSHMIMAJ.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:u=""}){const h=s[i],f=Math.max(8,Math.round(.28*h)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
2
2
  /* @__PURE__ */
3
3
  return l("span",{className:`relative inline-flex shrink-0 ${u}`.trim(),style:{width:h,height:h},...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:[y?/* @__PURE__ */a("img",{src:e,alt:"",onError:()=>g(!0),className:"h-full w-full rounded-full object-cover"}):/* @__PURE__ */a("span",{className:"flex h-full w-full items-center justify-center rounded-full bg-gray-100 font-medium text-gray-600",style:{fontSize:Math.round(.4*h)},children:m(t)}),c&&/* @__PURE__ */a("span",{className:`absolute bottom-0 right-0 rounded-full ring-2 ring-white ${o[c]}`,style:{width:f,height:f}})]})}function u({children:r,max:n,size:o="md",className:m=""}){const c=i.toArray(r),u=n?c.slice(0,n):c,h=n?c.length-u.length:0,f=s[o],d=Math.round(.3*f),g=e();/* @__PURE__ */
4
4
  return l("div",{className:`flex items-center ${m}`.trim(),children:[u.map((e,t)=>/* @__PURE__ */a("span",{className:"rounded-full ring-2 ring-white",style:{marginLeft:0===t?0:-d},children:e},t)),h>0&&/* @__PURE__ */l("span",{className:"flex items-center justify-center rounded-full bg-gray-200 font-medium text-gray-600 ring-2 ring-white",style:{width:f,height:f,marginLeft:-d,fontSize:Math.round(.36*f)},children:["+",t(h,g)]})]})}export{c as Avatar,u as AvatarGroup};
@@ -1,3 +1,3 @@
1
- import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as t}from"./chunk-TJSJVC6P.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
2
2
  return n(e,t?{name:"check",className:`${r} text-green-600`,"aria-hidden":"true"}:{name:"copy",className:r,"aria-hidden":"true"})}function m({text:e}){const{copied:r,copy:o}=a(e),c=t().copy;/* @__PURE__ */
3
3
  return n("button",{onClick:o,title:r?c.copiedValue:c.copyValue(e),className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */n(u,{copied:r})})}export{m as CopyButton,u as CopyGlyph,a as useCopyText};
@@ -0,0 +1,9 @@
1
+ import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-JSHMIMAJ.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function f({nodes:f,links:k,height:p=320,width:x,nodeWidth:g=14,nodePadding:y=12,formatValue:v,className:M,emptyLabel:w}){const b=i().charts,j=s(),$=v??(e=>h(e,j)),N=w??b.noFlows,C=c(null),F=o(C),A=x??F,[E,H]=m(null),{highlighted:z}=n();if(0===f.length||0===k.length)/* @__PURE__ */
2
+ return d("div",{className:M,ref:C,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:N})});const O=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),Q=e=>O.length<=1?0:O.indexOf(e)/(O.length-1)*(A-g-140)+70,S=new Map(f.map(e=>{const t=k.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=k.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(t,n,e.value??0)]})),U=/* @__PURE__ */new Map;for(const e of f)U.set(e.depth,[...U.get(e.depth)??[],e]);const V=Math.max(...[...U.values()].map(e=>e.reduce((e,t)=>e+(S.get(t.key)??0),0))),W=p-20,Y=V>0?(W-y*(Math.max(...[...U.values()].map(e=>e.length))-1))/V:0,B=/* @__PURE__ */new Map;for(const[e,t]of U){const n=t.map(e=>Math.max(2,(S.get(e.key)??0)*Y)),o=n.reduce((e,t)=>e+t,0)+y*(t.length-1),l=n.reduce((e,t)=>e+Math.max(0,t-2),0),r=o>W&&l>0?Math.max(0,1-(o-W)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;B.set(t.key,{x:Q(e),y:a,h:l,index:o}),a+=l+y})}const I=/* @__PURE__ */new Map,J=/* @__PURE__ */new Map,L=/* @__PURE__ */new Map,P=(e,t)=>e.from===t||e.to===t,R="link"===E?.kind?k[E.index]:void 0,T="node"===E?.kind?f.find(e=>e.key===E.key):void 0;/* @__PURE__ */
3
+ return u("div",{className:`relative ${M??""}`,ref:C,children:[
4
+ /* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${A} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>H(null),children:[k.map((e,n)=>{const o=B.get(e.from),l=B.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*Y),i=o.y+(I.get(e.from)??0)+a/2,s=l.y+(J.get(e.to)??0)+a/2;I.set(e.from,(I.get(e.from)??0)+a),J.set(e.to,(J.get(e.to)??0)+a);const h=o.x+g,c=l.x,m=r(o.index,e.color),u=`${e.from}→${e.to}`,f=L.get(u)??0;L.set(u,f+1);const k=((e,t)=>E?"link"===E.kind?E.index===t:P(e,E.key):null!==z?P(e,z):null)(e,n);/* @__PURE__ */
5
+ return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>H({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=B.get(e.key);if(!t)return null;const n=t.x>A/2,o=(l=e.key,E?"node"===E.kind?E.key===l:P(k[E.index],l):null!==z?z===l:null);var l;/* @__PURE__ */
6
+ return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>H({kind:"node",key:e.key}),children:[
7
+ /* @__PURE__ */d("rect",{x:t.x,y:t.y,width:g,height:t.h,rx:2,fill:r(t.index,e.color,e.tone)}),
8
+ /* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:a.label,children:e.label})]},e.key)})]}),R&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:`${R.from} → ${R.to}`,rows:[{key:"value",label:b.flow,color:r(B.get(R.from)?.index??0,R.color),value:$(R.value)}]})}),T&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:T.label,rows:[{key:"value",label:b.throughput,color:r(B.get(T.key)?.index??0,T.color,T.tone),value:$(S.get(T.key)??0)}]})}),
9
+ /* @__PURE__ */d(e,{caption:b.sankey(f.length,k.length),head:[b.tableFrom,b.tableTo,b.value],rows:k.map(e=>[e.from,e.to,$(e.value)])})]})}export{f as SankeyChart};
@@ -1,4 +1,4 @@
1
- import{useShellStrings as t,useShellLocale as e}from"./chunk-TJSJVC6P.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var o="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40";function l({page:l,pageCount:i,onPageChange:s,siblingCount:c=1,showEdges:b=!1,className:u=""}){const d=t().pagination,g=e();if(i<=1)return null;const m=function(t,e,a){const n=/* @__PURE__ */new Set([1,e]);for(let r=t-a;r<=t+a;r++)r>=1&&r<=e&&n.add(r);const r=[...n].sort((t,e)=>t-e),o=[];let l=0;for(const t of r)l&&t-l>1&&o.push("…"),o.push(t),l=t;return o}(l,i,c),p=t=>{t>=1&&t<=i&&t!==l&&s(t)};/* @__PURE__ */
1
+ import{useShellStrings as t,useShellLocale as e}from"./chunk-JSHMIMAJ.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var o="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40";function l({page:l,pageCount:i,onPageChange:s,siblingCount:c=1,showEdges:b=!1,className:u=""}){const d=t().pagination,g=e();if(i<=1)return null;const m=function(t,e,a){const n=/* @__PURE__ */new Set([1,e]);for(let r=t-a;r<=t+a;r++)r>=1&&r<=e&&n.add(r);const r=[...n].sort((t,e)=>t-e),o=[];let l=0;for(const t of r)l&&t-l>1&&o.push("…"),o.push(t),l=t;return o}(l,i,c),p=t=>{t>=1&&t<=i&&t!==l&&s(t)};/* @__PURE__ */
2
2
  return n("nav",{"aria-label":d.label,className:`flex items-center gap-1 ${u}`.trim(),children:[b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.first,disabled:1===l,onClick:()=>p(1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"«"}),
3
3
  /* @__PURE__ */r("button",{type:"button","aria-label":d.previous,disabled:1===l,onClick:()=>p(l-1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"‹"}),m.map((t,e)=>"…"===t?/* @__PURE__ */r("span",{className:"px-1 text-gray-400",children:"…"},`gap-${e}`):/* @__PURE__ */r("button",{type:"button","aria-current":t===l?"page":void 0,onClick:()=>p(t),className:`${o} ${t===l?"bg-blue-600 font-medium text-white":"text-gray-700 hover:bg-gray-100"}`,children:a(t,g)},t)),
4
4
  /* @__PURE__ */r("button",{type:"button","aria-label":d.next,disabled:l===i,onClick:()=>p(l+1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"›"}),b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.last,disabled:l===i,onClick:()=>p(i),className:`${o} text-gray-600 hover:bg-gray-100`,children:"»"})]})}export{l as Pagination};
@@ -1,3 +1,3 @@
1
- import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-JOAKKXTL.js";import{OneLineLabel as r}from"./chunk-G67CJAQ2.js";import{useShellStrings as s}from"./chunk-TJSJVC6P.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
1
+ import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-JOAKKXTL.js";import{OneLineLabel as r}from"./chunk-G67CJAQ2.js";import{useShellStrings as s}from"./chunk-JSHMIMAJ.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
2
2
  return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
3
3
  /* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
@@ -1,4 +1,4 @@
1
- import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-TJSJVC6P.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-JSHMIMAJ.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,9 +1,9 @@
1
- import{Calendar as e}from"./chunk-BET6KEY2.js";import{fromDateKey as t,toDateKey as r}from"./chunk-2HMNOLKX.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-AYZY3YNC.js";import{calendarNames as i}from"./chunk-Y3JW2GW5.js";import{Icon as o}from"./chunk-JOAKKXTL.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as u}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as b}from"./chunk-TJSJVC6P.js";import{forwardRef as f,useState as p,useRef as h,useId as v,useEffect as g}from"react";import{createPortal as y}from"react-dom";import{jsx as x,jsxs as N}from"react/jsx-runtime";var k=/^\d{4}-\d{2}-\d{2}$/,j=/^(aria|data)-/,w=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function D(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":r(e);if(k.test(e))return e;const t=new Date(e);return Number.isNaN(t.getTime())?"":r(t)}function B(e,r){const a=t(e);return a?r.longDate(a.getFullYear(),a.getMonth(),a.getDate()):""}var C=f(function({value:f,onChange:k,min:C,max:E,invalid:F,size:J,native:T,weekStartsOn:W,className:L="","aria-label":O,"aria-describedby":S,"aria-labelledby":Y,id:$,name:q,disabled:z,placeholder:I,required:K,clearable:U,form:G,title:M,tabIndex:P,autoFocus:A,onFocus:H,onBlur:V,...X},Q){const R=U??!K,Z=D(f),_=D(C),ee=D(E),te=m().datePicker,re=b(),ae=i(re),[ne,ie]=p(!1),oe=h(null),le=h(null),se=h(null),de=v(),ue=v(),ce=v(),me=d(le,ne,{popupRef:se}),[be,fe]=p(!1);u(()=>{const e=!!$&&(le.current?.labels?.length??0)>0;e!==be&&fe(e)});const pe=!O&&(!!Y||be);if(g(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),g(()=>{if(ne)return c(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),T)/* @__PURE__ */
2
- return x("input",{ref:Q,type:"date",lang:re,id:$,name:q,disabled:z,"aria-label":O,"aria-describedby":S,"aria-invalid":F||void 0,value:Z,min:_||void 0,max:ee||void 0,onChange:e=>k?.(t(e.target.value)),className:a({invalid:F,size:J,className:L}),"aria-labelledby":Y,required:K,form:G,title:M,tabIndex:P,autoFocus:A,onFocus:H,onBlur:V,...X});const he=Object.fromEntries(Object.entries(X).filter(([e])=>j.test(e)&&!w.has(e))),ve=X["aria-required"],ge=!!K||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,S].filter(Boolean).join(" ")||void 0,xe=r(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=I??te.placeholder;/* @__PURE__ */
1
+ import{Calendar as e}from"./chunk-QPYVCG74.js";import{fromDateKey as t,toDateKey as r}from"./chunk-2HMNOLKX.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-AYZY3YNC.js";import{calendarNames as i}from"./chunk-Y3JW2GW5.js";import{Icon as o}from"./chunk-JOAKKXTL.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as u}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as b}from"./chunk-JSHMIMAJ.js";import{forwardRef as f,useState as p,useRef as h,useId as v,useEffect as g}from"react";import{createPortal as y}from"react-dom";import{jsx as x,jsxs as N}from"react/jsx-runtime";var k=/^\d{4}-\d{2}-\d{2}$/,j=/^(aria|data)-/,w=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function D(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":r(e);if(k.test(e))return e;const t=new Date(e);return Number.isNaN(t.getTime())?"":r(t)}function C(e,r){const a=t(e);return a?r.longDate(a.getFullYear(),a.getMonth(),a.getDate()):""}var F=f(function({value:f,onChange:k,min:F,max:J,invalid:W,size:B,native:L,weekStartsOn:O,className:S="","aria-label":Y,"aria-describedby":$,"aria-labelledby":q,id:E,name:I,disabled:M,placeholder:T,required:z,clearable:G,form:U,title:A,tabIndex:H,autoFocus:K,onFocus:P,onBlur:Q,...V},X){const R=G??!z,Z=D(f),_=D(F),ee=D(J),te=m().datePicker,re=b(),ae=i(re),[ne,ie]=p(!1),oe=h(null),le=h(null),se=h(null),de=v(),ue=v(),ce=v(),me=d(le,ne,{popupRef:se}),[be,fe]=p(!1);u(()=>{const e=!!E&&(le.current?.labels?.length??0)>0;e!==be&&fe(e)});const pe=!Y&&(!!q||be);if(g(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),g(()=>{if(ne)return c(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),L)/* @__PURE__ */
2
+ return x("input",{ref:X,type:"date",lang:re,id:E,name:I,disabled:M,"aria-label":Y,"aria-describedby":$,"aria-invalid":W||void 0,value:Z,min:_||void 0,max:ee||void 0,onChange:e=>k?.(t(e.target.value)),className:a({invalid:W,size:B,className:S}),"aria-labelledby":q,required:z,form:U,title:A,tabIndex:H,autoFocus:K,onFocus:P,onBlur:Q,...V});const he=Object.fromEntries(Object.entries(V).filter(([e])=>j.test(e)&&!w.has(e))),ve=V["aria-required"],ge=!!z||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,$].filter(Boolean).join(" ")||void 0,xe=r(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=T??te.placeholder;/* @__PURE__ */
3
3
  return N("div",{ref:oe,className:"relative",children:[
4
- /* @__PURE__ */x("input",{ref:Q,type:"hidden",name:q,form:G,value:Z}),
5
- /* @__PURE__ */N("button",{ref:le,type:"button",...he,id:$,disabled:z,title:M,tabIndex:P,autoFocus:A,onFocus:H,onBlur:V,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":Y,"aria-describedby":ye,"aria-label":O?`${O}${Z?`, ${B(Z,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:F,size:J,className:L})} flex items-center justify-between text-left`,children:[
6
- /* @__PURE__ */x("span",{className:Z?"text-ink-strongest":n,children:Z?B(Z,ae):ke}),
7
- /* @__PURE__ */x(o,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */x("span",{id:ue,className:"sr-only",children:Z?B(Z,ae):ke}),ge&&/* @__PURE__ */x("span",{id:ce,className:"sr-only",children:te.required}),ne&&y(
8
- /* @__PURE__ */N("div",{ref:se,id:de,role:"dialog","aria-label":O??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:s.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
9
- /* @__PURE__ */x(e,{value:Z||null,min:_||null,max:ee||null,weekStartsOn:W,onSelect:e=>{ie(!1),le.current?.focus(),k?.(t(e))}}),(R||Ne)&&/* @__PURE__ */N("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[R&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{C as DatePicker_default};
4
+ /* @__PURE__ */x("input",{ref:X,type:"hidden",name:I,form:U,value:Z}),
5
+ /* @__PURE__ */N("button",{ref:le,type:"button",...he,id:E,disabled:M,title:A,tabIndex:H,autoFocus:K,onFocus:P,onBlur:Q,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":q,"aria-describedby":ye,"aria-label":Y?`${Y}${Z?`, ${C(Z,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:W,size:B,className:S})} flex items-center justify-between text-left`,children:[
6
+ /* @__PURE__ */x("span",{className:Z?"text-ink-strongest":n,children:Z?C(Z,ae):ke}),
7
+ /* @__PURE__ */x(o,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */x("span",{id:ue,className:"sr-only",children:Z?C(Z,ae):ke}),ge&&/* @__PURE__ */x("span",{id:ce,className:"sr-only",children:te.required}),ne&&y(
8
+ /* @__PURE__ */N("div",{ref:se,id:de,role:"dialog","aria-label":Y??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:s.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
9
+ /* @__PURE__ */x(e,{value:Z||null,min:_||null,max:ee||null,weekStartsOn:O,onSelect:e=>{ie(!1),le.current?.focus(),k?.(t(e))}}),(R||Ne)&&/* @__PURE__ */N("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[R&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{F as DatePicker_default};
@@ -1,9 +1,9 @@
1
- import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-EIXMUGVZ.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-JOAKKXTL.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-TJSJVC6P.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:j="bg-white"}){const z="right"===m,O=i().sidebar,P=a(),T=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[W,D]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),E=null!=l||null!=n,I=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:W},children:[
2
- /* @__PURE__ */f("div",{className:`flex h-full flex-col ${E?"overflow-hidden":"overflow-y-auto"} ${C}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),E?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
- /* @__PURE__ */p(t,{side:m,width:W,onResize:D,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:O.resize})]}),K=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${j}`,children:u});/* @__PURE__ */
4
- return f("div",P?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:T,top:l,fallback:O.sections}),K,
6
- /* @__PURE__ */p(v,{phone:T,bottom:n,label:O.sections,closeLabel:O.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[z?null:I,K,z?I:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
1
+ import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-OOWPLQD5.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-JOAKKXTL.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-JSHMIMAJ.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:O=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:W="bg-white"}){const j="right"===m,z=i().sidebar,C=a(),D=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[P,I]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),K=null!=l||null!=n,M=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:P},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${K?"overflow-hidden":"overflow-y-auto"} ${O}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),K?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
+ /* @__PURE__ */p(t,{side:m,width:P,onResize:I,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:z.resize})]}),T=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${W}`,children:u});/* @__PURE__ */
4
+ return f("div",C?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
+ /* @__PURE__ */p(g,{phone:D,top:l,fallback:z.sections}),T,
6
+ /* @__PURE__ */p(v,{phone:D,bottom:n,label:z.sections,closeLabel:z.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[j?null:M,T,j?M:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
7
7
  return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
8
8
  /* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
9
9
  /* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
@@ -1,4 +1,4 @@
1
- import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-TJSJVC6P.js";import{jsxs as n,Fragment as l,jsx as o}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:a,isFetchingMore:s,extra:u,extraAfter:h}){const m=t().list,f=i??d,p=d>=f,x=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
2
- return n(l,{children:[u,x?`${x} — `:"",p?null!=i?m.allLoaded(f,a):m.count(f,a):m.loadedOf(d,f,a),(C=h,null!=C&&!1!==C&&!0!==C&&""!==C?/* @__PURE__ */n(l,{children:[" · ",h]}):""),s?/* @__PURE__ */n(l,{children:[" · ",
1
+ import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{jsxs as n,Fragment as l,jsx as o}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:a,isFetchingMore:s,extra:u,extraAfter:h}){const m=t().list,f=i??d,p=d>=f,x=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
2
+ return n(l,{children:[u,x?`${x} — `:"",p?null!=i?m.allLoaded(f,a):m.count(f,a):m.loadedOf(d,f,a),(M=h,null!=M&&!1!==M&&!0!==M&&""!==M?/* @__PURE__ */n(l,{children:[" · ",h]}):""),s?/* @__PURE__ */n(l,{children:[" · ",
3
3
  /* @__PURE__ */n("span",{className:"inline-flex items-center gap-1",role:"status",children:[
4
- /* @__PURE__ */o(e,{}),m.loadingMore]})]}):""]});var C}export{r as ListFooter};
4
+ /* @__PURE__ */o(e,{}),m.loadingMore]})]}):""]});var M}export{r as ListFooter};
@@ -1,9 +1,9 @@
1
- import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-KWTK6TGH.js";import{Icon as l}from"./chunk-JOAKKXTL.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-TJSJVC6P.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
1
+ import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-MWTCGJAI.js";import{Icon as l}from"./chunk-JOAKKXTL.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-JSHMIMAJ.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
2
2
  /* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
3
- /* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),K=o(),S=c(null),C=c(l);C.current=l,s(()=>{if(j&&d)return j.report(K,()=>C.current,S.current)},[j,d,K]);const T=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
3
+ /* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),I=o(),S=c(null),C=c(l);C.current=l,s(()=>{if(j&&d)return j.report(I,()=>C.current,S.current)},[j,d,I]);const A=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
4
4
  /* @__PURE__ */m("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
5
5
  /* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:N}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
6
- return m("button",1===k?{ref:S,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:T})}:{ref:S,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:T})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
6
+ return m("button",1===k?{ref:S,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:A})}:{ref:S,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:A})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
7
7
  return h("div",{children:[
8
8
  /* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
9
9
  /* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
@@ -1,20 +1,20 @@
1
- import{Pagination as e}from"./chunk-EVEGK57J.js";import{Checkbox_default as t}from"./chunk-CGZBDI6C.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-G67CJAQ2.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-TJSJVC6P.js";import{useState as i,useRef as a}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
1
+ import{Pagination as e}from"./chunk-WPG3ZHYT.js";import{Checkbox_default as t}from"./chunk-CGZBDI6C.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-G67CJAQ2.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-JSHMIMAJ.js";import{useState as i,useRef as a}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
2
2
  return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
3
3
  /* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
4
- /* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:S=!1,size:$="md",minWidth:z,rowClassName:H,onRow:T,rowHref:E,onRowPress:I,linkAs:A,emptyText:J,selection:P,footer:D,virtualized:F,stackOnNarrow:K=!1,stackBelow:L,className:O=""}){const R=s(),G=J??R.table.empty,V=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),W=K&&!F,Z=W?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),Q=e=>W?{role:e}:{},q=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[U,X]=i(0),Y=F?.overscan??6,_=F?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/F.rowHeight)-Y);X(e=>e===t?e:t)}:void 0,ee=F?Math.ceil(F.height/F.rowHeight)+2*Y:v.length,te=F?Math.min(U,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=F?te*F.rowHeight:0,ne=F?(v.length-re)*F.rowHeight:0,le=a(null),[se,ie]=i(0);l(()=>{if(!F)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=Z.flatMap(e=>m(e)?e.columns:[e]),he=Z.some(m),ue=/* @__PURE__ */new Map;if(W)for(const e of Z)if(m(e))for(const t of e.columns)ue.set(t,q(e.title,e.label));const me=e=>{const t=q(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(P?.selected??[]),ge=P?v.map((e,t)=>V(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=P?36:0,we=de.length+(P?1:0),xe=de.some(e=>"left"===e.fixed),ve=W&&!P&&de.some(e=>e.cardCorner),ke=A??"a",Ne=`${p[$]} ${"sm"===$?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,r,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
5
- return h("th",{scope:"col",...Q("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Be[t]??0)+be}:{},...F?{top:l}:{}},className:[Ne,i,o,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs",a?F?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":F?"sticky z-10 bg-gray-50":"",W&&d?"rosh-dt-sort":"",W?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":W?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
4
+ /* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:S=!1,size:$="md",minWidth:H,rowClassName:z,onRow:T,rowHref:I,onRowPress:A,linkAs:P,emptyText:D,selection:E,footer:F,virtualized:J,stackOnNarrow:L=!1,stackBelow:O,className:R=""}){const W=s(),G=D??W.table.empty,K=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Z=L&&!J,Q=Z?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),V=e=>Z?{role:e}:{},Y=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[q,U]=i(0),X=J?.overscan??6,_=J?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/J.rowHeight)-X);U(e=>e===t?e:t)}:void 0,ee=J?Math.ceil(J.height/J.rowHeight)+2*X:v.length,te=J?Math.min(q,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=J?te*J.rowHeight:0,ne=J?(v.length-re)*J.rowHeight:0,le=a(null),[se,ie]=i(0);l(()=>{if(!J)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=Q.flatMap(e=>m(e)?e.columns:[e]),he=Q.some(m),ue=/* @__PURE__ */new Map;if(Z)for(const e of Q)if(m(e))for(const t of e.columns)ue.set(t,Y(e.title,e.label));const me=e=>{const t=Y(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(E?.selected??[]),ge=E?v.map((e,t)=>K(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=E?36:0,we=de.length+(E?1:0),xe=de.some(e=>"left"===e.fixed),ve=Z&&!E&&de.some(e=>e.cardCorner),ke=P??"a",Ne=`${p[$]} ${"sm"===$?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,r,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
5
+ return h("th",{scope:"col",...V("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Be[t]??0)+be}:{},...J?{top:l}:{}},className:[Ne,i,o,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs",a?J?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":J?"sticky z-10 bg-gray-50":"",Z&&d?"rosh-dt-sort":"",Z?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":Z?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
6
6
  /* @__PURE__ */h(n,{children:e.title}),
7
7
  /* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(n,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),Se=/* @__PURE__ */c(d,{children:[
8
- /* @__PURE__ */c("div",{onScroll:_,style:F?{maxHeight:F.height}:void 0,className:`relative overflow-x-auto ${F?"overflow-y-auto":""} ${S?"rounded-lg border border-gray-200":""}${W?" rosh-dt-scroll":""}`.trim(),children:[B&&
8
+ /* @__PURE__ */c("div",{onScroll:_,style:J?{maxHeight:J.height}:void 0,className:`relative overflow-x-auto ${J?"overflow-y-auto":""} ${S?"rounded-lg border border-gray-200":""}${Z?" rosh-dt-scroll":""}`.trim(),children:[B&&
9
9
  /* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
10
10
  /* @__PURE__ */h(r,{className:"h-6 w-6"}),
11
- /* @__PURE__ */h("span",{className:"sr-only",children:R.table.loading})]}),
12
- /* @__PURE__ */c("table",{...Q("table"),className:(W?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
13
- /* @__PURE__ */c("thead",{...Q("rowgroup"),className:W?"rosh-dt-head":void 0,children:[
14
- /* @__PURE__ */c("tr",{ref:le,...Q("row"),className:"border-b border-gray-200 bg-gray-50",children:[P&&/* @__PURE__ */h("th",{scope:"col",...Q("columnheader"),rowSpan:he?2:void 0,style:{width:36,...F?{top:0}:{}},className:[Ne,o,xe||F?"sticky z-20 bg-gray-50":"",xe?"left-0":"",W?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(t,{"aria-label":R.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!P)return;const e=new Set(ge);P.onChange(pe?P.selected.filter(t=>!e.has(t)):[...P.selected,...ge.filter(e=>!fe.has(e))])}})}),Z.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...Q("columnheader"),colSpan:e.columns.length,style:F?{top:0}:void 0,className:[Ne,"text-center",o,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs","border-b border-gray-200",F?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(n,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...Q("row"),className:"border-b border-gray-200 bg-gray-50",children:Z.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
15
- /* @__PURE__ */h("tbody",{...Q("rowgroup"),className:W?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((e,r)=>{const o=te+r,n=T?.(e,o),l=!!n?.current,s=E?.(e,o),i=void 0===s&&I?()=>I(e,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:i,className:r,"aria-current":o,children:e})},p=de.map(t=>t.render?t.render(e,o,m):t.dataIndex?e[t.dataIndex]:null);if(a&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
16
- return c("tr",{...u(n),...Q("row"),style:F?{height:F.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[W?P?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",W&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(e,o)??"",n?.className??""].filter(Boolean).join(" "),children:[P&&(()=>{const r=V(e,o);/* @__PURE__ */
17
- return h("td",{...Q("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",W?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(t,{"aria-label":R.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{P&&P.onChange(fe.has(e)?P.selected.filter(t=>t!==e):[...P.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=W&&!n&&"wide"!==e.only;/* @__PURE__ */
18
- return h("td",{...Q("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",W?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],W?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:W?
19
- /* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},V(e,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...Q("row"),className:W?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...Q("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:G})})})]}),D]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:W?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(e,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
20
- return h("div",W?void 0!==L&&L>0&&40!==L?{className:`rosh-dt-at ${O}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/L*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:L/40*100+"%"},children:Se})})}:{className:`rosh-dt-stack ${O}`.trim(),children:Se}:{className:O,children:Se})}export{x as DataTable};
11
+ /* @__PURE__ */h("span",{className:"sr-only",children:W.table.loading})]}),
12
+ /* @__PURE__ */c("table",{...V("table"),className:(Z?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:H?{minWidth:H}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
13
+ /* @__PURE__ */c("thead",{...V("rowgroup"),className:Z?"rosh-dt-head":void 0,children:[
14
+ /* @__PURE__ */c("tr",{ref:le,...V("row"),className:"border-b border-gray-200 bg-gray-50",children:[E&&/* @__PURE__ */h("th",{scope:"col",...V("columnheader"),rowSpan:he?2:void 0,style:{width:36,...J?{top:0}:{}},className:[Ne,o,xe||J?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Z?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(t,{"aria-label":W.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!E)return;const e=new Set(ge);E.onChange(pe?E.selected.filter(t=>!e.has(t)):[...E.selected,...ge.filter(e=>!fe.has(e))])}})}),Q.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...V("columnheader"),colSpan:e.columns.length,style:J?{top:0}:void 0,className:[Ne,"text-center",o,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs","border-b border-gray-200",J?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(n,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...V("row"),className:"border-b border-gray-200 bg-gray-50",children:Q.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
15
+ /* @__PURE__ */h("tbody",{...V("rowgroup"),className:Z?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((e,r)=>{const o=te+r,n=T?.(e,o),l=!!n?.current,s=I?.(e,o),i=void 0===s&&A?()=>A(e,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:i,className:r,"aria-current":o,children:e})},p=de.map(t=>t.render?t.render(e,o,m):t.dataIndex?e[t.dataIndex]:null);if(a&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
16
+ return c("tr",{...u(n),...V("row"),style:J?{height:J.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Z?E?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Z&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",z?.(e,o)??"",n?.className??""].filter(Boolean).join(" "),children:[E&&(()=>{const r=K(e,o);/* @__PURE__ */
17
+ return h("td",{...V("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Z?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(t,{"aria-label":W.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{E&&E.onChange(fe.has(e)?E.selected.filter(t=>t!==e):[...E.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Z&&!n&&"wide"!==e.only;/* @__PURE__ */
18
+ return h("td",{...V("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",Z?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Z?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Z?
19
+ /* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},K(e,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...V("row"),className:Z?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...V("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:G})})})]}),F]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Z?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(e,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
20
+ return h("div",Z?void 0!==O&&O>0&&40!==O?{className:`rosh-dt-at ${R}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/O*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:O/40*100+"%"},children:Se})})}:{className:`rosh-dt-stack ${R}`.trim(),children:Se}:{className:R,children:Se})}export{x as DataTable};
@@ -0,0 +1,22 @@
1
+ import{ChartBrush as t}from"./chunk-TU2L7NW3.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-WXZZGHET.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-2DYVVHZA.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{ChartTooltip as V}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as A,CHART_INK as W,STATUS_VARS as z}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as L}from"./chunk-TWVUQUUD.js";import{useShellStrings as S,useShellLocale as D}from"./chunk-JSHMIMAJ.js";import{formatPercent as E,formatPlain as R}from"./chunk-C3QOHMR6.js";import{useRef as C,useState as T,useId as U,useEffect as I}from"react";import{jsx as P,jsxs as F}from"react/jsx-runtime";var H=12,O=16,Y=26,Z=52,B=t=>"number"==typeof t&&Number.isFinite(t);function Q({series:Q,labels:J,height:G=200,stacked:K=!1,stackMode:X="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=S().charts,Vt=D(),At=rt??(t=>R(t,Vt)),Wt=ot??At,zt=jt??$t.noData,Lt=C(null),St=x(Lt),Dt=Nt??St,[Et,Rt]=T(null),[Ct,Tt]=T(null),{highlighted:Ut}=u(),It=U(),Pt=ut??Ct,Ft=p(ht&&Pt?Pt[1]-Pt[0]+1:J.length,pt);if(I(()=>{if(null!==Et)return L(t=>"Escape"===t.key&&(Rt(null),!0))},[Et]),kt)/* @__PURE__ */
2
+ return P("div",{className:wt,ref:Lt,children:/* @__PURE__ */P(h,{height:G,width:Nt??St})});const Ht=J,Ot=ut??Ct??[0,Math.max(0,Ht.length-1)],[Yt,Zt]=Ot,Bt=t=>Ft.slice(ht?t.slice(Yt,Zt+1):t),Qt=lt?Bt(lt):void 0,Jt=Q.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(B)).map(t=>({...t,data:Bt(t.data),pointTones:t.pointTones?Bt(t.pointTones):void 0})),Gt=t=>(ht?Yt:0)+(Ft.view?.[0]??0)+t;if(J=Bt(Ht),0===Jt.length||0===J.length)/* @__PURE__ */
3
+ return P("div",{className:wt,ref:Lt,children:/* @__PURE__ */P("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:G},children:zt})});const Kt=J.map((t,e)=>Jt.reduce((t,a)=>t+(B(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Kt[e]>0?t/Kt[e]:null,qt=[];if(K){let t=J.map(()=>0);for(const e of Jt)t=t.map((t,a)=>t+(B(e.data[a])?e.data[a]:0)),qt.push("percent"===X?t.map((t,e)=>Xt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!K&&!_t&&void 0===et&&Jt.some(te)&&Jt.some(t=>!te(t)),ae=gt&&!K?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Jt.filter(t=>!te(t)):Jt).filter(t=>!re(t)),le=ee?Jt.filter(te).flatMap(t=>t.data.filter(B)):[],ne=K?(qt.at(-1)??[]).filter(B):oe.flatMap(t=>t.data.filter(B)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:K&&"percent"===X||_t||void 0!==et?null:b(K?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=K&&"percent"===X?1:se?se.hi:et??M(Math.max(...ne,0)),me=K&&"percent"===X?t=>E(Math.round(100*t),0,Vt):At,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),Z),fe=ie?w(ie.right.ticks.map(At),O):O,pe={left:ue,right:Math.max(ue+1,Dt-fe),top:H,bottom:G-Y},ge=j(J.length,{from:pe.left,to:pe.right}),ye=_t?$(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Jt.filter(re),Me=Math.max(0,...J.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,B(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Ve=t=>e=>{e.preventDefault(),Rt(e=>{const a=(e??0)+t;return Math.min(J.length-1,Math.max(0,a))})},Ae=Math.max(1,Math.ceil(J.length/Math.max(1,Math.floor(Dt/96))));/* @__PURE__ */
4
+ return F("div",{className:`relative ${wt??""}`,ref:Lt,children:[
5
+ /* @__PURE__ */F("svg",{width:"100%",height:G,viewBox:`0 0 ${Dt} ${G}`,role:"img","aria-label":$t.overIntervals(Jt.map(t=>t.label),J.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Rt(null),onBlur:()=>Rt(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Et&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Gt(Et));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
6
+ /* @__PURE__ */P("defs",{children:/* @__PURE__ */P("clipPath",{id:It,children:/* @__PURE__ */P("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
7
+ /* @__PURE__ */P(n,{id:It,fills:Jt.map((t,e)=>({color:A(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:K?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */P("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:W.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
8
+ /* @__PURE__ */P("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:W.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */P("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:W.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */P("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:W.label,style:{fontVariantNumeric:"tabular-nums"},children:At(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */P("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:W.label,children:nt}),
9
+ /* @__PURE__ */P("g",{clipPath:`url(#${It})`,mask:xt&&vt?`url(#${m(It)})`:void 0,children:Jt.map((t,e)=>{const n=A(t.slot,t.color,t.tone),m=t.mode??(K?"area":"line"),h=f(t.key,Ut);if("step"===m){const e=J.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>B(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
10
+ return P("path",{d:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=J.map((a,r)=>{const o=K?qt[e]?.[r]:t.data[r];return B(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */P("g",{opacity:h??void 0,className:"rosh-viz-mark",children:J.map((o,l)=>{const i=t.data[l];if(!B(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Jt[t]?.key)).reduce((t,a)=>t+Math.max(0,B(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
11
+ return P("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?z[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */P("g",{opacity:h??void 0,className:"rosh-viz-mark",children:J.map((l,c)=>{const d=K?qt[e]?.[c]:t.data[c];if(!B(d))return null;const m=o(d);/* @__PURE__ */
12
+ return P("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=K&&e>0?J.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
13
+ return F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||K)&&
14
+ /* @__PURE__ */P("path",{d:y,fill:c(It,e,t.fillVariant??bt,n),stroke:"none"}),
15
+ /* @__PURE__ */P("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??z[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
16
+ return F("g",{children:[
17
+ /* @__PURE__ */P("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */P("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Jt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=A(t.slot,t.color,t.tone),l=[...t.data].map(B).lastIndexOf(!0),n="all"===r?J.map((t,e)=>e).filter(e=>B(K?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
18
+ return F("g",{children:[n.map(r=>{const n=K?qt[a]?.[r]:t.data[r];return B(n)?/* @__PURE__ */P(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${J[r]}: ${t.label} ${At(n)}`},r):null}),st&&l>=0&&B(K?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */P("text",{x:ge.center(l)-10,y:je(t)(K?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:W.label,style:{fontVariantNumeric:"tabular-nums"},children:At(K?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),J.map((t,e)=>e%Ae===0?/* @__PURE__ */P("text",{x:ge.center(e),y:G-8,textAnchor:"middle",fontSize:11,fill:W.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Et&&/* @__PURE__ */P("line",{x1:ge.center(Et),y1:pe.top,x2:ge.center(Et),y2:pe.bottom,stroke:W.axis,strokeWidth:1}),ae&&Me>0&&
19
+ /* @__PURE__ */F("g",{pointerEvents:"none","data-column-strip":"true",children:[
20
+ /* @__PURE__ */P("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:W.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
21
+ /* @__PURE__ */P("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:W.label,style:{fontVariantNumeric:"tabular-nums"},children:At(Me)})]}),Ft.drag&&/* @__PURE__ */P(g,{x0:ge(Ft.drag[0]),x1:ge(Ft.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),J.map((t,e)=>/* @__PURE__ */P("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Rt(e),onPointerDown:()=>Ft.press(e),onPointerEnter:()=>Ft.over(e),onPointerUp:Ft.release,onClick:yt?()=>yt(Gt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Ft.view&&/* @__PURE__ */P(y,{from:Qt?.[0]??J[0],to:Qt?.at(-1)??J[J.length-1],count:J.length,total:K&&"percent"!==X?Wt(Kt.reduce((t,e)=>t+e,0)):ae?Wt(be.reduce((t,e)=>t+e.data.filter(B).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Jt).filter(t=>t.data.some(B)).map(t=>{const e=t.data.filter(B),a=A(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=K||"column"===t.mode?Wt(r):$t.zoomLevel(Wt(r/e.length),Wt(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Ft.clear}),ht&&Ht.length>2&&/* @__PURE__ */P(t,{className:"mt-1",labels:Ht,width:Dt,data:Q[0]?.data??[],range:Ot,onRangeChange:t=>{ft?ft(t):Tt(t)}}),null!==Et&&
22
+ /* @__PURE__ */P("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(Et),ge.bandwidth,Dt),children:/* @__PURE__ */P(V,{title:Qt?.[Et]??J[Et],rows:Jt.map((t,e)=>({key:t.key,label:t.label,color:A(t.slot,t.color,t.tone),value:B(t.data[Et])?K&&"percent"===X?`${E(100*(Xt(t.data[Et],Et)??0),1,Vt)} · ${Wt(t.data[Et])}`:Wt(t.data[Et]):void 0})),footnote:K&&"percent"===X?$t.inBucket(Wt(Kt[Et])):void 0})})]})}export{Q as TimeSeriesChart};
@@ -1,4 +1,4 @@
1
- import{isSafeLinkHref as e}from"./chunk-Q5Z3KHT2.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-JOAKKXTL.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
1
+ import{isSafeLinkHref as e}from"./chunk-Q5Z3KHT2.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-JOAKKXTL.js";import{useShellStrings as r}from"./chunk-JSHMIMAJ.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
2
2
  return a("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",onClick:l&&r?e=>{(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&r(l)&&e.preventDefault()}:void 0,children:n})}function u(e){const t=[];let n,r=0,l=0;const s=new RegExp(c.source,"g");for(;null!==(n=s.exec(e));)n.index>r&&t.push(e.slice(r,n.index)),void 0!==n[1]?t.push(
3
3
  /* @__PURE__ */i("span",{className:"text-gray-400",children:["[",n[1],"]"]},l++)):void 0!==n[3]?t.push(
4
4
  /* @__PURE__ */a(d,{href:n[4],children:n[3]},l++)):void 0!==n[5]?t.push(
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as r}from"./chunk-JSHMIMAJ.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check",...t});case"error":/* @__PURE__ */
3
3
  return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
4
4
  return n(e,{name:"error",...t});default:/* @__PURE__ */
@@ -1 +1 @@
1
- import{toast_default as t}from"./chunk-JTZVUO3I.js";import{currentShellStrings as e}from"./chunk-TJSJVC6P.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
1
+ import{toast_default as t}from"./chunk-3YBXA72C.js";import{currentShellStrings as e}from"./chunk-JSHMIMAJ.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
@@ -0,0 +1,28 @@
1
+ import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-EDX55XGV.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-4I4WZHMV.js";import{ImageLightbox as r}from"./chunk-UEEELXEN.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-AQZUTW7N.js";import{Breadcrumbs as d}from"./chunk-JTGRLXZN.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-MRLXGLNZ.js";import{useMediaMoveItems as u}from"./chunk-NOGSS432.js";import{RenameField as m}from"./chunk-LTUVKDTO.js";import{NativeSelect as h}from"./chunk-VJXPT53M.js";import{MediaUploadGrid as p}from"./chunk-ZTRKM3B5.js";import{MediaUsedInList as f}from"./chunk-LQVQX5B2.js";import{Segmented as g}from"./chunk-QAS22BIS.js";import{useGridSelection as v}from"./chunk-VLKDWKVR.js";import{useMarquee as k}from"./chunk-OLFYNMTD.js";import{copyToClipboard as y}from"./chunk-Y7KDCC6E.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as x}from"./chunk-7ARBBWPQ.js";import{Banner as N}from"./chunk-YU52WMSH.js";import{Input_default as C}from"./chunk-CU3ZE25J.js";import{DropdownMenu as I}from"./chunk-KCAUYEYR.js";import{IconButton_default as D}from"./chunk-SV5RRBVA.js";import{useFileIntake as S,FileIntakeAlert as j}from"./chunk-V4XR4MOS.js";import{ColoredBadge as T}from"./chunk-WQ4YKWN2.js";import{Button_default as z}from"./chunk-EVYD6UFQ.js";import{Icon as O}from"./chunk-JOAKKXTL.js";import{Tooltip as F}from"./chunk-SOZCWT6I.js";import{buttonClasses as L}from"./chunk-UQYNPYF4.js";import{usePlotWidth as E}from"./chunk-MAFUXCPZ.js";import{useShellStrings as A}from"./chunk-JSHMIMAJ.js";import{useRef as M,useMemo as P,useCallback as R,useState as U,useEffect as K}from"react";import{jsxs as B,Fragment as V,jsx as W}from"react/jsx-runtime";var J="application/x-efficient-media-files",X="application/x-efficient-media-folder",Q="application/x-efficient-media-file";function Y(e){if(!e||!Array.from(e.types).includes(Q))return null;try{const n=JSON.parse(e.getData(Q));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var Z={type:"all",use:"any",sort:"newest"},G={lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */W(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */W(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */W(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */W(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */W(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */W(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */W(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */W(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */W(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */W(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */W(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */W(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */W(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */W(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */W(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},H={link:/* @__PURE__ */W(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */W(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */W(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function $(O){const{mode:Y="manage",layout:$="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=Z,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:he,usedIn:pe,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:xe,onMove:Ne,onTrash:Ce,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:Te,onCropEdit:ze,onOpenInDesign:Oe,onChoose:Fe,onCancel:Le,pickNote:Ee,onDragOut:Ae,className:Me=""}=O,Pe=A().mediaLibrary,Re=A().media,Ue="pick"===Y,Ke=!Ue,Be=M(null),Ve=E(Be,"phone"===$?343:1200),We="phone"===$||"auto"===$&&Ve<640,Je=P(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),Xe=P(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Qe=P(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Xe.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Xe]),Ye=R(e=>{const n=[];for(let l=e?Xe.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Xe.get(l.parentId):void 0);return n},[Xe,ee.length]),Ze=R((e,n)=>Ye(e).some(e=>e.id===n),[Ye]),[Ge,He]=U(()=>/* @__PURE__ */new Set(["@files"])),$e=e=>He(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=R(e=>{He(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;K(()=>{if("files"===q.place)qe(["@files",...Ye(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?Je.get(q.nodeId)?.path??[]:[];qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===q.place,ln="trash"===q.place,an="files"===q.place,rn=an?q.folderId:null,tn=nn&&q.nodeId?Je.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Pe.readOnly} ${Pe.editedAtHq(e.sharedFrom)}`:Pe.readOnly,dn=P(()=>ie.map(e=>e.id),[ie]),sn=P(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=v(dn),un=P(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,hn=M(!0);K(()=>{hn.current?hn.current=!1:cn.clear()},[_e]);const pn=me?.join("\0");K(()=>{me&&cn.setSelection(me)},[pn]);const fn=M(pn??""),gn=un.join("\0");K(()=>{fn.current!==gn&&(fn.current=gn,he?.(un))},[gn]);const vn=(e,n={})=>{Ue?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=U(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Xe.get(n.id)?.name:sn.get(n.id)?.name)&&xe?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},xn=R(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Pe.alreadyHere:void 0;const l=Xe.get(e.id);return n===e.id||n&&Ze(n,e.id)?Pe.notIntoItself:(l?.parentId??null)===n?Pe.folderAlreadyHere:void 0};n.push({key:s,label:Pe.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Qe.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Qe,Xe,an,Ze,rn,Pe]),Nn=R(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Cn,In]=U(null),Dn={words:Pe,media:Re,denied:fe,moveTargets:xn,kindOf:Nn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Ke?e=>{wn(e)}:void 0,rename:xe&&Ke?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:Ne&&Ke?Ne:void 0,trash:Ce&&Ke?Ce:void 0,deleteFolder:Ie&&Ke?Ie:void 0,folderNotEmpty:e=>!!Xe.get(e)?.notEmpty,replace:Te&&Ke?Te:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&y(Pe.urlLabel,n)},openInDesign:Oe,restore:De,deleteForever:Se},Sn=e=>c(e,Dn),jn=w(),Tn=(e,n)=>{Ue||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[zn,On]=U(null),[Fn,Ln]=U(null),[En,An]=U(null);K(()=>{if(!Fn&&!zn)return;const e=()=>{Ln(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[Fn,zn]);const Mn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Pn=(e,n)=>!(!Ne||fe.move||Ue)&&(!!Mn(e,J)||!(!Mn(e,X)||!En)&&(n!==En&&!(n&&Ze(n,En)))),Rn=(e,n)=>({onDragEnter:l=>{Pn(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{Pn(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",zn!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(Pn(e,n))if(e.preventDefault(),On(null),Mn(e,J)){let l;try{l=JSON.parse(e.dataTransfer.getData(J))}catch{l=null}Array.isArray(l)&&l.length&&Ne({kind:"files",ids:l.map(String)},n)}else En&&(Ne({kind:"folder",id:En},n),An(null))}}),Un=e=>{const n=e=>Mn(e,J)||Mn(e,X)||Mn(e,"Files");return{onDragEnter:l=>{n(l)&&Ln(e)},onDragOver:l=>{n(l)&&Fn!==e&&Ln(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Ln(n=>n===e?null:n)}}},Kn=(e,n,l)=>/* @__PURE__ */W(F,{side:"right",content:Fn===e?Pe.noDropProducts:on(l),open:Fn===e||!Fn&&void 0,children:/* @__PURE__ */W("span",{children:n})}),Bn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Vn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=Ge.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
2
+ return B("div",{role:"none",className:"contents",children:[
3
+ /* @__PURE__ */W(n,{label:Kn(r,e.name,t),level:a,icon:d&&o?G.folderOpen:G.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Pe.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>$e(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Un(r),...Ke?Bn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */W(l,{children:Vn(d,a+1,t)})]},e.id)}),Wn=(e,a)=>(Qe.get(e)??[]).map(e=>{const i=Qe.get(e.id),r=Ge.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
4
+ return B("div",{role:"none",className:"contents",children:[
5
+ /* @__PURE__ */W(n,{label:e.name,level:a,icon:i&&r?G.folderOpen:G.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Pe.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>$e(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:zn===e.id?"into":void 0,dragging:En===e.id,draggable:Ke&&!!Ne&&!fe.move,rename:t?/* @__PURE__ */W(m,{value:e.name,label:Pe.folderName,onDone:bn}):void 0,actions:Ke&&o.length?/* @__PURE__ */W(I,{align:"end","aria-label":Pe.folderActions,trigger:G.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Rn(e.id,e.id),...Ke?Bn({kind:"folder",id:e.id}):{},...Ke&&Ne&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(X,e.id),An(e.id)},onDragEnd:()=>{An(null),On(null)}}:{}}}),i&&r&&/* @__PURE__ */W(l,{children:Wn(e.id,a+1)})]},e.id)}),Jn=Ge.has("@files"),Xn=Ge.has("@products"),Qn=/* @__PURE__ */B(e,{"aria-label":Pe.folders,children:[ne&&/* @__PURE__ */B(V,{children:[
6
+ /* @__PURE__ */W(n,{label:Kn("@products",Pe.products),level:1,icon:G.lock,badge:{label:Pe.readOnlyBadge,tone:"neutral"},expanded:ne.length?Xn:void 0,onToggle:()=>$e("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Un("@products")}}),Xn&&ne.length>0&&/* @__PURE__ */W(l,{children:Vn(ne,2)})]}),
7
+ /* @__PURE__ */W(n,{label:Pe.allFiles,level:1,icon:Jn?G.folderOpen:G.folder,count:le,countLabel:null!=le?Pe.fileCount(le):void 0,expanded:Qe.get(null)?.length?Jn:void 0,onToggle:()=>$e("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===zn?"into":void 0,rowProps:{"data-media-row":"@files",...Rn("@files",null)}}),Jn&&(Qe.get(null)?.length??0)>0&&/* @__PURE__ */W(l,{children:Wn(null,2)}),Ke&&/* @__PURE__ */W(n,{label:Pe.trash,level:1,icon:G.trash,count:ae,countLabel:null!=ae?Pe.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Yn=(()=>{if(ln)return[{label:Pe.trash}];if(nn){const e=q.nodeId?Je.get(q.nodeId)?.path??[]:[];return[{label:Pe.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=Ye(rn);return[{label:Pe.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Zn=nn?Pe.readOnly:fe.upload,Gn=!!be&&!ln&&!Zn,Hn=S({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!Gn,onAccept:e=>be?.(e,rn)}),$n=nn?Pe.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[Ke&&we&&!ln&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.folderPlus,onClick:()=>{wn(rn)},...qn($n),children:Pe.newFolder}),be&&!ln&&/* @__PURE__ */W(z,{variant:"primary",size:"sm",leftIcon:G.upload,onClick:()=>Hn.open(),...qn(Zn),children:Pe.upload}),Ke&&ln&&je&&ie.length>0&&/* @__PURE__ */W(z,{variant:"danger",size:"sm",onClick:je,...qn(fe.deleteForever),children:Pe.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */W("div",{style:{width:We?void 0:i,flex:We?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */W(h,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */W("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */W(C,{size:"sm",type:"search",leftIcon:G.search,placeholder:nn?Pe.searchProducts:Pe.search,"aria-label":nn?Pe.searchProducts:Pe.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Pe.mediaType,oe.type,[{value:"all",label:Pe.allTypes},{value:"image",label:Pe.images},{value:"video",label:Pe.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Pe.use,oe.use,[{value:"any",label:Pe.anyUse},{value:"email",label:Pe.emailOnly},{value:"website",label:Pe.websiteOnly},{value:"unused",label:Pe.notUsed}],nl("use"),130),de&&Ke&&el(Pe.sort,oe.sort,[{value:"newest",label:Pe.newest},{value:"name",label:Pe.byName},{value:"size",label:Pe.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */W(g,{size:"sm",label:Pe.view,value:ce,onChange:ue,options:[{value:"grid",label:Pe.grid,icon:G.grid},{value:"list",label:Pe.list,icon:G.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Pe.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:H.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Pe.used(e.usedCount),count:e.usedCount,icon:H.link,tone:"active"}),e.email&&n.push({key:"e",label:Pe.email,icon:H.email,tone:"queued"}),e.private&&n.push({key:"p",label:Pe.private,icon:H.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */W(T,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Ke&&an&&!!Ne&&!fe.move,tl=!!Ae&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[Q]:ol(e)}}:{}})),sl=We?Math.max(72,Math.floor((Ve-24-16-1)/3)):112,cl=M(null),ul=k({containerRef:cl,enabled:Ke&&!We&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Ue){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Fe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},hl=ie.length?null:re?/* @__PURE__ */W(i,{variant:"dashed",title:Pe.noMatches}):nn?/* @__PURE__ */W(i,{variant:"dashed",title:Pe.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */W(i,{variant:"dashed",title:Pe.trashEmpty}):!Gn||Ue?/* @__PURE__ */W(i,{variant:"dashed",title:Pe.emptyFolder}):null,pl="list"===ce&&ie.length>0,fl=hl??(pl?/* @__PURE__ */W("ul",{role:"listbox","aria-multiselectable":Ke||void 0,"aria-label":Pe.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */B("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>Tn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(Q,ol(e)),Ae("start")}:void 0,onDragEnd:ol(e)?e=>Ae("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
8
+ /* @__PURE__ */W("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
9
+ /* @__PURE__ */W("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
10
+ /* @__PURE__ */W("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */W("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */W(p,{items:dl,readOnly:!Gn||Ue,onFiles:Gn&&!Ue?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?J:tl?Q:void 0,onDragOutChange:tl?e=>Ae(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Ke?Tn:void 0,menuOnMedia:Ke})),gl=u({count:un.length,kind:Nn(un),targets:xn({kind:"files",ids:un}),onPick:e=>Ne?.({kind:"files",ids:un},e.key===s?null:e.key)}),vl=L({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */W(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(V,{children:[G.folder,Pe.moveTo]}),items:gl,disabled:!!fe.move}),yl=Ke&&un.length>1&&!nn?/* @__PURE__ */B("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
11
+ /* @__PURE__ */W(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Pe.selected(un.length)}),/* @__PURE__ */B(V,ln?{children:[De&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.undo,onClick:()=>De(un),...qn(fe.restore),children:Pe.restore}),Se&&/* @__PURE__ */W(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Pe.deleteForever})]}:{children:[Ne&&kl,xe&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.edit,disabled:!0,children:Pe.rename}),Ce&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.trash,onClick:()=>Ce({kind:"files",ids:un}),...qn(fe.trash),children:Pe.moveFilesToTrash(un.length)})]}),
12
+ /* @__PURE__ */W(z,{variant:"ghost",size:"sm",onClick:cn.clear,children:Pe.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Pe.name,a?/* @__PURE__ */W(m,{value:e.name,label:Pe.fileName,onDone:bn}):e.name),l("type",Pe.type,e.typeLabel),l("size",Pe.size,e.sizeLabel),l("resolution",Pe.resolution,e.resolution),nn?(l("design",Pe.design,e.design),l("finish",Pe.finish,e.finish),l("angle",Pe.angleLug,e.angleLug),l("owner",Pe.owner,e.owner)):(l("added",Pe.addedBy,e.addedBy),l("folder",Pe.folder,e.folderPath)),l("used",Pe.usedIn,null!=e.usedCount?Pe.places(e.usedCount):void 0);const i=c({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
13
+ return B("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
14
+ /* @__PURE__ */W("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */W(N,{tone:"neutral",title:Pe.readOnlyBadge,children:on(tn)}),
15
+ /* @__PURE__ */W(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */B("div",{className:"flex gap-2",children:[
16
+ /* @__PURE__ */W("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */W(C,{size:"sm",readOnly:!0,value:e.url,"aria-label":Pe.fileUrl,onFocus:e=>e.currentTarget.select()})}),
17
+ /* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.copy,onClick:()=>Dn.copyUrl(e.id),children:Pe.copyUrl})]}),an&&Ke&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[Te&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.swap,onClick:()=>Te(e.id),...qn(fe.replace),children:Pe.replace}),ze&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.crop,onClick:()=>ze(e.id),children:Pe.cropEdit}),Ne&&"submenu"===i?.type&&/* @__PURE__ */W(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(V,{children:[G.folder,Pe.moveTo]}),items:i.items,disabled:!!fe.move}),xe&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Pe.rename}),Ce&&/* @__PURE__ */W(D,{"aria-label":Pe.moveToTrash,size:"sm",onClick:()=>Ce({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:G.trash})]}),ln&&Ke&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */W(z,{variant:"primary",size:"sm",leftIcon:G.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Pe.restore}),Se&&/* @__PURE__ */W(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Pe.deleteForever})]}),nn&&Oe&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",leftIcon:G.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Pe.openInDesign}),pe&&/* @__PURE__ */W(f,{items:pe})]})},wl=mn?mn.private?Pe.privateNoPick:mn.pickDisabledReason:void 0,xl=Ue?/* @__PURE__ */B("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
18
+ /* @__PURE__ */W("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Pe.oneChosen(mn.name):Pe.noneChosen}),
19
+ /* @__PURE__ */B("div",{className:"flex gap-2",children:[Le&&/* @__PURE__ */W(z,{variant:"secondary",size:"sm",onClick:Le,children:Pe.cancel}),
20
+ /* @__PURE__ */W(z,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Fe?.(mn)},children:Pe.chooseImage})]})]}):null,Nl=Ke&&!!mn,Cl=/* @__PURE__ */B("div",{className:"flex min-w-0 flex-col gap-3",children:[Ee&&/* @__PURE__ */W(N,{tone:"neutral",children:Ee}),
21
+ /* @__PURE__ */B("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
22
+ /* @__PURE__ */W(d,{items:Yn}),_n]}),ll,yl,
23
+ /* @__PURE__ */B("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Ke&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
24
+ /* @__PURE__ */W(a,{rect:ul.rect})]}),Gn&&/* @__PURE__ */W("input",{...Hn.inputProps}),
25
+ /* @__PURE__ */W(j,{rejections:Hn.rejections})]});/* @__PURE__ */
26
+ return B("div",{ref:Be,"data-media-library":"","data-layout":We?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Me}`.trim(),children:[/* @__PURE__ */B("div",We?{className:"flex flex-col gap-3 p-3",children:[Qn,Cl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
27
+ /* @__PURE__ */W("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Qn}),
28
+ /* @__PURE__ */W("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Cl}),Nl&&/* @__PURE__ */W("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),xl,We&&/* @__PURE__ */W(o,{open:Nl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */W(x,{...jn.props,items:Sn(jn.state.data)}),null!=Cn&&ie.length>0&&/* @__PURE__ */W(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Cn,ie.length-1),onClose:()=>In(null)})]})}export{J as MEDIA_FILES_DRAG_TYPE,Q as MEDIA_FILE_DRAG_TYPE,X as MEDIA_FOLDER_DRAG_TYPE,$ as MediaLibrary,Y as readMediaFileDrag};
@@ -1,4 +1,4 @@
1
- import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-TJSJVC6P.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";function a({ink:e}){/* @__PURE__ */
1
+ import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-JSHMIMAJ.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";function a({ink:e}){/* @__PURE__ */
2
2
  return i("span",{"aria-hidden":"true",className:`h-3 w-0.5 shrink-0 rounded-[1px] ${e}`})}function t({link:t,className:l=""}){const c=n().meter;/* @__PURE__ */
3
3
  return r("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500 ${l}`.trim(),children:[
4
4
  /* @__PURE__ */r("span",{className:"inline-flex items-center gap-1",children:[
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.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-JOAKKXTL.js";import{useShellStrings as r}from"./chunk-JSHMIMAJ.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__ */
@@ -0,0 +1,4 @@
1
+ import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-JSHMIMAJ.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:M}){const y=i().charts,$=o(),j=k??(e=>h(e,$)),N=M??y.nothingToBreakDown,[w,C]=u(null),{highlighted:I}=r(),A=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",A),0===A.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const E=Math.max(...A.map(e=>e.depth))+1,F=f/2,H=f/2,L=(f/2-8-b)/E,z=A.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),B=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,Q=e=>null!==w?e.id===w:null===I||e.branchKey===I,R=w?A.find(e=>e.id===w):void 0,V=e=>c(e.value/z*100,1,$);/* @__PURE__ */
2
+ return d("div",{className:`relative ${g??""}`,children:[
3
+ /* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":y.sunburst(j(z),E),onMouseLeave:()=>C(null),children:[A.map(e=>/* @__PURE__ */s("path",{d:t(F,H,b+e.depth*L+v/2,b+(e.depth+1)*L-v/2,e.start,e.end),fill:B(e),fillOpacity:Q(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:F,y:H+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),R&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:R.label,rows:[{key:"value",label:y.value,color:B(R),value:j(R.value)},{key:"share",label:y.share,color:a.muted,value:V(R)}]})}),
4
+ /* @__PURE__ */s(e,{caption:y.sunburst(j(z),E),head:[y.tableLevel,y.tableItem,y.value,y.share],rows:A.map(e=>[e.depth+1,e.label,j(e.value),V(e)])})]})}export{f as SunburstChart};
@@ -1,4 +1,4 @@
1
- import{useShellLocale as e}from"./chunk-TJSJVC6P.js";import{formatFixed as t,formatPlain as s}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as r}from"react/jsx-runtime";var l={sm:"text-lg",md:"text-2xl",lg:"text-3xl"},m={default:"text-gray-900",success:"text-green-600",danger:"text-red-600",muted:"text-gray-500"};function n({title:n,value:i,precision:c,prefix:d,suffix:x,tone:u="default",size:o="md",className:f=""}){const p=e(),g="number"!=typeof i?i:null!=c?t(i,c,p):p?s(i,p):i;/* @__PURE__ */
1
+ import{useShellLocale as e}from"./chunk-JSHMIMAJ.js";import{formatFixed as t,formatPlain as s}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as r}from"react/jsx-runtime";var l={sm:"text-lg",md:"text-2xl",lg:"text-3xl"},m={default:"text-gray-900",success:"text-green-600",danger:"text-red-600",muted:"text-gray-500"};function n({title:n,value:i,precision:c,prefix:d,suffix:x,tone:u="default",size:o="md",className:f=""}){const p=e(),g="number"!=typeof i?i:null!=c?t(i,c,p):p?s(i,p):i;/* @__PURE__ */
2
2
  return a("div",{className:f,children:[n&&/* @__PURE__ */r("div",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:n}),
3
3
  /* @__PURE__ */a("div",{className:`mt-1 flex items-baseline gap-1 ${m[u]}`,children:[d&&/* @__PURE__ */r("span",{className:"text-sm",children:d}),
4
4
  /* @__PURE__ */r("span",{className:`font-semibold tabular-nums ${l[o]}`,children:g}),x&&/* @__PURE__ */r("span",{className:"text-sm",children:x})]})]})}export{n as Statistic};
@@ -1,2 +1,2 @@
1
- import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-TJSJVC6P.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
1
+ import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-JSHMIMAJ.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
2
2
  return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};