efficient-shell 13.21.0 → 13.22.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 (319) hide show
  1. package/README.md +13 -0
  2. package/dist/{Browser-AE7OYSTS.js → Browser-ZNJ3OZSE.js} +13 -13
  3. package/dist/Calculator-BPQPQUZN.js +29 -0
  4. package/dist/CurrencyConverter-M4UJI6VQ.js +21 -0
  5. package/dist/{Files-Y5UGT3RX.js → Files-4HACSJ7C.js} +77 -77
  6. package/dist/Notepad-SK2E5VOK.js +24 -0
  7. package/dist/{PdfViewer-EELX35ZI.js → PdfViewer-FWGHFO4N.js} +1 -1
  8. package/dist/{PomodoroTimer-6XHLOAJD.js → PomodoroTimer-BR5NOA24.js} +48 -48
  9. package/dist/{Preview-XQXSRAGY.js → Preview-CLV2ZAU5.js} +26 -26
  10. package/dist/Sidebar-MY66ILZY.js +44 -0
  11. package/dist/{Stock-36O4LW46.js → Stock-LZ2QHPU4.js} +3 -3
  12. package/dist/{Weather-BN6AJJ4S.js → Weather-Q22ZW7ZQ.js} +20 -20
  13. package/dist/{WorldClock-TUVIRPTM.js → WorldClock-4MSSRLC7.js} +6 -6
  14. package/dist/ai/index.js +118 -118
  15. package/dist/apps/ImageAnnotator.js +1 -1
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/browser-check.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.js +1 -1
  29. package/dist/charts/FunnelChart.js +1 -1
  30. package/dist/charts/HeatmapChart.js +1 -1
  31. package/dist/charts/HistogramChart.js +1 -1
  32. package/dist/charts/Meter.js +1 -1
  33. package/dist/charts/PieChart.js +1 -1
  34. package/dist/charts/RadarChart.js +1 -1
  35. package/dist/charts/RadialBarChart.js +1 -1
  36. package/dist/charts/RangeChart.js +1 -1
  37. package/dist/charts/RankedBars.js +1 -1
  38. package/dist/charts/SankeyChart.js +1 -1
  39. package/dist/charts/ScatterChart.js +1 -1
  40. package/dist/charts/SpecChart.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-23YQNCZ4.js +23 -0
  47. package/dist/chunk-2AEYVQ2R.js +2 -0
  48. package/dist/{chunk-MVOYVN3S.js → chunk-2YHS5E27.js} +1 -1
  49. package/dist/{chunk-X4E4RPFE.js → chunk-2YUAR2EH.js} +5 -5
  50. package/dist/{chunk-MUNP5Z24.js → chunk-3AMCLA5Q.js} +1 -1
  51. package/dist/{chunk-PPLPDP6D.js → chunk-3AUN7JSM.js} +1 -1
  52. package/dist/{chunk-FDDM7VMQ.js → chunk-3BQMICGG.js} +1 -1
  53. package/dist/{chunk-NILGK2KJ.js → chunk-3EYJ4G7L.js} +1 -1
  54. package/dist/{chunk-FXSGIT53.js → chunk-3GJVTK4H.js} +8 -8
  55. package/dist/chunk-3SIHJWR2.js +28 -0
  56. package/dist/chunk-3SKXWFGG.js +15 -0
  57. package/dist/{chunk-XD3M5ZXM.js → chunk-3TD3GH53.js} +6 -6
  58. package/dist/{chunk-4U5M37SF.js → chunk-4PJFL26P.js} +1 -1
  59. package/dist/{chunk-NA4XPE7S.js → chunk-53HHYEN4.js} +3 -3
  60. package/dist/{chunk-OF5X4HKC.js → chunk-5JUXMNUC.js} +1 -1
  61. package/dist/{chunk-TB2ARUE2.js → chunk-5OHFBS2B.js} +1 -1
  62. package/dist/chunk-5ZOYYL46.js +4 -0
  63. package/dist/{chunk-TPKNHQIE.js → chunk-66NJCU4W.js} +8 -8
  64. package/dist/{chunk-BCQSNK2Z.js → chunk-6CFI4YGI.js} +4 -4
  65. package/dist/{chunk-LKAGXURQ.js → chunk-6MFKKTCE.js} +17 -17
  66. package/dist/{chunk-QNWC3RWK.js → chunk-6NXPOZ6X.js} +1 -1
  67. package/dist/{chunk-F4VILY3O.js → chunk-72UHB4JU.js} +1 -1
  68. package/dist/{chunk-7I5RJPY7.js → chunk-7AVPMO4F.js} +1 -1
  69. package/dist/{chunk-KYQKMBSY.js → chunk-7B6JPNOD.js} +5 -5
  70. package/dist/{chunk-JB4WXBJB.js → chunk-7G5HKAGV.js} +5 -5
  71. package/dist/{chunk-SUSJFGXN.js → chunk-7N42VDGT.js} +9 -9
  72. package/dist/{chunk-J4CVYOY3.js → chunk-7N6CVTWO.js} +10 -10
  73. package/dist/{chunk-YCXQDUTW.js → chunk-7PAZO65L.js} +6 -6
  74. package/dist/{chunk-4G7PJ325.js → chunk-A5FC4LR7.js} +1 -1
  75. package/dist/{chunk-G5UGCAWN.js → chunk-A6TOHNJY.js} +1 -1
  76. package/dist/{chunk-HPZLV3KD.js → chunk-AFYLMXOJ.js} +5 -5
  77. package/dist/{chunk-XAT2MKNU.js → chunk-AH2NEKEN.js} +4 -4
  78. package/dist/{chunk-G7SILKUY.js → chunk-AQVPWUJ3.js} +5 -5
  79. package/dist/{chunk-63E4ZZYI.js → chunk-BEXFMSNK.js} +2 -2
  80. package/dist/{chunk-HOROMBJB.js → chunk-BL347U3N.js} +6 -6
  81. package/dist/{chunk-SOXZRLSD.js → chunk-BUMY4LIP.js} +3 -3
  82. package/dist/{chunk-OUYGLDQN.js → chunk-BUUAALHH.js} +7 -7
  83. package/dist/{chunk-7CBWSLCW.js → chunk-C7Z3ZMJH.js} +12 -12
  84. package/dist/{chunk-SF4IIV5Z.js → chunk-CJQPC2P3.js} +2 -2
  85. package/dist/{chunk-5POQCJL6.js → chunk-CUJ537IY.js} +4 -4
  86. package/dist/{chunk-E7BQZL7X.js → chunk-D4432YRW.js} +1 -1
  87. package/dist/{chunk-RDVC32EV.js → chunk-D5HFWOW7.js} +16 -16
  88. package/dist/{chunk-GEITUFYK.js → chunk-D5PXRJHA.js} +19 -19
  89. package/dist/{chunk-VRJKV44O.js → chunk-DAUE6ULT.js} +1 -1
  90. package/dist/chunk-DEE6FKE7.js +92 -0
  91. package/dist/{chunk-YWMCW5BN.js → chunk-DTRJLQWO.js} +1 -1
  92. package/dist/{chunk-WJMPTW3G.js → chunk-DV6TUXCZ.js} +1 -1
  93. package/dist/{chunk-23LK4PLJ.js → chunk-E4GF7M4S.js} +8 -8
  94. package/dist/chunk-EJJTDUN3.js +22 -0
  95. package/dist/{chunk-RA2UNNJC.js → chunk-F3EBYHIE.js} +10 -10
  96. package/dist/chunk-FBI3XJWH.js +11 -0
  97. package/dist/{chunk-WJTNQ7YD.js → chunk-FE7H6RXE.js} +2 -2
  98. package/dist/{chunk-YQ5JHHLE.js → chunk-FMBUR4EU.js} +1 -1
  99. package/dist/{chunk-IOLUF3UL.js → chunk-GKYGPCGL.js} +1 -1
  100. package/dist/{chunk-Q4MOT7TY.js → chunk-GPU7LLTJ.js} +1 -1
  101. package/dist/{chunk-ZCGT5YNR.js → chunk-GRAFJD3L.js} +1 -1
  102. package/dist/{chunk-L4ZQY4ZG.js → chunk-GZRNOIEE.js} +3 -3
  103. package/dist/{chunk-VQ35LXDC.js → chunk-I2NVBDKH.js} +1 -1
  104. package/dist/{chunk-EZYXY67W.js → chunk-IJG4UEKF.js} +8 -8
  105. package/dist/{chunk-3SIRRK3F.js → chunk-J5OAQAAD.js} +4 -4
  106. package/dist/{chunk-SZFULV7I.js → chunk-J5W63XNR.js} +6 -6
  107. package/dist/{chunk-GNRH43N3.js → chunk-JJYTN72U.js} +2 -2
  108. package/dist/{chunk-HMOKKMIV.js → chunk-JLSXDYS4.js} +2 -2
  109. package/dist/{chunk-EFVQQF6F.js → chunk-JXJNQHPY.js} +19 -19
  110. package/dist/{chunk-HPHDLN6E.js → chunk-JYR4V4AG.js} +2 -2
  111. package/dist/{chunk-EG5MU7XL.js → chunk-JZ43635V.js} +1 -1
  112. package/dist/{chunk-KQCJWK55.js → chunk-KC2EQCBE.js} +6 -6
  113. package/dist/chunk-KUPN5WRE.js +1 -0
  114. package/dist/{chunk-P52LXNUU.js → chunk-L744YF4X.js} +1 -1
  115. package/dist/{chunk-SXHV5OLA.js → chunk-LC2UF3AA.js} +1 -1
  116. package/dist/{chunk-GUSENWAH.js → chunk-LLDGRPLF.js} +1 -1
  117. package/dist/{chunk-KNZ7YTFH.js → chunk-LLSGIMLG.js} +1 -1
  118. package/dist/{chunk-JPSWWIBW.js → chunk-LQIHBIXG.js} +6 -6
  119. package/dist/{chunk-UC5IC3AM.js → chunk-LRMDLZMM.js} +9 -9
  120. package/dist/{chunk-SHHRC5XK.js → chunk-LUARJHUK.js} +9 -9
  121. package/dist/chunk-M36B3M2H.js +8 -0
  122. package/dist/{chunk-2J3C2RR4.js → chunk-M3HTP2N6.js} +6 -6
  123. package/dist/{chunk-BZRFD4DK.js → chunk-M4REKOGO.js} +1 -1
  124. package/dist/{chunk-ZNV75GAG.js → chunk-MEFB2KGF.js} +1 -1
  125. package/dist/{chunk-U2ZTHOQL.js → chunk-MMA3WTF2.js} +4 -4
  126. package/dist/chunk-MRZLFZNJ.js +6 -0
  127. package/dist/chunk-N64YAF5N.js +2 -0
  128. package/dist/chunk-N6PMH6DU.js +6 -0
  129. package/dist/chunk-NRHG4R2Q.js +1 -0
  130. package/dist/{chunk-G2JPTPRS.js → chunk-OFMZ6JM6.js} +13 -13
  131. package/dist/chunk-ONWFKCMB.js +14 -0
  132. package/dist/{chunk-XWJT6TFU.js → chunk-OSMRYND3.js} +1 -1
  133. package/dist/{chunk-6OCA7RKQ.js → chunk-P234FPKJ.js} +1 -1
  134. package/dist/{chunk-IUQJGFEO.js → chunk-P3JPSO3E.js} +8 -8
  135. package/dist/{chunk-ZVDYRXNP.js → chunk-P4VOUPRF.js} +6 -6
  136. package/dist/{chunk-ENDYHUUR.js → chunk-P73ZJ6QR.js} +1 -1
  137. package/dist/{chunk-5HFKVEWW.js → chunk-PFOTEDSQ.js} +1 -1
  138. package/dist/{chunk-H75CQD46.js → chunk-PHYHKDSW.js} +1 -1
  139. package/dist/{chunk-FBS55WOX.js → chunk-PLESHI3E.js} +7 -7
  140. package/dist/{chunk-42DF7CDB.js → chunk-PPI4WJ3V.js} +7 -7
  141. package/dist/{chunk-M2TQOJ3G.js → chunk-PSVGB7KT.js} +1 -1
  142. package/dist/{chunk-223XYIIH.js → chunk-Q2RNFBYS.js} +1 -1
  143. package/dist/{chunk-6OGX7V7L.js → chunk-Q36KB5RQ.js} +7 -7
  144. package/dist/{chunk-WPGSU4QG.js → chunk-Q7CM4UDG.js} +2 -2
  145. package/dist/{chunk-BVX7LUAW.js → chunk-QJUMBOL2.js} +6 -6
  146. package/dist/{chunk-25T4YQO7.js → chunk-QPVYBN4J.js} +2 -2
  147. package/dist/{chunk-FUPU7Z2G.js → chunk-QRPPWLKU.js} +7 -7
  148. package/dist/{chunk-7SVSHJOO.js → chunk-QZ2XRFDP.js} +6 -6
  149. package/dist/{chunk-IE6TRMIW.js → chunk-R3BSWWGB.js} +1 -1
  150. package/dist/{chunk-CCLK2RPQ.js → chunk-R7CYBBJY.js} +13 -13
  151. package/dist/{chunk-FFRJ6QZK.js → chunk-RB3BMRNA.js} +1 -1
  152. package/dist/{chunk-FZYUTZEV.js → chunk-RFWBNKKB.js} +10 -10
  153. package/dist/{chunk-S25KELFW.js → chunk-RKSCB5BJ.js} +5 -5
  154. package/dist/{chunk-F3E3CEZM.js → chunk-RM2I6DIF.js} +1 -1
  155. package/dist/{chunk-QBMMORYP.js → chunk-ROYHU3E5.js} +1 -1
  156. package/dist/chunk-S4RD6UJU.js +8 -0
  157. package/dist/{chunk-RDETBXMP.js → chunk-SAHRIE35.js} +1 -1
  158. package/dist/{chunk-MOKABQCY.js → chunk-SAMPXZF3.js} +3 -3
  159. package/dist/{chunk-W2TPXKCV.js → chunk-SCNQK5NF.js} +1 -1
  160. package/dist/{chunk-ABTVRB23.js → chunk-SKVLTYGN.js} +1 -1
  161. package/dist/{chunk-SM3N5UJ2.js → chunk-TDUOBP55.js} +9 -9
  162. package/dist/{chunk-BG3C4ALM.js → chunk-TJ5YMXVB.js} +1 -1
  163. package/dist/{chunk-VFSAJMNX.js → chunk-TNGIXSTM.js} +1 -1
  164. package/dist/{chunk-BNPWUCZX.js → chunk-TSCJG6UM.js} +1 -1
  165. package/dist/{chunk-ETQ45TBW.js → chunk-TTYTOLVV.js} +1 -1
  166. package/dist/{chunk-DO3DSSAW.js → chunk-U73K3ICC.js} +1 -1
  167. package/dist/{chunk-FRCTA5FS.js → chunk-UAXL44HH.js} +1 -1
  168. package/dist/{chunk-CWVQH2SP.js → chunk-UDJPSHVI.js} +1 -1
  169. package/dist/{chunk-L2WBCXG7.js → chunk-UFJR63AO.js} +1 -1
  170. package/dist/{chunk-YT5HMLC7.js → chunk-UJY5RUZ5.js} +1 -1
  171. package/dist/{chunk-R6GXVLY7.js → chunk-UMIRPFQJ.js} +1 -1
  172. package/dist/{chunk-WRV6QKJN.js → chunk-UVPDEGIA.js} +1 -1
  173. package/dist/{chunk-KEVJBI5Q.js → chunk-VTCMO3K7.js} +1 -1
  174. package/dist/{chunk-2TXQCA4C.js → chunk-W24THMLI.js} +8 -8
  175. package/dist/{chunk-VXSYHTBP.js → chunk-W3454ZES.js} +1 -1
  176. package/dist/{chunk-EFO72DEI.js → chunk-WCAABJEV.js} +1 -1
  177. package/dist/{chunk-OZ4R6U2M.js → chunk-WREUA43Q.js} +1 -1
  178. package/dist/{chunk-ELPW25CA.js → chunk-XX34ZFYB.js} +4 -4
  179. package/dist/chunk-XYQFTFI7.js +24 -0
  180. package/dist/{chunk-UFX7F3KG.js → chunk-XYVFJLAU.js} +1 -1
  181. package/dist/{chunk-A7VNKVZO.js → chunk-XYXCZIJY.js} +4 -4
  182. package/dist/{chunk-ZCN5BU4U.js → chunk-YBE66FBR.js} +1 -1
  183. package/dist/{chunk-6QH7I2V5.js → chunk-Z6J4KXY3.js} +2 -2
  184. package/dist/{chunk-NY6MLFBX.js → chunk-ZBGPAUOH.js} +5 -5
  185. package/dist/{chunk-LADP6AJY.js → chunk-ZFWCTHR4.js} +7 -7
  186. package/dist/{chunk-ORV2AVIJ.js → chunk-ZRWZHWKI.js} +2 -2
  187. package/dist/data/DataTable.js +1 -1
  188. package/dist/data/EntityList.js +1 -1
  189. package/dist/data/Gantt.js +1 -1
  190. package/dist/data/Kanban.js +1 -1
  191. package/dist/data/ListFooter.js +1 -1
  192. package/dist/data/ListLoadError.js +1 -1
  193. package/dist/data/Pagination.js +1 -1
  194. package/dist/data/ResizableTable.js +1 -1
  195. package/dist/file-intake/index.js +1 -1
  196. package/dist/forms/BorderInput.js +1 -1
  197. package/dist/forms/BrandAssetEditor.js +1 -1
  198. package/dist/forms/Calendar.js +1 -1
  199. package/dist/forms/ColorPicker.js +1 -1
  200. package/dist/forms/ComposerAttachments.js +1 -1
  201. package/dist/forms/CornersInput.js +1 -1
  202. package/dist/forms/DatePicker.js +1 -1
  203. package/dist/forms/DateRangePicker.js +1 -1
  204. package/dist/forms/DateTimePicker.js +1 -1
  205. package/dist/forms/DisplayChips.js +1 -1
  206. package/dist/forms/FilePicker.js +1 -1
  207. package/dist/forms/FormErrorSummary.js +1 -1
  208. package/dist/forms/IconPicker.js +1 -1
  209. package/dist/forms/ImageFocusPoint.js +1 -1
  210. package/dist/forms/Input.js +1 -1
  211. package/dist/forms/InputNumber.js +1 -1
  212. package/dist/forms/LinkPicker.js +1 -1
  213. package/dist/forms/MediaLibrary.js +1 -1
  214. package/dist/forms/MediaUploadField.js +1 -1
  215. package/dist/forms/MediaUploadGrid.js +1 -1
  216. package/dist/forms/MediaUsedInList.js +1 -1
  217. package/dist/forms/NumericKeypad.js +1 -1
  218. package/dist/forms/PositionInput.js +1 -1
  219. package/dist/forms/RenameField.js +1 -1
  220. package/dist/forms/Select.js +1 -1
  221. package/dist/forms/SidesInput.js +1 -1
  222. package/dist/forms/Slider.js +1 -1
  223. package/dist/forms/Snippet.js +1 -1
  224. package/dist/forms/TagInput.js +1 -1
  225. package/dist/forms/TextToolbar.js +1 -1
  226. package/dist/forms/TimePicker.js +1 -1
  227. package/dist/forms/WidthsBar.js +1 -1
  228. package/dist/forms/mediaLibraryMenu.js +1 -1
  229. package/dist/forms/mediaMoveItems.js +1 -1
  230. package/dist/forms/textAlign.js +1 -1
  231. package/dist/forms/useFileIntake.js +1 -1
  232. package/dist/icons/index.js +1 -1
  233. package/dist/index.d.ts +24 -2
  234. package/dist/index.js +506 -506
  235. package/dist/locales/zh-Hans.js +1 -1
  236. package/dist/map/index.js +3 -3
  237. package/dist/model-viewer/index.js +3 -3
  238. package/dist/page-tabs/index.js +5 -5
  239. package/dist/pdf/index.js +1 -1
  240. package/dist/shell/Accordion.js +1 -1
  241. package/dist/shell/AppUpdateBanner.js +1 -1
  242. package/dist/shell/Avatar.js +1 -1
  243. package/dist/shell/Banner.js +1 -1
  244. package/dist/shell/Breadcrumbs.js +1 -1
  245. package/dist/shell/BudgetBar.js +1 -1
  246. package/dist/shell/Card.js +1 -1
  247. package/dist/shell/ColoredBadge.js +1 -1
  248. package/dist/shell/ConfirmDialog.js +1 -1
  249. package/dist/shell/ContainerFillChart.js +1 -1
  250. package/dist/shell/CountBadge.js +1 -1
  251. package/dist/shell/Dialog.js +1 -1
  252. package/dist/shell/Drawer.js +1 -1
  253. package/dist/shell/EditableGrid.js +1 -1
  254. package/dist/shell/EmptyState.js +1 -1
  255. package/dist/shell/GlobalSearch.js +1 -1
  256. package/dist/shell/HelpCenter.js +1 -1
  257. package/dist/shell/IconRail.js +1 -1
  258. package/dist/shell/ImageLightbox.js +1 -1
  259. package/dist/shell/ItemCount.js +1 -1
  260. package/dist/shell/LanguageSelect.js +1 -1
  261. package/dist/shell/Markdown.js +1 -1
  262. package/dist/shell/MetricBar.js +1 -1
  263. package/dist/shell/MetricBarLegend.js +1 -1
  264. package/dist/shell/MilestoneTimeline.js +1 -1
  265. package/dist/shell/PageHeader.js +1 -1
  266. package/dist/shell/ProductionTimeline.js +1 -1
  267. package/dist/shell/ResizeHandle.js +1 -1
  268. package/dist/shell/Result.js +1 -1
  269. package/dist/shell/SearchableSelect.js +1 -1
  270. package/dist/shell/SettingReset.js +1 -1
  271. package/dist/shell/SettingRow.js +1 -1
  272. package/dist/shell/SidebarLayout.js +1 -1
  273. package/dist/shell/SidebarNav.js +1 -1
  274. package/dist/shell/SortableList.js +1 -1
  275. package/dist/shell/Statistic.js +1 -1
  276. package/dist/shell/TimeAgo.js +1 -1
  277. package/dist/shell/TimelineTrack.js +1 -1
  278. package/dist/shell/TransferProgress.js +1 -1
  279. package/dist/shell/Tree.js +1 -1
  280. package/dist/shell/discardGuard.js +1 -1
  281. package/dist/shell/language.js +1 -1
  282. package/dist/shell/strings.d.ts +3 -0
  283. package/dist/shell/strings.js +1 -1
  284. package/dist/shell/toast.js +1 -1
  285. package/dist/telemetry/index.js +1 -1
  286. package/dist/templates/AuthScreen.js +1 -1
  287. package/dist/templates/ChatTemplate.js +1 -1
  288. package/dist/templates/CheckoutTemplate.js +1 -1
  289. package/dist/templates/DashboardTemplate.js +1 -1
  290. package/dist/templates/DataTablePage.js +1 -1
  291. package/dist/templates/EmailTemplate.js +1 -1
  292. package/dist/templates/ErrorBoundary.js +1 -1
  293. package/dist/templates/ErrorPage.js +1 -1
  294. package/dist/templates/FormLayoutPage.js +1 -1
  295. package/dist/templates/GalleryTemplate.js +1 -1
  296. package/dist/ui/index.js +1 -1
  297. package/dist/version.js +1 -1
  298. package/package.json +1 -1
  299. package/dist/Calculator-QEQU3W2L.js +0 -29
  300. package/dist/CurrencyConverter-L22FF4ST.js +0 -21
  301. package/dist/Notepad-YZOEXYE3.js +0 -24
  302. package/dist/Sidebar-UCCVJFSY.js +0 -44
  303. package/dist/chunk-ABPVCVCT.js +0 -22
  304. package/dist/chunk-BWQHABH7.js +0 -4
  305. package/dist/chunk-CILE3ZCC.js +0 -2
  306. package/dist/chunk-D4WO73XD.js +0 -91
  307. package/dist/chunk-FMLUQCFB.js +0 -2
  308. package/dist/chunk-GMLOMLCS.js +0 -24
  309. package/dist/chunk-HC5KQZFG.js +0 -8
  310. package/dist/chunk-IUVGHHR3.js +0 -1
  311. package/dist/chunk-JPE4TYRQ.js +0 -14
  312. package/dist/chunk-KGAYYSFE.js +0 -6
  313. package/dist/chunk-LQCNIQ3I.js +0 -8
  314. package/dist/chunk-LZOKBMAF.js +0 -1
  315. package/dist/chunk-OXWBSZL2.js +0 -23
  316. package/dist/chunk-PBSCF2ML.js +0 -15
  317. package/dist/chunk-QNXTVDIC.js +0 -11
  318. package/dist/chunk-UTQN5AIO.js +0 -6
  319. package/dist/chunk-XXTAMF3O.js +0 -28
