efficient-shell 8.22.0 → 8.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/README.md +31 -0
  2. package/dist/{Browser-VZU2MTSA.js → Browser-NSOMITHS.js} +14 -14
  3. package/dist/Calculator-WZIBSVDK.js +29 -0
  4. package/dist/{CurrencyConverter-BSQCX3HS.js → CurrencyConverter-BX5HDEX6.js} +8 -8
  5. package/dist/{Documents-NR3T434J.js → Documents-LEB2ZSZD.js} +20 -20
  6. package/dist/{Files-QMV2E74S.js → Files-4P5YEYDE.js} +23 -23
  7. package/dist/{Notepad-M5MCY5DV.js → Notepad-UNPC3Q4F.js} +10 -10
  8. package/dist/{PdfViewer-OODU3XIT.js → PdfViewer-67VBUIRD.js} +1 -1
  9. package/dist/PomodoroTimer-LBFYGZHA.js +91 -0
  10. package/dist/{Preview-QTDCPMCL.js → Preview-3FABZUXV.js} +27 -27
  11. package/dist/Sidebar-OIWVKYUU.js +43 -0
  12. package/dist/{Spreadsheet-V2EWOJML.js → Spreadsheet-AADGH3IX.js} +14 -14
  13. package/dist/{Stock-U3G45T36.js → Stock-5TKATE4I.js} +3 -3
  14. package/dist/{Weather-GEC4VHLM.js → Weather-NQJCUUUN.js} +17 -17
  15. package/dist/{WorldClock-6ORV4NHF.js → WorldClock-QYZF2JCO.js} +6 -6
  16. package/dist/ai/index.js +13 -13
  17. package/dist/apps/index.d.ts +1 -1
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/media-host-check.js +1 -1
  20. package/dist/bin/ui-check.js +1 -1
  21. package/dist/brand.css +1 -1
  22. package/dist/charts/BoxPlotChart.js +1 -1
  23. package/dist/charts/CandlestickChart.js +1 -1
  24. package/dist/charts/CartesianPlot.js +1 -1
  25. package/dist/charts/ChartBrush.js +1 -1
  26. package/dist/charts/ChartFrame.js +1 -1
  27. package/dist/charts/ChartSkeleton.js +1 -1
  28. package/dist/charts/ChordChart.js +1 -1
  29. package/dist/charts/ColumnChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/StatTile.js +1 -1
  42. package/dist/charts/SunburstChart.js +1 -1
  43. package/dist/charts/TimeSeriesChart.js +1 -1
  44. package/dist/charts/TreemapChart.js +1 -1
  45. package/dist/charts/WaterfallChart.js +1 -1
  46. package/dist/{chunk-74QAQXSB.js → chunk-2C6IG7LG.js} +1 -1
  47. package/dist/{chunk-XUQQCKKD.js → chunk-37CCKGHU.js} +1 -1
  48. package/dist/chunk-3EKWDVBV.js +29 -0
  49. package/dist/{chunk-W7ZAFS7C.js → chunk-3GHBY2FP.js} +7 -7
  50. package/dist/{chunk-C3ZZDCBU.js → chunk-3IYMTPGR.js} +18 -18
  51. package/dist/{chunk-WXIEWJF7.js → chunk-3PGK3VFS.js} +1 -1
  52. package/dist/{chunk-I2FHDMIN.js → chunk-3PNKI44X.js} +6 -6
  53. package/dist/{chunk-KFSNSDTW.js → chunk-3V5Z2BJY.js} +12 -12
  54. package/dist/{chunk-Q6A6W3DI.js → chunk-3XQGEILM.js} +1 -1
  55. package/dist/{chunk-QSN7X27F.js → chunk-4CFOKYVR.js} +7 -7
  56. package/dist/{chunk-D3BDPSVV.js → chunk-4F3IKYUO.js} +6 -6
  57. package/dist/{chunk-QUS3C264.js → chunk-4NXMMWL6.js} +1 -1
  58. package/dist/{chunk-PHYI7M45.js → chunk-4VLKDANH.js} +1 -1
  59. package/dist/{chunk-6AJM3QNG.js → chunk-4YUCXIRP.js} +1 -1
  60. package/dist/{chunk-VWMTQLVS.js → chunk-5PY4H4ZJ.js} +1 -1
  61. package/dist/{chunk-R4JU7MU2.js → chunk-64FIE4SX.js} +7 -7
  62. package/dist/chunk-6CRERVSV.js +1 -0
  63. package/dist/chunk-6NMDKOQA.js +7 -0
  64. package/dist/{chunk-PFB2NSSS.js → chunk-6WSTN5A3.js} +5 -5
  65. package/dist/{chunk-R5FFVK2W.js → chunk-72YFU346.js} +1 -1
  66. package/dist/{chunk-SDORX5C2.js → chunk-77FLITYM.js} +6 -6
  67. package/dist/{chunk-DIZW2GZP.js → chunk-7CFH6Y4T.js} +1 -1
  68. package/dist/{chunk-3UL7IB25.js → chunk-BI6ZLD4X.js} +7 -7
  69. package/dist/{chunk-X2U5XB7J.js → chunk-BMZSMXE6.js} +1 -1
  70. package/dist/chunk-BOBUSE33.js +2 -0
  71. package/dist/{chunk-VNYFGNHO.js → chunk-BRHIRE4D.js} +4 -4
  72. package/dist/{chunk-QZRH7L2E.js → chunk-BSNWVZHW.js} +1 -1
  73. package/dist/{chunk-74HUZZPT.js → chunk-BY2OWWKC.js} +1 -1
  74. package/dist/chunk-CRLSG5AY.js +9 -0
  75. package/dist/{chunk-F6YMKW5G.js → chunk-CZ25A5RS.js} +1 -1
  76. package/dist/{chunk-V4WNEJ63.js → chunk-D2AUUIKG.js} +1 -1
  77. package/dist/{chunk-RIGW3E5M.js → chunk-D7FT2PXG.js} +5 -5
  78. package/dist/{chunk-SSOLRTVS.js → chunk-DFDDRKIJ.js} +1 -1
  79. package/dist/{chunk-5EK4DFB5.js → chunk-DISSJYKV.js} +7 -7
  80. package/dist/{chunk-BUWOFJGM.js → chunk-DITCVBR7.js} +10 -10
  81. package/dist/chunk-DODH46ZQ.js +8 -0
  82. package/dist/{chunk-IMDLBXO3.js → chunk-DTSCO7VM.js} +1 -1
  83. package/dist/{chunk-ZY62UQI2.js → chunk-DZNG34DC.js} +19 -19
  84. package/dist/{chunk-YF7A3BWA.js → chunk-E5ALJIXV.js} +4 -4
  85. package/dist/chunk-E6UCGCOC.js +1 -0
  86. package/dist/{chunk-PZFETJAG.js → chunk-EJUR35JG.js} +1 -1
  87. package/dist/{chunk-DIW6WT5L.js → chunk-ERMZ75FO.js} +1 -1
  88. package/dist/{chunk-F3AROMIU.js → chunk-ETF7LAYZ.js} +6 -6
  89. package/dist/{chunk-F6YIUCIJ.js → chunk-EYKUKN32.js} +4 -4
  90. package/dist/{chunk-NYLXA2EG.js → chunk-EZ3BQ6PK.js} +7 -7
  91. package/dist/{chunk-SFWIYB4T.js → chunk-FL2PUQX7.js} +1 -1
  92. package/dist/{chunk-X7JK22X2.js → chunk-GATKJSGL.js} +5 -5
  93. package/dist/{chunk-56C5SEZ7.js → chunk-GIM2422N.js} +1 -1
  94. package/dist/{chunk-HLZZ5Q5E.js → chunk-GQACKEKW.js} +16 -16
  95. package/dist/{chunk-TCN7XUCY.js → chunk-GWIPZKZJ.js} +4 -4
  96. package/dist/chunk-H33Z4ZIY.js +11 -0
  97. package/dist/{chunk-GVNDUNQL.js → chunk-H3BC4KDE.js} +1 -1
  98. package/dist/{chunk-IUBWN3OA.js → chunk-HVX37PKU.js} +1 -1
  99. package/dist/chunk-I4VD5D43.js +8 -0
  100. package/dist/chunk-IFDW5QW6.js +2 -0
  101. package/dist/{chunk-OPFCLDVM.js → chunk-IHQX4GYD.js} +1 -1
  102. package/dist/{chunk-6PWLY2LQ.js → chunk-IZCODCSC.js} +1 -1
  103. package/dist/{chunk-KBLMTCTD.js → chunk-JEXXJK7H.js} +1 -1
  104. package/dist/{chunk-MRLQH2GZ.js → chunk-JNDBRSYZ.js} +2 -2
  105. package/dist/{chunk-ONEF47LG.js → chunk-JPP7UWQA.js} +3 -3
  106. package/dist/{chunk-TYZ4IY7F.js → chunk-JUGPTBMS.js} +2 -2
  107. package/dist/{chunk-SH6ZLK4K.js → chunk-JWIKHVF4.js} +8 -8
  108. package/dist/{chunk-L2JOLPJR.js → chunk-JYLVX2FW.js} +1 -1
  109. package/dist/{chunk-SO4WAMVA.js → chunk-K7KQDPLW.js} +5 -5
  110. package/dist/{chunk-5OGWWBJY.js → chunk-KDZUWQEG.js} +1 -1
  111. package/dist/{chunk-CJKDYVNE.js → chunk-KKSW5IZ7.js} +6 -6
  112. package/dist/{chunk-POMS7YQN.js → chunk-KZHPX4FM.js} +2 -2
  113. package/dist/{chunk-35VA5UFB.js → chunk-LK2SICMI.js} +1 -1
  114. package/dist/{chunk-3APQ5V6P.js → chunk-LLLAIPFX.js} +1 -1
  115. package/dist/{chunk-WBU7NZBP.js → chunk-M5P6A7KS.js} +1 -1
  116. package/dist/{chunk-52L6IBTN.js → chunk-MAOJENIB.js} +1 -1
  117. package/dist/{chunk-ZLGU4VYO.js → chunk-MEYYQC43.js} +5 -5
  118. package/dist/{chunk-7AINUMUA.js → chunk-MMFJBWJC.js} +1 -1
  119. package/dist/{chunk-MIZO6SQ3.js → chunk-MTXTJLFK.js} +2 -2
  120. package/dist/{chunk-BJKZYQFA.js → chunk-MXHEREC6.js} +3 -3
  121. package/dist/{chunk-BBYHBN3R.js → chunk-NHCRQ7SW.js} +1 -1
  122. package/dist/chunk-NID6MGGC.js +13 -0
  123. package/dist/{chunk-SLORZA7W.js → chunk-NMK4UQXZ.js} +12 -12
  124. package/dist/{chunk-QLAQ6ASB.js → chunk-NT26CWMZ.js} +5 -5
  125. package/dist/{chunk-GTKNEJ3X.js → chunk-NVE6L27I.js} +8 -8
  126. package/dist/{chunk-CQZEO4UV.js → chunk-NWP6IJYK.js} +9 -9
  127. package/dist/{chunk-AXQBQH55.js → chunk-OFOLUFNB.js} +15 -15
  128. package/dist/{chunk-LQHWFL5Y.js → chunk-OHVAD3NO.js} +2 -2
  129. package/dist/{chunk-IOESXYEI.js → chunk-OVVXSAGE.js} +8 -8
  130. package/dist/{chunk-Z4UKLPGE.js → chunk-PDXD6DT7.js} +1 -1
  131. package/dist/{chunk-ALYBCDHU.js → chunk-PNGL4ZW2.js} +6 -6
  132. package/dist/{chunk-2TBC254V.js → chunk-PNQ4EYYM.js} +3 -3
  133. package/dist/{chunk-JXGYIV44.js → chunk-PPFMXLEX.js} +9 -9
  134. package/dist/{chunk-IJICE6KT.js → chunk-Q3OCGLW7.js} +2 -2
  135. package/dist/{chunk-TSOBVLV5.js → chunk-QEV346OG.js} +1 -1
  136. package/dist/{chunk-D7AA5WE2.js → chunk-QFA5COE6.js} +1 -1
  137. package/dist/{chunk-ZI7P5YGF.js → chunk-QQCHLRKG.js} +1 -1
  138. package/dist/{chunk-XCHY6QVH.js → chunk-QQK3XS6H.js} +8 -8
  139. package/dist/{chunk-46M6AYFJ.js → chunk-R6DGLGB3.js} +1 -1
  140. package/dist/chunk-RGBX3EVC.js +11 -0
  141. package/dist/{chunk-GKTCCPME.js → chunk-RUQEB2ZC.js} +3 -3
  142. package/dist/{chunk-5LNFW5E4.js → chunk-RYBJ6MMM.js} +1 -1
  143. package/dist/{chunk-2RJKMYON.js → chunk-S7VSXUKS.js} +3 -3
  144. package/dist/{chunk-O3NLPJH2.js → chunk-SB7OTZI4.js} +19 -19
  145. package/dist/{chunk-5B73MLXV.js → chunk-SBHFEWR6.js} +1 -1
  146. package/dist/chunk-SG2MTCA2.js +100 -0
  147. package/dist/chunk-SXORVKIZ.js +9 -0
  148. package/dist/{chunk-CREVU3AF.js → chunk-TW7TA2AB.js} +1 -1
  149. package/dist/{chunk-JLPTSC66.js → chunk-TXS6JKFV.js} +1 -1
  150. package/dist/{chunk-DQB3ORB7.js → chunk-UB4BTRSB.js} +5 -5
  151. package/dist/{chunk-4ELYV3L6.js → chunk-UKB2I3UK.js} +1 -1
  152. package/dist/{chunk-XFIMTNUH.js → chunk-UVUBZL7K.js} +1 -1
  153. package/dist/{chunk-JGZLLQAN.js → chunk-UX6HNRFV.js} +7 -7
  154. package/dist/chunk-VTVOQS5L.js +20 -0
  155. package/dist/{chunk-V23TPYHO.js → chunk-VU6VPKM3.js} +6 -6
  156. package/dist/{chunk-WQKGBPOQ.js → chunk-WJ3XSJ6B.js} +1 -1
  157. package/dist/chunk-WSPO4N72.js +19 -0
  158. package/dist/{chunk-TJPPV7KZ.js → chunk-WTY3SXO7.js} +1 -1
  159. package/dist/{chunk-2IV4XF3Y.js → chunk-WYN5KVU4.js} +3 -3
  160. package/dist/chunk-X6PPP6NX.js +14 -0
  161. package/dist/{chunk-6DT7HG3F.js → chunk-XHBQPVNG.js} +1 -1
  162. package/dist/{chunk-5BBDUKQP.js → chunk-Y2D2YMFY.js} +12 -12
  163. package/dist/{chunk-ZVTOB4RE.js → chunk-Y4MI6NRI.js} +1 -1
  164. package/dist/{chunk-ZMLRNHMS.js → chunk-Y5T257HX.js} +3 -3
  165. package/dist/{chunk-FW2EEIDB.js → chunk-YCQVEJOT.js} +2 -2
  166. package/dist/{chunk-JACPHDTK.js → chunk-YDYDR72S.js} +1 -1
  167. package/dist/chunk-YSFLXPUS.js +7 -0
  168. package/dist/{chunk-BJEBOXTR.js → chunk-YW2DH6YQ.js} +3 -3
  169. package/dist/{chunk-U4QZIU7X.js → chunk-ZEKM6HAA.js} +2 -2
  170. package/dist/{chunk-352MVBF7.js → chunk-ZN3O2KJ7.js} +18 -18
  171. package/dist/chunk-ZNCU3UIW.js +8 -0
  172. package/dist/{chunk-FDENTKSM.js → chunk-ZNXBKFV7.js} +5 -5
  173. package/dist/{chunk-SRMRRJ5K.js → chunk-ZSRRV44J.js} +1 -1
  174. package/dist/{chunk-2JYQF3PJ.js → chunk-ZTB6EMC7.js} +1 -1
  175. package/dist/data/DataTable.js +1 -1
  176. package/dist/data/Kanban.js +1 -1
  177. package/dist/data/ListFooter.js +1 -1
  178. package/dist/data/ListLoadError.js +1 -1
  179. package/dist/data/Pagination.js +1 -1
  180. package/dist/file-intake/index.js +1 -1
  181. package/dist/forms/BorderInput.js +1 -1
  182. package/dist/forms/BrandAssetEditor.js +1 -1
  183. package/dist/forms/Calendar.js +1 -1
  184. package/dist/forms/ColorPicker.js +1 -1
  185. package/dist/forms/ComposerAttachments.js +1 -1
  186. package/dist/forms/CornersInput.js +1 -1
  187. package/dist/forms/DatePicker.js +1 -1
  188. package/dist/forms/DateRangePicker.js +1 -1
  189. package/dist/forms/DateTimePicker.js +1 -1
  190. package/dist/forms/DisplayChips.js +1 -1
  191. package/dist/forms/FilePicker.js +1 -1
  192. package/dist/forms/FormErrorSummary.js +1 -1
  193. package/dist/forms/IconPicker.js +1 -1
  194. package/dist/forms/ImageFocusPoint.js +1 -1
  195. package/dist/forms/InputNumber.js +1 -1
  196. package/dist/forms/LinkPicker.js +1 -1
  197. package/dist/forms/MediaLibrary.js +1 -1
  198. package/dist/forms/MediaUploadField.js +1 -1
  199. package/dist/forms/MediaUploadGrid.js +1 -1
  200. package/dist/forms/MediaUsedInList.js +1 -1
  201. package/dist/forms/NumericKeypad.js +1 -1
  202. package/dist/forms/PositionInput.js +1 -1
  203. package/dist/forms/Select.js +1 -1
  204. package/dist/forms/SidesInput.js +1 -1
  205. package/dist/forms/Slider.js +1 -1
  206. package/dist/forms/Snippet.js +1 -1
  207. package/dist/forms/TagInput.js +1 -1
  208. package/dist/forms/TextToolbar.js +1 -1
  209. package/dist/forms/TimePicker.js +1 -1
  210. package/dist/forms/WidthsBar.js +1 -1
  211. package/dist/forms/mediaLibraryMenu.js +1 -1
  212. package/dist/forms/mediaMoveItems.js +1 -1
  213. package/dist/forms/useFileIntake.js +1 -1
  214. package/dist/index.d.ts +18 -4
  215. package/dist/index.js +377 -377
  216. package/dist/locales/zh-Hans.js +1 -1
  217. package/dist/map/index.js +2 -2
  218. package/dist/page-tabs/index.js +5 -5
  219. package/dist/pdf/index.js +1 -1
  220. package/dist/shell/Accordion.js +1 -1
  221. package/dist/shell/AppUpdateBanner.js +1 -1
  222. package/dist/shell/Avatar.js +1 -1
  223. package/dist/shell/Banner.js +1 -1
  224. package/dist/shell/Breadcrumbs.js +1 -1
  225. package/dist/shell/BudgetBar.js +1 -1
  226. package/dist/shell/Card.js +1 -1
  227. package/dist/shell/ColoredBadge.js +1 -1
  228. package/dist/shell/ConfirmDialog.js +1 -1
  229. package/dist/shell/ContainerFillChart.js +1 -1
  230. package/dist/shell/CountBadge.js +1 -1
  231. package/dist/shell/Dialog.js +1 -1
  232. package/dist/shell/Drawer.js +1 -1
  233. package/dist/shell/EditableGrid.js +1 -1
  234. package/dist/shell/EmptyState.js +1 -1
  235. package/dist/shell/GlobalSearch.js +1 -1
  236. package/dist/shell/HelpCenter.js +1 -1
  237. package/dist/shell/IconRail.js +1 -1
  238. package/dist/shell/ImageLightbox.js +1 -1
  239. package/dist/shell/LanguageSelect.js +1 -1
  240. package/dist/shell/Markdown.js +1 -1
  241. package/dist/shell/MetricBar.js +1 -1
  242. package/dist/shell/MetricBarLegend.js +1 -1
  243. package/dist/shell/MilestoneTimeline.js +1 -1
  244. package/dist/shell/PageHeader.js +1 -1
  245. package/dist/shell/ProductionTimeline.js +1 -1
  246. package/dist/shell/ResizeHandle.js +1 -1
  247. package/dist/shell/Result.js +1 -1
  248. package/dist/shell/SearchableSelect.js +1 -1
  249. package/dist/shell/SettingReset.js +1 -1
  250. package/dist/shell/SettingRow.js +1 -1
  251. package/dist/shell/SidebarLayout.js +1 -1
  252. package/dist/shell/SidebarNav.js +1 -1
  253. package/dist/shell/SortableList.js +1 -1
  254. package/dist/shell/Statistic.js +1 -1
  255. package/dist/shell/TimeAgo.js +1 -1
  256. package/dist/shell/TimelineTrack.js +1 -1
  257. package/dist/shell/TransferProgress.js +1 -1
  258. package/dist/shell/Tree.js +1 -1
  259. package/dist/shell/language.js +1 -1
  260. package/dist/shell/strings.d.ts +5 -0
  261. package/dist/shell/strings.js +1 -1
  262. package/dist/shell/toast.js +1 -1
  263. package/dist/telemetry/index.js +1 -1
  264. package/dist/templates/AuthScreen.js +1 -1
  265. package/dist/templates/ChatTemplate.js +1 -1
  266. package/dist/templates/CheckoutTemplate.js +1 -1
  267. package/dist/templates/DashboardTemplate.js +1 -1
  268. package/dist/templates/DataTablePage.js +1 -1
  269. package/dist/templates/EmailTemplate.js +1 -1
  270. package/dist/templates/ErrorBoundary.js +1 -1
  271. package/dist/templates/ErrorPage.js +1 -1
  272. package/dist/templates/FormLayoutPage.js +1 -1
  273. package/dist/templates/GalleryTemplate.js +1 -1
  274. package/dist/{types-BOinJXUf.d.ts → types-ClT92-8Z.d.ts} +13 -1
  275. package/dist/ui/index.js +1 -1
  276. package/dist/version.js +1 -1
  277. package/package.json +1 -1
  278. package/dist/Calculator-DKZHOHOD.js +0 -29
  279. package/dist/PomodoroTimer-I423ZZOQ.js +0 -91
  280. package/dist/Sidebar-UVBEI4DQ.js +0 -43
  281. package/dist/chunk-6JCIQ7XL.js +0 -8
  282. package/dist/chunk-6UBBY54N.js +0 -2
  283. package/dist/chunk-B73YLHD2.js +0 -99
  284. package/dist/chunk-CPM3BQGV.js +0 -14
  285. package/dist/chunk-DSYIKLOK.js +0 -11
  286. package/dist/chunk-EUOFKZI3.js +0 -19
  287. package/dist/chunk-LVAGFIWK.js +0 -2
  288. package/dist/chunk-MWNZY33B.js +0 -13
  289. package/dist/chunk-NE42BDQX.js +0 -9
  290. package/dist/chunk-NHFLTKPK.js +0 -11
  291. package/dist/chunk-O5KDTFK5.js +0 -8
  292. package/dist/chunk-PMOGQHYX.js +0 -20
  293. package/dist/chunk-RPK3U2K2.js +0 -9
  294. package/dist/chunk-RPTQCFLR.js +0 -29
  295. package/dist/chunk-URFWJZTV.js +0 -7
  296. package/dist/chunk-VKMEQKYT.js +0 -1
  297. package/dist/chunk-W7NZKU27.js +0 -7
  298. package/dist/chunk-YPXVOPL4.js +0 -1
  299. package/dist/chunk-Z5TCGLCM.js +0 -8
