efficient-shell 8.20.0 → 8.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/README.md +4 -3
  2. package/dist/{Browser-KK4DSPFA.js → Browser-WJ7YGO3M.js} +14 -14
  3. package/dist/Calculator-FHN36ZE3.js +29 -0
  4. package/dist/{CurrencyConverter-PD2CEL6V.js → CurrencyConverter-ONCRQNI4.js} +9 -9
  5. package/dist/{Documents-QRU3INP2.js → Documents-YEMIR4WQ.js} +5 -5
  6. package/dist/{Files-NQBM46JA.js → Files-QWSOYRD4.js} +25 -25
  7. package/dist/{Notepad-KU2VK5QB.js → Notepad-MFVUGAGD.js} +10 -10
  8. package/dist/PdfViewer-ZFZ4PEAV.js +1 -0
  9. package/dist/{PomodoroTimer-JEQTTMGA.js → PomodoroTimer-JVQ5K7B4.js} +68 -68
  10. package/dist/{Preview-C6VU5P3N.js → Preview-7G2WM7DN.js} +44 -44
  11. package/dist/Sidebar-OFRMBB5V.js +43 -0
  12. package/dist/{Spreadsheet-HLH3EHCX.js → Spreadsheet-VKOS3PUA.js} +13 -13
  13. package/dist/{Stock-VCMJMUCW.js → Stock-TWJNCTNT.js} +3 -3
  14. package/dist/{Weather-HF3E3N3M.js → Weather-RM7GPLAH.js} +16 -16
  15. package/dist/{WorldClock-PM5CJQSL.js → WorldClock-ITJ2MO75.js} +6 -6
  16. package/dist/ai/index.js +17 -17
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/charts/BoxPlotChart.js +1 -1
  21. package/dist/charts/CandlestickChart.js +1 -1
  22. package/dist/charts/CartesianPlot.js +1 -1
  23. package/dist/charts/ChartBrush.js +1 -1
  24. package/dist/charts/ChartFrame.js +1 -1
  25. package/dist/charts/ChartSkeleton.js +1 -1
  26. package/dist/charts/ChordChart.js +1 -1
  27. package/dist/charts/ColumnChart.js +1 -1
  28. package/dist/charts/FunnelChart.js +1 -1
  29. package/dist/charts/HeatmapChart.js +1 -1
  30. package/dist/charts/HistogramChart.js +1 -1
  31. package/dist/charts/Meter.js +1 -1
  32. package/dist/charts/PieChart.js +1 -1
  33. package/dist/charts/RadarChart.js +1 -1
  34. package/dist/charts/RadialBarChart.js +1 -1
  35. package/dist/charts/RangeChart.js +1 -1
  36. package/dist/charts/RankedBars.js +1 -1
  37. package/dist/charts/SankeyChart.js +1 -1
  38. package/dist/charts/ScatterChart.js +1 -1
  39. package/dist/charts/StatTile.js +1 -1
  40. package/dist/charts/SunburstChart.js +1 -1
  41. package/dist/charts/TimeSeriesChart.js +1 -1
  42. package/dist/charts/TreemapChart.js +1 -1
  43. package/dist/charts/WaterfallChart.js +1 -1
  44. package/dist/chunk-22S6LG6D.js +6 -0
  45. package/dist/{chunk-CQXKO5PB.js → chunk-24L7NLA3.js} +1 -1
  46. package/dist/{chunk-O3HXASSH.js → chunk-2BS74SYW.js} +1 -1
  47. package/dist/{chunk-THPTJGV5.js → chunk-2H6PDKTC.js} +7 -7
  48. package/dist/chunk-36MUTG34.js +1 -0
  49. package/dist/{chunk-VWVFKMU7.js → chunk-3HNK7IRJ.js} +3 -3
  50. package/dist/{chunk-KSSIZW3C.js → chunk-3PQHPFXP.js} +5 -5
  51. package/dist/{chunk-5TVF4BCM.js → chunk-3Z7LIHMB.js} +1 -1
  52. package/dist/chunk-4CANQ3B3.js +1 -0
  53. package/dist/{chunk-UEUCGC6G.js → chunk-4CWKK5HV.js} +4 -4
  54. package/dist/chunk-4IU5BSVE.js +2 -0
  55. package/dist/chunk-4PZN25MV.js +20 -0
  56. package/dist/{chunk-RC5SGXXR.js → chunk-4VK3GJZI.js} +1 -1
  57. package/dist/chunk-4XOTP5CB.js +2 -0
  58. package/dist/{chunk-PXCARPLZ.js → chunk-55WFJELE.js} +1 -1
  59. package/dist/{chunk-MRBC7GLE.js → chunk-5Z2WLSFM.js} +15 -15
  60. package/dist/{chunk-KB6BGPQK.js → chunk-6GVJ6IKD.js} +1 -1
  61. package/dist/{chunk-7T3COEQK.js → chunk-6KO5VTL7.js} +1 -1
  62. package/dist/{chunk-AZWEWGYG.js → chunk-6V753BUI.js} +3 -3
  63. package/dist/{chunk-FOSCSAJZ.js → chunk-735HKUTV.js} +1 -1
  64. package/dist/chunk-73DAZUJP.js +14 -0
  65. package/dist/{chunk-C6LV3HJW.js → chunk-7DKPJUGU.js} +1 -1
  66. package/dist/{chunk-IGH6DECG.js → chunk-7M7ESM5V.js} +12 -12
  67. package/dist/{chunk-UEMGH6EO.js → chunk-7S2I6ACG.js} +1 -1
  68. package/dist/{chunk-RZT7QES5.js → chunk-A4U4BTN3.js} +4 -4
  69. package/dist/{chunk-EQZAHIUG.js → chunk-ACZZXO5S.js} +2 -2
  70. package/dist/{chunk-5GMWOYTF.js → chunk-AH2AUQYM.js} +1 -1
  71. package/dist/{chunk-AILWMDWP.js → chunk-AJ42UE53.js} +1 -1
  72. package/dist/{chunk-XDG2RWUO.js → chunk-AX7KPMDV.js} +2 -2
  73. package/dist/{chunk-B36HEVMT.js → chunk-AXZEINMF.js} +19 -19
  74. package/dist/{chunk-OAYHU7YN.js → chunk-B4XPFCCQ.js} +2 -2
  75. package/dist/{chunk-JSOO4O5K.js → chunk-B55IXYDR.js} +2 -2
  76. package/dist/chunk-B5VOHZCD.js +1 -0
  77. package/dist/{chunk-MVCNSGM4.js → chunk-BIS5PHHV.js} +2 -2
  78. package/dist/{chunk-3V6UFR7M.js → chunk-BXM72C73.js} +1 -1
  79. package/dist/{chunk-X3II54HU.js → chunk-CDRXZBVR.js} +1 -1
  80. package/dist/{chunk-6SBPGUSR.js → chunk-CFLVEKSH.js} +1 -1
  81. package/dist/{chunk-FBSQABH2.js → chunk-CMYLTCPA.js} +1 -1
  82. package/dist/{chunk-YZCRHDOB.js → chunk-CU2B7G5A.js} +1 -1
  83. package/dist/{chunk-P5QRK7WD.js → chunk-CUT7PAXL.js} +1 -1
  84. package/dist/{chunk-5SULG7D5.js → chunk-D323R2FT.js} +1 -1
  85. package/dist/{chunk-AK632G3F.js → chunk-D5HHU5AO.js} +7 -7
  86. package/dist/{chunk-UELYZT4T.js → chunk-DIKOEJ2Y.js} +1 -1
  87. package/dist/{chunk-CVNM25BM.js → chunk-DLCIGDKC.js} +6 -6
  88. package/dist/chunk-DLS2VCBK.js +3 -0
  89. package/dist/{chunk-QSPW43OC.js → chunk-DMLJOBQS.js} +8 -8
  90. package/dist/chunk-DNKACLRF.js +11 -0
  91. package/dist/{chunk-D6FSZBJ5.js → chunk-DO6XTJ77.js} +1 -1
  92. package/dist/chunk-DZT2O3JD.js +11 -0
  93. package/dist/{chunk-KZ6P7WC6.js → chunk-EAEUSMYL.js} +1 -1
  94. package/dist/{chunk-XSFQR374.js → chunk-ECZT7SIE.js} +1 -1
  95. package/dist/{chunk-VYKITRFG.js → chunk-EDQBTPDF.js} +7 -7
  96. package/dist/{chunk-XBXEK6XP.js → chunk-EKWSGPJ4.js} +7 -7
  97. package/dist/{chunk-JJ6IUIYX.js → chunk-EL3O7ZFQ.js} +1 -1
  98. package/dist/chunk-ERFM5U3M.js +12 -0
  99. package/dist/{chunk-TLJCUUZU.js → chunk-ET32NQHX.js} +1 -1
  100. package/dist/chunk-ETSKG62F.js +1 -0
  101. package/dist/{chunk-XDAR2DSX.js → chunk-EXMFUK3A.js} +8 -8
  102. package/dist/chunk-F2Z6IXMM.js +2 -0
  103. package/dist/{chunk-KS3AQKHD.js → chunk-FPDKMCQH.js} +7 -7
  104. package/dist/{chunk-TF3E5J3Y.js → chunk-GI7FOLDX.js} +1 -1
  105. package/dist/{chunk-DCNXCFAD.js → chunk-H7ZXUGXX.js} +26 -26
  106. package/dist/{chunk-ZLHF5XRR.js → chunk-HJIBTA6V.js} +9 -9
  107. package/dist/{chunk-Z6V3EY6F.js → chunk-HVVPBAP5.js} +3 -3
  108. package/dist/chunk-HYFHCPNJ.js +15 -0
  109. package/dist/{chunk-DBLJIK5J.js → chunk-IAQC775L.js} +1 -1
  110. package/dist/{chunk-J67YIQEN.js → chunk-IGCXJHAK.js} +1 -1
  111. package/dist/{chunk-DBDJQVQM.js → chunk-IJA5ZAGL.js} +1 -1
  112. package/dist/{chunk-YUIWG2QT.js → chunk-IKNNHEVY.js} +1 -1
  113. package/dist/{chunk-EXVR3BWW.js → chunk-IMF537IJ.js} +9 -9
  114. package/dist/{chunk-TKBP5HRY.js → chunk-IPOSLLLU.js} +12 -12
  115. package/dist/{chunk-VXWCX65A.js → chunk-IURSUMDO.js} +8 -8
  116. package/dist/{chunk-7SPX7DLO.js → chunk-IY3CRZRH.js} +16 -16
  117. package/dist/chunk-JGE7S7RQ.js +29 -0
  118. package/dist/{chunk-H5GQWWPA.js → chunk-JYOI66DT.js} +1 -1
  119. package/dist/chunk-K4DZWCUP.js +8 -0
  120. package/dist/{chunk-42BBJJDP.js → chunk-KIBL6M3T.js} +10 -5
  121. package/dist/chunk-KPFOXLN4.js +5 -0
  122. package/dist/chunk-KZEQJVBO.js +3 -0
  123. package/dist/chunk-L2HZ7YXS.js +14 -0
  124. package/dist/chunk-L2YW3END.js +4 -0
  125. package/dist/{chunk-RYC3ZHXM.js → chunk-L65EQCZN.js} +5 -5
  126. package/dist/{chunk-KATRRQD5.js → chunk-L6FLPBU2.js} +5 -5
  127. package/dist/{chunk-3WM23XSR.js → chunk-LDFRVV5R.js} +8 -8
  128. package/dist/{chunk-3KDY6V6I.js → chunk-LMLM4KHQ.js} +8 -8
  129. package/dist/{chunk-LMOPRRQY.js → chunk-LQQMELJM.js} +12 -12
  130. package/dist/{chunk-CQAXN3HN.js → chunk-LVSPLCGG.js} +1 -1
  131. package/dist/{chunk-WGSIYW63.js → chunk-M5BFTFBK.js} +15 -15
  132. package/dist/{chunk-ZDJNTOUS.js → chunk-MEOICYR5.js} +1 -1
  133. package/dist/{chunk-CDBS47XI.js → chunk-MFEJ6TYE.js} +1 -1
  134. package/dist/{chunk-U62AWCZR.js → chunk-MHYOQMBV.js} +1 -1
  135. package/dist/{chunk-RHYMHVFS.js → chunk-MKITHLDU.js} +9 -9
  136. package/dist/chunk-MOOBUMON.js +9 -0
  137. package/dist/{chunk-R6L6PKQP.js → chunk-MTSZ66O4.js} +1 -1
  138. package/dist/{chunk-Q6YPDR7U.js → chunk-MWAYM46R.js} +12 -12
  139. package/dist/{chunk-CHNYSP6K.js → chunk-N6DTTOB6.js} +1 -1
  140. package/dist/{chunk-XXBGWT7L.js → chunk-N7VNKAXZ.js} +1 -1
  141. package/dist/{chunk-F5VXS5JO.js → chunk-NBVF2CXM.js} +1 -1
  142. package/dist/{chunk-VO3HT6IK.js → chunk-NDTMQRR2.js} +1 -1
  143. package/dist/{chunk-MQADQ4YF.js → chunk-NKJDOQVW.js} +1 -1
  144. package/dist/{chunk-QKHTL3FQ.js → chunk-NNKMEF3D.js} +1 -1
  145. package/dist/{chunk-3AVHOYQZ.js → chunk-NRDO5IHL.js} +1 -1
  146. package/dist/{chunk-Q2S76TZH.js → chunk-NSCLFAKK.js} +1 -1
  147. package/dist/{chunk-EVPOZQOI.js → chunk-OCCHDMEV.js} +1 -1
  148. package/dist/chunk-OF6TUQAL.js +7 -0
  149. package/dist/{chunk-DAV7SMCJ.js → chunk-OSSFYFXO.js} +1 -1
  150. package/dist/{chunk-F22KWATP.js → chunk-OSVN2UF7.js} +1 -1
  151. package/dist/{chunk-3RM3D2P3.js → chunk-OTU633XJ.js} +6 -6
  152. package/dist/{chunk-KE6NYTGF.js → chunk-OZF4QAJT.js} +3 -3
  153. package/dist/{chunk-HME2P5VX.js → chunk-OZPYTSPD.js} +23 -23
  154. package/dist/{chunk-MBXTOYMX.js → chunk-P7WUDHIP.js} +6 -6
  155. package/dist/{chunk-ZNZDV6SN.js → chunk-PG6AVBSR.js} +1 -1
  156. package/dist/{chunk-UPHXYWL6.js → chunk-PJCVNFWM.js} +11 -11
  157. package/dist/{chunk-J324R2BM.js → chunk-PTDLNTSK.js} +13 -13
  158. package/dist/{chunk-N7KL336H.js → chunk-PVSGQN5M.js} +6 -6
  159. package/dist/{chunk-47MFBFIX.js → chunk-PWOFYFMO.js} +6 -6
  160. package/dist/{chunk-RQ5RVKRO.js → chunk-QEVIQZIE.js} +2 -2
  161. package/dist/{chunk-4MTC6HA5.js → chunk-RAAUW5OZ.js} +2 -2
  162. package/dist/{chunk-E2YGQAFU.js → chunk-RAI3GTS6.js} +1 -1
  163. package/dist/chunk-RAQESAQZ.js +3 -0
  164. package/dist/{chunk-5JQCPUEO.js → chunk-RCRI6QZV.js} +1 -1
  165. package/dist/{chunk-G3IG4X4Z.js → chunk-RDPUVCXR.js} +1 -1
  166. package/dist/{chunk-4TER5BHR.js → chunk-RZBHO74V.js} +1 -1
  167. package/dist/{chunk-MKTO2FHK.js → chunk-SAKHGHF5.js} +1 -1
  168. package/dist/{chunk-4G5M752L.js → chunk-SXSMIMFY.js} +3 -3
  169. package/dist/{chunk-JSB5G2XQ.js → chunk-THDSOVEH.js} +2 -2
  170. package/dist/{chunk-CHOMUTLT.js → chunk-TT3S2XVQ.js} +1 -1
  171. package/dist/chunk-TW6WEYGO.js +8 -0
  172. package/dist/{chunk-XUK35DKG.js → chunk-U5I7IF72.js} +1 -1
  173. package/dist/{chunk-IM7QHAXT.js → chunk-UFVQ7ZBP.js} +5 -5
  174. package/dist/{chunk-QSW26NAH.js → chunk-UQBPKZUR.js} +1 -1
  175. package/dist/{chunk-F4PESM6A.js → chunk-UY47AKZU.js} +6 -6
  176. package/dist/{chunk-4TL3MRRE.js → chunk-VH6GB73Q.js} +1 -1
  177. package/dist/{chunk-2GPXC6JX.js → chunk-VHAM5TD2.js} +1 -1
  178. package/dist/{chunk-5VUVKP55.js → chunk-VOHZQVFK.js} +6 -6
  179. package/dist/chunk-VT62T6B3.js +19 -0
  180. package/dist/{chunk-IH4SVMXJ.js → chunk-VX4BNYH3.js} +2 -2
  181. package/dist/{chunk-O43QLNPL.js → chunk-VY7EPQEG.js} +1 -1
  182. package/dist/chunk-WBEMN4JG.js +9 -0
  183. package/dist/{chunk-TQP3L4OC.js → chunk-WDXJWC3Y.js} +5 -5
  184. package/dist/{chunk-E4O2ZMXF.js → chunk-WJEDIAG4.js} +1 -1
  185. package/dist/{chunk-7HTURXIA.js → chunk-WRJDHFLD.js} +3 -3
  186. package/dist/chunk-X4EBWJWO.js +1 -0
  187. package/dist/{chunk-4FOTTLL7.js → chunk-XVJCVYDI.js} +2 -2
  188. package/dist/{chunk-NGVODCMV.js → chunk-XWH6KVVB.js} +3 -3
  189. package/dist/chunk-Y5ZWPU4L.js +14 -0
  190. package/dist/{chunk-7RD623PT.js → chunk-YGEK2Z6P.js} +1 -1
  191. package/dist/{chunk-55DONELU.js → chunk-YSHS6QIY.js} +6 -6
  192. package/dist/{chunk-ABD5X73I.js → chunk-YTGWIMXB.js} +1 -1
  193. package/dist/{chunk-2SHDXTB6.js → chunk-YVBFFE4Z.js} +5 -5
  194. package/dist/{chunk-B5MOPSMW.js → chunk-ZBLNVAZ4.js} +3 -3
  195. package/dist/{chunk-BIEKHPZ5.js → chunk-ZDK2JYH5.js} +52 -52
  196. package/dist/{chunk-FFZ7KPIV.js → chunk-ZKOIGLRF.js} +7 -7
  197. package/dist/data/DataTable.js +1 -1
  198. package/dist/data/Kanban.js +1 -1
  199. package/dist/data/ListFooter.js +1 -1
  200. package/dist/data/ListLoadError.js +1 -1
  201. package/dist/data/Pagination.js +1 -1
  202. package/dist/file-intake/index.js +1 -1
  203. package/dist/format/index.js +1 -1
  204. package/dist/forms/AlignmentGrid.js +1 -1
  205. package/dist/forms/BorderInput.js +1 -1
  206. package/dist/forms/BrandAssetEditor.js +1 -1
  207. package/dist/forms/Button.js +1 -1
  208. package/dist/forms/Calendar.js +1 -1
  209. package/dist/forms/ColorPicker.js +1 -1
  210. package/dist/forms/ComposerAttachments.js +1 -1
  211. package/dist/forms/CornersInput.js +1 -1
  212. package/dist/forms/DatePicker.js +1 -1
  213. package/dist/forms/DateRangePicker.js +1 -1
  214. package/dist/forms/DateTimePicker.js +1 -1
  215. package/dist/forms/DisplayChips.js +1 -1
  216. package/dist/forms/FilePicker.js +1 -1
  217. package/dist/forms/FormErrorSummary.js +1 -1
  218. package/dist/forms/IconButton.js +1 -1
  219. package/dist/forms/IconPicker.js +1 -1
  220. package/dist/forms/ImageFocusPoint.js +1 -1
  221. package/dist/forms/InputNumber.js +1 -1
  222. package/dist/forms/LinkPicker.js +1 -1
  223. package/dist/forms/MediaLibrary.d.ts +157 -0
  224. package/dist/forms/MediaLibrary.js +2 -0
  225. package/dist/forms/MediaUploadField.js +1 -1
  226. package/dist/forms/MediaUploadGrid.d.ts +54 -3
  227. package/dist/forms/MediaUploadGrid.js +1 -1
  228. package/dist/forms/MediaUsedInList.js +1 -1
  229. package/dist/forms/NumericKeypad.js +1 -1
  230. package/dist/forms/PictureTiles.js +1 -1
  231. package/dist/forms/PositionInput.js +1 -1
  232. package/dist/forms/Segmented.js +1 -1
  233. package/dist/forms/Select.js +1 -1
  234. package/dist/forms/SidesInput.js +1 -1
  235. package/dist/forms/Slider.js +1 -1
  236. package/dist/forms/Snippet.js +1 -1
  237. package/dist/forms/SplitButton.js +1 -1
  238. package/dist/forms/TagInput.js +1 -1
  239. package/dist/forms/TextToolbar.js +1 -1
  240. package/dist/forms/TimePicker.js +1 -1
  241. package/dist/forms/WidthsBar.js +1 -1
  242. package/dist/forms/mediaLibraryMenu.d.ts +64 -0
  243. package/dist/forms/mediaLibraryMenu.js +2 -0
  244. package/dist/forms/mediaMoveItems.d.ts +42 -3
  245. package/dist/forms/mediaMoveItems.js +1 -1
  246. package/dist/forms/useFileIntake.js +1 -1
  247. package/dist/icons/efficient-glyphs.js +1 -1
  248. package/dist/icons/efficient-looks.js +1 -1
  249. package/dist/icons/efficient.js +1 -1
  250. package/dist/icons/index.js +1 -1
  251. package/dist/icons/looks/map.js +1 -1
  252. package/dist/icons/sets.js +1 -1
  253. package/dist/index.d.ts +4 -2
  254. package/dist/index.js +424 -424
  255. package/dist/locales/zh-Hans.js +1 -1
  256. package/dist/map/index.js +6 -6
  257. package/dist/markdown/index.js +1 -1
  258. package/dist/page-tabs/index.js +5 -5
  259. package/dist/pdf/index.js +1 -1
  260. package/dist/shell/Accordion.js +1 -1
  261. package/dist/shell/AppUpdateBanner.js +1 -1
  262. package/dist/shell/Avatar.js +1 -1
  263. package/dist/shell/Banner.js +1 -1
  264. package/dist/shell/Breadcrumbs.js +1 -1
  265. package/dist/shell/BudgetBar.js +1 -1
  266. package/dist/shell/Card.js +1 -1
  267. package/dist/shell/ColoredBadge.js +1 -1
  268. package/dist/shell/ConfirmDialog.js +1 -1
  269. package/dist/shell/ContainerFillChart.js +1 -1
  270. package/dist/shell/ContextMenu.js +1 -1
  271. package/dist/shell/CountBadge.js +1 -1
  272. package/dist/shell/Dialog.js +1 -1
  273. package/dist/shell/Drawer.js +1 -1
  274. package/dist/shell/DropdownMenu.js +1 -1
  275. package/dist/shell/EditableGrid.js +1 -1
  276. package/dist/shell/EmptyState.js +1 -1
  277. package/dist/shell/GlobalSearch.js +1 -1
  278. package/dist/shell/HelpCenter.js +1 -1
  279. package/dist/shell/IconRail.js +1 -1
  280. package/dist/shell/ImageLightbox.js +1 -1
  281. package/dist/shell/LanguageSelect.js +1 -1
  282. package/dist/shell/Markdown.js +1 -1
  283. package/dist/shell/MetricBar.js +1 -1
  284. package/dist/shell/MetricBarLegend.js +1 -1
  285. package/dist/shell/MilestoneTimeline.js +1 -1
  286. package/dist/shell/PageHeader.js +1 -1
  287. package/dist/shell/PopupMenu.js +1 -1
  288. package/dist/shell/ProductionTimeline.js +1 -1
  289. package/dist/shell/ResizeHandle.js +1 -1
  290. package/dist/shell/Result.js +1 -1
  291. package/dist/shell/SearchableSelect.js +1 -1
  292. package/dist/shell/SettingReset.js +1 -1
  293. package/dist/shell/SettingRow.js +1 -1
  294. package/dist/shell/SidebarLayout.js +1 -1
  295. package/dist/shell/SidebarNav.js +1 -1
  296. package/dist/shell/SortableList.js +1 -1
  297. package/dist/shell/Statistic.js +1 -1
  298. package/dist/shell/StatusBadge.js +1 -1
  299. package/dist/shell/StepChain.js +1 -1
  300. package/dist/shell/Stepper.js +1 -1
  301. package/dist/shell/Tabs.js +1 -1
  302. package/dist/shell/TimeAgo.js +1 -1
  303. package/dist/shell/TimelineTrack.js +1 -1
  304. package/dist/shell/Tooltip.d.ts +9 -1
  305. package/dist/shell/Tooltip.js +1 -1
  306. package/dist/shell/TopNav.js +1 -1
  307. package/dist/shell/TransferProgress.js +1 -1
  308. package/dist/shell/Tree.js +1 -1
  309. package/dist/shell/language.js +1 -1
  310. package/dist/shell/strings.d.ts +88 -0
  311. package/dist/shell/strings.js +1 -1
  312. package/dist/shell/toast.js +1 -1
  313. package/dist/telemetry/index.js +1 -1
  314. package/dist/templates/AuthScreen.js +1 -1
  315. package/dist/templates/ChatTemplate.js +1 -1
  316. package/dist/templates/CheckoutTemplate.js +1 -1
  317. package/dist/templates/DashboardTemplate.js +1 -1
  318. package/dist/templates/DataTablePage.js +1 -1
  319. package/dist/templates/EmailTemplate.js +1 -1
  320. package/dist/templates/ErrorBoundary.js +1 -1
  321. package/dist/templates/ErrorPage.js +1 -1
  322. package/dist/templates/FormLayoutPage.js +1 -1
  323. package/dist/templates/GalleryTemplate.js +1 -1
  324. package/dist/ui/index.d.ts +4 -2
  325. package/dist/ui/index.js +1 -1
  326. package/dist/version.js +1 -1
  327. package/package.json +1 -1
  328. package/dist/Calculator-PH6NVEEZ.js +0 -29
  329. package/dist/PdfViewer-GODDA4GG.js +0 -1
  330. package/dist/Sidebar-SJMMY2Y2.js +0 -43
  331. package/dist/chunk-2LXTJXWC.js +0 -6
  332. package/dist/chunk-36DYXGQI.js +0 -7
  333. package/dist/chunk-3NWCVZRK.js +0 -10
  334. package/dist/chunk-3P7SBAKK.js +0 -3
  335. package/dist/chunk-6UOMJ7E4.js +0 -2
  336. package/dist/chunk-ABDT4M5L.js +0 -19
  337. package/dist/chunk-BZWTFLQD.js +0 -15
  338. package/dist/chunk-CIGHIX6Z.js +0 -14
  339. package/dist/chunk-DAJTVAWO.js +0 -11
  340. package/dist/chunk-ENVCMR3M.js +0 -5
  341. package/dist/chunk-H5VGRHNT.js +0 -9
  342. package/dist/chunk-HLGE6TVE.js +0 -4
  343. package/dist/chunk-HMZLRXLA.js +0 -1
  344. package/dist/chunk-JH4W3R4Q.js +0 -11
  345. package/dist/chunk-KKZZAK76.js +0 -1
  346. package/dist/chunk-LYLEH25Y.js +0 -1
  347. package/dist/chunk-NI76QOA2.js +0 -2
  348. package/dist/chunk-NZ67C5OK.js +0 -12
  349. package/dist/chunk-OHSJWKNV.js +0 -14
  350. package/dist/chunk-Q75PSCZ5.js +0 -20
  351. package/dist/chunk-SIQSD3QT.js +0 -8
  352. package/dist/chunk-TCB2J3PS.js +0 -9
  353. package/dist/chunk-UDD7GB4F.js +0 -2
  354. package/dist/chunk-WMO2JQNL.js +0 -8
  355. package/dist/chunk-WOHOIJRZ.js +0 -3
  356. package/dist/chunk-X7ZBGXUU.js +0 -1
  357. /package/dist/{chunk-PCGZS6S4.js → chunk-276AUQNN.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{DAY_MS as e,fmtSliderDate as t}from"./chunk-YDEIXM2A.js";import{calendarNames as n}from"./chunk-5OTS2G3M.js";import{stagger as r}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserValueOnce as a}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-KKZZAK76.js";import{useRef as c,useState as d,useId as u,useEffect as m,useCallback as h,useLayoutEffect as p}from"react";import{jsx as x,jsxs as f,Fragment as y}from"react/jsx-runtime";var k={receipt:/* @__PURE__ */f(y,{children:[