@@ -1,2 +1,2 @@
1
- import{userToday as t}from"./chunk-NHKT5IH6.js";import{useShellPrefs as e}from"./chunk-DPFEQQQU.js";import{toast_default as n}from"./chunk-VQ35LXDC.js";import{useSyncExternalStore as o,useCallback as a,useMemo as r}from"react";var i=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],c=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}];function l(e=/* @__PURE__ */new Date){return t(e)??""}function s(t=/* @__PURE__ */new Date){return`pomodoro-day-${l(t)}`}var u={focus:1500,short:300,long:900},d="bell",f=100,m=1,h="none",g=50,p={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},k={running:!1,remaining:u.focus,mode:"focus",total:u.focus,streak:0,count:"undefined"!=typeof localStorage?function(t=/* @__PURE__ */new Date){const e=l(t);if(!e)return 0;try{const n=localStorage.getItem(s(t)),o=null===n?localStorage.getItem(`pomodoro-${e}`):null;return parseInt(n??o??"0",10)||0}catch{return 0}}():0},w=null,M=/* @__PURE__ */new Set,S=t=>{k={...k,...t},M.forEach(t=>t())};function b(){return k}function y(t){return M.add(t),()=>{M.delete(t)}}function v(t){u=t,k.running||k.remaining!==k.total||S({remaining:t[k.mode],total:t[k.mode]})}function T(t){d=t}function A(t,e){f=Math.max(0,Math.min(100,Math.round(t))),m=Math.max(1,Math.min(5,Math.round(e)))}function I(t){p={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function x(t,e){h=t,g=Math.max(0,Math.min(100,Math.round(e))),k.running&&"focus"===k.mode?(V(),R()):"none"!==t&&0!==g||V()}function B(){k.running||(S({running:!0}),w=setInterval(N,1e3),"focus"===k.mode&&R())}function C(){(k.running||null!==w)&&(null!==w&&(clearInterval(w),w=null),S({running:!1}),V())}function D(t){C(),S({mode:t,remaining:u[t],total:u[t]})}function N(){k.remaining<=1?function(){null!==w&&(clearInterval(w),w=null);V(),P(d,{volume:f,repeat:m});const t="focus"===k.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(t)}catch{}try{n.info(t)}catch{}if("focus"===k.mode){const t=k.streak+1,e=k.count+1;(t=>{try{l()&&localStorage.setItem(s(),String(t))}catch{}})(e);const n=t%p.longBreakInterval===0?"long":"short";S({running:!1,streak:t,count:e,mode:n,remaining:u[n],total:u[n]}),p.autoStartBreaks&&setTimeout(()=>B(),50)}else S({running:!1,mode:"focus",remaining:u.focus,total:u.focus}),p.autoStartPomodoros&&setTimeout(()=>B(),50)}():S({remaining:k.remaining-1})}function P(t=d,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>_(t,n),2500*e)}function _(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var F=null,O={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function Q(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!F&&"none"!==h&&0!==g)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=Q(e,h);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=g/100*O[h],o.connect(a).connect(e.destination),o.start(),F={ctx:e,src:o,gain:a}}catch{}}function V(){if(F){try{F.src.stop()}catch{}try{F.ctx.close()}catch{}F=null}}function j(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=Q(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*O[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var G="pomodoro_tasks",E="pomodoro_tasks_migrated";function H(){return Math.random().toString(36).slice(2,11)}function L(){/* @__PURE__ */
2
- return(new Date).toISOString()}var W=null,$=[],q=!1,J=null,K=/* @__PURE__ */new Set;function U(){for(const t of K)t()}function X(t){$=t,U()}function z(){const t=W;return t?J=t.list().then(e=>{W===t&&($=e,q=!0,U())}).catch(()=>{W===t&&(q=!0,U())}).finally(()=>{J=null}):($=[],q=!0,U(),Promise.resolve())}function Y(t){W=t,$=[],q=!1,t?z():U()}function Z(t){return K.add(t),!W||q||J||z(),()=>{K.delete(t)}}function tt(){return $}function et(){const t=function(){const{prefs:t,save:n}=e(),o=r(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=a(t=>{n({todo_tasks:t})},[n]),c=a(t=>{const e=H(),n=L(),a={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...o,a]),e},[o,i]),l=a((t,e)=>{i(o.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:L()}:n))},[o,i]),s=a(t=>{i(o.filter(e=>e.id!==t))},[o,i]),u=a(t=>{const e=o.find(e=>e.id===t);e&&l(t,{done:!e.done})},[o,l]);return{tasks:o,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),n=o(Z,tt,tt),i=a(e=>{const n=W;if(!n)return t.addTask(e);const o="tmp-"+H(),a=L(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return X([...$,r]),n.create({...e,name:e.name.trim()}).then(t=>X($.map(e=>e.id===o?{...r,...t}:e))).catch(()=>X($.filter(t=>t.id!==o))),o},[t]),c=a((e,n)=>{const o=W;if(!o)return t.updateTask(e,n);X($.map(t=>t.id===e?{...t,...n,id:e,updatedAt:L()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=a(e=>{const n=W;if(!n)return t.removeTask(e);const o=$;X($.filter(t=>t.id!==e)),n.remove(e).catch(()=>X(o))},[t]),s=a(e=>{if(!W)return t.toggleDone(e);const n=$.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=a(e=>{W||t.setAllTasks(e)},[t]);return null===W?t:{tasks:n,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function nt(t,e){try{if(localStorage.getItem(E))return;const n=localStorage.getItem(G);if(!n)return void localStorage.setItem(E,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(G),void localStorage.setItem(E,"1");const a=L(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||H(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(G),localStorage.setItem(E,"1")}catch{try{localStorage.setItem(E,"1")}catch{}}}export{i as ALARM_OPTIONS,c as FOCUS_SOUND_OPTIONS,b as getPomoSnapshot,nt as migratePomodoroTasksOnce,P as playAlarm,C as pomoPause,B as pomoStart,D as pomoSwitchMode,l as pomodoroToday,j as previewFocusSound,T as setPomoAlarm,A as setPomoAlarmConfig,I as setPomoBehaviour,v as setPomoDurations,x as setPomoFocusSound,Y as setShellTodoProvider,y as subscribePomo,et as useTodoTasks};
1
+ import{userToday as t}from"./chunk-NHKT5IH6.js";import{useShellPrefs as e}from"./chunk-DPFEQQQU.js";import{toast_default as n}from"./chunk-I2NVBDKH.js";import{useSyncExternalStore as o,useCallback as a,useMemo as r}from"react";var i=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],c=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}];function l(e=/* @__PURE__ */new Date){return t(e)??""}function s(t=/* @__PURE__ */new Date){return`pomodoro-day-${l(t)}`}var u={focus:1500,short:300,long:900},d="bell",f=100,m=1,h="none",g=50,p={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},k={running:!1,remaining:u.focus,mode:"focus",total:u.focus,streak:0,count:"undefined"!=typeof localStorage?function(t=/* @__PURE__ */new Date){const e=l(t);if(!e)return 0;try{const n=localStorage.getItem(s(t)),o=null===n?localStorage.getItem(`pomodoro-${e}`):null;return parseInt(n??o??"0",10)||0}catch{return 0}}():0},w=null,M=/* @__PURE__ */new Set,S=t=>{k={...k,...t},M.forEach(t=>t())};function b(){return k}function y(t){return M.add(t),()=>{M.delete(t)}}function v(t){u=t,k.running||k.remaining!==k.total||S({remaining:t[k.mode],total:t[k.mode]})}function T(t){d=t}function A(t,e){f=Math.max(0,Math.min(100,Math.round(t))),m=Math.max(1,Math.min(5,Math.round(e)))}function I(t){p={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function x(t,e){h=t,g=Math.max(0,Math.min(100,Math.round(e))),k.running&&"focus"===k.mode?(j(),V()):"none"!==t&&0!==g||j()}function B(){k.running||(S({running:!0}),w=setInterval(P,1e3),"focus"===k.mode&&V())}function N(){(k.running||null!==w)&&(null!==w&&(clearInterval(w),w=null),S({running:!1}),j())}function D(t){N(),S({mode:t,remaining:u[t],total:u[t]})}function P(){k.remaining<=1?function(){null!==w&&(clearInterval(w),w=null);j(),C(d,{volume:f,repeat:m});const t="focus"===k.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(t)}catch{}try{n.info(t)}catch{}if("focus"===k.mode){const t=k.streak+1,e=k.count+1;(t=>{try{l()&&localStorage.setItem(s(),String(t))}catch{}})(e);const n=t%p.longBreakInterval===0?"long":"short";S({running:!1,streak:t,count:e,mode:n,remaining:u[n],total:u[n]}),p.autoStartBreaks&&setTimeout(()=>B(),50)}else S({running:!1,mode:"focus",remaining:u.focus,total:u.focus}),p.autoStartPomodoros&&setTimeout(()=>B(),50)}():S({remaining:k.remaining-1})}function C(t=d,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>_(t,n),2500*e)}function _(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var F=null,O={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function R(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function V(){if(!F&&"none"!==h&&0!==g)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=R(e,h);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=g/100*O[h],o.connect(a).connect(e.destination),o.start(),F={ctx:e,src:o,gain:a}}catch{}}function j(){if(F){try{F.src.stop()}catch{}try{F.ctx.close()}catch{}F=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=R(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*O[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var H="pomodoro_tasks",Q="pomodoro_tasks_migrated";function E(){return Math.random().toString(36).slice(2,11)}function K(){/* @__PURE__ */
2
+ return(new Date).toISOString()}var W=null,$=[],q=!1,J=null,L=/* @__PURE__ */new Set;function U(){for(const t of L)t()}function z(t){$=t,U()}function X(){const t=W;return t?J=t.list().then(e=>{W===t&&($=e,q=!0,U())}).catch(()=>{W===t&&(q=!0,U())}).finally(()=>{J=null}):($=[],q=!0,U(),Promise.resolve())}function Y(t){W=t,$=[],q=!1,t?X():U()}function Z(t){return L.add(t),!W||q||J||X(),()=>{L.delete(t)}}function tt(){return $}function et(){const t=function(){const{prefs:t,save:n}=e(),o=r(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=a(t=>{n({todo_tasks:t})},[n]),c=a(t=>{const e=E(),n=K(),a={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...o,a]),e},[o,i]),l=a((t,e)=>{i(o.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:K()}:n))},[o,i]),s=a(t=>{i(o.filter(e=>e.id!==t))},[o,i]),u=a(t=>{const e=o.find(e=>e.id===t);e&&l(t,{done:!e.done})},[o,l]);return{tasks:o,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),n=o(Z,tt,tt),i=a(e=>{const n=W;if(!n)return t.addTask(e);const o="tmp-"+E(),a=K(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return z([...$,r]),n.create({...e,name:e.name.trim()}).then(t=>z($.map(e=>e.id===o?{...r,...t}:e))).catch(()=>z($.filter(t=>t.id!==o))),o},[t]),c=a((e,n)=>{const o=W;if(!o)return t.updateTask(e,n);z($.map(t=>t.id===e?{...t,...n,id:e,updatedAt:K()}:t)),o.update(e,n).catch(()=>{X()})},[t]),l=a(e=>{const n=W;if(!n)return t.removeTask(e);const o=$;z($.filter(t=>t.id!==e)),n.remove(e).catch(()=>z(o))},[t]),s=a(e=>{if(!W)return t.toggleDone(e);const n=$.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=a(e=>{W||t.setAllTasks(e)},[t]);return null===W?t:{tasks:n,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function nt(t,e){try{if(localStorage.getItem(Q))return;const n=localStorage.getItem(H);if(!n)return void localStorage.setItem(Q,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(H),void localStorage.setItem(Q,"1");const a=K(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||E(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(H),localStorage.setItem(Q,"1")}catch{try{localStorage.setItem(Q,"1")}catch{}}}export{i as ALARM_OPTIONS,c as FOCUS_SOUND_OPTIONS,b as getPomoSnapshot,nt as migratePomodoroTasksOnce,C as playAlarm,N as pomoPause,B as pomoStart,D as pomoSwitchMode,l as pomodoroToday,G as previewFocusSound,T as setPomoAlarm,A as setPomoAlarmConfig,I as setPomoBehaviour,v as setPomoDurations,x as setPomoFocusSound,Y as setShellTodoProvider,y as subscribePomo,et as useTodoTasks};
@@ -1,4 +1,4 @@
1
- import{StatCard as e,Card as a}from"./chunk-S25KELFW.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-FUPU7Z2G.js";import{Avatar as s}from"./chunk-W2TPXKCV.js";import{ColumnChart as l}from"./chunk-G7SILKUY.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-YDJ5IZOU.js";import{Button_default as c}from"./chunk-UTISUEO4.js";import{TH_ONE_LINE as n}from"./chunk-TD3ZQD5R.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
1
+ import{StatCard as e,Card as a}from"./chunk-RKSCB5BJ.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-QRPPWLKU.js";import{Avatar as s}from"./chunk-SCNQK5NF.js";import{ColumnChart as l}from"./chunk-AQVPWUJ3.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-YDJ5IZOU.js";import{Button_default as c}from"./chunk-UTISUEO4.js";import{TH_ONE_LINE as n}from"./chunk-TD3ZQD5R.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
2
2
  return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
3
3
  /* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */m("div",{children:[
@@ -1,7 +1,7 @@
1
- import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-ZCN5BU4U.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{useBrowserLayoutEffect as a}from"./chunk-ZDXRSY2Y.js";import{createContext as o,useContext as n,useRef as l,useId as s}from"react";import{jsx as d,jsxs as c,Fragment as m}from"react/jsx-runtime";var u=o("compact");function f({"aria-label":e,"aria-labelledby":r,children:t,spacing:i="compact",className:a="",rootProps:o}){/* @__PURE__ */
2
- return d(u.Provider,{value:i,children:/* @__PURE__ */d("div",{...o,role:"list","aria-label":r?void 0:e,"aria-labelledby":r,"data-sortable-list":i,className:`flex min-w-0 flex-col ${"comfortable"===i?"gap-2":"gap-1"} ${a}`.trim(),children:t})})}function b({children:o,title:f,thumb:b,expanded:p,onToggle:h,actions:g,below:v,active:x=!1,flat:w=!1,draggable:y=!1,dragging:N=!1,drop:k,onMove:j,rowProps:D,rowRef:P,className:B=""}){const S=x||!!p,I=n(u),R=l(null),$=s(),A=[D?.["aria-describedby"],j?$:void 0].filter(Boolean).join(" ")||void 0,C=D?.tabIndex;a(()=>{const e=R.current;if(!e||void 0!==C)return;const r=[...e.querySelectorAll('a[href], button, input, select, textarea, [contenteditable]:not([contenteditable="false"]), [tabindex]')].some(r=>r!==e);j&&!r?e.tabIndex=0:e.removeAttribute("tabindex")});const K="comfortable"===I?{before:"-top-[5px]",after:"-bottom-[5px]"}:{before:"-top-0.5",after:"-bottom-0.5"},U=null!=f&&/* @__PURE__ */c(m,{children:[null!=b&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"inline-flex h-6 w-6 shrink-0 overflow-hidden rounded-sm",children:b}),
1
+ import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-YBE66FBR.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{useBrowserLayoutEffect as a}from"./chunk-ZDXRSY2Y.js";import{createContext as o,useContext as n,useRef as l,useId as s}from"react";import{jsx as d,jsxs as c,Fragment as m}from"react/jsx-runtime";var u=o("compact");function f({"aria-label":e,"aria-labelledby":r,children:t,spacing:i="compact",className:a="",rootProps:o}){/* @__PURE__ */
2
+ return d(u.Provider,{value:i,children:/* @__PURE__ */d("div",{...o,role:"list","aria-label":r?void 0:e,"aria-labelledby":r,"data-sortable-list":i,className:`flex min-w-0 flex-col ${"comfortable"===i?"gap-2":"gap-1"} ${a}`.trim(),children:t})})}function b({children:o,title:f,thumb:b,expanded:p,onToggle:h,actions:g,below:v,active:x=!1,flat:w=!1,draggable:y=!1,dragging:N=!1,drop:k,onMove:j,rowProps:B,rowRef:D,className:P=""}){const R=x||!!p,S=n(u),I=l(null),Y=s(),$=[B?.["aria-describedby"],j?Y:void 0].filter(Boolean).join(" ")||void 0,A=B?.tabIndex;a(()=>{const e=I.current;if(!e||void 0!==A)return;const r=[...e.querySelectorAll('a[href], button, input, select, textarea, [contenteditable]:not([contenteditable="false"]), [tabindex]')].some(r=>r!==e);j&&!r?e.tabIndex=0:e.removeAttribute("tabindex")});const K="comfortable"===S?{before:"-top-[5px]",after:"-bottom-[5px]"}:{before:"-top-0.5",after:"-bottom-0.5"},q=null!=f&&/* @__PURE__ */c(m,{children:[null!=b&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"inline-flex h-6 w-6 shrink-0 overflow-hidden rounded-sm",children:b}),
3
3
  /* @__PURE__ */d("span",{"data-list-row-name":"",className:"min-w-0 flex-1 break-words font-semibold text-(--ink-strongest)",children:f})]});/* @__PURE__ */
4
- return c("div",{role:"listitem","data-list-item":"","data-drop":k,"data-open":S||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-surface transition-colors duration-(--motion-fast)",w?"":S?"border-blue-300":"border-line hover:border-gray-300"].filter(Boolean).join(" "),children:[k&&/* @__PURE__ */d("span",{"aria-hidden":"true","data-list-drop-line":"",className:`pointer-events-none absolute inset-x-2 z-10 h-0.5 rounded-full bg-blue-500 ${K[k]}`}),
5
- /* @__PURE__ */c("div",{...D,ref:e=>{var r,t;R.current=e,t=e,"function"==typeof(r=P)?r(t):r&&(r.current=t)},"data-list-row":"","data-draggable":y||void 0,"aria-keyshortcuts":D?.["aria-keyshortcuts"]??(j?e:void 0),"aria-describedby":A,onKeyDown:e=>{if(D?.onKeyDown?.(e),e.defaultPrevented||!j)return;const r=t(e);r&&!e.target.closest?.("select")&&(e.preventDefault(),j(r))},className:["group/listrow relative flex min-h-8 min-w-0 items-center gap-1 rounded-md text-sm",w?"":"min-h-10 pl-3",y?"cursor-grab active:cursor-grabbing":"","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",null!=g&&!1!==g?"":"pr-2",N?"opacity-40":"",B].filter(Boolean).join(" "),children:[
6
- /* @__PURE__ */c("div",{"data-list-row-main":"",className:"flex min-h-8 min-w-0 flex-1 items-center gap-1",children:[U&&(h?/* @__PURE__ */c("button",{type:"button","aria-expanded":!!p,onClick:h,"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-sm py-2 text-left text-(--ink-strongest) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[U,
7
- /* @__PURE__ */d(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:"2",className:"h-4 w-4 shrink-0 transition-transform duration-(--motion-base) motion-reduce:transition-none "+(p?"rotate-90":"")})]}):/* @__PURE__ */d("span",{"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 py-2",children:U})),o]}),null!=g&&!1!==g&&/* @__PURE__ */d("div",{"data-list-actions":"",className:"flex shrink-0 items-center gap-0.5",children:g}),j&&/* @__PURE__ */d(r,{id:$})]}),null!=v&&!1!==v&&/* @__PURE__ */d("div",{"data-list-below":"",className:w?"":"px-3 pb-3",children:v})]})}export{b as ListRow,f as SortableList};
4
+ return c("div",{role:"listitem","data-list-item":"","data-drop":k,"data-open":R||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-surface transition-colors duration-(--motion-fast)",w?"":R?"border-blue-300":"border-line hover:border-gray-300"].filter(Boolean).join(" "),children:[k&&/* @__PURE__ */d("span",{"aria-hidden":"true","data-list-drop-line":"",className:`pointer-events-none absolute inset-x-2 z-10 h-0.5 rounded-full bg-blue-500 ${K[k]}`}),
5
+ /* @__PURE__ */c("div",{...B,ref:e=>{var r,t;I.current=e,t=e,"function"==typeof(r=D)?r(t):r&&(r.current=t)},"data-list-row":"","data-draggable":y||void 0,"aria-keyshortcuts":B?.["aria-keyshortcuts"]??(j?e:void 0),"aria-describedby":$,onKeyDown:e=>{if(B?.onKeyDown?.(e),e.defaultPrevented||!j)return;const r=t(e);r&&!e.target.closest?.("select")&&(e.preventDefault(),j(r))},className:["group/listrow relative flex min-h-8 min-w-0 items-center gap-1 rounded-md text-sm",w?"":"min-h-10 pl-3",y?"cursor-grab active:cursor-grabbing":"","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",null!=g&&!1!==g?"":"pr-2",N?"opacity-40":"",P].filter(Boolean).join(" "),children:[
6
+ /* @__PURE__ */c("div",{"data-list-row-main":"",className:"flex min-h-8 min-w-0 flex-1 items-center gap-1",children:[q&&(h?/* @__PURE__ */c("button",{type:"button","aria-expanded":!!p,onClick:h,"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-sm py-2 text-left text-(--ink-strongest) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[q,
7
+ /* @__PURE__ */d(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:"2",className:"h-4 w-4 shrink-0 transition-transform duration-(--motion-base) motion-reduce:transition-none "+(p?"rotate-90":"")})]}):/* @__PURE__ */d("span",{"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 py-2",children:q})),o]}),null!=g&&!1!==g&&/* @__PURE__ */d("div",{"data-list-actions":"",className:"flex shrink-0 items-center gap-0.5",children:g}),j&&/* @__PURE__ */d(r,{id:Y})]}),null!=v&&!1!==v&&/* @__PURE__ */d("div",{"data-list-below":"",className:w?"":"px-3 pb-3",children:v})]})}export{b as ListRow,f as SortableList};
@@ -0,0 +1 @@
1
+ var r="13.22.1",a=r;export{a as APP_VERSION,r as VERSION};
@@ -1,2 +1,2 @@
1
- import{InputNumber_default as a,stepRounding as e}from"./chunk-25T4YQO7.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{jsxs as n,jsx as i}from"react/jsx-runtime";var l="h-3.5 w-3.5",s={x:/* @__PURE__ */i(r,{name:"nudge-x","aria-hidden":"true",className:l}),y:/* @__PURE__ */i(r,{name:"nudge-y","aria-hidden":"true",className:l})};function m({label:r,value:l,onChange:m,words:t,placeholder:d,min:o=-200,max:c=200,step:u=1,readOnly:p,units:h}){const x=r=>/* @__PURE__ */i("div",{"data-axis":r,className:"min-w-0",children:/* @__PURE__ */i(a,{value:l[r],onChange:a=>m({...l,[r]:a}),min:o,max:c,step:u,...e(u),steppers:"compact",readOnly:p,placeholder:d[r],prefix:s[r],suffix:t.unit,units:h,"aria-label":t[r]})});/* @__PURE__ */
1
+ import{InputNumber_default as a,stepRounding as e}from"./chunk-QPVYBN4J.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{jsxs as n,jsx as i}from"react/jsx-runtime";var l="h-3.5 w-3.5",s={x:/* @__PURE__ */i(r,{name:"nudge-x","aria-hidden":"true",className:l}),y:/* @__PURE__ */i(r,{name:"nudge-y","aria-hidden":"true",className:l})};function m({label:r,value:l,onChange:m,words:t,placeholder:d,min:o=-200,max:c=200,step:u=1,readOnly:p,units:h}){const x=r=>/* @__PURE__ */i("div",{"data-axis":r,className:"min-w-0",children:/* @__PURE__ */i(a,{value:l[r],onChange:a=>m({...l,[r]:a}),min:o,max:c,step:u,...e(u),steppers:"compact",readOnly:p,placeholder:d[r],prefix:s[r],suffix:t.unit,units:h,"aria-label":t[r]})});/* @__PURE__ */
2
2
  return n("div",{role:"group","aria-label":r,className:"grid min-w-0 grid-cols-2 gap-2",children:[x("x"),x("y")]})}export{m as PositionInput};
@@ -1,4 +1,4 @@
1
- import{Tooltip as n}from"./chunk-F2RAIGCG.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-IUVGHHR3.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
1
+ import{Tooltip as n}from"./chunk-F2RAIGCG.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-NRHG4R2Q.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
2
2
  return i(n,{content:f,describe:!1,className:`relative inline-flex shrink-0 ${u}`.trim(),children:/* @__PURE__ */o("span",{"data-item-count":"",className:`${a} ${l?"bg-blue-100 text-blue-700":"bg-[color:color-mix(in_srgb,var(--ink-faint)_14%,transparent)] text-gray-600"}`,children:[
3
3
  /* @__PURE__ */i("span",{"aria-hidden":"true",children:t(s,h)}),
4
4
  /* @__PURE__ */i("span",{className:"sr-only",children:f})]})})}export{s as ItemCount};
@@ -1,4 +1,4 @@
1
- import{GROUP_COLORS as e}from"./chunk-YDJ5IZOU.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-F2RAIGCG.js";import{useShellStrings as l}from"./chunk-IUVGHHR3.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
1
+ import{GROUP_COLORS as e}from"./chunk-YDJ5IZOU.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-F2RAIGCG.js";import{useShellStrings as l}from"./chunk-NRHG4R2Q.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
2
2
  return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
3
3
  return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
4
4
  /* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as e}from"./chunk-IUVGHHR3.js";import{useState as n,useEffect as t}from"react";import{jsxs as r,jsx as a}from"react/jsx-runtime";function o(l,e=!0){const[r,a]=n(null),[o,s]=n(null),[i,c]=n(null);t(()=>{a(null)},[l]),t(()=>{if(null===o)return;const l=()=>{s(null),c(null)};return window.addEventListener("pointerup",l),()=>window.removeEventListener("pointerup",l)},[o]);const u=r?r[0]:0,m=null!==o&&null!==i&&o!==i?[Math.min(o,i),Math.max(o,i)]:null;return{view:e?r:null,drag:e?m:null,press:l=>{e&&(s(l),c(l))},over:l=>{null!==o&&c(l)},release:()=>{m&&a([u+m[0],u+m[1]]),s(null),c(null)},clear:()=>a(null),slice:l=>e&&r?l.slice(r[0],r[1]+1):l}}function s({from:n,to:t,count:o,total:s,rows:i,onClear:c}){const u=e().charts;/* @__PURE__ */
1
+ import{CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as e}from"./chunk-NRHG4R2Q.js";import{useState as n,useEffect as t}from"react";import{jsxs as r,jsx as a}from"react/jsx-runtime";function o(l,e=!0){const[r,a]=n(null),[o,s]=n(null),[i,c]=n(null);t(()=>{a(null)},[l]),t(()=>{if(null===o)return;const l=()=>{s(null),c(null)};return window.addEventListener("pointerup",l),()=>window.removeEventListener("pointerup",l)},[o]);const u=r?r[0]:0,m=null!==o&&null!==i&&o!==i?[Math.min(o,i),Math.max(o,i)]:null;return{view:e?r:null,drag:e?m:null,press:l=>{e&&(s(l),c(l))},over:l=>{null!==o&&c(l)},release:()=>{m&&a([u+m[0],u+m[1]]),s(null),c(null)},clear:()=>a(null),slice:l=>e&&r?l.slice(r[0],r[1]+1):l}}function s({from:n,to:t,count:o,total:s,rows:i,onClear:c}){const u=e().charts;/* @__PURE__ */
2
2
  return r("div",{className:"mt-1 text-xs","data-chart-zoom":"true",children:[
3
3
  /* @__PURE__ */r("div",{className:"flex items-baseline gap-2",children:[
4
4
  /* @__PURE__ */a("span",{className:"font-semibold",style:{color:l.label},children:u.zoomRange(n,t,o)}),void 0!==s&&/* @__PURE__ */a("span",{className:"tabular-nums",style:{color:l.label},children:s}),
@@ -1,7 +1,7 @@
1
- import{writeClipboard as e}from"./chunk-UFX7F3KG.js";import{IconButton_default as r}from"./chunk-NWS5G7FE.js";import{Icon as t}from"./chunk-ISVODSRP.js";import{toast_default as n}from"./chunk-VQ35LXDC.js";import{useShellStrings as a}from"./chunk-IUVGHHR3.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
1
+ import{writeClipboard as e}from"./chunk-XYVFJLAU.js";import{IconButton_default as r}from"./chunk-NWS5G7FE.js";import{Icon as t}from"./chunk-ISVODSRP.js";import{toast_default as n}from"./chunk-I2NVBDKH.js";import{useShellStrings as a}from"./chunk-NRHG4R2Q.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
2
2
  return s(t,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
3
- return s(t,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:t,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:N=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":C,className:F=""}){const[G,S]=i(!1),T=o(null),V=a().copy;c(()=>()=>{T.current&&clearTimeout(T.current)},[]);const B=l(async()=>{await e(t)?(S(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{S(!1),T.current=null},2e3),v?.(t)):n.error(V.failed)},[t,v,V]),{box:D,button:H}=p[g],I=!N;/* @__PURE__ */
4
- return m("div",{id:I?void 0:j,"aria-describedby":I?void 0:C,className:["inline-flex max-w-full items-center rounded-md",u[k],D,F].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
5
- /* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(w?"whitespace-pre-wrap break-all":"truncate"),title:w?void 0:t,children:y??t}),!N&&/* @__PURE__ */m(d,{children:[
6
- /* @__PURE__ */s(r,{id:j,"aria-label":x?V.copyLabel(x):V.copy,"aria-describedby":C,onClick:B,className:`${H} text-gray-400`,children:/* @__PURE__ */s(G?h:b,{})}),
7
- /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:G?V.copied:""})]})]})}export{y as Snippet};
3
+ return s(t,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:t,children:y,symbol:f,label:x,size:N="md",variant:g="bordered",hideCopyButton:k=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":B,className:C=""}){const[R,S]=i(!1),T=o(null),V=a().copy;c(()=>()=>{T.current&&clearTimeout(T.current)},[]);const D=l(async()=>{await e(t)?(S(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{S(!1),T.current=null},2e3),v?.(t)):n.error(V.failed)},[t,v,V]),{box:F,button:G}=p[N],H=!k;/* @__PURE__ */
4
+ return m("div",{id:H?void 0:j,"aria-describedby":H?void 0:B,className:["inline-flex max-w-full items-center rounded-md",u[g],F,C].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
5
+ /* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(w?"whitespace-pre-wrap break-all":"truncate"),title:w?void 0:t,children:y??t}),!k&&/* @__PURE__ */m(d,{children:[
6
+ /* @__PURE__ */s(r,{id:j,"aria-label":x?V.copyLabel(x):V.copy,"aria-describedby":B,onClick:D,className:`${G} text-gray-400`,children:/* @__PURE__ */s(R?h:b,{})}),
7
+ /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:R?V.copied:""})]})]})}export{y as Snippet};
@@ -1,15 +1,15 @@
1
- import{CountBadge as e}from"./chunk-5HFKVEWW.js";import{isShown as i}from"./chunk-HCP7WOAL.js";import{SettingRowNameContext as n,SettingAutoContext as a}from"./chunk-2NMW66P5.js";import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:W,className:H=""}){const V=t();if(!i(j,P,W))return null;const A="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:V.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
1
+ import{CountBadge as e}from"./chunk-PFOTEDSQ.js";import{SettingRowNameContext as i,SettingAutoContext as n}from"./chunk-2NMW66P5.js";import{isShown as a}from"./chunk-HCP7WOAL.js";import{useShellStrings as t}from"./chunk-NRHG4R2Q.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:T,className:A=""}){const F=t();if(!a(j,P,T))return null;const W="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:F.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
2
2
  /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{dot:!0,tone:"accent"})}),
3
- /* @__PURE__ */s("span",{className:"sr-only",children:V.settingView.edited})]}):null,F=null!=f&&!1!==f;if("compact"===k){const e=m(u),i=m(h);if(!e&&!i)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),H&&c.push(H);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
4
- /* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),A]}),y=e=>/* @__PURE__ */s(n.Provider,{value:t,children:/* @__PURE__ */s(a.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
3
+ /* @__PURE__ */s("span",{className:"sr-only",children:F.settingView.edited})]}):null,H=null!=f&&!1!==f;if("compact"===k){const e=m(u),a=m(h);if(!e&&!a)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),A&&c.push(A);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
4
+ /* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),W]}),y=e=>/* @__PURE__ */s(i.Provider,{value:t,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
5
5
  return r("div",{className:c.join(" "),children:[
6
- /* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),F&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),i&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const I=c,T=void 0!==u||void 0===N&&null==h,q=null==u||""===u,z=y?"text-gray-500":"text-gray-800",B=q?"text-gray-400":y?"text-gray-500":"text-gray-900",C=`${I.text} font-medium ${z}`,E=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:C,children:l}):/* @__PURE__ */s("span",{id:g,className:C,children:l}),G=/* @__PURE__ */s(n.Provider,{value:g,children:/* @__PURE__ */s(a.Provider,{value:"auto"===w,children:q?b:u})}),K=[$?"border-t border-line-subtle first:border-t-0":"",I.pad,H].filter(Boolean).join(" "),L=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${I.bodyTop} border-t border-line-subtle ${I.bodyPad}`,children:N});/* @__PURE__ */
7
- return r("div",F?{className:K,children:[
6
+ /* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),H&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),a&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const I=c,O=void 0!==u||void 0===N&&null==h,Q=null==u||""===u,R=y?"text-gray-500":"text-gray-800",S=Q?"text-gray-400":y?"text-gray-500":"text-gray-900",V=`${I.text} font-medium ${R}`,q=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:V,children:l}):/* @__PURE__ */s("span",{id:g,className:V,children:l}),z=/* @__PURE__ */s(i.Provider,{value:g,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:Q?b:u})}),B=[$?"border-t border-line-subtle first:border-t-0":"",I.pad,A].filter(Boolean).join(" "),C=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${I.bodyTop} border-t border-line-subtle ${I.bodyPad}`,children:N});/* @__PURE__ */
7
+ return r("div",H?{className:B,children:[
8
8
  /* @__PURE__ */r("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
9
- /* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${z}`,children:[null!=o&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),E,A]})}),
9
+ /* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${R}`,children:[null!=o&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),q,W]})}),
10
10
  /* @__PURE__ */r("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[
11
- /* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${I.text} ${y?"text-ink-faint":"text-ink-strongest"}`,children:f}),null!=h&&/* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:h})]})]}),x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==u&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${I.text} ${B}`,children:G}),L]}:{className:K,children:[
11
+ /* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${I.text} ${y?"text-ink-faint":"text-ink-strongest"}`,children:f}),null!=h&&/* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:h})]})]}),x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==u&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${I.text} ${S}`,children:z}),C]}:{className:B,children:[
12
12
  /* @__PURE__ */r("div",{className:`flex items-center justify-between ${I.gap}`,children:[
13
13
  /* @__PURE__ */r("div",{className:"min-w-0 flex-1",children:[null!=o?
14
- /* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${z}`,children:[
15
- /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),E,A]}):A?/* @__PURE__ */r("div",{className:"flex min-w-0 items-center gap-2",children:[E,A]}):E,x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),null!=h?/* @__PURE__ */r("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[T&&/* @__PURE__ */s("div",{className:`${I.text} ${B}`,children:G}),h]}):T&&/* @__PURE__ */s("div",{className:`shrink-0 ${I.text} ${B}`,children:G})]}),L]})}export{o as SettingRow};
14
+ /* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${R}`,children:[
15
+ /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),q,W]}):W?/* @__PURE__ */r("div",{className:"flex min-w-0 items-center gap-2",children:[q,W]}):q,x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),null!=h?/* @__PURE__ */r("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[O&&/* @__PURE__ */s("div",{className:`${I.text} ${S}`,children:z}),h]}):O&&/* @__PURE__ */s("div",{className:`shrink-0 ${I.text} ${S}`,children:z})]}),C]})}export{o as SettingRow};
@@ -1,13 +1,13 @@
1
- import{copyToClipboard as e,selectionAt as t}from"./chunk-UFX7F3KG.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-DO3DSSAW.js";import{ListLoadError as l}from"./chunk-MVOYVN3S.js";import{ResizableTable as i}from"./chunk-J4CVYOY3.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-4U5M37SF.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-THAPVKEJ.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-VQ35LXDC.js";import{useShellStrings as y}from"./chunk-IUVGHHR3.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:N,emptyState:L,totalCount:$,isError:A,onRetry:T,errorTitle:K,errorMessage:M,tableId:E,columns:F,renderCell:D,getRowId:P=e=>e.id,sort:U,onSort:V,selected:H,setSelected:I,onRowClick:O,onRowHover:J,getRowClassName:W,footerLabel:G,footerExtra:Y,footerExtraAfter:_,sentinelRef:B,isFetchingNextPage:Q,saveDefaultPerms:X,exportEndpoint:Z,exportFilename:z="export.csv",contextActions:q}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{I(t=>{const n=new Set(t),r=P(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{I(e=>{const t=R.map(P),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,O,le,ie,(e,t)=>{I(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(P(R[n]));return r})},ne),ce=R.filter(e=>H.has(P(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&H.has(P(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(F.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(P);if(!e.length||!Z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(F.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${E}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return F.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=Z.includes("?")?"&":"?";try{const n=await f.get(`${Z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=z,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(N)/* @__PURE__ */return x(c,{});if(A&&0===R.length)/* @__PURE__ */
2
- return x(l,{title:K,message:M,onRetry:T});if(0===R.length)/* @__PURE__ */return x(w,{children:L});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=H.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...F],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:$,label:G,isFetchingMore:Q,extra:Y,extraAfter:_}),ye=B?/* @__PURE__ */C(w,{children:[
3
- /* @__PURE__ */x("div",{ref:B}),Q&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=q?q(ce):[],a=ce.length,c=()=>te(null),u=void 0!==$&&$>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
1
+ import{copyToClipboard as e,selectionAt as t}from"./chunk-XYVFJLAU.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-U73K3ICC.js";import{ListLoadError as l}from"./chunk-2YHS5E27.js";import{ResizableTable as i}from"./chunk-7N6CVTWO.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-4PJFL26P.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-THAPVKEJ.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-I2NVBDKH.js";import{useShellStrings as y}from"./chunk-NRHG4R2Q.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:N,emptyState:L,totalCount:T,isError:$,onRetry:A,errorTitle:K,errorMessage:E,tableId:P,columns:F,renderCell:M,getRowId:H=e=>e.id,sort:I,onSort:U,selected:D,setSelected:J,onRowClick:V,onRowHover:O,getRowClassName:W,footerLabel:B,footerExtra:_,footerExtraAfter:G,sentinelRef:Q,isFetchingNextPage:Y,saveDefaultPerms:Z,exportEndpoint:z,exportFilename:X="export.csv",contextActions:q}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{J(t=>{const n=new Set(t),r=H(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{J(e=>{const t=R.map(H),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,V,le,ie,(e,t)=>{J(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(H(R[n]));return r})},ne),ce=R.filter(e=>D.has(H(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&D.has(H(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(F.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(H);if(!e.length||!z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(F.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${P}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return F.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=z.includes("?")?"&":"?";try{const n=await f.get(`${z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=X,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(N)/* @__PURE__ */return x(c,{});if($&&0===R.length)/* @__PURE__ */
2
+ return x(l,{title:K,message:E,onRetry:A});if(0===R.length)/* @__PURE__ */return x(w,{children:L});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=D.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...F],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:T,label:B,isFetchingMore:Y,extra:_,extraAfter:G}),ye=Q?/* @__PURE__ */C(w,{children:[
3
+ /* @__PURE__ */x("div",{ref:Q}),Y&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=q?q(ce):[],a=ce.length,c=()=>te(null),u=void 0!==T&&T>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
4
4
  /* @__PURE__ */x(s,{children:pe>0?re.list.selectedNotShown(a,pe):re.list.selected(a)}),
5
- /* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),O(r)},children:oe.open}),
5
+ /* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),V(r)},children:oe.open}),
6
6
  /* @__PURE__ */x(m,{}),o&&/* @__PURE__ */x(h,{onClick:()=>{c(),e(oe.copiedText,o.text,o.html)},children:oe.copy}),l&&/* @__PURE__ */x(h,{onClick:()=>(t=>{te(null);const{keys:n,body:r}=de(),o=n.indexOf(t.key);o<0||!r.length||e(t.label,r.map(e=>e[o]).join("\n"))})(l),children:oe.copyColumn(l.label)}),
7
- /* @__PURE__ */x(h,{disabled:0===a,onClick:se,children:oe.copyRows(a)}),Z&&/* @__PURE__ */x(h,{onClick:he,children:oe.exportSelected}),i.map((e,t)=>/* @__PURE__ */C("div",{children:[(e.divider||0===t)&&/* @__PURE__ */x(m,{}),
7
+ /* @__PURE__ */x(h,{disabled:0===a,onClick:se,children:oe.copyRows(a)}),z&&/* @__PURE__ */x(h,{onClick:he,children:oe.exportSelected}),i.map((e,t)=>/* @__PURE__ */C("div",{children:[(e.divider||0===t)&&/* @__PURE__ */x(m,{}),
8
8
  /* @__PURE__ */x(h,{danger:e.danger,disabled:e.disabled,onClick:()=>{c(),e.onClick(ce)},children:e.label})]},t)),
9
- /* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),I(e=>/* @__PURE__ */new Set([...e,...R.map(P)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
10
- /* @__PURE__ */x(h,{onClick:()=>{c(),I(/* @__PURE__ */new Set)},children:oe.clearSelection}),T&&/* @__PURE__ */x(h,{onClick:()=>{c(),T()},children:oe.refresh})]})}/* @__PURE__ */
9
+ /* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),J(e=>/* @__PURE__ */new Set([...e,...R.map(H)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
10
+ /* @__PURE__ */x(h,{onClick:()=>{c(),J(/* @__PURE__ */new Set)},children:oe.clearSelection}),A&&/* @__PURE__ */x(h,{onClick:()=>{c(),A()},children:oe.refresh})]})}/* @__PURE__ */
11
11
  return C("div",{className:"flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden",children:[
12
- /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:E,columns:fe,sort:U,onSort:V,footer:ge,afterBody:ye,saveDefaultPerms:X,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=P(n);/* @__PURE__ */
13
- return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":H.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${W?.(n)??""}`,onClick:()=>O(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=P(n);H.has(r)||I(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?F.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:J?()=>J(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:H.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):D(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
12
+ /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:P,columns:fe,sort:I,onSort:U,footer:ge,afterBody:ye,saveDefaultPerms:Z,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=H(n);/* @__PURE__ */
13
+ return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":D.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${W?.(n)??""}`,onClick:()=>V(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=H(n);D.has(r)||J(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?F.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:O?()=>O(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:D.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):M(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
@@ -0,0 +1,8 @@
1
+ import{useOverlayTarget as e,usePopupAnchor as i,usePopupLevel as t,usePopupLevelBindings as r,windowScrimStyle as o,OverlayLayerProvider as l,scrimHasCorners as n,CloseButton as d,popupLayerStyle as a}from"./chunk-CJQPC2P3.js";import{useDiscardGuard as s}from"./chunk-UAXL44HH.js";import{dialogA11y as m}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as c}from"./chunk-UVHXVSB2.js";import{useFocusTrap as p,useScrollLock as h}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as u,DESCRIPTION_TEXT as f,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{useHydrated as y}from"./chunk-WCCS4VFE.js";import{registerModalEscapeInterceptor as v}from"./chunk-TWVUQUUD.js";import{useRef as x,useId as w,useState as g,useEffect as k}from"react";import{createPortal as j}from"react-dom";import{jsxs as N,Fragment as C,jsx as W}from"react/jsx-runtime";var H={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},U={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function V(e,i){const t=window.innerHeight-(i.top+i.height);if("bottom"===e)return{left:i.left,width:i.width,bottom:t};const r={top:i.top,height:i.height};return"left"===e?{...r,left:i.left}:{...r,right:window.innerWidth-(i.left+i.width)}}function $({open:$,onClose:B,side:D="right",size:Z="md",title:z,description:A,footer:E,children:F,blocking:G=!1,dirty:J=!1,initialFocus:P,"aria-label":Q,"aria-labelledby":S,"aria-describedby":T,className:X=""}){const Y=x(null),I=w(),L=w(),O=w(),q=e(y()),[K,M]=g(null),R=s({open:$,dirty:J,onClose:B,title:z,layer:K}),_=x(null),ee=i($&&null!==q,_),ie=t($&&null!==q,_),te=r(ie,K),re=o(ie),oe=null!==ie.host;if(c($),p(Y,$&&null!==q,P,te),h($),k(()=>{if($)return v(()=>!te.current?.(document.activeElement)&&(G||R(),!0),()=>Y.current)},[$,G,R,te]),!$||!q)return null;const le="bottom"===D,ne={...le?{maxHeight:"85vh"}:{},...ee?V(D,ee):{}};/* @__PURE__ */
2
+ return N(C,{children:[/* @__PURE__ */W("span",{ref:_,hidden:!0,"data-popup-anchor":""}),j(
3
+ /* @__PURE__ */W(l,{value:K,children:/* @__PURE__ */N("div",{ref:M,className:oe?"fixed inset-0 pointer-events-none":"fixed inset-0",style:a(ie),role:"presentation","data-overlay-layer":"",children:[
4
+ /* @__PURE__ */W("div",{className:"fixed bg-black/30 backdrop-blur-sm "+(oe?"pointer-events-auto"+(n(ie)?" rounded-(--radius-window)":""):"inset-0"),style:re??void 0,hidden:oe&&!re,onClick:G?void 0:R,"aria-hidden":"true","data-popup-scrim":oe?"window":"system"}),
5
+ /* @__PURE__ */N("div",{ref:Y,...m({modal:!0,titleId:z?O:void 0,labelledBy:S,label:Q}),"aria-describedby":T??(A?L:F?I:void 0),"data-drawer-side":D,"data-popup-panel":"",style:ne,className:[`fixed flex flex-col ${b}`,oe?"pointer-events-auto":"",le?"":`w-full max-w-full ${H[Z]}`,ee?"":U[D],le?"rounded-t-xl":"",X].filter(Boolean).join(" "),children:[z?/* @__PURE__ */N("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
6
+ /* @__PURE__ */N("div",{className:"min-w-0",children:[
7
+ /* @__PURE__ */W("h2",{id:O,className:u,children:z}),A&&/* @__PURE__ */W("p",{id:L,className:`mt-0.5 ${f}`,children:A})]}),!G&&/* @__PURE__ */W(d,{onClose:R})]}):!G&&/* @__PURE__ */W("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */W(d,{onClose:R})}),
8
+ /* @__PURE__ */N("div",{id:I,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[A&&!z&&/* @__PURE__ */W("p",{id:L,className:`mb-3 ${f} ${G?"":"pr-8"}`.trim(),children:A}),F]}),E&&/* @__PURE__ */W("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:E})]})]})}),q)]})}export{$ as Drawer};
@@ -1,4 +1,4 @@
1
- import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-HGOWQO63.js";import{useDismissPopupsOnOpen as i}from"./chunk-UVHXVSB2.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-5FYDNH4Y.js";import{useShellStrings as m}from"./chunk-IUVGHHR3.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function L(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var C=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function T({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
1
+ import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-HGOWQO63.js";import{useDismissPopupsOnOpen as i}from"./chunk-UVHXVSB2.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-5FYDNH4Y.js";import{useShellStrings as m}from"./chunk-NRHG4R2Q.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function L(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var C=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function T({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
2
2
  return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
3
3
  /* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
4
4
  /* @__PURE__ */w("span",{children:e.title}),
@@ -6,15 +6,15 @@ return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.m
6
6
  return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
7
7
  /* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:E(e,a)})}),
8
8
  /* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
9
- /* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function I(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function D({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:I,onSelect:D,recent:H,onRecord:K,favorites:R,hotkey:M=!0}={}){const $=m().search,B=E??$.placeholder,[P,V]=h(!1),[S,W]=h(""),[z,F]=h(0),G=f(null),{results:U,truncatedTypes:O,loading:Y,failure:q,reset:J}=L(S,l,2);y(()=>{const e=e=>{M&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),V(e=>!e)),"Escape"===e.key&&P&&V(!1)},t=()=>V(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[P,M]),i(P);const[Q,X]=h(!1);P!==Q&&(X(P),P&&(W(""),F(0),J())),y(()=>{P?setTimeout(()=>G.current?.focus(),50):W("")},[P]),y(()=>{F(0)},[U]);const Z=S.length>=2,_=g(()=>Z?e(U,I,S,$.actions,{truncatedTypes:O,listRoutes:A,typeLabels:N,seeAllLabel:$.seeAll}):t({recent:H,favorites:R,actions:I,typeLabels:N},$),[Z,U,O,A,N,I,S,H,R,$]),ee=g(()=>r(_),[_]),te=Math.min(z,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{P&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[P,te,ee.length,re]);const ae=b(e=>{V(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||K?.(e.result),D?.(e.result)):e.action.onSelect()},[D,K]);return P?k(
10
- /* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>V(!1),children:[
9
+ /* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:R,onRecord:K,favorites:H,hotkey:M=!0}={}){const $=m().search,B=E??$.placeholder,[P,S]=h(!1),[V,W]=h(""),[z,F]=h(0),G=f(null),{results:O,truncatedTypes:Q,loading:U,failure:Y,reset:q}=L(V,l,2);y(()=>{const e=e=>{M&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),S(e=>!e)),"Escape"===e.key&&P&&S(!1)},t=()=>S(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[P,M]),i(P);const[J,X]=h(!1);P!==J&&(X(P),P&&(W(""),F(0),q())),y(()=>{P?setTimeout(()=>G.current?.focus(),50):W("")},[P]),y(()=>{F(0)},[O]);const Z=V.length>=2,_=g(()=>Z?e(O,D,V,$.actions,{truncatedTypes:Q,listRoutes:A,typeLabels:N,seeAllLabel:$.seeAll}):t({recent:R,favorites:H,actions:D,typeLabels:N},$),[Z,O,Q,A,N,D,V,R,H,$]),ee=g(()=>r(_),[_]),te=Math.min(z,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{P&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[P,te,ee.length,re]);const ae=b(e=>{S(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||K?.(e.result),I?.(e.result)):e.action.onSelect()},[I,K]);return P?k(
10
+ /* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>S(!1),children:[
11
11
  /* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
12
12
  /* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:p(),children:[
13
13
  /* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
14
14
  /* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
15
- /* @__PURE__ */w("input",{ref:G,type:"text",value:S,onChange:e=>{W(e.target.value),F(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),F(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),F(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),F(s(_.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:B,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),Y&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":$.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
15
+ /* @__PURE__ */w("input",{ref:G,type:"text",value:V,onChange:e=>{W(e.target.value),F(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),F(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),F(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),F(s(_.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:B,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),U&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":$.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
16
16
  /* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:$.escBadge})]}),
17
- /* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[Y&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!Y&&"all"===q&&Z&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:$.searchFailed}),!Y&&Z&&0===ee.length&&"all"!==q&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.noResults}),ne&&/* @__PURE__ */w(T,{sections:_,activeIdx:te,listId:re,label:$.listLabel,typeIcons:o,groupCount:$.groupCount,groupLabel:$.groupLabel,onHover:F,onPick:ae}),!Y&&"some"===q&&Z&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:$.partialFailure}),!Y&&!Z&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.minChars(2)})]}),
17
+ /* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[U&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!U&&"all"===Y&&Z&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:$.searchFailed}),!U&&Z&&0===ee.length&&"all"!==Y&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.noResults}),ne&&/* @__PURE__ */w(T,{sections:_,activeIdx:te,listId:re,label:$.listLabel,typeIcons:o,groupCount:$.groupCount,groupLabel:$.groupLabel,onHover:F,onPick:ae}),!U&&"some"===Y&&Z&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:$.partialFailure}),!U&&!Z&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.minChars(2)})]}),
18
18
  /* @__PURE__ */v("div",{className:"flex items-center justify-between px-4 py-2 border-t border-line-subtle bg-surface-sunken text-2xs text-ink-faintest",children:[
19
19
  /* @__PURE__ */v("div",{className:"flex items-center gap-3",children:[
20
20
  /* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
@@ -24,4 +24,4 @@ return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-
24
24
  /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.enterKey}),` ${$.open}`]}),_.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
25
25
  /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.tabKey}),` ${$.nextGroup}`]})]}),
26
26
  /* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
27
- /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.escKey}),` ${$.close}`]})]})]})]}),document.body):null}export{D as GlobalSearch,I as openGlobalSearch};
27
+ /* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.escKey}),` ${$.close}`]})]})]})]}),document.body):null}export{I as GlobalSearch,D as openGlobalSearch};
@@ -1,4 +1,4 @@
1
- import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-SXHV5OLA.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{useBrowserState as a}from"./chunk-WCCS4VFE.js";import{useShellStrings as i}from"./chunk-IUVGHHR3.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
1
+ import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-LC2UF3AA.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{useBrowserState as a}from"./chunk-WCCS4VFE.js";import{useShellStrings as i}from"./chunk-NRHG4R2Q.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
2
2
  /* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
3
3
  /* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),C=c(null),I=c(l);I.current=l,s(()=>{if(j&&d)return j.report(S,()=>I.current,C.current)},[j,d,S]);const L=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
4
4
  /* @__PURE__ */m("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
@@ -1,4 +1,4 @@
1
- import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
1
+ import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-NRHG4R2Q.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
2
2
  return i("div",{className:n,children:/* @__PURE__ */s("svg",{width:"100%",height:o,viewBox:`0 0 ${a} ${o}`,role:"img","aria-label":p,"aria-busy":"true",children:[
3
3
  /* @__PURE__ */i("defs",{children:/* @__PURE__ */s("linearGradient",{id:d,x1:"0",y1:"0",x2:"1",y2:"0",children:[
4
4
  /* @__PURE__ */i("stop",{offset:"0%",stopColor:r.surface,stopOpacity:"0"}),
@@ -1,9 +1,9 @@
1
- import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-IUVGHHR3.js";import{formatPercent as i}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var s=e=>Math.max(0,Math.min(1,e));function o({value:o,segments:m,objective:u,label:d,detail:c,formatValue:h,tone:f,className:x,unavailableLabel:b}){const v=a().charts,g=t(),p=h??(e=>i(100*e,1,g)),N=b??v.notEnough;if(null==o||!Number.isFinite(o))/* @__PURE__ */
1
+ import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-NRHG4R2Q.js";import{formatPercent as i}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var s=e=>Math.max(0,Math.min(1,e));function o({value:o,segments:m,objective:u,label:d,detail:c,formatValue:h,tone:f,className:x,unavailableLabel:b}){const v=a().charts,g=t(),N=h??(e=>i(100*e,1,g)),p=b??v.notEnough;if(null==o||!Number.isFinite(o))/* @__PURE__ */
2
2
  return n("div",{className:x,children:[d&&/* @__PURE__ */r("p",{className:"text-sm font-medium text-gray-700",children:d}),
3
- /* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:N})]});const j=s(o),y=null==u||o>=u,k=f??(y?"good":"critical"),w=e[k],$=[m?.length?m.map(e=>`${e.label} ${p(e.value)}`).join(" · "):"",c??"",null!=u?(y?v.objectiveMet:v.objectiveMissed)(p(u)):""].filter(Boolean).join(" · ");/* @__PURE__ */
3
+ /* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:p})]});const j=s(o),y=null==u||o>=u,k=f??(y?"good":"critical"),w=e[k],$=[m?.length?m.map(e=>`${e.label} ${N(e.value)}`).join(" · "):"",c??"",null!=u?(y?v.objectiveMet:v.objectiveMissed)(N(u)):""].filter(Boolean).join(" · ");/* @__PURE__ */
4
4
  return n("div",{className:x,children:[
5
5
  /* @__PURE__ */n("div",{className:"mb-2 flex items-baseline justify-between gap-3",children:[
6
6
  /* @__PURE__ */r("span",{className:"text-sm font-medium text-gray-700",children:d}),
7
- /* @__PURE__ */r("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:p(o)})]}),
8
- /* @__PURE__ */n("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*j).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":p(o),"aria-label":d,children:[
7
+ /* @__PURE__ */r("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:N(o)})]}),
8
+ /* @__PURE__ */n("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*j).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":N(o),"aria-label":d,children:[
9
9
  /* @__PURE__ */r("div",m?.length?{className:"flex h-full overflow-hidden rounded-full",children:m.map((l,a)=>/* @__PURE__ */r("div",{className:"h-full shrink-0"+(a===m.length-1?" rounded-r-full":""),style:{width:`${(100*s(l.value)).toFixed(2)}%`,backgroundColor:e[l.tone??(0===a?k:"neutral")]}},`${l.label}-${a}`))}:{className:"h-full rounded-full",style:{width:`${(100*j).toFixed(2)}%`,backgroundColor:w}}),null!=u&&/* @__PURE__ */r("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*s(u)).toFixed(2)}%`,height:20,backgroundColor:l.axis},"aria-hidden":"true"})]}),$&&/* @__PURE__ */r("p",{className:"mt-2 text-xs text-ink-faint",children:$})]})}export{o as Meter};
@@ -0,0 +1,6 @@
1
+ import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as l,usePopupLevel as t,usePopupLevelBindings as i,windowScrimStyle as a,OverlayLayerProvider as o,scrimHasCorners as n,CloseButton as s,popupLayerStyle as d,POPUP_GUTTER as c}from"./chunk-CJQPC2P3.js";import{useDiscardGuard as m}from"./chunk-UAXL44HH.js";import{dialogA11y as p}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as u}from"./chunk-UVHXVSB2.js";import{useFocusTrap as f,useScrollLock as h}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as x,DESCRIPTION_TEXT as v,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{useHydrated as w}from"./chunk-WCCS4VFE.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as $}from"./chunk-NRHG4R2Q.js";import{useRef as g,useId as N,useState as j,useEffect as k}from"react";import{createPortal as C}from"react-dom";import{jsxs as H,Fragment as W,jsx as U}from"react/jsx-runtime";var V=`calc(100% - ${2*c}px)`,B="grid grid-cols-[minmax(0,1fr)_auto]",A="bg-black/30 backdrop-blur-sm",D={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl",full:"max-w-none"};function E({open:c,onClose:E,title:G,description:Q,role:T="dialog",children:Z,footer:_,headerActions:F,blocking:J=!1,size:P="md",aside:R=!1,dirty:S=!1,initialFocus:X,"aria-label":Y,"aria-labelledby":z,"aria-describedby":I,className:L=""}){const O=g(null),q=N(),K=N(),M=!J,ee="full"===P,re=ee||null!=F,le=Boolean(G||Q),te=N();$().dialog;const ie=e(w()),[ae,oe]=j(null),ne=m({open:c,dirty:S,onClose:E,title:G,layer:ae}),se=g(null),de=r(c&&null!==ie,se),ce=l(de,O),me=t(c&&null!==ie,se),pe=i(me,ae),ue=a(me),fe=null!==me.host;if(u(c),f(O,c&&null!==ie,X,pe),h(c),k(()=>{if(c)return y(()=>!pe.current?.(document.activeElement)&&(J||ne(),!0),()=>O.current)},[c,J,ne,pe]),!c||!ie)return null;/* @__PURE__ */
2
+ return H(W,{children:[/* @__PURE__ */U("span",{ref:se,hidden:!0,"data-popup-anchor":""}),C(
3
+ /* @__PURE__ */U(o,{value:ae,children:/* @__PURE__ */H("div",{ref:oe,className:"fixed inset-0"+(R?" pointer-events-none opacity-0":fe?" pointer-events-none":""),style:d(me),role:"presentation","data-overlay-layer":"","data-aside":R?"":void 0,children:[!fe&&/* @__PURE__ */U("div",{className:`fixed inset-0 ${A}`,"aria-hidden":"true","data-popup-scrim":"system"}),ue&&/* @__PURE__ */U("div",{className:`fixed ${A}${R?"":" pointer-events-auto"}${n(me)?" rounded-(--radius-window)":""}`,style:ue,onClick:J?void 0:ne,"aria-hidden":"true","data-popup-scrim":"window"}),
4
+ /* @__PURE__ */U("div",{className:de?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:J||fe?void 0:e=>{e.target===e.currentTarget&&ne()},children:/* @__PURE__ */H("div",{ref:O,"data-popup-panel":"",style:de?{left:ce?.left??0,top:ce?.top??0,visibility:ce?void 0:"hidden",width:V,[ee?"height":"maxHeight"]:V}:void 0,...p({role:T,modal:!0,titleId:G?te:void 0,labelledBy:z,label:Y}),"aria-describedby":I??(Q?K:Z?q:void 0),className:(ee?`${de?"absolute":"relative h-full w-full max-h-full"} ${D[P]} ${B} grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden rounded-(--radius-popup) ${b}`:`${de?"absolute":"relative max-h-full w-full"} ${D[P]}${re?` ${B} content-start gap-x-2`:""} overflow-y-auto overscroll-contain rounded-(--radius-card) ${b} p-6`)+`${fe&&!R?" pointer-events-auto":""} ${L}`.trimEnd(),children:[ee?le&&
5
+ /* @__PURE__ */H("div",{className:"col-start-1 row-start-1 flex min-h-(--row-height-window-bar) flex-col justify-center border-b border-line py-2 pl-6 pr-4",children:[G&&/* @__PURE__ */U("h2",{id:te,className:x,children:G}),Q&&/* @__PURE__ */U("p",{id:K,className:`${G?"mt-1 ":""}${v}`,children:Q})]}):G&&/* @__PURE__ */U("h2",{id:te,className:`${re?"col-start-1 row-start-1 ":M?"pr-8 ":""}${x}`,children:G}),!ee&&Q&&/* @__PURE__ */U("p",{id:K,className:`${re?"col-start-1 ":""}${G?"mt-1":M&&!re?"pr-8":""} ${v}`.trim(),children:Q}),Z&&/* @__PURE__ */U("div",{id:q,className:ee?"col-span-2 row-start-2 min-h-0 overflow-auto":(re?"col-span-2 ":"")+"mt-2 text-sm text-gray-600",children:Z}),_&&/* @__PURE__ */U("div",{className:ee?"col-span-2 row-start-3 flex flex-wrap justify-end gap-3 border-t border-line px-6 py-4":(re?"col-span-2 ":"")+"mt-6 flex flex-wrap justify-end gap-3",children:_}),re?
6
+ /* @__PURE__ */H("div",{className:"col-start-2 row-start-1 flex items-center gap-1 "+(ee?(le?"border-b border-line ":"")+"pr-3":"-mr-3 -mt-3 self-start"),children:[F,M&&/* @__PURE__ */U(s,{onClose:ne})]}):M&&/* @__PURE__ */U(s,{onClose:ne,className:"absolute right-3 top-3"})]})})]})}),ie)]})}export{E as Dialog};
@@ -0,0 +1,2 @@
1
+ import{CartesianPlot as t}from"./chunk-S4RD6UJU.js";import{binValues as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-NRHG4R2Q.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const R=e().charts,v=i(),w=d??(t=>Number.isInteger(t)?m(t,v):n(t,1,v)),A=x??(t=>m(t,v)),L=g??R.countAxis,N=k??R.distribution,M=h??o(c??[],s),U=a(0,b,f),C=M.map(t=>w(t.from)),Q=M.map(t=>t.count);/* @__PURE__ */
2
+ return l(t,{labels:C,values:Q,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:A,yAxisLabel:L,className:y,emptyLabel:j,ariaLabel:R.histogram(N,M.length,(c??[]).length),tooltip:t=>/* @__PURE__ */l(r,{title:`${w(M[t].from)} – ${w(M[t].to)}`,rows:[{key:"count",label:R.observations,color:U,value:A(M[t].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:M.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:U,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
@@ -0,0 +1,6 @@
1
+ import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-72UHB4JU.js";import{IconButton_default as a}from"./chunk-NWS5G7FE.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{Tooltip as n}from"./chunk-F2RAIGCG.js";import{useShellStrings as s}from"./chunk-NRHG4R2Q.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
2
+ return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":R,windows:S,className:j="",layout:A="grid"}){const I=s().textToolbar,q=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!q.words&&!q.paragraph)return null;const B=m(n,k,x,q.cells.paragraph),U=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,$=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:U(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:U(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,G=l(I),L=e.map(e=>[e,G[e],r(e)]),H=C?e.filter(e=>C.allow.includes(e)):[],K=C&&H.includes(C.value)?C.value:H[0],T=[["none",I.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",I.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",I.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],E=x&&B?g(I.clear,/* @__PURE__ */i(a,{className:U(!1),"aria-label":I.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,F=/* @__PURE__ */t(d,{children:[$("bold",I.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),$("italic",I.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),$("underline",I.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),$("strike",I.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(I.color,/* @__PURE__ */i(a,{pressed:k.open,className:U(k.open,"rosh-tb-color"),"aria-label":I.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,$("link",I.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),$("sup",I.sup,/* @__PURE__ */i(o,{name:"superscript"})),$("sub",I.sub,/* @__PURE__ */i(o,{name:"subscript"})),$("code",I.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===B?E:null]}),O=/* @__PURE__ */t(d,{children:[C&&H.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.alignment,onKeyDown:e=>p(e,H,e=>C.onChange(e)),children:L.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:U(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===K?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(I.bullet,/* @__PURE__ */i(a,{className:U("bullet"===D.pressed),"aria-label":I.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(I.number,/* @__PURE__ */i(a,{className:U("number"===D.pressed),"aria-label":I.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,$("quote",I.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.letterCase,onKeyDown:e=>p(e,T.map(([e])=>e),e=>M.onChange(e)),children:T.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:U(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===B?E:null]}),J="row"===A,P=J?" is-row":q.flow?" is-flow":q.oneRow?" is-one-row":q.words&&void 0===N&&"words"!==B?" is-eight":"",Q=b(n,Boolean(k)),V={"--rosh-tb-color-col":String(Q.color),"--rosh-tb-link-col":String(Q.link),...J?{"--rosh-tb-cells":String(q.cells.words+q.cells.paragraph),"--rosh-tb-groupgap":q.words&&q.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let W;return W=J?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:O}):null]}):q.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[F,
3
+ /* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),O]}):q.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
4
+ /* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}),
5
+ /* @__PURE__ */i("div",{className:"rosh-tb-para",children:O})]}):/* @__PURE__ */t(d,{children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==B?" is-eight":""),children:F}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:O}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${P} ${j}`.trim(),style:V,children:[
6
+ /* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":R??I.formatting,children:W}),S]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};