efficient-shell 10.1.0 → 10.2.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/README.md +1 -1
- package/dist/{Browser-2S5V2RRU.js → Browser-YHMFQIN5.js} +14 -14
- package/dist/Calculator-NSYIXONM.js +29 -0
- package/dist/CurrencyConverter-YQ2AZ7ZG.js +21 -0
- package/dist/Documents-CMCZA5PH.js +52 -0
- package/dist/Files-UW65YMFW.js +88 -0
- package/dist/Notepad-RSYZ7HZA.js +24 -0
- package/dist/{PdfViewer-WNKGFJD6.js → PdfViewer-Z4YKDHIH.js} +1 -1
- package/dist/{PomodoroTimer-TGUTV47T.js → PomodoroTimer-5KCWCL62.js} +12 -12
- package/dist/{Preview-76A4GKGI.js → Preview-PK4QI7SK.js} +41 -41
- package/dist/Sidebar-QCUDD4OU.js +44 -0
- package/dist/Spreadsheet-MQR4TQGV.js +37 -0
- package/dist/Stock-DMW2REHR.js +16 -0
- package/dist/{Weather-2EGADOTH.js → Weather-PN7XVCZY.js} +14 -14
- package/dist/{WorldClock-U5DIGLOY.js → WorldClock-JYLOJCUS.js} +9 -9
- package/dist/ai/index.js +59 -59
- 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/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.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/Meter.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/RankedBars.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/StatTile.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-2JG5JU4M.js +8 -0
- package/dist/{chunk-5VSP3TYU.js → chunk-2K2W6VIR.js} +1 -1
- package/dist/{chunk-QXRRAADR.js → chunk-2SY76NFO.js} +4 -4
- package/dist/{chunk-BMXMSAQE.js → chunk-2VTO64YC.js} +7 -7
- package/dist/{chunk-HL6JSDN3.js → chunk-34URULVW.js} +1 -1
- package/dist/{chunk-RZR3OAKV.js → chunk-35DG7Y4M.js} +1 -1
- package/dist/{chunk-MH6DI6YY.js → chunk-37U326EL.js} +12 -12
- package/dist/{chunk-YL6LLHJA.js → chunk-3CPB3WP2.js} +18 -18
- package/dist/{chunk-CKPVXDKX.js → chunk-3ELLBQPS.js} +3 -3
- package/dist/{chunk-A6RB4PIX.js → chunk-3NW5LD7D.js} +4 -4
- package/dist/{chunk-BNQRPLBW.js → chunk-3RORPK2J.js} +1 -1
- package/dist/{chunk-U5DMF2TX.js → chunk-4BYJQU37.js} +1 -1
- package/dist/chunk-4PAWQEXM.js +1 -0
- package/dist/{chunk-CUA6CREW.js → chunk-5S3YYN7M.js} +7 -7
- package/dist/{chunk-Q5YM65DZ.js → chunk-632N62BY.js} +8 -8
- package/dist/{chunk-LOYCPZUB.js → chunk-63L5ORRZ.js} +1 -1
- package/dist/{chunk-B7HW6XZD.js → chunk-67JCJ2MG.js} +1 -1
- package/dist/chunk-6OMCCEYA.js +1 -0
- package/dist/{chunk-4VDGVF5T.js → chunk-6PFZK6ED.js} +1 -1
- package/dist/{chunk-P6LB3I3D.js → chunk-6RX4PVBU.js} +1 -1
- package/dist/chunk-6XBWM453.js +6 -0
- package/dist/{chunk-ZG2HMC7S.js → chunk-7SMV6G4Z.js} +1 -1
- package/dist/{chunk-X6YT3I5F.js → chunk-7X3XNVES.js} +1 -1
- package/dist/{chunk-WUMHSI4U.js → chunk-7X5FABQS.js} +1 -1
- package/dist/{chunk-JZK3UDOT.js → chunk-7YOQS3C6.js} +1 -1
- package/dist/{chunk-TDLU6GF5.js → chunk-7Z4PTLDL.js} +4 -4
- package/dist/{chunk-2OJ3HGFY.js → chunk-A4HJDSRA.js} +6 -6
- package/dist/chunk-A5BV6NFA.js +7 -0
- package/dist/{chunk-42XMT5JN.js → chunk-AJO72CPB.js} +2 -2
- package/dist/chunk-AKJHVOSD.js +8 -0
- package/dist/{chunk-OQW42DOR.js → chunk-AKM6JBMD.js} +1 -1
- package/dist/chunk-AM2F5ZXH.js +2 -0
- package/dist/{chunk-4WZRNPIG.js → chunk-AUWTGM65.js} +1 -1
- package/dist/chunk-B73AXE6P.js +1 -0
- package/dist/{chunk-V4RYE6KA.js → chunk-C2P2Z6HU.js} +11 -11
- package/dist/{chunk-WKSNTMEJ.js → chunk-CAVADOJK.js} +1 -1
- package/dist/chunk-CBEKJTXU.js +9 -0
- package/dist/{chunk-Q4LBBFLO.js → chunk-CGQAKGPT.js} +6 -6
- package/dist/{chunk-AEQFFD5I.js → chunk-CHBRMAJV.js} +1 -1
- package/dist/{chunk-2OE5VVBE.js → chunk-CPZ42W2B.js} +1 -1
- package/dist/{chunk-BDAKGS7O.js → chunk-D7F442OZ.js} +1 -1
- package/dist/{chunk-BZPPDYEE.js → chunk-DDCMMOB4.js} +1 -1
- package/dist/{chunk-5VTRKWKO.js → chunk-DKGZPVLL.js} +1 -1
- package/dist/{chunk-XABYSSXW.js → chunk-DLNIRZNR.js} +1 -1
- package/dist/{chunk-RBIGSJ2J.js → chunk-DRDYZ633.js} +2 -2
- package/dist/{chunk-FS2KWQJW.js → chunk-E5MVH3SH.js} +10 -10
- package/dist/chunk-EU3JZGV2.js +14 -0
- package/dist/{chunk-GGIFS34Z.js → chunk-EYZZW6SO.js} +5 -5
- package/dist/{chunk-43T5JGFB.js → chunk-EZEYKCI6.js} +1 -1
- package/dist/{chunk-DTJRIWFR.js → chunk-F27JJHNJ.js} +1 -1
- package/dist/{chunk-7ILNRFEV.js → chunk-FFIQPFUR.js} +1 -1
- package/dist/{chunk-TLRCTNUF.js → chunk-G4GVLK44.js} +1 -1
- package/dist/chunk-G5NQOV7L.js +6 -0
- package/dist/{chunk-JB3WKDD7.js → chunk-GGK27H67.js} +1 -1
- package/dist/{chunk-2YLG32JY.js → chunk-GISDIVFK.js} +1 -1
- package/dist/{chunk-FFASZGNZ.js → chunk-GNHLVGG5.js} +3 -3
- package/dist/{chunk-6FPDOEOX.js → chunk-GSKLHUQ6.js} +1 -1
- package/dist/{chunk-GY67Y5SN.js → chunk-H4HB5OET.js} +1 -1
- package/dist/{chunk-6L2UAAGT.js → chunk-HNBGLF4B.js} +1 -1
- package/dist/{chunk-YJSX6JAC.js → chunk-I2XGPTCN.js} +1 -1
- package/dist/{chunk-NHH2MXFU.js → chunk-I4VIEGCX.js} +1 -1
- package/dist/chunk-IKNG7EFQ.js +12 -0
- package/dist/{chunk-RQNZ2PVW.js → chunk-INNIWRVU.js} +4 -4
- package/dist/{chunk-J53OQCKC.js → chunk-IOJNSX4N.js} +7 -7
- package/dist/{chunk-JKZJVQIB.js → chunk-IPFWXM2Y.js} +6 -6
- package/dist/{chunk-K7PCBUDC.js → chunk-JRZ7PPVJ.js} +6 -6
- package/dist/chunk-JSGQWVYH.js +7 -0
- package/dist/{chunk-ZCV377AG.js → chunk-KEPJWZJZ.js} +3 -3
- package/dist/{chunk-JJP54OT4.js → chunk-KJ4CBZEQ.js} +1 -1
- package/dist/{chunk-XHMIJ7S3.js → chunk-KP2THXEI.js} +6 -6
- package/dist/{chunk-GKK7DR2H.js → chunk-LCJRTJXT.js} +9 -9
- package/dist/{chunk-Q3MNSM7W.js → chunk-LDE5IV2M.js} +4 -4
- package/dist/{chunk-MZ26SYFY.js → chunk-LEDUD23S.js} +1 -1
- package/dist/{chunk-7TONF2PM.js → chunk-LOFYSLC7.js} +9 -9
- package/dist/{chunk-AGLBDT7X.js → chunk-LTKXAHS3.js} +8 -8
- package/dist/{chunk-BMQCUHSD.js → chunk-M22B3Y5Y.js} +1 -1
- package/dist/{chunk-CLQFP42I.js → chunk-MBXLROCD.js} +1 -1
- package/dist/{chunk-KCV7BFKJ.js → chunk-MCDM2G4W.js} +1 -1
- package/dist/{chunk-R4Q5653D.js → chunk-MNXRAZJV.js} +20 -20
- package/dist/{chunk-VC42SDAC.js → chunk-MQU3PZUS.js} +1 -1
- package/dist/{chunk-TYK7VN73.js → chunk-MTX5LMJD.js} +17 -17
- package/dist/{chunk-OZAAIE4E.js → chunk-MVZRZTQP.js} +1 -1
- package/dist/{chunk-NNOA7AVG.js → chunk-MXH3UPCH.js} +5 -5
- package/dist/{chunk-ZLHPCPXS.js → chunk-N4DI5F74.js} +18 -18
- package/dist/{chunk-EIUCHQI2.js → chunk-N67QX3WW.js} +2 -2
- package/dist/{chunk-XQQNA246.js → chunk-O42AN43Q.js} +1 -1
- package/dist/{chunk-MLKY5ESV.js → chunk-O45WQK57.js} +1 -1
- package/dist/{chunk-RSIGTZMU.js → chunk-O4V5PEA3.js} +1 -1
- package/dist/{chunk-M554OMPA.js → chunk-O6JJIR4H.js} +1 -1
- package/dist/{chunk-APXQMZSV.js → chunk-O7DW2BKY.js} +26 -26
- package/dist/{chunk-UB5TLWZN.js → chunk-ON67HF5K.js} +8 -8
- package/dist/{chunk-KZQAGXME.js → chunk-ORIGX2H5.js} +4 -4
- package/dist/{chunk-JRBQLRAZ.js → chunk-OZBM2XFQ.js} +1 -1
- package/dist/{chunk-ZRZ5LOW3.js → chunk-PBWUEBJ5.js} +1 -1
- package/dist/chunk-PJQGYKN6.js +11 -0
- package/dist/chunk-PN65IIYN.js +8 -0
- package/dist/chunk-PUF75SMJ.js +1 -0
- package/dist/{chunk-5EX6XXUX.js → chunk-PXDDCD5X.js} +1 -1
- package/dist/{chunk-RKFEJ5CX.js → chunk-PXQG5EIH.js} +1 -1
- package/dist/{chunk-5VDT4762.js → chunk-QEKOEIOQ.js} +2 -2
- package/dist/{chunk-GMRZX2ET.js → chunk-QHOBK35Y.js} +1 -1
- package/dist/{chunk-UDKOJB2B.js → chunk-QL4757YL.js} +2 -2
- package/dist/{chunk-7VCAMNCH.js → chunk-QP4UPCXQ.js} +1 -1
- package/dist/chunk-QQPIQCT7.js +11 -0
- package/dist/{chunk-CL7SBEBQ.js → chunk-QYRMFGES.js} +1 -1
- package/dist/{chunk-3V6ZERBS.js → chunk-RBQWIHYD.js} +1 -1
- package/dist/chunk-RCPFUDPS.js +4 -0
- package/dist/chunk-RP3GUVAI.js +100 -0
- package/dist/chunk-RPYFOQM2.js +6 -0
- package/dist/chunk-SDI2UGAG.js +1 -0
- package/dist/{chunk-53KQSCMG.js → chunk-SDQIXE5M.js} +9 -9
- package/dist/{chunk-NW7Z3G7P.js → chunk-SF654IHN.js} +13 -13
- package/dist/{chunk-LPDI5NL6.js → chunk-SO6X4CII.js} +2 -2
- package/dist/{chunk-VP63OOO4.js → chunk-SOECV4V5.js} +3 -3
- package/dist/chunk-SWN3LSQX.js +12 -0
- package/dist/{chunk-TBPHW42V.js → chunk-TKJBZIHT.js} +1 -1
- package/dist/chunk-TMNAHOJ7.js +9 -0
- package/dist/{chunk-CBGKLHPB.js → chunk-TOVKWNI2.js} +6 -6
- package/dist/{chunk-PF5CKD4C.js → chunk-TVH7IZQ4.js} +2 -2
- package/dist/{chunk-LNARMEEZ.js → chunk-TXDA7TTP.js} +1 -1
- package/dist/{chunk-SKY2NBTQ.js → chunk-UBOP6HFI.js} +5 -5
- package/dist/{chunk-J7CIBRDS.js → chunk-UDRMZ22J.js} +1 -1
- package/dist/{chunk-IWJRSC7M.js → chunk-ULAGXDOL.js} +1 -1
- package/dist/{chunk-O6ABVKHU.js → chunk-ULXCDM7Y.js} +10 -10
- package/dist/{chunk-MVQMAIZM.js → chunk-UPQW4GCT.js} +1 -1
- package/dist/{chunk-E3RHEEA6.js → chunk-URERZUX5.js} +1 -1
- package/dist/{chunk-RPMWF42S.js → chunk-UTWJKSET.js} +5 -5
- package/dist/{chunk-SWO4VPOB.js → chunk-UWIZX3RK.js} +1 -1
- package/dist/{chunk-EQN65XOO.js → chunk-UYRITNQW.js} +4 -4
- package/dist/{chunk-LFVUDFVU.js → chunk-VJJMWJPZ.js} +1 -1
- package/dist/{chunk-QSW3YHPK.js → chunk-VKKK4WLS.js} +4 -4
- package/dist/{chunk-JJYAYMY7.js → chunk-VTFZ6W2D.js} +2 -2
- package/dist/chunk-W35N7SL3.js +8 -0
- package/dist/{chunk-IWEL2ZCV.js → chunk-W5CJD54C.js} +1 -1
- package/dist/{chunk-45XXERGA.js → chunk-W6SC3ZNO.js} +2 -2
- package/dist/{chunk-ZF545DXX.js → chunk-W6URVLQF.js} +14 -14
- package/dist/{chunk-R5EJJ6HC.js → chunk-WINNA7LS.js} +1 -1
- package/dist/chunk-WMEYNKXZ.js +22 -0
- package/dist/{chunk-DKQWFQAV.js → chunk-WN5HHHLO.js} +1 -1
- package/dist/chunk-WTTSB4SV.js +3 -0
- package/dist/{chunk-XZBQ3XXD.js → chunk-XDQGIW4X.js} +1 -1
- package/dist/{chunk-4UX6ET7G.js → chunk-XKDBYJHF.js} +1 -1
- package/dist/chunk-XLYCWGTK.js +4 -0
- package/dist/{chunk-HI6IE5HI.js → chunk-XO7URRTM.js} +1 -1
- package/dist/chunk-Y3R267FV.js +15 -0
- package/dist/chunk-YATWJMLM.js +29 -0
- package/dist/{chunk-Y23TGQFN.js → chunk-YCOYCPAH.js} +3 -3
- package/dist/chunk-YGSU5KCP.js +9 -0
- package/dist/{chunk-VMDBVXDJ.js → chunk-YJLLLO5R.js} +1 -1
- package/dist/chunk-YMYY5G6V.js +1 -0
- package/dist/{chunk-BDFZNLFQ.js → chunk-YWDEFPSW.js} +3 -3
- package/dist/{chunk-FMC2XNSP.js → chunk-ZNAVCHBV.js} +6 -6
- package/dist/{chunk-B7AHMB3U.js → chunk-ZURB2DCM.js} +1 -1
- package/dist/{chunk-NQJKANUP.js → chunk-ZUS7FXKE.js} +13 -13
- package/dist/{chunk-3V74SUZO.js → chunk-ZZOBG6GP.js} +17 -17
- package/dist/chunk-ZZVE64OI.js +2 -0
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- 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/Calendar.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/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.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/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/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- 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/index.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +152 -152
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +8 -8
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.d.ts +15 -2
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.d.ts +5 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/FloatingBar.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/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.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/Statistic.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.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/shell/discardGuard.d.ts +43 -0
- package/dist/shell/discardGuard.js +2 -0
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +6 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.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/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +5 -0
- package/dist/utils/glass.d.ts +4 -2
- package/dist/utils/glass.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-N2NLSDTW.js +0 -29
- package/dist/CurrencyConverter-HW5HW3RH.js +0 -21
- package/dist/Documents-JTURYN4D.js +0 -52
- package/dist/Files-GP2LAGME.js +0 -88
- package/dist/Notepad-OV66ANUO.js +0 -24
- package/dist/Sidebar-4OI4LP6G.js +0 -44
- package/dist/Spreadsheet-FU5QIZA3.js +0 -37
- package/dist/Stock-FEVMKWMS.js +0 -16
- package/dist/chunk-2SLQD57V.js +0 -6
- package/dist/chunk-44PGFMSX.js +0 -8
- package/dist/chunk-4AJRHTTB.js +0 -1
- package/dist/chunk-5GUBNCTP.js +0 -1
- package/dist/chunk-6B4F5DWV.js +0 -4
- package/dist/chunk-A3VJ4PRU.js +0 -11
- package/dist/chunk-ACVKU6YW.js +0 -7
- package/dist/chunk-AG2OLB3E.js +0 -15
- package/dist/chunk-AKVB5TQD.js +0 -29
- package/dist/chunk-ANTH2FBS.js +0 -100
- package/dist/chunk-AXL7VTNM.js +0 -11
- package/dist/chunk-BCDG4N6L.js +0 -6
- package/dist/chunk-DY2M6BIG.js +0 -12
- package/dist/chunk-F7A6K3D5.js +0 -9
- package/dist/chunk-GZYTCHPX.js +0 -8
- package/dist/chunk-IGEFUHYE.js +0 -12
- package/dist/chunk-K64JRGNE.js +0 -6
- package/dist/chunk-KE5U4KKG.js +0 -4
- package/dist/chunk-N6VP75F5.js +0 -3
- package/dist/chunk-OPB3I4JH.js +0 -8
- package/dist/chunk-PYQ6DD3F.js +0 -1
- package/dist/chunk-QASKQDUR.js +0 -22
- package/dist/chunk-QMUAY24U.js +0 -8
- package/dist/chunk-RUTUVS4H.js +0 -1
- package/dist/chunk-SKETTGCJ.js +0 -2
- package/dist/chunk-UP442DPT.js +0 -9
- package/dist/chunk-VO3ZB7C6.js +0 -14
- package/dist/chunk-W244OMOU.js +0 -7
- package/dist/chunk-X2PZMXDP.js +0 -1
- package/dist/chunk-YVTKTWZX.js +0 -9
- package/dist/chunk-ZN2BFSQR.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-4PAWQEXM.js";import{formatPercent as n}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function i(l,e){const t=s(l);if(null==t)return"no-reading";const n=s(e);return null==n||0===n?"no-budget":t>n?"over":"within"}var r=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:f,formatDuration:h,formatValue:x,pace:b,emptyLabel:g,noBudgetLabel:p,size:v="sm",ariaLabel:N,className:y=""}){const w=l().meter,M=e(),$=x??h??(l=>function(l,e=t.meter){const n=Math.round(l),a=Math.floor(n/3600),u=Math.floor(n%3600/60),s=n%60;return a>0?e.hoursMinutes(a,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=g??w.noReading,j=p??w.noBudget,B=s(o),L=s(d),Q=null!=L&&L>0?L:null,R=s(c)??0,z="over"===i(o,d),A=null!=Q?Q+R:null,C=null!=Q&&null!=A?r(Q/A*100):null,D=z&&R>0,E=null==A||null==B?0:z?D?C??0:0:r(B/A*100),F=D?C??0:0,H=z?D&&null!=A&&null!=B?r(B/A*100):100:0,O=Math.max(0,H-F),P=s(b),S=null!=P&&null!=A?r(P/A*100):null,V=null!=B&&null!=Q?B/Q*100:null,W=null!=V?n(Math.round(V),0,M):null!=B?$(B):"—",X=f??(null==B?k:null==Q?j:`${$(B)} / ${$(Q)}`),q="md"===v?"h-2":"h-1.5",G=z?"text-red-600":null!=B?"text-gray-900":"text-gray-400",I=null!=B&&null!=Q&&null!=A?/* @__PURE__ */a("div",{role:"meter","aria-label":N??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":A,"aria-valuenow":Math.min(A,B),"aria-valuetext":w.ofBudget(W),className:`relative mt-2 ${q} overflow-hidden rounded-full bg-gray-200`,children:[(!z||D)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${E}%`}}),O>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${F}%`,width:`${O}%`}}),R>0&&null!=C&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${C}%`}}),null!=S&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${S}%`}})]}):null;/* @__PURE__ */
|
|
2
2
|
return a("div","md"===v?{className:y,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
|
|
3
3
|
/* @__PURE__ */a("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
4
|
-
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${G}`,children:
|
|
5
|
-
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:
|
|
4
|
+
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${G}`,children:W}),
|
|
5
|
+
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:X})]}),I]}:{className:y,children:[
|
|
6
6
|
/* @__PURE__ */a("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
|
|
7
|
-
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${G}`,children:
|
|
8
|
-
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:
|
|
7
|
+
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${G}`,children:W}),
|
|
8
|
+
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:X})]}),I]})}export{m as BudgetBar,i as budgetState};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-
|
|
1
|
+
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-I4VIEGCX.js";import{useShellStrings as n}from"./chunk-4PAWQEXM.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
|
|
2
2
|
return i("div",{className:`grid grid-cols-3 gap-3 ${h}`.trim(),children:[o.map(a=>/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary",onClick:()=>u(r(l,a)),children:a},a)),
|
|
3
3
|
/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary","aria-label":p.backspace,onClick:()=>u(a(l)),children:"⌫"}),t&&/* @__PURE__ */c(e,{size:"touch-xl",variant:"primary",className:"col-span-3",disabled:d,onClick:t,children:m??p.enter})]})}export{l as NumericKeypad};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{GROUP_COLORS as e}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e}from"./chunk-TXDA7TTP.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-6XBWM453.js";import{useShellStrings as l}from"./chunk-4PAWQEXM.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
|
|
2
2
|
return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
|
|
3
3
|
return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
|
|
4
|
-
/* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading
|
|
5
|
-
return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null
|
|
6
|
-
/* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof y?
|
|
4
|
+
/* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
|
|
5
|
+
return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null==$&&/* @__PURE__ */t(r,{ink:""}),
|
|
6
|
+
/* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof y?N(y):/* @__PURE__ */i(a,{children:[y,N("")&&` ${N("")}`]})}),d&&/* @__PURE__ */t(o,{label:k,glyph:"×",onClick:d})]})}export{c as TransferProgress};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-PYQ6DD3F.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},F=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{F(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},D=/[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,K=/\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,Y=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function X(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=Y.exec(n.trim()),i=e&&X(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;F(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(D,"[redacted]").replace(J,"[redacted]").replace(K,"[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};
|
|
1
|
+
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-6OMCCEYA.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 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,Y=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function X(e,t,n){const i=e.replace(Y,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&X(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(Y,"").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,8 +1,8 @@
|
|
|
1
|
-
import{parseFocal as e,formatFocal as t,nudgeFocal as n,focalFromRect as a}from"./chunk-25RR3GQW.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-ink-faint",children:x??N.noImage})});const
|
|
1
|
+
import{parseFocal as e,formatFocal as t,nudgeFocal as n,focalFromRect as a}from"./chunk-25RR3GQW.js";import{useShellStrings as r}from"./chunk-4PAWQEXM.js";import{useId as o,useRef as s}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c={background:"color-mix(in srgb, var(--status-on-solid) 45%, transparent)"},u={borderColor:"var(--status-on-solid)",boxShadow:"0 0 0 1px var(--rosh-media-scrim-button), 0 1px 4px var(--rosh-media-scrim-button)"};function d({value:d,onChange:m,label:f,image:p,hint:h,emptyText:x,actions:b,disabled:g=!1,id:v,className:y=""}){const N=r().imageFocus,w=o(),k=s(null),P=s(!1),{x:j,y:C}=e(d),K=t(j,C),$=e=>{e!==d&&m(e)},D=(e,n)=>{const r=k.current?.getBoundingClientRect();if(!r)return;const o=a(r,e,n);$(t(o.x,o.y))},R=()=>{P.current=!1};if(!p)/* @__PURE__ */
|
|
2
|
+
return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-ink-faint",children:x??N.noImage})});const T=void 0===h,X=null!==h;/* @__PURE__ */
|
|
3
3
|
return l("div",{"data-image-focus":"",className:`flex flex-col gap-2 ${y}`.trim(),children:[
|
|
4
|
-
/* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:g,"aria-label":N.picture(f,K),"aria-describedby":w,onKeyDown:e=>{if(g||e.altKey||e.ctrlKey||e.metaKey)return;const t=n(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{g||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),P.current=!0,D(e.clientX,e.clientY))},onPointerMove:e=>{P.current&&!g&&D(e.clientX,e.clientY)},onPointerUp:
|
|
4
|
+
/* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:g,"aria-label":N.picture(f,K),"aria-describedby":w,onKeyDown:e=>{if(g||e.altKey||e.ctrlKey||e.metaKey)return;const t=n(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{g||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),P.current=!0,D(e.clientX,e.clientY))},onPointerMove:e=>{P.current&&!g&&D(e.clientX,e.clientY)},onPointerUp:R,onPointerCancel:R,onLostPointerCapture:R,className:["flex min-h-36 w-full touch-none items-center justify-center overflow-hidden rounded-md border border-line bg-surface-sunken p-0","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",g?"cursor-not-allowed opacity-60":"cursor-crosshair"].join(" "),children:/* @__PURE__ */l("span",{ref:k,"data-image-focus-pane":"",className:"relative block max-w-full",children:[
|
|
5
5
|
/* @__PURE__ */i("img",{src:p,alt:"",draggable:!1,className:"block h-auto max-h-36 w-auto max-w-full select-none object-contain"}),
|
|
6
6
|
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${C}%`,...c}}),
|
|
7
7
|
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${j}%`,...c}}),
|
|
8
|
-
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${j}%`,top:`${C}%`,...u}})]})}),
|
|
8
|
+
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${j}%`,top:`${C}%`,...u}})]})}),X||b?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",X?{id:T?w:void 0,className:"min-w-0 flex-1 text-xs text-ink-faint",children:T?N.hint:h}:{className:"min-w-0 flex-1"}),b]}):null,!T&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-
|
|
2
|
-
return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-G4GVLK44.js";import{CartesianPlot as l}from"./chunk-2JG5JU4M.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-4PAWQEXM.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),j=Math.min(...v),L=Math.max(...v),A=.08*(L-j)||1;/* @__PURE__ */
|
|
2
|
+
return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-A,max:L+A,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:[
|
|
5
5
|
/* @__PURE__ */c("line",{x1:p,y1:l(a.high),x2:p,y2:l(a.low),stroke:h,strokeWidth:1.5}),"candle"===m?/* @__PURE__ */c("rect",{x:p-d/2,y:b,width:d,height:y,rx:1,fill:r?h:"transparent",fillOpacity:r?.85:1,stroke:h,strokeWidth:1.5}):/* @__PURE__ */n(s,{children:[
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-G4GVLK44.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{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-4PAWQEXM.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:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:L=[4,22],className:S,emptyLabel:U}){const D=m().charts,P=h(),W=z??(e=>f(e,P)),E=$??(e=>f(e,P)),V=U??D.noObservations,C=u(null),O=n(C),Q=v??O,X=p(),[B,F]=d(null);x(()=>{if(null!==B)return c(e=>"Escape"===e.key&&(F(null),!0))},[B]);const G=(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),K=j||w?I.map(e=>({...e,points:e.points.filter(e=>G(e.x,j)&&G(e.y,w))})).filter(e=>e.points.length>0):I,T=I.reduce((e,t)=>e+t.points.length,0)-K.reduce((e,t)=>e+t.points.length,0);if(0===K.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:S,ref:C,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const Z=K.flatMap(e=>e.points),H=Z.some(e=>null!=e.size),J=14,Y=20,q=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(Z.map(e=>e.y),w,R,{from:k-q,to:J}),ie=t(te.ticks(5).map(E),_),le=Math.max(ie+1,Q-Y),re=ee(Z.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...Z.map(e=>e.size??1))],{from:L[0],to:L[1]}),ne=B?K[B.s]:void 0,ae=B&&ne?ne.points[B.i]:void 0,se=K.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${S??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${Q} ${k}`,role:"img","aria-label":D.scatter(K.map(e=>e.label),A??D.yAxis,M??D.xAxis)+(T>0?`. ${D.outsideRange(T)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>F(null),onBlur:()=>F(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=B?se.findIndex(e=>e.s===B.s&&e.i===B.i):0;F(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:X,children:/* @__PURE__ */y("rect",{x:ie-L[1],y:J-L[1],width:le-ie+2*L[1],height:k-q-J+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:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:E(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:W(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${X})`,children:K.map((e,t)=>{const i=s(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:H?oe(l.size??0):L[0]+1,fill:i,fillOpacity:B&&B.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>F({s:t,i:r})},`${e.key}-${r}`))})})]}),B&&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:s(ne.slot,3,ne.color,ne.tone),value:W(ae.x)},{key:"y",label:A??D.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:E(ae.y)},...null!=ae.size?[{key:"size",label:D.size,color:a.muted,value:f(ae.size,P)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ChartSkeleton as e}from"./chunk-
|
|
1
|
+
import{ChartSkeleton as e}from"./chunk-M22B3Y5Y.js";import{ChartHighlightProvider as r,useHighlight as a}from"./chunk-CNYAHYE6.js";import{CHART_INK as t,resolveSeriesColor as s}from"./chunk-TZFACUMR.js";import{useShellStrings as l}from"./chunk-4PAWQEXM.js";import{jsx as n,jsxs as o,Fragment as c}from"react/jsx-runtime";function i({shape:e,colour:r}){const a="shrink-0";switch(e){case"circle":/* @__PURE__ */
|
|
2
2
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-full`,style:{backgroundColor:r}});case"circle-outline":/* @__PURE__ */
|
|
3
3
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-full border-2`,style:{borderColor:r}});case"rounded-square-outline":/* @__PURE__ */
|
|
4
4
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-sm border-2`,style:{borderColor:r}});case"square":/* @__PURE__ */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-
|
|
2
|
-
return p(n,{portal:!0,minWidth:x,style:
|
|
1
|
+
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-DDCMMOB4.js";import{PopupMenu as n,MenuSemanticsContext as r}from"./chunk-37U326EL.js";import{leavesContextMenuAlone as o}from"./chunk-5QFPTDQF.js";import{placeAtPoint as i,popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useRef as s,useId as a,useState as d,useEffect as m,useCallback as f}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";function h(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function w({at:o,onClose:w,items:y,linkAs:g,children:k,owner:E,"aria-label":b,minWidth:x=180,className:D="",autoFocus:H=!0}){const L=s(null),j=a(),[A,S]=d(null),U=s(w);U.current=w,c(()=>{const e=L.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},n=i({point:o,menu:t,bounds:l(E??null)});S(e=>e&&e.left===n.left&&e.top===n.top&&e.maxHeight===n.maxHeight?e:{left:n.left,top:n.top,maxHeight:n.maxHeight,scroll:t.height>n.maxHeight})},[o.x,o.y,E]);const C=s(null),T=s(!1);m(()=>(C.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!L.current?.contains(e)||C.current?.focus?.({preventScroll:!0})}),[]),m(()=>{A&&!T.current&&H&&(T.current=!0,h(L.current)[0]?.focus({preventScroll:!0}))},[A,H]),m(()=>{if(H)return;const e=e=>{if(L.current?.contains(document.activeElement))return;const t=h(L.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[H]),m(()=>u(e=>"Escape"===e.key&&(U.current(),!0),()=>L.current),[]),m(()=>{const e=()=>U.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const W=f(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void U.current();const t=h(L.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),B=A?{left:A.left,top:A.top,maxHeight:A.maxHeight,...A.scroll?{overflowY:"auto"}:{}}:{left:o.x,top:o.y,visibility:"hidden"};/* @__PURE__ */
|
|
2
|
+
return p(n,{portal:!0,minWidth:x,style:B,onClose:w,className:D,children:/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */v("div",{ref:L,id:j,role:"menu","aria-label":b,"aria-describedby":y?t(y,j):void 0,"data-context-menu":"",onKeyDown:W,children:[y&&e(y,{menuId:j,choose:e=>{e.disabled||(U.current(),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>U.current(),linkAs:g}),k]})})})}function y(){const[e,t]=d(null),n=f(()=>t(null),[]),r=f((e,n)=>{const r="nativeEvent"in e?e.nativeEvent:e;if(o(r))return!1;e.preventDefault();const i=e.target instanceof Element?e.target:null;let{clientX:l,clientY:c}=e;if(0===l&&0===c&&i){const e=i.getBoundingClientRect();l=e.left,c=e.bottom}return t({x:l,y:c,data:n,owner:i}),!0},[]),i=f(e=>{r(e,void 0)},[r]);return{open:r,onContextMenu:i,close:n,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:n}}}export{w as ContextMenu,y as useContextMenu};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-
|
|
1
|
+
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-ULAGXDOL.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-MVZRZTQP.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-4PAWQEXM.js";import{useState as i,useRef as a}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
|
|
2
2
|
return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
|
|
3
3
|
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
|
|
4
|
-
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered
|
|
5
|
-
return h("th",{scope:"col",...
|
|
4
|
+
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:$=!1,size:S="md",minWidth:z,rowClassName:H,onRow:T,rowHref:A,onRowPress:I,linkAs:L,emptyText:P,selection:D,footer:E,virtualized:O,stackOnNarrow:R=!1,stackBelow:F,className:W=""}){const Z=s(),K=P??Z.table.empty,G=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Q=R&&!O,V=Q?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),X=e=>Q?{role:e}:{},J=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[U,q]=i(0),Y=O?.overscan??6,_=O?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/O.rowHeight)-Y);q(e=>e===t?e:t)}:void 0,ee=O?Math.ceil(O.height/O.rowHeight)+2*Y:v.length,te=O?Math.min(U,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=O?te*O.rowHeight:0,ne=O?(v.length-re)*O.rowHeight:0,le=a(null),[se,ie]=i(0);l(()=>{if(!O)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=V.flatMap(e=>m(e)?e.columns:[e]),he=V.some(m),ue=/* @__PURE__ */new Map;if(Q)for(const e of V)if(m(e))for(const t of e.columns)ue.set(t,J(e.title,e.label));const me=e=>{const t=J(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(D?.selected??[]),ge=D?v.map((e,t)=>G(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=D?36:0,we=de.length+(D?1:0),xe=de.some(e=>"left"===e.fixed),ve=Q&&!D&&de.some(e=>e.cardCorner),ke=L??"a",Ne=`${p[S]} ${"sm"===S?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,r,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
|
|
5
|
+
return h("th",{scope:"col",...X("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Be[t]??0)+be}:{},...O?{top:l}:{}},className:[Ne,i,o,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs",a?O?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":O?"sticky z-10 bg-gray-50":"",Q&&d?"rosh-dt-sort":"",Q?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":Q?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
|
|
6
6
|
/* @__PURE__ */h(n,{children:e.title}),
|
|
7
|
-
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(n,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t})
|
|
8
|
-
/* @__PURE__ */c("div",{onScroll:_,style:
|
|
7
|
+
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(n,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),$e=/* @__PURE__ */c(d,{children:[
|
|
8
|
+
/* @__PURE__ */c("div",{onScroll:_,style:O?{maxHeight:O.height}:void 0,className:`relative overflow-x-auto ${O?"overflow-y-auto":""} ${$?"rounded-lg border border-gray-200":""}${Q?" rosh-dt-scroll":""}`.trim(),children:[B&&
|
|
9
9
|
/* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
|
|
10
10
|
/* @__PURE__ */h(r,{className:"h-6 w-6"}),
|
|
11
11
|
/* @__PURE__ */h("span",{className:"sr-only",children:Z.table.loading})]}),
|
|
12
|
-
/* @__PURE__ */c("table",{...
|
|
13
|
-
/* @__PURE__ */c("thead",{...
|
|
14
|
-
/* @__PURE__ */c("tr",{ref:le,...
|
|
15
|
-
/* @__PURE__ */h("tbody",{...
|
|
16
|
-
return c("tr",{...u(n),...
|
|
17
|
-
return h("td",{...
|
|
18
|
-
return h("td",{...
|
|
19
|
-
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},
|
|
20
|
-
return h("div",
|
|
12
|
+
/* @__PURE__ */c("table",{...X("table"),className:(Q?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
|
|
13
|
+
/* @__PURE__ */c("thead",{...X("rowgroup"),className:Q?"rosh-dt-head":void 0,children:[
|
|
14
|
+
/* @__PURE__ */c("tr",{ref:le,...X("row"),className:"border-b border-gray-200 bg-gray-50",children:[D&&/* @__PURE__ */h("th",{scope:"col",...X("columnheader"),rowSpan:he?2:void 0,style:{width:36,...O?{top:0}:{}},className:[Ne,o,xe||O?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":Z.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!D)return;const e=new Set(ge);D.onChange(pe?D.selected.filter(t=>!e.has(t)):[...D.selected,...ge.filter(e=>!fe.has(e))])}})}),V.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...X("columnheader"),colSpan:e.columns.length,style:O?{top:0}:void 0,className:[Ne,"text-center",o,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs","border-b border-gray-200",O?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(n,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...X("row"),className:"border-b border-gray-200 bg-gray-50",children:V.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
|
|
15
|
+
/* @__PURE__ */h("tbody",{...X("rowgroup"),className:Q?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=T?.(t,o),l=!!n?.current,s=A?.(t,o),i=void 0===s&&I?()=>I(t,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:i,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(a&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
|
|
16
|
+
return c("tr",{...u(n),...X("row"),style:O?{height:O.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Q?D?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Q&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[D&&(()=>{const r=G(t,o);/* @__PURE__ */
|
|
17
|
+
return h("td",{...X("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":Z.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{D&&D.onChange(fe.has(e)?D.selected.filter(t=>t!==e):[...D.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Q&&!n&&"wide"!==e.only;/* @__PURE__ */
|
|
18
|
+
return h("td",{...X("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",Q?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Q?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Q?
|
|
19
|
+
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},G(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...X("row"),className:Q?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...X("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:K})})})]}),E]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Q?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
|
|
20
|
+
return h("div",Q?void 0!==F&&F>0&&40!==F?{className:`rosh-dt-at ${W}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/F*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:F/40*100+"%"},children:$e})})}:{className:`rosh-dt-stack ${W}`.trim(),children:$e}:{className:W,children:$e})}export{x as DataTable};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tabs as e}from"./chunk-
|
|
1
|
+
import{Tabs as e}from"./chunk-3NW5LD7D.js";import{Card as a}from"./chunk-TOVKWNI2.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-TXDA7TTP.js";import{Button_default as l}from"./chunk-I4VIEGCX.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
|
|
2
2
|
return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{ChartBrush as t}from"./chunk-INNIWRVU.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-M22B3Y5Y.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{ChartTooltip as p}from"./chunk-G4GVLK44.js";import{useDragZoom as g,DragBand as y,ChartZoomSummary as k,tooltipBesideBand as x}from"./chunk-QP4UPCXQ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{usePlotWidth as V}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as z,CHART_INK as A,STATUS_VARS as W}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as L}from"./chunk-TWVUQUUD.js";import{useShellStrings as R,useShellLocale as C}from"./chunk-4PAWQEXM.js";import{formatPercent as E,formatPlain as S}from"./chunk-C3QOHMR6.js";import{useRef as U,useState as D,useId as P,useEffect as I}from"react";import{jsx as T,jsxs as Q}from"react/jsx-runtime";var Y=12,B=16,F=26,O=52,G=t=>"number"==typeof t&&Number.isFinite(t);function K({series:K,labels:X,height:H=200,stacked:Z=!1,stackMode:J="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=R().charts,Vt=C(),zt=rt??(t=>S(t,Vt)),At=ot??zt,Wt=jt??$t.noData,Lt=U(null),Rt=V(Lt),Ct=Nt??Rt,[Et,St]=D(null),[Ut,Dt]=D(null),{highlighted:Pt}=u(),It=P(),Tt=ut??Ut,Qt=g(ht&&Tt?Tt[1]-Tt[0]+1:X.length,pt);if(I(()=>{if(null!==Et)return L(t=>"Escape"===t.key&&(St(null),!0))},[Et]),kt)/* @__PURE__ */
|
|
2
|
+
return T("div",{className:wt,ref:Lt,children:/* @__PURE__ */T(h,{height:H,width:Nt??Rt})});const Yt=X,Bt=ut??Ut??[0,Math.max(0,Yt.length-1)],[Ft,Ot]=Bt,Gt=t=>Qt.slice(ht?t.slice(Ft,Ot+1):t),Kt=lt?Gt(lt):void 0,Xt=K.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(G)).map(t=>({...t,data:Gt(t.data),pointTones:t.pointTones?Gt(t.pointTones):void 0})),Ht=t=>(ht?Ft:0)+(Qt.view?.[0]??0)+t;if(X=Gt(Yt),0===Xt.length||0===X.length)/* @__PURE__ */
|
|
3
|
+
return T("div",{className:wt,ref:Lt,children:/* @__PURE__ */T("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:H},children:Wt})});const Zt=X.map((t,e)=>Xt.reduce((t,a)=>t+(G(a.data[e])?a.data[e]:0),0)),Jt=(t,e)=>Zt[e]>0?t/Zt[e]:null,qt=[];if(Z){let t=X.map(()=>0);for(const e of Xt)t=t.map((t,a)=>t+(G(e.data[a])?e.data[a]:0)),qt.push("percent"===J?t.map((t,e)=>Jt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!Z&&!_t&&void 0===et&&Xt.some(te)&&Xt.some(t=>!te(t)),ae=gt&&!Z?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Xt.filter(t=>!te(t)):Xt).filter(t=>!re(t)),le=ee?Xt.filter(te).flatMap(t=>t.data.filter(G)):[],ne=Z?(qt.at(-1)??[]).filter(G):oe.flatMap(t=>t.data.filter(G)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:Z&&"percent"===J||_t||void 0!==et?null:b(Z?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=Z&&"percent"===J?1:se?se.hi:et??M(Math.max(...ne,0)),me=Z&&"percent"===J?t=>E(Math.round(100*t),0,Vt):zt,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),O),fe=ie?w(ie.right.ticks.map(zt),B):B,pe={left:ue,right:Math.max(ue+1,Ct-fe),top:Y,bottom:H-F},ge=j(X.length,{from:pe.left,to:pe.right}),ye=_t?$(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Xt.filter(re),Me=Math.max(0,...X.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,G(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Ve=t=>e=>{e.preventDefault(),St(e=>{const a=(e??0)+t;return Math.min(X.length-1,Math.max(0,a))})},ze=Math.max(1,Math.ceil(X.length/Math.max(1,Math.floor(Ct/96))));/* @__PURE__ */
|
|
4
|
+
return Q("div",{className:`relative ${wt??""}`,ref:Lt,children:[
|
|
5
|
+
/* @__PURE__ */Q("svg",{width:"100%",height:H,viewBox:`0 0 ${Ct} ${H}`,role:"img","aria-label":$t.overIntervals(Xt.map(t=>t.label),X.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>St(null),onBlur:()=>St(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Et&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Ht(Et));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
|
|
6
|
+
/* @__PURE__ */T("defs",{children:/* @__PURE__ */T("clipPath",{id:It,children:/* @__PURE__ */T("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
|
+
/* @__PURE__ */T(n,{id:It,fills:Xt.map((t,e)=>({color:z(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:Z?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */T("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:A.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
|
+
/* @__PURE__ */T("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:A.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */T("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */T("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */T("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:A.label,children:nt}),
|
|
9
|
+
/* @__PURE__ */T("g",{clipPath:`url(#${It})`,mask:xt&&vt?`url(#${m(It)})`:void 0,children:Xt.map((t,e)=>{const n=z(t.slot,t.color,t.tone),m=t.mode??(Z?"area":"line"),h=f(t.key,Pt);if("step"===m){const e=X.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>G(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
|
|
10
|
+
return T("path",{d:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=X.map((a,r)=>{const o=Z?qt[e]?.[r]:t.data[r];return G(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */T("g",{opacity:h??void 0,className:"rosh-viz-mark",children:X.map((o,l)=>{const i=t.data[l];if(!G(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Xt[t]?.key)).reduce((t,a)=>t+Math.max(0,G(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
|
|
11
|
+
return T("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?W[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */T("g",{opacity:h??void 0,className:"rosh-viz-mark",children:X.map((l,c)=>{const d=Z?qt[e]?.[c]:t.data[c];if(!G(d))return null;const m=o(d);/* @__PURE__ */
|
|
12
|
+
return T("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=Z&&e>0?X.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
|
|
13
|
+
return Q("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||Z)&&
|
|
14
|
+
/* @__PURE__ */T("path",{d:y,fill:c(It,e,t.fillVariant??bt,n),stroke:"none"}),
|
|
15
|
+
/* @__PURE__ */T("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??W[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
|
|
16
|
+
return Q("g",{children:[
|
|
17
|
+
/* @__PURE__ */T("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */T("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Xt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=z(t.slot,t.color,t.tone),l=[...t.data].map(G).lastIndexOf(!0),n="all"===r?X.map((t,e)=>e).filter(e=>G(Z?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
|
|
18
|
+
return Q("g",{children:[n.map(r=>{const n=Z?qt[a]?.[r]:t.data[r];return G(n)?/* @__PURE__ */T(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${X[r]}: ${t.label} ${zt(n)}`},r):null}),st&&l>=0&&G(Z?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */T("text",{x:ge.center(l)-10,y:je(t)(Z?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Z?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),X.map((t,e)=>e%ze===0?/* @__PURE__ */T("text",{x:ge.center(e),y:H-8,textAnchor:"middle",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Et&&/* @__PURE__ */T("line",{x1:ge.center(Et),y1:pe.top,x2:ge.center(Et),y2:pe.bottom,stroke:A.axis,strokeWidth:1}),ae&&Me>0&&
|
|
19
|
+
/* @__PURE__ */Q("g",{pointerEvents:"none","data-column-strip":"true",children:[
|
|
20
|
+
/* @__PURE__ */T("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:A.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
+
/* @__PURE__ */T("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Me)})]}),Qt.drag&&/* @__PURE__ */T(y,{x0:ge(Qt.drag[0]),x1:ge(Qt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),X.map((t,e)=>/* @__PURE__ */T("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>St(e),onPointerDown:()=>Qt.press(e),onPointerEnter:()=>Qt.over(e),onPointerUp:Qt.release,onClick:yt?()=>yt(Ht(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Qt.view&&/* @__PURE__ */T(k,{from:Kt?.[0]??X[0],to:Kt?.at(-1)??X[X.length-1],count:X.length,total:Z&&"percent"!==J?At(Zt.reduce((t,e)=>t+e,0)):ae?At(be.reduce((t,e)=>t+e.data.filter(G).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Xt).filter(t=>t.data.some(G)).map(t=>{const e=t.data.filter(G),a=z(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=Z||"column"===t.mode?At(r):$t.zoomLevel(At(r/e.length),At(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Qt.clear}),ht&&Yt.length>2&&/* @__PURE__ */T(t,{className:"mt-1",labels:Yt,width:Ct,data:K[0]?.data??[],range:Bt,onRangeChange:t=>{ft?ft(t):Dt(t)}}),null!==Et&&
|
|
22
|
+
/* @__PURE__ */T("div",{className:"pointer-events-none absolute top-2 z-10",style:x(ge.center(Et),ge.bandwidth,Ct),children:/* @__PURE__ */T(p,{title:Kt?.[Et]??X[Et],rows:Xt.map((t,e)=>({key:t.key,label:t.label,color:z(t.slot,t.color,t.tone),value:G(t.data[Et])?Z&&"percent"===J?`${E(100*(Jt(t.data[Et],Et)??0),1,Vt)} · ${At(t.data[Et])}`:At(t.data[Et]):void 0})),footnote:Z&&"percent"===J?$t.inBucket(At(Zt[Et])):void 0})})]})}export{K as TimeSeriesChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-X2S2XDZI.js";import{formatDateTime as o}from"./chunk-5OTS2G3M.js";import{useShellLocale as c}from"./chunk-
|
|
1
|
+
import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-X2S2XDZI.js";import{formatDateTime as o}from"./chunk-5OTS2G3M.js";import{useShellLocale as c}from"./chunk-4PAWQEXM.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
|
|
2
2
|
return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-A5BV6NFA.js";import{Button_default as i}from"./chunk-I4VIEGCX.js";import{iconButtonClasses as n}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-KKSVRIMP.js";import{Tooltip as a}from"./chunk-6XBWM453.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:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:I,align:W="end",side:z="bottom",menuMinWidth:A,linkAs:F,block:M=!1,className:R=""},B){const L=g&&(null!=N&&""!==N&&!1!==N)&&!v,V=x&&null!=j&&""!==j&&!1!==j,$=o(),D=/* @__PURE__ */t(i,{ref:B,type:b,variant:f,size:p,loading:v,leftIcon:k,block:M,disabled:g&&!L,"aria-disabled":!!L||void 0,disabledReason:L?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),K=M?"relative flex min-w-0 flex-1":"relative inline-flex",O=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
+
return s("div",{className:[M?"flex w-full":"inline-flex","items-stretch",R].filter(Boolean).join(" "),children:[null==w||""===w||L?D:/* @__PURE__ */t(a,{content:w,className:K,children:D}),
|
|
3
|
+
/* @__PURE__ */t(a,{content:V?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":V?$:void 0,items:h,align:W,side:z,minWidth:A,linkAs:F,disabled:x&&!V,"aria-disabled":V,onOpenChange:y,footer:C,footerLabel:I,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:O,strokeWidth:2,"aria-hidden":"true"})})}),V&&/* @__PURE__ */t("span",{id:$,className:"sr-only",children:j})]})});export{c as SplitButton_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-RP3GUVAI.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-TOVKWNI2.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-N4DI5F74.js";import{FormField as r}from"./chunk-6KBDNYRW.js";import{Checkbox_default as n}from"./chunk-CGZBDI6C.js";import{Textarea_default as i}from"./chunk-PB7G6CJ7.js";import{Input_default as c}from"./chunk-MAMWQCJ6.js";import{Button_default as o}from"./chunk-I4VIEGCX.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
|
|
2
2
|
return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
|
|
3
3
|
/* @__PURE__ */d("div",{children:[
|
|
4
4
|
/* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{useOverlayTarget as e,OverlayLayerProvider as r}from"./chunk-SDI2UGAG.js";import{useDiscardGuard as i}from"./chunk-YMYY5G6V.js";import{dialogA11y as t}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-PKXQDCNR.js";import{useFocusTrap as a,useScrollLock as l}from"./chunk-CDAJKLGL.js";import{Icon as s}from"./chunk-KKSVRIMP.js";import{Z_LAYERS as n}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m}from"./chunk-4PAWQEXM.js";import{useRef as u,useId as f,useState as h,useEffect as p}from"react";import{createPortal as x}from"react-dom";import{jsx as v,jsxs as b}from"react/jsx-runtime";var g={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function y({open:y,onClose:k,title:j,description:N,role:w="dialog",children:C,footer:W,blocking:D=!1,size:G="md",aside:A=!1,dirty:I=!1,initialFocus:K,"aria-label":L,"aria-labelledby":U,"aria-describedby":V,className:Y=""}){const J=u(null),M=f(),P=f(),Q=!D,T=f(),z=m().dialog,R=e(d()),[S,X]=h(null),$=i({open:y,dirty:I,onClose:k,title:j,layer:S});return o(y),a(J,y&&null!==R,K),l(y),p(()=>{if(y)return c(()=>(D||$(),!0),()=>J.current)},[y,D,$]),y&&R?x(
|
|
2
|
+
/* @__PURE__ */v(r,{value:S,children:/* @__PURE__ */b("div",{ref:X,className:"fixed inset-0"+(A?" pointer-events-none opacity-0":""),style:{zIndex:n.overlay},role:"presentation","data-overlay-layer":"","data-aside":A?"":void 0,children:[
|
|
3
|
+
/* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */v("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:D?void 0:e=>{e.target===e.currentTarget&&$()},children:/* @__PURE__ */b("div",{ref:J,...t({role:w,modal:!0,titleId:j?T:void 0,labelledBy:U,label:L}),"aria-describedby":V??(N?P:C?M:void 0),className:`relative max-h-full w-full ${g[G]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${Y}`.trim(),children:[j&&/* @__PURE__ */v("h2",{id:T,className:(Q?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:j}),N&&/* @__PURE__ */v("p",{id:P,className:((j?"mt-1":Q?"pr-8":"")+" text-sm text-gray-500").trim(),children:N}),C&&/* @__PURE__ */v("div",{id:M,className:"mt-2 text-sm text-gray-600",children:C}),W&&/* @__PURE__ */v("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:W}),Q&&/* @__PURE__ */v("button",{type:"button",onClick:$,"aria-label":z.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),R):null}export{y as Dialog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{useShellLocale as e}from"./chunk-4PAWQEXM.js";import{forwardRef as n}from"react";import{jsx as a}from"react/jsx-runtime";var r=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,i=t=>String(t).padStart(2,"0");function l(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${(e=t).getFullYear()}-${i(e.getMonth()+1)}-${i(e.getDate())}T${i(e.getHours())}:${i(e.getMinutes())}`:r.test(t)?t:"";var e}var o=n(function({value:n,onChange:i,min:o,max:u,invalid:m,size:s,className:c="",...d},g){const p=e();/* @__PURE__ */
|
|
2
2
|
return a("input",{ref:g,type:"datetime-local",lang:p,"aria-invalid":m||void 0,value:l(n),min:l(o)||void 0,max:l(u)||void 0,onChange:t=>i?.(function(t){if(!r.test(t))return null;const[e,n]=t.split("T"),[a,i,l]=e.split("-").map(Number),[o,u,m=0]=n.split(":").map(Number);if(o>23||u>59||m>59)return null;const s=new Date(a,i-1,l,o,u,m);return s.getMonth()===i-1&&s.getDate()===l?s:null}(t.target.value)),className:t({invalid:m,size:s,className:c}),...d})});export{o as DateTimePicker_default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-TKJBZIHT.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-G4GVLK44.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-4PAWQEXM.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:W}){const C=m().charts,F=c(),w=N??(e=>h(e,F)),A=W??C.nothingToCompare,L=p(),[R,T]=u(null),{highlighted:E}=a(),z=x;if(k.length<3||0===z.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:A});const B=y/2,H=y/2,Q=y/2-46,U=n(k.length),V=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))),Y=(e,t)=>{const r=Math.max(0,Math.min(1,t/V[e])),l=U.center(e)-U.step/2;return[B+Q*r*Math.cos(l),H+Q*r*Math.sin(l)]},Z=(e,t)=>null!==R?R!==e:null!==E&&E!==t,G=null!==R?z[R]:void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${$??""}`,children:[
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":L,onMouseLeave:()=>T(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:L,children:C.acrossMeasures(z.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=Q*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:B,cy:H,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(B,H,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=Y(t,V[t]);/* @__PURE__ */
|
|
6
|
+
return f("g",{children:[
|
|
7
|
+
/* @__PURE__ */d("line",{x1:B,y1:H,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:B+(Q+18)*Math.cos(U.center(t)-U.step/2),y:H+(Q+18)*Math.sin(U.center(t)-U.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)=>Y(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:Z(t,e.key)?.3:1,onMouseEnter:()=>T(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
|
+
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
|
+
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
+
/* @__PURE__ */d(e,{caption:C.acrossMeasures(z.map(e=>e.label),k.length),head:[C.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};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-KP2THXEI.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-63L5ORRZ.js";import{ImageLightbox as r}from"./chunk-QQPIQCT7.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-AKJHVOSD.js";import{Breadcrumbs as d}from"./chunk-O4V5PEA3.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as u,mediaLibraryMenu as m}from"./chunk-7YOQS3C6.js";import{useMediaMoveItems as p}from"./chunk-ZURB2DCM.js";import{copyToClipboard as h}from"./chunk-MQU3PZUS.js";import{DropdownMenu as f}from"./chunk-A5BV6NFA.js";import{NativeSelect as g}from"./chunk-N4DI5F74.js";import{MediaUploadGrid as v}from"./chunk-2VTO64YC.js";import{MediaUsedInList as k}from"./chunk-PBWUEBJ5.js";import{Segmented as y}from"./chunk-3ELLBQPS.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as x}from"./chunk-W6SC3ZNO.js";import{Banner as C}from"./chunk-GSKLHUQ6.js";import{Input_default as N}from"./chunk-MAMWQCJ6.js";import{IconButton_default as I}from"./chunk-PUF75SMJ.js";import{useFileIntake as D,FileIntakeAlert as S}from"./chunk-6RX4PVBU.js";import{ColoredBadge as j}from"./chunk-PXQG5EIH.js";import{Button_default as z}from"./chunk-I4VIEGCX.js";import{buttonClasses as F}from"./chunk-UQYNPYF4.js";import{Icon as T}from"./chunk-KKSVRIMP.js";import{Tooltip as O}from"./chunk-6XBWM453.js";import{usePlotWidth as P}from"./chunk-MAFUXCPZ.js";import{useShellStrings as L}from"./chunk-4PAWQEXM.js";import{useRef as E,useMemo as A,useCallback as M,useState as U,useEffect as R}from"react";import{jsxs as B,Fragment as K,jsx as Q}from"react/jsx-runtime";var V="application/x-efficient-media-files",W="application/x-efficient-media-folder",H="application/x-efficient-media-file";function J(e){if(!e||!Array.from(e.types).includes(H))return null;try{const n=JSON.parse(e.getData(H));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var G={type:"all",use:"any",sort:"newest"},X={lock:/* @__PURE__ */Q(T,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */Q(T,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */Q(T,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */Q(T,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */Q(T,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */Q(T,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */Q(T,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */Q(T,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */Q(T,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */Q(T,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */Q(T,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */Q(T,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */Q(T,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */Q(T,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */Q(T,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */Q(T,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},$={link:/* @__PURE__ */Q(T,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */Q(T,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */Q(T,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */Q(T,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function Z({value:e,label:n,onDone:l}){const[a,i]=U(e),r=E(!1),t=e=>{r.current||(r.current=!0,l(e))};/* @__PURE__ */
|
|
2
|
+
return Q(N,{size:"sm",autoFocus:!0,"aria-label":n,value:a,onChange:e=>i(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:n=>{n.stopPropagation(),"Enter"===n.key?(n.preventDefault(),t(a.trim()||e)):"Escape"===n.key&&(n.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function Y(T){const{mode:J="manage",layout:Y="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=G,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:pe,usedIn:he,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:xe,onMove:Ce,onTrash:Ne,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Fe,onOpenInDesign:Te,onChoose:Oe,onCancel:Pe,pickNote:Le,onDragOut:Ee,className:Ae=""}=T,Me=L().mediaLibrary,Ue=L().media,Re="pick"===J,Be=!Re,Ke=E(null),Qe=P(Ke,"phone"===Y?343:1200),Ve="phone"===Y||"auto"===Y&&Qe<640,We=A(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),He=A(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Je=A(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&He.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,He]),Ge=M(e=>{const n=[];for(let l=e?He.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?He.get(l.parentId):void 0);return n},[He,ee.length]),Xe=M((e,n)=>Ge(e).some(e=>e.id===n),[Ge]),[$e,Ze]=U(()=>/* @__PURE__ */new Set(["@files"])),Ye=e=>Ze(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=M(e=>{Ze(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;R(()=>{if("files"===q.place)qe(["@files",...Ge(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?We.get(q.nodeId)?.path??[]:[];qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===q.place,ln="trash"===q.place,an="files"===q.place,rn=an?q.folderId:null,tn=nn&&q.nodeId?We.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Me.readOnly} ${Me.editedAtHq(e.sharedFrom)}`:Me.readOnly,dn=A(()=>ie.map(e=>e.id),[ie]),sn=A(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=s(dn),un=A(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,pn=E(!0);R(()=>{pn.current?pn.current=!1:cn.clear()},[_e]);const hn=me?.join("\0");R(()=>{me&&cn.setSelection(me)},[hn]);const fn=E(hn??""),gn=un.join("\0");R(()=>{fn.current!==gn&&(fn.current=gn,pe?.(un))},[gn]);const vn=(e,n={})=>{Re?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=U(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?He.get(n.id)?.name:sn.get(n.id)?.name)&&xe?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},xn=M(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Me.alreadyHere:void 0;const l=He.get(e.id);return n===e.id||n&&Xe(n,e.id)?Me.notIntoItself:(l?.parentId??null)===n?Me.folderAlreadyHere:void 0};n.push({key:u,label:Me.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Je.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Je,He,an,Xe,rn,Me]),Cn=M(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Nn,In]=U(null),Dn={words:Me,media:Ue,denied:fe,moveTargets:xn,kindOf:Cn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Be?e=>{wn(e)}:void 0,rename:xe&&Be?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:Ce&&Be?Ce:void 0,trash:Ne&&Be?Ne:void 0,deleteFolder:Ie&&Be?Ie:void 0,folderNotEmpty:e=>!!He.get(e)?.notEmpty,replace:ze&&Be?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&h(Me.urlLabel,n)},openInDesign:Te,restore:De,deleteForever:Se},Sn=e=>m(e,Dn),jn=w(),zn=(e,n)=>{Re||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Fn,Tn]=U(null),[On,Pn]=U(null),[Ln,En]=U(null);R(()=>{if(!On&&!Fn)return;const e=()=>{Pn(null),Tn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,Fn]);const An=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Mn=(e,n)=>!(!Ce||fe.move||Re)&&(!!An(e,V)||!(!An(e,W)||!Ln)&&(n!==Ln&&!(n&&Xe(n,Ln)))),Un=(e,n)=>({onDragEnter:l=>{Mn(l,n)&&(l.preventDefault(),Tn(e))},onDragOver:l=>{Mn(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Fn!==e&&Tn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Tn(n=>n===e?null:n)},onDrop:e=>{if(Mn(e,n))if(e.preventDefault(),Tn(null),An(e,V)){let l;try{l=JSON.parse(e.dataTransfer.getData(V))}catch{l=null}Array.isArray(l)&&l.length&&Ce({kind:"files",ids:l.map(String)},n)}else Ln&&(Ce({kind:"folder",id:Ln},n),En(null))}}),Rn=e=>{const n=e=>An(e,V)||An(e,W)||An(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&On!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Bn=(e,n,l)=>/* @__PURE__ */Q(O,{side:"right",content:On===e?Me.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */Q("span",{children:n})}),Kn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Qn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=$e.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
3
|
+
return B("div",{role:"none",className:"contents",children:[
|
|
4
|
+
/* @__PURE__ */Q(n,{label:Bn(r,e.name,t),level:a,icon:d&&o?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Me.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>Ye(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Rn(r),...Be?Kn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */Q(l,{children:Qn(d,a+1,t)})]},e.id)}),Vn=(e,a)=>(Je.get(e)??[]).map(e=>{const i=Je.get(e.id),r=$e.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
5
|
+
return B("div",{role:"none",className:"contents",children:[
|
|
6
|
+
/* @__PURE__ */Q(n,{label:e.name,level:a,icon:i&&r?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Me.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>Ye(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Fn===e.id?"into":void 0,dragging:Ln===e.id,draggable:Be&&!!Ce&&!fe.move,rename:t?/* @__PURE__ */Q(Z,{value:e.name,label:Me.folderName,onDone:bn}):void 0,actions:Be&&o.length?/* @__PURE__ */Q(f,{align:"end","aria-label":Me.folderActions,trigger:X.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Un(e.id,e.id),...Be?Kn({kind:"folder",id:e.id}):{},...Be&&Ce&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(W,e.id),En(e.id)},onDragEnd:()=>{En(null),Tn(null)}}:{}}}),i&&r&&/* @__PURE__ */Q(l,{children:Vn(e.id,a+1)})]},e.id)}),Wn=$e.has("@files"),Hn=$e.has("@products"),Jn=/* @__PURE__ */B(e,{"aria-label":Me.folders,children:[ne&&/* @__PURE__ */B(K,{children:[
|
|
7
|
+
/* @__PURE__ */Q(n,{label:Bn("@products",Me.products),level:1,icon:X.lock,badge:{label:Me.readOnlyBadge,tone:"neutral"},expanded:ne.length?Hn:void 0,onToggle:()=>Ye("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Rn("@products")}}),Hn&&ne.length>0&&/* @__PURE__ */Q(l,{children:Qn(ne,2)})]}),
|
|
8
|
+
/* @__PURE__ */Q(n,{label:Me.allFiles,level:1,icon:Wn?X.folderOpen:X.folder,count:le,countLabel:null!=le?Me.fileCount(le):void 0,expanded:Je.get(null)?.length?Wn:void 0,onToggle:()=>Ye("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Fn?"into":void 0,rowProps:{"data-media-row":"@files",...Un("@files",null)}}),Wn&&(Je.get(null)?.length??0)>0&&/* @__PURE__ */Q(l,{children:Vn(null,2)}),Be&&/* @__PURE__ */Q(n,{label:Me.trash,level:1,icon:X.trash,count:ae,countLabel:null!=ae?Me.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Gn=(()=>{if(ln)return[{label:Me.trash}];if(nn){const e=q.nodeId?We.get(q.nodeId)?.path??[]:[];return[{label:Me.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=Ge(rn);return[{label:Me.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Xn=nn?Me.readOnly:fe.upload,$n=!!be&&!ln&&!Xn,Zn=D({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!$n,onAccept:e=>be?.(e,rn)}),Yn=nn?Me.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[Be&&we&&!ln&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.folderPlus,onClick:()=>{wn(rn)},...qn(Yn),children:Me.newFolder}),be&&!ln&&/* @__PURE__ */Q(z,{variant:"primary",size:"sm",leftIcon:X.upload,onClick:()=>Zn.open(),...qn(Xn),children:Me.upload}),Be&&ln&&je&&ie.length>0&&/* @__PURE__ */Q(z,{variant:"danger",size:"sm",onClick:je,...qn(fe.deleteForever),children:Me.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */Q("div",{style:{width:Ve?void 0:i,flex:Ve?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */Q(g,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */Q("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */Q(N,{size:"sm",type:"search",leftIcon:X.search,placeholder:nn?Me.searchProducts:Me.search,"aria-label":nn?Me.searchProducts:Me.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Me.mediaType,oe.type,[{value:"all",label:Me.allTypes},{value:"image",label:Me.images},{value:"video",label:Me.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Me.use,oe.use,[{value:"any",label:Me.anyUse},{value:"email",label:Me.emailOnly},{value:"website",label:Me.websiteOnly},{value:"unused",label:Me.notUsed}],nl("use"),130),de&&Be&&el(Me.sort,oe.sort,[{value:"newest",label:Me.newest},{value:"name",label:Me.byName},{value:"size",label:Me.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */Q(y,{size:"sm",label:Me.view,value:ce,onChange:ue,options:[{value:"grid",label:Me.grid,icon:X.grid},{value:"list",label:Me.list,icon:X.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Me.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:$.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Me.used(e.usedCount),count:e.usedCount,icon:$.link,tone:"active"}),e.email&&n.push({key:"e",label:Me.email,icon:$.email,tone:"queued"}),e.private&&n.push({key:"p",label:Me.private,icon:$.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */Q(j,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Be&&an&&!!Ce&&!fe.move,tl=!!Ee&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[H]:ol(e)}}:{}})),sl=Ve?Math.max(72,Math.floor((Qe-24-16-1)/3)):112,cl=E(null),ul=c({containerRef:cl,enabled:Be&&!Ve&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Re){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},pl=ie.length?null:re?/* @__PURE__ */Q(i,{variant:"dashed",title:Me.noMatches}):nn?/* @__PURE__ */Q(i,{variant:"dashed",title:Me.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */Q(i,{variant:"dashed",title:Me.trashEmpty}):!$n||Re?/* @__PURE__ */Q(i,{variant:"dashed",title:Me.emptyFolder}):null,hl="list"===ce&&ie.length>0,fl=pl??(hl?/* @__PURE__ */Q("ul",{role:"listbox","aria-multiselectable":Be||void 0,"aria-label":Me.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */B("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(H,ol(e)),Ee("start")}:void 0,onDragEnd:ol(e)?e=>Ee("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
9
|
+
/* @__PURE__ */Q("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
10
|
+
/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
11
|
+
/* @__PURE__ */Q("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */Q("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */Q(v,{items:dl,readOnly:!$n||Re,onFiles:$n&&!Re?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?V:tl?H:void 0,onDragOutChange:tl?e=>Ee(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Be?zn:void 0,menuOnMedia:Be})),gl=p({count:un.length,kind:Cn(un),targets:xn({kind:"files",ids:un}),onPick:e=>Ce?.({kind:"files",ids:un},e.key===u?null:e.key)}),vl=F({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */Q(f,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(K,{children:[X.folder,Me.moveTo]}),items:gl,disabled:!!fe.move}),yl=Be&&un.length>1&&!nn?/* @__PURE__ */B("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
12
|
+
/* @__PURE__ */Q(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Me.selected(un.length)}),/* @__PURE__ */B(K,ln?{children:[De&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.undo,onClick:()=>De(un),...qn(fe.restore),children:Me.restore}),Se&&/* @__PURE__ */Q(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Me.deleteForever})]}:{children:[Ce&&kl,xe&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.edit,disabled:!0,children:Me.rename}),Ne&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.trash,onClick:()=>Ne({kind:"files",ids:un}),...qn(fe.trash),children:Me.moveFilesToTrash(un.length)})]}),
|
|
13
|
+
/* @__PURE__ */Q(z,{variant:"ghost",size:"sm",onClick:cn.clear,children:Me.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Me.name,a?/* @__PURE__ */Q(Z,{value:e.name,label:Me.fileName,onDone:bn}):e.name),l("type",Me.type,e.typeLabel),l("size",Me.size,e.sizeLabel),l("resolution",Me.resolution,e.resolution),nn?(l("design",Me.design,e.design),l("finish",Me.finish,e.finish),l("angle",Me.angleLug,e.angleLug),l("owner",Me.owner,e.owner)):(l("added",Me.addedBy,e.addedBy),l("folder",Me.folder,e.folderPath)),l("used",Me.usedIn,null!=e.usedCount?Me.places(e.usedCount):void 0);const i=m({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
14
|
+
return B("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
15
|
+
/* @__PURE__ */Q("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */Q(C,{tone:"neutral",title:Me.readOnlyBadge,children:on(tn)}),
|
|
16
|
+
/* @__PURE__ */Q(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */B("div",{className:"flex gap-2",children:[
|
|
17
|
+
/* @__PURE__ */Q("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */Q(N,{size:"sm",readOnly:!0,value:e.url,"aria-label":Me.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
18
|
+
/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.copy,onClick:()=>Dn.copyUrl(e.id),children:Me.copyUrl})]}),an&&Be&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.swap,onClick:()=>ze(e.id),...qn(fe.replace),children:Me.replace}),Fe&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.crop,onClick:()=>Fe(e.id),children:Me.cropEdit}),Ce&&"submenu"===i?.type&&/* @__PURE__ */Q(f,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(K,{children:[X.folder,Me.moveTo]}),items:i.items,disabled:!!fe.move}),xe&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Me.rename}),Ne&&/* @__PURE__ */Q(I,{"aria-label":Me.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:X.trash})]}),ln&&Be&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */Q(z,{variant:"primary",size:"sm",leftIcon:X.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Me.restore}),Se&&/* @__PURE__ */Q(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Me.deleteForever})]}),nn&&Te&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",leftIcon:X.external,onClick:()=>Te({kind:"render",id:e.id}),children:Me.openInDesign}),he&&/* @__PURE__ */Q(k,{items:he})]})},wl=mn?mn.private?Me.privateNoPick:mn.pickDisabledReason:void 0,xl=Re?/* @__PURE__ */B("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
19
|
+
/* @__PURE__ */Q("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Me.oneChosen(mn.name):Me.noneChosen}),
|
|
20
|
+
/* @__PURE__ */B("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */Q(z,{variant:"secondary",size:"sm",onClick:Pe,children:Me.cancel}),
|
|
21
|
+
/* @__PURE__ */Q(z,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Me.chooseImage})]})]}):null,Cl=Be&&!!mn,Nl=/* @__PURE__ */B("div",{className:"flex min-w-0 flex-col gap-3",children:[Le&&/* @__PURE__ */Q(C,{tone:"neutral",children:Le}),
|
|
22
|
+
/* @__PURE__ */B("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
23
|
+
/* @__PURE__ */Q(d,{items:Gn}),_n]}),ll,yl,
|
|
24
|
+
/* @__PURE__ */B("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Be&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
|
|
25
|
+
/* @__PURE__ */Q(a,{rect:ul.rect})]}),$n&&/* @__PURE__ */Q("input",{...Zn.inputProps}),
|
|
26
|
+
/* @__PURE__ */Q(S,{rejections:Zn.rejections})]});/* @__PURE__ */
|
|
27
|
+
return B("div",{ref:Ke,"data-media-library":"","data-layout":Ve?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Ae}`.trim(),children:[/* @__PURE__ */B("div",Ve?{className:"flex flex-col gap-3 p-3",children:[Jn,Nl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
28
|
+
/* @__PURE__ */Q("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Jn}),
|
|
29
|
+
/* @__PURE__ */Q("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Nl}),Cl&&/* @__PURE__ */Q("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),xl,Ve&&/* @__PURE__ */Q(o,{open:Cl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */Q(x,{...jn.props,items:Sn(jn.state.data)}),null!=Nn&&ie.length>0&&/* @__PURE__ */Q(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Nn,ie.length-1),onClose:()=>In(null)})]})}export{V as MEDIA_FILES_DRAG_TYPE,H as MEDIA_FILE_DRAG_TYPE,W as MEDIA_FOLDER_DRAG_TYPE,Y as MediaLibrary,J as readMediaFileDrag};
|