efficient-shell 9.9.0 → 9.9.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.
- package/dist/{Browser-ZPOVP4Z7.js → Browser-GQ2ZK4PR.js} +7 -7
- package/dist/{Documents-T7JYO223.js → Documents-5AC4WSNK.js} +1 -1
- package/dist/{Files-HBGW3JWI.js → Files-4SD6LLKX.js} +88 -88
- package/dist/{Notepad-GO2QT55C.js → Notepad-EUIQXFUA.js} +10 -10
- package/dist/{Preview-Z2CRCDHA.js → Preview-QK5HYJ6U.js} +10 -10
- package/dist/{Spreadsheet-GEE77GD3.js → Spreadsheet-HR6GBICY.js} +11 -11
- package/dist/ai/index.js +56 -53
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-AC373WIU.js → chunk-5SJ45P5E.js} +4 -4
- package/dist/{chunk-BZBMZDLD.js → chunk-6JU3WQOR.js} +1 -1
- package/dist/{chunk-LAEXWXJA.js → chunk-732XHVR4.js} +1 -1
- package/dist/{chunk-HEEY4TVP.js → chunk-G4EVQD5U.js} +4 -4
- package/dist/{chunk-NWCW22U6.js → chunk-H7MJM2WI.js} +1 -1
- package/dist/{chunk-BGRT775Y.js → chunk-IMA5SXEC.js} +2 -2
- package/dist/{chunk-XI4HKNFI.js → chunk-JKHWZ2ZY.js} +14 -14
- package/dist/{chunk-6FEL5D56.js → chunk-LB3A53D5.js} +6 -6
- package/dist/{chunk-BZG5E7GF.js → chunk-N45ACN3G.js} +5 -5
- package/dist/{chunk-P3Y5RFI4.js → chunk-P3DTYFMC.js} +1 -1
- package/dist/{chunk-U4OGRIP6.js → chunk-RDKBMX6U.js} +1 -1
- package/dist/{chunk-WFHYU66E.js → chunk-SC63O7AL.js} +1 -1
- package/dist/chunk-TNTQL6SX.js +1 -0
- package/dist/{chunk-QXWY3CJ2.js → chunk-TTHWXGT7.js} +6 -6
- package/dist/{chunk-DLNYXXNE.js → chunk-UE4PVCA5.js} +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +67 -67
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-L4TN4EWK.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BoxPlotChart as default}from"../chunk-
|
|
1
|
+
export{BoxPlotChart as default}from"../chunk-H7MJM2WI.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-5SJ45P5E.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CandlestickChart as default}from"../chunk-
|
|
1
|
+
export{CandlestickChart as default}from"../chunk-UE4PVCA5.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-5SJ45P5E.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{CartesianPlot as default}from"../chunk-
|
|
2
|
+
export{CartesianPlot as default}from"../chunk-5SJ45P5E.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ChordChart as default,foldChord}from"../chunk-OX2DOOOI.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-
|
|
2
|
+
export{ChordChart as default,foldChord}from"../chunk-OX2DOOOI.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-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ColumnChart as default}from"../chunk-
|
|
2
|
+
export{ColumnChart as default}from"../chunk-LB3A53D5.js";import"../chunk-465RRWBY.js";import"../chunk-XNWQ72WA.js";import"../chunk-CNYAHYE6.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-5SJ45P5E.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{HeatmapChart as default}from"../chunk-
|
|
2
|
+
export{HeatmapChart as default}from"../chunk-TTHWXGT7.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{HistogramChart as default}from"../chunk-
|
|
1
|
+
export{HistogramChart as default}from"../chunk-IMA5SXEC.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-5SJ45P5E.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-HUF34LSW.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-
|
|
2
|
+
export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-HUF34LSW.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-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{RangeChart as default}from"../chunk-
|
|
1
|
+
export{RangeChart as default}from"../chunk-N45ACN3G.js";import"../chunk-VFC6QUEN.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-5SJ45P5E.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SankeyChart as default}from"../chunk-D7IXMMZT.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-
|
|
2
|
+
export{SankeyChart as default}from"../chunk-D7IXMMZT.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-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-
|
|
2
|
+
export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-G4EVQD5U.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-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
package/dist/charts/SpecChart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SpecChart as default}from"../chunk-
|
|
1
|
+
export{SpecChart as default}from"../chunk-6JU3WQOR.js";import"../chunk-X2S2XDZI.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-JKHWZ2ZY.js";import"../chunk-CK2YOGUS.js";import"../chunk-2MLRK7IO.js";import"../chunk-VFC6QUEN.js";import"../chunk-LB3A53D5.js";import"../chunk-465RRWBY.js";import"../chunk-XNWQ72WA.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-5SJ45P5E.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-N7T63BVD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SunburstChart as default}from"../chunk-RC6UHOAV.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-
|
|
2
|
+
export{SunburstChart as default}from"../chunk-RC6UHOAV.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-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TimeSeriesChart as default}from"../chunk-
|
|
2
|
+
export{TimeSeriesChart as default}from"../chunk-JKHWZ2ZY.js";import"../chunk-CK2YOGUS.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-XNWQ72WA.js";import"../chunk-CNYAHYE6.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-N7T63BVD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TreemapChart as default}from"../chunk-WE7CYRZT.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-
|
|
2
|
+
export{TreemapChart as default}from"../chunk-WE7CYRZT.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-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{WaterfallChart as default}from"../chunk-
|
|
1
|
+
export{WaterfallChart as default}from"../chunk-P3DTYFMC.js";import"../chunk-TLRCTNUF.js";import"../chunk-DTJRIWFR.js";import"../chunk-5SJ45P5E.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-QWHQJNKL.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{tooltipBesideBand as t}from"./chunk-MG7A3R75.js";import{niceAxis as e,niceMax as i,linearScale as r,axisGutter as n,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{
|
|
1
|
+
import{tooltipBesideBand as t}from"./chunk-MG7A3R75.js";import{niceAxis as e,niceMax as i,linearScale as r,axisGutter as n,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{CHART_INK as h}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-QWHQJNKL.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useRef as d,useState as u,useId as f,useEffect as x}from"react";import{jsx as g,jsxs as p}from"react/jsx-runtime";function y({labels:y,values:v,height:b=220,width:k,bandPadding:M=.24,min:N,max:w,yTickCount:A=4,formatValue:$,yAxisLabel:j,xTickAnchor:R="center",children:E,overlay:L,tooltip:U,onSelect:z,ariaLabel:C,className:D,emptyLabel:P}){const W=s().charts,F=c(),I=$??(t=>m(t,F)),Q=P??W.noData,S=d(null),T=o(S),V=k??T,[B,H]=u(null),J=f();if(x(()=>{if(null!==B)return a(t=>"Escape"===t.key&&(H(null),!0))},[B]),0===y.length||!v.some(Number.isFinite))/* @__PURE__ */
|
|
2
2
|
return g("div",{className:D,ref:S,children:/* @__PURE__ */g("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:b},children:Q})});const K=v.filter(Number.isFinite),Z=K.every(Number.isInteger),G=void 0===N&&void 0===w?e(Math.min(0,...K),Math.max(0,...K),{intervals:A+1,integer:Z}):null,O=void 0!==N&&void 0===w?e(N,Math.max(N,...K),{intervals:A+1,integer:Z,zero:!1}):null,X=G?G.lo:N??Math.min(0,...K),q=G?G.hi:O?O.hi:w??i(Math.max(...K,0)),Y=G?G.ticks:O?[X,...O.ticks.filter(t=>t>X)]:r([X,q],{from:0,to:1}).ticks(A+1),_={top:12,right:16,bottom:26,left:n(Y.map(I),48)+(j?10:0)},tt=_.left,et=Math.max(tt+1,V-_.right),it=_.top,rt=b-_.bottom,nt=r([X,q],{from:rt,to:it}),lt=l(y.length,{from:tt,to:et},M),ot=(et-tt)/Math.max(1,y.length),at=ot>=48,ht=at?1:Math.max(1,Math.ceil(y.length/Math.max(1,Math.floor(V/84)))),st=Math.max(2,Math.floor((ot-6)/6.6)),ct=t=>at&&t.length>st?`${t.slice(0,st-1).trimEnd()}…`:t;/* @__PURE__ */
|
|
3
3
|
return p("div",{className:`relative ${D??""}`,ref:S,children:[
|
|
4
4
|
/* @__PURE__ */p("svg",{width:"100%",height:b,viewBox:`0 0 ${V} ${b}`,role:"img","aria-label":C,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>H(null),onBlur:()=>H(null),onKeyDown:t=>{if(z&&null!==B&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void z(B);if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const e="ArrowRight"===t.key?1:-1;H(t=>Math.min(y.length-1,Math.max(0,(t??0)+e)))},children:[
|
|
5
|
-
/* @__PURE__ */g("defs",{children:/* @__PURE__ */g("clipPath",{id:J,children:/* @__PURE__ */g("rect",{x:tt,y:it,width:et-tt,height:rt-it})})}),Y.map(t=>/* @__PURE__ */g("line",{x1:tt,y1:nt(t),x2:et,y2:nt(t),stroke:
|
|
6
|
-
/* @__PURE__ */g("line",{x1:tt,y1:nt(Math.max(X,0)),x2:et,y2:nt(Math.max(X,0)),stroke:
|
|
7
|
-
/* @__PURE__ */g("g",{clipPath:`url(#${J})`,children:E({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:V,height:b,clipId:J,active:B})}),L?.({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:V,height:b,clipId:J,active:B}),y.map((t,e)=>e%ht===0?/* @__PURE__ */g("text",{x:"start"===R?lt(e):lt.center(e),y:b-8,textAnchor:"middle",fontSize:11,fill:
|
|
5
|
+
/* @__PURE__ */g("defs",{children:/* @__PURE__ */g("clipPath",{id:J,children:/* @__PURE__ */g("rect",{x:tt,y:it,width:et-tt,height:rt-it})})}),Y.map(t=>/* @__PURE__ */g("line",{x1:tt,y1:nt(t),x2:et,y2:nt(t),stroke:h.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${t}`)),
|
|
6
|
+
/* @__PURE__ */g("line",{x1:tt,y1:nt(Math.max(X,0)),x2:et,y2:nt(Math.max(X,0)),stroke:h.axis,strokeWidth:1,shapeRendering:"crispEdges"}),Y.map(t=>/* @__PURE__ */g("text",{x:tt-8,y:nt(t)+4,textAnchor:"end",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:I(t)},`t${t}`)),j&&/* @__PURE__ */g("text",{x:14,y:(it+rt)/2,transform:`rotate(-90 14 ${(it+rt)/2})`,textAnchor:"middle",fontSize:11,fill:h.label,children:j}),
|
|
7
|
+
/* @__PURE__ */g("g",{clipPath:`url(#${J})`,children:E({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:V,height:b,clipId:J,active:B})}),L?.({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:V,height:b,clipId:J,active:B}),y.map((t,e)=>e%ht===0?/* @__PURE__ */g("text",{x:"start"===R?lt(e):lt.center(e),y:b-8,textAnchor:"middle",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:ct(t)},`x${e}`):null),y.map((t,e)=>/* @__PURE__ */g("rect",{x:lt.center(e)-(et-tt)/y.length/2,y:it,width:(et-tt)/y.length,height:rt-it,fill:"transparent",onMouseEnter:()=>H(e),onClick:z?()=>z(e):void 0,style:z?{cursor:"pointer"}:void 0},`h${e}`))]}),U&&null!==B&&
|
|
8
8
|
/* @__PURE__ */g("div",{className:"pointer-events-none absolute top-2 z-10",style:t(lt.center(B),lt.bandwidth,V),children:U(B)})]})}export{y as CartesianPlot};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-
|
|
1
|
+
import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-JKHWZ2ZY.js";import{ChartFrame as a}from"./chunk-2MLRK7IO.js";import{ColumnChart as l}from"./chunk-LB3A53D5.js";import{TH_ONE_LINE as s}from"./chunk-OZAAIE4E.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
2
|
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
3
|
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
4
|
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-DZTAGMNY.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-DZTAGMNY.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-TNTQL6SX.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-QWHQJNKL.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),N=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:n}){const o=u[n],[f,v]=m(!1),w=c(()=>v(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,w,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):N,[j,A]=a(b.partOf);/* @__PURE__ */
|
|
2
2
|
return p(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
|
|
4
4
|
/* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:o.name}),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{CHART_INK as s,resolveSeriesColorWithin as c}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-QWHQJNKL.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:N,xDomain:$,yDomain:j,xScale:w="linear",yScale:R="linear",radiusRange:L=[4,22],className:U,emptyLabel:S}){const D=m().charts,W=h(),C=z??(e=>f(e,W)),P=N??(e=>f(e,W)),Q=S??D.noObservations,T=u(null),E=n(T),F=v??E,O=p(),[V,B]=d(null);x(()=>{if(null!==V)return a(e=>"Escape"===e.key&&(B(null),!0))},[V]);const H=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),I=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),J=$||j?I.map(e=>({...e,points:e.points.filter(e=>H(e.x,$)&&H(e.y,j))})).filter(e=>e.points.length>0):I,K=I.reduce((e,t)=>e+t.points.length,0)-J.reduce((e,t)=>e+t.points.length,0);if(0===J.length)/* @__PURE__ */
|
|
2
2
|
return y("div",{className:U,ref:T,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:Q})});const X=J.flatMap(e=>e.points),Z=X.some(e=>null!=e.size),Y=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(X.map(e=>e.y),j,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(P),_),le=Math.max(ie+1,F-q),re=ee(X.map(e=>e.x),$,w,{from:ie,to:le}),oe=i([0,Math.max(...X.map(e=>e.size??1))],{from:L[0],to:L[1]}),ne=V?J[V.s]:void 0,ae=V&&ne?ne.points[V.i]:void 0,se=J.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
3
|
return g("div",{className:`relative ${U??""}`,ref:T,children:[
|
|
4
4
|
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${F} ${k}`,role:"img","aria-label":D.scatter(J.map(e=>e.label),A??D.yAxis,M??D.xAxis)+(K>0?`. ${D.outsideRange(K)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>B(null),onBlur:()=>B(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=V?se.findIndex(e=>e.s===V.s&&e.i===V.i):0;B(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
5
|
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:O,children:/* @__PURE__ */y("rect",{x:ie-L[1],y:Y-L[1],width:le-ie+2*L[1],height:k-G-Y+2*L[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
-
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:
|
|
7
|
-
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:
|
|
8
|
-
/* @__PURE__ */y("g",{clipPath:`url(#${O})`,children:J.map((e,t)=>{const i=
|
|
6
|
+
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:s.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:P(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:C(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:s.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:s.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${O})`,children:J.map((e,t)=>{const i=c(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:Z?oe(l.size??0):L[0]+1,fill:i,fillOpacity:V&&V.s!==t?.25:.62,stroke:s.surface,strokeWidth:2,onMouseEnter:()=>B({s:t,i:r})},`${e.key}-${r}`))})})]}),V&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??D.xAxis,color:c(ne.slot,3,ne.color,ne.tone),value:C(ae.x)},{key:"y",label:A??D.yAxis,color:c(ne.slot,3,ne.color,ne.tone),value:P(ae.y)},...null!=ae.size?[{key:"size",label:D.size,color:s.muted,value:f(ae.size,W)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-5SJ45P5E.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-QWHQJNKL.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),L=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:L,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{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as o}from"./chunk-
|
|
2
|
-
return l(o,{labels:T,values:
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as o}from"./chunk-5SJ45P5E.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-QWHQJNKL.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const L=e().charts,N=i(),v=d??(t=>Number.isInteger(t)?m(t,N):n(t,1,N)),w=x??(t=>m(t,N)),A=g??L.countAxis,C=k??L.distribution,M=h??r(c??[],s),R=a(0,b,f),T=M.map(t=>v(t.from)),J=M.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:T,values:J,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:w,yAxisLabel:A,className:y,emptyLabel:j,ariaLabel:L.histogram(C,M.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${v(M[o].from)} – ${v(M[o].to)}`,rows:[{key:"count",label:L.observations,color:R,value:w(M[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:M.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:R,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return E("div",{className:yt,ref:$t,children:/* @__PURE__ */E(
|
|
3
|
-
return E("div",{className:yt,ref:$t,children:/* @__PURE__ */E("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:H},children:jt})});const It=Y.map((t,e)=>Ft.reduce((t,a)=>t+(O(a.data[e])?a.data[e]:0),0)),Qt=(t,e)=>It[e]>0?t/It[e]:null,Bt=[];if(K){let t=Y.map(()=>0);for(const e of Ft)t=t.map((t,a)=>t+(O(e.data[a])?e.data[a]:0)),Bt.push("percent"===G?t.map((t,e)=>Qt(t,e)):[...t])}const Ot=!!J&&J.length>0,Pt=t=>"right"===t.axis,Yt=!K&&!Ot&&void 0===q&&Ft.some(Pt)&&Ft.some(t=>!Pt(t)),Ht=Yt?Ft.filter(t=>!Pt(t)):Ft,Kt=Yt?Ft.filter(Pt).flatMap(t=>t.data.filter(O)):[],Gt=K?(Bt.at(-1)??[]).filter(O):Ht.flatMap(t=>t.data.filter(O)),Jt=Yt?
|
|
1
|
+
import{ChartDot as t}from"./chunk-CK2YOGUS.js";import{stepPath as e,curvePath as a,areaBetween as r,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as o,fillFor as s,dashFor as c,maskId as h}from"./chunk-465RRWBY.js";import{ChartSkeleton as m}from"./chunk-XNWQ72WA.js";import{useHighlight as d,highlightOpacity as u}from"./chunk-CNYAHYE6.js";import{ChartTooltip as f}from"./chunk-TLRCTNUF.js";import{tooltipBesideBand as p}from"./chunk-MG7A3R75.js";import{pairedAxes as g,niceAxis as k,niceMax as y,linearScale as x,axisGutter as v,bandScale as b,ladderScale as M}from"./chunk-2JWPNR2U.js";import{usePlotWidth as N}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as j}from"./chunk-TWVUQUUD.js";import{ChartBrush as $}from"./chunk-N7T63BVD.js";import{resolveSeriesColor as w,CHART_INK as A,STATUS_VARS as V}from"./chunk-TZFACUMR.js";import{useShellStrings as W,useShellLocale as L}from"./chunk-QWHQJNKL.js";import{formatPercent as R,formatPlain as z}from"./chunk-C3QOHMR6.js";import{useRef as C,useState as U,useId as D,useEffect as S}from"react";import{jsx as E,jsxs as T}from"react/jsx-runtime";var F=12,I=16,Q=26,B=52,O=t=>"number"==typeof t&&Number.isFinite(t);function P({series:P,labels:Y,height:H=200,stacked:K=!1,stackMode:G="value",levels:J,curve:X="linear",tension:Z=0,max:q,yTickCount:_=4,formatValue:tt,formatTooltipValue:et,tooltipLabels:at,yAxisLabel:rt,referenceLines:lt,labelEndpoints:nt=!1,dots:it,dotVariant:ot="border",pulse:st=!1,brush:ct=!1,range:ht,onRangeChange:mt,loading:dt=!1,animate:ut=!0,reveal:ft="left-to-right",fillVariant:pt="gradient",gridStyle:gt="solid",width:kt,className:yt,emptyLabel:xt}){const vt=W().charts,bt=L(),Mt=tt??(t=>z(t,bt)),Nt=et??Mt,jt=xt??vt.noData,$t=C(null),wt=N($t),At=kt??wt,[Vt,Wt]=U(null),[Lt,Rt]=U(null),{highlighted:zt}=d(),Ct=D();if(S(()=>{if(null!==Vt)return j(t=>"Escape"===t.key&&(Wt(null),!0))},[Vt]),dt)/* @__PURE__ */
|
|
2
|
+
return E("div",{className:yt,ref:$t,children:/* @__PURE__ */E(m,{height:H,width:kt??wt})});const Ut=Y,Dt=ht??Lt??[0,Math.max(0,Ut.length-1)],[St,Et]=Dt,Tt=t=>ct?t.slice(St,Et+1):t,Ft=P.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(O)).map(t=>({...t,data:Tt(t.data)}));if(Y=Tt(Ut),0===Ft.length||0===Y.length)/* @__PURE__ */
|
|
3
|
+
return E("div",{className:yt,ref:$t,children:/* @__PURE__ */E("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:H},children:jt})});const It=Y.map((t,e)=>Ft.reduce((t,a)=>t+(O(a.data[e])?a.data[e]:0),0)),Qt=(t,e)=>It[e]>0?t/It[e]:null,Bt=[];if(K){let t=Y.map(()=>0);for(const e of Ft)t=t.map((t,a)=>t+(O(e.data[a])?e.data[a]:0)),Bt.push("percent"===G?t.map((t,e)=>Qt(t,e)):[...t])}const Ot=!!J&&J.length>0,Pt=t=>"right"===t.axis,Yt=!K&&!Ot&&void 0===q&&Ft.some(Pt)&&Ft.some(t=>!Pt(t)),Ht=Yt?Ft.filter(t=>!Pt(t)):Ft,Kt=Yt?Ft.filter(Pt).flatMap(t=>t.data.filter(O)):[],Gt=K?(Bt.at(-1)??[]).filter(O):Ht.flatMap(t=>t.data.filter(O)),Jt=Yt?g([Math.min(0,...Gt),Math.max(0,...Gt)],[Math.min(0,...Kt),Math.max(0,...Kt)],{intervals:_+1,integerLeft:Gt.every(Number.isInteger),integerRight:Kt.every(Number.isInteger)}):null,Xt=Jt?Jt.left:K&&"percent"===G||Ot||void 0!==q?null:k(K?0:Math.min(0,...Gt),Math.max(0,...Gt),{intervals:_+1,integer:Gt.every(Number.isInteger)}),Zt=Xt?Xt.lo:0,qt=K&&"percent"===G?1:Xt?Xt.hi:q??y(Math.max(...Gt,0)),_t=K&&"percent"===G?t=>R(Math.round(100*t),0,bt):Mt,te=Ot?J:Xt?Xt.ticks:x([Zt,qt],{from:0,to:1}).ticks(_+1),ee=v(te.map(_t),B),ae=Jt?v(Jt.right.ticks.map(Mt),I):I,re={left:ee,right:Math.max(ee+1,At-ae),top:F,bottom:H-Q},le=b(Y.length,{from:re.left,to:re.right}),ne=Ot?M(J,{from:re.bottom,to:re.top}):null,ie=x([Zt,qt],{from:re.bottom,to:re.top}),oe=ie(Math.max(Zt,0)),se=t=>ne?ne(t):ie(t),ce=Jt?x([Jt.right.lo,Jt.right.hi],{from:re.bottom,to:re.top}):null,he=t=>ce&&Pt(t)?ce:se,me=ne?ne.levels.map(t=>({value:t,y:ne(t)})):te.map(t=>({value:t,y:ie(t)})),de=t=>e=>{e.preventDefault(),Wt(e=>{const a=(e??0)+t;return Math.min(Y.length-1,Math.max(0,a))})},ue=Math.max(1,Math.ceil(Y.length/Math.max(1,Math.floor(At/96))));/* @__PURE__ */
|
|
4
4
|
return T("div",{className:`relative ${yt??""}`,ref:$t,children:[
|
|
5
5
|
/* @__PURE__ */T("svg",{width:"100%",height:H,viewBox:`0 0 ${At} ${H}`,role:"img","aria-label":vt.overIntervals(Ft.map(t=>t.label),Y.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Wt(null),onBlur:()=>Wt(null),onKeyDown:t=>{"ArrowRight"===t.key&&de(1)(t),"ArrowLeft"===t.key&&de(-1)(t)},children:[
|
|
6
6
|
/* @__PURE__ */E("defs",{children:/* @__PURE__ */E("clipPath",{id:Ct,children:/* @__PURE__ */E("rect",{x:re.left,y:re.top,width:re.right-re.left,height:re.bottom-re.top})})}),
|
|
7
|
-
/* @__PURE__ */E(
|
|
8
|
-
/* @__PURE__ */E("line",{x1:re.left,y1:oe,x2:re.right,y2:oe,stroke:
|
|
9
|
-
/* @__PURE__ */E("g",{clipPath:`url(#${Ct})`,mask:ut&&ft?`url(#${
|
|
10
|
-
return E("path",{d:a
|
|
11
|
-
return E("g",{opacity:d??void 0,className:"rosh-viz-mark",children:Y.map((
|
|
12
|
-
return E("rect",{x:le.center(
|
|
7
|
+
/* @__PURE__ */E(n,{id:Ct,fills:Ft.map((t,e)=>({color:w(t.slot,t.color,t.tone),variant:t.fillVariant??pt})),fadeFrom:K?.42:.3,reveal:!!ut&&ft}),me.map(t=>/* @__PURE__ */E("line",{x1:re.left,y1:t.y,x2:re.right,y2:t.y,stroke:A.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===gt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
|
+
/* @__PURE__ */E("line",{x1:re.left,y1:oe,x2:re.right,y2:oe,stroke:A.axis,strokeWidth:1,shapeRendering:"crispEdges"}),me.map(t=>/* @__PURE__ */E("text",{x:re.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:_t(t.value)},`ytick-${t.value}`)),Jt&&me.map((t,e)=>/* @__PURE__ */E("text",{x:re.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:Mt(Jt.right.ticks[e])},`ytick-r-${t.value}`)),rt&&/* @__PURE__ */E("text",{x:12,y:(re.top+re.bottom)/2,transform:`rotate(-90 12 ${(re.top+re.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:A.label,children:rt}),
|
|
9
|
+
/* @__PURE__ */E("g",{clipPath:`url(#${Ct})`,mask:ut&&ft?`url(#${h(Ct)})`:void 0,children:Ft.map((t,n)=>{const h=w(t.slot,t.color,t.tone),m=t.mode??(K?"area":"line"),d=u(t.key,zt);if("step"===m){const a=Y.map((e,a)=>({start:le(a),end:le.end(a),value:t.data[a]})).filter(t=>O(t.value)).map(e=>({start:e.start,end:e.end,y:he(t)(e.value)}));/* @__PURE__ */
|
|
10
|
+
return E("path",{d:e(a),fill:"none",stroke:h,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:d??void 0,className:"rosh-viz-mark"},t.key)}const f=Y.map((e,a)=>{const r=K?Bt[n]?.[a]:t.data[a];return O(r)?[le.center(a),he(t)(r)]:null}).filter(t=>null!==t);if(0===f.length)return null;if("column"===m){const e=Math.max(1,.62*le.bandwidth),a="solid"===t.fillVariant,r=he(t);/* @__PURE__ */
|
|
11
|
+
return E("g",{opacity:d??void 0,className:"rosh-viz-mark",children:Y.map((l,s)=>{const c=K?Bt[n]?.[s]:t.data[s];if(!O(c))return null;const m=r(c);/* @__PURE__ */
|
|
12
|
+
return E("rect",{x:le.center(s)-e/2,y:Math.min(m,oe),width:e,height:Math.abs(oe-m),rx:2,fill:h,fillOpacity:a?1:.35,className:ut?i.rise:void 0,style:ut?o(s,26):void 0},s)})},t.key)}const p=a(f,X,Z),g=K&&n>0?Y.map((t,e)=>[le.center(e),se(Bt[n-1]?.[e]??0)-2]):null,k=g?r(p,g):l(p,f,oe);/* @__PURE__ */
|
|
13
13
|
return T("g",{opacity:d??void 0,className:"rosh-viz-mark",children:[("area"===m||K)&&
|
|
14
|
-
/* @__PURE__ */E("path",{d:k,fill:
|
|
15
|
-
/* @__PURE__ */E("path",{d:p,fill:"none",stroke:
|
|
14
|
+
/* @__PURE__ */E("path",{d:k,fill:s(Ct,n,t.fillVariant??pt,h),stroke:"none"}),
|
|
15
|
+
/* @__PURE__ */E("path",{d:p,fill:"none",stroke:h,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:c(t.stroke??(t.forecast?"animated-dashed":"solid")),className:ut&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),lt?.map((t,e)=>{const a=t.color??V[t.tone??"critical"],r=se(t.value);/* @__PURE__ */
|
|
16
16
|
return T("g",{children:[
|
|
17
|
-
/* @__PURE__ */E("line",{x1:re.left,y1:r,x2:re.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */E("text",{x:re.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(it??(nt?"last":"none"))&&Ft.map((
|
|
18
|
-
return T("g",{children:[i.map(r=>{const i=K?Bt[a]?.[r]:
|
|
19
|
-
/* @__PURE__ */E("div",{className:"pointer-events-none absolute top-2 z-10",style:
|
|
17
|
+
/* @__PURE__ */E("line",{x1:re.left,y1:r,x2:re.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */E("text",{x:re.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(it??(nt?"last":"none"))&&Ft.map((e,a)=>{if("column"===e.mode)return null;const r=it??(nt?"last":"none"),l=w(e.slot,e.color,e.tone),n=[...e.data].map(O).lastIndexOf(!0),i="all"===r?Y.map((t,e)=>e).filter(t=>O(K?Bt[a]?.[t]:e.data[t])):n>=0?[n]:[];/* @__PURE__ */
|
|
18
|
+
return T("g",{children:[i.map(r=>{const i=K?Bt[a]?.[r]:e.data[r];return O(i)?/* @__PURE__ */E(t,{cx:le.center(r),cy:he(e)(i),color:l,variant:ot,pulse:st&&r===n,title:`${Y[r]}: ${e.label} ${Mt(i)}`},r):null}),nt&&n>=0&&O(K?Bt[a]?.[n]:e.data[n])&&/* @__PURE__ */E("text",{x:le.center(n)-10,y:he(e)(K?Bt[a]?.[n]:e.data[n])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:Mt(K?Bt[a]?.[n]:e.data[n])})]},`dots-${e.key}`)}),Y.map((t,e)=>e%ue===0?/* @__PURE__ */E("text",{x:le.center(e),y:H-8,textAnchor:"middle",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Vt&&/* @__PURE__ */E("line",{x1:le.center(Vt),y1:re.top,x2:le.center(Vt),y2:re.bottom,stroke:A.axis,strokeWidth:1}),Y.map((t,e)=>/* @__PURE__ */E("rect",{x:le(e),y:re.top,width:Math.max(1,le.bandwidth),height:re.bottom-re.top,fill:"transparent",onMouseEnter:()=>Wt(e)},`hit-${e}`))]}),ct&&Ut.length>2&&/* @__PURE__ */E($,{className:"mt-1",labels:Ut,width:At,data:P[0]?.data??[],range:Dt,onRangeChange:t=>{mt?mt(t):Rt(t)}}),null!==Vt&&
|
|
19
|
+
/* @__PURE__ */E("div",{className:"pointer-events-none absolute top-2 z-10",style:p(le.center(Vt),le.bandwidth,At),children:/* @__PURE__ */E(f,{title:at?.[Vt]??Y[Vt],rows:Ft.map((t,e)=>({key:t.key,label:t.label,color:w(t.slot,t.color,t.tone),value:O(t.data[Vt])?K&&"percent"===G?`${R(100*(Qt(t.data[Vt],Vt)??0),1,bt)} · ${Nt(t.data[Vt])}`:Nt(t.data[Vt]):void 0})),footnote:K&&"percent"===G?vt.inBucket(Nt(It[Vt])):void 0})})]})}export{P as TimeSeriesChart};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{ChartDefs as t,MOTION as e,stagger as a,glowId as n}from"./chunk-465RRWBY.js";import{ChartSkeleton as i}from"./chunk-XNWQ72WA.js";import{useHighlight as r,autoHighlightIndex as l,highlightOpacity as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as m}from"./chunk-TLRCTNUF.js";import{CartesianPlot as s}from"./chunk-
|
|
1
|
+
import{ChartDefs as t,MOTION as e,stagger as a,glowId as n}from"./chunk-465RRWBY.js";import{ChartSkeleton as i}from"./chunk-XNWQ72WA.js";import{useHighlight as r,autoHighlightIndex as l,highlightOpacity as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as m}from"./chunk-TLRCTNUF.js";import{CartesianPlot as s}from"./chunk-5SJ45P5E.js";import{CHART_INK as u,STATUS_VARS as h,resolveSeriesColor as c}from"./chunk-TZFACUMR.js";import{useShellStrings as d,useShellLocale as f}from"./chunk-QWHQJNKL.js";import{formatPercent as b,formatPlain as p}from"./chunk-C3QOHMR6.js";import{useId as x}from"react";import{jsx as y,jsxs as M}from"react/jsx-runtime";function g({series:g,labels:v,stacked:k=!1,stackMode:N="value",height:$=220,width:w,max:F,formatValue:L,yAxisLabel:j,className:A,emptyLabel:C,radius:S=3,loading:R=!1,animate:T=!0,glow:V=!1,emphasise:W=!1,activeKey:z,highlight:E="none",valueLabels:Q=!1,onSelect:H,min:O,formatTooltipValue:Y,tooltipLabels:B,barGap:J=4,seriesLabels:K=!1}){const U=x(),{highlighted:G}=r(),P=d().charts,X=f(),Z=L??(t=>p(t,X)),q=Y??Z;if(R)/* @__PURE__ */return y(i,{height:$,width:w,variant:"bars",className:A});const D=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const n=t.pointTones?.[e];return n?h[n]:c(t.slot,t.color,t.tone)},I=g.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),_=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},tt=v.map((t,e)=>I.reduce((t,a)=>t+_(a,e),0)),et=v.map((t,e)=>I.reduce((t,a)=>t+Math.max(0,_(a,e)),0)),at=v.map((t,e)=>I.reduce((t,a)=>t+Math.min(0,_(a,e)),0)),nt=k&&"percent"===N,it=(t,e)=>tt[e]>0?t/tt[e]:null,rt=nt?[1]:k?[...et,...at]:I.flatMap(t=>t.data.filter(Number.isFinite)),lt=(t,e)=>{const a=t.bandwidth/Math.max(1,I.length),n=I.length>1?Math.min(J,.25*a):0;return{offset:e*a+n/2,width:Math.max(1,a-n)}},ot=K&&!k?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return v.map((n,i)=>I.map((n,r)=>{const l=n.data[i];if(!Number.isFinite(l))return null;const o=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:m,width:s}=lt(t,r),h=t(i)+m+s/2,c=Math.min(e(o),e(a)),d=Math.max(e(o),e(a));if(s<13)return null;const f=Math.floor((d-c-12)/6.6),b=f>=Math.min(4,n.label.length),p=b&&n.label.length>f?`${n.label.slice(0,f-1).trimEnd()}…`:n.label,x=b?d-6:c-4;/* @__PURE__ */
|
|
2
2
|
return y("text",{"data-series-label":"true",x:h,y:x,transform:`rotate(-90 ${h} ${x})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:b?u.surface:u.label,children:p},`n${n.key}-${i}`)}))}:null;/* @__PURE__ */
|
|
3
|
-
return y(s,{labels:v,values:rt,height:$,width:w,max:nt?1:F,min:nt?void 0:O,formatValue:nt?t=>b(Math.round(100*t),0,X):Z,yAxisLabel:j,className:A,emptyLabel:C,onSelect:H,ariaLabel:
|
|
4
|
-
return y("text",{"data-value-label":"true",x:t.center(n),y:a>=0?e(i)-4:e(i)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:Z(a)},`v${n}`)}return
|
|
5
|
-
return y("text",{"data-value-label":"true",x:t(n)+o+m/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:Z(l)},`v${a.key}-${n}`)})})]}):void 0,children:({x:i,y:r,bottom:m,active:s})=>{const h=z?v.indexOf(z):-1,c=l(k?tt:
|
|
3
|
+
return y(s,{labels:v,values:rt,height:$,width:w,max:nt?1:F,min:nt?void 0:O,formatValue:nt?t=>b(Math.round(100*t),0,X):Z,yAxisLabel:j,className:A,emptyLabel:C,onSelect:H,ariaLabel:P.acrossCategories(I.map(t=>t.label),v.length),tooltip:t=>/* @__PURE__ */y(m,{title:B?.[t]??v[t],rows:I.map(e=>({key:e.key,label:e.label,color:D(e,t),value:Number.isFinite(e.data[t])?nt?`${b(100*(it(e.data[t],t)??0),1,X)} · ${q(e.data[t])}`:q(e.data[t]):void 0})),footnote:nt?P.inCategory(q(tt[t])):void 0}),overlay:Q&&!nt||ot?({x:t,y:e})=>/* @__PURE__ */M("g",{pointerEvents:"none",children:[ot?.({x:t,y:e}),Q&&!nt&&v.map((a,n)=>{if(k){if(!I.some(t=>Number.isFinite(t.data[n])))return null;const a=I.reduce((t,e)=>t+_(e,n),0),i=a>=0?et[n]:at[n];/* @__PURE__ */
|
|
4
|
+
return y("text",{"data-value-label":"true",x:t.center(n),y:a>=0?e(i)-4:e(i)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:Z(a)},`v${n}`)}return I.map((a,i)=>{const r=a.data[n];if(!Number.isFinite(r))return null;const l=r,{offset:o,width:m}=lt(t,i);/* @__PURE__ */
|
|
5
|
+
return y("text",{"data-value-label":"true",x:t(n)+o+m/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:u.label,style:{fontVariantNumeric:"tabular-nums"},children:Z(l)},`v${a.key}-${n}`)})})]}):void 0,children:({x:i,y:r,bottom:m,active:s})=>{const h=z?v.indexOf(z):-1,c=l(k?tt:I[0]?.data??[],E),d=s??(h>=0?h:c);/* @__PURE__ */
|
|
6
6
|
return M("g",{children:[
|
|
7
|
-
/* @__PURE__ */y(t,{id:
|
|
8
|
-
return y("rect",{x:M,y:v,width:g,height:w,rx:
|
|
7
|
+
/* @__PURE__ */y(t,{id:U,glow:V}),v.map((t,l)=>{let m=0,s=0;const h=r(Math.min(r.domain[1],Math.max(r.domain[0],0)));return I.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const b=nt?it(f,l):f;if(null===b)return null;const p=D(t,l),x=lt(i,c),M=k?i(l):i(l)+x.offset,g=k?Math.max(1,i.bandwidth):x.width;let v,N,$=!0;if(k){const t=b>=0?m:s,e=t+b;b>=0?m=e:s=e,v=r(Math.max(t,e)),N=r(Math.min(t,e)),$=0===t}else v=Math.min(r(b),h),N=Math.max(r(b),h);const w=Math.max(0,N-v-(k&&!$?2:0)),F=null===d||d===l,L=F?p:W?u.muted:p,j=o(t.key,G);/* @__PURE__ */
|
|
8
|
+
return y("rect",{x:M,y:v,width:g,height:w,rx:S,fill:L,fillOpacity:j??(F?1:W?.32:.45),filter:V&&d===l?`url(#${n(U)})`:void 0,className:"rosh-viz-mark"+(T?` ${e.rise}`:""),style:T?a(l*(k?1:I.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==s&&!W&&/* @__PURE__ */y("line",{x1:i.center(s),y1:r(r.domain[1]),x2:i.center(s),y2:m,stroke:u.axis,strokeWidth:1})]})}})}export{g as ColumnChart};
|
|
@@ -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-
|
|
2
|
-
return s(t,{labels:d,values:
|
|
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-5SJ45P5E.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-QWHQJNKL.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:L,tone:j,label:v,className:N,emptyLabel:M,radius:C=3}){const F=o().charts,O=n(),Q=w??(e=>h(e,O)),W=v??F.range,A=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),R=r(0,L,j);/* @__PURE__ */
|
|
2
|
+
return s(t,{labels:d,values:A,height:k,width:g,max:b,min:x,formatValue:Q,yAxisLabel:y,className:N,emptyLabel:M,bandPadding:"bar"===p?.34:0,ariaLabel:F.rangeLabel(W,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:F.high,color:R,value:null==u[e]?void 0:Q(u[e].high)},{key:"low",label:F.low,color:R,value:null==u[e]?void 0:Q(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:C,fill:R,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:
|
|
5
|
-
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:
|
|
6
|
-
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:
|
|
4
|
+
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:R,fillOpacity:.2,stroke:"none"}),
|
|
5
|
+
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:R,strokeWidth:2,strokeLinejoin:"round"}),
|
|
6
|
+
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:R,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,4 +1,4 @@
|
|
|
1
|
-
import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as a}from"./chunk-
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as a}from"./chunk-5SJ45P5E.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-QWHQJNKL.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let k=0;const M=c.map(t=>{if(t.total){const a={from:0,to:k,value:k,total:!0};return{...t,...a}}const a=k;return k+=t.value,{...t,from:a,to:k,value:t.value,total:!1}}),L=M.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
|
|
2
2
|
return i(a,{labels:c.map(t=>t.label),values:L,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(M[0]?.from??0),y(k)),tooltip:a=>{const e=M[a],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
|
|
3
3
|
return i(t,{title:e?.label,rows:[{key:"step",color:o,label:e?.total?v.balance:e.value>=0?v.increase:v.decrease,value:e?.total?y(e.to):`${e.value>=0?"+":"−"}${y(Math.abs(e.value))}`},...e?.total?[]:[{key:"running",label:v.runningTotal,color:l.neutral,value:y(e.to)}]]})},children:({x:t,y:a,active:o})=>/* @__PURE__ */s("g",{children:[g&&M.slice(0,-1).map((l,o)=>
|
|
4
4
|
/* @__PURE__ */i("line",{x1:t.end(o),y1:a(l.to),x2:t(o+1),y2:a(l.to),stroke:e.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${o}`)),M.map((e,r)=>{const n=e.total?l.neutral:e.value>=0?l.good:l.critical,s=Math.min(a(e.from),a(e.to)),c=Math.max(1,Math.abs(a(e.to)-a(e.from)));/* @__PURE__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-L4TN4EWK.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)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),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)}}},Z=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();C(()=>{"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,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)=>{Z(()=>{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],N=[800,1800],B=e=>{document.prerendering?C(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(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}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\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,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,V=/\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&&O.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("//")&&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);C(()=>{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;Z(()=>{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,N,t.reportAllChanges);B(()=>{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,N,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,N,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(K,"[redacted]").replace(J,"[redacted]").replace(W,"[url]").replace(V,"[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-TNTQL6SX.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)}}},Z=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,_),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)=>{Z(()=>{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],N=[800,1800],B=e=>{document.prerendering?E(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(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,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&&O.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("//")&&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;Z(()=>{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,N,t.reportAllChanges);B(()=>{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,N,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,N,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{Avatar as e}from"./chunk-Z3JW77LH.js";import{StatCard as a,Card as t}from"./chunk-WUKN5WUM.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-5VRMQTKV.js";import{ColumnChart as l}from"./chunk-
|
|
1
|
+
import{Avatar as e}from"./chunk-Z3JW77LH.js";import{StatCard as a,Card as t}from"./chunk-WUKN5WUM.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-5VRMQTKV.js";import{ColumnChart as l}from"./chunk-LB3A53D5.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-LNARMEEZ.js";import{Button_default as c}from"./chunk-NHH2MXFU.js";import{TH_ONE_LINE as n}from"./chunk-OZAAIE4E.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="9.9.1",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{
|
|
2
|
-
return f("div",{className:k,ref:L,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:F})});const V=y??
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as l}from"./chunk-TWVUQUUD.js";import{resolveSeriesColor as r,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-QWHQJNKL.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,U=a(),C=$??(e=>o(e,U)),z=b??j.intensity,F=w??j.noActivity,L=h(null),R=t(L),D=g??R,Q=c(),[S,T]=s(null);if(m(()=>{if(null!==S)return l(e=>"Escape"===e.key&&(T(null),!0))},[S]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
+
return f("div",{className:k,ref:L,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:F})});const V=y??r(0),B=v??Math.max(1,...p.flat().filter(Number.isFinite)),E=96,G=26*x.length,H=M??G+26+26,K=Math.max(2,(Math.max(97,D)-E)/d.length),W=e=>{const t=B>0?Math.max(0,Math.min(1,e/B)):0;return`color-mix(in oklab, ${V} ${(8+92*t).toFixed(1)}%, ${n.surface})`};/* @__PURE__ */
|
|
3
3
|
return u("div",{className:`relative ${k??""}`,ref:L,children:[
|
|
4
4
|
/* @__PURE__ */u("svg",{width:"100%",height:H,viewBox:`0 0 ${D} ${H}`,role:"img","aria-label":j.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>T(null),onBlur:()=>T(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),T(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
|
|
5
5
|
/* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:Q,x1:"0",x2:"1",children:[
|
|
6
6
|
/* @__PURE__ */f("stop",{offset:"0",stopColor:W(0)}),
|
|
7
|
-
/* @__PURE__ */f("stop",{offset:"1",stopColor:W(B)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:
|
|
8
|
-
return f("rect",{x:E+r*K+A/2,y:26*t+A/2,width:Math.max(1,K-A),height:26-A,rx:N,fill:W(n),opacity:i?.55:1,onMouseEnter:()=>T({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${C(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((D-E)/56))))===0?/* @__PURE__ */f("text",{x:E+t*K+K/2,y:G+15,textAnchor:"middle",fontSize:11,fill:
|
|
7
|
+
/* @__PURE__ */f("stop",{offset:"1",stopColor:W(B)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:n.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=S&&(S.r!==t||S.c!==r);/* @__PURE__ */
|
|
8
|
+
return f("rect",{x:E+r*K+A/2,y:26*t+A/2,width:Math.max(1,K-A),height:26-A,rx:N,fill:W(n),opacity:i?.55:1,onMouseEnter:()=>T({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${C(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((D-E)/56))))===0?/* @__PURE__ */f("text",{x:E+t*K+K/2,y:G+15,textAnchor:"middle",fontSize:11,fill:n.label,children:e},`c${t}`):null),
|
|
9
9
|
/* @__PURE__ */f("rect",{x:E,y:G+26,width:Math.min(180,Math.max(40,D-E)),height:8,rx:4,fill:`url(#${Q})`}),
|
|
10
|
-
/* @__PURE__ */f("text",{x:E,y:G+48,fontSize:11,fill:
|
|
11
|
-
/* @__PURE__ */f("text",{x:E+Math.min(180,Math.max(40,D-E)),y:G+48,textAnchor:"end",fontSize:11,fill:
|
|
10
|
+
/* @__PURE__ */f("text",{x:E,y:G+48,fontSize:11,fill:n.label,children:"0"}),
|
|
11
|
+
/* @__PURE__ */f("text",{x:E+Math.min(180,Math.max(40,D-E)),y:G+48,textAnchor:"end",fontSize:11,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:C(B)})]}),S&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[S.r]} · ${d[S.c]}`,rows:[{key:"v",label:z,color:V,value:null==p[S.r]?.[S.c]?void 0:C(p[S.r][S.c])}]})})]})}export{x as HeatmapChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{CartesianPlot as l}from"./chunk-
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{CartesianPlot as l}from"./chunk-5SJ45P5E.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-QWHQJNKL.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),L=Math.min(...v),j=Math.max(...v),N=.08*(j-L)||1;/* @__PURE__ */
|
|
2
2
|
return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:L-N,max:j+N,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
|
|
3
3
|
return c(e,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:u?.45:1,children:[
|
package/dist/hooks/useTheme.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ declare function applyThemePrefs(p: {
|
|
|
67
67
|
}): void;
|
|
68
68
|
declare function useTheme(): {
|
|
69
69
|
theme: Theme;
|
|
70
|
-
resolved: "
|
|
70
|
+
resolved: "dark" | "light" | "blue" | "green" | "grey" | "pink";
|
|
71
71
|
corners: Corners;
|
|
72
72
|
iconSet: string | null;
|
|
73
73
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -770,7 +770,7 @@ declare class WindowErrorBoundary extends Component<WindowErrorBoundaryProps, {
|
|
|
770
770
|
};
|
|
771
771
|
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
772
772
|
reset: () => void;
|
|
773
|
-
render(): string | number | boolean |
|
|
773
|
+
render(): string | number | boolean | react_jsx_runtime.JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
774
774
|
}
|
|
775
775
|
|
|
776
776
|
declare function ShortcutHelp(): react_jsx_runtime.JSX.Element;
|