efficient-shell 11.2.0 → 11.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/{Browser-2JOFXNUA.js → Browser-XMJFN62W.js} +14 -14
- package/dist/Calculator-OJSMHQKW.js +29 -0
- package/dist/{CurrencyConverter-6WJWHZUQ.js → CurrencyConverter-CUIFL32O.js} +6 -6
- package/dist/{Documents-DY2OBQNR.js → Documents-763OJV7I.js} +7 -7
- package/dist/{Files-ADJB2IFU.js → Files-LOJ6PPTE.js} +41 -41
- package/dist/{Notepad-HOJSMCCF.js → Notepad-ZAOFX5GU.js} +9 -9
- package/dist/{PomodoroTimer-5GWSBJW5.js → PomodoroTimer-IMNUQQAC.js} +21 -21
- package/dist/{Preview-JZBO2SP5.js → Preview-BYFMM2S5.js} +28 -28
- package/dist/Sidebar-BCTWRG7P.js +44 -0
- package/dist/{Spreadsheet-SS5Y3DV2.js → Spreadsheet-CQ5FWKAQ.js} +14 -14
- package/dist/{Stock-3LSKLYGI.js → Stock-S6URCQBQ.js} +2 -2
- package/dist/{Weather-26PCYFUR.js → Weather-SM5ZQUE2.js} +19 -19
- package/dist/{WorldClock-KRL72Y53.js → WorldClock-I26FGYJO.js} +4 -4
- package/dist/ai/index.js +91 -91
- 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/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.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-QMUIXKBQ.js → chunk-2N64TKI5.js} +1 -1
- package/dist/{chunk-SHO35OPO.js → chunk-36PJGT4W.js} +3 -3
- package/dist/{chunk-WDQI3FV6.js → chunk-36VIGB6J.js} +6 -6
- package/dist/{chunk-LJAYUDN2.js → chunk-3BFZVVAT.js} +1 -1
- package/dist/chunk-3XZFWR6T.js +13 -0
- package/dist/chunk-4BCFBF3C.js +9 -0
- package/dist/{chunk-OTVK7DJM.js → chunk-4DDL6NXB.js} +1 -1
- package/dist/{chunk-YDMXW2Q4.js → chunk-4EBJO7ER.js} +11 -11
- package/dist/{chunk-T7PVHIXI.js → chunk-4P3324KU.js} +1 -1
- package/dist/chunk-4P57TIFK.js +2 -0
- package/dist/{chunk-ZXVJL7MS.js → chunk-4RGMRXYH.js} +1 -1
- package/dist/{chunk-P4VKU3SL.js → chunk-55AEZX6K.js} +1 -1
- package/dist/chunk-5PDHKH2A.js +3 -0
- package/dist/{chunk-EYPKBJYG.js → chunk-5PP435FL.js} +1 -1
- package/dist/{chunk-EB2IQNM5.js → chunk-5SBCAYBH.js} +1 -1
- package/dist/{chunk-GAIB5FEE.js → chunk-5XFBZ7C3.js} +74 -74
- package/dist/{chunk-NEZA7V6H.js → chunk-6IOFNPR6.js} +4 -4
- package/dist/{chunk-G3KXB7SP.js → chunk-6KGIHI6X.js} +4 -4
- package/dist/{chunk-MDV7UQJD.js → chunk-6M5O2P64.js} +9 -9
- package/dist/{chunk-COGSXN4D.js → chunk-7FW2BQTV.js} +2 -2
- package/dist/{chunk-FA5FBNWF.js → chunk-7JVGF555.js} +1 -1
- package/dist/chunk-7LU3H72S.js +7 -0
- package/dist/{chunk-PFKXPSOM.js → chunk-A6FR2D46.js} +5 -5
- package/dist/{chunk-SXQZ5GTA.js → chunk-AFG34RBV.js} +6 -6
- package/dist/{chunk-SS5SQMIB.js → chunk-AIJ6OR6X.js} +2 -2
- package/dist/{chunk-DLWKDAYX.js → chunk-ALTBTO3Z.js} +2 -2
- package/dist/{chunk-BQPMZXNB.js → chunk-AWGJIDBR.js} +1 -1
- package/dist/{chunk-BTRV3SMB.js → chunk-BBXFIBXB.js} +1 -1
- package/dist/{chunk-SX5BSWTN.js → chunk-BMXTPJ7T.js} +5 -5
- package/dist/{chunk-3TXSYEQM.js → chunk-BUO7XCYR.js} +13 -13
- package/dist/chunk-CH3JQUDW.js +8 -0
- package/dist/chunk-CJSZW3OS.js +1 -0
- package/dist/{chunk-4TGZODSH.js → chunk-COF33H6J.js} +5 -5
- package/dist/{chunk-MIC2F3W3.js → chunk-D5HGRACW.js} +1 -1
- package/dist/{chunk-ESZHN7PV.js → chunk-DIEH76MB.js} +1 -1
- package/dist/{chunk-A3Q7X35W.js → chunk-DOF56HTO.js} +6 -6
- package/dist/{chunk-TQE6O2JA.js → chunk-DVYIBJ3S.js} +3 -3
- package/dist/{chunk-MTIP5DH2.js → chunk-DWAA4YZV.js} +3 -3
- package/dist/{chunk-3NRQNKVP.js → chunk-DZOJQURG.js} +3 -3
- package/dist/{chunk-5F2AIDPY.js → chunk-E3EJWNNK.js} +9 -9
- package/dist/chunk-EOVXFXVV.js +2 -0
- package/dist/chunk-EXLHFM3V.js +6 -0
- package/dist/{chunk-LK5A2SGA.js → chunk-F56UUBKG.js} +1 -1
- package/dist/{chunk-JPNAEN53.js → chunk-FZM3ZPW3.js} +1 -1
- package/dist/{chunk-6EIZOX6W.js → chunk-G66SG6JN.js} +9 -9
- package/dist/{chunk-ZD36QKQS.js → chunk-H5NIW2KS.js} +1 -1
- package/dist/{chunk-4LQDORA6.js → chunk-HAYGUFNM.js} +13 -13
- package/dist/chunk-HFDSKCPL.js +1 -0
- package/dist/{chunk-HEGSRTXG.js → chunk-HNUKXGYP.js} +3 -3
- package/dist/{chunk-355CRSFS.js → chunk-HNVSVTNC.js} +11 -11
- package/dist/{chunk-6TJCIS5E.js → chunk-ILY4DU3D.js} +1 -1
- package/dist/{chunk-RRE2NNFS.js → chunk-IPO4LHSB.js} +6 -6
- package/dist/chunk-KC4NOKZ6.js +28 -0
- package/dist/{chunk-IGLPL2QU.js → chunk-KXU4ORKE.js} +1 -1
- package/dist/{chunk-VUIGU2LQ.js → chunk-KYBXJL6A.js} +15 -15
- package/dist/{chunk-4XNVIKZZ.js → chunk-LCSMBVMU.js} +3 -3
- package/dist/{chunk-VCMHBUKI.js → chunk-LE5LWALR.js} +1 -1
- package/dist/{chunk-OEQ52KWJ.js → chunk-M4IASUEE.js} +1 -1
- package/dist/{chunk-DU4WEVNS.js → chunk-MCAPJSB6.js} +1 -1
- package/dist/chunk-MHPFBVDD.js +8 -0
- package/dist/{chunk-RQDVAUXD.js → chunk-N5KO2IHG.js} +4 -4
- package/dist/{chunk-QQ2LDC6C.js → chunk-NJN5IKWO.js} +1 -1
- package/dist/{chunk-3XTSXZAC.js → chunk-NRALUW6P.js} +7 -7
- package/dist/chunk-NWC6YCIJ.js +11 -0
- package/dist/{chunk-VQBEZNHC.js → chunk-NZ34BQKH.js} +1 -1
- package/dist/chunk-NZISMTQE.js +7 -0
- package/dist/{chunk-KBV2UOTG.js → chunk-O7RR2ZZ2.js} +6 -6
- package/dist/{chunk-4MBYFQOI.js → chunk-OEPYQUXZ.js} +8 -8
- package/dist/{chunk-BW47XJLH.js → chunk-OKHKY3ZZ.js} +1 -1
- package/dist/{chunk-UGGHQYDN.js → chunk-P7H2DXJB.js} +10 -10
- package/dist/{chunk-GSF2UZTX.js → chunk-PLC656AN.js} +1 -1
- package/dist/{chunk-LGDMGDSV.js → chunk-PSR6SXCC.js} +11 -11
- package/dist/chunk-Q2SCJQ5H.js +1 -0
- package/dist/{chunk-OONJ43CQ.js → chunk-QGWKM7C3.js} +5 -5
- package/dist/{chunk-RABYGQQU.js → chunk-QO5E33DH.js} +2 -2
- package/dist/{chunk-CD7UWMPX.js → chunk-QOI4GQVH.js} +1 -1
- package/dist/{chunk-ZD56IH5K.js → chunk-QRU55BUS.js} +2 -2
- package/dist/chunk-RBZKV3ED.js +14 -0
- package/dist/{chunk-SYZLS2JA.js → chunk-RDKIYORS.js} +1 -1
- package/dist/{chunk-6UBOLLBC.js → chunk-RNBS6QGP.js} +16 -16
- package/dist/{chunk-JQBVSPF5.js → chunk-S4FPYCUU.js} +3 -3
- package/dist/{chunk-VAPSWR5Q.js → chunk-SX3SG522.js} +9 -9
- package/dist/chunk-T3DN2QBM.js +1 -0
- package/dist/{chunk-5CXFABVD.js → chunk-T6BGS26U.js} +1 -1
- package/dist/{chunk-PVPMJ5G2.js → chunk-TDAI4J27.js} +1 -1
- package/dist/{chunk-XWFLIGDQ.js → chunk-TE6R53YD.js} +1 -1
- package/dist/{chunk-DGNAUGZ3.js → chunk-TFSLPAGB.js} +4 -4
- package/dist/chunk-TNJ2VCH4.js +8 -0
- package/dist/{chunk-4QK4WNPB.js → chunk-U44DVPGB.js} +1 -1
- package/dist/{chunk-FXOYA2VJ.js → chunk-UNQ54QOF.js} +1 -1
- package/dist/{chunk-ALE56KOA.js → chunk-V2J2AHDW.js} +4 -4
- package/dist/{chunk-WMHZA4EO.js → chunk-VX4COEWP.js} +3 -3
- package/dist/{chunk-M4BPHBKI.js → chunk-VX6TKEEK.js} +1 -1
- package/dist/{chunk-47DO42IW.js → chunk-WDQEUNGE.js} +1 -1
- package/dist/{chunk-CJH2BGXY.js → chunk-WGLHB6WE.js} +1 -1
- package/dist/{chunk-RWPMLUFO.js → chunk-WL4U4MTQ.js} +3 -3
- package/dist/{chunk-OFG3JZZE.js → chunk-WLYYC3AP.js} +1 -1
- package/dist/{chunk-ZS3TIQQ4.js → chunk-WOAMPTZI.js} +14 -14
- package/dist/chunk-WPCNJ4UL.js +2 -0
- package/dist/{chunk-YCWALB3A.js → chunk-XBHXGBJR.js} +1 -1
- package/dist/{chunk-MXGDFO6A.js → chunk-XCAUDTCC.js} +5 -5
- package/dist/{chunk-M3JNILT2.js → chunk-XFH64VIG.js} +3 -3
- package/dist/{chunk-34H3CK7R.js → chunk-XXL5RLNM.js} +9 -9
- package/dist/{chunk-GELPD7EY.js → chunk-YQOVUH5W.js} +8 -8
- package/dist/{chunk-EKCQ7XBZ.js → chunk-Z44JWU75.js} +2 -2
- package/dist/{chunk-DANLBFBD.js → chunk-ZRLWE3JM.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.d.ts +2 -0
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.d.ts +13 -0
- package/dist/forms/RenameField.js +2 -0
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/colorMix.d.ts +38 -0
- package/dist/forms/colorMix.js +1 -0
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +666 -666
- package/dist/map/index.js +3 -3
- package/dist/motion/entrance.d.ts +38 -0
- package/dist/motion/entrance.js +1 -0
- package/dist/motion.css +101 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-V3BHUF4G.js +0 -29
- package/dist/Sidebar-GQX7UM3M.js +0 -44
- package/dist/chunk-23G63EZ4.js +0 -29
- package/dist/chunk-56KADF2B.js +0 -11
- package/dist/chunk-7DI3VQCF.js +0 -2
- package/dist/chunk-EUAC2T5D.js +0 -2
- package/dist/chunk-EZYRHBOP.js +0 -13
- package/dist/chunk-FO6UPEZH.js +0 -7
- package/dist/chunk-GOZO6LU2.js +0 -8
- package/dist/chunk-HCXIXV4E.js +0 -8
- package/dist/chunk-IYXNRNAF.js +0 -8
- package/dist/chunk-L7XIGRIT.js +0 -6
- package/dist/chunk-LCMXVMF4.js +0 -14
- package/dist/chunk-MNMOBH2O.js +0 -1
- package/dist/chunk-RK7MN5L5.js +0 -3
- package/dist/chunk-RPL4H6LE.js +0 -9
- package/dist/chunk-WBJ6KNUF.js +0 -1
- package/dist/chunk-WUAKIM2B.js +0 -7
- /package/dist/{chunk-2F5SLLBJ.js → chunk-MXK7A6ZM.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-
|
|
2
|
-
return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:B});const
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-5PP435FL.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-36VIGB6J.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-GDQJBQ5B.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:C}){const F=m().charts,W=c(),w=N??(e=>h(e,W)),B=C??F.nothingToCompare,L=p(),[R,A]=u(null),{highlighted:Q}=a(),z=x;if(k.length<3||0===z.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:B});const E=y/2,J=y/2,P=y/2-46,T=n(k.length),U=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...z.map(e=>e.values[t]??0).filter(Number.isFinite))),V=(e,t)=>{const r=Math.max(0,Math.min(1,t/U[e])),l=T.center(e)-T.step/2;return[E+P*r*Math.cos(l),J+P*r*Math.sin(l)]},Y=(e,t)=>null!==R?R!==e:null!==Q&&Q!==t,G=null!==R?z[R]:void 0;/* @__PURE__ */
|
|
3
3
|
return f("div",{className:`relative ${$??""}`,children:[
|
|
4
|
-
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":
|
|
5
|
-
/* @__PURE__ */d("title",{id:
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":L,onMouseLeave:()=>A(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:L,children:F.acrossMeasures(z.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=P*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:E,cy:J,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(E,J,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=V(t,U[t]);/* @__PURE__ */
|
|
6
6
|
return f("g",{children:[
|
|
7
|
-
/* @__PURE__ */d("line",{x1:
|
|
8
|
-
/* @__PURE__ */d("text",{x:
|
|
9
|
-
/* @__PURE__ */d(r,{id:
|
|
10
|
-
return f("g",{opacity:
|
|
11
|
-
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(
|
|
12
|
-
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:
|
|
7
|
+
/* @__PURE__ */d("line",{x1:E,y1:J,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:E+(P+18)*Math.cos(T.center(t)-T.step/2),y:J+(P+18)*Math.sin(T.center(t)-T.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
+
/* @__PURE__ */d(r,{id:L,reveal:!!j&&"center-out"}),z.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>V(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:Y(t,e.key)?.3:1,onMouseEnter:()=>A(t),mask:j?`url(#${l(L)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
+
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:G.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(R,3,G.color,G.tone),value:w(G.values[t]??0)}))})}),
|
|
12
|
+
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:z.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
13
|
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
14
|
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
-
/* @__PURE__ */d(e,{caption:
|
|
15
|
+
/* @__PURE__ */d(e,{caption:F.acrossMeasures(z.map(e=>e.label),k.length),head:[F.tableSeries,...k.map(e=>e.label)],rows:z.map(e=>[e.label,...k.map((t,r)=>w(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-CLTRQ7AQ.js";import{Tooltip as n}from"./chunk-
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-CLTRQ7AQ.js";import{Tooltip as n}from"./chunk-NJN5IKWO.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),f="button[data-icon-rail-button]:not([disabled])";function b(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[v,y]=i(null),w="none"===d?"none":g?v??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);y(e({buttons:r,orientation:n,...b(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==v&&F.current!==v&&(F.current=v,k.current?.(v))},[g,v]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(f)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
|
|
2
2
|
return c("div",{ref:p,role:"toolbar","aria-label":t,"aria-orientation":n,"data-orientation":n,onKeyDown:e=>{const t=p.current;if(!t)return;const r=[...t.querySelectorAll(f)],o=r.indexOf(e.target);if(o<0)return;const a="vertical"===n?"ArrowUp":"ArrowLeft",i="vertical"===n?"ArrowDown":"ArrowRight",l=e.key===i?(o+1)%r.length:e.key===a?(o-1+r.length)%r.length:"Home"===e.key?0:"End"===e.key?r.length-1:-1;if(!(l<0)){e.preventDefault();for(const e of r)e.tabIndex=e===r[l]?0:-1;r[l].focus()}},"data-labels":"none"===d?void 0:d,"data-labels-shown":"none"===d?void 0:w,className:`flex gap-1 ${"vertical"===n?"flex-col items-center":"flex-row items-center"} ${s}`.trim(),children:/* @__PURE__ */c(h.Provider,{value:{labels:d,shown:w},children:o})})}function p({label:e,icon:r,active:o,disabled:a,onClick:i,badge:l,tooltipSide:f="right",className:b=""}){const m=!0===o,{labels:p,shown:g}=s(h),v=void 0===l||!1===l||0===l?r:/* @__PURE__ */c(t,{count:"number"==typeof l?l:void 0,dot:!0===l,max:99,children:r}),y="none"!==p,w=y&&("all"===g||"chosen"===g&&m),x=/* @__PURE__ */c("button",{type:"button","data-icon-rail-button":"","aria-label":e,"aria-pressed":"boolean"==typeof o?o:void 0,disabled:a,onClick:a?void 0:i,className:[`relative inline-flex ${y?"beside"===p?"h-9 min-w-9 justify-center px-2":"min-h-9 min-w-9 flex-col justify-center px-1 py-1":"h-9 w-9 justify-center"} shrink-0 items-center rounded-lg transition-colors`,"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-40",m?"bg-accent-tint text-blue-700":"text-gray-600 not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest",b].filter(Boolean).join(" "),children:y?/* @__PURE__ */d(u,{children:[
|
|
3
3
|
/* @__PURE__ */c("span",{"data-icon-rail-glyph":"",className:"inline-flex shrink-0 items-center justify-center",children:v}),
|
|
4
4
|
/* @__PURE__ */c("span",{"data-icon-rail-word":"","aria-hidden":"true",className:["overflow-hidden whitespace-nowrap text-xs font-medium leading-none",w?"beside"===p?"ml-2":"mt-1":"max-h-0 max-w-0"].join(" "),children:e})]}):v});/* @__PURE__ */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-36VIGB6J.js";import{CartesianPlot as o}from"./chunk-QO5E33DH.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-GDQJBQ5B.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 v=e().charts,w=i(),A=d??(t=>Number.isInteger(t)?m(t,w):n(t,1,w)),L=x??(t=>m(t,w)),B=g??v.countAxis,M=k??v.distribution,N=h??r(c??[],s),Q=a(0,b,f),C=N.map(t=>A(t.from)),J=N.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:C,values:J,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:L,yAxisLabel:B,className:y,emptyLabel:j,ariaLabel:v.histogram(M,N.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${A(N[o].from)} – ${A(N[o].to)}`,rows:[{key:"count",label:v.observations,color:Q,value:L(N[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:N.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:Q,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ErrorPage as r}from"./chunk-ORIXCEKO.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-
|
|
1
|
+
import{ErrorPage as r}from"./chunk-ORIXCEKO.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EOVXFXVV.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
|
|
2
2
|
return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
|
|
3
3
|
/* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
|
|
4
4
|
/* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as n}from"./chunk-
|
|
1
|
+
import{Tooltip as n}from"./chunk-NJN5IKWO.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-GDQJBQ5B.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
|
|
2
2
|
return i(n,{content:f,describe:!1,className:`relative inline-flex shrink-0 ${u}`.trim(),children:/* @__PURE__ */o("span",{"data-item-count":"",className:`${a} ${l?"bg-blue-100 text-blue-700":"bg-[color:color-mix(in_srgb,var(--ink-faint)_14%,transparent)] text-gray-600"}`,children:[
|
|
3
3
|
/* @__PURE__ */i("span",{"aria-hidden":"true",children:t(s,h)}),
|
|
4
4
|
/* @__PURE__ */i("span",{className:"sr-only",children:f})]})})}export{s as ItemCount};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-NZISMTQE.js";import{Button_default as i}from"./chunk-EOVXFXVV.js";import{iconButtonClasses as n}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{Tooltip as a}from"./chunk-NJN5IKWO.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:N=!1,disabledReason:g,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:O,align:W="end",side:z="bottom",menuMinWidth:F,linkAs:I,block:L=!1,className:M=""},R){const V=N&&(null!=g&&""!==g&&!1!==g)&&!v,X=x&&null!=j&&""!==j&&!1!==j,$=o(),A=/* @__PURE__ */t(i,{ref:R,type:b,variant:f,size:p,loading:v,leftIcon:k,block:L,disabled:N&&!V,"aria-disabled":!!V||void 0,disabledReason:V?g:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),B=L?"relative flex min-w-0 flex-1":"relative inline-flex",D=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
+
return s("div",{className:[L?"flex w-full":"inline-flex","items-stretch",M].filter(Boolean).join(" "),children:[null==w||""===w||V?A:/* @__PURE__ */t(a,{content:w,className:B,children:A}),
|
|
3
|
+
/* @__PURE__ */t(a,{content:X?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":X?$:void 0,items:h,align:W,side:z,minWidth:F,linkAs:I,disabled:x&&!X,"aria-disabled":X,onOpenChange:y,footer:C,footerLabel:O,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:D,strokeWidth:2,"aria-hidden":"true"})})}),X&&/* @__PURE__ */t("span",{id:$,className:"sr-only",children:j})]})});export{c as SplitButton_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TH_ONE_LINE as r}from"./chunk-
|
|
1
|
+
import{TH_ONE_LINE as r}from"./chunk-WGLHB6WE.js";import{jsxs as e,jsx as c}from"react/jsx-runtime";function n({caption:n,head:t,rows:i}){/* @__PURE__ */
|
|
2
2
|
return e("table",{className:"sr-only",children:[
|
|
3
3
|
/* @__PURE__ */c("caption",{children:n}),
|
|
4
4
|
/* @__PURE__ */c("thead",{children:/* @__PURE__ */c("tr",{children:t.map(e=>/* @__PURE__ */c("th",{className:r,scope:"col",children:e},e))})}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-MNMOBH2O.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,M=0,z=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),M=Math.max(M,t.interactionId),k=M?(M-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"],z,{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],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;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,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-T3DN2QBM.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],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,D=/\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,W=/\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,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(D,"[url]").replace(V,"[id]").replace(W,"[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};
|