efficient-shell 10.0.0 → 10.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +2 -2
  2. package/dist/{Browser-RFLTFP7Y.js → Browser-Q34VNUTL.js} +13 -13
  3. package/dist/{Calculator-DV2R65OS.js → Calculator-63XNC3BA.js} +12 -12
  4. package/dist/{CurrencyConverter-ELSCNMUT.js → CurrencyConverter-Q4HYAY4N.js} +9 -9
  5. package/dist/{Documents-HKTTXLSR.js → Documents-KLVVF4KK.js} +24 -24
  6. package/dist/{Files-ZSYGKZOV.js → Files-AOIBTQTE.js} +40 -40
  7. package/dist/Notepad-SOUIZDKN.js +24 -0
  8. package/dist/PdfViewer-WNKGFJD6.js +1 -0
  9. package/dist/{PomodoroTimer-XHNZGBDR.js → PomodoroTimer-X5Y3LA3V.js} +25 -25
  10. package/dist/{Preview-PLCASIZA.js → Preview-3FZTC25R.js} +25 -25
  11. package/dist/Sidebar-4OI4LP6G.js +44 -0
  12. package/dist/{Spreadsheet-Y7TJIBI5.js → Spreadsheet-RBEVCQIV.js} +13 -13
  13. package/dist/{Stock-KLYWTMMD.js → Stock-KESFJPYD.js} +4 -4
  14. package/dist/{Weather-CT2IZHEW.js → Weather-BYGZVNNK.js} +19 -19
  15. package/dist/{WorldClock-EJCUVIUW.js → WorldClock-P4JVDPGE.js} +6 -6
  16. package/dist/ai/index.js +38 -38
  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/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChordChart.js +1 -1
  25. package/dist/charts/ColumnChart.js +1 -1
  26. package/dist/charts/HeatmapChart.js +1 -1
  27. package/dist/charts/HistogramChart.js +1 -1
  28. package/dist/charts/RadarChart.js +1 -1
  29. package/dist/charts/RangeChart.js +1 -1
  30. package/dist/charts/SankeyChart.js +1 -1
  31. package/dist/charts/ScatterChart.js +1 -1
  32. package/dist/charts/SpecChart.js +1 -1
  33. package/dist/charts/SunburstChart.js +1 -1
  34. package/dist/charts/TimeSeriesChart.js +1 -1
  35. package/dist/charts/TreemapChart.js +1 -1
  36. package/dist/charts/WaterfallChart.js +1 -1
  37. package/dist/{chunk-PUIQFTCO.js → chunk-2OJ3HGFY.js} +5 -5
  38. package/dist/{chunk-PKIDVVAE.js → chunk-2SLQD57V.js} +5 -5
  39. package/dist/{chunk-NDEIZUMG.js → chunk-3V6ZERBS.js} +1 -1
  40. package/dist/{chunk-BXEKX4TB.js → chunk-3V74SUZO.js} +16 -16
  41. package/dist/{chunk-DL6QIWVR.js → chunk-42XMT5JN.js} +1 -1
  42. package/dist/{chunk-IQWIYZB5.js → chunk-45XXERGA.js} +2 -2
  43. package/dist/{chunk-B7KD3DGY.js → chunk-4UEXVRBC.js} +1 -1
  44. package/dist/{chunk-FRINAJU7.js → chunk-4UX6ET7G.js} +1 -1
  45. package/dist/{chunk-BFVL2VTS.js → chunk-4VDGVF5T.js} +1 -1
  46. package/dist/chunk-4X6GIVTI.js +29 -0
  47. package/dist/{chunk-D2WGDTWN.js → chunk-5EX6XXUX.js} +1 -1
  48. package/dist/{chunk-PA37I5ZX.js → chunk-5VDT4762.js} +2 -2
  49. package/dist/{chunk-EGAV5LSX.js → chunk-5VSP3TYU.js} +1 -1
  50. package/dist/{chunk-66JYKX4T.js → chunk-6FPDOEOX.js} +1 -1
  51. package/dist/{chunk-3AZBI76O.js → chunk-7ILNRFEV.js} +1 -1
  52. package/dist/{chunk-GQK3U2IO.js → chunk-7TONF2PM.js} +1 -1
  53. package/dist/{chunk-LKW3YAZN.js → chunk-A3VJ4PRU.js} +6 -6
  54. package/dist/chunk-ACVKU6YW.js +7 -0
  55. package/dist/{chunk-ELUTQZGP.js → chunk-AEQFFD5I.js} +1 -1
  56. package/dist/{chunk-QRJRGP2K.js → chunk-AGLBDT7X.js} +8 -8
  57. package/dist/chunk-AXL7VTNM.js +11 -0
  58. package/dist/{chunk-7BDZZANS.js → chunk-B7HW6XZD.js} +1 -1
  59. package/dist/{chunk-XILZGSMX.js → chunk-BDFZNLFQ.js} +1 -1
  60. package/dist/{chunk-C6MV6IAX.js → chunk-BMXMSAQE.js} +8 -8
  61. package/dist/{chunk-PUCPFBYO.js → chunk-BNQRPLBW.js} +1 -1
  62. package/dist/{chunk-XS4HFUTW.js → chunk-BZPPDYEE.js} +1 -1
  63. package/dist/{chunk-DPDRFLBY.js → chunk-CLQFP42I.js} +3 -3
  64. package/dist/{chunk-HKAQXFUR.js → chunk-CMHLXELO.js} +3 -3
  65. package/dist/{chunk-UZ43AT4O.js → chunk-CUA6CREW.js} +8 -8
  66. package/dist/{chunk-RYS3URDC.js → chunk-DY2M6BIG.js} +10 -10
  67. package/dist/{chunk-EGEWU776.js → chunk-E3RHEEA6.js} +1 -1
  68. package/dist/{chunk-WFANOFHG.js → chunk-F7A6K3D5.js} +5 -5
  69. package/dist/{chunk-QTQQKQGQ.js → chunk-FFASZGNZ.js} +3 -3
  70. package/dist/{chunk-MPALY3CL.js → chunk-FMC2XNSP.js} +6 -6
  71. package/dist/{chunk-D7X2HMMA.js → chunk-FS2KWQJW.js} +10 -10
  72. package/dist/{chunk-AJ3R5QPD.js → chunk-GGIFS34Z.js} +5 -5
  73. package/dist/{chunk-4E4GWE4L.js → chunk-GVY2X4CC.js} +16 -16
  74. package/dist/{chunk-HJPCHES5.js → chunk-GZYTCHPX.js} +4 -4
  75. package/dist/chunk-IFANUMK3.js +4 -0
  76. package/dist/{chunk-ZREDCRTL.js → chunk-J7CIBRDS.js} +1 -1
  77. package/dist/{chunk-ZOBLEXIU.js → chunk-JJYAYMY7.js} +1 -1
  78. package/dist/{chunk-ZPCADTM5.js → chunk-JRBQLRAZ.js} +1 -1
  79. package/dist/{chunk-YFUMK2E7.js → chunk-JZK3UDOT.js} +1 -1
  80. package/dist/{chunk-O33CUGOI.js → chunk-K64JRGNE.js} +5 -5
  81. package/dist/{chunk-IU5KBQEQ.js → chunk-K7PCBUDC.js} +6 -6
  82. package/dist/{chunk-VG5NGCMQ.js → chunk-KFRU53WD.js} +6 -6
  83. package/dist/{chunk-FSPFV4MI.js → chunk-KKSVRIMP.js} +2 -4
  84. package/dist/{chunk-T5V2GJ4D.js → chunk-KZQAGXME.js} +4 -4
  85. package/dist/{chunk-FTWWJHFX.js → chunk-LOYCPZUB.js} +1 -1
  86. package/dist/{chunk-GBLMVFDW.js → chunk-LPDI5NL6.js} +1 -1
  87. package/dist/{chunk-FPGRKHUW.js → chunk-MH6DI6YY.js} +11 -11
  88. package/dist/{chunk-GQMS5657.js → chunk-MLKY5ESV.js} +1 -1
  89. package/dist/{chunk-TGLHJS3M.js → chunk-MUMQ6PW7.js} +1 -1
  90. package/dist/chunk-N6TK43YN.js +100 -0
  91. package/dist/chunk-N6VP75F5.js +3 -0
  92. package/dist/{chunk-KAVFW5CU.js → chunk-NNOA7AVG.js} +5 -5
  93. package/dist/{chunk-6YQPLI5M.js → chunk-NQJKANUP.js} +11 -11
  94. package/dist/{chunk-UTQG344L.js → chunk-NW7Z3G7P.js} +11 -11
  95. package/dist/{chunk-LR77AS3N.js → chunk-O6ABVKHU.js} +4 -4
  96. package/dist/{chunk-25STFYV3.js → chunk-OPB3I4JH.js} +4 -4
  97. package/dist/{chunk-RBD7SB6M.js → chunk-P5YFQ4IQ.js} +1 -1
  98. package/dist/{chunk-JHZV4TN6.js → chunk-PF5CKD4C.js} +2 -2
  99. package/dist/{chunk-NDKQDIWN.js → chunk-Q4LBBFLO.js} +5 -5
  100. package/dist/{chunk-X6TJR6M2.js → chunk-Q5YM65DZ.js} +8 -8
  101. package/dist/{chunk-XOKANFQD.js → chunk-QASKQDUR.js} +16 -16
  102. package/dist/{chunk-5F7HMNCX.js → chunk-QODTON7V.js} +1 -1
  103. package/dist/{chunk-7KDGW6BR.js → chunk-QXRRAADR.js} +1 -1
  104. package/dist/chunk-QZ3MO3HB.js +1 -0
  105. package/dist/{chunk-VSAI5TH7.js → chunk-R4Q5653D.js} +20 -20
  106. package/dist/{chunk-DXHLUB36.js → chunk-RKFEJ5CX.js} +1 -1
  107. package/dist/{chunk-GKZUAT3K.js → chunk-RSIGTZMU.js} +1 -1
  108. package/dist/{chunk-GNU3U2TP.js → chunk-RZR3OAKV.js} +1 -1
  109. package/dist/chunk-SDI2UGAG.js +1 -0
  110. package/dist/chunk-SKY2NBTQ.js +6 -0
  111. package/dist/{chunk-MKEYXKZA.js → chunk-TDLU6GF5.js} +4 -4
  112. package/dist/chunk-UP442DPT.js +9 -0
  113. package/dist/{chunk-OUKDGO4N.js → chunk-V4RYE6KA.js} +8 -8
  114. package/dist/{chunk-E7WY4GZ3.js → chunk-VMDBVXDJ.js} +1 -1
  115. package/dist/{chunk-F24QTMTY.js → chunk-VP63OOO4.js} +3 -3
  116. package/dist/{chunk-GRBBQ3VF.js → chunk-WKSNTMEJ.js} +1 -1
  117. package/dist/{chunk-DVOQCAC2.js → chunk-WMQ2URP4.js} +1 -1
  118. package/dist/{chunk-ED3QFXBC.js → chunk-WP4CIYJ7.js} +1 -1
  119. package/dist/{chunk-UFXE363L.js → chunk-X6YT3I5F.js} +1 -1
  120. package/dist/{chunk-SGTZJMZ6.js → chunk-XABYSSXW.js} +1 -1
  121. package/dist/{chunk-GSBIJLTD.js → chunk-XAROKI7X.js} +1 -1
  122. package/dist/{chunk-ZMVCN4OA.js → chunk-XHMIJ7S3.js} +7 -7
  123. package/dist/{chunk-Q7HN6T3H.js → chunk-XNKIDGZW.js} +1 -1
  124. package/dist/{chunk-6I6VSUKY.js → chunk-Y23TGQFN.js} +4 -4
  125. package/dist/chunk-ZLHPCPXS.js +19 -0
  126. package/dist/{chunk-LPUGK2MC.js → chunk-ZN2BFSQR.js} +2 -2
  127. package/dist/{chunk-TXMAWCR7.js → chunk-ZRZ5LOW3.js} +1 -1
  128. package/dist/data/ListLoadError.js +1 -1
  129. package/dist/format/index.js +1 -1
  130. package/dist/forms/BorderInput.js +1 -1
  131. package/dist/forms/BrandAssetEditor.js +1 -1
  132. package/dist/forms/Calendar.js +1 -1
  133. package/dist/forms/ColorPicker.js +1 -1
  134. package/dist/forms/ComposerAttachments.js +1 -1
  135. package/dist/forms/CornersInput.js +1 -1
  136. package/dist/forms/DatePicker.js +1 -1
  137. package/dist/forms/DateRangePicker.js +1 -1
  138. package/dist/forms/DisplayChips.js +1 -1
  139. package/dist/forms/FilePicker.js +1 -1
  140. package/dist/forms/IconPicker.js +1 -1
  141. package/dist/forms/InputNumber.js +1 -1
  142. package/dist/forms/LinkPicker.js +1 -1
  143. package/dist/forms/MediaLibrary.js +1 -1
  144. package/dist/forms/MediaUploadField.js +1 -1
  145. package/dist/forms/MediaUploadGrid.js +1 -1
  146. package/dist/forms/MediaUsedInList.js +1 -1
  147. package/dist/forms/PositionInput.js +1 -1
  148. package/dist/forms/Select.js +1 -1
  149. package/dist/forms/SidesInput.js +1 -1
  150. package/dist/forms/Slider.js +1 -1
  151. package/dist/forms/Snippet.js +1 -1
  152. package/dist/forms/SplitButton.js +1 -1
  153. package/dist/forms/TagInput.js +1 -1
  154. package/dist/forms/TextToolbar.js +1 -1
  155. package/dist/forms/WidthsBar.js +1 -1
  156. package/dist/forms/mediaLibraryMenu.js +1 -1
  157. package/dist/forms/textAlign.js +1 -1
  158. package/dist/hooks/useTheme.d.ts +1 -1
  159. package/dist/icons/index.js +1 -1
  160. package/dist/index.d.ts +9 -2
  161. package/dist/index.js +129 -130
  162. package/dist/map/index.js +3 -3
  163. package/dist/markdown/index.js +1 -1
  164. package/dist/page-tabs/index.js +5 -5
  165. package/dist/pdf/index.js +1 -1
  166. package/dist/shell/AppUpdateBanner.js +1 -1
  167. package/dist/shell/Banner.js +1 -1
  168. package/dist/shell/Breadcrumbs.js +1 -1
  169. package/dist/shell/ColoredBadge.js +1 -1
  170. package/dist/shell/ConfirmDialog.js +1 -1
  171. package/dist/shell/ContextMenu.js +1 -1
  172. package/dist/shell/Dialog.js +1 -1
  173. package/dist/shell/Drawer.js +1 -1
  174. package/dist/shell/DropdownMenu.js +1 -1
  175. package/dist/shell/EmptyState.js +1 -1
  176. package/dist/shell/HelpCenter.js +1 -1
  177. package/dist/shell/ImageLightbox.js +1 -1
  178. package/dist/shell/LanguageSelect.js +1 -1
  179. package/dist/shell/Markdown.js +1 -1
  180. package/dist/shell/PageHeader.js +1 -1
  181. package/dist/shell/PopupMenu.js +1 -1
  182. package/dist/shell/ProductionTimeline.js +1 -1
  183. package/dist/shell/Result.js +1 -1
  184. package/dist/shell/SearchableSelect.js +1 -1
  185. package/dist/shell/SettingReset.js +1 -1
  186. package/dist/shell/SettingRow.js +1 -1
  187. package/dist/shell/SidebarLayout.js +1 -1
  188. package/dist/shell/SidebarNav.js +1 -1
  189. package/dist/shell/SortableList.js +1 -1
  190. package/dist/shell/StepChain.js +1 -1
  191. package/dist/shell/Stepper.js +1 -1
  192. package/dist/shell/TopNav.js +1 -1
  193. package/dist/shell/Tree.js +1 -1
  194. package/dist/telemetry/index.js +1 -1
  195. package/dist/templates/ChatTemplate.js +1 -1
  196. package/dist/templates/CheckoutTemplate.js +1 -1
  197. package/dist/templates/DashboardTemplate.js +1 -1
  198. package/dist/templates/DataTablePage.js +1 -1
  199. package/dist/templates/EmailTemplate.js +1 -1
  200. package/dist/templates/ErrorBoundary.d.ts +1 -1
  201. package/dist/templates/FormLayoutPage.js +1 -1
  202. package/dist/ui/index.js +1 -1
  203. package/dist/version.js +1 -1
  204. package/package.json +1 -1
  205. package/dist/Notepad-63Q3JSCV.js +0 -25
  206. package/dist/PdfViewer-DFBPEUY5.js +0 -1
  207. package/dist/Sidebar-QFT5WPK4.js +0 -44
  208. package/dist/chunk-4AJRHTTB.js +0 -1
  209. package/dist/chunk-5CH2RGL6.js +0 -29
  210. package/dist/chunk-7YU27U3Y.js +0 -19
  211. package/dist/chunk-AEJNFA2K.js +0 -6
  212. package/dist/chunk-IEAFSVXC.js +0 -1
  213. package/dist/chunk-POCQ7ZL4.js +0 -3
  214. package/dist/chunk-PVR4KU7H.js +0 -7
  215. package/dist/chunk-R2QDO7NY.js +0 -4
  216. package/dist/chunk-RBXSU25O.js +0 -9
  217. package/dist/chunk-XSJJPACH.js +0 -11
  218. package/dist/chunk-ZBTDMQUI.js +0 -100