1
+ import{DAY_MS as e,fmtSliderDate as t}from"./chunk-YDEIXM2A.js";import{calendarNames as n}from"./chunk-5OTS2G3M.js";import{stagger as r}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserValueOnce as a}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-ETSKG62F.js";import{useRef as c,useState as d,useId as u,useEffect as m,useCallback as h,useLayoutEffect as p}from"react";import{jsx as x,jsxs as f,Fragment as y}from"react/jsx-runtime";var k={receipt:/* @__PURE__ */f(y,{children:[
2
2
  /* @__PURE__ */x("path",{d:"M3.4 1.9h5.2v7.2l-1.3-.9-1.3.9-1.3-.9-1.3.9z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
3
3
  /* @__PURE__ */x("path",{d:"M4.9 4.4h2.2M4.9 6.1h2.2",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]}),check:/* @__PURE__ */x("path",{d:"M2.6 6.3 4.9 8.6 9.4 3.6",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"}),doc:/* @__PURE__ */f(y,{children:[
4
4
  /* @__PURE__ */x("path",{d:"M3.5 1.9h3.4l2 2v6.2H3.5z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
@@ -13,20 +13,20 @@ return x("svg",{viewBox:"0 0 12 12","aria-hidden":"true",children:k[e]})}functio
13
13
  return f("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[
14
14
  /* @__PURE__ */x("path",{d:"M4.2 2.2v11.6"}),
15
15
  /* @__PURE__ */x("path",{d:"M4.2 3.1h7.4l-1.6 2.5 1.6 2.6H4.2z"})]})}function v(){/* @__PURE__ */
16
- return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,n={}){const r=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(r<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=n.maxTimeShare??.3,i=Math.min(n.breakPx??48,r),o=n.minGapPx??48,c=[],d=[],u=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),d.push(a>0?t/a*r:0),u.push(a>0&&t/a>s)}const m=u.filter(Boolean).length,h=Math.max(0,r-m*i);let p=0,x=0;for(let e=0;e<c.length;e++)u[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>u[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,n){const r=e.slice();let l=0;for(let e=0;e<r.length;e++)t[e]||r[e]>=n-b||(l+=n-r[e],r[e]=n);if(l<=b)return r;let a=0;for(let e=0;e<r.length;e++)!t[e]&&r[e]>n+b&&(a+=r[e]-n);if(a<=b)return r;const s=Math.min(l,a);for(let e=0;e<r.length;e++)t[e]||r[e]<=n+b||(r[e]-=s*(r[e]-n)/a);return r}(f,u,o),k=y.reduce((e,t,n)=>u[n]?e:e+t,0),g=y.map((e,t)=>u[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=r;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:d[t],clampedPx:f[t],px:M[t+1]-e,compressed:u[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return r;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const n=l[t+1]-l[t],r=n>0?(e-l[t])/n:0;return M[t]+r*(M[t+1]-M[t])}return r},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),r);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const n=M[e+1]-M[e],r=n>0?(t-M[e])/n:0;return l[e]+r*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,n){return Math.max(0,Math.min(e-t/2,Math.max(0,n-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,n)=>Math.min(Math.max(e,t),n),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const n=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:n,ms:e.msByPx(n)}}var K={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function L(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var D=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},F={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function j(e,t,n){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(n?"flag":void 0)}function R(e,t,n=!1){const r=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];r.diamond&&l.push("is-diamond"),n&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":r.token??"var(--tl-accent)",s="dot"===t||n?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function O(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}var U="undefined"==typeof document?m:p;function H(e,t){const[n,r]=d(0);return U(()=>{const n=t?e.current:null;if(!n)return;const l=()=>{const e=n.getBoundingClientRect().width;e>0&&r(e)};if(l(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(l);return a.observe(n),()=>{a.disconnect()}},[e,t]),n}function I(e,t,n){const r=/* @__PURE__ */new Map;for(const e of t)Number.isFinite(e.x)&&r.set(e.x,Math.max(r.get(e.x)??0,e.widthPx));const l=[...r.keys()].sort((e,t)=>e-t);if(n<=0||l.length<2)return e;const a=Math.max(0,l[0]),s=Math.min(n,l[l.length-1]),i=s-a,o=[];for(let e=0;e+1<l.length;e++){const t=(r.get(l[e])??0)/2+(r.get(l[e+1])??0)/2+8;o.push(Math.max(28,t,l[e+1]-l[e]))}const c=o.reduce((e,t)=>e+t,0),d=Math.min(Math.max(c,i),.8*n);if(d<=i+.5)return e;const u=a,m=n-s,h=u+m,p=Math.max(0,n-d),x=h>0?p*u/h:0,f=x,y=x+d,k=o.map(e=>c>0?e*d/c:0),g=e=>{if(e<=a)return u>0?e*x/u:f;if(e>=s)return m>0?y+(e-s)*(n-y)/m:y;let t=f;for(let n=0;n+1<l.length;n++){if(e>l[n+1]){t+=k[n];continue}const r=l[n+1]-l[n];return t+(r>0?(e-l[n])/r*k[n]:0)}return y};return{anchorsMs:e.anchorsMs,xs:e.xs.map(g),gaps:e.gaps.map(e=>({...e,fromPx:g(e.fromPx),toPx:g(e.toPx),px:g(e.toPx)-g(e.fromPx)})),xByMs:t=>g(e.xByMs(t)),msByPx:t=>e.msByPx((e=>{if(e<=f)return x>0?e*u/x:a;if(e>=y)return n-y>0?s+(e-y)*m/(n-y):s;let t=f;for(let n=0;n+1<l.length;n++){if(!(e>t+k[n]))return l[n]+(k[n]>0?(e-t)/k[n]*(l[n+1]-l[n]):0);t+=k[n]}return s})(t)),inCut:e.inCut}}function S(e){if(!e||0===e.length)return null;const t=e.filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:null}function z({marks:e,innerRef:t}){/* @__PURE__ */
16
+ return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,n={}){const r=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(r<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=n.maxTimeShare??.3,i=Math.min(n.breakPx??48,r),o=n.minGapPx??48,c=[],d=[],u=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),d.push(a>0?t/a*r:0),u.push(a>0&&t/a>s)}const m=u.filter(Boolean).length,h=Math.max(0,r-m*i);let p=0,x=0;for(let e=0;e<c.length;e++)u[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>u[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,n){const r=e.slice();let l=0;for(let e=0;e<r.length;e++)t[e]||r[e]>=n-b||(l+=n-r[e],r[e]=n);if(l<=b)return r;let a=0;for(let e=0;e<r.length;e++)!t[e]&&r[e]>n+b&&(a+=r[e]-n);if(a<=b)return r;const s=Math.min(l,a);for(let e=0;e<r.length;e++)t[e]||r[e]<=n+b||(r[e]-=s*(r[e]-n)/a);return r}(f,u,o),k=y.reduce((e,t,n)=>u[n]?e:e+t,0),g=y.map((e,t)=>u[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=r;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:d[t],clampedPx:f[t],px:M[t+1]-e,compressed:u[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return r;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const n=l[t+1]-l[t],r=n>0?(e-l[t])/n:0;return M[t]+r*(M[t+1]-M[t])}return r},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),r);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const n=M[e+1]-M[e],r=n>0?(t-M[e])/n:0;return l[e]+r*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,n){return Math.max(0,Math.min(e-t/2,Math.max(0,n-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,n)=>Math.min(Math.max(e,t),n),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const n=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:n,ms:e.msByPx(n)}}var L={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function D(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var K=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},F={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function j(e,t,n){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(n?"flag":void 0)}function R(e,t,n=!1){const r=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];r.diamond&&l.push("is-diamond"),n&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":r.token??"var(--tl-accent)",s="dot"===t||n?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function O(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}var U="undefined"==typeof document?m:p;function H(e,t){const[n,r]=d(0);return U(()=>{const n=t?e.current:null;if(!n)return;const l=()=>{const e=n.getBoundingClientRect().width;e>0&&r(e)};if(l(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(l);return a.observe(n),()=>{a.disconnect()}},[e,t]),n}function I(e,t,n){const r=/* @__PURE__ */new Map;for(const e of t)Number.isFinite(e.x)&&r.set(e.x,Math.max(r.get(e.x)??0,e.widthPx));const l=[...r.keys()].sort((e,t)=>e-t);if(n<=0||l.length<2)return e;const a=Math.max(0,l[0]),s=Math.min(n,l[l.length-1]),i=s-a,o=[];for(let e=0;e+1<l.length;e++){const t=(r.get(l[e])??0)/2+(r.get(l[e+1])??0)/2+8;o.push(Math.max(28,t,l[e+1]-l[e]))}const c=o.reduce((e,t)=>e+t,0),d=Math.min(Math.max(c,i),.8*n);if(d<=i+.5)return e;const u=a,m=n-s,h=u+m,p=Math.max(0,n-d),x=h>0?p*u/h:0,f=x,y=x+d,k=o.map(e=>c>0?e*d/c:0),g=e=>{if(e<=a)return u>0?e*x/u:f;if(e>=s)return m>0?y+(e-s)*(n-y)/m:y;let t=f;for(let n=0;n+1<l.length;n++){if(e>l[n+1]){t+=k[n];continue}const r=l[n+1]-l[n];return t+(r>0?(e-l[n])/r*k[n]:0)}return y};return{anchorsMs:e.anchorsMs,xs:e.xs.map(g),gaps:e.gaps.map(e=>({...e,fromPx:g(e.fromPx),toPx:g(e.toPx),px:g(e.toPx)-g(e.fromPx)})),xByMs:t=>g(e.xByMs(t)),msByPx:t=>e.msByPx((e=>{if(e<=f)return x>0?e*u/x:a;if(e>=y)return n-y>0?s+(e-y)*m/(n-y):s;let t=f;for(let n=0;n+1<l.length;n++){if(!(e>t+k[n]))return l[n]+(k[n]>0?(e-t)/k[n]*(l[n+1]-l[n]):0);t+=k[n]}return s})(t)),inCut:e.inCut}}function S(e){if(!e||0===e.length)return null;const t=e.filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:null}function z({marks:e,innerRef:t}){/* @__PURE__ */
17
17
  return x("div",{ref:t,"aria-hidden":"true",className:"rosh-tl-measure",children:e.map(e=>/* @__PURE__ */f("div",{"data-lane-key":e.key,className:"rosh-tl-measure-box",children:[
18
18
  /* @__PURE__ */x("span",{className:"rosh-tl-name",children:e.label}),
19
- /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})}function W({startMs:t,endMs:r,axis:l,geo:a,reveal:s}){const c=i().timeline,d=n(o()),u=a.ruler,m=[],h=[],p=l.gaps.filter(e=>e.compressed),y=new Date(t);y.setUTCDate(y.getUTCDate()+(8-y.getUTCDay())%7);for(let t=y.getTime();t<r;t+=7*e){if(l.inCut(t))continue;const n=l.xByMs(t);l.xByMs(t+7*e)-n<14||m.push(
20
- /* @__PURE__ */x("i",{className:"rosh-tl-tick is-week",style:{left:`${n}px`,top:`${u}px`,height:"3px"}},`wk-${t}`))}const k=p.map(t=>{const n=(t.fromPx+t.toPx)/2,r=D(c.days(Math.round(t.gapMs/e)))/2+6;return[n-r,n+r]}),g=(e,t)=>k.some(([n,r])=>e<r&&t>n);m.push(
19
+ /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})}function E({startMs:t,endMs:r,axis:l,geo:a,reveal:s}){const c=i().timeline,d=n(o()),u=a.ruler,m=[],h=[],p=l.gaps.filter(e=>e.compressed),y=new Date(t);y.setUTCDate(y.getUTCDate()+(8-y.getUTCDay())%7);for(let t=y.getTime();t<r;t+=7*e){if(l.inCut(t))continue;const n=l.xByMs(t);l.xByMs(t+7*e)-n<14||m.push(
20
+ /* @__PURE__ */x("i",{className:"rosh-tl-tick is-week",style:{left:`${n}px`,top:`${u}px`,height:"3px"}},`wk-${t}`))}const k=p.map(t=>{const n=(t.fromPx+t.toPx)/2,r=K(c.days(Math.round(t.gapMs/e)))/2+6;return[n-r,n+r]}),g=(e,t)=>k.some(([n,r])=>e<r&&t>n);m.push(
21
21
  /* @__PURE__ */x("i",{"data-timeline-part":"start-tick",className:"rosh-tl-tick",style:{left:"0px",top:`${u}px`,height:"6px"}},"start"));const M=new Date(t);M.setUTCDate(1);let v=-1/0,b=!0;for(;M.getTime()<r;){const e=M.getTime();if(!(e<=t)&&!l.inCut(e)){const t=l.xByMs(e);if(m.push(
22
- /* @__PURE__ */x("i",{className:"rosh-tl-tick",style:{left:`${t}px`,top:`${u}px`,height:"6px"}},`mo-${e}`)),t-v>=72||b){const n=b||0===M.getUTCMonth()?d.shortMonthYear(M.getUTCFullYear(),M.getUTCMonth()):d.monthsShort[M.getUTCMonth()];g(t,t+D(n))||(h.push(
22
+ /* @__PURE__ */x("i",{className:"rosh-tl-tick",style:{left:`${t}px`,top:`${u}px`,height:"6px"}},`mo-${e}`)),t-v>=72||b){const n=b||0===M.getUTCMonth()?d.shortMonthYear(M.getUTCFullYear(),M.getUTCMonth()):d.monthsShort[M.getUTCMonth()];g(t,t+K(n))||(h.push(
23
23
  /* @__PURE__ */x("span",{className:"rosh-tl-month"+(s?" rosh-tl-fade":""),style:{left:`${t}px`,top:`${u+9}px`,...s?{animationDelay:"420ms"}:{}},children:n},`mon-${e}`)),v=t,b=!1)}}M.setUTCMonth(M.getUTCMonth()+1)}/* @__PURE__ */
24
24
  return f("div",{"aria-hidden":"true","data-timeline-part":"ruler",children:[m,h,p.map(t=>{const n=Math.max(1,Math.round(t.gapMs/e));/* @__PURE__ */
25
25
  return f("span",{"data-timeline-part":"break",className:"rosh-tl-rulercut"+(s?" rosh-tl-fade":""),style:{left:(t.fromPx+t.toPx)/2+"px",top:`${u}px`,...s?{animationDelay:"420ms"}:{}},children:[
26
26
  /* @__PURE__ */f("span",{className:"rosh-tl-cutglyph",children:[
27
27
  /* @__PURE__ */x("i",{}),
28
28
  /* @__PURE__ */x("i",{})]}),
29
- /* @__PURE__ */x("span",{children:c.days(n)})]},`cut-${t.fromMs}`)})]})}function E({pending:e,reveal:t}){const n=i().timeline,[r,l]=d(!1),a=r?e:e.slice(0,2),s=e.length-a.length;/* @__PURE__ */
29
+ /* @__PURE__ */x("span",{children:c.days(n)})]},`cut-${t.fromMs}`)})]})}function W({pending:e,reveal:t}){const n=i().timeline,[r,l]=d(!1),a=r?e:e.slice(0,2),s=e.length-a.length;/* @__PURE__ */
30
30
  return f("div",{className:"rosh-tl-pending","data-timeline-part":"pending",children:[
31
31
  /* @__PURE__ */x("p",{className:"rosh-tl-pending-head",children:n.notReached}),
32
32
  /* @__PURE__ */x("ol",{className:"rosh-tl-ghosts","aria-label":n.notReached,children:a.map((e,r)=>/* @__PURE__ */f("li",{className:t?"rosh-tl-fade":void 0,style:t?{animationDelay:440+60*r+"ms"}:void 0,children:[
@@ -41,7 +41,7 @@ return f("li",{className:s?"rosh-tl-fade":void 0,style:s?r(t,c):void 0,...e.key=
41
41
  /* @__PURE__ */x("span",{className:"rosh-tl-name",children:e.label}),
42
42
  /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]})]},e.key)})}),p>0&&/* @__PURE__ */f("p",{className:"rosh-tl-vgap","aria-hidden":"true",children:[
43
43
  /* @__PURE__ */x("i",{className:"rosh-tl-vline is-dash"}),
44
- /* @__PURE__ */x("span",{children:m.daysToToday(p)})]}),n.length>0&&/* @__PURE__ */x(E,{pending:n,reveal:s})]})}function V({axis:e,geo:t,fillTo:n,reveal:r,trackPx:l,tweened:a=!1}){/* @__PURE__ */
44
+ /* @__PURE__ */x("span",{children:m.daysToToday(p)})]}),n.length>0&&/* @__PURE__ */x(W,{pending:n,reveal:s})]})}function V({axis:e,geo:t,fillTo:n,reveal:r,trackPx:l,tweened:a=!1}){/* @__PURE__ */
45
45
  return f("div",{"aria-hidden":"true",children:[
46
46
  /* @__PURE__ */x("div",{className:"rosh-tl-rail bg-gray-200",style:{top:`${t.rail}px`,height:"6px",width:`${l}px`}}),null!==n&&/* @__PURE__ */x("div",{"data-timeline-part":"fill",className:`rosh-tl-fill bg-blue-600${a?" is-tweened":""}${r?" rosh-tl-draw":""}`,style:{top:`${t.rail}px`,height:"6px",width:`${Math.max(0,Math.min(e.xByMs(n),l))}px`}}),e.gaps.filter(e=>e.compressed).map(e=>/* @__PURE__ */f("div",{className:"rosh-tl-cut",style:{left:(e.fromPx+e.toPx)/2+"px",top:`${t.rail}px`,height:"6px"},children:[
47
47
  /* @__PURE__ */x("i",{}),
@@ -50,12 +50,12 @@ return f("div",{"aria-hidden":"true","data-timeline-part":"start",children:[
50
50
  /* @__PURE__ */x("i",{className:`rosh-tl-start${r?" is-around":""}${i}`,style:{left:"0px",top:`${e.rail+3}px`,...o}}),null!=t&&!1!==t&&/* @__PURE__ */x("span",{className:`rosh-tl-edge${i}`,"data-timeline-part":"start-caption",style:{left:"0px",top:`${s}px`,...o},children:t}),null!=n&&!1!==n&&/* @__PURE__ */x("span",{className:`rosh-tl-edge is-end${i}`,"data-timeline-part":"end-caption",style:{left:`${a}px`,top:`${s}px`,...o},children:n})]})}function Y({x:e,geo:t,trackPx:n,label:r,reveal:l}){const a=i().timeline;/* @__PURE__ */
51
51
  return f("div",{"aria-hidden":"true","data-timeline-part":"today",children:[
52
52
  /* @__PURE__ */x("div",{className:"rosh-tl-todayline"+(l?" rosh-tl-fade":""),style:{left:`${e}px`,top:`${t.laneA}px`,height:t.ruler+20-t.laneA+"px",...l?{animationDelay:"420ms"}:{}}}),
53
- /* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(r),style:{left:`${w(e,48,n)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function Z({nodes:e,geo:t,reveal:n}){const r=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of r){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,n=D(t)/2;a&&e.x-n<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+n):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+n})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(n?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...n?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function _({phase:e,geo:t,xOf:n}){const r=n(e.minMs),l=Math.max(n(e.maxMs)-r,4);/* @__PURE__ */
53
+ /* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(r),style:{left:`${w(e,48,n)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function _({nodes:e,geo:t,reveal:n}){const r=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of r){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,n=K(t)/2;a&&e.x-n<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+n):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+n})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(n?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...n?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function q({phase:e,geo:t,xOf:n}){const r=n(e.minMs),l=Math.max(n(e.maxMs)-r,4);/* @__PURE__ */
54
54
  return f("div",{"aria-hidden":"true","data-timeline-part":"phase",children:[
55
55
  /* @__PURE__ */x("div",{className:"rosh-tl-phase border-gray-300",style:{left:`${r}px`,width:`${l}px`,top:t.laneB+t.laneH-4+"px"}}),
56
- /* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${r+l/2}px`,top:`${t.laneB+t.laneH+5}px`},children:[e.label," · parallel"]})]})}function q({nodes:e,trackPx:t,geo:n,activeKey:r,hoveredKey:l,currentKey:a}){const s=i().timeline,o=(e,t)=>null!==t&&(e.key===t||e.members.some(e=>e.key===t)),c=e.find(e=>e.key===l)??e.find(e=>o(e,r))??null;if(!c)return null;const d=c.mark,u=d?d.label:`×${c.members.length}`,m=d?d.dateText:function(e){const t=e[0].dateText,n=e[e.length-1].dateText;return t===n?t:`${t} – ${n}`}(c.members),h=d?d.widthPx:N(u,m),p=d?.onOpen;/* @__PURE__ */
56
+ /* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${r+l/2}px`,top:`${t.laneB+t.laneH+5}px`},children:[e.label," · parallel"]})]})}function J({nodes:e,trackPx:t,geo:n,activeKey:r,hoveredKey:l,currentKey:a}){const s=i().timeline,o=(e,t)=>null!==t&&(e.key===t||e.members.some(e=>e.key===t)),c=e.find(e=>e.key===l)??e.find(e=>o(e,r))??null;if(!c)return null;const d=c.mark,u=d?d.label:`×${c.members.length}`,m=d?d.dateText:function(e){const t=e[0].dateText,n=e[e.length-1].dateText;return t===n?t:`${t} – ${n}`}(c.members),h=d?d.widthPx:N(u,m),p=d?.onOpen;/* @__PURE__ */
57
57
  return f("div",{"data-timeline-part":"label",className:`rosh-tl-label${c.key===l?" is-hot":""}${o(c,a)?" is-current":""}`,style:{left:`${w(c.x,h,t)}px`,top:`${n.laneB}px`,width:`${h}px`,height:`${n.laneH}px`},children:[p?/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-name rosh-tl-open","data-timeline-part":"open","aria-label":s.open(u),onClick:p,children:u}):/* @__PURE__ */x("span",{className:"rosh-tl-name","aria-hidden":"true",children:u}),
58
- /* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:m})]})}function J({groups:t,trackPx:n,geo:r,startMs:l,endMs:a,currentKey:s,hoveredKey:i,reveal:o,step:c,zoomedKey:d,popId:u,aimBubble:m,openCluster:h,setOpenCluster:p,previewCluster:k,setPreviewCluster:g,setZoomKey:M,startCaptionPx:v}){const b=[];t.forEach((e,t)=>{if("cluster"===e.type){const r=`cluster-${e.members[0].key}`,l=(n=e.members,`${(n[0]?.label??"").replace(/\s*v?\d+$/i,"").trim()||(n[0]?.label??"")} ×${n.length}`);if(b.push({key:r,group:e,text:l,x:e.members.reduce((e,t)=>e+t.baseX,0)/e.members.length,index:t,lane:-1,left:0,widthPx:Math.ceil(D(l))+28}),r===d)for(const n of e.members)b.push({key:n.key,group:{type:"item",mark:n},text:n.label,x:n.x,index:t,lane:-1,left:0,widthPx:n.widthPx});return}var n;b.push({key:e.mark.key,group:e,text:e.mark.label,x:e.mark.x,index:t,lane:-1,left:0,widthPx:e.mark.widthPx})}),b.sort((e,t)=>e.x-t.x);const $=function(e,t,n,r,l={}){const a=t>0?t:0,s=r>0?r:1,i=l.gapPx??6,o=Math.max(1,l.laneCount??4),c=e.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.priority??0)-(t.item.priority??0)||e.item.ms-t.item.ms||e.index-t.index),d=Array.from({length:o},()=>[]),u=/* @__PURE__ */new Map;for(const{item:e}of c){const t=Math.max(0,e.widthPx);if(a<=0||t>a){u.set(e.key,-1);continue}const r=e.xPx??(e.ms-n)/s*a,l=Math.min(Math.max(r-t/2,0),a-t),c=l+t;let m=-1;for(let e=0;e<o;e++)if(d[e].every(e=>l>e.right+i||c+i<e.left)){d[e].push({left:l,right:c}),m=e;break}u.set(e.key,m)}return e.map(e=>({key:e.key,lane:u.get(e.key)??-1}))}([...v>0?[{key:"__rosh-tl-start__",ms:l,xPx:0,widthPx:v,priority:-2}]:[],...b.map(e=>({key:e.key,ms:"cluster"===e.group.type?e.group.members[0].ms:e.group.mark.ms,xPx:e.x,widthPx:e.widthPx,priority:"cluster"===e.group.type?-1:0}))],n,l,Math.max(a-l,e),{laneCount:2}),P=new Map($.map(e=>[e.key,e.lane]));for(const e of b)e.lane=P.get(e.key)??-1,e.left=w(e.x,e.widthPx,n);const N=b.find(e=>e.key===(h??k)),C=e=>0===e?r.laneA:r.laneB,T=e=>0===e?r.rail-4:r.rail+6+3;/* @__PURE__ */
58
+ /* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:m})]})}function Z({groups:t,trackPx:n,geo:r,startMs:l,endMs:a,currentKey:s,hoveredKey:i,reveal:o,step:c,zoomedKey:d,popId:u,aimBubble:m,openCluster:h,setOpenCluster:p,previewCluster:k,setPreviewCluster:g,setZoomKey:M,startCaptionPx:v}){const b=[];t.forEach((e,t)=>{if("cluster"===e.type){const r=`cluster-${e.members[0].key}`,l=(n=e.members,`${(n[0]?.label??"").replace(/\s*v?\d+$/i,"").trim()||(n[0]?.label??"")} ×${n.length}`);if(b.push({key:r,group:e,text:l,x:e.members.reduce((e,t)=>e+t.baseX,0)/e.members.length,index:t,lane:-1,left:0,widthPx:Math.ceil(K(l))+28}),r===d)for(const n of e.members)b.push({key:n.key,group:{type:"item",mark:n},text:n.label,x:n.x,index:t,lane:-1,left:0,widthPx:n.widthPx});return}var n;b.push({key:e.mark.key,group:e,text:e.mark.label,x:e.mark.x,index:t,lane:-1,left:0,widthPx:e.mark.widthPx})}),b.sort((e,t)=>e.x-t.x);const $=function(e,t,n,r,l={}){const a=t>0?t:0,s=r>0?r:1,i=l.gapPx??6,o=Math.max(1,l.laneCount??4),c=e.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.priority??0)-(t.item.priority??0)||e.item.ms-t.item.ms||e.index-t.index),d=Array.from({length:o},()=>[]),u=/* @__PURE__ */new Map;for(const{item:e}of c){const t=Math.max(0,e.widthPx);if(a<=0||t>a){u.set(e.key,-1);continue}const r=e.xPx??(e.ms-n)/s*a,l=Math.min(Math.max(r-t/2,0),a-t),c=l+t;let m=-1;for(let e=0;e<o;e++)if(d[e].every(e=>l>e.right+i||c+i<e.left)){d[e].push({left:l,right:c}),m=e;break}u.set(e.key,m)}return e.map(e=>({key:e.key,lane:u.get(e.key)??-1}))}([...v>0?[{key:"__rosh-tl-start__",ms:l,xPx:0,widthPx:v,priority:-2}]:[],...b.map(e=>({key:e.key,ms:"cluster"===e.group.type?e.group.members[0].ms:e.group.mark.ms,xPx:e.x,widthPx:e.widthPx,priority:"cluster"===e.group.type?-1:0}))],n,l,Math.max(a-l,e),{laneCount:2}),P=new Map($.map(e=>[e.key,e.lane]));for(const e of b)e.lane=P.get(e.key)??-1,e.left=w(e.x,e.widthPx,n);const N=b.find(e=>e.key===(h??k)),C=e=>0===e?r.laneA:r.laneB,T=e=>0===e?r.rail-4:r.rail+6+3;/* @__PURE__ */
59
59
  return f(y,{children:[b.map(e=>{const t=Math.max(0,e.lane),n=Math.round(e.index*c+60);if("cluster"===e.group.type){const l=h===e.key,a=e.group.members.map(e=>e.x),s=()=>{g(null),l||M(null)};/* @__PURE__ */
60
60
  return f("div",{children:[
61
61
  /* @__PURE__ */f("button",{type:"button","data-timeline-part":"cluster",className:`rosh-tl-pill${A[e.group.kind]?.token?"":" text-blue-600"}${o?" rosh-tl-fade":""}`,"aria-expanded":l,"aria-controls":u,style:{left:`${e.left}px`,top:`${0===t?r.laneA+r.laneH-19:r.laneB}px`,color:A[e.group.kind]?.token,...o?{animationDelay:`${n}ms`}:{}},onMouseEnter:()=>{g(e.key),M(e.key)},onMouseLeave:s,onFocus:()=>{g(e.key),M(e.key)},onBlur:s,onClick:()=>{p(l?null:e.key),M(l?null:e.key)},children:[
@@ -70,24 +70,24 @@ return f("div",{children:[
70
70
  /* @__PURE__ */x("p",{className:"rosh-tl-popover-head",children:N.text}),
71
71
  /* @__PURE__ */x("ol",{children:N.group.members.map(e=>/* @__PURE__ */f("li",{children:[
72
72
  /* @__PURE__ */x("span",{children:e.label}),
73
- /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})]})]})}function Q({thumb:n,value:r,snap:l,axis:a,geo:s,startMs:d,endMs:u,trackPx:m,layerRef:h,glide:p,onScrub:k,nodes:g,onProgress:M}){const v=i().timeline,b=o(),$=c(!1),P=p?p.px:a.xByMs(r),N=p?p.ms:r,T=S(n.stops),B=T?T.indexOf(r):-1,K=e=>{const t=h.current?.getBoundingClientRect();return t?a.msByPx(e-t.left):r},L=e=>{const t=l(e);t!==r&&n.onChange(t)},D=e=>{k?.(),$.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),n.onDragStart?.()},A=e=>{$.current&&($.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId),M(null),n.onDragEnd?.())},F=e=>{if(!$.current)return;const t=K(e.clientX);L(t),M(function(e,t){if(!Number.isFinite(t))return null;const n=e.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms);for(let e=0;e+1<n.length;e++){const r=n[e],l=n[e+1];if(t<r.ms||t>l.ms)continue;const a=l.ms-r.ms;return{fromKey:r.key,toKey:l.key,t:a>0?C((t-r.ms)/a,0,1):1,ms:t}}return null}(g,t))},j=n.valueText?n.valueText(N):t(N,b),R=Math.max(1,Math.round((u-d)/e));/* @__PURE__ */
73
+ /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})]})]})}function Q({thumb:n,value:r,snap:l,axis:a,geo:s,startMs:d,endMs:u,trackPx:m,layerRef:h,glide:p,onScrub:k,nodes:g,onProgress:M}){const v=i().timeline,b=o(),$=c(!1),P=p?p.px:a.xByMs(r),N=p?p.ms:r,T=S(n.stops),B=T?T.indexOf(r):-1,L=e=>{const t=h.current?.getBoundingClientRect();return t?a.msByPx(e-t.left):r},D=e=>{const t=l(e);t!==r&&n.onChange(t)},K=e=>{k?.(),$.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),n.onDragStart?.()},A=e=>{$.current&&($.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId),M(null),n.onDragEnd?.())},F=e=>{if(!$.current)return;const t=L(e.clientX);D(t),M(function(e,t){if(!Number.isFinite(t))return null;const n=e.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms);for(let e=0;e+1<n.length;e++){const r=n[e],l=n[e+1];if(t<r.ms||t>l.ms)continue;const a=l.ms-r.ms;return{fromKey:r.key,toKey:l.key,t:a>0?C((t-r.ms)/a,0,1):1,ms:t}}return null}(g,t))},j=n.valueText?n.valueText(N):t(N,b),R=Math.max(1,Math.round((u-d)/e));/* @__PURE__ */
74
74
  return f(y,{children:[
75
- /* @__PURE__ */x("div",{className:"rosh-tl-hit","aria-hidden":"true","data-timeline-part":"hit",style:{top:s.rail-9+"px",height:"24px"},onPointerDown:e=>{D(e),L(K(e.clientX))},onPointerMove:F,onPointerUp:A,onPointerCancel:A}),
75
+ /* @__PURE__ */x("div",{className:"rosh-tl-hit","aria-hidden":"true","data-timeline-part":"hit",style:{top:s.rail-9+"px",height:"24px"},onPointerDown:e=>{K(e),D(L(e.clientX))},onPointerMove:F,onPointerUp:A,onPointerCancel:A}),
76
76
  /* @__PURE__ */x("div",{className:"rosh-tl-chip","data-timeline-part":"chip",style:{left:`${w(P,88,m)+44}px`,top:`${s.tag}px`},children:n.chip?n.chip(N):t(N,b)}),
77
- /* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":n.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:R,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-d)/e),"aria-valuetext":j,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:D,onPointerMove:F,onPointerUp:A,onPointerCancel:A,onKeyDown:t=>{const n=(t=>{const{key:n}=t;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===n||"ArrowUp"===n?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===n||"ArrowDown"===n?T[Math.max(e-1,0)]:"Home"===n?T[0]:"End"===n?T[T.length-1]:null}const l=(t.shiftKey?7:1)*e;return"ArrowRight"===n||"ArrowUp"===n?r+l:"ArrowLeft"===n||"ArrowDown"===n?r-l:"Home"===n?d:"End"===n?u:null})(t);null!==n&&(t.preventDefault(),k?.(),L(n))}})]})}function ee(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function te({startMs:n,endMs:p,axis:k="linear",items:M,markers:v=[],pending:b=[],fillToMs:w,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:de=null,motion:ue=!0,ariaLabel:me,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=a(Date.now,null),ke=a(L,!1),ge=te??ye,Me=c(null),ve=i().timeline,be=o(),$e=e=>t(e,be),we=c(null),Pe=c(null),Ne=c(null),Ce=c(/* @__PURE__ */new Map),Te=c(void 0),Be=c(void 0),Ke=c(null),[Le,De]=d({}),[Ae,Fe]=d(null),[je,Re]=d(null),[Oe,Ue]=d(null),[He,Ie]=d(null),[Se,ze]=d(null),[We,Ee]=d(null),Xe=u(),Ve=u(),Ge=H(Me,!0),Ye=Ge>0?Ge-(b.length>0&&!fe?176:0):0,Ze=Ye>0&&Ye-20<320,_e=H(we,!Ze),qe=_e>0?_e:600,Je=K[ne],Qe=fe&&b.length>0,et=Qe?Math.max(0,qe-36):qe,tt=t=>t>=n-e&&t<=p+e,nt=M.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===k?v.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([n,...[...nt.map(e=>e.ms),...rt].filter(e=>e>n&&e<p),p],et,"compressed"===(at=k)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?F[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:j(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,D(e.caption??"")+6):Le[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),dt=v.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:Le[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),ut=Qe?(()=>{const t=b[b.length-1],n=b.slice(0,-1).map(e=>e.label);return[{key:t.key,ms:p+e,x:qe,baseX:qe,kind:t.kind??"default",label:t.label,dateText:ve.notReached,detail:n.length>0?ve.alsoToCome(n):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],mt=fe&&xe&&!Qe?[{key:xe.key,ms:p,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(p),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...dt,...ut,...mt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(n)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(D(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=Oe??He??Se,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):de?ht.filter(e=>e.ms>=de[0]&&e.ms<=de[1]).map(bt):[],wt=$t.length>1?I(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=Ze?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Kt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Kt.set(t.key,e.key);const Lt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Dt=Lt&&"cluster"===Lt.type?{from:Math.min(...Lt.members.map(e=>e.x))-16,to:Math.max(...Lt.members.map(e=>e.x))+16}:null,At=c(Ct),[Ft,jt]=d(!1);m(()=>{if(At.current===Ct)return;At.current=Ct,jt(!0);const e=setTimeout(()=>jt(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");U(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}De(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[Rt]);const Ot=`${ne}|${k}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ut,Ht]=d(Ot),It=ue&&Ut===Ot;m(()=>{Ut!==Ot&&Ht(Ot)},[Ut,Ot]);const St=Math.min(28,340/Math.max(1,ht.length-1)),zt=S(ae?.stops),Wt=e=>{const t=Math.min(Math.max(e,n),p);if(!zt)return t;let r=zt[0];for(const e of zt)Math.abs(e-t)<Math.abs(r-t)&&(r=e);return r},Et=ae?Wt(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),d=e.xByMs(o.ms),u=Math.max(0,d-c),m=u<=.5||n.reducedMotion?0:C(350*u/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:d,lengthPx:u,durationMs:m,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Gt,Yt]=d(null),Zt=c(null),_t=c({segments:Vt,value:Et,playback:se});m(()=>{_t.current={segments:Vt,value:Et,playback:se}});const qt=c(null),Jt=h(e=>{null===e&&null===qt.current||(qt.current=e,_t.current.playback?.onProgress?.(e))},[]),Qt=h(()=>{Zt.current=null,Yt(null),Jt(null),_t.current.playback?.onStop?.()},[Jt]),en=!!se?.playing&&!!ae;m(()=>{if(!en)return;const e=_t.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void Qt();Zt.current&&Zt.current.index===t||(Zt.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Yt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=Zt.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=Zt.current;if("rest"!==e?.phase)return;const t=_t.current.segments[e.index];t?(Zt.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):Qt()},i=e=>{const t=_t.current,n=Zt.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);Zt.current=s.cursor,s.at&&l(s.at),Jt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):Qt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),Zt.current&&(Zt.current.sinceMs=null,Jt(null))}},[en,Qt,Jt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Gt?Gt.ms:Et:void 0!==w?w:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=h(()=>{clearTimeout(Te.current),clearTimeout(Be.current),Fe(null),Re(null),Ue(null),Ie(null),ze(null)},[]);m(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),m(()=>{const e=Ke.current;e&&(Ke.current=null,Ce.current.get(e)?.focus())});const on=null!==je||null!==Oe||null!==He||null!==Se;m(()=>{if(on)return s(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=h((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,qe-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[qe]),dn=Bt.find(e=>e.key===je)??null,un=dn?dn.x:0;U(()=>{cn(Ne.current,un)},[cn,je,un]);const mn=Et??void 0,hn=c(null);m(()=>{if(void 0===mn)return;const e=wt.xByMs(mn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Kt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[mn]);const pn=Bt.map(e=>e.key),xn=ot?Kt.get(ot)??null:null,fn=We&&pn.includes(We)?We:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),Ee(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),ze(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},vn=e=>{Ct&&gt.get(e)===Ct?kn():(kn(),ze(null))},bn=e=>{clearTimeout(Te.current),Fe(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{Fe(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":O(e),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(O))),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];Ee(n.key),Ke.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(Ze)/* @__PURE__ */
78
- return x("div",{ref:Me,children:/* @__PURE__ */x(X,{marks:ht.filter(e=>!e.isCap),pending:b,currentKey:ot,todayMs:ge,reveal:It,ariaLabel:me,step:St,nodeProps:wn,onKeyDown:yn})});const Cn=(e,t)=>null==e||!1===e?null:/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-flank"+(t?" is-end":""),"data-timeline-part":t?"end-caption":"start-caption",style:{paddingTop:Je.rail-3+"px"},children:e});/* @__PURE__ */
77
+ /* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":n.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:R,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-d)/e),"aria-valuetext":j,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:F,onPointerUp:A,onPointerCancel:A,onKeyDown:t=>{const n=(t=>{const{key:n}=t;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===n||"ArrowUp"===n?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===n||"ArrowDown"===n?T[Math.max(e-1,0)]:"Home"===n?T[0]:"End"===n?T[T.length-1]:null}const l=(t.shiftKey?7:1)*e;return"ArrowRight"===n||"ArrowUp"===n?r+l:"ArrowLeft"===n||"ArrowDown"===n?r-l:"Home"===n?d:"End"===n?u:null})(t);null!==n&&(t.preventDefault(),k?.(),D(n))}})]})}function ee(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function te({startMs:n,endMs:p,axis:k="linear",items:M,markers:v=[],pending:b=[],fillToMs:w,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:de=null,motion:ue=!0,ariaLabel:me,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=a(Date.now,null),ke=a(D,!1),ge=te??ye,Me=c(null),ve=i().timeline,be=o(),$e=e=>t(e,be),we=c(null),Pe=c(null),Ne=c(null),Ce=c(/* @__PURE__ */new Map),Te=c(void 0),Be=c(void 0),Le=c(null),[De,Ke]=d({}),[Ae,Fe]=d(null),[je,Re]=d(null),[Oe,Ue]=d(null),[He,Ie]=d(null),[Se,ze]=d(null),[Ee,We]=d(null),Xe=u(),Ve=u(),Ge=H(Me,!0),Ye=Ge>0?Ge-(b.length>0&&!fe?176:0):0,_e=Ye>0&&Ye-20<320,qe=H(we,!_e),Je=qe>0?qe:600,Ze=L[ne],Qe=fe&&b.length>0,et=Qe?Math.max(0,Je-36):Je,tt=t=>t>=n-e&&t<=p+e,nt=M.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===k?v.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([n,...[...nt.map(e=>e.ms),...rt].filter(e=>e>n&&e<p),p],et,"compressed"===(at=k)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?F[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:j(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),dt=v.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),ut=Qe?(()=>{const t=b[b.length-1],n=b.slice(0,-1).map(e=>e.label);return[{key:t.key,ms:p+e,x:Je,baseX:Je,kind:t.kind??"default",label:t.label,dateText:ve.notReached,detail:n.length>0?ve.alsoToCome(n):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],mt=fe&&xe&&!Qe?[{key:xe.key,ms:p,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(p),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...dt,...ut,...mt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(n)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=Oe??He??Se,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):de?ht.filter(e=>e.ms>=de[0]&&e.ms<=de[1]).map(bt):[],wt=$t.length>1?I(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=_e?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=c(Ct),[Ft,jt]=d(!1);m(()=>{if(At.current===Ct)return;At.current=Ct,jt(!0);const e=setTimeout(()=>jt(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");U(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}Ke(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[Rt]);const Ot=`${ne}|${k}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ut,Ht]=d(Ot),It=ue&&Ut===Ot;m(()=>{Ut!==Ot&&Ht(Ot)},[Ut,Ot]);const St=Math.min(28,340/Math.max(1,ht.length-1)),zt=S(ae?.stops),Et=e=>{const t=Math.min(Math.max(e,n),p);if(!zt)return t;let r=zt[0];for(const e of zt)Math.abs(e-t)<Math.abs(r-t)&&(r=e);return r},Wt=ae?Et(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),d=e.xByMs(o.ms),u=Math.max(0,d-c),m=u<=.5||n.reducedMotion?0:C(350*u/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:d,lengthPx:u,durationMs:m,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Gt,Yt]=d(null),_t=c(null),qt=c({segments:Vt,value:Wt,playback:se});m(()=>{qt.current={segments:Vt,value:Wt,playback:se}});const Jt=c(null),Zt=h(e=>{null===e&&null===Jt.current||(Jt.current=e,qt.current.playback?.onProgress?.(e))},[]),Qt=h(()=>{_t.current=null,Yt(null),Zt(null),qt.current.playback?.onStop?.()},[Zt]),en=!!se?.playing&&!!ae;m(()=>{if(!en)return;const e=qt.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void Qt();_t.current&&_t.current.index===t||(_t.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Yt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=_t.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=_t.current;if("rest"!==e?.phase)return;const t=qt.current.segments[e.index];t?(_t.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):Qt()},i=e=>{const t=qt.current,n=_t.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);_t.current=s.cursor,s.at&&l(s.at),Zt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):Qt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),_t.current&&(_t.current.sinceMs=null,Zt(null))}},[en,Qt,Zt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Gt?Gt.ms:Wt:void 0!==w?w:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=h(()=>{clearTimeout(Te.current),clearTimeout(Be.current),Fe(null),Re(null),Ue(null),Ie(null),ze(null)},[]);m(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),m(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const on=null!==je||null!==Oe||null!==He||null!==Se;m(()=>{if(on)return s(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=h((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,Je-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[Je]),dn=Bt.find(e=>e.key===je)??null,un=dn?dn.x:0;U(()=>{cn(Ne.current,un)},[cn,je,un]);const mn=Wt??void 0,hn=c(null);m(()=>{if(void 0===mn)return;const e=wt.xByMs(mn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Lt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[mn]);const pn=Bt.map(e=>e.key),xn=ot?Lt.get(ot)??null:null,fn=Ee&&pn.includes(Ee)?Ee:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),We(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),ze(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},vn=e=>{Ct&&gt.get(e)===Ct?kn():(kn(),ze(null))},bn=e=>{clearTimeout(Te.current),Fe(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{Fe(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":O(e),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),We(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(O))),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),We(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];We(n.key),Le.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(_e)/* @__PURE__ */
78
+ return x("div",{ref:Me,children:/* @__PURE__ */x(X,{marks:ht.filter(e=>!e.isCap),pending:b,currentKey:ot,todayMs:ge,reveal:It,ariaLabel:me,step:St,nodeProps:wn,onKeyDown:yn})});const Cn=(e,t)=>null==e||!1===e?null:/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-flank"+(t?" is-end":""),"data-timeline-part":t?"end-caption":"start-caption",style:{paddingTop:Ze.rail-3+"px"},children:e});/* @__PURE__ */
79
79
  return f("div",{ref:Me,className:"rosh-tl-body"+(b.length>0&&!fe?"":" is-solo"),children:[
80
80
  /* @__PURE__ */f("div",{className:"flex items-stretch gap-3",children:[fe&&Cn(pt,!1),
81
- /* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${ee(Je,Nn,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${Ft?" is-zooming":""}${Gt?" is-gliding":""}`,onMouseMove:e=>{if(!Dt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left;n>=Dt.from&&n<=Dt.to?kn():Mn()},onMouseLeave:Mn,children:[!fe&&/* @__PURE__ */x(z,{marks:ht,innerRef:Pe}),
82
- /* @__PURE__ */x(V,{axis:wt,geo:Je,fillTo:nn,reveal:It,trackPx:et,tweened:!!ae}),Qe&&
83
- /* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:qe-et+"px",top:Je.rail+3-1+"px"}}),an&&/* @__PURE__ */x("div",{"aria-hidden":"true",className:"rosh-tl-band","data-timeline-part":"highlight",style:{left:an.from-10+"px",width:an.to-an.from+20+"px",top:Je.rail-7+"px",height:"20px"}}),
84
- /* @__PURE__ */x(W,{startMs:n,endMs:p,axis:wt,geo:Je,reveal:It}),
85
- /* @__PURE__ */x(G,{geo:Je,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:It,trackPx:qe}),fe&&/* @__PURE__ */x(Z,{nodes:Bt,geo:Je,reveal:It}),null!==ge&&ge>n&&ge<=p+e&&/* @__PURE__ */x(Y,{x:wt.xByMs(Math.min(ge,p)),geo:Je,trackPx:qe,label:$e(ge),reveal:It}),!fe&&oe.map(e=>/* @__PURE__ */x(_,{phase:e,geo:Je,xOf:wt.xByMs},e.key)),
86
- /* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":me,onKeyDown:yn,children:Bt.map((e,t)=>{const n=t=>null!==t&&e.members.some(e=>e.key===t),l=`${Je.rail+3}px`,a=It?r(t,St):{},s=(e=>!!an&&e.x>=an.from-.5&&e.x<=an.to+.5)(e)?" is-lit":"";if(e.mark?.isCap)/* @__PURE__ */
81
+ /* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${ee(Ze,Nn,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${Ft?" is-zooming":""}${Gt?" is-gliding":""}`,onMouseMove:e=>{if(!Kt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left;n>=Kt.from&&n<=Kt.to?kn():Mn()},onMouseLeave:Mn,children:[!fe&&/* @__PURE__ */x(z,{marks:ht,innerRef:Pe}),
82
+ /* @__PURE__ */x(V,{axis:wt,geo:Ze,fillTo:nn,reveal:It,trackPx:et,tweened:!!ae}),Qe&&
83
+ /* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:Je-et+"px",top:Ze.rail+3-1+"px"}}),an&&/* @__PURE__ */x("div",{"aria-hidden":"true",className:"rosh-tl-band","data-timeline-part":"highlight",style:{left:an.from-10+"px",width:an.to-an.from+20+"px",top:Ze.rail-7+"px",height:"20px"}}),
84
+ /* @__PURE__ */x(E,{startMs:n,endMs:p,axis:wt,geo:Ze,reveal:It}),
85
+ /* @__PURE__ */x(G,{geo:Ze,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:It,trackPx:Je}),fe&&/* @__PURE__ */x(_,{nodes:Bt,geo:Ze,reveal:It}),null!==ge&&ge>n&&ge<=p+e&&/* @__PURE__ */x(Y,{x:wt.xByMs(Math.min(ge,p)),geo:Ze,trackPx:Je,label:$e(ge),reveal:It}),!fe&&oe.map(e=>/* @__PURE__ */x(q,{phase:e,geo:Ze,xOf:wt.xByMs},e.key)),
86
+ /* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":me,onKeyDown:yn,children:Bt.map((e,t)=>{const n=t=>null!==t&&e.members.some(e=>e.key===t),l=`${Ze.rail+3}px`,a=It?r(t,St):{},s=(e=>!!an&&e.x>=an.from-.5&&e.x<=an.to+.5)(e)?" is-lit":"";if(e.mark?.isCap)/* @__PURE__ */
87
87
  return x("li",{children:/* @__PURE__ */x("button",{...wn(e.mark),className:`rosh-tl-node rosh-tl-mark is-cap${s}${It?" rosh-tl-pop":""}`,style:{left:`${e.x}px`,top:l,...a}})},e.key);if(!e.mark){const t=e.kind===P,r=R(t?"default":e.kind,"key"),i=t?void 0:A[e.kind]?.glyph;/* @__PURE__ */
88
88
  return f("li",{...n(ot)?{"aria-current":"step"}:{},children:[
89
89
  /* @__PURE__ */f("button",{...Pn(e),className:`${r.className} is-fold${t?" is-mixed":""}${n(re)?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...r.style,left:`${e.x}px`,top:l,...a},children:[i&&/* @__PURE__ */x(g,{name:i}),t&&/* @__PURE__ */f("span",{"aria-hidden":"true",className:"rosh-tl-foldnum",children:["×",e.members.length]})]}),!t&&/* @__PURE__ */f("i",{"aria-hidden":"true",className:"rosh-tl-count"+(It?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:l},children:["×",e.members.length]})]},e.key)}const i=e.mark,o=R(i.kind,i.role,i.provisional),{glyph:c}=i;/* @__PURE__ */
90
- return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...wn(i),className:`${o.className}${i.key===re?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...o.style,left:`${i.x}px`,top:l,...a},children:[c&&/* @__PURE__ */x(g,{name:c}),"current"===i.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(It?" is-on":"")})]})},i.key)})}),"lanes"===ne?/* @__PURE__ */x(J,{groups:ft,trackPx:qe,geo:Je,startMs:n,endMs:p,currentKey:ot,hoveredKey:Ae,reveal:It,step:St,zoomedKey:Ct,popId:Ve,aimBubble:cn,startCaptionPx:xt,openCluster:Oe,setOpenCluster:Ue,previewCluster:He,setPreviewCluster:Ie,setZoomKey:ze}):"active"===ne?/* @__PURE__ */x(q,{nodes:Bt,trackPx:qe,geo:Je,activeKey:re,hoveredKey:Ae,currentKey:ot}):null,dn&&/* @__PURE__ */x("div",{ref:Ne,id:Xe,role:"tooltip",className:"rosh-tl-bubble"+(dn.members.some(e=>e.preview)?" is-preview":""),"data-timeline-part":"tooltip",style:{top:`${Je.rail+6+6}px`},onMouseEnter:()=>{kn(),bn(dn.key)},onMouseLeave:()=>{Mn(),$n(dn.key)},onFocus:()=>{kn(),bn(dn.key)},onBlur:()=>{Mn(),$n(dn.key)},children:dn.mark?/* @__PURE__ */f(y,{children:[
90
+ return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...wn(i),className:`${o.className}${i.key===re?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...o.style,left:`${i.x}px`,top:l,...a},children:[c&&/* @__PURE__ */x(g,{name:c}),"current"===i.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(It?" is-on":"")})]})},i.key)})}),"lanes"===ne?/* @__PURE__ */x(Z,{groups:ft,trackPx:Je,geo:Ze,startMs:n,endMs:p,currentKey:ot,hoveredKey:Ae,reveal:It,step:St,zoomedKey:Ct,popId:Ve,aimBubble:cn,startCaptionPx:xt,openCluster:Oe,setOpenCluster:Ue,previewCluster:He,setPreviewCluster:Ie,setZoomKey:ze}):"active"===ne?/* @__PURE__ */x(J,{nodes:Bt,trackPx:Je,geo:Ze,activeKey:re,hoveredKey:Ae,currentKey:ot}):null,dn&&/* @__PURE__ */x("div",{ref:Ne,id:Xe,role:"tooltip",className:"rosh-tl-bubble"+(dn.members.some(e=>e.preview)?" is-preview":""),"data-timeline-part":"tooltip",style:{top:`${Ze.rail+6+6}px`},onMouseEnter:()=>{kn(),bn(dn.key)},onMouseLeave:()=>{Mn(),$n(dn.key)},onFocus:()=>{kn(),bn(dn.key)},onBlur:()=>{Mn(),$n(dn.key)},children:dn.mark?/* @__PURE__ */f(y,{children:[
91
91
  /* @__PURE__ */x("span",{className:"rosh-tl-name",children:dn.mark.label}),
92
92
  /* @__PURE__ */x("span",{className:"rosh-tl-date",children:dn.mark.dateText}),dn.mark.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:dn.mark.preview}):dn.mark.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:dn.mark.detail}),(dn.mark.onOpen??dn.mark.onClick)&&/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-bubble-open text-blue-600","data-timeline-part":"bubble-open",onClick:()=>(dn.mark?.onOpen??dn.mark?.onClick)?.(),children:ve.openButton})]}):
93
93
  /* @__PURE__ */f("div",{className:"rosh-tl-fold-list","data-timeline-part":"fold-members",children:[
@@ -95,5 +95,5 @@ return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */
95
95
  /* @__PURE__ */x("ol",{children:dn.members.map(e=>/* @__PURE__ */f("li",{children:[
96
96
  /* @__PURE__ */f("p",{className:"rosh-tl-foldrow",children:[
97
97
  /* @__PURE__ */x("span",{children:e.label}),
98
- /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]}),e.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:e.preview}):e.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:e.detail})]},e.key))})]})}),ae&&null!==Et&&
99
- /* @__PURE__ */x(Q,{thumb:ae,value:Et,snap:Wt,axis:wt,geo:Je,startMs:n,endMs:p,trackPx:qe,layerRef:we,glide:Gt,onScrub:se?Qt:void 0,nodes:Xt,onProgress:Jt})]})}),fe&&Cn(ie?.end,!0)]}),b.length>0&&!fe&&/* @__PURE__ */x(E,{pending:b,reveal:It})]})}export{g as TimelineGlyph,M as TimelineMilestoneIcon,v as TimelineProgressIcon,te as TimelineTrack};
98
+ /* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]}),e.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:e.preview}):e.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:e.detail})]},e.key))})]})}),ae&&null!==Wt&&
99
+ /* @__PURE__ */x(Q,{thumb:ae,value:Wt,snap:Et,axis:wt,geo:Ze,startMs:n,endMs:p,trackPx:Je,layerRef:we,glide:Gt,onScrub:se?Qt:void 0,nodes:Xt,onProgress:Zt})]})}),fe&&Cn(ie?.end,!0)]}),b.length>0&&!fe&&/* @__PURE__ */x(W,{pending:b,reveal:It})]})}export{g as TimelineGlyph,M as TimelineMilestoneIcon,v as TimelineProgressIcon,te as TimelineTrack};
@@ -1,7 +1,7 @@
1
- import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-CQAXN3HN.js";import{Icon as i}from"./chunk-42BBJJDP.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.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 A=x||!!p,J=n(u),$=l(null),C=s(),H=[B?.["aria-describedby"],j?C:void 0].filter(Boolean).join(" ")||void 0,I=B?.tabIndex;a(()=>{const e=$.current;if(!e||void 0!==I)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"===J?{before:"-top-[5px]",after:"-bottom-[5px]"}:{before:"-top-0.5",after:"-bottom-0.5"},T=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-LVSPLCGG.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.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:P,rowRef:B,className:D=""}){const I=x||!!p,K=n(u),L=l(null),T=s(),$=[P?.["aria-describedby"],j?T:void 0].filter(Boolean).join(" ")||void 0,A=P?.tabIndex;a(()=>{const e=L.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 C="comfortable"===K?{before:"-top-[5px]",after:"-bottom-[5px]"}:{before:"-top-0.5",after:"-bottom-0.5"},G=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":A||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-white transition-colors duration-(--motion-fast)",w?"":A?"border-blue-300":"border-gray-200 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;$.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":H,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:[T&&(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:[T,
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:T})),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:C})]}),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":I||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-white transition-colors duration-(--motion-fast)",w?"":I?"border-blue-300":"border-gray-200 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 ${C[k]}`}),
5
+ /* @__PURE__ */c("div",{...P,ref:e=>{var r,t;L.current=e,t=e,"function"==typeof(r=B)?r(t):r&&(r.current=t)},"data-list-row":"","data-draggable":y||void 0,"aria-keyshortcuts":P?.["aria-keyshortcuts"]??(j?e:void 0),"aria-describedby":$,onKeyDown:e=>{if(P?.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":"",D].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:[G&&(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:[G,
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:G})),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:T})]}),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};
@@ -1 +1 @@
1
- import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-KKZZAK76.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,A]=n([]),L=r(0),b="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,b)});A(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,b,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>A([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),L.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(L.current=Math.max(0,L.current-1),0===L.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),L.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
1
+ import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-ETSKG62F.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,L]=n([]),b=r(0),A="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,A)});L(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,A,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>L([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),b.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(b.current=Math.max(0,b.current-1),0===b.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),b.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
@@ -1,15 +1,15 @@
1
- import{keepsNativeMenu as e}from"./chunk-5QFPTDQF.js";import{optionNoteClass as t}from"./chunk-QR4RM7PO.js";import{Icon as n}from"./chunk-42BBJJDP.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{createContext as u,forwardRef as d,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function T(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function E(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function M(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var B=u(null),$=u(!1);function L({children:t,style:n,className:a="",onClose:c,minWidth:u=180,portal:d=!1}){const p=h(null),b=m(),[x,v]=f([]),T=h();g(()=>()=>clearTimeout(T.current),[]);const E=i(),M=y(()=>{const e=()=>clearTimeout(T.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),T.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,x,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=s(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const $=W(),L=/(^|[\s:])!?z-/.test(a),R=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===$?"py-1":"large"===$?"py-2":"py-1"} ${a}`,onContextMenu:t=>{e(t.target)||t.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:u,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k(B.Provider,{value:M,children:t})});return d?E?w(R,document.body):null:R}function R(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 not-disabled:not-aria-disabled:hover:bg-blue-50 not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var j=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function D({kind:e,checked:t}){/* @__PURE__ */
2
- return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&j}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&j})}var P=d(function({onClick:e,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:u,id:d,onMouseEnter:h},f){const g=p(B),y=m(),b=null!=s&&!1!==s,w=`${d??y}-label`,N=`${d??y}-note`,C=p($),T=R(o,i,r),E=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
3
- return x("button",{ref:f,id:d,role:"radio"===E?"menuitemradio":"checkbox"===E?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":E?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:u,onClick:()=>{e?.(),g&&g.depth>0&&"checkbox"!==E&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:T.className,style:T.style,children:[E&&/* @__PURE__ */k(D,{kind:E,checked:!!l}),b?
1
+ import{optionNoteClass as e}from"./chunk-QR4RM7PO.js";import{keepsNativeMenu as t}from"./chunk-5QFPTDQF.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{createContext as u,forwardRef as d,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function T(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function M(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function E(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var L=u(null),$=u(!1);function B({children:e,style:n,className:a="",onClose:c,minWidth:u=180,portal:d=!1}){const p=h(null),b=m(),[x,v]=f([]),T=h();g(()=>()=>clearTimeout(T.current),[]);const M=i(),E=y(()=>{const e=()=>clearTimeout(T.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),T.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,x,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=s(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const $=W(),B=/(^|[\s:])!?z-/.test(a),R=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===$?"py-1":"large"===$?"py-2":"py-1"} ${a}`,onContextMenu:e=>{t(e.target)||e.preventDefault()},style:{...B?{}:{zIndex:o.menu},minWidth:u,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k(L.Provider,{value:E,children:e})});return d?M?w(R,document.body):null:R}function R(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 not-disabled:not-aria-disabled:hover:bg-blue-50 not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var j=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function D({kind:e,checked:t}){/* @__PURE__ */
2
+ return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&j}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&j})}var P=d(function({onClick:t,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:u,id:d,onMouseEnter:h},f){const g=p(L),y=m(),b=null!=s&&!1!==s,w=`${d??y}-label`,N=`${d??y}-note`,C=p($),T=R(o,i,r),M=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
3
+ return x("button",{ref:f,id:d,role:"radio"===M?"menuitemradio":"checkbox"===M?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":M?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:u,onClick:()=>{t?.(),g&&g.depth>0&&"checkbox"!==M&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:T.className,style:T.style,children:[M&&/* @__PURE__ */k(D,{kind:M,checked:!!l}),b?
4
4
  /* @__PURE__ */x("span",{className:"block min-w-0 flex-1 py-2",children:[
5
5
  /* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(A,{children:c}),
6
6
  /* @__PURE__ */k("span",{id:w,className:"min-w-0",children:n})]}),
7
- /* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:t(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(A,{children:c}),n]})]})});function A({children:e}){/* @__PURE__ */
8
- return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var F=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function H(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function I(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function z({label:t,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:u,rowProps:d}){const f=p(B),N=m(),C=h(null),T=h(null),$=h(),L=h(!1),j=`${N}-menu`;g(()=>()=>clearTimeout($.current),[]);const D=f?.depth??0,P=f?.path[D],A=!!P&&P.key===N&&!o,z=b(e=>{if(!f||o||!C.current)return;clearTimeout($.current),L.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=D>0&&(f.path[D-1]?.flipped??!1),a=M(r.left,r.right,c,window.innerWidth,4,i);f.open(D,{key:N,y:t.top,...a})},[f,o,D,N,c]),S=e=>{f?.closeBelow(D),C.current?.focus()};g(()=>{if(A)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>D+1)&&(S(),!0)),()=>T.current)}),a(()=>{if(!A||!P)return;const e=()=>{const e=T.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=D>0&&(f?.path[D-1]?.flipped??!1),o=e.offsetWidth||c,i=M(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=E(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{A&&L.current&&(L.current=!1,I(T.current)[0]?.focus())},[A]);const J=y(()=>f&&{...f,depth:D+1},[f,D]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const q=R(!1,o,i,A),Q=W();/* @__PURE__ */
7
+ /* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:e(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(A,{children:c}),n]})]})});function A({children:e}){/* @__PURE__ */
8
+ return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var F=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function H(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function I(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function z({label:e,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:u,rowProps:d}){const f=p(L),N=m(),C=h(null),T=h(null),$=h(),B=h(!1),j=`${N}-menu`;g(()=>()=>clearTimeout($.current),[]);const D=f?.depth??0,P=f?.path[D],A=!!P&&P.key===N&&!o,z=b(e=>{if(!f||o||!C.current)return;clearTimeout($.current),B.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=D>0&&(f.path[D-1]?.flipped??!1),a=E(r.left,r.right,c,window.innerWidth,4,i);f.open(D,{key:N,y:t.top,...a})},[f,o,D,N,c]),S=e=>{f?.closeBelow(D),C.current?.focus()};g(()=>{if(A)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>D+1)&&(S(),!0)),()=>T.current)}),a(()=>{if(!A||!P)return;const e=()=>{const e=T.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=D>0&&(f?.path[D-1]?.flipped??!1),o=e.offsetWidth||c,i=E(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=M(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{A&&B.current&&(B.current=!1,I(T.current)[0]?.focus())},[A]);const q=y(()=>f&&{...f,depth:D+1},[f,D]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const Q=R(!1,o,i,A),U=W();/* @__PURE__ */
9
9
  return x(v,{children:[
10
- /* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":A,"aria-controls":A?j:void 0,disabled:o,"data-popup-submenu-row":!0,className:q.className,style:q.style,onClick:e=>{const t=0===e.detail;A?t&&I(T.current)[0]?.focus():z(t)},...d,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),z(!0))},onMouseEnter:()=>{d?.onMouseEnter?.(),o||(f.cancelClose(),A?f.closeBelow(D+1):(clearTimeout($.current),$.current=setTimeout(()=>z(!1),120)))},onMouseLeave:()=>{clearTimeout($.current),f.scheduleClose(D)},children:[n,
11
- /* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:t}),F]}),A&&w(
12
- /* @__PURE__ */k("div",{ref:T,id:j,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===Q?"py-1":"large"===Q?"py-2":"py-1"),style:{left:P.left,top:P.y,minWidth:c,maxHeight:void 0===u?"calc(100vh - 16px)":`min(${"number"==typeof u?`${u}px`:u}, calc(100vh - 16px))`,zIndex:H(f.root.current)+D+1,animation:(P.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=I(T.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),S())},onMouseEnter:()=>{f.cancelClose(),clearTimeout($.current)},onMouseLeave:()=>f.scheduleClose(D+1),onContextMenu:t=>{e(t.target)||t.preventDefault()},children:/* @__PURE__ */k(B.Provider,{value:J,children:r})}),document.body)]})}function S(){const e=W();/* @__PURE__ */
13
- return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function J(){const e=W(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function q({children:e}){/* @__PURE__ */
14
- return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:J(),children:e})}function Q({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
15
- return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{D as MenuCheckMark,Q as MenuIcon,$ as MenuSemanticsContext,L as PopupMenu,S as PopupMenuDivider,P as PopupMenuItem,q as PopupMenuLabel,z as PopupSubmenu,E as clampMenuTop,C as closeMenuBelow,R as itemLook,M as menuPanelLeft,J as menuTextRowStyle,N as openMenuLevel,T as resolveMenuLevels};
10
+ /* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":A,"aria-controls":A?j:void 0,disabled:o,"data-popup-submenu-row":!0,className:Q.className,style:Q.style,onClick:e=>{const t=0===e.detail;A?t&&I(T.current)[0]?.focus():z(t)},...d,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),z(!0))},onMouseEnter:()=>{d?.onMouseEnter?.(),o||(f.cancelClose(),A?f.closeBelow(D+1):(clearTimeout($.current),$.current=setTimeout(()=>z(!1),120)))},onMouseLeave:()=>{clearTimeout($.current),f.scheduleClose(D)},children:[n,
11
+ /* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:e}),F]}),A&&w(
12
+ /* @__PURE__ */k("div",{ref:T,id:j,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===U?"py-1":"large"===U?"py-2":"py-1"),style:{left:P.left,top:P.y,minWidth:c,maxHeight:void 0===u?"calc(100vh - 16px)":`min(${"number"==typeof u?`${u}px`:u}, calc(100vh - 16px))`,zIndex:H(f.root.current)+D+1,animation:(P.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=I(T.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),S())},onMouseEnter:()=>{f.cancelClose(),clearTimeout($.current)},onMouseLeave:()=>f.scheduleClose(D+1),onContextMenu:e=>{t(e.target)||e.preventDefault()},children:/* @__PURE__ */k(L.Provider,{value:q,children:r})}),document.body)]})}function S(){const e=W();/* @__PURE__ */
13
+ return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function q(){const e=W(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function Q({children:e}){/* @__PURE__ */
14
+ return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:q(),children:e})}function U({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
15
+ return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{D as MenuCheckMark,U as MenuIcon,$ as MenuSemanticsContext,B as PopupMenu,S as PopupMenuDivider,P as PopupMenuItem,Q as PopupMenuLabel,z as PopupSubmenu,M as clampMenuTop,C as closeMenuBelow,R as itemLook,E as menuPanelLeft,q as menuTextRowStyle,N as openMenuLevel,T as resolveMenuLevels};
@@ -1,4 +1,4 @@
1
- import{Avatar as e}from"./chunk-D6FSZBJ5.js";import{StatCard as a,Card as t}from"./chunk-47MFBFIX.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-RHYMHVFS.js";import{ColumnChart as l}from"./chunk-RYC3ZHXM.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-5SULG7D5.js";import{TH_ONE_LINE as c}from"./chunk-7T3COEQK.js";import{Button_default as n}from"./chunk-UDD7GB4F.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-PWOFYFMO.js";import{Avatar as t}from"./chunk-DO6XTJ77.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-MKITHLDU.js";import{ColumnChart as l}from"./chunk-L65EQCZN.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-D323R2FT.js";import{TH_ONE_LINE as c}from"./chunk-6KO5VTL7.js";import{Button_default as n}from"./chunk-4IU5BSVE.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:[
@@ -8,24 +8,24 @@ return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow
8
8
  /* @__PURE__ */o(n,{variant:"secondary",size:"sm",children:"Export"}),
9
9
  /* @__PURE__ */o(n,{size:"sm",children:"New report"})]})]}),
10
10
  /* @__PURE__ */m("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[
11
- /* @__PURE__ */o(a,{label:"Revenue",value:"$38.2k",delta:{value:"12%",direction:"up"}}),
12
- /* @__PURE__ */o(a,{label:"Orders",value:"1,204",delta:{value:"4%",direction:"up"}}),
13
- /* @__PURE__ */o(a,{label:"Customers",value:"892",delta:{value:"2%",direction:"down"}}),
14
- /* @__PURE__ */o(a,{label:"Refunds",value:"$1.1k",delta:{value:"0%",direction:"flat"}})]}),
11
+ /* @__PURE__ */o(e,{label:"Revenue",value:"$38.2k",delta:{value:"12%",direction:"up"}}),
12
+ /* @__PURE__ */o(e,{label:"Orders",value:"1,204",delta:{value:"4%",direction:"up"}}),
13
+ /* @__PURE__ */o(e,{label:"Customers",value:"892",delta:{value:"2%",direction:"down"}}),
14
+ /* @__PURE__ */o(e,{label:"Refunds",value:"$1.1k",delta:{value:"0%",direction:"flat"}})]}),
15
15
  /* @__PURE__ */m("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[
16
- /* @__PURE__ */o(t,{header:"Revenue",className:"lg:col-span-2",children:/* @__PURE__ */o(l,{labels:p,height:200,series:[{key:"revenue",label:"Revenue",data:h}],formatValue:e=>`$${e}k`})}),
17
- /* @__PURE__ */o(t,{header:"Traffic sources",children:/* @__PURE__ */o(s,{variant:"ring",size:180,segments:g,centerLabel:"100%"})})]}),
18
- /* @__PURE__ */o(t,{header:"Recent orders",padded:!1,children:/* @__PURE__ */m("table",{className:"w-full text-sm",children:[
16
+ /* @__PURE__ */o(a,{header:"Revenue",className:"lg:col-span-2",children:/* @__PURE__ */o(l,{labels:p,height:200,series:[{key:"revenue",label:"Revenue",data:h}],formatValue:e=>`$${e}k`})}),
17
+ /* @__PURE__ */o(a,{header:"Traffic sources",children:/* @__PURE__ */o(s,{variant:"ring",size:180,segments:g,centerLabel:"100%"})})]}),
18
+ /* @__PURE__ */o(a,{header:"Recent orders",padded:!1,children:/* @__PURE__ */m("table",{className:"w-full text-sm",children:[
19
19
  /* @__PURE__ */o("thead",{children:/* @__PURE__ */m("tr",{className:"border-b border-gray-100 text-left text-xs uppercase tracking-wide text-gray-400",children:[
20
20
  /* @__PURE__ */o("th",{className:`${c} px-4 py-2 font-medium`,children:"Order"}),
21
21
  /* @__PURE__ */o("th",{className:`${c} px-4 py-2 font-medium`,children:"Customer"}),
22
22
  /* @__PURE__ */o("th",{className:`${c} px-4 py-2 font-medium`,children:"Total"}),
23
23
  /* @__PURE__ */o("th",{className:`${c} px-4 py-2 font-medium`,children:"Status"})]})}),
24
- /* @__PURE__ */o("tbody",{className:"divide-y divide-gray-100",children:x.map(a=>/* @__PURE__ */m("tr",{className:"text-gray-700",children:[
25
- /* @__PURE__ */o("td",{className:"px-4 py-2 font-mono text-xs text-gray-500",children:a.id}),
24
+ /* @__PURE__ */o("tbody",{className:"divide-y divide-gray-100",children:x.map(e=>/* @__PURE__ */m("tr",{className:"text-gray-700",children:[
25
+ /* @__PURE__ */o("td",{className:"px-4 py-2 font-mono text-xs text-gray-500",children:e.id}),
26
26
  /* @__PURE__ */o("td",{className:"px-4 py-2",children:/* @__PURE__ */m("span",{className:"flex items-center gap-2",children:[
27
- /* @__PURE__ */o(e,{size:"xs",name:a.customer}),a.customer]})}),
28
- /* @__PURE__ */o("td",{className:"px-4 py-2",children:a.total}),
29
- /* @__PURE__ */o("td",{className:"px-4 py-2",children:/* @__PURE__ */o(d,{status:a.status})})]},a.id))})]})}),
27
+ /* @__PURE__ */o(t,{size:"xs",name:e.customer}),e.customer]})}),
28
+ /* @__PURE__ */o("td",{className:"px-4 py-2",children:e.total}),
29
+ /* @__PURE__ */o("td",{className:"px-4 py-2",children:/* @__PURE__ */o(d,{status:e.status})})]},e.id))})]})}),
30
30
  /* @__PURE__ */m("p",{className:"flex items-center gap-2 text-xs text-gray-400",children:[
31
31
  /* @__PURE__ */o("span",{className:"text-emerald-600",children:/* @__PURE__ */o(r,{data:h,width:80,height:20})}),"Trending up 12% vs last month"]})]})})})}export{v as DashboardTemplate};
@@ -1,8 +1,8 @@
1
- import{parseFocal as e,formatFocal as t,nudgeFocal as a,focalFromRect as r}from"./chunk-25RR3GQW.js";import{useShellStrings as n}from"./chunk-KKZZAK76.js";import{useId as o,useRef as s}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c={background:"color-mix(in srgb, var(--status-on-solid) 45%, transparent)"},u={borderColor:"var(--status-on-solid)",boxShadow:"0 0 0 1px var(--rosh-media-scrim-button), 0 1px 4px var(--rosh-media-scrim-button)"};function d({value:d,onChange:m,label:p,image:f,hint:h,emptyText:g,actions:x,disabled:b=!1,id:v,className:y=""}){const N=n().imageFocus,w=o(),K=s(null),j=s(!1),{x:k,y:C}=e(d),P=t(k,C),$=e=>{e!==d&&m(e)},D=(e,a)=>{const n=K.current?.getBoundingClientRect();if(!n)return;const o=r(n,e,a);$(t(o.x,o.y))},R=()=>{j.current=!1};if(!f)/* @__PURE__ */
2
- return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-gray-500",children:g??N.noImage})});const T=void 0===h,I=null!==h;/* @__PURE__ */
1
+ import{parseFocal as e,formatFocal as t,nudgeFocal as a,focalFromRect as r}from"./chunk-25RR3GQW.js";import{useShellStrings as n}from"./chunk-ETSKG62F.js";import{useId as o,useRef as s}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c={background:"color-mix(in srgb, var(--status-on-solid) 45%, transparent)"},u={borderColor:"var(--status-on-solid)",boxShadow:"0 0 0 1px var(--rosh-media-scrim-button), 0 1px 4px var(--rosh-media-scrim-button)"};function d({value:d,onChange:m,label:p,image:f,hint:h,emptyText:g,actions:x,disabled:b=!1,id:v,className:y=""}){const N=n().imageFocus,w=o(),j=s(null),k=s(!1),{x:C,y:K}=e(d),P=t(C,K),$=e=>{e!==d&&m(e)},T=(e,a)=>{const n=j.current?.getBoundingClientRect();if(!n)return;const o=r(n,e,a);$(t(o.x,o.y))},D=()=>{k.current=!1};if(!f)/* @__PURE__ */
2
+ return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-gray-500",children:g??N.noImage})});const R=void 0===h,S=null!==h;/* @__PURE__ */
3
3
  return l("div",{"data-image-focus":"",className:`flex flex-col gap-2 ${y}`.trim(),children:[
4
- /* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:b,"aria-label":N.picture(p,P),"aria-describedby":w,onKeyDown:e=>{if(b||e.altKey||e.ctrlKey||e.metaKey)return;const t=a(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{b||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),j.current=!0,D(e.clientX,e.clientY))},onPointerMove:e=>{j.current&&!b&&D(e.clientX,e.clientY)},onPointerUp:R,onPointerCancel:R,onLostPointerCapture:R,className:["flex min-h-36 w-full touch-none items-center justify-center overflow-hidden rounded-md border border-gray-200 bg-gray-50 p-0","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",b?"cursor-not-allowed opacity-60":"cursor-crosshair"].join(" "),children:/* @__PURE__ */l("span",{ref:K,"data-image-focus-pane":"",className:"relative block max-w-full",children:[
4
+ /* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:b,"aria-label":N.picture(p,P),"aria-describedby":w,onKeyDown:e=>{if(b||e.altKey||e.ctrlKey||e.metaKey)return;const t=a(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{b||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),k.current=!0,T(e.clientX,e.clientY))},onPointerMove:e=>{k.current&&!b&&T(e.clientX,e.clientY)},onPointerUp:D,onPointerCancel:D,onLostPointerCapture:D,className:["flex min-h-36 w-full touch-none items-center justify-center overflow-hidden rounded-md border border-gray-200 bg-gray-50 p-0","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",b?"cursor-not-allowed opacity-60":"cursor-crosshair"].join(" "),children:/* @__PURE__ */l("span",{ref:j,"data-image-focus-pane":"",className:"relative block max-w-full",children:[
5
5
  /* @__PURE__ */i("img",{src:f,alt:"",draggable:!1,className:"block h-auto max-h-36 w-auto max-w-full select-none object-contain"}),
6
- /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${C}%`,...c}}),
7
- /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${k}%`,...c}}),
8
- /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${k}%`,top:`${C}%`,...u}})]})}),I||x?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",I?{id:T?w:void 0,className:"min-w-0 flex-1 text-xs text-gray-500",children:T?N.hint:h}:{className:"min-w-0 flex-1"}),x]}):null,!T&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
6
+ /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${K}%`,...c}}),
7
+ /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${C}%`,...c}}),
8
+ /* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${C}%`,top:`${K}%`,...u}})]})}),S||x?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",S?{id:R?w:void 0,className:"min-w-0 flex-1 text-xs text-gray-500",children:R?N.hint:h}:{className:"min-w-0 flex-1"}),x]}):null,!R&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
@@ -1,9 +1,9 @@
1
- import{useShellLocale as e}from"./chunk-KKZZAK76.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as a,Children as d}from"react";import{jsxs as t,jsx as i}from"react/jsx-runtime";var n={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-gray-200",warning:"border-amber-300",current:"border-gray-200"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:g="",style:x,tone:y="neutral"}){const f=n[m??(o?"md":"none")],N=a(),v=a(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,K=A?"section":"div",C=`rounded-(--radius-card) border ${l[y]} bg-white shadow-sm ${h}`.trim(),Z=d.toArray(e).length>0,B=Z?"border-b border-gray-100 ":"",H="current"===y,L=H?"text-base font-semibold text-blue-700":"text-base font-semibold text-gray-900",M=H?"rounded-t-(--radius-card) bg-blue-50 ":"",O=`${B}${M}${f.edge} ${L}`;/* @__PURE__ */
2
- return t(K,{className:C,style:x,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...H?{"aria-current":!0}:{},children:[$?
3
- /* @__PURE__ */t("div",{className:`${B}${M}${f.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${L}`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?/* @__PURE__ */i(j,{id:N,className:L,children:r}):/* @__PURE__ */i("div",{className:L,children:r}),
4
- /* @__PURE__ */i("p",{id:v,className:H?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-gray-500",children:s})]}):null!=r&&(null!=u?
5
- /* @__PURE__ */t("div",{className:`${O} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?
6
- /* @__PURE__ */i(j,{id:N,className:O,children:r}):/* @__PURE__ */i("div",{className:O,children:r})),Z&&/* @__PURE__ */i("div",{className:[f.body,g].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */i("div",{className:`border-t border-gray-100 ${f.edge}`,children:c})]})}function c({label:a,value:d,icon:n,delta:l,className:s=""}){const c=e(),o="number"==typeof d&&c?r(d,c):d,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
1
+ import{useShellLocale as e}from"./chunk-ETSKG62F.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as a,Children as d}from"react";import{jsxs as t,jsx as i}from"react/jsx-runtime";var n={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-gray-200",warning:"border-amber-300",current:"border-gray-200"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:g="",style:x,tone:y="neutral"}){const f=n[m??(o?"md":"none")],N=a(),v=a(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,C=A?"section":"div",B=`rounded-(--radius-card) border ${l[y]} bg-white shadow-sm ${h}`.trim(),E=d.toArray(e).length>0,F=E?"border-b border-gray-100 ":"",G="current"===y,H=G?"text-base font-semibold text-blue-700":"text-base font-semibold text-gray-900",K=G?"rounded-t-(--radius-card) bg-blue-50 ":"",L=`${F}${K}${f.edge} ${H}`;/* @__PURE__ */
2
+ return t(C,{className:B,style:x,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...G?{"aria-current":!0}:{},children:[$?
3
+ /* @__PURE__ */t("div",{className:`${F}${K}${f.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${H}`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?/* @__PURE__ */i(j,{id:N,className:H,children:r}):/* @__PURE__ */i("div",{className:H,children:r}),
4
+ /* @__PURE__ */i("p",{id:v,className:G?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-gray-500",children:s})]}):null!=r&&(null!=u?
5
+ /* @__PURE__ */t("div",{className:`${L} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?
6
+ /* @__PURE__ */i(j,{id:N,className:L,children:r}):/* @__PURE__ */i("div",{className:L,children:r})),E&&/* @__PURE__ */i("div",{className:[f.body,g].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */i("div",{className:`border-t border-gray-100 ${f.edge}`,children:c})]})}function c({label:a,value:d,icon:n,delta:l,className:s=""}){const c=e(),o="number"==typeof d&&c?r(d,c):d,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
7
7
  return t("div",{className:`rounded-(--radius-card) border border-gray-200 bg-white p-4 shadow-sm ${s}`.trim(),children:[
8
8
  /* @__PURE__ */t("div",{className:"flex items-center justify-between text-gray-500",children:[
9
9
  /* @__PURE__ */i("span",{className:"text-xs font-medium uppercase tracking-wide",children:a}),n]}),
@@ -1,2 +1,2 @@
1
- import{useShellPrefs as t}from"./chunk-KC3EX26K.js";import{toast_default as e}from"./chunk-F22KWATP.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(R(),F()):"none"!==t&&0!==m||R()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&F())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),R())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);R(),P(s,{volume:u,repeat:d});const t="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(t)}catch{}try{e.info(t)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function P(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>N(t,n),2500*e)}function N(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function F(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=O(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*_[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function R(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=O(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var K="pomodoro_tasks",V="pomodoro_tasks_migrated";function W(){return Math.random().toString(36).slice(2,11)}function j(){/* @__PURE__ */
2
- return(new Date).toISOString()}var E=null,q=[],J=!1,L=null,X=/* @__PURE__ */new Set;function $(){for(const t of X)t()}function z(t){q=t,$()}function H(){const t=E;return t?L=t.list().then(e=>{E===t&&(q=e,J=!0,$())}).catch(()=>{E===t&&(J=!0,$())}).finally(()=>{L=null}):(q=[],J=!0,$(),Promise.resolve())}function Q(t){E=t,q=[],J=!1,t?H():$()}function U(t){return X.add(t),!E||J||L||H(),()=>{X.delete(t)}}function Y(){return q}function Z(){const e=function(){const{prefs:e,save:n}=t(),r=a(()=>{const t=e.todo_tasks;return Array.isArray(t)?t:[]},[e.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=W(),n=j(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:j()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(U,Y,Y),i=o(t=>{const n=E;if(!n)return e.addTask(t);const o="tmp-"+W(),a=j(),r={done:!1,...t,name:t.name.trim(),id:o,createdAt:a,updatedAt:a};return z([...q,r]),n.create({...t,name:t.name.trim()}).then(t=>z(q.map(e=>e.id===o?{...r,...t}:e))).catch(()=>z(q.filter(t=>t.id!==o))),o},[e]),c=o((t,n)=>{const o=E;if(!o)return e.updateTask(t,n);z(q.map(e=>e.id===t?{...e,...n,id:t,updatedAt:j()}:e)),o.update(t,n).catch(()=>{H()})},[e]),l=o(t=>{const n=E;if(!n)return e.removeTask(t);const o=q;z(q.filter(e=>e.id!==t)),n.remove(t).catch(()=>z(o))},[e]),s=o(t=>{if(!E)return e.toggleDone(t);const n=q.find(e=>e.id===t);n&&c(t,{done:!n.done})},[e,c]),u=o(t=>{E||e.setAllTasks(t)},[e]);return null===E?e:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(V))return;const n=localStorage.getItem(K);if(!n)return void localStorage.setItem(V,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(K),void localStorage.setItem(V,"1");const a=j(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||W(),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(K),localStorage.setItem(V,"1")}catch{try{localStorage.setItem(V,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,P as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,Q as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
1
+ import{toast_default as t}from"./chunk-OSVN2UF7.js";import{useShellPrefs as e}from"./chunk-KC3EX26K.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(R(),F()):"none"!==t&&0!==m||R()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&F())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),R())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);R(),N(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,O={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function _(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 F(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=_(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*O[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function R(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function V(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=_(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",j="pomodoro_tasks_migrated";function E(){return Math.random().toString(36).slice(2,11)}function K(){/* @__PURE__ */
2
+ return(new Date).toISOString()}var W=null,q=[],J=!1,L=null,U=/* @__PURE__ */new Set;function X(){for(const t of U)t()}function $(t){q=t,X()}function z(){const t=W;return t?L=t.list().then(e=>{W===t&&(q=e,J=!0,X())}).catch(()=>{W===t&&(J=!0,X())}).finally(()=>{L=null}):(q=[],J=!0,X(),Promise.resolve())}function H(t){W=t,q=[],J=!1,t?z():X()}function Q(t){return U.add(t),!W||J||L||z(),()=>{U.delete(t)}}function Y(){return q}function Z(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=E(),n=K(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:K()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(Q,Y,Y),i=o(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 $([...q,r]),n.create({...e,name:e.name.trim()}).then(t=>$(q.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(q.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=W;if(!o)return t.updateTask(e,n);$(q.map(t=>t.id===e?{...t,...n,id:e,updatedAt:K()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=W;if(!n)return t.removeTask(e);const o=q;$(q.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!W)return t.toggleDone(e);const n=q.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{W||t.setAllTasks(e)},[t]);return null===W?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(j))return;const n=localStorage.getItem(G);if(!n)return void localStorage.setItem(j,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(G),void localStorage.setItem(j,"1");const a=K(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||E(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(G),localStorage.setItem(j,"1")}catch{try{localStorage.setItem(j,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,V as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,H as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};