@@ -1,2 +1,2 @@
1
- import{Tooltip as e}from"./chunk-22S6LG6D.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,k=t().resizeHandle,N=o(null),D=o({onResize:d,min:f,max:p,side:m});D.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const M=i(()=>{N.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>M,[M]);const T=e=>{N.current&&(e.currentTarget.hasPointerCapture?.(N.current.pointer)&&e.currentTarget.releasePointerCapture(N.current.pointer),M())},C="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",I="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",$=P?`absolute inset-x-0 ${C} z-10 flex h-2`:`absolute inset-y-0 ${C} z-10 flex w-2`;/* @__PURE__ */
2
- return s(e,{content:z??k.hint,side:I,delay:600,className:`${$} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??k.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),N.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=N.current;if(!r)return;if(0===e.buttons)return void M();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=D.current;o(l(r.width,t,s,n,i))},onPointerUp:T,onPointerCancel:T,onLostPointerCapture:()=>{N.current&&M()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${C} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${C} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
1
+ import{Tooltip as e}from"./chunk-22S6LG6D.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,k=t().resizeHandle,C=o(null),N=o({onResize:d,min:f,max:p,side:m});N.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const D=i(()=>{C.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>D,[D]);const M=e=>{C.current&&(e.currentTarget.hasPointerCapture?.(C.current.pointer)&&e.currentTarget.releasePointerCapture(C.current.pointer),D())},I="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",T="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",$=P?`absolute inset-x-0 ${I} z-10 flex h-2`:`absolute inset-y-0 ${I} z-10 flex w-2`;/* @__PURE__ */
2
+ return s(e,{content:z??k.hint,side:T,delay:600,className:`${$} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??k.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),C.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=C.current;if(!r)return;if(0===e.buttons)return void D();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=N.current;o(l(r.width,t,s,n,i))},onPointerUp:M,onPointerCancel:M,onLostPointerCapture:()=>{C.current&&D()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${I} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${I} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
@@ -1,2 +1,2 @@
1
- import{inputClasses as e}from"./chunk-JFSYWEHD.js";import{useShellLocale as t}from"./chunk-VKMEQKYT.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/,i=e=>String(e).padStart(2,"0");function s(e,t){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const n=`${i(e.getHours())}:${i(e.getMinutes())}`;return t?`${n}:${i(e.getSeconds())}`:n}return a.test(e)?e:""}var u=n(function({value:n,onChange:i,min:u,max:o,invalid:m,size:l,className:c="",step:v,...d},f){const g=null!=v&&Number(v)<60,p=t();/* @__PURE__ */
1
+ import{inputClasses as e}from"./chunk-JFSYWEHD.js";import{useShellLocale as t}from"./chunk-E6UCGCOC.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/,i=e=>String(e).padStart(2,"0");function s(e,t){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const n=`${i(e.getHours())}:${i(e.getMinutes())}`;return t?`${n}:${i(e.getSeconds())}`:n}return a.test(e)?e:""}var u=n(function({value:n,onChange:i,min:u,max:o,invalid:m,size:l,className:c="",step:v,...d},f){const g=null!=v&&Number(v)<60,p=t();/* @__PURE__ */
2
2
  return r("input",{ref:f,type:"time",lang:p,step:v,"aria-invalid":m||void 0,value:s(n,g),min:s(u,g)||void 0,max:s(o,g)||void 0,onChange:e=>i?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...d})});export{u as TimePicker_default};