@@ -1 +1 @@
1
- export{BoxPlotChart as default}from"../chunk-DL6QIWVR.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
1
+ export{BoxPlotChart as default}from"../chunk-42XMT5JN.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1 +1 @@
1
- export{CandlestickChart as default}from"../chunk-ZOBLEXIU.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
1
+ export{CandlestickChart as default}from"../chunk-JJYAYMY7.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{CartesianPlot as default}from"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{CartesianPlot as default}from"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{ChordChart as default,foldChord}from"../chunk-QMUAY24U.js";import"../chunk-TBPHW42V.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{ChordChart as default,foldChord}from"../chunk-QMUAY24U.js";import"../chunk-TBPHW42V.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{ColumnChart as default}from"../chunk-WFANOFHG.js";import"../chunk-465RRWBY.js";import"../chunk-BMQCUHSD.js";import"../chunk-CNYAHYE6.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{ColumnChart as default}from"../chunk-F7A6K3D5.js";import"../chunk-465RRWBY.js";import"../chunk-BMQCUHSD.js";import"../chunk-CNYAHYE6.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{HeatmapChart as default}from"../chunk-LKW3YAZN.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{HeatmapChart as default}from"../chunk-A3VJ4PRU.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1 +1 @@
1
- export{HistogramChart as default}from"../chunk-LPUGK2MC.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
1
+ export{HistogramChart as default}from"../chunk-ZN2BFSQR.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-AG2OLB3E.js";import"../chunk-TBPHW42V.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-2JWPNR2U.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-AG2OLB3E.js";import"../chunk-TBPHW42V.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-2JWPNR2U.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1 +1 @@
1
- export{RangeChart as default}from"../chunk-PKIDVVAE.js";import"../chunk-VFC6QUEN.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
1
+ export{RangeChart as default}from"../chunk-2SLQD57V.js";import"../chunk-VFC6QUEN.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{SankeyChart as default}from"../chunk-YVTKTWZX.js";import"../chunk-TBPHW42V.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{SankeyChart as default}from"../chunk-YVTKTWZX.js";import"../chunk-TBPHW42V.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-HJPCHES5.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-GZYTCHPX.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1 +1 @@
1
- export{SpecChart as default}from"../chunk-GNU3U2TP.js";import"../chunk-X2S2XDZI.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-XOKANFQD.js";import"../chunk-CK2YOGUS.js";import"../chunk-IWEL2ZCV.js";import"../chunk-VFC6QUEN.js";import"../chunk-WFANOFHG.js";import"../chunk-465RRWBY.js";import"../chunk-BMQCUHSD.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-RQNZ2PVW.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
1
+ export{SpecChart as default}from"../chunk-RZR3OAKV.js";import"../chunk-X2S2XDZI.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-QASKQDUR.js";import"../chunk-RQNZ2PVW.js";import"../chunk-CK2YOGUS.js";import"../chunk-IWEL2ZCV.js";import"../chunk-VFC6QUEN.js";import"../chunk-F7A6K3D5.js";import"../chunk-465RRWBY.js";import"../chunk-BMQCUHSD.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{SunburstChart as default}from"../chunk-KE5U4KKG.js";import"../chunk-TBPHW42V.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{SunburstChart as default}from"../chunk-KE5U4KKG.js";import"../chunk-TBPHW42V.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{TimeSeriesChart as default}from"../chunk-XOKANFQD.js";import"../chunk-CK2YOGUS.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-BMQCUHSD.js";import"../chunk-CNYAHYE6.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-RQNZ2PVW.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{TimeSeriesChart as default}from"../chunk-QASKQDUR.js";import"../chunk-RQNZ2PVW.js";import"../chunk-CK2YOGUS.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-BMQCUHSD.js";import"../chunk-CNYAHYE6.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{TreemapChart as default}from"../chunk-W244OMOU.js";import"../chunk-46BYGPGD.js";import"../chunk-TBPHW42V.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
2
+ export{TreemapChart as default}from"../chunk-W244OMOU.js";import"../chunk-46BYGPGD.js";import"../chunk-TBPHW42V.js";import"../chunk-CNYAHYE6.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1 +1 @@
1
- export{WaterfallChart as default}from"../chunk-7KDGW6BR.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
1
+ export{WaterfallChart as default}from"../chunk-QXRRAADR.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
@@ -1,9 +1,9 @@
1
- import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-RBIGSJ2J.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:P=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:j="bg-white"}){const z="right"===m,C=i().sidebar,D=a(),I=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[W,M]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),O=null!=l||null!=n,R=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:W},children:[
2
- /* @__PURE__ */f("div",{className:`flex h-full flex-col ${O?"overflow-hidden":"overflow-y-auto"} ${P}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),O?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
- /* @__PURE__ */p(t,{side:m,width:W,onResize:M,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:C.resize})]}),S=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${j}`,children:u});/* @__PURE__ */
1
+ import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-RBIGSJ2J.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:P=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:j="bg-white"}){const z="right"===m,C=i().sidebar,D=a(),I=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[R,W]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),K=null!=l||null!=n,M=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:R},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${K?"overflow-hidden":"overflow-y-auto"} ${P}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),K?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
+ /* @__PURE__ */p(t,{side:m,width:R,onResize:W,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:C.resize})]}),O=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${j}`,children:u});/* @__PURE__ */
4
4
  return f("div",D?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:I,top:l,fallback:C.sections}),S,
6
- /* @__PURE__ */p(v,{phone:I,bottom:n,label:C.sections,closeLabel:C.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[z?null:R,S,z?R:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
5
+ /* @__PURE__ */p(g,{phone:I,top:l,fallback:C.sections}),O,
6
+ /* @__PURE__ */p(v,{phone:I,bottom:n,label:C.sections,closeLabel:C.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[z?null:M,O,z?M:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
7
7
  return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
8
8
  /* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
9
9
  /* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
@@ -1,6 +1,6 @@
1
- import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-25STFYV3.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-X2PZMXDP.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:M,emptyLabel:F,radius:N=3}){const C=o().charts,O=n(),T=w??(e=>h(e,O)),V=v??C.range,A=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),P=r(0,j,L);/* @__PURE__ */
2
- return s(t,{labels:d,values:A,height:k,width:g,max:b,min:x,formatValue:T,yAxisLabel:y,className:M,emptyLabel:F,bandPadding:"bar"===p?.34:0,ariaLabel:C.rangeLabel(V,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:C.high,color:P,value:null==u[e]?void 0:T(u[e].high)},{key:"low",label:C.low,color:P,value:null==u[e]?void 0:T(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:N,fill:P,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
1
+ import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-OPB3I4JH.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-X2PZMXDP.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:M,emptyLabel:N,radius:O=3}){const C=o().charts,F=n(),P=w??(e=>h(e,F)),A=v??C.range,R=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),T=r(0,j,L);/* @__PURE__ */
2
+ return s(t,{labels:d,values:R,height:k,width:g,max:b,min:x,formatValue:P,yAxisLabel:y,className:M,emptyLabel:N,bandPadding:"bar"===p?.34:0,ariaLabel:C.rangeLabel(A,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:C.high,color:T,value:null==u[e]?void 0:P(u[e].high)},{key:"low",label:C.low,color:T,value:null==u[e]?void 0:P(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:O,fill:T,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
3
3
  return m(c,{children:[
4
- /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:P,fillOpacity:.2,stroke:"none"}),
5
- /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:P,strokeWidth:2,strokeLinejoin:"round"}),
6
- /* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:P,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
4
+ /* @__PURE__ */s("path",{d:e(i(r,f),a),fill:T,fillOpacity:.2,stroke:"none"}),
5
+ /* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:T,strokeWidth:2,strokeLinejoin:"round"}),
6
+ /* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:T,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
@@ -1,3 +1,3 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as t}from"./chunk-X2PZMXDP.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KKSVRIMP.js";import{useShellStrings as t}from"./chunk-X2PZMXDP.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
2
2
  return n(e,t?{name:"check",className:`${r} text-green-600`,"aria-hidden":"true"}:{name:"copy",className:r,"aria-hidden":"true"})}function m({text:e}){const{copied:r,copy:o}=a(e),c=t().copy;/* @__PURE__ */
3
3
  return n("button",{onClick:o,title:r?c.copiedValue:c.copyValue(e),className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */n(u,{copied:r})})}export{m as CopyButton,u as CopyGlyph,a as useCopyText};
@@ -1,28 +1,28 @@
1
- import{useCopyText as e,CopyGlyph as t}from"./chunk-NDEIZUMG.js";import{ItemCount as n}from"./chunk-GMRZX2ET.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-FPGRKHUW.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{useShellStrings as a}from"./chunk-X2PZMXDP.js";import{useState as s,useMemo as d,useRef as c,useEffect as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as h}from"react/jsx-runtime";function g(e){const t=[];let n=0;for(;n<e.length;){const r=e[n].group;let i=n;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;t.push(i>n?{group:r,start:n,end:i}:{start:n,end:n}),n=i+1}return t}function b(e,t){return e.find(e=>t>=e.start&&t<=e.end)}function k(e,t,n,r){const i=e.findIndex(e=>e.key===t.key);let l=e.findIndex(e=>e.key===n);if(i<0||l<0)return null;const o=g(e),a=b(o,i),s="group"===t.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[t.key];if(s.includes(n))return null;const d=b(o,l);if("tab"===t.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,t,n,r){const i=k(e,t,n,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((t,n)=>t===e[n].key)?null:a}var v="flex-[0_1_15rem]",w=v,N="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function C(){/* @__PURE__ */
1
+ import{useCopyText as e,CopyGlyph as t}from"./chunk-3V6ZERBS.js";import{ItemCount as n}from"./chunk-GMRZX2ET.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-MH6DI6YY.js";import{Icon as o}from"./chunk-KKSVRIMP.js";import{useShellStrings as a}from"./chunk-X2PZMXDP.js";import{useState as s,useMemo as d,useRef as c,useEffect as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as h}from"react/jsx-runtime";function g(e){const t=[];let n=0;for(;n<e.length;){const r=e[n].group;let i=n;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;t.push(i>n?{group:r,start:n,end:i}:{start:n,end:n}),n=i+1}return t}function b(e,t){return e.find(e=>t>=e.start&&t<=e.end)}function k(e,t,n,r){const i=e.findIndex(e=>e.key===t.key);let l=e.findIndex(e=>e.key===n);if(i<0||l<0)return null;const o=g(e),a=b(o,i),s="group"===t.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[t.key];if(s.includes(n))return null;const d=b(o,l);if("tab"===t.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,t,n,r){const i=k(e,t,n,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((t,n)=>t===e[n].key)?null:a}var v="flex-[0_1_15rem]",w=v,N="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function C(){/* @__PURE__ */
2
2
  return y(o,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function $({text:n,label:r,copiedLabel:i}){const{copied:l,copy:o}=e(n);/* @__PURE__ */
3
- return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(t,{copied:l,className:"size-3.5"})})}function I({node:e}){const t=c(null);return f(()=>{const n=t.current;if(n)return n.appendChild(e),()=>{e.parentNode===n&&n.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:t,className:"ml-1 flex shrink-0 items-center"})}function z({tabs:e,activeKey:t,idFor:f,panelMounted:b,onActivate:z,onClose:D,onCloseMany:j,label:M,className:T,activeClassName:E,end:A,afterPinned:R,onIconMenu:_,menuItems:B,sizing:K="even",tall:S=!1,onReorder:F,groupInfo:O}){const P=a().pageTabs,X=a().count,[L,G]=s(null),W=S?"h-[34px]":"h-8",Z=d(()=>e.map(e=>({key:e.key,group:O?e.group:void 0})),[e,O]),H=d(()=>g(Z),[Z]),[U,V]=s(()=>/* @__PURE__ */new Set),Y=e=>V(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),q=d(()=>{const n=[];for(const r of H)for(let i=r.start;i<=r.end;i++)void 0!==r.group&&U.has(r.group)&&e[i].key!==t||n.push(e[i]);return n},[H,U,e,t]),J=c(null),[Q,ee]=s(null),te=(t,n)=>F?{draggable:!0,onDragStart:n=>{J.current=t,n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("text/plain",e.find(e=>e.key===t.key)?.title??"")},onDragOver:e=>{const r=J.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=n!==t.key||"tab"===t.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(Z,r,n,l)?k(Z,r,n,l):null;o?(e.preventDefault(),e.dataTransfer.dropEffect="move",Q?.key===o.key&&Q.side===o.side||ee({key:o.key,side:o.side})):Q&&ee(null)},onDrop:e=>{const t=J.current;if(!t||!Q)return;e.preventDefault();const n=x(Z,t,Q.key,Q.side);J.current=null,ee(null),n&&F(n)},onDragEnd:()=>{J.current=null,ee(null)}}:{},ne=d(()=>new Set(H.filter(e=>void 0!==e.group&&O).map(t=>e[t.start].key)),[H,e,O]),re=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),ie=e=>Q?.key===e&&!("before"===Q.side&&ne.has(e))&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re(Q.side)}),le=e.length;u(()=>{if(!t)return;const e=document.getElementById(f(t,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,t,le]);const oe=R?q.findIndex(e=>!e.pinned):-1,ae=q.some(e=>e.key===t)?t:q[0]?.key,se=e=>{const t=q[(e+q.length)%q.length];t&&document.getElementById(f(t.key,"tab"))?.focus()},de=(e,t)=>{const n=q[e+t];if(!F||!n)return;const r=x(Z,{kind:"tab",key:q[e].key},n.key,t<0?"before":"after");r&&(F(r),setTimeout(()=>document.getElementById(f(q[e].key,"tab"))?.focus(),0))},ce=L?e.find(e=>e.key===L.key):void 0,ue=ce&&B?B(ce.key):[],me=ce?e.indexOf(ce):-1,fe=e=>e.some(e=>!e.pinned),pe=e=>()=>{G(null),e()},ye=(e,n)=>{const r=e.key===t,i=!!e.dirty,l=e.icon,a=r?E??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=!!n&&!r&&n.key!==t,d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":b?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===ae?0:-1,title:e.title,onClick:()=>z(e.key)},c={onContextMenu:t=>((e,t)=>{e.preventDefault(),G({x:e.clientX,y:e.clientY,key:t.key})})(t,e),onAuxClick:t=>((e,t)=>{1!==e.button||t.pinned||(e.preventDefault(),D(t.key))})(t,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
3
+ return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(t,{copied:l,className:"size-3.5"})})}function I({node:e}){const t=c(null);return f(()=>{const n=t.current;if(n)return n.appendChild(e),()=>{e.parentNode===n&&n.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:t,className:"ml-1 flex shrink-0 items-center"})}function z({tabs:e,activeKey:t,idFor:f,panelMounted:b,onActivate:z,onClose:D,onCloseMany:j,label:M,className:T,activeClassName:E,end:R,afterPinned:A,onIconMenu:_,menuItems:B,sizing:K="even",tall:S=!1,onReorder:O,groupInfo:X}){const L=a().pageTabs,P=a().count,[V,Y]=s(null),Z=S?"h-[34px]":"h-8",F=d(()=>e.map(e=>({key:e.key,group:X?e.group:void 0})),[e,X]),H=d(()=>g(F),[F]),[W,G]=s(()=>/* @__PURE__ */new Set),q=e=>G(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),J=d(()=>{const n=[];for(const r of H)for(let i=r.start;i<=r.end;i++)void 0!==r.group&&W.has(r.group)&&e[i].key!==t||n.push(e[i]);return n},[H,W,e,t]),Q=c(null),[U,ee]=s(null),te=(t,n)=>O?{draggable:!0,onDragStart:n=>{Q.current=t,n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("text/plain",e.find(e=>e.key===t.key)?.title??"")},onDragOver:e=>{const r=Q.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=n!==t.key||"tab"===t.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(F,r,n,l)?k(F,r,n,l):null;o?(e.preventDefault(),e.dataTransfer.dropEffect="move",U?.key===o.key&&U.side===o.side||ee({key:o.key,side:o.side})):U&&ee(null)},onDrop:e=>{const t=Q.current;if(!t||!U)return;e.preventDefault();const n=x(F,t,U.key,U.side);Q.current=null,ee(null),n&&O(n)},onDragEnd:()=>{Q.current=null,ee(null)}}:{},ne=d(()=>new Set(H.filter(e=>void 0!==e.group&&X).map(t=>e[t.start].key)),[H,e,X]),re=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),ie=e=>U?.key===e&&!("before"===U.side&&ne.has(e))&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re(U.side)}),le=e.length;u(()=>{if(!t)return;const e=document.getElementById(f(t,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,t,le]);const oe=A?J.findIndex(e=>!e.pinned):-1,ae=J.some(e=>e.key===t)?t:J[0]?.key,se=e=>{const t=J[(e+J.length)%J.length];t&&document.getElementById(f(t.key,"tab"))?.focus()},de=(e,t)=>{const n=J[e+t];if(!O||!n)return;const r=x(F,{kind:"tab",key:J[e].key},n.key,t<0?"before":"after");r&&(O(r),setTimeout(()=>document.getElementById(f(J[e].key,"tab"))?.focus(),0))},ce=V?e.find(e=>e.key===V.key):void 0,ue=ce&&B?B(ce.key):[],me=ce?e.indexOf(ce):-1,fe=e=>e.some(e=>!e.pinned),pe=e=>()=>{Y(null),e()},ye=(e,n)=>{const r=e.key===t,i=!!e.dirty,l=e.icon,a=r?E??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=!!n&&!r&&n.key!==t,d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":b?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===ae?0:-1,title:e.title,onClick:()=>z(e.key)},c={onContextMenu:t=>((e,t)=>{e.preventDefault(),Y({x:e.clientX,y:e.clientY,key:t.key})})(t,e),onAuxClick:t=>((e,t)=>{1!==e.button||t.pinned||(e.preventDefault(),D(t.key))})(t,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
4
4
  /* @__PURE__ */p("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[l,i&&!r&&!e.pinned&&
5
- /* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),h=r&&!!_&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${W} ${l?"w-10":""} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),
5
+ /* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),h=r&&!!_&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${Z} ${l?"w-10":""} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),
6
6
  /* @__PURE__ */p("button",{...d,className:`flex h-full items-center justify-center rounded-t-md ${l?"w-full":"px-3"} ${N}`,children:[u,
7
7
  /* @__PURE__ */y("span",{className:l?"sr-only":"whitespace-nowrap text-sm",children:e.title})]})]},e.key):/* @__PURE__ */p(m,{children:[s&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
8
- /* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-md border border-b-0 text-sm transition-colors ${W} ${"active-full"===K&&r?"":"@container"} ${"active-full"===K?r?"flex-[0_0_15rem] min-w-0":w:r&&(e.copy||h)?"flex-[0_1_20rem]":v} ${r?"active-full"===K?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),h&&
9
- /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":P.tabMenu,title:P.tabMenu,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();_?.(e.key,n.left,n.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${N}`,children:u}),
8
+ /* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-md border border-b-0 text-sm transition-colors ${Z} ${"active-full"===K&&r?"":"@container"} ${"active-full"===K?r?"flex-[0_0_15rem] min-w-0":w:r&&(e.copy||h)?"flex-[0_1_20rem]":v} ${r?"active-full"===K?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),h&&
9
+ /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":L.tabMenu,title:L.tabMenu,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();_?.(e.key,n.left,n.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${N}`,children:u}),
10
10
  /* @__PURE__ */p("button",{...d,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${h?"pl-2":"pl-3"} ${N} ${r?h?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2 @max-[4.5rem]:group-hover:pr-3"}`,children:[!h&&u,
11
11
  /* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===K&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
12
- /* @__PURE__ */y("span",{role:"img","aria-label":P.favorite,title:P.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(I,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y($,{text:e.copy,label:P.copy(e.copy),copiedLabel:P.copied}),
13
- /* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":P.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
14
- /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":P.closeTab?.(e.title)??`${P.close} ${e.title}`,onClick:()=>D(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(C,{})})]})]})]},e.key)},he=[];let ge,be=0,ke=!R;for(const t of H){const r=q.filter(n=>{const r=e.indexOf(n);return r>=t.start&&r<=t.end});if(ke||be!==oe||(ke=!0,he.push(/* @__PURE__ */y(m,{children:R},"rosh-after-pinned")),ge=void 0),be+=r.length,void 0===t.group||!O){for(const e of r)he.push(ye(e,ge)),ge=e;continue}ge=void 0;const i=t.group,l=O(i),a=t.end-t.start+1,s=!U.has(i),d=e[t.start].key;he.push(
12
+ /* @__PURE__ */y("span",{role:"img","aria-label":L.favorite,title:L.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(I,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y($,{text:e.copy,label:L.copy(e.copy),copiedLabel:L.copied}),
13
+ /* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":L.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
14
+ /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":L.closeTab?.(e.title)??`${L.close} ${e.title}`,onClick:()=>D(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(C,{})})]})]})]},e.key)},he=[];let ge,be=0,ke=!A;for(const t of H){const r=J.filter(n=>{const r=e.indexOf(n);return r>=t.start&&r<=t.end});if(ke||be!==oe||(ke=!0,he.push(/* @__PURE__ */y(m,{children:A},"rosh-after-pinned")),ge=void 0),be+=r.length,void 0===t.group||!X){for(const e of r)he.push(ye(e,ge)),ge=e;continue}ge=void 0;const i=t.group,l=X(i),a=t.end-t.start+1,s=!W.has(i),d=e[t.start].key;he.push(
15
15
  /* @__PURE__ */p("div",{role:"group","aria-label":l.label,"data-tab-group":i,className:"relative mx-1 flex shrink-0 items-end first:ml-0 min-w-0",children:[
16
- /* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":s,title:P.groupToggle(l.label,a),onClick:()=>Y(i),...te({kind:"group",key:d},d),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${N}`,children:[
16
+ /* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":s,title:L.groupToggle(l.label,a),onClick:()=>q(i),...te({kind:"group",key:d},d),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${N}`,children:[
17
17
  /* @__PURE__ */y(o,{name:s?"chevron-down":"chevron-right","aria-hidden":"true",className:"size-3",strokeWidth:2}),l.icon&&/* @__PURE__ */y("span",{className:"flex size-3.5 items-center justify-center [&>svg]:size-3.5","aria-hidden":"true",children:l.icon}),
18
18
  /* @__PURE__ */y("span",{className:"max-w-[8rem] truncate",children:l.label}),
19
- /* @__PURE__ */y(n,{count:a,label:X.tabs(a),active:!0})]}),Q?.key===d&&"before"===Q.side&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re("before")}),r.map((e,t)=>ye(e,t>0?r[t-1]:void 0)),
20
- /* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-[2] h-0.5 bg-blue-500"})]},`rosh-group-${d}`))}return ke||he.push(/* @__PURE__ */y(m,{children:R},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:T??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
19
+ /* @__PURE__ */y(n,{count:a,label:P.tabs(a),active:!0})]}),U?.key===d&&"before"===U.side&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re("before")}),r.map((e,t)=>ye(e,t>0?r[t-1]:void 0)),
20
+ /* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-[2] h-0.5 bg-blue-500"})]},`rosh-group-${d}`))}return ke||he.push(/* @__PURE__ */y(m,{children:A},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:T??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
21
21
  /* @__PURE__ */y("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
22
- /* @__PURE__ */y("div",{role:"tablist","aria-label":M,onKeyDown:e=>{const t=q.findIndex(t=>document.getElementById(f(t.key,"tab"))===e.target);if(t<0)return;const n=e.shiftKey&&(e.ctrlKey||e.metaKey);if(n&&"ArrowRight"===e.key)de(t,1);else if(n&&"ArrowLeft"===e.key)de(t,-1);else if("ArrowRight"===e.key)se(t+1);else if("ArrowLeft"===e.key)se(t-1);else if("Home"===e.key)se(0);else if("End"===e.key)se(q.length-1);else{if("Delete"!==e.key||q[t].pinned)return;D(q[t].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:he}),A&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:A}),L&&ce&&/* @__PURE__ */p(r,{portal:!0,style:{left:L.x,top:L.y},onClose:()=>G(null),children:[ue.length>0&&/* @__PURE__ */p(h,{children:[ue.map((e,t)=>/* @__PURE__ */p(i,{onClick:pe(e.onSelect),children:[e.icon,e.label]},t)),
22
+ /* @__PURE__ */y("div",{role:"tablist","aria-label":M,onKeyDown:e=>{const t=J.findIndex(t=>document.getElementById(f(t.key,"tab"))===e.target);if(t<0)return;const n=e.shiftKey&&(e.ctrlKey||e.metaKey);if(n&&"ArrowRight"===e.key)de(t,1);else if(n&&"ArrowLeft"===e.key)de(t,-1);else if("ArrowRight"===e.key)se(t+1);else if("ArrowLeft"===e.key)se(t-1);else if("Home"===e.key)se(0);else if("End"===e.key)se(J.length-1);else{if("Delete"!==e.key||J[t].pinned)return;D(J[t].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:he}),R&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:R}),V&&ce&&/* @__PURE__ */p(r,{portal:!0,style:{left:V.x,top:V.y},onClose:()=>Y(null),children:[ue.length>0&&/* @__PURE__ */p(h,{children:[ue.map((e,t)=>/* @__PURE__ */p(i,{onClick:pe(e.onSelect),children:[e.icon,e.label]},t)),
23
23
  /* @__PURE__ */y(l,{})]}),
24
- /* @__PURE__ */y(i,{disabled:ce.pinned,onClick:pe(()=>D(ce.key)),children:P.close}),
24
+ /* @__PURE__ */y(i,{disabled:ce.pinned,onClick:pe(()=>D(ce.key)),children:L.close}),
25
25
  /* @__PURE__ */y(l,{}),
26
- /* @__PURE__ */y(i,{disabled:!fe(e.filter(e=>e.key!==ce.key)),onClick:pe(()=>j("others",ce.key)),children:P.closeOthers}),
27
- /* @__PURE__ */y(i,{disabled:!fe(e.slice(me+1)),onClick:pe(()=>j("right",ce.key)),children:P.closeRight}),
28
- /* @__PURE__ */y(i,{disabled:!fe(e),onClick:pe(()=>j("all",null)),children:P.closeAll})]})]})}export{z as TabStrip};
26
+ /* @__PURE__ */y(i,{disabled:!fe(e.filter(e=>e.key!==ce.key)),onClick:pe(()=>j("others",ce.key)),children:L.closeOthers}),
27
+ /* @__PURE__ */y(i,{disabled:!fe(e.slice(me+1)),onClick:pe(()=>j("right",ce.key)),children:L.closeRight}),
28
+ /* @__PURE__ */y(i,{disabled:!fe(e),onClick:pe(()=>j("all",null)),children:L.closeAll})]})]})}export{z as TabStrip};
@@ -1,4 +1,4 @@
1
- import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-25STFYV3.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-X2PZMXDP.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
1
+ import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-OPB3I4JH.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-X2PZMXDP.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
2
2
  return m(t,{labels:s.map(e=>e.label),values:j,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:t=>{const i=s[t];/* @__PURE__ */
3
3
  return m(e,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
4
4
  return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
@@ -1,2 +1,2 @@
1
- import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-XS4HFUTW.js";import{PopupMenu as n,MenuSemanticsContext as r}from"./chunk-FPGRKHUW.js";import{leavesContextMenuAlone as o}from"./chunk-5QFPTDQF.js";import{placeAtPoint as i,popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useRef as s,useId as a,useState as d,useEffect as m,useCallback as f}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";function h(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function w({at:o,onClose:w,items:y,linkAs:g,children:k,owner:E,"aria-label":b,minWidth:x=180,className:H="",autoFocus:D=!0}){const L=s(null),S=a(),[U,j]=d(null),A=s(w);A.current=w,c(()=>{const e=L.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},n=i({point:o,menu:t,bounds:l(E??null)});j(e=>e&&e.left===n.left&&e.top===n.top&&e.maxHeight===n.maxHeight?e:{left:n.left,top:n.top,maxHeight:n.maxHeight,scroll:t.height>n.maxHeight})},[o.x,o.y,E]);const W=s(null),C=s(!1);m(()=>(W.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!L.current?.contains(e)||W.current?.focus?.({preventScroll:!0})}),[]),m(()=>{U&&!C.current&&D&&(C.current=!0,h(L.current)[0]?.focus({preventScroll:!0}))},[U,D]),m(()=>{if(D)return;const e=e=>{if(L.current?.contains(document.activeElement))return;const t=h(L.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[D]),m(()=>u(e=>"Escape"===e.key&&(A.current(),!0),()=>L.current),[]),m(()=>{const e=()=>A.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const F=f(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void A.current();const t=h(L.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),T=U?{left:U.left,top:U.top,maxHeight:U.maxHeight,...U.scroll?{overflowY:"auto"}:{}}:{left:o.x,top:o.y,visibility:"hidden"};/* @__PURE__ */
2
- return p(n,{portal:!0,minWidth:x,style:T,onClose:w,className:H,children:/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */v("div",{ref:L,id:S,role:"menu","aria-label":b,"aria-describedby":y?t(y,S):void 0,"data-context-menu":"",onKeyDown:F,children:[y&&e(y,{menuId:S,choose:e=>{e.disabled||(A.current(),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>A.current(),linkAs:g}),k]})})})}function y(){const[e,t]=d(null),n=f(()=>t(null),[]),r=f((e,n)=>{const r="nativeEvent"in e?e.nativeEvent:e;if(o(r))return!1;e.preventDefault();const i=e.target instanceof Element?e.target:null;let{clientX:l,clientY:c}=e;if(0===l&&0===c&&i){const e=i.getBoundingClientRect();l=e.left,c=e.bottom}return t({x:l,y:c,data:n,owner:i}),!0},[]),i=f(e=>{r(e,void 0)},[r]);return{open:r,onContextMenu:i,close:n,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:n}}}export{w as ContextMenu,y as useContextMenu};
1
+ import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-BZPPDYEE.js";import{PopupMenu as n,MenuSemanticsContext as r}from"./chunk-MH6DI6YY.js";import{leavesContextMenuAlone as o}from"./chunk-5QFPTDQF.js";import{placeAtPoint as i,popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useRef as s,useId as a,useState as d,useEffect as m,useCallback as f}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";function h(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function w({at:o,onClose:w,items:y,linkAs:g,children:k,owner:E,"aria-label":b,minWidth:x=180,className:D="",autoFocus:H=!0}){const L=s(null),j=a(),[A,S]=d(null),U=s(w);U.current=w,c(()=>{const e=L.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},n=i({point:o,menu:t,bounds:l(E??null)});S(e=>e&&e.left===n.left&&e.top===n.top&&e.maxHeight===n.maxHeight?e:{left:n.left,top:n.top,maxHeight:n.maxHeight,scroll:t.height>n.maxHeight})},[o.x,o.y,E]);const C=s(null),Y=s(!1);m(()=>(C.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!L.current?.contains(e)||C.current?.focus?.({preventScroll:!0})}),[]),m(()=>{A&&!Y.current&&H&&(Y.current=!0,h(L.current)[0]?.focus({preventScroll:!0}))},[A,H]),m(()=>{if(H)return;const e=e=>{if(L.current?.contains(document.activeElement))return;const t=h(L.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[H]),m(()=>u(e=>"Escape"===e.key&&(U.current(),!0),()=>L.current),[]),m(()=>{const e=()=>U.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const P=f(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void U.current();const t=h(L.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),T=A?{left:A.left,top:A.top,maxHeight:A.maxHeight,...A.scroll?{overflowY:"auto"}:{}}:{left:o.x,top:o.y,visibility:"hidden"};/* @__PURE__ */
2
+ return p(n,{portal:!0,minWidth:x,style:T,onClose:w,className:D,children:/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */v("div",{ref:L,id:j,role:"menu","aria-label":b,"aria-describedby":y?t(y,j):void 0,"data-context-menu":"",onKeyDown:P,children:[y&&e(y,{menuId:j,choose:e=>{e.disabled||(U.current(),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>U.current(),linkAs:g}),k]})})})}function y(){const[e,t]=d(null),n=f(()=>t(null),[]),r=f((e,n)=>{const r="nativeEvent"in e?e.nativeEvent:e;if(o(r))return!1;e.preventDefault();const i=e.target instanceof Element?e.target:null;let{clientX:l,clientY:c}=e;if(0===l&&0===c&&i){const e=i.getBoundingClientRect();l=e.left,c=e.bottom}return t({x:l,y:c,data:n,owner:i}),!0},[]),i=f(e=>{r(e,void 0)},[r]);return{open:r,onContextMenu:i,close:n,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:n}}}export{w as ContextMenu,y as useContextMenu};
@@ -1 +1 @@
1
- import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-IEAFSVXC.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},F=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{F(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(X,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(X,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;F(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
1
+ import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-QZ3MO3HB.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&O.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-CBGKLHPB.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-7YU27U3Y.js";import{FormField as r}from"./chunk-6KBDNYRW.js";import{Checkbox_default as n}from"./chunk-CGZBDI6C.js";import{Textarea_default as i}from"./chunk-PB7G6CJ7.js";import{Input_default as c}from"./chunk-MAMWQCJ6.js";import{Button_default as o}from"./chunk-NHH2MXFU.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-CBGKLHPB.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-ZLHPCPXS.js";import{FormField as r}from"./chunk-6KBDNYRW.js";import{Checkbox_default as n}from"./chunk-CGZBDI6C.js";import{Textarea_default as i}from"./chunk-PB7G6CJ7.js";import{Input_default as c}from"./chunk-MAMWQCJ6.js";import{Button_default as o}from"./chunk-NHH2MXFU.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
2
2
  return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
3
3
  /* @__PURE__ */d("div",{children:[
4
4
  /* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
@@ -1,2 +1,2 @@
1
- import{InputNumber_default as a}from"./chunk-PA37I5ZX.js";import{Icon as e}from"./chunk-FSPFV4MI.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
1
+ import{InputNumber_default as a}from"./chunk-5VDT4762.js";import{Icon as e}from"./chunk-KKSVRIMP.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
2
2
  return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
@@ -0,0 +1,29 @@
1
+ import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-XHMIJ7S3.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-LOYCPZUB.js";import{ImageLightbox as r}from"./chunk-AXL7VTNM.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-KFRU53WD.js";import{Breadcrumbs as d}from"./chunk-RSIGTZMU.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-JZK3UDOT.js";import{useMediaMoveItems as u}from"./chunk-B7AHMB3U.js";import{copyToClipboard as m}from"./chunk-VC42SDAC.js";import{DropdownMenu as p}from"./chunk-ACVKU6YW.js";import{MediaUploadGrid as h}from"./chunk-BMXMSAQE.js";import{MediaUsedInList as f}from"./chunk-ZRZ5LOW3.js";import{NativeSelect as g}from"./chunk-ZLHPCPXS.js";import{Segmented as v}from"./chunk-CKPVXDKX.js";import{useGridSelection as k}from"./chunk-VLKDWKVR.js";import{useMarquee as y}from"./chunk-OLFYNMTD.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as C}from"./chunk-45XXERGA.js";import{Banner as x}from"./chunk-6FPDOEOX.js";import{Input_default as N}from"./chunk-MAMWQCJ6.js";import{IconButton_default as I}from"./chunk-RUTUVS4H.js";import{useFileIntake as D,FileIntakeAlert as S}from"./chunk-P6LB3I3D.js";import{ColoredBadge as j}from"./chunk-RKFEJ5CX.js";import{Button_default as z}from"./chunk-NHH2MXFU.js";import{buttonClasses as F}from"./chunk-UQYNPYF4.js";import{Icon as T}from"./chunk-KKSVRIMP.js";import{Tooltip as O}from"./chunk-BCDG4N6L.js";import{usePlotWidth as P}from"./chunk-MAFUXCPZ.js";import{useShellStrings as L}from"./chunk-X2PZMXDP.js";import{useRef as M,useMemo as A,useCallback as E,useState as U,useEffect as R}from"react";import{jsxs as K,Fragment as B,jsx as X}from"react/jsx-runtime";var V="application/x-efficient-media-files",H="application/x-efficient-media-folder",Z="application/x-efficient-media-file";function J(e){if(!e||!Array.from(e.types).includes(Z))return null;try{const n=JSON.parse(e.getData(Z));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var W={type:"all",use:"any",sort:"newest"},G={lock:/* @__PURE__ */X(T,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */X(T,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */X(T,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */X(T,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */X(T,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */X(T,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */X(T,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */X(T,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */X(T,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */X(T,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */X(T,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */X(T,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */X(T,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */X(T,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */X(T,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */X(T,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},$={link:/* @__PURE__ */X(T,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */X(T,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */X(T,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */X(T,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function Y({value:e,label:n,onDone:l}){const[a,i]=U(e),r=M(!1),t=e=>{r.current||(r.current=!0,l(e))};/* @__PURE__ */
2
+ return X(N,{size:"sm",autoFocus:!0,"aria-label":n,value:a,onChange:e=>i(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:n=>{n.stopPropagation(),"Enter"===n.key?(n.preventDefault(),t(a.trim()||e)):"Escape"===n.key&&(n.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function q(T){const{mode:J="manage",layout:q="auto",location:Q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=W,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:pe,usedIn:he,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:Ce,onMove:xe,onTrash:Ne,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Fe,onOpenInDesign:Te,onChoose:Oe,onCancel:Pe,pickNote:Le,onDragOut:Me,className:Ae=""}=T,Ee=L().mediaLibrary,Ue=L().media,Re="pick"===J,Ke=!Re,Be=M(null),Xe=P(Be,"phone"===q?343:1200),Ve="phone"===q||"auto"===q&&Xe<640,He=A(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),Ze=A(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Je=A(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Ze.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Ze]),We=E(e=>{const n=[];for(let l=e?Ze.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Ze.get(l.parentId):void 0);return n},[Ze,ee.length]),Ge=E((e,n)=>We(e).some(e=>e.id===n),[We]),[$e,Ye]=U(()=>/* @__PURE__ */new Set(["@files"])),qe=e=>Ye(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),Qe=E(e=>{Ye(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=Q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;R(()=>{if("files"===Q.place)Qe(["@files",...We(Q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===Q.place){const e=Q.nodeId?He.get(Q.nodeId)?.path??[]:[];Qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===Q.place,ln="trash"===Q.place,an="files"===Q.place,rn=an?Q.folderId:null,tn=nn&&Q.nodeId?He.get(Q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ee.readOnly} ${Ee.editedAtHq(e.sharedFrom)}`:Ee.readOnly,dn=A(()=>ie.map(e=>e.id),[ie]),sn=A(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=k(dn),un=A(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,pn=M(!0);R(()=>{pn.current?pn.current=!1:cn.clear()},[_e]);const hn=me?.join("\0");R(()=>{me&&cn.setSelection(me)},[hn]);const fn=M(hn??""),gn=un.join("\0");R(()=>{fn.current!==gn&&(fn.current=gn,pe?.(un))},[gn]);const vn=(e,n={})=>{Re?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=U(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Ze.get(n.id)?.name:sn.get(n.id)?.name)&&Ce?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);Qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},Cn=E(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ee.alreadyHere:void 0;const l=Ze.get(e.id);return n===e.id||n&&Ge(n,e.id)?Ee.notIntoItself:(l?.parentId??null)===n?Ee.folderAlreadyHere:void 0};n.push({key:s,label:Ee.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Je.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Je,Ze,an,Ge,rn,Ee]),xn=E(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Nn,In]=U(null),Dn={words:Ee,media:Ue,denied:fe,moveTargets:Cn,kindOf:xn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Ke?e=>{wn(e)}:void 0,rename:Ce&&Ke?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:xe&&Ke?xe:void 0,trash:Ne&&Ke?Ne:void 0,deleteFolder:Ie&&Ke?Ie:void 0,folderNotEmpty:e=>!!Ze.get(e)?.notEmpty,replace:ze&&Ke?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&m(Ee.urlLabel,n)},openInDesign:Te,restore:De,deleteForever:Se},Sn=e=>c(e,Dn),jn=w(),zn=(e,n)=>{Re||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Fn,Tn]=U(null),[On,Pn]=U(null),[Ln,Mn]=U(null);R(()=>{if(!On&&!Fn)return;const e=()=>{Pn(null),Tn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,Fn]);const An=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),En=(e,n)=>!(!xe||fe.move||Re)&&(!!An(e,V)||!(!An(e,H)||!Ln)&&(n!==Ln&&!(n&&Ge(n,Ln)))),Un=(e,n)=>({onDragEnter:l=>{En(l,n)&&(l.preventDefault(),Tn(e))},onDragOver:l=>{En(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Fn!==e&&Tn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Tn(n=>n===e?null:n)},onDrop:e=>{if(En(e,n))if(e.preventDefault(),Tn(null),An(e,V)){let l;try{l=JSON.parse(e.dataTransfer.getData(V))}catch{l=null}Array.isArray(l)&&l.length&&xe({kind:"files",ids:l.map(String)},n)}else Ln&&(xe({kind:"folder",id:Ln},n),Mn(null))}}),Rn=e=>{const n=e=>An(e,V)||An(e,H)||An(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&On!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Kn=(e,n,l)=>/* @__PURE__ */X(O,{side:"right",content:On===e?Ee.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */X("span",{children:n})}),Bn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Xn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=$e.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
3
+ return K("div",{role:"none",className:"contents",children:[
4
+ /* @__PURE__ */X(n,{label:Kn(r,e.name,t),level:a,icon:d&&o?G.folderOpen:G.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:nn&&Q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>qe(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Rn(r),...Ke?Bn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */X(l,{children:Xn(d,a+1,t)})]},e.id)}),Vn=(e,a)=>(Je.get(e)??[]).map(e=>{const i=Je.get(e.id),r=$e.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
5
+ return K("div",{role:"none",className:"contents",children:[
6
+ /* @__PURE__ */X(n,{label:e.name,level:a,icon:i&&r?G.folderOpen:G.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:t||an&&Q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>qe(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Fn===e.id?"into":void 0,dragging:Ln===e.id,draggable:Ke&&!!xe&&!fe.move,rename:t?/* @__PURE__ */X(Y,{value:e.name,label:Ee.folderName,onDone:bn}):void 0,actions:Ke&&o.length?/* @__PURE__ */X(p,{align:"end","aria-label":Ee.folderActions,trigger:G.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Un(e.id,e.id),...Ke?Bn({kind:"folder",id:e.id}):{},...Ke&&xe&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(H,e.id),Mn(e.id)},onDragEnd:()=>{Mn(null),Tn(null)}}:{}}}),i&&r&&/* @__PURE__ */X(l,{children:Vn(e.id,a+1)})]},e.id)}),Hn=$e.has("@files"),Zn=$e.has("@products"),Jn=/* @__PURE__ */K(e,{"aria-label":Ee.folders,children:[ne&&/* @__PURE__ */K(B,{children:[
7
+ /* @__PURE__ */X(n,{label:Kn("@products",Ee.products),level:1,icon:G.lock,badge:{label:Ee.readOnlyBadge,tone:"neutral"},expanded:ne.length?Zn:void 0,onToggle:()=>qe("@products"),selected:nn&&null==Q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Rn("@products")}}),Zn&&ne.length>0&&/* @__PURE__ */X(l,{children:Xn(ne,2)})]}),
8
+ /* @__PURE__ */X(n,{label:Ee.allFiles,level:1,icon:Hn?G.folderOpen:G.folder,count:le,countLabel:null!=le?Ee.fileCount(le):void 0,expanded:Je.get(null)?.length?Hn:void 0,onToggle:()=>qe("@files"),selected:an&&null==Q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Fn?"into":void 0,rowProps:{"data-media-row":"@files",...Un("@files",null)}}),Hn&&(Je.get(null)?.length??0)>0&&/* @__PURE__ */X(l,{children:Vn(null,2)}),Ke&&/* @__PURE__ */X(n,{label:Ee.trash,level:1,icon:G.trash,count:ae,countLabel:null!=ae?Ee.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Wn=(()=>{if(ln)return[{label:Ee.trash}];if(nn){const e=Q.nodeId?He.get(Q.nodeId)?.path??[]:[];return[{label:Ee.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=We(rn);return[{label:Ee.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Gn=nn?Ee.readOnly:fe.upload,$n=!!be&&!ln&&!Gn,Yn=D({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!$n,onAccept:e=>be?.(e,rn)}),qn=nn?Ee.noProductFolder:fe.newFolder,Qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */K("div",{className:"flex flex-wrap items-center gap-2",children:[Ke&&we&&!ln&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.folderPlus,onClick:()=>{wn(rn)},...Qn(qn),children:Ee.newFolder}),be&&!ln&&/* @__PURE__ */X(z,{variant:"primary",size:"sm",leftIcon:G.upload,onClick:()=>Yn.open(),...Qn(Gn),children:Ee.upload}),Ke&&ln&&je&&ie.length>0&&/* @__PURE__ */X(z,{variant:"danger",size:"sm",onClick:je,...Qn(fe.deleteForever),children:Ee.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */X("div",{style:{width:Ve?void 0:i,flex:Ve?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */X(g,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */K("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */X("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */X(N,{size:"sm",type:"search",leftIcon:G.search,placeholder:nn?Ee.searchProducts:Ee.search,"aria-label":nn?Ee.searchProducts:Ee.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Ee.mediaType,oe.type,[{value:"all",label:Ee.allTypes},{value:"image",label:Ee.images},{value:"video",label:Ee.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Ee.use,oe.use,[{value:"any",label:Ee.anyUse},{value:"email",label:Ee.emailOnly},{value:"website",label:Ee.websiteOnly},{value:"unused",label:Ee.notUsed}],nl("use"),130),de&&Ke&&el(Ee.sort,oe.sort,[{value:"newest",label:Ee.newest},{value:"name",label:Ee.byName},{value:"size",label:Ee.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */X(v,{size:"sm",label:Ee.view,value:ce,onChange:ue,options:[{value:"grid",label:Ee.grid,icon:G.grid},{value:"list",label:Ee.list,icon:G.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ee.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:$.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ee.used(e.usedCount),count:e.usedCount,icon:$.link,tone:"active"}),e.email&&n.push({key:"e",label:Ee.email,icon:$.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ee.private,icon:$.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */X(j,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Ke&&an&&!!xe&&!fe.move,tl=!!Me&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[Z]:ol(e)}}:{}})),sl=Ve?Math.max(72,Math.floor((Xe-24-16-1)/3)):112,cl=M(null),ul=y({containerRef:cl,enabled:Ke&&!Ve&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Re){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},pl=ie.length?null:re?/* @__PURE__ */X(i,{variant:"dashed",title:Ee.noMatches}):nn?/* @__PURE__ */X(i,{variant:"dashed",title:Ee.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */X(i,{variant:"dashed",title:Ee.trashEmpty}):!$n||Re?/* @__PURE__ */X(i,{variant:"dashed",title:Ee.emptyFolder}):null,hl="list"===ce&&ie.length>0,fl=pl??(hl?/* @__PURE__ */X("ul",{role:"listbox","aria-multiselectable":Ke||void 0,"aria-label":Ee.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */K("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(Z,ol(e)),Me("start")}:void 0,onDragEnd:ol(e)?e=>Me("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
9
+ /* @__PURE__ */X("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
10
+ /* @__PURE__ */X("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
11
+ /* @__PURE__ */X("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */X("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */X(h,{items:dl,readOnly:!$n||Re,onFiles:$n&&!Re?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?V:tl?Z:void 0,onDragOutChange:tl?e=>Me(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Ke?zn:void 0,menuOnMedia:Ke})),gl=u({count:un.length,kind:xn(un),targets:Cn({kind:"files",ids:un}),onPick:e=>xe?.({kind:"files",ids:un},e.key===s?null:e.key)}),vl=F({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */X(p,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */K(B,{children:[G.folder,Ee.moveTo]}),items:gl,disabled:!!fe.move}),yl=Ke&&un.length>1&&!nn?/* @__PURE__ */K("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
12
+ /* @__PURE__ */X(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ee.selected(un.length)}),/* @__PURE__ */K(B,ln?{children:[De&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.undo,onClick:()=>De(un),...Qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */X(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...Qn(fe.deleteForever),children:Ee.deleteForever})]}:{children:[xe&&kl,Ce&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.edit,disabled:!0,children:Ee.rename}),Ne&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.trash,onClick:()=>Ne({kind:"files",ids:un}),...Qn(fe.trash),children:Ee.moveFilesToTrash(un.length)})]}),
13
+ /* @__PURE__ */X(z,{variant:"ghost",size:"sm",onClick:cn.clear,children:Ee.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Ee.name,a?/* @__PURE__ */X(Y,{value:e.name,label:Ee.fileName,onDone:bn}):e.name),l("type",Ee.type,e.typeLabel),l("size",Ee.size,e.sizeLabel),l("resolution",Ee.resolution,e.resolution),nn?(l("design",Ee.design,e.design),l("finish",Ee.finish,e.finish),l("angle",Ee.angleLug,e.angleLug),l("owner",Ee.owner,e.owner)):(l("added",Ee.addedBy,e.addedBy),l("folder",Ee.folder,e.folderPath)),l("used",Ee.usedIn,null!=e.usedCount?Ee.places(e.usedCount):void 0);const i=c({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
14
+ return K("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
15
+ /* @__PURE__ */X("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */X(x,{tone:"neutral",title:Ee.readOnlyBadge,children:on(tn)}),
16
+ /* @__PURE__ */X(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */K("div",{className:"flex gap-2",children:[
17
+ /* @__PURE__ */X("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */X(N,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ee.fileUrl,onFocus:e=>e.currentTarget.select()})}),
18
+ /* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.copy,onClick:()=>Dn.copyUrl(e.id),children:Ee.copyUrl})]}),an&&Ke&&/* @__PURE__ */K("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.swap,onClick:()=>ze(e.id),...Qn(fe.replace),children:Ee.replace}),Fe&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.crop,onClick:()=>Fe(e.id),children:Ee.cropEdit}),xe&&"submenu"===i?.type&&/* @__PURE__ */X(p,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */K(B,{children:[G.folder,Ee.moveTo]}),items:i.items,disabled:!!fe.move}),Ce&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.edit,onClick:()=>yn({kind:"file",id:e.id}),...Qn(fe.rename),children:Ee.rename}),Ne&&/* @__PURE__ */X(I,{"aria-label":Ee.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:G.trash})]}),ln&&Ke&&/* @__PURE__ */K("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */X(z,{variant:"primary",size:"sm",leftIcon:G.undo,onClick:()=>De([e.id]),...Qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */X(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...Qn(fe.deleteForever),children:Ee.deleteForever})]}),nn&&Te&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",leftIcon:G.external,onClick:()=>Te({kind:"render",id:e.id}),children:Ee.openInDesign}),he&&/* @__PURE__ */X(f,{items:he})]})},wl=mn?mn.private?Ee.privateNoPick:mn.pickDisabledReason:void 0,Cl=Re?/* @__PURE__ */K("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
19
+ /* @__PURE__ */X("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Ee.oneChosen(mn.name):Ee.noneChosen}),
20
+ /* @__PURE__ */K("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */X(z,{variant:"secondary",size:"sm",onClick:Pe,children:Ee.cancel}),
21
+ /* @__PURE__ */X(z,{variant:"primary",size:"sm",disabled:!mn,...Qn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Ee.chooseImage})]})]}):null,xl=Ke&&!!mn,Nl=/* @__PURE__ */K("div",{className:"flex min-w-0 flex-col gap-3",children:[Le&&/* @__PURE__ */X(x,{tone:"neutral",children:Le}),
22
+ /* @__PURE__ */K("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
23
+ /* @__PURE__ */X(d,{items:Wn}),_n]}),ll,yl,
24
+ /* @__PURE__ */K("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Ke&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
25
+ /* @__PURE__ */X(a,{rect:ul.rect})]}),$n&&/* @__PURE__ */X("input",{...Yn.inputProps}),
26
+ /* @__PURE__ */X(S,{rejections:Yn.rejections})]});/* @__PURE__ */
27
+ return K("div",{ref:Be,"data-media-library":"","data-layout":Ve?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Ae}`.trim(),children:[/* @__PURE__ */K("div",Ve?{className:"flex flex-col gap-3 p-3",children:[Jn,Nl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
28
+ /* @__PURE__ */X("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Jn}),
29
+ /* @__PURE__ */X("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Nl}),xl&&/* @__PURE__ */X("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),Cl,Ve&&/* @__PURE__ */X(o,{open:xl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */X(C,{...jn.props,items:Sn(jn.state.data)}),null!=Nn&&ie.length>0&&/* @__PURE__ */X(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Nn,ie.length-1),onClose:()=>In(null)})]})}export{V as MEDIA_FILES_DRAG_TYPE,Z as MEDIA_FILE_DRAG_TYPE,H as MEDIA_FOLDER_DRAG_TYPE,q as MediaLibrary,J as readMediaFileDrag};
@@ -1,4 +1,4 @@
1
- import{useShellLanguage as e}from"./chunk-MVQMAIZM.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-7YU27U3Y.js";import{Icon as t}from"./chunk-FSPFV4MI.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{jsxs as s,jsx as i}from"react/jsx-runtime";function r(e){const a=Math.max(0,...e.map(e=>[...e].reduce((e,a)=>e+((a.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(a+3.5))/10}function m({size:a="sm",className:m=""}){const{language:o,languages:c,setLanguage:g}=e(),u=l().language;return c.length<2?null:/* @__PURE__ */s("span",{className:`inline-flex items-center gap-2 text-ink-faint ${m}`.trim(),children:[
1
+ import{useShellLanguage as e}from"./chunk-MVQMAIZM.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-ZLHPCPXS.js";import{Icon as t}from"./chunk-KKSVRIMP.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{jsxs as s,jsx as i}from"react/jsx-runtime";function r(e){const a=Math.max(0,...e.map(e=>[...e].reduce((e,a)=>e+((a.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(a+3.5))/10}function m({size:a="sm",className:m=""}){const{language:o,languages:c,setLanguage:g}=e(),u=l().language;return c.length<2?null:/* @__PURE__ */s("span",{className:`inline-flex items-center gap-2 text-ink-faint ${m}`.trim(),children:[
2
2
  /* @__PURE__ */i(t,{name:"globe","aria-hidden":!0,className:"h-4 w-4 shrink-0"}),
3
3
  /* @__PURE__ */i("span",{className:"block",style:{width:`${r(c.map(e=>e.name))}em`},children:/* @__PURE__ */i(n,{size:a,touchSize:a,"aria-label":u.title,value:o,onChange:e=>{g(e)},options:c.map(({tag:e,name:a})=>({value:e,label:a,lang:e}))})})]})}function o({description:n,className:t=""}){const{language:r,languages:m,setLanguage:o}=e(),c=l().language;return m.length<2?null:/* @__PURE__ */s("div",{className:`space-y-4 ${t}`.trim(),children:[
4
4
  /* @__PURE__ */s("div",{children:[
@@ -1,3 +1,3 @@
1
- import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{IconButton_default as t}from"./chunk-RUTUVS4H.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as i}from"./chunk-TWVUQUUD.js";import{useShellStrings as o}from"./chunk-X2PZMXDP.js";import{forwardRef as a,useId as l,useState as u,useRef as c,useCallback as s,useEffect as d}from"react";import{jsx as p,jsxs as m,Fragment as f}from"react/jsx-runtime";function b(e){const t=String(e),r=/e-(\d+)$/.exec(t);return r?Number(r[1]):t.split(".")[1]?.length??0}var v=(e,t)=>null==e?"":null!=t?e.toFixed(t):String(e);function h({dir:e,compact:r,label:i,disabled:o,onStep:a}){const l=c(a);l.current=a;const u=c({}),m=s(()=>{const e=u.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),u.current={}},[]);d(()=>m,[m]),d(()=>{o&&m()},[o,m]);const f=/* @__PURE__ */p(n,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:r?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:r?2.6:2}),b={tabIndex:-1,"aria-label":i,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),m();const t=e.shiftKey;l.current(t);const r=e.currentTarget.ownerDocument.defaultView??window;r.addEventListener("pointerup",m),u.current={off:()=>r.removeEventListener("pointerup",m),wait:setTimeout(()=>{u.current.every=setInterval(()=>l.current(t),60)},400)}},onPointerLeave:m,onPointerCancel:m,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return r?/* @__PURE__ */p("button",{type:"button",...b,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */p(t,{size:"sm",...b,children:f})}var y=a(function({value:t,onChange:n,min:a,max:y,precision:g,step:x,shiftStep:w,disabled:k,readOnly:N,invalid:E,placeholder:j,size:D,prefix:F,suffix:P,id:S,name:M,className:U="",onBlur:C,onFocus:W,steppers:B,stepFrom:K,snap:T=!1,allowEmpty:L=!0,appearance:O="box",display:V,reportWhileTyping:$=!0,onRevert:I,"aria-label":Y,"aria-labelledby":z,"aria-describedby":A,auto:X,...R},Z){const H="bare"===O,Q=e(),q=X??Q,G=l(),J="string"==typeof P&&""!==P.trim()?P.trim():void 0,_=e=>function(e,t){let r=e.trim();if(t&&r.endsWith(t)&&(r=r.slice(0,-t.length).trim()),r=r.replace(",","."),""===r||"-"===r||"."===r||"-."===r)return null;const n=Number(r);return Number.isFinite(n)?n:null}(e,J),ee=Object.fromEntries(Object.entries(R).filter(([e])=>e.startsWith("data-"))),te=o(),[re,ne]=u(()=>v(t,g)),ie=c(re);ie.current=re;const oe=c(null),ae=s(e=>{oe.current=e,"function"==typeof Z?Z(e):Z&&(Z.current=e)},[Z]),le=c(t),ue=c(t);ue.current=t;const ce=Boolean(k||N),se=B??!1,de="compact"===se;d(()=>{_(ie.current)!==t&&ne(v(t,g))},[t,g]);const pe=e=>{if(ce)return;let t=(_(ie.current)??K??(j?_(j):null)??0)+e;null!=a&&t<a&&(t=a),null!=y&&t>y&&(t=y);const r=g??String(x??1).split(".")[1]?.length??0;t=Number(t.toFixed(r));const i=v(t,g);ie.current=i,ne(i),n(t),ge()},me=c(pe);me.current=pe;const fe=c({unit:x??1,big:w??10*(x??1),locked:ce});fe.current={unit:x??1,big:w??10*(x??1),locked:ce},d(()=>{const e=oe.current;if(!e)return;const t=t=>{const{unit:r,big:n,locked:i}=fe.current;if(i||e.ownerDocument.activeElement!==e)return;const o=t.deltaY||t.deltaX;o&&(t.preventDefault(),me.current((o<0?1:-1)*(t.shiftKey?n:r)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);const[be,ve]=u(!1),[he,ye]=u(0),ge=()=>{H&&ye(e=>e+1)};d(()=>{H&&be&&document.activeElement===oe.current&&oe.current?.select()},[H,be,he]);const xe=c(!1);d(()=>{if(be&&!ce)return i(e=>{if("Escape"!==e.key||document.activeElement!==oe.current)return!1;const t=le.current;if(_(ie.current)===t)return!1;const r=v(t,g);return ie.current=r,ne(r),ue.current!==t&&(I??n)(t),ge(),!0})},[be,ce,g,n,I]);const we=()=>{const e=_(ie.current);if(null==e){if(!L){const e=v(ue.current,g);return ie.current=e,ne(e),ue.current}return ie.current="",ne(""),null!==ue.current&&n(null),null}let t=e;const r=g??(T?Math.max(b(x??1),b(a??0)):void 0);T&&(t=function(e,t,r){const n=(e-r)/t;return r+Math.round(n+1e-9*Math.sign(e))*t}(t,x??1,a??0)),null!=a&&t<a&&(t=a),null!=y&&t>y&&(t=y),null!=r&&(t=Number(t.toFixed(r)));const i=v(t,g);return ie.current=i,ne(i),t===e&&t===ue.current||n(t),t},ke=/* @__PURE__ */p("input",{ref:ae,id:S,"data-number-input":"",name:M,type:"text",inputMode:0===g?"numeric":"decimal",value:!be&&V?V(t):re,disabled:k,readOnly:N,placeholder:j,step:x,role:"spinbutton","aria-valuenow":t??void 0,"aria-valuemin":a,"aria-valuemax":y,"aria-valuetext":null==t?j||void 0:`${v(t,g)}${H&&J?J:""}`,"aria-describedby":[A,q?G:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":H?"bare":void 0,...ee,autoComplete:H?"off":void 0,spellCheck:!H&&void 0,"aria-invalid":E||void 0,"aria-label":Y,"aria-labelledby":z,onChange:e=>(e=>{if(N)return;const t=J&&e.trimEnd().endsWith(J)?e.trimEnd().slice(0,-J.length).trimEnd():e;if(""!==t&&!/^-?\d*[.,]?\d*$/.test(t))return;if(ne(e),!$)return;const r=_(e);(null!==r||L)&&n(r)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!ce)return le.current=we(),void ge();const t=x??1,r=w??10*t,n="ArrowUp"===e.key?e.shiftKey?r:t:"ArrowDown"===e.key?-(e.shiftKey?r:t):"PageUp"===e.key?10*t:"PageDown"===e.key?10*-t:null;null===n||ce||(e.preventDefault(),pe(n))},onFocus:()=>{le.current=ue.current,ve(!0),xe.current=!0,W?.()},onMouseUp:H?e=>{xe.current&&(xe.current=!1,e.preventDefault())}:void 0,onBlur:()=>{ve(!1),xe.current=!1,we(),C?.()},className:H?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",be?"bg-surface":"bg-transparent",ce?"cursor-default":"cursor-text",U].filter(Boolean).join(" "):r({invalid:E,size:D,readOnly:N,auto:q,className:[F?"pl-6":"",de?P?"pr-10":"pr-6":se?P?"pr-24":"pr-16":P?"pr-10":"","text-left tabular-nums",U].filter(Boolean).join(" ")})}),Ne=q?/* @__PURE__ */p("span",{id:G,hidden:!0,children:te.settingView.auto}):null;if(H||!F&&!P&&!se)return Ne?/* @__PURE__ */m(f,{children:[ke,Ne]}):ke;const Ee=_(re);/* @__PURE__ */
2
- return m("div",{className:"relative","data-number-box":"",children:[F&&/* @__PURE__ */p("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-sm text-ink-faint",children:F}),ke,Ne,P&&/* @__PURE__ */p("span",{className:`pointer-events-none absolute ${de?"right-6":se?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:P}),se&&(()=>{const e=/* @__PURE__ */p(h,{dir:-1,compact:de,label:te.number.decrease,disabled:ce||null!=a&&null!=Ee&&Ee<=a,onStep:e=>me.current(-(e?w??10*(x??1):x??1))}),t=/* @__PURE__ */p(h,{dir:1,compact:de,label:te.number.increase,disabled:ce||null!=y&&null!=Ee&&Ee>=y,onStep:e=>me.current(e?w??10*(x??1):x??1)});/* @__PURE__ */
1
+ import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{registerModalEscapeInterceptor as i}from"./chunk-TWVUQUUD.js";import{useShellStrings as o}from"./chunk-X2PZMXDP.js";import{forwardRef as a,useId as l,useState as u,useRef as c,useCallback as s,useEffect as d}from"react";import{jsx as p,jsxs as m,Fragment as f}from"react/jsx-runtime";function b(e){const t=String(e),r=/e-(\d+)$/.exec(t);return r?Number(r[1]):t.split(".")[1]?.length??0}var v=(e,t)=>null==e?"":null!=t?e.toFixed(t):String(e);function h({dir:e,compact:t,label:i,disabled:o,onStep:a}){const l=c(a);l.current=a;const u=c({}),m=s(()=>{const e=u.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),u.current={}},[]);d(()=>m,[m]),d(()=>{o&&m()},[o,m]);const f=/* @__PURE__ */p(n,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),b={tabIndex:-1,"aria-label":i,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),m();const t=e.shiftKey;l.current(t);const r=e.currentTarget.ownerDocument.defaultView??window;r.addEventListener("pointerup",m),u.current={off:()=>r.removeEventListener("pointerup",m),wait:setTimeout(()=>{u.current.every=setInterval(()=>l.current(t),60)},400)}},onPointerLeave:m,onPointerCancel:m,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */p("button",{type:"button",...b,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */p(r,{size:"sm",...b,children:f})}var y=a(function({value:r,onChange:n,min:a,max:y,precision:g,step:x,shiftStep:w,disabled:k,readOnly:N,invalid:E,placeholder:j,size:D,prefix:P,suffix:S,id:K,name:M,className:U="",onBlur:C,onFocus:F,steppers:W,stepFrom:B,snap:T=!1,allowEmpty:L=!0,appearance:O="box",display:V,reportWhileTyping:$=!0,onRevert:I,"aria-label":Y,"aria-labelledby":z,"aria-describedby":A,auto:R,...X},Z){const H="bare"===O,Q=e(),q=R??Q,G=l(),J="string"==typeof S&&""!==S.trim()?S.trim():void 0,_=e=>function(e,t){let r=e.trim();if(t&&r.endsWith(t)&&(r=r.slice(0,-t.length).trim()),r=r.replace(",","."),""===r||"-"===r||"."===r||"-."===r)return null;const n=Number(r);return Number.isFinite(n)?n:null}(e,J),ee=Object.fromEntries(Object.entries(X).filter(([e])=>e.startsWith("data-"))),te=o(),[re,ne]=u(()=>v(r,g)),ie=c(re);ie.current=re;const oe=c(null),ae=s(e=>{oe.current=e,"function"==typeof Z?Z(e):Z&&(Z.current=e)},[Z]),le=c(r),ue=c(r);ue.current=r;const ce=Boolean(k||N),se=W??!1,de="compact"===se;d(()=>{_(ie.current)!==r&&ne(v(r,g))},[r,g]);const pe=e=>{if(ce)return;let t=(_(ie.current)??B??(j?_(j):null)??0)+e;null!=a&&t<a&&(t=a),null!=y&&t>y&&(t=y);const r=g??String(x??1).split(".")[1]?.length??0;t=Number(t.toFixed(r));const i=v(t,g);ie.current=i,ne(i),n(t),ge()},me=c(pe);me.current=pe;const fe=c({unit:x??1,big:w??10*(x??1),locked:ce});fe.current={unit:x??1,big:w??10*(x??1),locked:ce},d(()=>{const e=oe.current;if(!e)return;const t=t=>{const{unit:r,big:n,locked:i}=fe.current;if(i||e.ownerDocument.activeElement!==e)return;const o=t.deltaY||t.deltaX;o&&(t.preventDefault(),me.current((o<0?1:-1)*(t.shiftKey?n:r)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);const[be,ve]=u(!1),[he,ye]=u(0),ge=()=>{H&&ye(e=>e+1)};d(()=>{H&&be&&document.activeElement===oe.current&&oe.current?.select()},[H,be,he]);const xe=c(!1);d(()=>{if(be&&!ce)return i(e=>{if("Escape"!==e.key||document.activeElement!==oe.current)return!1;const t=le.current;if(_(ie.current)===t)return!1;const r=v(t,g);return ie.current=r,ne(r),ue.current!==t&&(I??n)(t),ge(),!0})},[be,ce,g,n,I]);const we=()=>{const e=_(ie.current);if(null==e){if(!L){const e=v(ue.current,g);return ie.current=e,ne(e),ue.current}return ie.current="",ne(""),null!==ue.current&&n(null),null}let t=e;const r=g??(T?Math.max(b(x??1),b(a??0)):void 0);T&&(t=function(e,t,r){const n=(e-r)/t;return r+Math.round(n+1e-9*Math.sign(e))*t}(t,x??1,a??0)),null!=a&&t<a&&(t=a),null!=y&&t>y&&(t=y),null!=r&&(t=Number(t.toFixed(r)));const i=v(t,g);return ie.current=i,ne(i),t===e&&t===ue.current||n(t),t},ke=/* @__PURE__ */p("input",{ref:ae,id:K,"data-number-input":"",name:M,type:"text",inputMode:0===g?"numeric":"decimal",value:!be&&V?V(r):re,disabled:k,readOnly:N,placeholder:j,step:x,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":a,"aria-valuemax":y,"aria-valuetext":null==r?j||void 0:`${v(r,g)}${H&&J?J:""}`,"aria-describedby":[A,q?G:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":H?"bare":void 0,...ee,autoComplete:H?"off":void 0,spellCheck:!H&&void 0,"aria-invalid":E||void 0,"aria-label":Y,"aria-labelledby":z,onChange:e=>(e=>{if(N)return;const t=J&&e.trimEnd().endsWith(J)?e.trimEnd().slice(0,-J.length).trimEnd():e;if(""!==t&&!/^-?\d*[.,]?\d*$/.test(t))return;if(ne(e),!$)return;const r=_(e);(null!==r||L)&&n(r)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!ce)return le.current=we(),void ge();const t=x??1,r=w??10*t,n="ArrowUp"===e.key?e.shiftKey?r:t:"ArrowDown"===e.key?-(e.shiftKey?r:t):"PageUp"===e.key?10*t:"PageDown"===e.key?10*-t:null;null===n||ce||(e.preventDefault(),pe(n))},onFocus:()=>{le.current=ue.current,ve(!0),xe.current=!0,F?.()},onMouseUp:H?e=>{xe.current&&(xe.current=!1,e.preventDefault())}:void 0,onBlur:()=>{ve(!1),xe.current=!1,we(),C?.()},className:H?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",be?"bg-surface":"bg-transparent",ce?"cursor-default":"cursor-text",U].filter(Boolean).join(" "):t({invalid:E,size:D,readOnly:N,auto:q,className:[P?"pl-6":"",de?S?"pr-10":"pr-6":se?S?"pr-24":"pr-16":S?"pr-10":"","text-left tabular-nums",U].filter(Boolean).join(" ")})}),Ne=q?/* @__PURE__ */p("span",{id:G,hidden:!0,children:te.settingView.auto}):null;if(H||!P&&!S&&!se)return Ne?/* @__PURE__ */m(f,{children:[ke,Ne]}):ke;const Ee=_(re);/* @__PURE__ */
2
+ return m("div",{className:"relative","data-number-box":"",children:[P&&/* @__PURE__ */p("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-sm text-ink-faint",children:P}),ke,Ne,S&&/* @__PURE__ */p("span",{className:`pointer-events-none absolute ${de?"right-6":se?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:S}),se&&(()=>{const e=/* @__PURE__ */p(h,{dir:-1,compact:de,label:te.number.decrease,disabled:ce||null!=a&&null!=Ee&&Ee<=a,onStep:e=>me.current(-(e?w??10*(x??1):x??1))}),t=/* @__PURE__ */p(h,{dir:1,compact:de,label:te.number.increase,disabled:ce||null!=y&&null!=Ee&&Ee>=y,onStep:e=>me.current(e?w??10*(x??1):x??1)});/* @__PURE__ */
3
3
  return m("span",de?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[t,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,t]})})()]})});export{y as InputNumber_default};