@@ -1,2 +1,2 @@
1
- import{InputNumber_default as a}from"./chunk-MIZO6SQ3.js";import{Icon as e}from"./chunk-KIBL6M3T.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
1
+ import{InputNumber_default as a}from"./chunk-MTXTJLFK.js";import{Icon as e}from"./chunk-KIBL6M3T.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
2
2
  return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
@@ -1,4 +1,4 @@
1
- import{useShellStrings as t,useShellLocale as e}from"./chunk-VKMEQKYT.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-E6UCGCOC.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 +1 @@
1
- import{useShellLocale as e}from"./chunk-VKMEQKYT.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as r,jsxs as n}from"react/jsx-runtime";var i={danger:"bg-red-600 text-white",neutral:"bg-gray-600 text-white",accent:"bg-blue-600 text-white"};function a({count:a=0,max:l=99,dot:s=!1,tone:o="danger",showZero:c=!1,children:m,className:u=""}){const h=s||a>0||0===a&&c,d=e(),x=a>l?`${t(l,d)}+`:t(a,d),f=m?"":u,g=h?/* @__PURE__ */r("span",s?{className:`block h-2.5 w-2.5 rounded-full ring-2 ring-white ${i[o]} ${f}`.trim(),"aria-hidden":m?"true":void 0}:{className:`flex h-5 min-w-[1.25rem] items-center justify-center whitespace-nowrap rounded-full px-1 text-xs font-semibold tabular-nums ring-2 ring-white ${i[o]} ${f}`.trim(),children:x}):null;return m?/* @__PURE__ */n("span",{className:`relative inline-flex ${u}`.trim(),children:[m,g&&/* @__PURE__ */r("span",{className:"absolute -right-1.5 -top-1.5 flex",children:g})]}):g}export{a as CountBadge};
1
+ import{useShellLocale as e}from"./chunk-E6UCGCOC.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as r,jsxs as n}from"react/jsx-runtime";var i={danger:"bg-red-600 text-white",neutral:"bg-gray-600 text-white",accent:"bg-blue-600 text-white"};function a({count:a=0,max:l=99,dot:s=!1,tone:o="danger",showZero:c=!1,children:m,className:u=""}){const h=s||a>0||0===a&&c,d=e(),x=a>l?`${t(l,d)}+`:t(a,d),f=m?"":u,g=h?/* @__PURE__ */r("span",s?{className:`block h-2.5 w-2.5 rounded-full ring-2 ring-white ${i[o]} ${f}`.trim(),"aria-hidden":m?"true":void 0}:{className:`flex h-5 min-w-[1.25rem] items-center justify-center whitespace-nowrap rounded-full px-1 text-xs font-semibold tabular-nums ring-2 ring-white ${i[o]} ${f}`.trim(),children:x}):null;return m?/* @__PURE__ */n("span",{className:`relative inline-flex ${u}`.trim(),children:[m,g&&/* @__PURE__ */r("span",{className:"absolute -right-1.5 -top-1.5 flex",children:g})]}):g}export{a as CountBadge};
@@ -1,8 +1,8 @@
1
- import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-VKMEQKYT.js";import{formatPercent as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function r(l,e){const t=s(l);if(null==t)return"no-reading";const a=s(e);return null==a||0===a?"no-budget":t>a?"over":"within"}var i=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:h,formatDuration:g,formatValue:x,pace:b,emptyLabel:f,noBudgetLabel:p,size:v="sm",ariaLabel:y,className:N=""}){const w=l().meter,M=e(),$=x??g??(l=>function(l,e=t.meter){const a=Math.round(l),n=Math.floor(a/3600),u=Math.floor(a%3600/60),s=a%60;return n>0?e.hoursMinutes(n,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=f??w.noReading,j=p??w.noBudget,B=s(o),L=s(d),K=null!=L&&L>0?L:null,Q=s(c)??0,R="over"===r(o,d),V=null!=K?K+Q:null,z=null!=K&&null!=V?i(K/V*100):null,C=R&&Q>0,D=null==V||null==B?0:R?C?z??0:0:i(B/V*100),E=C?z??0:0,F=R?C&&null!=V&&null!=B?i(B/V*100):100:0,H=Math.max(0,F-E),O=s(b),S=null!=O&&null!=V?i(O/V*100):null,T=null!=B&&null!=K?B/K*100:null,Y=null!=T?a(Math.round(T),0,M):null!=B?$(B):"—",q=h??(null==B?k:null==K?j:`${$(B)} / ${$(K)}`),A="md"===v?"h-2":"h-1.5",G=R?"text-red-600":null!=B?"text-gray-900":"text-gray-400",I=null!=B&&null!=K&&null!=V?/* @__PURE__ */n("div",{role:"meter","aria-label":y??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":V,"aria-valuenow":Math.min(V,B),"aria-valuetext":w.ofBudget(Y),className:`relative mt-2 ${A} overflow-hidden rounded-full bg-gray-200`,children:[(!R||C)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${D}%`}}),H>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${E}%`,width:`${H}%`}}),Q>0&&null!=z&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${z}%`}}),null!=S&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${S}%`}})]}):null;/* @__PURE__ */
1
+ import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-E6UCGCOC.js";import{formatPercent as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function r(l,e){const t=s(l);if(null==t)return"no-reading";const a=s(e);return null==a||0===a?"no-budget":t>a?"over":"within"}var i=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:h,formatDuration:g,formatValue:x,pace:b,emptyLabel:f,noBudgetLabel:p,size:v="sm",ariaLabel:y,className:N=""}){const w=l().meter,M=e(),$=x??g??(l=>function(l,e=t.meter){const a=Math.round(l),n=Math.floor(a/3600),u=Math.floor(a%3600/60),s=a%60;return n>0?e.hoursMinutes(n,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=f??w.noReading,C=p??w.noBudget,j=s(o),B=s(d),L=null!=B&&B>0?B:null,O=s(c)??0,R="over"===r(o,d),z=null!=L?L+O:null,D=null!=L&&null!=z?i(L/z*100):null,E=R&&O>0,F=null==z||null==j?0:R?E?D??0:0:i(j/z*100),G=E?D??0:0,H=R?E&&null!=z&&null!=j?i(j/z*100):100:0,Q=Math.max(0,H-G),S=s(b),U=null!=S&&null!=z?i(S/z*100):null,V=null!=j&&null!=L?j/L*100:null,q=null!=V?a(Math.round(V),0,M):null!=j?$(j):"—",A=h??(null==j?k:null==L?C:`${$(j)} / ${$(L)}`),I="md"===v?"h-2":"h-1.5",J=R?"text-red-600":null!=j?"text-gray-900":"text-gray-400",K=null!=j&&null!=L&&null!=z?/* @__PURE__ */n("div",{role:"meter","aria-label":y??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":z,"aria-valuenow":Math.min(z,j),"aria-valuetext":w.ofBudget(q),className:`relative mt-2 ${I} overflow-hidden rounded-full bg-gray-200`,children:[(!R||E)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${F}%`}}),Q>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${G}%`,width:`${Q}%`}}),O>0&&null!=D&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${D}%`}}),null!=U&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${U}%`}})]}):null;/* @__PURE__ */
2
2
  return n("div","md"===v?{className:N,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-gray-500",children:m}),
3
3
  /* @__PURE__ */n("div",{className:"mt-1 flex items-baseline gap-2",children:[
4
- /* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${G}`,children:Y}),
5
- /* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-gray-400",children:q})]}),I]}:{className:N,children:[
4
+ /* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${J}`,children:q}),
5
+ /* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-gray-400",children:A})]}),K]}:{className:N,children:[
6
6
  /* @__PURE__ */n("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-gray-500",children:m}),
7
- /* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${G}`,children:Y}),
8
- /* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-gray-400",children:q})]}),I]})}export{m as BudgetBar,r as budgetState};
7
+ /* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${J}`,children:q}),
8
+ /* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-gray-400",children:A})]}),K]})}export{m as BudgetBar,r as budgetState};
@@ -1,4 +1,4 @@
1
- import{useShellLocale as e}from"./chunk-VKMEQKYT.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-E6UCGCOC.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{useSettingAuto as e,useInSettingRow as t}from"./chunk-E4Z5OXBI.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{inputClasses as n}from"./chunk-JFSYWEHD.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-VKMEQKYT.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as b}from"react/jsx-runtime";function v(e){const t=String(e),r=/e-(\d+)$/.exec(t);return r?Number(r[1]):t.split(".")[1]?.length??0}var h=(e,t)=>null==e?"":null!=t?e.toFixed(t):String(e);function y({dir:e,compact:t,label:n,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(i,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),b={tabIndex:-1,"aria-label":n,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const t=e.shiftKey;l.current(t);const r=e.currentTarget.ownerDocument.defaultView??window;r.addEventListener("pointerup",u),c.current={off:()=>r.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(t),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...b,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(r,{size:"sm",...b,children:f})}var g=l(function({value:r,onChange:i,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:E,readOnly:N,invalid:j,placeholder:D,size:B,prefix:K,suffix:F,id:S,name:C,className:M="",onBlur:T,onFocus:W,steppers:L,stepFrom:O,snap:U=!1,allowEmpty:I=!0,appearance:P="box",display:$,reportWhileTyping:V=!0,onRevert:z,"aria-label":A,"aria-labelledby":Q,"aria-describedby":Y,auto:X,...H},J){const R="bare"===P,Z=e(),q=X??Z,G=c(),_="string"==typeof F&&""!==F.trim()?F.trim():void 0,ee=e=>function(e,t){let r=e.trim();if(t&&r.endsWith(t)&&(r=r.slice(0,-t.length).trim()),r=r.replace(",","."),""===r||"-"===r||"."===r||"-."===r)return null;const n=Number(r);return Number.isFinite(n)?n:null}(e,_),te=Object.fromEntries(Object.entries(H).filter(([e])=>e.startsWith("data-"))),re=a(),[ne,ie]=u(()=>h(r,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof J?J(e):J&&(J.current=e)},[J]),ce=s(r),ue=s(r);ue.current=r;const se=Boolean(E||N),de=t(),pe=L??(!!de&&"compact"),me="compact"===pe;p(()=>{ee(oe.current)!==r&&ie(h(r,x))},[r,x]);const fe=e=>{if(se)return;let t=(ee(oe.current)??O??(D?ee(D):null)??0)+e;null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g);const r=x??String(w??1).split(".")[1]?.length??0;t=Number(t.toFixed(r));const n=h(t,x);oe.current=n,ie(n),i(t),we()},be=s(fe);be.current=fe;const ve=s({unit:w??1,big:k??10*(w??1),locked:se});ve.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const t=t=>{const{unit:r,big:n,locked:i}=ve.current;if(i||e.ownerDocument.activeElement!==e)return;const o=t.deltaY||t.deltaX;o&&(t.preventDefault(),be.current((o<0?1:-1)*(t.shiftKey?n:r)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);const[he,ye]=u(!1),[ge,xe]=u(0),we=()=>{R&&xe(e=>e+1)};p(()=>{R&&he&&document.activeElement===ae.current&&ae.current?.select()},[R,he,ge]);const ke=s(!1);p(()=>{if(he&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const t=ce.current;if(ee(oe.current)===t)return!1;const r=h(t,x);return oe.current=r,ie(r),ue.current!==t&&(z??i)(t),we(),!0})},[he,se,x,i,z]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!I){const e=h(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&i(null),null}let t=e;const r=x??(U?Math.max(v(w??1),v(l??0)):void 0);U&&(t=function(e,t,r){const n=(e-r)/t;return r+Math.round(n+1e-9*Math.sign(e))*t}(t,w??1,l??0)),null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g),null!=r&&(t=Number(t.toFixed(r)));const n=h(t,x);return oe.current=n,ie(n),t===e&&t===ue.current||i(t),t},Ne=/* @__PURE__ */m("input",{ref:le,id:S,"data-number-input":"",name:C,type:"text",inputMode:0===x?"numeric":"decimal",value:!he&&$?$(r):ne,disabled:E,readOnly:N,placeholder:D,step:w,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==r?D||void 0:`${h(r,x)}${R&&_?_:""}`,"aria-describedby":[Y,q?G:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":R?"bare":void 0,...te,autoComplete:R?"off":void 0,spellCheck:!R&&void 0,"aria-invalid":j||void 0,"aria-label":A,"aria-labelledby":Q,onChange:e=>(e=>{if(N)return;const t=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==t&&!/^-?\d*[.,]?\d*$/.test(t))return;if(ie(e),!V)return;const r=ee(e);(null!==r||I)&&i(r)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void we();const t=w??1,r=k??10*t,n="ArrowUp"===e.key?e.shiftKey?r:t:"ArrowDown"===e.key?-(e.shiftKey?r:t):"PageUp"===e.key?10*t:"PageDown"===e.key?10*-t:null;null===n||se||(e.preventDefault(),fe(n))},onFocus:()=>{ce.current=ue.current,ye(!0),ke.current=!0,W?.()},onMouseUp:R?e=>{ke.current&&(ke.current=!1,e.preventDefault())}:void 0,onBlur:()=>{ye(!1),ke.current=!1,Ee(),T?.()},className:R?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",he?"bg-white":"bg-transparent",se?"cursor-default":"cursor-text",M].filter(Boolean).join(" "):n({invalid:j,size:B,readOnly:N,auto:q,className:[K?"pl-6":"",me?F?"pr-10":"pr-6":pe?F?"pr-24":"pr-16":F?"pr-10":"","text-left tabular-nums",M].filter(Boolean).join(" ")})}),je=q?/* @__PURE__ */m("span",{id:G,hidden:!0,children:re.settingView.auto}):null;if(R||!K&&!F&&!pe)return je?/* @__PURE__ */f(b,{children:[Ne,je]}):Ne;const De=ee(ne);/* @__PURE__ */
2
- return f("div",{className:"relative","data-number-box":"",children:[K&&/* @__PURE__ */m("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-sm text-gray-500",children:K}),Ne,je,F&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${me?"right-6":pe?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-gray-500`,children:F}),pe&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:me,label:re.number.decrease,disabled:se||null!=l&&null!=De&&De<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),t=/* @__PURE__ */m(y,{dir:1,compact:me,label:re.number.increase,disabled:se||null!=g&&null!=De&&De>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
1
+ import{useSettingAuto as e,useInSettingRow as t}from"./chunk-E4Z5OXBI.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{inputClasses as n}from"./chunk-JFSYWEHD.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as b}from"react/jsx-runtime";function v(e){const t=String(e),r=/e-(\d+)$/.exec(t);return r?Number(r[1]):t.split(".")[1]?.length??0}var h=(e,t)=>null==e?"":null!=t?e.toFixed(t):String(e);function y({dir:e,compact:t,label:n,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(i,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),b={tabIndex:-1,"aria-label":n,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const t=e.shiftKey;l.current(t);const r=e.currentTarget.ownerDocument.defaultView??window;r.addEventListener("pointerup",u),c.current={off:()=>r.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(t),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...b,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(r,{size:"sm",...b,children:f})}var g=l(function({value:r,onChange:i,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:E,readOnly:N,invalid:j,placeholder:D,size:C,prefix:B,suffix:F,id:S,name:K,className:O="",onBlur:U,onFocus:W,steppers:L,stepFrom:M,snap:T=!1,allowEmpty:I=!0,appearance:P="box",display:$,reportWhileTyping:z=!0,onRevert:A,"aria-label":V,"aria-labelledby":Q,"aria-describedby":X,auto:Y,...G},H){const J="bare"===P,R=e(),Z=Y??R,q=c(),_="string"==typeof F&&""!==F.trim()?F.trim():void 0,ee=e=>function(e,t){let r=e.trim();if(t&&r.endsWith(t)&&(r=r.slice(0,-t.length).trim()),r=r.replace(",","."),""===r||"-"===r||"."===r||"-."===r)return null;const n=Number(r);return Number.isFinite(n)?n:null}(e,_),te=Object.fromEntries(Object.entries(G).filter(([e])=>e.startsWith("data-"))),re=a(),[ne,ie]=u(()=>h(r,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof H?H(e):H&&(H.current=e)},[H]),ce=s(r),ue=s(r);ue.current=r;const se=Boolean(E||N),de=t(),pe=L??(!!de&&"compact"),me="compact"===pe;p(()=>{ee(oe.current)!==r&&ie(h(r,x))},[r,x]);const fe=e=>{if(se)return;let t=(ee(oe.current)??M??(D?ee(D):null)??0)+e;null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g);const r=x??String(w??1).split(".")[1]?.length??0;t=Number(t.toFixed(r));const n=h(t,x);oe.current=n,ie(n),i(t),we()},be=s(fe);be.current=fe;const ve=s({unit:w??1,big:k??10*(w??1),locked:se});ve.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const t=t=>{const{unit:r,big:n,locked:i}=ve.current;if(i||e.ownerDocument.activeElement!==e)return;const o=t.deltaY||t.deltaX;o&&(t.preventDefault(),be.current((o<0?1:-1)*(t.shiftKey?n:r)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);const[he,ye]=u(!1),[ge,xe]=u(0),we=()=>{J&&xe(e=>e+1)};p(()=>{J&&he&&document.activeElement===ae.current&&ae.current?.select()},[J,he,ge]);const ke=s(!1);p(()=>{if(he&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const t=ce.current;if(ee(oe.current)===t)return!1;const r=h(t,x);return oe.current=r,ie(r),ue.current!==t&&(A??i)(t),we(),!0})},[he,se,x,i,A]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!I){const e=h(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&i(null),null}let t=e;const r=x??(T?Math.max(v(w??1),v(l??0)):void 0);T&&(t=function(e,t,r){const n=(e-r)/t;return r+Math.round(n+1e-9*Math.sign(e))*t}(t,w??1,l??0)),null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g),null!=r&&(t=Number(t.toFixed(r)));const n=h(t,x);return oe.current=n,ie(n),t===e&&t===ue.current||i(t),t},Ne=/* @__PURE__ */m("input",{ref:le,id:S,"data-number-input":"",name:K,type:"text",inputMode:0===x?"numeric":"decimal",value:!he&&$?$(r):ne,disabled:E,readOnly:N,placeholder:D,step:w,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==r?D||void 0:`${h(r,x)}${J&&_?_:""}`,"aria-describedby":[X,Z?q:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":J?"bare":void 0,...te,autoComplete:J?"off":void 0,spellCheck:!J&&void 0,"aria-invalid":j||void 0,"aria-label":V,"aria-labelledby":Q,onChange:e=>(e=>{if(N)return;const t=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==t&&!/^-?\d*[.,]?\d*$/.test(t))return;if(ie(e),!z)return;const r=ee(e);(null!==r||I)&&i(r)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void we();const t=w??1,r=k??10*t,n="ArrowUp"===e.key?e.shiftKey?r:t:"ArrowDown"===e.key?-(e.shiftKey?r:t):"PageUp"===e.key?10*t:"PageDown"===e.key?10*-t:null;null===n||se||(e.preventDefault(),fe(n))},onFocus:()=>{ce.current=ue.current,ye(!0),ke.current=!0,W?.()},onMouseUp:J?e=>{ke.current&&(ke.current=!1,e.preventDefault())}:void 0,onBlur:()=>{ye(!1),ke.current=!1,Ee(),U?.()},className:J?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",he?"bg-white":"bg-transparent",se?"cursor-default":"cursor-text",O].filter(Boolean).join(" "):n({invalid:j,size:C,readOnly:N,auto:Z,className:[B?"pl-6":"",me?F?"pr-10":"pr-6":pe?F?"pr-24":"pr-16":F?"pr-10":"","text-left tabular-nums",O].filter(Boolean).join(" ")})}),je=Z?/* @__PURE__ */m("span",{id:q,hidden:!0,children:re.settingView.auto}):null;if(J||!B&&!F&&!pe)return je?/* @__PURE__ */f(b,{children:[Ne,je]}):Ne;const De=ee(ne);/* @__PURE__ */
2
+ return f("div",{className:"relative","data-number-box":"",children:[B&&/* @__PURE__ */m("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-sm text-gray-500",children:B}),Ne,je,F&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${me?"right-6":pe?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-gray-500`,children:F}),pe&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:me,label:re.number.decrease,disabled:se||null!=l&&null!=De&&De<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),t=/* @__PURE__ */m(y,{dir:1,compact:me,label:re.number.increase,disabled:se||null!=g&&null!=De&&De>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
3
3
  return f("span",me?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[t,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,t]})})()]})});export{g as InputNumber_default};
@@ -1,7 +1,7 @@
1
- import{CountBadge as e}from"./chunk-52L6IBTN.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{useShellStrings as i,useShellLocale as t}from"./chunk-VKMEQKYT.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useState as a,useId as s}from"react";import{jsx as o,jsxs as c,Fragment as l}from"react/jsx-runtime";var d="px-4 @max-[260px]/acc:px-3",h={band:{head:`${d} py-3 bg-(--rosh-fold-band)`,press:"hover:bg-(--rosh-fold-band-hover)",title:"text-base font-semibold text-(--ink-strongest)",chev:"text-(--ink-strongest)",body:`${d} pb-2`},row:{head:`${d} py-2`,press:"hover:bg-gray-50",title:"text-sm font-medium text-(--ink-strong)",chev:"text-(--ink-strong)",body:`${d} pb-2`}},m=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join(""),u="m-0 p-0 border-0 [font:inherit] [letter-spacing:inherit] [text-transform:inherit]";function f({items:d,defaultOpenIds:f=[],openIds:p,onOpenChange:b,allowMultiple:v=!1,level:x=3,tier:$="band",className:g=""}){const N=h[$],y=i(),k=t(),[w,j]=a(f),I=s(),M=`h${x}`,C=p??w;/* @__PURE__ */
2
- return o("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=C.includes(i.id),a=`${I}-${m(i.id)}-head`,s=`${I}-${m(i.id)}-panel`;/* @__PURE__ */
1
+ import{CountBadge as e}from"./chunk-MAOJENIB.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{useShellStrings as i,useShellLocale as t}from"./chunk-E6UCGCOC.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useState as a,useId as s}from"react";import{jsx as o,jsxs as c,Fragment as l}from"react/jsx-runtime";var d="px-4 @max-[260px]/acc:px-3",h={band:{head:`${d} py-3 bg-(--rosh-fold-band)`,press:"hover:bg-(--rosh-fold-band-hover)",title:"text-base font-semibold text-(--ink-strongest)",chev:"text-(--ink-strongest)",body:`${d} pb-2`},row:{head:`${d} py-2`,press:"hover:bg-gray-50",title:"text-sm font-medium text-(--ink-strong)",chev:"text-(--ink-strong)",body:`${d} pb-2`}},m=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join(""),u="m-0 p-0 border-0 [font:inherit] [letter-spacing:inherit] [text-transform:inherit]";function f({items:d,defaultOpenIds:f=[],openIds:p,onOpenChange:b,allowMultiple:v=!1,level:x=3,tier:$="band",className:g=""}){const N=h[$],y=i(),k=t(),[w,j]=a(f),C=s(),O=`h${x}`,I=p??w;/* @__PURE__ */
2
+ return o("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=I.includes(i.id),a=`${C}-${m(i.id)}-head`,s=`${C}-${m(i.id)}-panel`;/* @__PURE__ */
3
3
  return c("div",{children:[
4
- /* @__PURE__ */o(M,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?s:void 0,onClick:()=>(e=>{const n=C.includes(e)?C.filter(n=>n!==e):v?[...C,e]:[e];void 0===p&&j(n),b?.(n)})(i.id),className:`flex w-full items-center gap-2 text-left transition-colors duration-(--motion-fast) disabled:cursor-not-allowed disabled:opacity-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${N.head} ${N.press}`,children:[null!=i.icon&&/* @__PURE__ */o("span",{"aria-hidden":"true",className:`inline-flex h-4 w-4 shrink-0 items-center justify-center ${N.chev}`,children:i.icon}),
4
+ /* @__PURE__ */o(O,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?s:void 0,onClick:()=>(e=>{const n=I.includes(e)?I.filter(n=>n!==e):v?[...I,e]:[e];void 0===p&&j(n),b?.(n)})(i.id),className:`flex w-full items-center gap-2 text-left transition-colors duration-(--motion-fast) disabled:cursor-not-allowed disabled:opacity-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${N.head} ${N.press}`,children:[null!=i.icon&&/* @__PURE__ */o("span",{"aria-hidden":"true",className:`inline-flex h-4 w-4 shrink-0 items-center justify-center ${N.chev}`,children:i.icon}),
5
5
  /* @__PURE__ */o("span",{className:`min-w-0 flex-1 ${N.title}`,children:i.title}),"number"==typeof i.count&&i.count>0&&
6
6
  /* @__PURE__ */c(l,{children:[
7
7
  /* @__PURE__ */o("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */o(e,{count:i.count,tone:"accent"})}),
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-V23TPYHO.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-PMOGQHYX.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{FormField as n}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Textarea_default as c}from"./chunk-AWY3F6PV.js";import{Button_default as o}from"./chunk-4IU5BSVE.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-VU6VPKM3.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-VTVOQS5L.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{FormField as n}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Textarea_default as c}from"./chunk-AWY3F6PV.js";import{Button_default as o}from"./chunk-4IU5BSVE.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
2
2
  return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
3
3
  /* @__PURE__ */d("div",{children:[
4
4
  /* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
@@ -0,0 +1,13 @@
1
+ import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-P5BOTIJU.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-E6UCGCOC.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:I,formatValue:$,centerLabel:j,animate:C=!0,labels:P="none",labelMinShare:w=.04,className:F,emptyLabel:S}){const A=h().charts,E=c(),R=$??(e=>u(e,E)),T=I??A.other,U=S??A.nothingToBreakDown,W=d(),[z,O]=f(null),{highlighted:_}=a(),B=y(null),L=o(B,Number.POSITIVE_INFINITY),V=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===V.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${F??""}`,children:U});const Y=[...V].sort((e,t)=>t.value-e.value),H=Y.slice(0,N),J=Y.slice(N),Q=J.length>0?[...H,{key:"__other__",label:T,value:J.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:H,Z=e=>i(e.slot,e.color,e.tone),q=Q.reduce((e,t)=>e+t.value,0),D=Math.ceil(.62*Math.max(...Q.map(e=>String(e.label).length),4)*11)+24,G="outside"===P&&L>=120+2*D,X=G?D:0,K=G?Math.max(120,Math.min(k,L-2*X)):k,ee=K+2*X,te=X+K/2,le=K/2,ae=K/2-12,re=M??("ring"===v?.58*ae:0),ne=n(Q.length,b),oe=Math.max(...Q.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!G)return[];let e=-Math.PI/2;const t=Q.map((t,l)=>{const a="rose"===v?n(Q.length,b).step:t.value/q*Math.PI*2,r="rose"===v?n(Q.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/q,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=w),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==z?z!==e:null!==_&&_!==t,me=null!==z?Q[z]:void 0;/* @__PURE__ */
2
+ return g("div",{className:`relative ${F??""}`,ref:B,children:[
3
+ /* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":W,onMouseLeave:()=>O(null),children:[
4
+ /* @__PURE__ */p("title",{id:W,children:A.breakdown(R(q),Q.length)}),Q.map((a,r)=>{const n=Z(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/q*Math.PI*2-b;"rose"!==v&&(ie+=a.value/q*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
5
+ return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:C?t.sweep:void 0,style:C?l(r,55):void 0,onMouseEnter:()=>O(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
6
+ return g("g",{children:[
7
+ /* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
8
+ /* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
9
+ /* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,E)})]},`lbl-${e.key}`)}),j&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:j})]}),me&&null!==z&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:A.value,color:Z(me),value:R(me.value)},{key:"share",label:A.share,color:s.muted,value:m(me.value/q*100,1,E)}]})}),
10
+ /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:Q.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
11
+ /* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:Z(e)}}),
12
+ /* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
13
+ /* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/q*100,1,E)})]},e.key))})]})}export{x as PieChart};
@@ -1,12 +1,12 @@
1
- import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as a}from"./chunk-UQBPKZUR.js";import{INPUT_BASE_ON as i,INPUT_BASE as s}from"./chunk-JFSYWEHD.js";import{Button_default as u}from"./chunk-4IU5BSVE.js";import{LoadingSpinner as c}from"./chunk-Q5MD3VY6.js";import{Tooltip as d}from"./chunk-22S6LG6D.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as b,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-VKMEQKYT.js";import{useState as x,useId as k,useRef as $,useMemo as j,useEffect as D}from"react";import{createPortal as N}from"react-dom";import{jsxs as S,jsx as C}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function R({onClear:e,ariaLabel:t}){/* @__PURE__ */
2
- return C("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function E(E){const{options:L,placeholder:F,emptyOptionLabel:M,className:T="",disabled:z,id:U,filter:B=!1,allowFreeText:I=!1,freeTextOption:O,onSearchChange:A,loading:J=!1,error:H,onRetry:K,rightAdornment:Q,renderOption:V,clearable:G=!0,"aria-label":P,"aria-labelledby":Y,"aria-describedby":X}=E,Z=!0===E.multiple,q=E.multiple?E.value:E.value?[E.value]:[],_=E.multiple?"":E.value,ee=e=>{E.multiple?E.onChange(e):E.onChange(e[0]??"")},te=q.length>0,ne=B&&te&&!z,re=Z||B,le=null!=O,oe=I||le,[ae,ie]=x(!1),[se,ue]=x(-1),ce=k(),de=U??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),ge=w(),be=M??ge.select.none,ve=e=>{fe(e),ue(-1),A?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ae);$e.current=ae;const je=$(!1),De=e=>{$e.current&&($e.current=!1,e&&I&&!le&&Ge&&(Z?q.includes(Ge)||ee([...q,Ge]):Ge!==_&&ee([Ge])),ie(!1),ve(""))},Ne=(e,t)=>{if(!e.disabled){if(Z)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Pe?ve(""):ue(t));ee([e.value]),De(!1)}},[Se,Ce]=x(null);g(()=>{if(!Q||ae)return void Ce(null);const e=ke.current?.offsetWidth??0;Ce(e?e+(Me?32:8)+6:null)});const We=m(we,ae,re?{popupRef:xe}:{matchTriggerWidth:!0}),Re=j(()=>t(L),[L]),Ee=q.join("\0"),Le=j(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Re)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Re,Ee,oe]),Fe=Le.join(", "),Me=G&&te&&!z,[Te,ze]=x(null),Ue=$(null),Be=$(""),Ie=$(()=>{});Ie.current=()=>{const e=we.current,t=Ue.current;if(!Z||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Le.join("\0")}`;if(o===Be.current)return;Be.current=o;let a=null;r>0&&Le.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,a=W(Le,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===a?.shown&&e?.cut===a?.cut?e:a)},g(()=>{Ie.current()}),D(()=>{const e=we.current;if(!Z||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ie.current());return t.observe(e),()=>t.disconnect()},[Z]);const Oe=Le.length,Ae=!Z||!Te||Te.shown>=Oe?Fe:0===Te.shown?ge.select.selectedCount(Oe):`${Le.slice(0,Te.shown).join(", ")} +${Oe-Te.shown}`,Je=Z&&null!==Te&&(Te.shown<Oe||Te.cut),He=ae&&te&&re;D(()=>{if(!ae)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||De(!0)};document.addEventListener("mousedown",e);const t=h(()=>De(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ae,I,me,Ee,E.onChange]),D(()=>{if(ae)return y(e=>!("Escape"!==e.key||!$e.current)&&(De(!1),we.current?.blur(),!0),()=>xe.current)},[ae]);const Ke=j(()=>{const e=/* @__PURE__ */new Set;return n(L,t=>!e.has(t.value)&&(e.add(t.value),!0))},[L]),Qe=j(()=>{if(A)return Ke;const e=me.trim().toLowerCase();return e?n(Ke,t=>r(t,e)):Ke},[Ke,me,A]),Ve=j(()=>t(Qe),[Qe]),Ge=me.trim(),Pe=j(()=>le&&Ge?Re.some(e=>e.label===Ge)||q.includes(Ge)?null:{value:Ge,label:Ge}:null,[le,Ge,Re,Ee]),Ye=j(()=>Pe?[...Ve,Pe]:Ve,[Ve,Pe]);/* @__PURE__ */
3
- return S("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&De(!0)},children:[(Xe=/* @__PURE__ */C("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ae,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ae?he:void 0,"aria-activedescendant":ae&&se>=0&&se<Ye.length?pe(se):void 0,"aria-label":Y?void 0:P,"aria-labelledby":Y,"aria-describedby":X,value:ae?me:Ae,onChange:e=>{ve(e.target.value),ie(!0)},onFocus:()=>{z||(ve(""),ie(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ae)return void ie(!0);if(0===Ye.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Ye,t,n))}"Enter"===t.key?(t.preventDefault(),ae&&se>=0&&se<Ye.length?Ne(Ye[se],se):1!==Ve.length||Ve[0].disabled?I&&!le&&Ge&&(Z?(q.includes(Ge)||ee([...q,Ge]),ve("")):(ee([Ge]),De(!1),we.current?.blur())):Ne(Ve[0],0)):"Escape"===t.key?(De(!1),we.current?.blur()):"Tab"===t.key&&De(!0)},placeholder:He?Ae:F||be,className:`${ne?i:s} ${T} ${Me?"pr-8":""} ${z?"bg-gray-50 text-gray-400 cursor-not-allowed":""} truncate${He?" rosh-field-shows-choice":""}`,style:Se?{paddingRight:Se}:void 0,disabled:z}),Z?/* @__PURE__ */C(d,{content:!ae&&Je?Fe:null,className:"block",children:Xe}):Xe),Z&&
4
- /* @__PURE__ */C("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */C("span",{ref:Ue,className:"whitespace-pre"})}),Me&&/* @__PURE__ */C(R,{ariaLabel:ge.select.clear,onClear:()=>{ee([]),De(!1)}}),Q&&!ae&&/* @__PURE__ */C("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Me?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Q}),ae&&N(
5
- /* @__PURE__ */S("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Z&&te&&G&&!z&&
6
- /* @__PURE__ */C("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-gray-50 border-b ${b}`,children:ge.select.clearAll}),J?
7
- /* @__PURE__ */C(c,{size:"sm",padding:"py-2",label:ge.search.searching}):H?/* @__PURE__ */S("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
8
- /* @__PURE__ */C("span",{className:"min-w-0 flex-1",children:H}),K&&/* @__PURE__ */C(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:K,className:"shrink-0",children:ge.list.retry})]}):null,
9
- /* @__PURE__ */S("div",{id:he,role:Ye.length?"listbox":void 0,"aria-labelledby":Ye.length?Y??(P?void 0:de):void 0,"aria-label":Ye.length&&!Y?P:void 0,"aria-multiselectable":!(!Ye.length||!Z)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Ye.length?J||H?null:/* @__PURE__ */C("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:ge.select.noMatches}):0===Ve.length?null:l(Qe,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
10
- return S("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Z)&&n.preventDefault(),Ne(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Z&&/* @__PURE__ */C(o,{selected:n}),
11
- /* @__PURE__ */C("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:V?V(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */C(a,{grows:re,children:e.sublabel})]},e.value)},ce),Pe&&O&&
12
- /* @__PURE__ */C("button",{id:pe(Ve.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Z&&e.preventDefault(),Ne(Pe,Ve.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-gray-700 hover:bg-gray-50 ${Ve.length?`border-t ${b}`:""} ${se===Ve.length?"bg-gray-100":""}`,children:/* @__PURE__ */C("span",{className:"min-w-0 flex-1 truncate",children:O(Pe.value)})},`${ce}-typed`)]})]}),document.body)]});var Xe}export{E as SearchableSelect,W as fitChoice};
1
+ import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as a}from"./chunk-UQBPKZUR.js";import{INPUT_BASE_ON as i,INPUT_BASE as s}from"./chunk-JFSYWEHD.js";import{Button_default as u}from"./chunk-4IU5BSVE.js";import{LoadingSpinner as c}from"./chunk-Q5MD3VY6.js";import{Tooltip as d}from"./chunk-22S6LG6D.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as b,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-E6UCGCOC.js";import{useState as x,useId as k,useRef as $,useMemo as j,useEffect as D}from"react";import{createPortal as N}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function R({onClear:e,ariaLabel:t}){/* @__PURE__ */
2
+ return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function E(E){const{options:L,placeholder:F,emptyOptionLabel:M,className:T="",disabled:U,id:z,filter:O=!1,allowFreeText:B=!1,freeTextOption:I,onSearchChange:A,loading:J=!1,error:G,onRetry:H,rightAdornment:P,renderOption:Q,clearable:V=!0,"aria-label":K,"aria-labelledby":Y,"aria-describedby":X}=E,Z=!0===E.multiple,q=E.multiple?E.value:E.value?[E.value]:[],_=E.multiple?"":E.value,ee=e=>{E.multiple?E.onChange(e):E.onChange(e[0]??"")},te=q.length>0,ne=O&&te&&!U,re=Z||O,le=null!=I,oe=B||le,[ae,ie]=x(!1),[se,ue]=x(-1),ce=k(),de=z??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),ge=w(),be=M??ge.select.none,ve=e=>{fe(e),ue(-1),A?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ae);$e.current=ae;const je=$(!1),De=e=>{$e.current&&($e.current=!1,e&&B&&!le&&Ve&&(Z?q.includes(Ve)||ee([...q,Ve]):Ve!==_&&ee([Ve])),ie(!1),ve(""))},Ne=(e,t)=>{if(!e.disabled){if(Z)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Ke?ve(""):ue(t));ee([e.value]),De(!1)}},[Ce,Se]=x(null);g(()=>{if(!P||ae)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Me?32:8)+6:null)});const We=m(we,ae,re?{popupRef:xe}:{matchTriggerWidth:!0}),Re=j(()=>t(L),[L]),Ee=q.join("\0"),Le=j(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Re)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Re,Ee,oe]),Fe=Le.join(", "),Me=V&&te&&!U,[Te,Ue]=x(null),ze=$(null),Oe=$(""),Be=$(()=>{});Be.current=()=>{const e=we.current,t=ze.current;if(!Z||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Le.join("\0")}`;if(o===Oe.current)return;Oe.current=o;let a=null;r>0&&Le.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,a=W(Le,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ue(e=>e?.shown===a?.shown&&e?.cut===a?.cut?e:a)},g(()=>{Be.current()}),D(()=>{const e=we.current;if(!Z||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Be.current());return t.observe(e),()=>t.disconnect()},[Z]);const Ie=Le.length,Ae=!Z||!Te||Te.shown>=Ie?Fe:0===Te.shown?ge.select.selectedCount(Ie):`${Le.slice(0,Te.shown).join(", ")} +${Ie-Te.shown}`,Je=Z&&null!==Te&&(Te.shown<Ie||Te.cut),Ge=ae&&te&&re;D(()=>{if(!ae)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||De(!0)};document.addEventListener("mousedown",e);const t=h(()=>De(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ae,B,me,Ee,E.onChange]),D(()=>{if(ae)return y(e=>!("Escape"!==e.key||!$e.current)&&(De(!1),we.current?.blur(),!0),()=>xe.current)},[ae]);const He=j(()=>{const e=/* @__PURE__ */new Set;return n(L,t=>!e.has(t.value)&&(e.add(t.value),!0))},[L]),Pe=j(()=>{if(A)return He;const e=me.trim().toLowerCase();return e?n(He,t=>r(t,e)):He},[He,me,A]),Qe=j(()=>t(Pe),[Pe]),Ve=me.trim(),Ke=j(()=>le&&Ve?Re.some(e=>e.label===Ve)||q.includes(Ve)?null:{value:Ve,label:Ve}:null,[le,Ve,Re,Ee]),Ye=j(()=>Ke?[...Qe,Ke]:Qe,[Qe,Ke]);/* @__PURE__ */
3
+ return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&De(!0)},children:[(Xe=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ae,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ae?he:void 0,"aria-activedescendant":ae&&se>=0&&se<Ye.length?pe(se):void 0,"aria-label":Y?void 0:K,"aria-labelledby":Y,"aria-describedby":X,value:ae?me:Ae,onChange:e=>{ve(e.target.value),ie(!0)},onFocus:()=>{U||(ve(""),ie(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(U)return;if(t.preventDefault(),!ae)return void ie(!0);if(0===Ye.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Ye,t,n))}"Enter"===t.key?(t.preventDefault(),ae&&se>=0&&se<Ye.length?Ne(Ye[se],se):1!==Qe.length||Qe[0].disabled?B&&!le&&Ve&&(Z?(q.includes(Ve)||ee([...q,Ve]),ve("")):(ee([Ve]),De(!1),we.current?.blur())):Ne(Qe[0],0)):"Escape"===t.key?(De(!1),we.current?.blur()):"Tab"===t.key&&De(!0)},placeholder:Ge?Ae:F||be,className:`${ne?i:s} ${T} ${Me?"pr-8":""} ${U?"bg-gray-50 text-gray-400 cursor-not-allowed":""} truncate${Ge?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:U}),Z?/* @__PURE__ */S(d,{content:!ae&&Je?Fe:null,className:"block",children:Xe}):Xe),Z&&
4
+ /* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:ze,className:"whitespace-pre"})}),Me&&/* @__PURE__ */S(R,{ariaLabel:ge.select.clear,onClear:()=>{ee([]),De(!1)}}),P&&!ae&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Me?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:P}),ae&&N(
5
+ /* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Z&&te&&V&&!U&&
6
+ /* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-gray-50 border-b ${b}`,children:ge.select.clearAll}),J?
7
+ /* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:ge.search.searching}):G?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
8
+ /* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:G}),H&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:H,className:"shrink-0",children:ge.list.retry})]}):null,
9
+ /* @__PURE__ */C("div",{id:he,role:Ye.length?"listbox":void 0,"aria-labelledby":Ye.length?Y??(K?void 0:de):void 0,"aria-label":Ye.length&&!Y?K:void 0,"aria-multiselectable":!(!Ye.length||!Z)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Ye.length?J||G?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:ge.select.noMatches}):0===Qe.length?null:l(Pe,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
10
+ return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Z)&&n.preventDefault(),Ne(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Z&&/* @__PURE__ */S(o,{selected:n}),
11
+ /* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:Q?Q(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(a,{grows:re,children:e.sublabel})]},e.value)},ce),Ke&&I&&
12
+ /* @__PURE__ */S("button",{id:pe(Qe.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Z&&e.preventDefault(),Ne(Ke,Qe.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-gray-700 hover:bg-gray-50 ${Qe.length?`border-t ${b}`:""} ${se===Qe.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:I(Ke.value)})},`${ce}-typed`)]})]}),document.body)]});var Xe}export{E as SearchableSelect,W as fitChoice};
@@ -1,5 +1,5 @@
1
- import{InputNumber_default as e}from"./chunk-MIZO6SQ3.js";import{useSettingAuto as t,useInSettingRow as i}from"./chunk-E4Z5OXBI.js";import{useShellStrings as n}from"./chunk-VKMEQKYT.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as s,useEffect as u,useLayoutEffect as c}from"react";import{jsx as m,jsxs as f}from"react/jsx-runtime";var p=(e,t,i)=>Math.min(i,Math.max(t,e));function h(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var v=8,x=40;function b(e){return Math.max(1,...e.map(e=>(e??"").length))}var w="undefined"==typeof window?u:c;function y(e,t,i,n){return Number(p(e,t,i).toFixed(n))}var g=r(null);function S({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
2
- return m(g.Provider,{value:r,children:e})}function z({value:r,onChange:a,min:c,max:S,step:z=1,shiftStep:F,precision:$,inputMin:k,inputMax:K,suffix:M,showInput:N=!0,emptyLabel:j,placeholderValue:L,stepFrom:E,label:A,"aria-labelledby":C,valueText:D,id:I,disabled:O,size:R="md",className:V="",auto:B}){const Q=n(),T=o(),W=t(),Z=B??W,q=o(),P=I??T,U=$??h(z),X=k??c,Y=K??S,G=void 0!==j||void 0!==L,H=E??L,J=p(r??L??c,c,S),_=d(null),[ee,te]=l(null),ie=Boolean(M);w(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,N]);const ne=e=>D?D(e):"string"==typeof M?`${e.toFixed(U)} ${M}`:void 0,re=null==r?j??(null!=L?ne(L)??String(L):void 0):ne(r),le=`calc(${b([c.toFixed(U),S.toFixed(U),r?.toFixed(U),j,L?.toFixed(U)])}ch + ${(ee?.frame??10+(ie?x:v))+2}px)`,ae=s(g),oe=o(),de=ae?.set;w(()=>{de&&de(oe,N?le:null)},[de,oe,le,N]),u(()=>()=>de?.(oe,null),[de,oe]);const se=i();/* @__PURE__ */
3
- return f("div",{"data-slider":"",className:`flex w-full min-w-0 items-center ${se?"flex-wrap gap-2":"gap-3"} ${V}`.trim(),children:[
4
- /* @__PURE__ */m("input",{id:P,type:"range",min:c,max:S,step:z,value:J,disabled:O,"aria-label":C?void 0:A,"aria-labelledby":C,"aria-valuetext":re,"aria-describedby":Z?q:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=F;if(!i&&!(null==r&&null!=H))return;e.preventDefault();a(y((r??H??J)+t*(i?F??z:z),c,S,U))},onChange:e=>a(y(Number(e.target.value),c,S,U)),className:`min-w-24 flex-1 ${se?"basis-24":""} cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 ${"sm"===R?"h-1":"h-1.5"}`}),N&&
5
- /* @__PURE__ */m("div",{ref:_,"data-slider-box":"",className:se?"ml-auto shrink-0":"shrink-0 text-xs",style:se?void 0:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */m(e,{value:r,onChange:e=>{null!=e?e<X||e>Y||a(e):G&&a(null)},min:X,max:Y,step:z,shiftStep:F,stepFrom:H,precision:U,snap:!0,allowEmpty:G,suffix:M,disabled:O,placeholder:j??(null!=L?L.toFixed(U):void 0),size:se?void 0:"sm",auto:Z,"aria-label":A?Q.slider.value(A):void 0,"aria-labelledby":A?void 0:C})}),Z&&/* @__PURE__ */m("span",{id:q,hidden:!0,children:Q.settingView.auto})]})}export{z as Slider,S as SliderGroup,y as settleSliderValue,b as sliderBoxChars,h as stepDecimals};
1
+ import{InputNumber_default as e}from"./chunk-MTXTJLFK.js";import{useSettingAuto as t,useInSettingRow as i}from"./chunk-E4Z5OXBI.js";import{useShellStrings as n}from"./chunk-E6UCGCOC.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as s,useEffect as u,useLayoutEffect as c}from"react";import{jsx as m,jsxs as f}from"react/jsx-runtime";var p=(e,t,i)=>Math.min(i,Math.max(t,e));function h(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var v=8,x=40;function b(e){return Math.max(1,...e.map(e=>(e??"").length))}var w="undefined"==typeof window?u:c;function y(e,t,i,n){return Number(p(e,t,i).toFixed(n))}var g=r(null);function S({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
2
+ return m(g.Provider,{value:r,children:e})}function F({value:r,onChange:a,min:c,max:S,step:F=1,shiftStep:z,precision:$,inputMin:k,inputMax:C,suffix:L,showInput:N=!0,emptyLabel:j,placeholderValue:K,stepFrom:M,label:E,"aria-labelledby":A,valueText:D,id:O,disabled:R,size:T="md",className:B="",auto:I}){const U=n(),V=o(),W=t(),X=I??W,q=o(),G=O??V,J=$??h(F),P=k??c,Z=C??S,H=void 0!==j||void 0!==K,Q=M??K,Y=p(r??K??c,c,S),_=d(null),[ee,te]=l(null),ie=Boolean(L);w(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,N]);const ne=e=>D?D(e):"string"==typeof L?`${e.toFixed(J)} ${L}`:void 0,re=null==r?j??(null!=K?ne(K)??String(K):void 0):ne(r),le=`calc(${b([c.toFixed(J),S.toFixed(J),r?.toFixed(J),j,K?.toFixed(J)])}ch + ${(ee?.frame??10+(ie?x:v))+2}px)`,ae=s(g),oe=o(),de=ae?.set;w(()=>{de&&de(oe,N?le:null)},[de,oe,le,N]),u(()=>()=>de?.(oe,null),[de,oe]);const se=i();/* @__PURE__ */
3
+ return f("div",{"data-slider":"",className:`flex w-full min-w-0 items-center ${se?"flex-wrap gap-2":"gap-3"} ${B}`.trim(),children:[
4
+ /* @__PURE__ */m("input",{id:G,type:"range",min:c,max:S,step:F,value:Y,disabled:R,"aria-label":A?void 0:E,"aria-labelledby":A,"aria-valuetext":re,"aria-describedby":X?q:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=z;if(!i&&!(null==r&&null!=Q))return;e.preventDefault();a(y((r??Q??Y)+t*(i?z??F:F),c,S,J))},onChange:e=>a(y(Number(e.target.value),c,S,J)),className:`min-w-24 flex-1 ${se?"basis-24":""} cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 ${"sm"===T?"h-1":"h-1.5"}`}),N&&
5
+ /* @__PURE__ */m("div",{ref:_,"data-slider-box":"",className:se?"ml-auto shrink-0":"shrink-0 text-xs",style:se?void 0:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */m(e,{value:r,onChange:e=>{null!=e?e<P||e>Z||a(e):H&&a(null)},min:P,max:Z,step:F,shiftStep:z,stepFrom:Q,precision:J,snap:!0,allowEmpty:H,suffix:L,disabled:R,placeholder:j??(null!=K?K.toFixed(J):void 0),size:se?void 0:"sm",auto:X,"aria-label":E?U.slider.value(E):void 0,"aria-labelledby":E?void 0:A})}),X&&/* @__PURE__ */m("span",{id:q,hidden:!0,children:U.settingView.auto})]})}export{F as Slider,S as SliderGroup,y as settleSliderValue,b as sliderBoxChars,h as stepDecimals};
@@ -1,14 +1,14 @@
1
- import{FormField as e}from"./chunk-MVQBVPWP.js";import{zoneFocusClass as r,mediaPromptLine as t,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-IMDLBXO3.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-JACPHDTK.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{ColoredBadge as u}from"./chunk-74HUZZPT.js";import{Icon as p}from"./chunk-KIBL6M3T.js";import{Tooltip as h}from"./chunk-22S6LG6D.js";import{useShellStrings as f}from"./chunk-VKMEQKYT.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function w({items:p,onPick:k,onFiles:w,onRemove:N,onReorder:j,dragType:K,dropType:T,onDropData:C,label:P,hint:I,error:L,required:A,className:M,accept:F="image/*",maxSizeBytes:S,maxFiles:z,fit:O="cover",thumbSize:$=96,placeholder:E,cta:H,acceptHint:B,showCover:Q=!1,coverLabel:R,busy:V=!1,busyLabel:W,progress:q,disabled:U=!1,readOnly:Z=!1,selected:G,onItemClick:J,onItemDoubleClick:X,onItemContextMenu:Y,menuOnMedia:_=!1}){const ee=f().media,re=H??ee.cta,te=R??ee.cover,ae=W??ee.uploading,ne=g(),[le,ie]=b(null),oe=U||V,se=!(!k&&!w||oe||Z),de=!!N&&!oe&&!Z,ce=!!j&&!oe&&!Z,me=!!K&&!U&&!ce,ue=!(!T||!C||oe||Z),pe=r(oe),he=E??t(F,ee),fe=d({accept:F,maxSizeBytes:S,maxFiles:z,acceptHint:B,multiple:!0,disabled:!se,currentCount:p.length,onAccept:e=>{if(w)w(e);else for(const r of e)k(r)}}),[ge,be]=b(!1),ye=y(0),ve=e=>ue&&Array.from(e.dataTransfer?.types??[]).includes(T),xe=fe.zoneProps,ke={onDragEnter:e=>{if(!ve(e))return xe.onDragEnter?.(e);e.preventDefault(),ye.current+=1,be(!0)},onDragOver:e=>{if(!ve(e))return xe.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",ge||be(!0)},onDragLeave:e=>{if(!ve(e))return xe.onDragLeave?.(e);ye.current=Math.max(0,ye.current-1),0===ye.current&&be(!1)},onDrop:e=>{if(!ve(e))return xe.onDrop?.(e);e.preventDefault(),ye.current=0,be(!1);const r=e.dataTransfer.getData(T);r&&C(r)}},De=fe.dragOver||ge,we=()=>{se&&(k?k():fe.open())},Ne={width:$,height:$},je=null==G?null:new Set(G),Ke=!!J,Te=$<112,Ce=(e,r)=>{const t=e.kind?"video"===e.kind:i(e.url,F),a=e.name??o(e.url),n=Q&&(e.cover??0===r);/* @__PURE__ */
2
- return v("div",{...Ke?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},..._?{[m]:""}:{},"aria-selected":je?je.has(e.id):void 0,onClick:Ke?r=>{r.target.closest?.("button")||J(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey})}:void 0,onDoubleClick:X?()=>X(e.id):void 0,onContextMenu:Y?r=>Y(e.id,r):void 0,draggable:ce||me&&!!e.dragData||void 0,onDragStart:ce?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(r)),ie(r)}:me&&e.dragData?r=>{r.dataTransfer.effectAllowed="link",r.dataTransfer.setData(K,e.dragData)}:void 0,onDragEnd:ce?()=>ie(null):void 0,onDragOver:ce?e=>{null!=le&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ce?e=>{null!=le&&(e.preventDefault(),e.stopPropagation(),le!==r&&j(le,r),ie(null))}:void 0,tabIndex:ce||Ke?0:void 0,"aria-label":ce?ee.reorder(a,r+1,p.length):Ke?a:void 0,onKeyDown:Ke&&!ce?r=>{r.target!==r.currentTarget||"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),J(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey}))}:ce?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?r>0&&(e.preventDefault(),j(r,r-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||r<p.length-1&&(e.preventDefault(),j(r,r+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-gray-200 bg-gray-100",pe,le===r?"opacity-50":"",je?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ke?"cursor-pointer":""].join(" "),style:{...Ne,cursor:ce?"move":void 0},children:[t?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:O}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:O}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white",children:te}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-white",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
- /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-white p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Te?
1
+ import{FormField as e}from"./chunk-MVQBVPWP.js";import{zoneFocusClass as r,mediaPromptLine as t,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-DTSCO7VM.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-YDYDR72S.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{ColoredBadge as u}from"./chunk-BY2OWWKC.js";import{Icon as p}from"./chunk-KIBL6M3T.js";import{Tooltip as h}from"./chunk-22S6LG6D.js";import{useShellStrings as f}from"./chunk-E6UCGCOC.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function w({items:p,onPick:k,onFiles:w,onRemove:N,onReorder:j,dragType:C,dropType:K,onDropData:T,label:S,hint:I,error:L,required:O,className:P,accept:A="image/*",maxSizeBytes:F,maxFiles:M,fit:z="cover",thumbSize:$=96,placeholder:E,cta:B,acceptHint:W,showCover:H=!1,coverLabel:R,busy:Q=!1,busyLabel:V,progress:Y,disabled:q=!1,readOnly:G=!1,selected:U,onItemClick:J,onItemDoubleClick:X,onItemContextMenu:Z,menuOnMedia:_=!1}){const ee=f().media,re=B??ee.cta,te=R??ee.cover,ae=V??ee.uploading,ne=g(),[le,ie]=b(null),oe=q||Q,se=!(!k&&!w||oe||G),de=!!N&&!oe&&!G,ce=!!j&&!oe&&!G,me=!!C&&!q&&!ce,ue=!(!K||!T||oe||G),pe=r(oe),he=E??t(A,ee),fe=d({accept:A,maxSizeBytes:F,maxFiles:M,acceptHint:W,multiple:!0,disabled:!se,currentCount:p.length,onAccept:e=>{if(w)w(e);else for(const r of e)k(r)}}),[ge,be]=b(!1),ye=y(0),ve=e=>ue&&Array.from(e.dataTransfer?.types??[]).includes(K),xe=fe.zoneProps,ke={onDragEnter:e=>{if(!ve(e))return xe.onDragEnter?.(e);e.preventDefault(),ye.current+=1,be(!0)},onDragOver:e=>{if(!ve(e))return xe.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",ge||be(!0)},onDragLeave:e=>{if(!ve(e))return xe.onDragLeave?.(e);ye.current=Math.max(0,ye.current-1),0===ye.current&&be(!1)},onDrop:e=>{if(!ve(e))return xe.onDrop?.(e);e.preventDefault(),ye.current=0,be(!1);const r=e.dataTransfer.getData(K);r&&T(r)}},De=fe.dragOver||ge,we=()=>{se&&(k?k():fe.open())},Ne={width:$,height:$},je=null==U?null:new Set(U),Ce=!!J,Ke=$<112,Te=(e,r)=>{const t=e.kind?"video"===e.kind:i(e.url,A),a=e.name??o(e.url),n=H&&(e.cover??0===r);/* @__PURE__ */
2
+ return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},..._?{[m]:""}:{},"aria-selected":je?je.has(e.id):void 0,onClick:Ce?r=>{r.target.closest?.("button")||J(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey})}:void 0,onDoubleClick:X?()=>X(e.id):void 0,onContextMenu:Z?r=>Z(e.id,r):void 0,draggable:ce||me&&!!e.dragData||void 0,onDragStart:ce?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(r)),ie(r)}:me&&e.dragData?r=>{r.dataTransfer.effectAllowed="link",r.dataTransfer.setData(C,e.dragData)}:void 0,onDragEnd:ce?()=>ie(null):void 0,onDragOver:ce?e=>{null!=le&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ce?e=>{null!=le&&(e.preventDefault(),e.stopPropagation(),le!==r&&j(le,r),ie(null))}:void 0,tabIndex:ce||Ce?0:void 0,"aria-label":ce?ee.reorder(a,r+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ce?r=>{r.target!==r.currentTarget||"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),J(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey}))}:ce?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?r>0&&(e.preventDefault(),j(r,r-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||r<p.length-1&&(e.preventDefault(),j(r,r+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-gray-200 bg-gray-100",pe,le===r?"opacity-50":"",je?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...Ne,cursor:ce?"move":void 0},children:[t?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:z}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:z}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white",children:te}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-white",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
+ /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-white p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Ke?
4
4
  /* @__PURE__ */x(h,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${pe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
5
- /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),de&&/* @__PURE__ */x("button",{type:"button",onClick:()=>N(e.id),"aria-label":e.removeLabel??ee.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${pe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Pe=se&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":ee.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${pe}`,style:Ne,children:[
5
+ /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),de&&/* @__PURE__ */x("button",{type:"button",onClick:()=>N(e.id),"aria-label":e.removeLabel??ee.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${pe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Se=se&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":ee.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${pe}`,style:Ne,children:[
6
6
  /* @__PURE__ */x(a,{className:"h-5 w-5"}),
7
7
  /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:ee.add})]}),Ie=se?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:ee.upload,className:n(De,!1,pe),style:{minHeight:$+32},children:[
8
8
  /* @__PURE__ */x("span",{className:"text-gray-400",children:/* @__PURE__ */x(a,{})}),
9
9
  /* @__PURE__ */x("span",{className:"px-3 text-xs text-gray-500",children:he}),
10
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),B&&/* @__PURE__ */x("span",{className:"text-xs text-gray-400",children:B})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-3 text-xs text-gray-400",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:V?"invisible":void 0,children:ee.empty})});/* @__PURE__ */
11
- return v(e,{label:P,labelId:P?`${ne}-label`:void 0,htmlFor:ne,hint:I,error:L,required:A,className:M,children:[
12
- /* @__PURE__ */v("div",{id:ne,role:"group","aria-labelledby":P?`${ne}-label`:void 0,"aria-describedby":L?`${ne}-error`:I?`${ne}-hint`:void 0,"aria-busy":V||void 0,...fe.zoneProps,...ue?ke:{},className:"relative rounded-lg transition-colors",style:{...oe?{opacity:.6}:{},...De?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ke?
13
- /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!je||void 0,"aria-label":"string"==typeof P?P:ee.files,className:"contents",children:p.map(Ce)}):p.map(Ce),Pe]}),V&&/* @__PURE__ */x(l,{label:ae,progress:q})]}),!k&&w&&/* @__PURE__ */x("input",{...fe.inputProps}),
10
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),W&&/* @__PURE__ */x("span",{className:"text-xs text-gray-400",children:W})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-3 text-xs text-gray-400",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:Q?"invisible":void 0,children:ee.empty})});/* @__PURE__ */
11
+ return v(e,{label:S,labelId:S?`${ne}-label`:void 0,htmlFor:ne,hint:I,error:L,required:O,className:P,children:[
12
+ /* @__PURE__ */v("div",{id:ne,role:"group","aria-labelledby":S?`${ne}-label`:void 0,"aria-describedby":L?`${ne}-error`:I?`${ne}-hint`:void 0,"aria-busy":Q||void 0,...fe.zoneProps,...ue?ke:{},className:"relative rounded-lg transition-colors",style:{...oe?{opacity:.6}:{},...De?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
+ /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!je||void 0,"aria-label":"string"==typeof S?S:ee.files,className:"contents",children:p.map(Te)}):p.map(Te),Se]}),Q&&/* @__PURE__ */x(l,{label:ae,progress:Y})]}),!k&&w&&/* @__PURE__ */x("input",{...fe.inputProps}),
14
14
  /* @__PURE__ */x(c,{rejections:fe.rejections})]})}export{k as FULL_BADGE_TILE_PX,w as MediaUploadGrid};
@@ -1,11 +1,11 @@
1
- import{FormField as e}from"./chunk-MVQBVPWP.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-IMDLBXO3.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-JACPHDTK.js";import{useShellStrings as l}from"./chunk-VKMEQKYT.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=m(),P=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?`${M}-error`:N?`${M}-hint`:void 0;/* @__PURE__ */
2
- return o(e,{label:g,htmlFor:M,hint:N,error:j,required:k,className:v,children:[
3
- /* @__PURE__ */o("button",{ref:C,type:"button",id:M,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:[
1
+ import{FormField as e}from"./chunk-MVQBVPWP.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-DTSCO7VM.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-YDYDR72S.js";import{useShellStrings as l}from"./chunk-E6UCGCOC.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 O=m(),$=l().files,z=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))}),M=j?`${O}-error`:N?`${O}-hint`:void 0;/* @__PURE__ */
2
+ return o(e,{label:g,htmlFor:O,hint:N,error:j,required:k,className:v,children:[
3
+ /* @__PURE__ */o("button",{ref:C,type:"button",id:O,disabled:y,onClick:z.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":M,...z.zoneProps,className:t(z.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?P.chooseMany:P.chooseOne}),
6
- /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?P.dragMany:P.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:[
5
+ /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?$.chooseMany:$.chooseOne}),
6
+ /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?$.dragMany:$.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
+ /* @__PURE__ */d("input",{...z.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,P)}),
10
- /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{$.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":P.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};
9
+ /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,$)}),
10
+ /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{z.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":$.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:z.rejections})]})});export{p as FilePicker_default};
@@ -1,20 +1,20 @@
1
- import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-WBU7NZBP.js";import{TH_ONE_LINE as r,OneLineLabel as o}from"./chunk-6KO5VTL7.js";import{SpinnerRing as n}from"./chunk-Q5MD3VY6.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-VKMEQKYT.js";import{useState as a,useRef as i}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),g=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",f="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{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-M5P6A7KS.js";import{TH_ONE_LINE as r,OneLineLabel as o}from"./chunk-6KO5VTL7.js";import{SpinnerRing as n}from"./chunk-Q5MD3VY6.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-E6UCGCOC.js";import{useState as a,useRef as i}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),g=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",f="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:$=!1,size:S="md",minWidth:z,rowClassName:H,onRow:T,rowHref:I,onRowPress:D,linkAs:K,emptyText:L,selection:O,footer:P,virtualized:A,stackOnNarrow:E=!1,stackBelow:F,className:W=""}){const R=s(),V=L??R.table.empty,Q=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Y=E&&!A,Z=Y?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}]:[]}),G=e=>Y?{role:e}:{},J=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[U,q]=a(0),X=A?.overscan??6,_=A?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/A.rowHeight)-X);q(e=>e===t?e:t)}:void 0,ee=A?Math.ceil(A.height/A.rowHeight)+2*X:v.length,te=A?Math.min(U,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=A?te*A.rowHeight:0,ne=A?(v.length-re)*A.rowHeight:0,le=i(null),[se,ae]=a(0);l(()=>{if(!A)return;const e=le.current?.offsetHeight??0;ae(t=>t===e?t:e)});const ie=e=>e.sortField??e.key,ce=e=>N&&N.field===ie(e)?N.direction:null,de=Z.flatMap(e=>m(e)?e.columns:[e]),he=Z.some(m),ue=/* @__PURE__ */new Map;if(Y)for(const e of Z)if(m(e))for(const t of e.columns)ue.set(t,J(e.title,e.label));const me=e=>{const t=J(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},ge=new Set(O?.selected??[]),fe=O?v.map((e,t)=>Q(e,t)):[],pe=fe.length>0&&fe.every(e=>ge.has(e)),ye=fe.some(e=>ge.has(e)),be=O?36:0,we=de.length+(O?1:0),xe=de.some(e=>"left"===e.fixed),ve=Y&&!O&&de.some(e=>e.cardCorner),ke=K??"a",Ne=`${p[S]} ${"sm"===S?"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,n,l=0)=>{const s=ce(e),a=y[e.align??(e.numeric?"right":"left")],i="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
5
- return h("th",{scope:"col",...G("columnheader"),rowSpan:n>1?n:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...i?{left:(Be[t]??0)+be}:{},...A?{top:l}:{}},className:[Ne,a,r,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs",i?A?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":A?"sticky z-10 bg-gray-50":"",Y&&d?"rosh-dt-sort":"",Y?g(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ie(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":Y?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-gray-700 ${a}`,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:z,rowClassName:H,onRow:T,rowHref:I,onRowPress:O,linkAs:A,emptyText:D,selection:L,footer:P,virtualized:E,stackOnNarrow:F=!1,stackBelow:K,className:R=""}){const W=s(),G=D??W.table.empty,V=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),J=F&&!E,Q=J?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}]:[]}),U=e=>J?{role:e}:{},Y=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[Z,q]=a(0),X=E?.overscan??6,_=E?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/E.rowHeight)-X);q(e=>e===t?e:t)}:void 0,ee=E?Math.ceil(E.height/E.rowHeight)+2*X:v.length,te=E?Math.min(Z,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=E?te*E.rowHeight:0,ne=E?(v.length-re)*E.rowHeight:0,le=i(null),[se,ae]=a(0);l(()=>{if(!E)return;const e=le.current?.offsetHeight??0;ae(t=>t===e?t:e)});const ie=e=>e.sortField??e.key,ce=e=>N&&N.field===ie(e)?N.direction:null,de=Q.flatMap(e=>m(e)?e.columns:[e]),he=Q.some(m),ue=/* @__PURE__ */new Map;if(J)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},ge=new Set(L?.selected??[]),fe=L?v.map((e,t)=>V(e,t)):[],pe=fe.length>0&&fe.every(e=>ge.has(e)),ye=fe.some(e=>ge.has(e)),be=L?36:0,we=de.length+(L?1:0),xe=de.some(e=>"left"===e.fixed),ve=J&&!L&&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,n,l=0)=>{const s=ce(e),a=y[e.align??(e.numeric?"right":"left")],i="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
5
+ return h("th",{scope:"col",...U("columnheader"),rowSpan:n>1?n:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...i?{left:(Be[t]??0)+be}:{},...E?{top:l}:{}},className:[Ne,a,r,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs",i?E?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":E?"sticky z-10 bg-gray-50":"",J&&d?"rosh-dt-sort":"",J?g(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ie(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":J?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-gray-700 ${a}`,children:[
6
6
  /* @__PURE__ */h(o,{children:e.title}),
7
- /* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(o,{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}),$e=/* @__PURE__ */c(d,{children:[
8
- /* @__PURE__ */c("div",{onScroll:_,style:A?{maxHeight:A.height}:void 0,className:`relative overflow-x-auto ${A?"overflow-y-auto":""} ${$?"rounded-lg border border-gray-200":""}${Y?" rosh-dt-scroll":""}`.trim(),children:[B&&
7
+ /* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(o,{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:E?{maxHeight:E.height}:void 0,className:`relative overflow-x-auto ${E?"overflow-y-auto":""} ${S?"rounded-lg border border-gray-200":""}${J?" 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(n,{className:"h-6 w-6"}),
11
- /* @__PURE__ */h("span",{className:"sr-only",children:R.table.loading})]}),
12
- /* @__PURE__ */c("table",{...G("table"),className:(Y?"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",{...G("rowgroup"),className:Y?"rosh-dt-head":void 0,children:[
14
- /* @__PURE__ */c("tr",{ref:le,...G("row"),className:"border-b border-gray-200 bg-gray-50",children:[O&&/* @__PURE__ */h("th",{scope:"col",...G("columnheader"),rowSpan:he?2:void 0,style:{width:36,...A?{top:0}:{}},className:[Ne,r,xe||A?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Y?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":R.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!O)return;const e=new Set(fe);O.onChange(pe?O.selected.filter(t=>!e.has(t)):[...O.selected,...fe.filter(e=>!ge.has(e))])}})}),Z.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...G("columnheader"),colSpan:e.columns.length,style:A?{top:0}:void 0,className:[Ne,"text-center",r,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs","border-b border-gray-200",A?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(o,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...G("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",{...G("rowgroup"),className:Y?"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((t,r)=>{const o=te+r,n=T?.(t,o),l=!!n?.current,s=I?.(t,o),a=void 0===s&&D?()=>D(t,o):void 0,i=void 0!==s||void 0!==a;let d=!1;const m=(e,t)=>{if(d=!0,!i)return e;const r=[f,a?"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:a,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(i&&!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),...G("row"),style:A?{height:A.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!i?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Y?O?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Y&&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)]":"",i?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[O&&(()=>{const r=Q(t,o);/* @__PURE__ */
17
- return h("td",{...G("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Y?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":R.table.selectRow,checked:ge.has(r),onChange:()=>(e=>{O&&O.onChange(ge.has(e)?O.selected.filter(t=>t!==e):[...O.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Y&&!n&&"wide"!==e.only;/* @__PURE__ */
18
- return h("td",{...G("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":"",Y?g(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Y?"":w(e),"text-gray-900",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Y?
19
- /* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},Q(t,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",{...G("row"),className:Y?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...G("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:V})})})]}),P]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Y?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
20
- return h("div",Y?void 0!==F&&F>0&&40!==F?{className:`rosh-dt-at ${W}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/F*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:F/40*100+"%"},children:$e})})}:{className:`rosh-dt-stack ${W}`.trim(),children:$e}:{className:W,children:$e})}export{x as DataTable};
11
+ /* @__PURE__ */h("span",{className:"sr-only",children:W.table.loading})]}),
12
+ /* @__PURE__ */c("table",{...U("table"),className:(J?"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",{...U("rowgroup"),className:J?"rosh-dt-head":void 0,children:[
14
+ /* @__PURE__ */c("tr",{ref:le,...U("row"),className:"border-b border-gray-200 bg-gray-50",children:[L&&/* @__PURE__ */h("th",{scope:"col",...U("columnheader"),rowSpan:he?2:void 0,style:{width:36,...E?{top:0}:{}},className:[Ne,r,xe||E?"sticky z-20 bg-gray-50":"",xe?"left-0":"",J?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":W.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!L)return;const e=new Set(fe);L.onChange(pe?L.selected.filter(t=>!e.has(t)):[...L.selected,...fe.filter(e=>!ge.has(e))])}})}),Q.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...U("columnheader"),colSpan:e.columns.length,style:E?{top:0}:void 0,className:[Ne,"text-center",r,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs","border-b border-gray-200",E?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(o,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...U("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",{...U("rowgroup"),className:J?"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((t,r)=>{const o=te+r,n=T?.(t,o),l=!!n?.current,s=I?.(t,o),a=void 0===s&&O?()=>O(t,o):void 0,i=void 0!==s||void 0!==a;let d=!1;const m=(e,t)=>{if(d=!0,!i)return e;const r=[f,a?"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:a,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(i&&!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),...U("row"),style:E?{height:E.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!i?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[J?L?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",J&&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)]":"",i?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[L&&(()=>{const r=V(t,o);/* @__PURE__ */
17
+ return h("td",{...U("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",J?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":W.table.selectRow,checked:ge.has(r),onChange:()=>(e=>{L&&L.onChange(ge.has(e)?L.selected.filter(t=>t!==e):[...L.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=J&&!n&&"wide"!==e.only;/* @__PURE__ */
18
+ return h("td",{...U("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":"",J?g(e):"",Ne,y[e.align??(e.numeric?"right":"left")],J?"":w(e),"text-gray-900",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:J?
19
+ /* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},V(t,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",{...U("row"),className:J?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...U("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:G})})})]}),P]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:J?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
20
+ return h("div",J?void 0!==K&&K>0&&40!==K?{className:`rosh-dt-at ${R}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/K*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:K/40*100+"%"},children:Se})})}:{className:`rosh-dt-stack ${R}`.trim(),children:Se}:{className:R,children:Se})}export{x as DataTable};
@@ -1,4 +1,4 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-B73YLHD2.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-YPXVOPL4.js";import{Icon as o}from"./chunk-KIBL6M3T.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-VKMEQKYT.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=i().aboutApp,b=g.title(n.name);if(e(b,N,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,Y]=a(g.partOf);/* @__PURE__ */
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-SG2MTCA2.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-6CRERVSV.js";import{Icon as o}from"./chunk-KIBL6M3T.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-E6UCGCOC.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=i().aboutApp,b=g.title(n.name);if(e(b,N,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,C]=a(g.partOf);/* @__PURE__ */
2
2
  return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
4
4
  /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:n.name}),
@@ -6,4 +6,4 @@ return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1
6
6
  /* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:g[o]}),
7
7
  /* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
8
  /* @__PURE__ */h("p",{className:"text-2xs text-gray-500",children:[j,
9
- /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),Y]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-gray-400",children:g.shellVersion(s)})]})]})})}export{w as AboutApp,f as BUILTIN_APP_INFO};
9
+ /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),C]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-gray-400",children:g.shellVersion(s)})]})]})})}export{w as AboutApp,f as BUILTIN_APP_INFO};