efficient-shell 13.21.0 → 13.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/{Browser-AE7OYSTS.js → Browser-342OHRA2.js} +14 -14
- package/dist/Calculator-HJK5JN54.js +29 -0
- package/dist/CurrencyConverter-MPAZ6QJ3.js +21 -0
- package/dist/{Files-Y5UGT3RX.js → Files-IPM7TRMJ.js} +88 -88
- package/dist/Notepad-R7MUSPRC.js +24 -0
- package/dist/{PdfViewer-EELX35ZI.js → PdfViewer-FWGHFO4N.js} +1 -1
- package/dist/PomodoroTimer-VREYC3ML.js +91 -0
- package/dist/{Preview-XQXSRAGY.js → Preview-X64AVAUP.js} +26 -26
- package/dist/Sidebar-MY66ILZY.js +44 -0
- package/dist/{Stock-36O4LW46.js → Stock-GQSNYWV2.js} +3 -3
- package/dist/{Weather-BN6AJJ4S.js → Weather-XNMLNV7N.js} +19 -19
- package/dist/{WorldClock-TUVIRPTM.js → WorldClock-AZLGM2T5.js} +6 -6
- package/dist/ai/index.js +118 -118
- package/dist/apps/ImageAnnotator.js +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.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/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-23YQNCZ4.js +23 -0
- package/dist/chunk-2AEYVQ2R.js +2 -0
- package/dist/{chunk-MVOYVN3S.js → chunk-2YHS5E27.js} +1 -1
- package/dist/{chunk-X4E4RPFE.js → chunk-2YUAR2EH.js} +5 -5
- package/dist/{chunk-PPLPDP6D.js → chunk-3AUN7JSM.js} +1 -1
- package/dist/{chunk-FDDM7VMQ.js → chunk-3BQMICGG.js} +1 -1
- package/dist/{chunk-NILGK2KJ.js → chunk-3EYJ4G7L.js} +1 -1
- package/dist/{chunk-FXSGIT53.js → chunk-3GJVTK4H.js} +8 -8
- package/dist/chunk-3SKXWFGG.js +15 -0
- package/dist/{chunk-XD3M5ZXM.js → chunk-3TD3GH53.js} +6 -6
- package/dist/{chunk-4U5M37SF.js → chunk-4PJFL26P.js} +1 -1
- package/dist/{chunk-NA4XPE7S.js → chunk-53HHYEN4.js} +3 -3
- package/dist/{chunk-IUQJGFEO.js → chunk-5CHJA4RL.js} +8 -8
- package/dist/{chunk-OF5X4HKC.js → chunk-5JUXMNUC.js} +1 -1
- package/dist/{chunk-TB2ARUE2.js → chunk-5OHFBS2B.js} +1 -1
- package/dist/chunk-5ZOYYL46.js +4 -0
- package/dist/{chunk-TPKNHQIE.js → chunk-66NJCU4W.js} +8 -8
- package/dist/{chunk-BCQSNK2Z.js → chunk-6CFI4YGI.js} +4 -4
- package/dist/{chunk-LKAGXURQ.js → chunk-6MFKKTCE.js} +17 -17
- package/dist/{chunk-QNWC3RWK.js → chunk-6NXPOZ6X.js} +1 -1
- package/dist/{chunk-F4VILY3O.js → chunk-72UHB4JU.js} +1 -1
- package/dist/{chunk-7I5RJPY7.js → chunk-7AVPMO4F.js} +1 -1
- package/dist/{chunk-KYQKMBSY.js → chunk-7B6JPNOD.js} +5 -5
- package/dist/{chunk-JB4WXBJB.js → chunk-7G5HKAGV.js} +5 -5
- package/dist/{chunk-SUSJFGXN.js → chunk-7N42VDGT.js} +9 -9
- package/dist/{chunk-YCXQDUTW.js → chunk-7PAZO65L.js} +6 -6
- package/dist/{chunk-4G7PJ325.js → chunk-A5FC4LR7.js} +1 -1
- package/dist/{chunk-G5UGCAWN.js → chunk-A6TOHNJY.js} +1 -1
- package/dist/{chunk-HPZLV3KD.js → chunk-AFYLMXOJ.js} +5 -5
- package/dist/{chunk-XAT2MKNU.js → chunk-AH2NEKEN.js} +4 -4
- package/dist/{chunk-G7SILKUY.js → chunk-AQVPWUJ3.js} +5 -5
- package/dist/{chunk-63E4ZZYI.js → chunk-BEXFMSNK.js} +2 -2
- package/dist/{chunk-HOROMBJB.js → chunk-BL347U3N.js} +6 -6
- package/dist/chunk-BT636U6W.js +92 -0
- package/dist/{chunk-OUYGLDQN.js → chunk-BUUAALHH.js} +7 -7
- package/dist/{chunk-7CBWSLCW.js → chunk-C7Z3ZMJH.js} +12 -12
- package/dist/{chunk-SF4IIV5Z.js → chunk-CJQPC2P3.js} +2 -2
- package/dist/{chunk-5POQCJL6.js → chunk-CUJ537IY.js} +4 -4
- package/dist/{chunk-E7BQZL7X.js → chunk-D4432YRW.js} +1 -1
- package/dist/{chunk-RDVC32EV.js → chunk-D5HFWOW7.js} +16 -16
- package/dist/{chunk-GEITUFYK.js → chunk-D5PXRJHA.js} +19 -19
- package/dist/{chunk-VRJKV44O.js → chunk-DAUE6ULT.js} +1 -1
- package/dist/{chunk-YWMCW5BN.js → chunk-DTRJLQWO.js} +1 -1
- package/dist/{chunk-WJMPTW3G.js → chunk-DV6TUXCZ.js} +1 -1
- package/dist/{chunk-23LK4PLJ.js → chunk-E4GF7M4S.js} +8 -8
- package/dist/chunk-EJJTDUN3.js +22 -0
- package/dist/{chunk-RA2UNNJC.js → chunk-F3EBYHIE.js} +10 -10
- package/dist/chunk-FBI3XJWH.js +11 -0
- package/dist/{chunk-WJTNQ7YD.js → chunk-FE7H6RXE.js} +2 -2
- package/dist/{chunk-YQ5JHHLE.js → chunk-FMBUR4EU.js} +1 -1
- package/dist/{chunk-IOLUF3UL.js → chunk-GKYGPCGL.js} +1 -1
- package/dist/{chunk-Q4MOT7TY.js → chunk-GPU7LLTJ.js} +1 -1
- package/dist/{chunk-ZCGT5YNR.js → chunk-GRAFJD3L.js} +1 -1
- package/dist/{chunk-L4ZQY4ZG.js → chunk-GZRNOIEE.js} +3 -3
- package/dist/{chunk-VQ35LXDC.js → chunk-I2NVBDKH.js} +1 -1
- package/dist/{chunk-EZYXY67W.js → chunk-IJG4UEKF.js} +8 -8
- package/dist/{chunk-H75CQD46.js → chunk-IM23VMBR.js} +1 -1
- package/dist/{chunk-SOXZRLSD.js → chunk-IM2PF6VQ.js} +2 -2
- package/dist/{chunk-BVX7LUAW.js → chunk-IMH5H47S.js} +3 -3
- package/dist/{chunk-3SIRRK3F.js → chunk-J5OAQAAD.js} +4 -4
- package/dist/{chunk-SZFULV7I.js → chunk-J5W63XNR.js} +6 -6
- package/dist/{chunk-GNRH43N3.js → chunk-JJYTN72U.js} +2 -2
- package/dist/{chunk-HMOKKMIV.js → chunk-JLSXDYS4.js} +2 -2
- package/dist/{chunk-UC5IC3AM.js → chunk-JVENCUUG.js} +9 -9
- package/dist/{chunk-EFVQQF6F.js → chunk-JXJNQHPY.js} +19 -19
- package/dist/{chunk-HPHDLN6E.js → chunk-JYR4V4AG.js} +2 -2
- package/dist/{chunk-EG5MU7XL.js → chunk-JZ43635V.js} +1 -1
- package/dist/{chunk-KQCJWK55.js → chunk-KC2EQCBE.js} +6 -6
- package/dist/{chunk-P52LXNUU.js → chunk-L744YF4X.js} +1 -1
- package/dist/{chunk-SXHV5OLA.js → chunk-LC2UF3AA.js} +1 -1
- package/dist/{chunk-GUSENWAH.js → chunk-LLDGRPLF.js} +1 -1
- package/dist/{chunk-KNZ7YTFH.js → chunk-LLSGIMLG.js} +1 -1
- package/dist/{chunk-JPSWWIBW.js → chunk-LQIHBIXG.js} +6 -6
- package/dist/chunk-M36B3M2H.js +8 -0
- package/dist/{chunk-2J3C2RR4.js → chunk-M3HTP2N6.js} +6 -6
- package/dist/{chunk-BZRFD4DK.js → chunk-M4REKOGO.js} +1 -1
- package/dist/{chunk-ZNV75GAG.js → chunk-MEFB2KGF.js} +1 -1
- package/dist/{chunk-U2ZTHOQL.js → chunk-MMA3WTF2.js} +4 -4
- package/dist/chunk-MRZLFZNJ.js +6 -0
- package/dist/chunk-N64YAF5N.js +2 -0
- package/dist/chunk-N6PMH6DU.js +6 -0
- package/dist/chunk-NRHG4R2Q.js +1 -0
- package/dist/chunk-ODOWFVUE.js +28 -0
- package/dist/{chunk-G2JPTPRS.js → chunk-OFMZ6JM6.js} +13 -13
- package/dist/chunk-ONWFKCMB.js +14 -0
- package/dist/{chunk-XWJT6TFU.js → chunk-OSMRYND3.js} +1 -1
- package/dist/{chunk-6OCA7RKQ.js → chunk-P234FPKJ.js} +1 -1
- package/dist/{chunk-ZVDYRXNP.js → chunk-P4VOUPRF.js} +6 -6
- package/dist/{chunk-J4CVYOY3.js → chunk-P6H2B635.js} +10 -10
- package/dist/{chunk-ENDYHUUR.js → chunk-P73ZJ6QR.js} +1 -1
- package/dist/{chunk-5HFKVEWW.js → chunk-PFOTEDSQ.js} +1 -1
- package/dist/{chunk-FBS55WOX.js → chunk-PLESHI3E.js} +7 -7
- package/dist/{chunk-42DF7CDB.js → chunk-PPI4WJ3V.js} +7 -7
- package/dist/{chunk-M2TQOJ3G.js → chunk-PSVGB7KT.js} +1 -1
- package/dist/{chunk-223XYIIH.js → chunk-Q2RNFBYS.js} +1 -1
- package/dist/{chunk-6OGX7V7L.js → chunk-Q36KB5RQ.js} +7 -7
- package/dist/{chunk-WPGSU4QG.js → chunk-Q7CM4UDG.js} +2 -2
- package/dist/{chunk-ABTVRB23.js → chunk-QNQNOTTS.js} +1 -1
- package/dist/{chunk-25T4YQO7.js → chunk-QPVYBN4J.js} +2 -2
- package/dist/{chunk-FUPU7Z2G.js → chunk-QRPPWLKU.js} +7 -7
- package/dist/{chunk-7SVSHJOO.js → chunk-QZ2XRFDP.js} +6 -6
- package/dist/{chunk-IE6TRMIW.js → chunk-R3BSWWGB.js} +1 -1
- package/dist/{chunk-CCLK2RPQ.js → chunk-R7CYBBJY.js} +13 -13
- package/dist/{chunk-FFRJ6QZK.js → chunk-RB3BMRNA.js} +1 -1
- package/dist/{chunk-FZYUTZEV.js → chunk-RFWBNKKB.js} +10 -10
- package/dist/{chunk-S25KELFW.js → chunk-RKSCB5BJ.js} +5 -5
- package/dist/{chunk-F3E3CEZM.js → chunk-RM2I6DIF.js} +1 -1
- package/dist/{chunk-QBMMORYP.js → chunk-ROYHU3E5.js} +1 -1
- package/dist/chunk-S4RD6UJU.js +8 -0
- package/dist/{chunk-RDETBXMP.js → chunk-SAHRIE35.js} +1 -1
- package/dist/{chunk-MOKABQCY.js → chunk-SAMPXZF3.js} +3 -3
- package/dist/{chunk-W2TPXKCV.js → chunk-SCNQK5NF.js} +1 -1
- package/dist/{chunk-SM3N5UJ2.js → chunk-TDUOBP55.js} +9 -9
- package/dist/{chunk-BG3C4ALM.js → chunk-TJ5YMXVB.js} +1 -1
- package/dist/{chunk-SHHRC5XK.js → chunk-TJG76Y7I.js} +9 -9
- package/dist/{chunk-VFSAJMNX.js → chunk-TNGIXSTM.js} +1 -1
- package/dist/{chunk-BNPWUCZX.js → chunk-TSCJG6UM.js} +1 -1
- package/dist/{chunk-ETQ45TBW.js → chunk-TTYTOLVV.js} +1 -1
- package/dist/{chunk-DO3DSSAW.js → chunk-U73K3ICC.js} +1 -1
- package/dist/{chunk-FRCTA5FS.js → chunk-UAXL44HH.js} +1 -1
- package/dist/{chunk-CWVQH2SP.js → chunk-UDJPSHVI.js} +1 -1
- package/dist/{chunk-L2WBCXG7.js → chunk-UFJR63AO.js} +1 -1
- package/dist/{chunk-YT5HMLC7.js → chunk-UJY5RUZ5.js} +1 -1
- package/dist/{chunk-R6GXVLY7.js → chunk-UMIRPFQJ.js} +1 -1
- package/dist/chunk-UUY66GLZ.js +1 -0
- package/dist/{chunk-WRV6QKJN.js → chunk-UVPDEGIA.js} +1 -1
- package/dist/{chunk-MUNP5Z24.js → chunk-VB3UHY2J.js} +1 -1
- package/dist/{chunk-KEVJBI5Q.js → chunk-VTCMO3K7.js} +1 -1
- package/dist/{chunk-2TXQCA4C.js → chunk-W24THMLI.js} +8 -8
- package/dist/{chunk-VXSYHTBP.js → chunk-W3454ZES.js} +1 -1
- package/dist/{chunk-EFO72DEI.js → chunk-WCAABJEV.js} +1 -1
- package/dist/{chunk-OZ4R6U2M.js → chunk-WREUA43Q.js} +1 -1
- package/dist/{chunk-ELPW25CA.js → chunk-XX34ZFYB.js} +4 -4
- package/dist/chunk-XYQFTFI7.js +24 -0
- package/dist/{chunk-UFX7F3KG.js → chunk-XYVFJLAU.js} +1 -1
- package/dist/{chunk-A7VNKVZO.js → chunk-XYXCZIJY.js} +4 -4
- package/dist/{chunk-ZCN5BU4U.js → chunk-YBE66FBR.js} +1 -1
- package/dist/{chunk-6QH7I2V5.js → chunk-Z6J4KXY3.js} +2 -2
- package/dist/{chunk-NY6MLFBX.js → chunk-ZBGPAUOH.js} +5 -5
- package/dist/{chunk-LADP6AJY.js → chunk-ZFWCTHR4.js} +7 -7
- package/dist/{chunk-ORV2AVIJ.js → chunk-ZRWZHWKI.js} +2 -2
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.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/data/ResizableTable.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.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/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.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/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/index.d.ts +24 -2
- package/dist/index.js +503 -503
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +3 -3
- package/dist/model-viewer/index.js +3 -3
- 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/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.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/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/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +3 -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.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.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-QEQU3W2L.js +0 -29
- package/dist/CurrencyConverter-L22FF4ST.js +0 -21
- package/dist/Notepad-YZOEXYE3.js +0 -24
- package/dist/PomodoroTimer-6XHLOAJD.js +0 -91
- package/dist/Sidebar-UCCVJFSY.js +0 -44
- package/dist/chunk-ABPVCVCT.js +0 -22
- package/dist/chunk-BWQHABH7.js +0 -4
- package/dist/chunk-CILE3ZCC.js +0 -2
- package/dist/chunk-D4WO73XD.js +0 -91
- package/dist/chunk-FMLUQCFB.js +0 -2
- package/dist/chunk-GMLOMLCS.js +0 -24
- package/dist/chunk-HC5KQZFG.js +0 -8
- package/dist/chunk-IUVGHHR3.js +0 -1
- package/dist/chunk-JPE4TYRQ.js +0 -14
- package/dist/chunk-KGAYYSFE.js +0 -6
- package/dist/chunk-LQCNIQ3I.js +0 -8
- package/dist/chunk-LZOKBMAF.js +0 -1
- package/dist/chunk-OXWBSZL2.js +0 -23
- package/dist/chunk-PBSCF2ML.js +0 -15
- package/dist/chunk-QNXTVDIC.js +0 -11
- package/dist/chunk-UTQN5AIO.js +0 -6
- package/dist/chunk-XXTAMF3O.js +0 -28
package/dist/chunk-D4WO73XD.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import{computeMaximizedBox as e,isSidebarStripReserved as t,boxFillsWorkArea as n,readAlwaysMaximizedFlag as r,WORK_AREA_CHANGED_EVENT as o,scrollerIsFluid as i,growBoxToWidth as a,widthToFit as s,navIcons as l}from"./chunk-4LXCCZDM.js";import{reportBoundaryError as c}from"./chunk-KNUR2UEG.js";import{isStaleChunkError as u}from"./chunk-JDCM2VHG.js";import{WindowInsetContext as d,NO_WINDOW_DRAG as h}from"./chunk-YI4T5I5D.js";import{Result as m}from"./chunk-M2TQOJ3G.js";import{CMD_Z as f,CMD_SHIFT_Z as p}from"./chunk-FBZUEZK7.js";import{CopyButton as w}from"./chunk-BG3C4ALM.js";import{confirm as y}from"./chunk-GMLOMLCS.js";import{useModalDragAside as g}from"./chunk-EIFNESXS.js";import{ItemCount as v}from"./chunk-SXHV5OLA.js";import{isInOverlayOver as b}from"./chunk-SF4IIV5Z.js";import{dialogA11y as x}from"./chunk-VWGWZY7A.js";import{ColoredBadge as k}from"./chunk-WRV6QKJN.js";import{ROW_HEIGHTS as E}from"./chunk-AW7TOB6N.js";import{LoadingSpinner as M}from"./chunk-4U5M37SF.js";import{activationOrder as C,activeListeners as S,ModalActionsContext as L,subscribeActive as N,getActiveModalId as T,KEY_ACTIVATED_SELECTOR as z}from"./chunk-F3ZOO23R.js";import{useShellAuth as A}from"./chunk-2QY5BJLA.js";import{useIsMobile as D,useIsPhone as I}from"./chunk-UGTRSRIW.js";import{useShellPrefs as P}from"./chunk-DPFEQQQU.js";import{focusableIn as R}from"./chunk-DWGYC7OD.js";import{StatusBadge as O}from"./chunk-YDJ5IZOU.js";import{PopupMenu as $,PopupMenuItem as W,PopupMenuDivider as K,PopupMenuLabel as j}from"./chunk-THAPVKEJ.js";import{Button_default as F}from"./chunk-UTISUEO4.js";import{Icon as B}from"./chunk-ISVODSRP.js";import{LoadingSpinner as q}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as H}from"./chunk-62LW225J.js";import{shellHttp as U,isShellHttpConfigured as Y}from"./chunk-STKJA4PV.js";import{fitBoxScale as X,fitFrameStyle as V}from"./chunk-M6UKCZHT.js";import{runEscapeInterceptors as G}from"./chunk-TWVUQUUD.js";import{useShellStrings as J}from"./chunk-IUVGHHR3.js";import{createContext as _,createElement as Z,useContext as Q,Component as ee,useLayoutEffect as te,useRef as ne,useEffect as re,useState as oe,useSyncExternalStore as ie,useCallback as ae,isValidElement as se,Fragment as le,Children as ce,cloneElement as ue,useMemo as de,useId as he,useReducer as me,Suspense as fe}from"react";import{jsxs as pe,jsx as we,Fragment as ye}from"react/jsx-runtime";import{createPortal as ge}from"react-dom";import{useLocation as ve}from"react-router-dom";import{useQueryClient as be,useQuery as xe}from"@tanstack/react-query";function ke(e){return"component"in e}function Ee(e){return"endpoint"in e}var Me={};function Ce(e){Me=e}var Se=new Proxy({},{get:(e,t)=>Me[t],has:(e,t)=>t in Me,ownKeys:()=>Object.keys(Me),getOwnPropertyDescriptor(e,t){if(t in Me)return{configurable:!0,enumerable:!0,value:Me[t]}}});function Le(){return Y()}var Ne=U,Te=_({});function ze({value:e,children:t}){return Z(Te.Provider,{value:e},t)}function Ae(){return Q(Te)}var De=_(null);function Ie(){return Q(De)?.pageSearch??""}var Pe=null,Re=/* @__PURE__ */new Set;function Oe(e){Pe!==e&&(Pe=e,Re.forEach(e=>e()))}function $e(){return Pe}function We(e){return Re.add(e),()=>{Re.delete(e)}}var Ke=null;function je(e){Ke=e}function Fe({error:e,onReload:t}){const n=u(e);/* @__PURE__ */
|
|
2
|
-
return pe("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[
|
|
3
|
-
/* @__PURE__ */we(B,{name:"warning",className:"h-8 w-8 text-amber-500",strokeWidth:1.5}),
|
|
4
|
-
/* @__PURE__ */pe("div",{className:"min-w-0",children:[
|
|
5
|
-
/* @__PURE__ */we("p",{className:"text-sm font-medium text-gray-700",children:n?"This window needs the latest version of the app":"This window crashed"}),
|
|
6
|
-
/* @__PURE__ */we("p",{className:"mt-1 text-xs text-gray-400 max-w-sm break-words",children:n?"A new version was deployed while this tab was open. Reload the page to pick it up.":e.message||String(e)})]}),
|
|
7
|
-
/* @__PURE__ */we("button",{type:"button",onClick:n?()=>window.location.reload():t,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 text-sm font-medium rounded-lg",children:n?"Reload page":"Reload window"})]})}var Be=class extends ee{state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){console.error("[efficient-shell] window content crashed:",e,t.componentStack),c(e)}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):/* @__PURE__ */we(Fe,{error:e,onReload:this.reset}):this.props.children}},qe=_(null),He="text-xs text-gray-500 hover:text-gray-700 disabled:opacity-40 disabled:hover:text-gray-500 disabled:cursor-default";function Ue({className:e="",auto:t=!1}){const n=Q(qe),r=J().undo,o=n?.claimOwnMount;if(te(()=>{if(!t&&o)return o(!0),()=>o(!1)},[t,o]),!n||!n.enabled)return null;const{undo:i,redo:a,canUndo:s,canRedo:l,undoLabel:c,redoLabel:u}=n;/* @__PURE__ */
|
|
8
|
-
return pe("div",{className:`flex items-center gap-2 ${e}`,"data-undo-controls":t?"shell":"form",children:[
|
|
9
|
-
/* @__PURE__ */we("button",{type:"button",onClick:i,disabled:!s,title:s?r.undoStep(c??"",f):r.nothingToUndo,className:He,children:r.undo}),
|
|
10
|
-
/* @__PURE__ */we("button",{type:"button",onClick:a,disabled:!l,title:l?r.redoStep(u??"",p):r.nothingToRedo,className:He,children:r.redo})]})}var Ye=/* @__PURE__ */new Set([408,429]);function Xe(e){const t=e?.response?.status;return"number"==typeof t?t:void 0}function Ve(e){const t=Xe(e);return null!=t&&(t>=400&&t<500&&!Ye.has(t))}function Ge(e,t){return!Ve(t)&&e<3}function Je(e){if("page"!==e.type)return!0;const t=e.route?Se[e.route]:void 0;if(!t||!ke(t))return!0;const n=t;return!n.widget&&!n.utility}function _e(e){const t=e.route?Se[e.route]:void 0;if(!t||!ke(t))return;const n=t;return n.taskbarGroup?n.taskbarGroup:{key:e.route,label:n.label,icon:e.route}}var Ze=(e,t)=>!!t&&"page"===e.type&&e.route===t;var Qe="flex-1 min-h-0";function et(){const e=J().record;/* @__PURE__ */
|
|
11
|
-
return we(q,{label:e.loading,padding:"",className:Qe})}function tt(e){return e??void 0}function nt({isPending:e,isFetching:t,enabled:n=!0,error:r,onRetry:o}){const i=J().record;if(t||e&&n)/* @__PURE__ */return we(et,{});if(r){const e=Xe(r);if(401===e)/* @__PURE__ */
|
|
12
|
-
return we(m,{status:"warning",title:i.signInRequired,subTitle:i.signInBody,className:Qe});if(403===e)/* @__PURE__ */
|
|
13
|
-
return we(m,{status:"403",className:Qe});if(404===e||410===e)/* @__PURE__ */
|
|
14
|
-
return we(m,{status:"404",title:i.notFound,className:Qe});const t=null==e||408===e||429===e||e>=500;/* @__PURE__ */
|
|
15
|
-
return we(m,{status:"500",title:i.loadFailed,subTitle:t?i.checkConnection:i.rejected,extra:t?/* @__PURE__ */we(F,{variant:"secondary",size:"sm",onClick:o,children:i.retry}):void 0,className:Qe})}/* @__PURE__ */
|
|
16
|
-
return we(m,{status:"404",title:i.notFound,className:Qe})}function rt({entity:e,children:t,...n}){return null!=e?/* @__PURE__ */we(ye,{children:t(e)}):/* @__PURE__ */we(nt,{...n})}var ot=/^[a-z]+(?:-[a-z]+)*-\d{13}$/;function it(e){return"string"==typeof e&&(e.startsWith("new-")||ot.test(e))}function at(e){if(it(e.entityId))return!0;const t=e.entitySnapshot;return!(!t||"object"!=typeof t||!t._new&&!t._duplicate)}var st=_({openWindows:[],openEntity:()=>{},openPage:()=>{},reorderWindows:()=>{},closeEntity:()=>{},minimize:()=>{},items:[],restore:()=>{},remove:()=>{},restoreIfMinimized:()=>!1,openItems:[]}),lt=_(null);function ct(e){const t=Q(lt),n=ne(null);null===n.current&&(n.current=/* @__PURE__ */Symbol("window-dirty")),te(()=>{if(t)return t(n.current,e)},[t,e]),re(()=>{if(!t||!e)return;const n=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t,e])}function ut(){const e=ne(/* @__PURE__ */new Map),[t,n]=oe(!1);return{dirty:t,registerDirty:ae((t,r)=>{const o=()=>{const t=Array.from(e.current.values()).some(Boolean);n(e=>e===t?e:t)};return e.current.set(t,r),o(),()=>{e.current.delete(t),o()}},[])}}function dt(){return Q(st)}function ht(e){if("page"!==e.type&&at(e))return null;const t="page"===e.type?"page":e.entityType||"",n="page"===e.type?e.route||"":e.entityId||"";return t&&n?{entityType:t,entityId:n,label:e.label}:null}function mt({item:e,onClose:t,accentRgb:n}){const{dirty:r,registerDirty:o}=ut(),i=Se[e.route];if(!i||!ke(i))return null;const a=i,s=a.component;/* @__PURE__ */
|
|
17
|
-
return we(io,{open:!0,onClose:t,icon:l[e.route],title:a.label,size:a.size||"2xl",dirty:r,allowPinOnTop:a.allowPinOnTop,initialPosition:a.initialPosition,widget:a.widget,compact:a.compact,appStyle:a.appStyle,flushBody:a.flushBody,autoHeight:a.autoHeight,autoMinHeight:a.autoMinHeight,autoWidth:a.autoWidth,dimensions:a.dimensions,windowKey:e.id,openedFromKey:e.openedFrom,accentRgb:n,children:/* @__PURE__ */we(lt.Provider,{value:o,children:/* @__PURE__ */we(fe,{fallback:/* @__PURE__ */we("div",{className:"flex items-center justify-center py-12",children:/* @__PURE__ */we(M,{})}),children:/* @__PURE__ */we(s,{})})})})}function ft({entityType:e,entityId:t,label:n}){const r=J(),o=be(),{data:i}=xe({queryKey:["my-profile-sidebar"],enabled:Le(),queryFn:()=>Ne.get("/auth/me/").then(e=>e.data)}),a=(i?.preferences||{}).favorite_documents||[],s=a.some(n=>n.entityType===e&&n.entityId===t);/* @__PURE__ */
|
|
18
|
-
return we("button",{onClick:()=>{const r=s?a.filter(n=>!(n.entityType===e&&n.entityId===t)):[...a,{entityType:e,entityId:t,label:n}];Ne.patch("/auth/me/",{preferences:{favorite_documents:r}}).then(()=>{o.invalidateQueries({queryKey:["my-profile-sidebar"]})})},title:s?r.taskbar.removeFromDesktop:r.taskbar.addToDesktop,className:"shrink-0 transition-colors "+(s?"text-yellow-500 hover:text-yellow-600":"text-gray-300 hover:text-yellow-400"),children:/* @__PURE__ */we(B,{name:"star",className:"h-4 w-4",fill:s?"currentColor":"none",strokeWidth:1.5})})}var pt=/* @__PURE__ */new Set,wt=()=>"hidden";function yt({item:e,onClose:t,onMinimize:n,accentRgb:r}){const o=Se[e.entityType];if(!o||!Ee(o))return null;const i=o,[a,s]=oe(!1),{dirty:c,registerDirty:u}=ut(),d=i.queryKey||i.endpoint.replace(/^\/|\/$/g,"").split("/").pop()||e.entityType,h=e.entitySnapshot?._duplicate,m=it(e.entityId),f=Ae(),p=(w=e.id,ie(N,()=>{const e=Xn.get(w);return null!=e&&Fn.has(e)}));var w;const y=!i.selfFetching&&!h&&!m&&Le(),g=xe({queryKey:[d,e.entityId],queryFn:()=>{return Ne.get((t=i.endpoint,n=String(e.entityId),`${t}${encodeURIComponent(n)}/`)).then(e=>e.data);var t,n},initialData:tt(e.entitySnapshot),initialDataUpdatedAt:0,enabled:y,staleTime:0,refetchOnWindowFocus:()=>{return void 0===(e=f.entityRefetchOnWindowFocus)||("function"==typeof e?e():e);var e},refetchOnMount:"always",refetchInterval:e=>function(e,t={}){if(Ve(e))return!1;if(t.minimized)return!1;const n=t.hostInterval;if(void 0===n)return 6e4;const r="function"==typeof n?n():n;return"number"==typeof r&&r>0&&r}(e.state.error,{minimized:p,hostInterval:f.entityRefetchInterval}),refetchIntervalInBackground:!1,retry:Ge}),v=g.data,b=g.refetch;re(()=>{var t;if(y)return t=t=>{t!==e.id||pt.has(t)||b({cancelRefetch:!1})},lr.add(t),()=>{lr.delete(t)}},[b,e.id,y]);const x=ae(()=>{a&&!c?s(!1):t()},[a,c,t]),k=(i.useEdit??wt)(v??null),E=!i.useEdit||m||h?void 0:{state:k,editing:a,onEdit:()=>s(!0),onDiscard:()=>s(!1)},C=i.selfFetching?e.label:v?i.title(v,a,s):e.label,S=i.icon,L=S?l[S]:null,T=C,z=!i.selfFetching&&v&&i.footer&&!h?i.footer(v):void 0;return i.rendersOwnModal?i.selfFetching?/* @__PURE__ */we(fe,{fallback:/* @__PURE__ */we(M,{}),children:i.render(v??e.entitySnapshot,t,e.entityId,a,s)}):null!=v?/* @__PURE__ */we(fe,{fallback:/* @__PURE__ */we(io,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */we(et,{})}),children:i.render(v,t,e.entityId,a,s)}):/* @__PURE__ */we(io,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */we(nt,{isPending:g.isPending,isFetching:g.isFetching,enabled:y,error:g.error,onRetry:b})}):/* @__PURE__ */we(io,{open:!0,onClose:x,onMinimize:n,initialBox:e.savedBox,icon:L,title:T,footer:z,copyText:e.label,windowKey:e.id,openedFromKey:e.openedFrom,size:i.size||"2xl",dirty:c,editing:a||m||h,edit:E,dimensions:i.dimensions,autoHeight:i.autoHeight,autoMinHeight:i.autoMinHeight,autoWidth:i.autoWidth,appStyle:i.appStyle,flushBody:i.flushBody,accentRgb:r,children:/* @__PURE__ */we(lt.Provider,{value:u,children:/* @__PURE__ */we(fe,{fallback:/* @__PURE__ */we(et,{}),children:i.selfFetching?i.render(null,t,e.entityId,a,s):/* @__PURE__ */we(rt,{entity:v,isPending:g.isPending,isFetching:g.isFetching,enabled:y,error:g.error,onRetry:b,children:n=>i.render(n,t,e.entityId,a,s)})})})})}function gt(e){return document.querySelector(`[data-modal-panel][data-window-key="${e}"]`)}function vt(e){return document.querySelector(`[data-modal-panel][data-window-root][data-window-owner="${e}"]`)}function bt(e){const t=gt(e),n=t??vt(e);if(!n)return;if(t&&!Er(t))return r=e,void window.dispatchEvent(new CustomEvent("modal-reveal",{detail:{windowKey:r}}));var r;const o=n.getAttribute("data-modal-id");o&&cr(o)}function xt(){const e=T();if(!e)return;const t=document.querySelector(`[data-modal-panel][data-modal-id="${e}"]`);return t?.getAttribute("data-window-key")??void 0}var kt=/* @__PURE__ */new Map;function Et(){const e=xt();if(e)return kt.get(e)}function Mt(e){const t=document.querySelectorAll("[data-modal-panel]");for(const n of Array.from(t)){const t=n.querySelector("[data-window-title]");if(t?.textContent?.includes(e))return n}return null}var Ct="rosh-peek-style",St=H.peek,Lt=H.taskbarPreview;function Nt(e){"undefined"!=typeof document&&(!function(){if("undefined"==typeof document||document.getElementById(Ct))return;const e=document.createElement("style");e.id=Ct,e.textContent=`body.rosh-peeking [data-modal-panel]{transition:opacity .18s ease}body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.4}body.rosh-peeking [data-modal-panel][data-peek-focus]{opacity:1}body.rosh-peeking [data-modal-panel][data-peek-focus]:not([data-pinned-top]){z-index:${St}!important}html.rosh-reduce-transparency body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.92}@media (prefers-reduced-motion:reduce){body.rosh-peeking [data-modal-panel]{transition:none}}`,document.head.appendChild(e)}(),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")),e&&e.setAttribute("data-peek-focus",""),document.body.classList.toggle("rosh-peeking",!!e))}function Tt(){"undefined"!=typeof document&&(document.body.classList.remove("rosh-peeking"),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")))}function zt({id:e,label:t,maxW:n,maxH:r,titleAbove:o=!1,onClick:i,onClose:a}){const s=J(),l=ne(null),[c,u]=oe({w:n,h:Math.round(.75*r)}),[d,h]=oe(!1);return te(()=>{const o=l.current;if(!o)return;const i=gt(e)??Mt(t);if(!i)return void h(!1);const a=i.getBoundingClientRect();if(0===a.width||0===a.height)return void h(!1);const s=X({width:n,height:r},a),c=Math.max(80,Math.round(a.width*s)),d=Math.max(60,Math.round(a.height*s));u({w:c,h:d}),h(!0);const m=i.cloneNode(!0);m.style.position="absolute",m.style.top="0",m.style.left="0",m.style.right="auto",m.style.bottom="auto",m.style.width=a.width+"px",m.style.height=a.height+"px";const f=V(a.width,s);return Object.assign(m.style,{transform:f.transform??"",transformOrigin:f.transformOrigin}),m.style.pointerEvents="none",m.style.animation="none",m.style.zIndex="auto",m.removeAttribute("data-modal-panel"),m.removeAttribute("data-modal-id"),m.removeAttribute("data-window-key"),m.removeAttribute("role"),m.removeAttribute("aria-labelledby"),m.removeAttribute("aria-label"),m.querySelectorAll('[role="dialog"], [data-portal]').forEach(e=>{e.style.display="none"}),o.innerHTML="",o.appendChild(m),()=>{o.innerHTML=""}},[e,t,n,r]),/* @__PURE__ */pe("div",{style:{width:c.w,height:c.h},className:"relative rounded-md overflow-hidden bg-white/95 border border-line-strong shadow-(--elevation-panel) cursor-pointer ring-2 ring-transparent group-hover:ring-blue-400 transition shrink-0",onClick:i,children:[
|
|
19
|
-
/* @__PURE__ */we("div",{ref:l,className:"absolute inset-0 z-0 overflow-hidden"}),!d&&/* @__PURE__ */pe("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-gray-400 bg-gray-50",children:[
|
|
20
|
-
/* @__PURE__ */we(B,{name:"window",className:"h-6 w-6",strokeWidth:1.5}),
|
|
21
|
-
/* @__PURE__ */we("span",{className:"mt-1 text-3xs uppercase tracking-wide",children:"Hidden"})]}),!o&&/* @__PURE__ */we("div",{className:"absolute bottom-0 left-0 right-0 z-10 px-2 py-1 text-2xs font-medium text-on-accent bg-gradient-to-t from-black/80 to-transparent truncate pointer-events-none",children:t}),a&&/* @__PURE__ */we("button",{onClick:e=>{e.stopPropagation(),a()},className:"absolute top-1 right-1 z-20 h-5 w-5 rounded-full bg-gray-900/90 ring-1 ring-white/80 shadow-sm hover:bg-red-500 text-on-accent flex items-center justify-center",title:s.taskbar.closeWindow,children:/* @__PURE__ */we(B,{name:"close",className:"h-3 w-3",strokeWidth:3})})]})}function At({items:e,anchorEl:t,onActivate:n,onClose:r,onMouseEnter:o,onMouseLeave:i}){const a=J(),s=e.length>1,l=ne(null),[c,u]=oe({left:-9999,top:-9999,ready:!1}),[d,h]=oe(()=>"undefined"!=typeof document&&getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom");te(()=>{const e=l.current;if(!e)return;const n=()=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";h(o);let i,a=n.left+n.width/2-r.width/2;"top"===o?i=n.bottom+8:"left"===o?(a=n.right+8,i=n.top+n.height/2-r.height/2):"right"===o?(a=n.left-r.width-8,i=n.top+n.height/2-r.height/2):i=n.top-r.height-8,a=Math.max(8,Math.min(a,window.innerWidth-r.width-8)),i=Math.max(8,Math.min(i,window.innerHeight-r.height-8)),u({left:a,top:i,ready:!0})};n();const r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t,e.length]),re(()=>Tt,[]);const m="top"===d,f=(m?"mt-1":"mb-1")+" max-w-[240px] truncate text-2xs font-medium text-ink-strongest bg-white/80 px-2 py-0.5 rounded shadow-sm ring-2 ring-transparent transition group-hover:ring-blue-400";return ge(
|
|
22
|
-
/* @__PURE__ */we("div",{ref:l,"data-taskbar-preview":"",style:{position:"fixed",left:c.left,top:c.top,zIndex:Lt,maxWidth:"calc(100vw - 16px)",opacity:c.ready?1:0},className:s?"flex gap-2 flex-wrap":"",onMouseEnter:o,onMouseLeave:()=>{Tt(),i()},children:e.map(e=>{const t=gt(e.id)??Mt(e.label),o=t?function(e){if(Er(e))return null;const t=e.getBoundingClientRect(),n=fr(),r=t.left+t.width/2-(n.x+n.w/2),o=t.top+t.height/2-(n.y+n.h/2);return 180*Math.atan2(o,r)/Math.PI}(t):null;/* @__PURE__ */
|
|
23
|
-
return pe("div",{className:"group flex flex-col items-center",onMouseEnter:()=>Nt(t),children:[!m&&/* @__PURE__ */we("span",{className:f,children:e.label}),
|
|
24
|
-
/* @__PURE__ */we(zt,{id:e.id,label:e.label,maxW:240,maxH:160,titleAbove:!0,onClick:()=>n(e.id),onClose:()=>r(e.id)}),m&&/* @__PURE__ */we("span",{className:f,children:e.label}),null!==o&&/* @__PURE__ */pe("span",{title:a.taskbar.offscreenHint,className:"mt-1 inline-flex items-center gap-1 rounded bg-amber-500 px-2 py-0.5 text-2xs font-semibold text-on-accent shadow-sm",children:[
|
|
25
|
-
/* @__PURE__ */we(B,{name:"arrow-right",className:"h-3 w-3",style:{transform:`rotate(${o}deg)`},strokeWidth:3}),"Off screen"]})]},e.id)})}),document.body)}function Dt(e,t){const n=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";return"top"===n?{left:Math.min(e,window.innerWidth-220),top:t+4}:"left"===n?{left:e+4,top:Math.min(t,window.innerHeight-160)}:"right"===n?{right:window.innerWidth-e+4,top:Math.min(t,window.innerHeight-160)}:{left:Math.min(e,window.innerWidth-220),bottom:window.innerHeight-t+4}}function It({openWindows:e,onRemove:t,onSplitView:n,onActivate:r,onActivateById:o}){const i=J(),[a,s]=oe(null);re(()=>{let e,t;const n=()=>{clearInterval(e),clearTimeout(t),e=void 0},r=()=>{const e=document.getElementById("taskbar-windows");return s(t=>t===e?t:e),!!e},o=()=>{n(),r()||(e=setInterval(()=>{r()&&n()},100),t=setTimeout(n,5e3))};return o(),window.addEventListener("react-os-shell:layout-mode-changed",o),()=>{n(),window.removeEventListener("react-os-shell:layout-mode-changed",o)}},[]);const c=ie(N,T),[,u]=oe(0);re(()=>{const e=()=>u(e=>e+1);return window.addEventListener("modal-geometry",e),window.addEventListener("resize",e),()=>{window.removeEventListener("modal-geometry",e),window.removeEventListener("resize",e)}},[]);const[,d]=oe(0);re(()=>{const e=()=>d(e=>e+1);return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[]);const h=e=>{const t=Mt(e),n=t?.querySelector("[data-window-title]");return n?.textContent?.trim()||e},[m,f]=oe(null),[p,w]=oe(null),[y,g]=oe(null),b=ne(null),x=()=>{b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{f(null),w(null)},150)},k=e.filter(e=>!e.route||!Se[e.route]?.utility);if(!a||!a.isConnected||0===k.length)return null;const E=[],M=/* @__PURE__ */new Map;for(const e of k){const t=e.route?Se[e.route]:void 0,n=t?.taskbarGroup,r=n?.key??e.route??`entity:${e.id}`,o=M.get(r);if(void 0!==o)E[o].items.push(e);else{M.set(r,E.length);const o=n?.label??t?.label??e.label;E.push({key:r,route:n?.icon??e.route,label:o,items:[e]})}}return ge(
|
|
26
|
-
/* @__PURE__ */pe(ye,{children:[E.map(e=>{const n=e.route?l[e.route]:null,r=e.items[e.items.length-1];let a=!1;if(c){const t=document.querySelector(`[data-modal-id="${c}"]`);if(t){const n=t.querySelector("[data-window-title]"),r=n?.textContent??"";a=e.items.some(e=>r.includes(e.label))}}const s=e.items.length>1,u=e.items.some(e=>{const t=gt(e.id)??Mt(e.label);return!!t&&!Er(t)});/* @__PURE__ */
|
|
27
|
-
return pe("button",{onClick:()=>o(r.id),onMouseEnter:t=>{return n=e.items,r=t.currentTarget,void(y||(b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{f(n),w(r)},350)));var n,r},onMouseLeave:x,onDoubleClick:e=>{e.stopPropagation(),window.dispatchEvent(new CustomEvent("modal-center",{detail:{windowKey:r.id,label:r.label}}))},onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),b.current&&(clearTimeout(b.current),b.current=null),f(null),w(null),s?g({x:t.clientX,y:t.clientY,items:e.items,label:e.label}):window.dispatchEvent(new CustomEvent("modal-context-menu",{detail:{windowKey:r.id,label:r.label,x:t.clientX,y:t.clientY}}))},style:{width:"var(--window-tab-width, 200px)",fontSize:"var(--window-tab-font-size, 12px)"},"data-tab-group":e.key,className:"group relative flex items-center gap-2 rounded-lg px-3 py-2 font-medium transition-all min-w-0 shrink "+(a?"bg-blue-100/60 border border-blue-400/60 text-blue-700":"bg-gray-50/40 border border-gray-200/40 text-gray-700 hover:bg-gray-200/40"),children:[n&&se(n)?ue(n,{className:"h-3.5 w-3.5 shrink-0"}):/* @__PURE__ */we(B,{name:"expand",className:"h-3.5 w-3.5 shrink-0",strokeWidth:2}),
|
|
28
|
-
/* @__PURE__ */we("span",{className:"truncate flex-1",children:s?e.label:h(r.label)}),u&&/* @__PURE__ */we("span",{title:i.taskbar.offscreenDot,className:"shrink-0 h-1.5 w-1.5 rounded-full bg-amber-500"}),s&&/* @__PURE__ */we(v,{count:e.items.length,label:i.count.windows(e.items.length)}),!s&&/* @__PURE__ */we("span",{role:"button",onClick:e=>{e.stopPropagation(),t(r.id)},className:"ml-auto text-gray-400 hover:text-red-500 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:/* @__PURE__ */we(B,{name:"close",className:"h-3 w-3",strokeWidth:2})})]},e.key)}),
|
|
29
|
-
/* @__PURE__ */we("div",{className:"flex-1"}),k.length>=2&&/* @__PURE__ */pe("button",{onClick:n,title:i.taskbar.expose,className:"flex items-center gap-1 rounded px-2 py-1 text-2xs font-medium text-blue-600 border border-blue-300 hover:bg-accent-tint transition-colors shrink-0",children:[
|
|
30
|
-
/* @__PURE__ */we(B,{name:"grid",className:"h-3 w-3",strokeWidth:2}),"Exposé"]}),y&&/* @__PURE__ */pe($,{portal:!0,minWidth:200,style:Dt(y.x,y.y),onClose:()=>g(null),children:[
|
|
31
|
-
/* @__PURE__ */we(j,{children:y.label}),
|
|
32
|
-
/* @__PURE__ */pe(W,{onClick:()=>{g(null),y.items.forEach(e=>function(e){const t=Xn.get(e);t&&ur(t)}(e.id))},children:[
|
|
33
|
-
/* @__PURE__ */we(B,{name:"remove",className:"h-4 w-4",strokeWidth:1.5}),i.taskbar.minimizeAllWindows]}),
|
|
34
|
-
/* @__PURE__ */pe(W,{onClick:()=>{g(null),y.items.forEach(e=>o(e.id))},children:[
|
|
35
|
-
/* @__PURE__ */we("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */we("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75h6.5v6.5h-6.5zM13.75 8.75h6.5v6.5h-6.5z"})}),i.taskbar.restoreAllWindows]}),
|
|
36
|
-
/* @__PURE__ */we(K,{}),
|
|
37
|
-
/* @__PURE__ */pe(W,{danger:!0,onClick:()=>{g(null),y.items.forEach(e=>t(e.id))},children:[
|
|
38
|
-
/* @__PURE__ */we(B,{name:"close",className:"h-4 w-4",strokeWidth:2}),`${i.taskbar.closeAllWindows} (${y.items.length})`]})]}),m&&p&&/* @__PURE__ */we(At,{items:m,anchorEl:p,onActivate:e=>{o(e),f(null),w(null)},onClose:e=>{t(e),f(null),w(null)},onMouseEnter:()=>{b.current&&(clearTimeout(b.current),b.current=null)},onMouseLeave:x})]}),a)}var Pt=["/login","/forgot-password","/reset-password","/force-change-password"];function Rt({children:e,windowAccentForRoute:t}){const n=ve(),r=Pt.some(e=>n.pathname.startsWith(e)),[o,i]=oe([]),a=ne(o);te(()=>{a.current=o},[o]);const s=ie(We,$e,$e),l=ne(/* @__PURE__ */new Map),c=e=>{const t=Je(e),n=!!s&&"page"===e.type&&e.route===s,r=e.pageSearch||void 0,o=l.current.get(e.id);if(o&&o.tab===t&&o.home===n&&o.pageSearch===r)return o;const i={key:e.id,tab:t,home:n,...r?{pageSearch:r}:{}};return l.current.set(e.id,i),i};re(()=>{kt.clear();for(const e of o)e.route&&kt.set(e.id,e.route)},[o]);const u=ae(e=>{i(t=>t.filter(t=>t.id!==e))},[]),d=ae(e=>{var t;gt(e)||vt(e)?(t=e,window.dispatchEvent(new CustomEvent($r,{detail:{windowKey:t}}))):u(e)},[u]),h=(e,t=!1)=>{const n=Bn;t&&pt.add(e),setTimeout(()=>{const r=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`),o=r?.getAttribute("data-modal-id");var i,a;!o||(i=o,a=n,(qn.get(i)??-1)>a)||cr(o),t&&pt.delete(e)},50)},m=(e,t,n)=>{const r=Ke;if(n||!r)return[...e,t];const o=function(e,t,n){if(!Je(t))return e.length;if(t.shellOwned&&Ze(t,n.home))return 0;const r=Ze(t,n.home)?void 0:_e(t)?.key;if(r){let t=-1;if(e.forEach((e,o)=>{Je(e)&&!Ze(e,n.home)&&_e(e)?.key===r&&(t=o)}),t>=0)return t+1}if("page"===t.type&&t.route&&!Ze(t,n.home)&&n.favorites.includes(t.route))return e.length>0&&Ze(e[0],n.home)?1:0;const o=t.openedFrom?e.findIndex(e=>e.id===t.openedFrom):-1;if(o>=0){const t=/* @__PURE__ */new Set([e[o].id]);let r=o+1;for(;r<e.length&&e[r].openedFrom&&t.has(e[r].openedFrom);)t.add(e[r].id),r++;const i=t=>Je(e[t])&&!Ze(e[t],n.home)?_e(e[t])?.key:void 0;for(;r>0&&r<e.length&&void 0!==i(r)&&i(r)===i(r-1);)r++;return r}return e.length}(e,t,{home:$e(),favorites:r.favorites});return[...e.slice(0,o),t,...e.slice(o)]},f=ae(e=>{i(t=>function(e,t){const n=new Set(t),r=new Map(e.map(e=>[e.id,e])),o=t.map(e=>r.get(e)).filter(e=>!!e);if(o.length!==n.size)return e;let i=0;const a=e.map(e=>n.has(e.id)?o[i++]:e);return a.every((t,n)=>t===e[n])?e:a}(t,e))},[]),p=ae((e,t,n,r,o,a={})=>{if(!Se[e]||!Ee(Se[e]))return;const s=`${e}:${t}`,l=xt();i(i=>{const c=i.find(n=>n.entityType===e&&String(n.entityId)===String(t));return c?(h(c.id),i):(h(s,!0),m(i,{id:s,type:"modal",label:r||t,route:o||window.location.pathname,entityType:e,entityId:t,entitySnapshot:tt(n),openedFrom:l},!!a.append))})},[]),w=ae((e,t={})=>{if(!Se[e]||!ke(Se[e]))return;const n=Se[e],{reuse:r=!1,background:o=!1,shellOwned:s,search:l,append:c=!1}=t,u=e=>{var t;o?(t=e,Zn.add(t)):h(e)};if(n.widget){const t=a.current.find(t=>"page"===t.type&&t.route===e);if(t)return void d(t.id)}const f=xt();i(t=>{if(n.multiInstance){const i=t.filter(t=>"page"===t.type&&t.route===e);if(s&&i.length>0)return t;if(r&&!l&&i.length>0)return o||h(i[i.length-1].id),t;const a=`page:${e}:${Math.random().toString(36).slice(2,8)}`;return u(a),m(t,{id:a,type:"page",label:n.label,route:e,openedFrom:f,...s?{shellOwned:s}:{},...l?{pageSearch:l}:{}},c)}const i=t.find(t=>"page"===t.type&&t.route===e);if(i)return n.widget?t:(o||h(i.id),l&&i.pageSearch!==l?t.map(e=>e===i?{...e,pageSearch:l}:e):t);const a=`page:${e}`;return u(a),m(t,{id:a,type:"page",label:n.label,route:e,openedFrom:f,...s?{shellOwned:s}:{},...l?{pageSearch:l}:{}},c)})},[d]),y=ae(()=>{},[]),g=ae(()=>{},[]),v=d,b=d;/* @__PURE__ */
|
|
39
|
-
return pe(st.Provider,{value:{openWindows:o,openEntity:p,openPage:w,reorderWindows:f,closeEntity:v,minimize:y,items:[],openItems:o,restore:g,remove:b,restoreIfMinimized:()=>!1},children:[e,
|
|
40
|
-
/* @__PURE__ */we(It,{openWindows:o,onRemove:d,onSplitView:ro,onActivate:e=>{document.querySelectorAll("[data-modal-panel]").forEach(t=>{const n=t.querySelector("[data-window-title]");if(n?.textContent?.includes(e)){const e=t.getAttribute("data-modal-id");e&&cr(e)}})},onActivateById:bt}),
|
|
41
|
-
/* @__PURE__ */we(oo,{}),!r&&o.map(e=>{const n=e.route?t?.(e.route):void 0;
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
return we(De.Provider,{value:c(e),children:/* @__PURE__ */we(Be,{fallback:(t,n)=>/* @__PURE__ */we(io,{open:!0,onClose:()=>u(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */we(Fe,{error:t,onReload:n})}),children:/* @__PURE__ */we(hn,{spec:ht(e),children:/* @__PURE__ */we(mo,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */we(mt,{item:e,onClose:()=>u(e.id),accentRgb:n}):/* @__PURE__ */we(yt,{item:e,onClose:()=>u(e.id),onMinimize:()=>{},accentRgb:n})})})})},e.id)})]})}var Ot=400;function $t({panelRef:e,bodyRef:t,open:n,widget:r,active:o,minimized:i}){const a=ne(null),s=ne(!1);n&&!s.current&&(a.current="undefined"==typeof document?null:document.activeElement),s.current=n;const l=ne(!1),c=ne(void 0),u=ne(i),d=u.current&&!i;u.current=i;const h=()=>{l.current=!0,clearTimeout(c.current),c.current=setTimeout(()=>{l.current=!1},Ot)};re(()=>{n&&!r&&h()},[n,r]),re(()=>{d&&n&&!r&&h()},[d]),re(()=>()=>clearTimeout(c.current),[]),re(()=>{if(!n||r||!o||i||!l.current)return;l.current=!1;const a=e.current;if(!a||a.contains(document.activeElement))return;if(document.activeElement?.closest('[aria-modal="true"]'))return;const s=t.current?R(t.current)[0]:void 0;s?s.focus():(a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.focus())},[n,r,o,i,e,t]),te(()=>{if(!n||r)return;const t=e.current;return()=>{const e=a.current,n=document.activeElement;(!n||n===document.body||!!t?.contains(n))&&e&&e.isConnected&&!t?.contains(e)&&e.focus?.()}},[n,r,e])}var Wt=null,Kt=/* @__PURE__ */new Set;function jt(){return Wt}function Ft(e){if(Wt!==e){Wt=e;for(const e of Kt)e()}}function Bt(e){return Kt.add(e),()=>{Kt.delete(e)}}var qt=!1,Ht={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},Ut=()=>{};function Yt(e){qt=e,Ht={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function Xt(e,t){qt&&("submenu"===e?Ht.submenus++:Ht.menus++,Ht.menuKey=t)}function Vt(e){if(!qt)return Ut;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!qt)return;const r=performance.now()-t;"move"===e?Ht.moveMs+=r:Ht.resizeMs+=r}}function Gt(){const e=Ht;return Ht={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var Jt=/* @__PURE__ */new Set([O,k]),_t=e=>Jt.has(e)||"function"==typeof e&&"badge"===e.titleRole,Zt=/* @__PURE__ */new Set(["button","a","input","select","textarea","kbd"]),Qt=/* @__PURE__ */new Set(["svg"]);function en(e){const t=[],n={text:"",accessories:[],badges:[],actions:[]};return tn(e,n,t),n.text=t.join("").replace(/\s+/g," ").trim(),n}function tn(e,t,n){if(null==e||"boolean"==typeof e)return;if("string"==typeof e||"number"==typeof e)return void n.push(String(e));if(Array.isArray(e))return void e.forEach(e=>tn(e,t,n));if(!se(e))return;const r=e;if(r.type===w)return void(void 0===t.copy&&"string"==typeof r.props.text&&r.props.text&&(t.copy=r.props.text));if(r.type===le)return void ce.toArray(r.props.children).forEach(e=>tn(e,t,n));if("string"==typeof r.type){if(Qt.has(r.type))return;if(!Zt.has(r.type))return n.push(" "),ce.toArray(r.props.children).forEach(e=>tn(e,t,n)),void n.push(" ")}const o=ue(r,{key:`title-part-${t.accessories.length}`});t.accessories.push(o),(_t(r.type)?t.badges:t.actions).push(o)}var nn=/* @__PURE__ */new Map,rn=/* @__PURE__ */new Set,on=0;function an(){on++,rn.forEach(e=>e())}function sn(e){return nn.get(e)}function ln(e){return rn.add(e),()=>{rn.delete(e)}}function cn(){return on}var un=_(""),dn=_(null);function hn({spec:e,children:t}){/* @__PURE__ */
|
|
44
|
-
return we(dn.Provider,{value:e,children:t})}var mn=/* @__PURE__ */new Set(["button","input","textarea","select","kbd","svg"]),fn='button[type="submit"], button[data-submit], button.btn-submit, button.bg-green-600, button.bg-blue-600';function pn(e){return wn(e).replace(/\s+/g," ").trim()}function wn(e){if(null==e||"boolean"==typeof e)return"";if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(Array.isArray(e))return e.map(wn).join("");if(se(e)){const t=e,n="string"==typeof t.type?t.type:"";return mn.has(n)?"":` ${wn(t.props?.children)} `}return""}function yn(e){const t=Q(un);re(()=>{if(!t)return;const n=n=>{n.detail===t&&e()};return window.addEventListener("widget-open-settings",n),()=>window.removeEventListener("widget-open-settings",n)},[e,t])}var gn={};function vn(e,t,n){const r=Q(un);re(()=>{if(!r)return;gn[r]||(gn[r]=[]);const o={label:e,icon:n,onClick:t};return gn[r].push(o),()=>{gn[r]=(gn[r]||[]).filter(e=>e!==o)}},[r,e,t,n])}function bn({title:e}){const t=ne(null);return re(()=>{const n=setTimeout(()=>{const n=t.current?.closest("[data-modal-id]"),r=n?.getAttribute("data-modal-id");r&&window.dispatchEvent(new CustomEvent("window-title-update",{detail:{id:r,title:e}}))},0);return()=>clearTimeout(n)},[e]),/* @__PURE__ */we("span",{ref:t,style:{display:"none"},"aria-hidden":"true"})}function xn(e){}function kn(){return Q(un)}function En({children:e,position:t="right",quiet:n=!1}){const r=Q(L),[o,i]=oe(null);return re(()=>{if(!r)return;const e="left"===t?r.leftRef:r.rightRef,o=()=>!!e.current&&(i(e.current),n||r.notify(),!0);if(o())return;const a=setInterval(()=>{o()&&clearInterval(a)},50),s=setTimeout(()=>clearInterval(a),2e3);return()=>{clearInterval(a),clearTimeout(s)}},[r,t,n]),o?ge(e,o):null}function Mn({onClick:e,children:t,className:n}){const r=Q(L);/* @__PURE__ */
|
|
45
|
-
return we("button",{type:"button",onClick:async()=>{if(r?.isDirty){const{confirm:e}=await(import("./shell/ConfirmDialog.js"));if(!await e({title:"Discard changes?",message:"You have unsaved changes. Are you sure you want to cancel? All changes will be lost.",confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"}))return}e()},className:n||"bg-white text-gray-700 border border-gray-300 px-4 py-2 text-sm font-medium rounded-lg hover:bg-gray-50",children:t||"Cancel"})}var Cn="erp_window_positions",Sn={};try{const e=localStorage.getItem(Cn);e&&(Sn=JSON.parse(e))}catch{}var Ln=null;function Nn(){Ln&&clearTimeout(Ln),Ln=setTimeout(()=>{try{localStorage.setItem(Cn,JSON.stringify(Sn))}catch{}},500)}var Tn="erp_activation_order",zn=[];try{const e=localStorage.getItem(Tn),t=e?JSON.parse(e):null;Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(zn=t)}catch{}var An=null;function Dn(){An&&clearTimeout(An),An=setTimeout(()=>{try{localStorage.setItem(Tn,JSON.stringify(zn))}catch{}},500)}function In(e,t){Sn[e]||(Sn[e]=t,Nn())}function Pn(e){return Sn[e]?{...Sn[e]}:null}function Rn(e,t){Sn[e]=t,Nn()}function On(){const r=e(),o=t();let i=!1;for(const e of Object.keys(Sn))n(Sn[e],r,o)&&(delete Sn[e],i=!0);i&&Nn()}var $n={sm:384,md:512,lg:672,xl:896,"2xl":1152,"3xl":1408},Wn=4e3,Kn=()=>{if("undefined"==typeof document)return"large";const e=getComputedStyle(document.documentElement).getPropertyValue("--default-window-size")?.trim();return"small"===e||"medium"===e||"maximized"===e?e:"large"},jn={small:.8,medium:1,large:1.25,maximized:1.25},Fn=/* @__PURE__ */new Set,Bn=0,qn=/* @__PURE__ */new Map;var Hn=0;function Un(){return Hn}function Yn(){Hn++,S.forEach(e=>e())}var Xn=/* @__PURE__ */new Map,Vn=/* @__PURE__ */new Map,Gn=/* @__PURE__ */new Map;function Jn(){for(let e=C.length-1;e>=0;e--){const t=Gn.get(C[e]);if(t?.tab)return t.owner}return null}function _n(){return ie(N,Jn,()=>null)}var Zn=/* @__PURE__ */new Set;var Qn=null;function er(e){Qn=null,cr(e)}function tr(e){Qn=e;const t=Xn.get(e);t&&er(t)}var nr=/* @__PURE__ */new Map;function rr(e){return nr.get(e)?.holdsChanges()??!1}function or(e){const t=nr.get(e);return t?t.ask():Promise.resolve(!0)}function ir(e){Qn===e&&(Qn=null)}function ar(e,t,n){if(n&&Gn.set(e,n),t)if(Xn.set(t,e),Vn.set(e,t),Zn.delete(t)){C.unshift(e);const n=zn.indexOf(t);-1!==n&&zn.splice(n,1),zn.unshift(t),Dn()}else!function(e,t){const n=zn.indexOf(t);if(-1===n)return void C.push(e);let r=C.length;for(let e=0;e<C.length;e++){const t=Vn.get(C[e]);if(t&&zn.indexOf(t)>n){r=e;break}}C.splice(r,0,e)}(e,t),-1===zn.indexOf(t)&&(zn.push(t),Dn());else C.push(e);Yn(),window.dispatchEvent(new CustomEvent("modal-reorder")),t&&Qn===t&&er(e)}function sr(e){return e?Gn.get(e)?.owner??Vn.get(e)??null:null}var lr=/* @__PURE__ */new Set;function cr(e){const t=sr(T()),n=C.indexOf(e);-1!==n&&C.splice(n,1),C.push(e);const r=Gn.get(e);if(r?.root)for(const[e,t]of Gn){if(t.root||t.owner!==r.owner||Fn.has(e))continue;const n=C.indexOf(e);-1!==n&&C.splice(n,1),C.push(e)}Fn.delete(e);const o=Vn.get(e);if(o){const e=zn.indexOf(o);-1!==e&&zn.splice(e,1),zn.push(o),Dn(),Qn&&Qn!==o&&(Qn=null)}Yn(),window.dispatchEvent(new CustomEvent("modal-reorder"));const i=sr(T());i&&i!==t&&lr.forEach(e=>e(i))}function ur(e){const t=C.indexOf(e);-1!==t&&C.splice(t,1),Fn.add(e),qn.set(e,++Bn);const n=Vn.get(e);if(n){const e=zn.indexOf(n);-1!==e&&(zn.splice(e,1),Dn())}Yn(),window.dispatchEvent(new CustomEvent("modal-reorder"))}var dr=/* @__PURE__ */new Set;var hr=8,mr=32;function fr(){return e()}var pr="flex size-6 shrink-0 items-center justify-center rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",wr="flex size-3 items-center justify-center rounded-full text-gray-900/70",yr="size-2 opacity-0 group-hover/controls:opacity-100 group-focus-within/controls:opacity-100",gr=E.windowBar,vr=80,br=384,xr=400;function kr(e,t=fr()){const n=Math.min(Math.max(e.x,t.x+vr-e.w),t.x+t.w-vr),r=Math.min(Math.max(e.y,t.y),t.y+t.h-gr);return n===e.x&&r===e.y?e:{...e,x:n,y:r}}function Er(e){const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;const n=fr();return t.left>=n.x-1&&t.top>=n.y-1&&t.right<=n.x+n.w+1&&t.bottom<=n.y+n.h+1}function Mr(e){const t=fr(),n=Math.floor(t.w/2),r=Math.floor(t.h/2);switch(e){case"top":return{x:t.x,y:t.y,w:t.w,h:t.h};case"left":return{x:t.x,y:t.y,w:n,h:t.h};case"right":return{x:t.x+n,y:t.y,w:t.w-n,h:t.h};case"tl":return{x:t.x,y:t.y,w:n,h:r};case"tr":return{x:t.x+n,y:t.y,w:t.w-n,h:r};case"bl":return{x:t.x,y:t.y+r,w:n,h:t.h-r};case"br":return{x:t.x+n,y:t.y+r,w:t.w-n,h:t.h-r}}}var Cr=null;function Sr(e){const t=(Cr||((Cr=document.createElement("div")).style.cssText=["position: fixed","pointer-events: none",`z-index: ${H.snapPreview}`,"border-radius: 8px","background: rgba(59, 130, 246, 0.18)","border: 2px solid rgb(59, 130, 246)","transition: left 120ms ease, top 120ms ease, width 120ms ease, height 120ms ease, opacity 120ms ease","opacity: 0","display: none"].join(";"),document.body.appendChild(Cr)),Cr);t.style.display="block",t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,t.style.width=`${e.w}px`,t.style.height=`${e.h}px`,t.style.opacity="1"}function Lr(){Cr&&(Cr.style.opacity="0",Cr.style.display="none")}var Nr=[{zone:"left",labelKey:"snapLeft",region:"inset-y-0 left-0 w-1/2"},{zone:"right",labelKey:"snapRight",region:"inset-y-0 right-0 w-1/2"},{zone:"tl",labelKey:"snapTopLeft",region:"top-0 left-0 h-1/2 w-1/2"},{zone:"tr",labelKey:"snapTopRight",region:"top-0 right-0 h-1/2 w-1/2"},{zone:"bl",labelKey:"snapBottomLeft",region:"bottom-0 left-0 h-1/2 w-1/2"},{zone:"br",labelKey:"snapBottomRight",region:"bottom-0 right-0 h-1/2 w-1/2"}],Tr=350,zr=200;function Ar({maximized:e,onToggleMax:t,onSnap:n,buttonClassName:r,strings:o,children:i}){const[a,s]=oe(!1),l=ne(void 0),c=ne(void 0);re(()=>()=>{clearTimeout(l.current),clearTimeout(c.current)},[]);const u=()=>{clearTimeout(c.current),l.current=setTimeout(()=>s(!0),Tr)},d=()=>{clearTimeout(l.current),c.current=setTimeout(()=>s(!1),zr)};/* @__PURE__ */
|
|
46
|
-
return pe("span",{className:"relative inline-flex",onMouseEnter:u,onMouseLeave:d,children:[
|
|
47
|
-
/* @__PURE__ */we("button",{onClick:t,onFocus:u,onBlur:d,"aria-label":e?o.windowed:o.maximize,title:e?o.windowed:o.maximize,className:r,children:i}),a&&/* @__PURE__ */we("div",{role:"group","aria-label":o.snapLayouts,onMouseEnter:()=>clearTimeout(c.current),onMouseLeave:d,className:"absolute left-0 top-full z-30 mt-1 grid w-max grid-cols-2 gap-1 rounded-lg border border-line bg-surface p-2 shadow-lg",children:Nr.map(({zone:e,labelKey:t,region:r})=>/* @__PURE__ */we("button",{type:"button","aria-label":o[t],title:o[t],onClick:()=>{s(!1),n(e)},onFocus:()=>clearTimeout(c.current),onBlur:d,className:"relative h-7 w-11 rounded border border-gray-300 bg-gray-50 hover:border-blue-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",children:/* @__PURE__ */we("span",{"aria-hidden":"true",className:`absolute rounded-sm bg-blue-500/70 ${r}`,style:{margin:2}})},e))})]})}var Dr="rosh-gesture-style";var Ir={se:"nwse-resize",nw:"nwse-resize",sw:"nesw-resize",ne:"nesw-resize",n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize"},Pr=4;function Rr(e,t,n,r){!function(){if("undefined"==typeof document||document.getElementById(Dr))return;const e=document.createElement("style");e.id=Dr,e.textContent="body.rosh-gesturing [data-modal-panel]{will-change:transform}",document.head.appendChild(e)}();try{e.setPointerCapture(t)}catch{}document.body.classList.add("rosh-gesturing");const o=document.createElement("div");o.setAttribute("data-drag-shield",""),o.style.cssText=`position:fixed;inset:0;z-index:2147483647;cursor:${n};background:transparent;touch-action:none`,document.body.appendChild(o);const i=Vt(r);let a=!1;return()=>{if(!a){a=!0,i();try{e.releasePointerCapture(t)}catch{}o.remove(),document.body.classList.remove("rosh-gesturing")}}}function Or(e){const t=C.indexOf(e);if(-1===t)return-1;const n=H.window+t*H.windowStep,r=Gn.get(e);if(!r||r.root)return n;let o=-1;for(const[e,t]of Gn){if(!t.root||t.owner!==r.owner)continue;const n=C.indexOf(e);-1!==n&&(o=Math.max(o,H.window+n*H.windowStep))}return o>=n?o+2+Math.min(t,7):n}"undefined"!=typeof window&&window.addEventListener("deactivate-all-modals",function(){for(let e=C.length-1;e>=0;e--)dr.has(C[e])||C.splice(e,1);zn=zn.filter(e=>{const t=Xn.get(e);return null!=t&&dr.has(t)}),Dn(),Yn(),window.dispatchEvent(new CustomEvent("modal-reorder"))});var $r="modal-close-request";function Wr(e){ie(N,Un);const t=Q(L);if(C.length<=1)return!0;if(e){const t=Xn.get(e);if(null!=t)return T()===t}return t?.active??null!=T()}var Kr=!1,jr=/* @__PURE__ */new Set;function Fr(e){return jr.add(e),()=>jr.delete(e)}function Br(){return Kr}function qr(e){Kr!==e&&(Kr=e,jr.forEach(e=>e()))}function Hr(){qr(!Kr)}function Ur(){qr(!1)}var Yr=null,Xr=/* @__PURE__ */new Set;function Vr(e){return Xr.add(e),()=>Xr.delete(e)}function Gr(){return Yr}function Jr(e){Yr!==e&&(Yr=e,Xr.forEach(e=>e()))}var _r=null,Zr=/* @__PURE__ */new Set;function Qr(e){return Zr.add(e),()=>Zr.delete(e)}function eo(){return _r}function to(e){_r!==e&&(_r=e,Zr.forEach(e=>e()))}function no(){if(!_r)return void qr(!1);Jr(_r),to(null),qr(!1)}function ro(){qr(!Kr),window.dispatchEvent(new CustomEvent("modal-split-view"))}function oo(){const e=ie(Fr,Br),[t,n]=oe(e),[r,o]=oe(e);return re(()=>{if(e){n(!0);const e=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(e)}o(!1);const t=setTimeout(()=>n(!1),280);return()=>clearTimeout(t)},[e]),t&&"undefined"!=typeof document?ge(
|
|
48
|
-
/* @__PURE__ */we("div",{onMouseDown:e=>{e.stopPropagation(),qr(!1)},style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:H.expose,cursor:"pointer",opacity:r?1:0,transition:"opacity 260ms cubic-bezier(0.2, 0.8, 0.2, 1)",pointerEvents:r?"auto":"none"}}),document.body):null}function io({open:t,onClose:l,title:c,icon:u,copyText:m,size:f="lg",dirty:p=!1,onNext:w,onPrev:v,footer:k,bodyScroll:M,onMinimize:S,initialBox:A,actions:R,actionsLeft:O,editing:j=!1,edit:q,allowPinOnTop:U,initialPosition:Y,widget:V,compact:_,appStyle:Z,flushBody:ee,autoHeight:se,autoMinHeight:le,autoWidth:ce,widgetMenu:ue,dimensions:me,windowKey:fe,openedFromKey:ve,accentRgb:be,children:xe}){const[ke,Ee]=oe(()=>r()),Me=D()&&!ke,Ce=I()&&!!V,[Se,Le]=oe(0),[Ne,Te]=oe(!1),ze=ne(null),Ae=ne(0);re(()=>{Ae.current=Se},[Se]);const Ie=ae(e=>{Me&&(ze.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},Te(!0),Ft(ve??null))},[Me,ve]),Pe=ie(Bt,jt);re(()=>{if(!Ne)return;const e=e=>{if(!ze.current)return;const t=e.clientX-ze.current.startX;if(Math.abs(e.clientY-ze.current.startY)>Math.abs(t)+12)return ze.current=null,Te(!1),Le(0),void Ft(null);Le(Math.max(0,t))},t=()=>{if(!ze.current)return;const e=.3*window.innerWidth,t=Ae.current>e;ze.current=null,Te(!1),t?(Le(window.innerWidth),setTimeout(()=>{l(),Le(0),Ft(null)},180)):(Le(0),Ft(null))};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[Ne]);const[Re,Oe]=oe(c),$e=J(),We=$e.window;re(()=>{Oe(c)},[c]);const Ke=de(()=>pn(Re).trim()||void 0,[Re]),je=he(),[Fe,He]=oe(!1),Ye=ne(!1),[Xe,Ve]=oe(!1),[Ge,Je]=oe(null),_e=Q(dn),Ze=Q(De),{prefs:Qe,save:et}=P(),tt=!!Qe.window_accent_stripe,nt=Qe.favorite_documents||[],rt=!!_e&&nt.some(e=>e.entityType===_e.entityType&&e.entityId===_e.entityId),ot=ae(()=>{if(!_e)return;const e=rt?nt.filter(e=>!(e.entityType===_e.entityType&&e.entityId===_e.entityId)):[...nt,{entityType:_e.entityType,entityId:_e.entityId,label:_e.label}];et({favorite_documents:e})},[_e,rt,nt,et]),[it,at]=oe(null),[st,lt]=oe("top-right"===Y?"right":"left"),ut=ne(!1),ht=ne(null);te(()=>{const e=ht.current;e&&(be?e.style.setProperty("--window-accent-rgb",be):e.style.removeProperty("--window-accent-rgb"))},[be]);const mt=ne(!1),ft=ne(null),pt=ne(null),wt=ne(null),[yt,gt]=oe(!1),vt=ne(null),bt=ne(null),xt=ne(null),[kt,Et]=oe(!1);te(()=>{const e=bt.current,t=xt.current;if(!e||!t)return;const n=()=>Et(function(e,t){return e.scrollWidth>t.clientWidth}(t,e));if(n(),"undefined"==typeof ResizeObserver)return;const r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[null!=k&&!1!==k]);const Mt=!!q&&!V&&!_&&!Z&&(q.editing||"hidden"!==q.state),Ct=!!(k||R||O)||yt||Mt,St=Q(qe),Lt=""!==Q(un),Nt=ne(null);Nt.current=Ze?{owner:Ze.key,tab:Ze.tab,root:!Lt}:null;const Tt=fe||(Ze&&!Lt?Ze.key:null),zt=!!St&&!Lt&&St.enabled&&St.hasState&&(j||St.declaredEditable)&&!St.handMounted&&Ct&&!V&&!_&&!Z&&!Me,At=40,{minimize:Dt,items:It,restoreIfMinimized:Pt,openWindows:Rt}=dt(),Ot=ne(`modal-${Math.random().toString(36).slice(2,8)}`).current,Wt=g(Ot);re(()=>{if(V)return dr.add(Ot),()=>{dr.delete(Ot)}},[V,Ot]),re(()=>{const e=e=>{const t=e.detail;t?.id===Ot&&Oe(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[Ot]);const[Kt,qt]=oe(H.window),Ht=function(e){const t=ie(N,T);return C.length<=1||t===e}(Ot),Ut=ne(q);Ut.current=q;const Yt=!!q&&!q.editing&&"enabled"===q.state;re(()=>{if(!t||!Ht||!Yt)return;const e=e=>{("KeyE"===e.code||"E"===e.key||"e"===e.key)&&e.altKey&&e.shiftKey&&!e.metaKey&&!e.ctrlKey&&(b(e.target,ht.current)||(e.preventDefault(),e.stopPropagation(),Ut.current?.onEdit()))};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Ht,Yt]);const Xt=function(e){return ie(N,()=>Fn.has(e))}(Ot);$t({panelRef:ht,bodyRef:ft,open:t,widget:!!V,active:Ht,minimized:Xt});const Vt=ie(Fr,Br),Gt=ie(Vr,Gr),Jt=ie(Qr,eo),_t=!U&&!V,Zt=Vt&&_t,[Qt,tn]=oe(!1),rn=Zt&&Jt===Ot,[on,sn]=oe(!1),ln=on&&_t&&Gt===Ot?"picked":null,cn=ne(Zt);re(()=>{if(cn.current&&!Zt){sn(!0);const e=setTimeout(()=>{sn(!1),Yr===Ot&&Jr(null)},700);return cn.current=Zt,()=>clearTimeout(e)}cn.current=Zt},[Zt,Ot]),re(()=>{Zt||tn(!1)},[Zt]),re(()=>{const e=pt.current,t=wt.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>gt(n(e)+n(t)>0);r();const o=new MutationObserver(r);return e&&o.observe(e,{childList:!0}),t&&o.observe(t,{childList:!0}),()=>o.disconnect()},[t]),re(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&ht.current){const t=ht.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=pt.current,n=wt.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[t]);const hn=ne(!1),mn=ae(e,[]),wn=ae(()=>{const t=e(),n=me?me[0]:$n[f]||672,o=t.w-80,i=t.h-80,a=Math.min(n,o),s=jn[Kn()],l=me?Math.min(me[1],i):(()=>{const e=("sm"===f?500:"md"===f?600:"lg"===f?700:"xl"===f?800:920)*s;return Math.max(320,Math.min(e,t.h-80))})(),c="cascade"!==(getComputedStyle(document.documentElement).getPropertyValue("--window-position")?.trim()||"cascade")||r()?0:30*(C.length-1),u=Math.max(At,(i-l)/2),d=(o-a)/2,h=t.h-At-l-u;return"top-right"===Y?{x:t.x+t.w-a-At,y:t.y+At,w:a,h:l}:"top-left"===Y?{x:t.x+At,y:t.y+At,w:a,h:l}:{x:t.x+Math.max(At,(o-a)/2+At)+Math.min(c,Math.max(0,d)),y:t.y+u+Math.min(c,Math.max(0,h)),w:a,h:l}},[f]),yn=ne(!1);t||(yn.current=!1);const vn=fe||m||null;re(()=>{if(!t)return;ar(Ot,vn,Nt.current??void 0),fe||cr(Ot),hn.current=!1,qt(Or(Ot));const e=()=>{qt(Or(Ot))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===fe;if(!e.label)return!1;const t=ht.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;if(cr(Ot),An.current)return;const t=fr(),n=Math.min(Bn.current.w,t.w-40),o=Math.min(Bn.current.h,t.h-40),i=t.x+(t.w-n)/2,a=t.y+(t.h-o)/2;kn({x:i,y:a,w:n,h:o}),On(!1)},i=e=>{const t=e.detail;r(t)&&(cr(Ot),Je({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==fe)return;cr(Ot);const t=Bn.current,n=function(e,t=fr()){const n=Math.min(e.w,t.w),r=Math.min(e.h,t.h);return{w:n,h:r,x:Math.min(Math.max(e.x,t.x),t.x+t.w-n),y:Math.min(Math.max(e.y,t.y),t.y+t.h-r)}}(t);if(n.x===t.x&&n.y===t.y&&n.w===t.w&&n.h===t.h)return;const r=ht.current,o="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(r&&!o){let e=!1;const t=()=>{e||(e=!0,r.style.transition="",window.dispatchEvent(new CustomEvent("modal-geometry")))};r.style.transition="left .28s ease, top .28s ease, width .28s ease, height .28s ease",r.addEventListener("transitionend",t,{once:!0}),window.setTimeout(t,400)}kn(n)};return window.addEventListener("modal-reorder",e),window.addEventListener("modal-split-view",n),window.addEventListener("modal-center",o),window.addEventListener("modal-reveal",a),window.addEventListener("modal-context-menu",i),()=>{!function(e){const t=C.indexOf(e);-1!==t&&(C.splice(t,1),Yn()),Fn.delete(e),qn.delete(e),Gn.delete(e);const n=Vn.get(e);n&&(Vn.delete(e),Xn.delete(n))}(Ot),window.removeEventListener("modal-reorder",e),window.removeEventListener("modal-split-view",n),window.removeEventListener("modal-center",o),window.removeEventListener("modal-reveal",a),window.removeEventListener("modal-context-menu",i),window.dispatchEvent(new CustomEvent("modal-reorder"))}},[t,Ot,vn,mn]);const bn=!V&&"maximized"===Kn(),[xn,kn]=oe(()=>{if(vn&&Sn[vn]){const e={...Sn[vn]};return me&&(e.w=me[0],se||(e.h=me[1])),kr(e)}return A?{x:A.x,y:A.y,w:A.w,h:A.h}:bn?mn():wn()}),[En,Mn]=oe(()=>!se),Cn=ne(ke),Ln=ne(null);re(()=>{const e=()=>{const e=r();e!==Cn.current&&Ln.current?.(e),Cn.current=e,Ee(e),qt(Or(Ot))};return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[Ot]);const Tn=ke&&!!Ze?.tab&&!Lt&&!V&&!Me,zn=Tn,An=ne(zn);An.current=zn;const Dn=_n(),In=ke&&!!Ze?.tab&&!V&&!Me&&!Vt&&Dn!==Ze.key,Pn=!!V&&ke&&!Vt&&null!==Dn,[Rn,On]=oe(()=>vn&&Sn[vn]||A?zn:zn||bn),Bn=ne(xn);Bn.current=xn;const Hn=ne(Rn);te(()=>{Hn.current=Rn},[Rn]),te(()=>{if(En||Tn)return;const e=ht.current,t=ft.current;if(!e||!t)return;const n=le??(V?0:240),r=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0;let o=0,i=null,a=null;const s=()=>{const c=t.firstElementChild;if(!c||e.offsetHeight<=0)return;c!==a&&(a&&l.unobserve(a),l.observe(c),a=c);const u=e.offsetHeight-t.offsetHeight,d=t.style.flex,h=t.style.overflowY,m=t.style.height;t.style.flex="0 0 auto",t.style.height="auto",t.style.overflowY="visible";const f=t.offsetHeight,p=c.offsetHeight;t.style.flex=d,t.style.height=m,t.style.overflowY=h;const w=c.offsetHeight>p+4,y=Math.max(n,window.innerHeight-r-Math.max(0,Bn.current.y)-24),g=w?Math.min(Bn.current.h,y):Math.min(Math.max(n,u+f),y),v=Math.abs(g-o)>1;v&&(o=g,kn(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),V||(g<=n?i&&(clearTimeout(i),i=null):(v||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;s(),o===e&&Mn(!0)},160)))},l=new ResizeObserver(s);s(),vt.current&&l.observe(vt.current);const c=new MutationObserver(s);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{l.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[En,V,le,Ct,Tn]),te(()=>{if(!se||!En||V||!t)return;const e=vt.current;if(!e)return;let n=e.offsetHeight;const r=new ResizeObserver(()=>{if(!e.isConnected)return;const t=e.offsetHeight,r=t-n,o=t>0!=n>0;if(n=t,!o||0===r||Rn)return;if(document.body.classList.contains("rosh-gesturing"))return;const i=le??240,a=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,s=Math.max(i,window.innerHeight-a-Math.max(0,Bn.current.y)-24);kn(e=>({...e,h:Math.min(Math.max(i,e.h+r),s)}))});return r.observe(e),()=>r.disconnect()},[se,En,V,t,Rn,le]);const Un=!1!==ce&&!V&&!Z&&!Me,[Jn,Zn]=oe(()=>!Un);te(()=>{if(Jn||!t)return;if(!Un||Rn)return void Zn(!0);const n=ht.current,r=ft.current;if(!n||!r)return;const o=/* @__PURE__ */new WeakSet;let l=Bn.current.w,c=0;const u=()=>Zn(!0),d=()=>{c=0;const t=Bn.current;if(Math.abs(t.w-l)>1||document.body.classList.contains("rosh-gesturing"))return void u();const d=e(),h=d.w-80;if(t.w>=h)return void u();const m=[],f=[];for(const e of[r,...Array.from(r.querySelectorAll("*"))]){const t=e.scrollWidth-e.clientWidth;if(t<=4||o.has(e))continue;const n=getComputedStyle(e).overflowX;"auto"!==n&&"scroll"!==n||(m.push(e),f.push(t))}if(!m.length)return;const p=Math.min(h,t.w+Math.max(...f)),w=p-t.w,y=n.style.width;n.style.width=`${p}px`;const g=m.map((e,t)=>({over:f[t],residual:e.scrollWidth-e.clientWidth}));n.style.width=y,g.forEach((e,t)=>{i(e,w)||o.add(m[t])});const v=a(t,s(t.w,w,g),d,At);v!==t&&(l=v.w,kn(v))};d();const h=new MutationObserver(()=>{c||(c=requestAnimationFrame(d))});h.observe(r,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class","hidden"]});const m=setTimeout(u,Wn);return()=>{h.disconnect(),c&&cancelAnimationFrame(c),clearTimeout(m)}},[Jn,t,Un,Rn]);const Qn=ne(null),er=!(!Ze?.tab||Lt||V||Me);Ln.current=t=>{if(!er)return;if(t)return Qn.current||(Qn.current={box:{...Bn.current},maximized:Hn.current}),void(Hn.current=!0);const r=Qn.current;Qn.current=null;const o=e();if(r?.maximized)return Hn.current=!0,On(!0),void kn(o);const i=r?.box??(vn?Sn[vn]:void 0);if(Hn.current=!1,On(!1),i&&!n(i,o,!1)){const e={...i};me&&(e.w=me[0],se||(e.h=me[1])),kn(kr(e))}else kn(wn())},re(()=>{zn&&(Hn.current=!0,On(!0),kn(mn()))},[zn,mn]),re(()=>{if(V)return;const e=()=>{const e=vn?Sn[vn]:void 0;if(Hn.current=!1,On(!1),e){const t={...e};me&&(t.w=me[0],se||(t.h=me[1])),kn(kr(t))}else kn(wn())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[V,wn,vn]),re(()=>{t&&vn&&!Tn&&(Sn[vn]=xn,Nn()),t&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[xn,t,vn,Tn]),re(()=>{if(!t)return;const e=()=>{Hn.current?kn(mn()):document.body.classList.contains("rosh-gesturing")||kn(kr)};window.addEventListener("resize",e),window.addEventListener(o,e);let n=null;return Rn&&(n=new MutationObserver(e),n.observe(document.body,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["class"]})),()=>{window.removeEventListener("resize",e),window.removeEventListener(o,e),n?.disconnect()}},[t,Rn,mn]),re(()=>{if(t&&(He(!1),Ye.current=!1,ut.current=!1,Zn(!Un),!An.current)){if(vn&&Sn[vn]){const e=Sn[vn];return void kn(t=>kr({...e,...se?{h:t.h}:{},...Un?{x:t.x,w:t.w}:{}}))}A&&(kn({x:A.x,y:A.y,w:A.w,h:A.h}),On(A.maximized))}},[t]),re(()=>{if(!t||"auto"!==p)return;let e;const n=t=>{ht.current?.contains(t.target)&&!Ye.current&&(Ye.current=!0,e=setTimeout(()=>He(!0),0))};return document.addEventListener("input",n,!0),document.addEventListener("change",n,!0),()=>{clearTimeout(e),document.removeEventListener("input",n,!0),document.removeEventListener("change",n,!0)}},[t,p]);const tr="auto"===p?Fe:!0===p,rr=Ze&&!Lt?Ze.key:null,or=de(()=>en(Re),[Re]),ir=ne({shortcutSpec:_e,isOnDesktop:rt,toggleDesktopShortcut:ot,taskbarStrings:$e.taskbar});te(()=>{ir.current={shortcutSpec:_e,isOnDesktop:rt,toggleDesktopShortcut:ot,taskbarStrings:$e.taskbar}});const sr=ne(null);sr.current||(sr.current={open:(e,t)=>Je({x:e,y:t}),items:()=>{const e=ir.current,t=[];e.shortcutSpec&&t.push({label:e.isOnDesktop?e.taskbarStrings.removeFromDesktop:e.taskbarStrings.addToDesktop,onSelect:e.toggleDesktopShortcut});for(const e of gn[Ot]||[])t.push({label:e.label,icon:e.icon,onSelect:e.onClick});return t}}),re(()=>{if(t&&rr)return()=>{return e=rr,void(nn.delete(e)&&an());var e}},[t,rr]),ct(!(fe||!t)&&tr);const lr=ae(()=>tr||"auto"===p&&Ye.current,[tr,p]),gr=ae(async e=>{if(ut.current)return!1;if(!lr())return!0;ut.current=!0;const t=Ke,n="close"===e?"Are you sure you want to close?":"discard"===e?"Are you sure you want to stop editing?":"Are you sure you want to continue?",r=await y({title:"Discard changes?",message:t?`“${t}” has unsaved changes. ${n} All changes will be lost.`:`You have unsaved changes. ${n} All changes will be lost.`,confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"});return ut.current=!1,r},[lr,Ke]),vr=ae(()=>ut.current?Promise.resolve():lr()?gr("close").then(e=>{e&&l()}):(l(),Promise.resolve()),[lr,gr,l]),Er=ae(async()=>{await gr("discard")&&(Ye.current=!1,He(!1),Ut.current?.onDiscard())},[gr]),Cr=ae(async()=>{const e=await gr("switch");return e&&(Ye.current=!1,He(!1)),e},[gr]),Nr=ne(()=>!1);te(()=>{Nr.current=lr}),te(()=>{if(!t||!fe)return;const e={holdsChanges:()=>Nr.current(),ask:Cr};return nr.set(fe,e),()=>{nr.get(fe)===e&&nr.delete(fe)}},[t,fe,Cr]),te(()=>{if(!t||!Tt)return;const e=e=>{e.detail?.windowKey===Tt&&vr()};return window.addEventListener($r,e),()=>window.removeEventListener($r,e)},[t,Tt,vr]);const Tr=ne(null),zr=ae(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(Je(null),cr(Ot),An.current)return void e.preventDefault();e.preventDefault();const t=e.currentTarget,n=e.pointerId;let r=null;const o=e.clientX,i=e.clientY,a=ht.current,s=a?.getBoundingClientRect();let l,c,u,d;if(Tr.current){const t=Tr.current;Tr.current=null,d=t.w,u=t.h;const n=s?Math.min(Math.max(20,e.clientX-s.left),t.w-20):t.w/2;l=e.clientX-n,c=e.clientY-12,a&&(a.style.width=`${d}px`,a.style.height=`${u}px`,a.style.left=`${l}px`,a.style.top=`${c}px`)}else l=s?s.left:Bn.current.x,c=s?s.top:Bn.current.y,u=s?s.height:Bn.current.h,d=s?s.width:Bn.current.w;On(!1),kn(e=>({...e,x:l,y:c,w:d,h:u}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<Pr&&Math.abs(e.clientY-i)<Pr)return;r=Rr(t,n,"move","move"),a&&(a.style.transition="none")}const s=l+e.clientX-o,u=Math.max(0,c+e.clientY-i);if(a&&(a.style.transform=`translate(${s-l}px, ${u-c}px)`),Bn.current={...Bn.current,x:s,y:u},!V){const t=function(e,t){const n=fr(),r=e<=n.x+hr,o=e>=n.x+n.w-hr,i=t<=n.y+hr,a=t>=n.y+n.h-hr,s=e<=n.x+mr,l=e>=n.x+n.w-mr,c=t<=n.y+mr,u=t>=n.y+n.h-mr;return i&&s?"tl":i&&l?"tr":a&&s?"bl":a&&l?"br":c&&r?"tl":c&&o?"tr":u&&r?"bl":u&&o?"br":i?"top":r?"left":o?"right":null}(e.clientX,e.clientY);t!==h&&(h=t,t?Sr(Mr(t)):Lr())}},f=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",f),r?.(),Lr();const e=kr({...Bn.current});if(Bn.current=e,!V&&h){Tr.current={x:l,y:c,w:d,h:u};const e=Mr(h);return a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.width=`${e.w}px`,a.style.height=`${e.h}px`,a.style.transform="",a.style.transition=""),void kn(e)}if(V){const t=e.x+e.w/2,n=window.innerWidth/2;lt(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),kn(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",f)},[]),Dr=ae((e,t)=>{if(0!==e.button)return;e.preventDefault(),e.stopPropagation();const n=e.currentTarget,r=e.pointerId;let o=null;const i=e.clientX,a=e.clientY,s=ht.current,l=s?.getBoundingClientRect(),c=l?l.left:Bn.current.x,u=l?l.top:Bn.current.y,d=l?l.width:Bn.current.w,h=l?l.height:Bn.current.h,m="sw"===t||"nw"===t||"w"===t,f="ne"===t||"nw"===t||"n"===t,p="se"===t||"ne"===t||"e"===t,w="se"===t||"sw"===t||"s"===t;On(!1),kn({x:c,y:u,w:d,h:h}),Bn.current={x:c,y:u,w:d,h:h};let y=0,g=null;const v=()=>{if(y=0,!g)return;const e=g;g=null,Bn.current=e,s&&(s.style.left=`${e.x}px`,s.style.top=`${e.y}px`,s.style.width=`${e.w}px`,s.style.height=`${e.h}px`)},b=e=>{if(!o){if(Math.abs(e.clientX-i)<Pr&&Math.abs(e.clientY-a)<Pr)return;o=Rr(n,r,Ir[t],"resize")}g=((e,t)=>{let n=c,r=u,o=d,i=h;if(p&&(o=Math.max(br,d+e)),w&&(i=Math.max(xr,h+t)),m){const t=Math.max(br,d-e);n=c+d-t,o=t}if(f){const e=Math.max(xr,h-t);r=u+h-e,i=e}return{x:n,y:r,w:o,h:i}})(e.clientX-i,e.clientY-a),y||(y=requestAnimationFrame(v))},x=()=>{window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",x),y&&cancelAnimationFrame(y),v(),o?.(),kn({...Bn.current})};window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},[]),Wr=ae(e=>{if(e.target.closest("button, input, a, kbd, select, textarea"))return;const t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];if(!t&&"Enter"!==e.key)return;if(e.preventDefault(),e.stopPropagation(),cr(Ot),"Enter"===e.key)return void(Rn?(On(!1),kn(wn())):(On(!0),kn(mn())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{Tr.current||(Tr.current={...Bn.current})};if(r<0)return e(),On(!0),void kn(mn());if(r>0){if(Rn)return On(!1),void kn(wn());if(Tr.current){const e=kr(Tr.current);return Tr.current=null,Bn.current=e,void kn(e)}return void ur(Ot)}e(),On(!1);const t=Mr(n<0?"left":"right");return Bn.current=t,void kn(t)}if(Rn)return;const o=Bn.current,i=e.shiftKey?{...o,w:Math.max(br,o.w+24*n),h:Math.max(xr,o.h+24*r)}:kr({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});Bn.current=i,kn(i)},[Ot,Rn,wn,mn]),Kr=ae(e=>{Tr.current||(Tr.current={...Bn.current}),On(!1);const t=Mr(e);Bn.current=t,kn(t),cr(Ot)},[Ot]),jr=!V&&!Tn&&!Me,[Hr,Ur]=oe(0),Xr=jr&&!_&&!Z&&(!!R||!!O||yt||Mt||zt),_r=jr&&Hr>0,Zr=ne(_r);Zr.current=_r;const to=!!_||!!Z,no=to?"h-(--row-height-compact-bar)":"h-(--row-height-window-bar)",ro=ae(e=>{const t=e.closest("[data-window-body]");if(!t)return null;const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return Math.abs(n.left-r.left)>2||Math.abs(n.top-r.top)>2?null:(Ur(e=>e+1),()=>Ur(e=>Math.max(0,e-1)))},[]),oo=de(()=>jr?{compact:to,over:_r,claim:ro}:null,[jr,to,_r,ro]),io=ae(e=>{if(Zt)return;e.preventDefault(),e.stopPropagation();const t=0===e.clientX&&0===e.clientY,n=e.currentTarget.getBoundingClientRect();Je(t?{x:n.left,y:n.bottom+4}:{x:e.clientX,y:e.clientY})},[Zt]),ao=!!be&&tt&&!V&&!Me,so=zn||Zt?{}:{tabIndex:0,role:"group","aria-label":Ke?`${Ke} — ${We.windowSuffix}`:We.windowSuffix,"aria-keyshortcuts":"ArrowUp ArrowDown ArrowLeft ArrowRight Shift+ArrowUp Shift+ArrowDown Shift+ArrowLeft Shift+ArrowRight Control+ArrowUp Control+ArrowDown Control+ArrowLeft Control+ArrowRight Enter",onKeyDown:Wr},lo=()=>{On(!0),kn(mn())},co=ae(()=>{const e=ht.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(fn);t&&!t.disabled&&t.click()}},[]);re(()=>{if(!t)return;if(V)return;const e=e=>{if(C[C.length-1]===Ot&&!b(e.target,ht.current)&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),co();else{if("INPUT"===t.tagName&&t.closest("form"))return;if(!(t instanceof Element&&ht.current?.contains(t)))return;if(t.closest(z))return;e.preventDefault()}}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,co,Ot,V]),re(()=>{if(!t)return;const e=e=>{C[C.length-1]===Ot&&(b(e.target,ht.current)||((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:Ot}})),Ye.current=!1,He(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:Ot}})))))};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t]),re(()=>{if(!t)return;if(V)return;const e=e=>{if("Escape"===e.key&&C[C.length-1]===Ot){if(G(e))return e.preventDefault(),void e.stopPropagation();if(Tn&&!j)return;e.preventDefault(),e.stopPropagation(),vr()}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,vr,Ot,V,Tn,j]);const uo=t&&(void 0!==w||void 0!==v),[ho]=oe(()=>{if("undefined"==typeof document)return null;const e=document.createElement("span");return e.className="flex shrink-0 items-center gap-2",e.setAttribute("data-tab-actions",""),e}),mo=Tn&&!Ze?.home&&or.actions.length>0;re(()=>{t&&rr&&function(e,t){const n=nn.get(e);n&&n.title===t.title&&n.dirty===t.dirty&&n.copy===t.copy&&n.actions===t.actions&&n.menu===t.menu||(nn.set(e,t),an())}(rr,{title:or.text||Ke,dirty:tr,copy:or.copy,actions:mo&&ho?ho:void 0,menu:sr.current??void 0})},[t,rr,Ke,tr,or.text,or.copy,mo,ho]);const fo=ae(e=>{const t=document.getElementById("nav-boundary-toast");t&&t.remove();const n="bottom"===e?["That's the last one, chief.","You've hit rock bottom... of the list.","End of the line, buddy.","Nothing left. Go outside.","Congratulations, you scrolled to the void.","There's no more. I checked.","You've reached the edge of the known universe.","Plot twist: there is no next one.","Even scrolling has limits. Unlike your ambition.","Last one. Time to touch grass."]:["Already at the top. Overachiever.","There is no item above this. Trust me.","You're #1. Literally.","Can't go higher. You've peaked.","This is it. The summit. The top.","First item. No VIP lounge above this.","Going up? Nope. Elevator's broken.","You want negative indexes? Bold.","Top of the list. Top of the world.","The only way is down from here."],r=n[Math.floor(Math.random()*n.length)],o=document.createElement("div");o.id="nav-boundary-toast",o.className="fixed bottom-6 left-1/2 -translate-x-1/2 z-(--z-toast) bg-gray-900 text-on-accent flex min-h-10 items-center px-5 py-3 rounded-lg shadow-lg text-sm font-medium transition-opacity duration-300",o.textContent=r,document.body.appendChild(o),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>o.remove(),300)},2e3)},[]);if(re(()=>{if(!t)return;const e=e=>{if(C[C.length-1]!==Ot)return;if(b(e.target,ht.current))return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&uo&&(e.preventDefault(),w?w():fo("bottom")),"k"===e.key&&uo&&(e.preventDefault(),v?v():fo("top"))))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,w,v,uo,fo,Ot]),!t||yn.current)return null;const po=Zt?function(e){if("undefined"==typeof document)return null;const t=Array.from(document.querySelectorAll("[data-modal-panel]")).filter(e=>{const t=e;return!t.hasAttribute("data-utility")&&!t.hasAttribute("data-widget")&&"none"!==t.style.display});t.sort((e,t)=>(e.getAttribute("data-modal-id")||"").localeCompare(t.getAttribute("data-modal-id")||""));const n=t.findIndex(t=>t.getAttribute("data-modal-id")===e),r=t.length;if(n<0||r<1)return null;const o=Math.ceil(Math.sqrt(r)),i=Math.ceil(r/o),a=Math.floor(n/o),s=n%o,l=r-o*(i-1),c=a===i-1&&l<o,u=fr(),d=(u.w-20*(o+1))/o,h=(u.h-14*(i+1)-22*i)/i,m=c?(o-l)*(d+20)/2:0;return{x:u.x+20+s*(d+20)+m,y:u.y+14+a*(h+14+22),w:d,h:h}}(Ot):null,wo=Zt&&po?X({width:po.w,height:po.h},{width:xn.w,height:xn.h}):1,yo=(()=>{if(Zt&&po){const e=wo,t=xn.w*e,n=xn.h*e,r=po.x+(po.w-t)/2-xn.x,o=po.y+(po.h-n)/2-xn.y,i=Qt||rn;return{transform:`translate(${r}px, ${o}px) scale(${e})`,transformOrigin:"top left",transition:"transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms",cursor:"pointer",zIndex:H.expose+(i?20:10),boxShadow:i?"0 24px 72px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.55), 0 0 36px 12px rgba(96,165,250,0.85), 0 0 96px 28px rgba(96,165,250,0.55)":"0 16px 48px rgba(0,0,0,0.55)",pointerEvents:"auto"}}if(on&&_t){const e="picked"===ln;return{transition:e?"transform 640ms cubic-bezier(0.34, 1.42, 0.64, 1), box-shadow 600ms":"transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 600ms",...e?{zIndex:H.expose+30}:{}}}return null})(),go=x({modal:!1,titleId:!V&&(Tn?!Ze?.home:!Me)?je:void 0,label:or.text||Ke}),vo=/* @__PURE__ */pe("div",{children:[
|
|
49
|
-
/* @__PURE__ */pe("div",{ref:ht,"data-modal-panel":!0,"data-modal-id":Ot,"data-window-key":fe||void 0,...U?{"data-utility":""}:{},...Xe?{"data-pinned-top":""}:{},...V?{"data-widget":""}:{},...Ze?{"data-window-owner":Ze.key}:{},...Ze&&!Lt?{"data-window-root":""}:{},...Tn?{"data-window-tab":""}:{},...go,className:Tn?"fixed flex flex-col overflow-hidden":"fixed rounded-(--radius-window) flex flex-col overflow-hidden "+(V?Ht?"shadow-xl":"shadow-lg":"border "+(Ht?"shadow-xl border-line":"shadow-lg border-line-strong")),onPointerDown:e=>{if(!Zr.current||Zt||0!==e.button)return;const t=e.target;if(t.closest("[data-modal-panel]")!==ht.current)return;if(t.closest("[data-window-chrome]"))return;const n=e.currentTarget.getBoundingClientRect(),r=n.height/(e.currentTarget.offsetHeight||n.height),o=(to?E.compactBar:E.windowBar)*r;e.clientY-n.top>o||t.closest(h)||zr(e)},onContextMenu:e=>{const t=e.target;t.closest("[data-window-strip]")&&t.closest("[data-modal-panel]")===ht.current&&io(e)},onMouseDownCapture:e=>{if(mt.current=!1,Zt){if(e.target.closest("[data-expose-close]"))return;return e.preventDefault(),e.stopPropagation(),Jr(Ot),qr(!1),void cr(Ot)}if(!Ht&&!V&&!Xe&&0===e.button){const t=e.target;t.closest("[data-modal-panel]")===ht.current&&t.closest("button, input, a, select, textarea")&&!t.closest("[data-window-chrome]")&&(e.preventDefault(),e.stopPropagation(),mt.current=!0,Je(null),cr(Ot),window.addEventListener("mouseup",()=>{setTimeout(()=>{mt.current=!1},0)},{once:!0}))}},onClickCapture:e=>{mt.current&&(mt.current=!1,e.preventDefault(),e.stopPropagation())},onMouseDown:e=>{if(Zt)return;Je(null);e.target.closest("[data-modal-panel]")===ht.current&&(e.target.closest("button, input, a, select, textarea")||cr(Ot))},style:Me?{zIndex:Kt+1,top:0,left:0,right:0,bottom:"var(--mobile-bottom-nav, 56px)",width:"auto",height:"auto",transform:`translateX(${Se}px)`,transition:Ne?"none":"transform 180ms ease-out",...V?{display:"none"}:{},...Kt<0?{display:"none"}:{},...Ht||Xe||Pe&&fe===Pe?{}:{display:"none"},...Wt?{visibility:"hidden",pointerEvents:"none"}:{}}:{zIndex:Xe?H.pinnedWindow:Kt+1,width:xn.w,height:xn.h,top:xn.y,...V&&"right"===st?{right:window.innerWidth-xn.x-xn.w}:{left:xn.x},...Kt<0&&!Xe?{display:"none"}:{},...Ce?{display:"none"}:{},...In||Pn||Wt?{visibility:"hidden",pointerEvents:"none"}:{},...yo??{}},children:[Me&&!V&&/* @__PURE__ */we("div",{onPointerDown:Ie,className:"absolute top-0 bottom-0 left-0 w-[22px] z-[5]",style:{touchAction:"pan-y"},"aria-hidden":"true"}),
|
|
50
|
-
/* @__PURE__ */pe("div",{"data-window-surface":"",className:"flex min-h-0 flex-1 flex-col "+(jr?"backdrop-blur-sm":""),style:jr?{backgroundColor:Ht?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"}:void 0,children:[V?null:Tn?Ze?.home?null:/* @__PURE__ */pe(ye,{children:[
|
|
51
|
-
/* @__PURE__ */we("h2",{id:je,"data-window-title":!0,className:"sr-only",children:or.text||Ke}),mo&&ho&&ge(
|
|
52
|
-
/* @__PURE__ */we(ye,{children:or.actions}),ho),or.badges.length>0&&/* @__PURE__ */we("div",{"data-window-chrome":"","data-record-bar":"",className:"flex h-9 shrink-0 select-none items-center gap-2 overflow-hidden border-b border-gray-200 px-4",style:{backgroundColor:"rgb(var(--window-content-rgb))"},children:or.badges})]}):Me?null:
|
|
53
|
-
/* @__PURE__ */pe("div",{onPointerDown:zr,onContextMenu:io,"data-window-chrome":"",..._r?{"data-window-controls-over":""}:{},...so,className:_r?`absolute left-0 z-10 flex ${no} items-center px-3 select-none focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400`:`flex items-center gap-3 ${no} px-3 shrink-0 cursor-move select-none focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400`,style:{touchAction:"none",..._r?{top:ao?3:0}:{}},children:[!Zt&&/* @__PURE__ */pe("div",{"data-window-controls":"",className:"group/controls flex shrink-0 items-center",children:[
|
|
54
|
-
/* @__PURE__ */we("button",{type:"button",onClick:vr,"aria-label":We.close,title:We.close,className:pr,children:/* @__PURE__ */we("span",{"aria-hidden":"true",className:`${wr} ${Ht?"bg-red-500":"bg-gray-300 group-hover/controls:bg-red-500"}`,children:/* @__PURE__ */we(B,{name:"close",className:yr,strokeWidth:3})})}),!_&&/* @__PURE__ */we("button",{type:"button",onClick:()=>ur(Ot),"aria-label":We.minimize,title:We.minimize,className:pr,children:/* @__PURE__ */we("span",{"aria-hidden":"true",className:`${wr} ${Ht?"bg-amber-400":"bg-gray-300 group-hover/controls:bg-amber-400"}`,children:/* @__PURE__ */we("span",{className:"h-0.5 w-2 rounded-full bg-current opacity-0 group-hover/controls:opacity-100 group-focus-within/controls:opacity-100"})})}),!_&&/* @__PURE__ */we(Ar,{maximized:Rn,onToggleMax:()=>{Rn?(On(!1),kn(wn())):lo()},onSnap:Kr,buttonClassName:pr,strings:We,children:/* @__PURE__ */we("span",{"aria-hidden":"true",className:`${wr} ${Ht?"bg-green-500":"bg-gray-300 group-hover/controls:bg-green-500"}`,children:/* @__PURE__ */we(B,{name:Rn?"collapse":"expand",className:yr,strokeWidth:3})})}),U&&/* @__PURE__ */we("button",{type:"button",onClick:()=>Ve(e=>!e),"aria-label":Xe?We.unpin:We.pinOnTop,title:Xe?We.unpin:We.pinOnTop,className:"ml-1 p-0.5 rounded hover:bg-gray-200 "+(Xe?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */we(B,{name:"bookmark-square",className:"h-3.5 w-3.5",fill:Xe?"currentColor":"none",strokeWidth:1.5})})]}),_r?
|
|
55
|
-
/* @__PURE__ */we("h2",{id:je,"data-window-title":!0,className:"sr-only",children:or.text||Ke}):/* @__PURE__ */we("div",{"data-window-title":!0,title:Ke,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:Ht?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:/* @__PURE__ */we("span",{id:je,className:"truncate",children:Zt?pn(Re):Re})})]}),ao&&/* @__PURE__ */we("div",{"aria-hidden":"true",className:"h-[3px] shrink-0 pointer-events-none",style:{backgroundColor:`rgb(var(--window-accent-rgb) / ${Ht?.9:.55})`}}),
|
|
56
|
-
/* @__PURE__ */we(un.Provider,{value:Ot,children:/* @__PURE__ */we(d.Provider,{value:oo,children:/* @__PURE__ */we(L.Provider,{value:{rightRef:pt,leftRef:wt,notify:()=>gt(!0),active:Ht,isDirty:tr,footerOpen:Ct&&!V&&!_&&!Z&&!Me},children:/* @__PURE__ */we("div",{ref:ft,"data-window-body":"",...V?{onPointerDown:zr,onContextMenu:e=>{e.preventDefault(),at({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${V?"p-0 cursor-move":Z||ee?"p-0":_?"p-2":"p-4"} ${V||Tn||jr?"":"backdrop-blur-sm"} ${!1===M||Z||ee?"overflow-hidden":"overflow-y-auto overscroll-contain"+(jr?Xr?" mr-1":" mb-2 mr-1":"")} ${V?"rounded-2xl select-none":""}`,style:{...V?{touchAction:"none"}:{},backgroundColor:V||jr?"transparent":Tn?"rgb(var(--window-content-rgb))":Ht?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */we(Be,{children:xe})})})})}),V&&it&&/* @__PURE__ */pe($,{minWidth:160,style:{left:it.x,top:it.y},onClose:()=>at(null),children:[
|
|
57
|
-
/* @__PURE__ */we(W,{onClick:()=>{at(null),window.dispatchEvent(new CustomEvent("widget-open-settings",{detail:Ot}))},children:"Settings"}),
|
|
58
|
-
/* @__PURE__ */we(K,{}),ue&&/* @__PURE__ */pe(ye,{children:[ue,
|
|
59
|
-
/* @__PURE__ */we(K,{})]}),
|
|
60
|
-
/* @__PURE__ */pe(W,{onClick:()=>{at(null),Ve(e=>!e)},children:[
|
|
61
|
-
/* @__PURE__ */we("span",{className:"flex-1",children:"Always on Top"}),Xe&&/* @__PURE__ */we(B,{name:"check",className:"h-4 w-4 text-blue-600 shrink-0",strokeWidth:2})]}),
|
|
62
|
-
/* @__PURE__ */we(K,{}),
|
|
63
|
-
/* @__PURE__ */we(W,{onClick:()=>{at(null),vr()},children:"Close"})]}),
|
|
64
|
-
/* @__PURE__ */pe("div",{onPointerDown:zr,ref:vt,"data-modal-footer":"",...jr?{"data-modal-footer-bare":""}:{},className:jr?"px-4 py-2 shrink-0 flex items-center justify-between text-xs select-none cursor-move"+(Xr?"":" hidden"):`px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none${Tn?"":" cursor-move"}${Ht&&!Tn?" backdrop-blur-sm":""}${V||_||Z||Me||!Ct?" hidden":""}`,style:jr?{touchAction:"none"}:{touchAction:"none",backgroundColor:Tn?"rgb(var(--window-footer-rgb))":Ht?"rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
65
|
-
/* @__PURE__ */pe("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[zt&&/* @__PURE__ */we(Ue,{auto:!0}),O,
|
|
66
|
-
/* @__PURE__ */we("div",{ref:wt,"data-modal-actions-left":!0,className:"flex items-center gap-2 shrink-0"}),null!=k&&!1!==k&&!jr&&
|
|
67
|
-
/* @__PURE__ */we("div",{ref:bt,"data-modal-footer-facts":"",className:"min-w-0 flex-1 overflow-hidden",children:/* @__PURE__ */we("div",{ref:xt,className:"inline-flex items-center gap-2 whitespace-nowrap"+(kt?" invisible":""),children:k})})]}),
|
|
68
|
-
/* @__PURE__ */pe("div",{"data-modal-footer-right":"",className:"flex items-center gap-2 ml-auto shrink-0",children:[Mt&&q&&(q.editing?/* @__PURE__ */we(F,{variant:"secondary",size:"sm","data-modal-discard":"",onClick:()=>{Er()},children:We.discard}):"object"==typeof q.state?/* @__PURE__ */we(F,{variant:"secondary",size:"sm","data-modal-edit":"","aria-disabled":!0,disabledReason:q.state.disabledReason,children:We.edit}):/* @__PURE__ */we(F,{variant:"secondary",size:"sm","data-modal-edit":"",onClick:()=>q.onEdit(),children:We.edit})),
|
|
69
|
-
/* @__PURE__ */we("div",{ref:pt,"data-modal-actions":!0,className:"flex items-center gap-2"}),R]})]})]}),!V&&!Me&&!Zt&&Ht&&!zn&&/* @__PURE__ */pe(ye,{children:[
|
|
70
|
-
/* @__PURE__ */we("div",{onPointerDown:e=>Dr(e,"se"),className:"absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize z-10"}),
|
|
71
|
-
/* @__PURE__ */we("div",{onPointerDown:e=>Dr(e,"sw"),className:"absolute bottom-0 left-0 w-3 h-3 cursor-nesw-resize z-10"}),
|
|
72
|
-
/* @__PURE__ */we("div",{onPointerDown:e=>Dr(e,"ne"),className:"absolute top-0 right-0 w-3 h-3 cursor-nesw-resize z-10"}),
|
|
73
|
-
/* @__PURE__ */we("div",{onPointerDown:e=>Dr(e,"nw"),className:"absolute top-0 left-0 w-3 h-3 cursor-nwse-resize z-10"}),
|
|
74
|
-
/* @__PURE__ */we("div",{onPointerDown:e=>Dr(e,"n"),className:"absolute top-0 left-3 right-3 h-1 cursor-ns-resize"}),
|
|
75
|
-
/* @__PURE__ */we("div",{onPointerDown:e=>Dr(e,"s"),className:"absolute bottom-0 left-3 right-3 h-1 cursor-ns-resize"}),
|
|
76
|
-
/* @__PURE__ */we("div",{onPointerDown:e=>Dr(e,"e"),className:"absolute top-3 bottom-3 right-0 w-1 cursor-ew-resize"}),
|
|
77
|
-
/* @__PURE__ */we("div",{onPointerDown:e=>Dr(e,"w"),className:"absolute top-3 bottom-3 left-0 w-1 cursor-ew-resize"})]}),Zt&&/* @__PURE__ */we("div",{className:"absolute inset-0",style:{zIndex:H.hint,cursor:"pointer",background:"transparent"},onMouseEnter:()=>tn(!0),onMouseLeave:()=>tn(!1),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),cr(Ot),qr(!1)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:Qt&&/* @__PURE__ */we("button",{type:"button","data-expose-close":!0,"aria-label":$e.taskbar.closeWindow,title:"Close",className:"absolute flex items-center justify-center rounded-full bg-black/55 text-on-accent shadow-lg ring-1 ring-white/40 transition-colors hover:bg-red-500",style:{top:8,right:8,width:30,height:30,transform:`scale(${1/wo})`,transformOrigin:"top right",zIndex:H.raised},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onClick:e=>{e.stopPropagation(),e.preventDefault(),vr()},children:/* @__PURE__ */we(B,{name:"close",className:"h-4 w-4",strokeWidth:2.2})})})]}),Zt&&po&&/* @__PURE__ */we("div",{className:"fixed pointer-events-none select-none truncate text-center",style:{left:po.x,top:po.y+po.h+4,width:po.w,zIndex:H.expose+(Qt?21:11),color:"white",fontSize:"var(--text-xs)",fontWeight:500,textShadow:"0 1px 2px rgba(0,0,0,0.6)"},children:pn(Re)})]}),bo=Ge&&/* @__PURE__ */pe($,{style:{left:Ge.x,top:Ge.y},onClose:()=>Je(null),minWidth:160,children:[!V&&!_&&!Tn&&/* @__PURE__ */pe(ye,{children:[
|
|
78
|
-
/* @__PURE__ */pe(W,{onClick:()=>{ur(Ot),Je(null)},children:[
|
|
79
|
-
/* @__PURE__ */we(B,{name:"remove",className:"h-4 w-4",strokeWidth:1.5}),We.minimize]}),!zn&&/* @__PURE__ */pe(W,Rn?{onClick:()=>{On(!1),kn(wn()),Je(null)},children:[
|
|
80
|
-
/* @__PURE__ */we(B,{name:"collapse",className:"h-4 w-4",strokeWidth:1.5}),We.windowed]}:{onClick:()=>{lo(),Je(null)},children:[
|
|
81
|
-
/* @__PURE__ */we(B,{name:"expand",className:"h-4 w-4",strokeWidth:1.5}),We.maximize]})]}),U&&!Tn&&/* @__PURE__ */pe(W,{onClick:()=>{Ve(e=>!e),Je(null)},children:[
|
|
82
|
-
/* @__PURE__ */we(B,{name:"bookmark-square",className:"h-4 w-4 "+(Xe?"text-blue-600":""),fill:Xe?"currentColor":"none",strokeWidth:1.5}),Xe?We.unpin:We.pinOnTop]}),_e&&/* @__PURE__ */pe(W,{onClick:()=>{Je(null),ot()},children:[
|
|
83
|
-
/* @__PURE__ */we(B,{name:"star",className:"h-4 w-4",fill:rt?"currentColor":"none",strokeWidth:1.5}),rt?$e.taskbar.removeFromDesktop:$e.taskbar.addToDesktop]}),(gn[Ot]||[]).length>0&&/* @__PURE__ */we(ye,{children:(gn[Ot]||[]).map((e,t)=>/* @__PURE__ */pe(W,{onClick:()=>{Je(null),e.onClick()},children:[e.icon,e.label]},t))}),!(Tn&&Ze?.home)&&/* @__PURE__ */pe(ye,{children:[
|
|
84
|
-
/* @__PURE__ */we(K,{}),
|
|
85
|
-
/* @__PURE__ */pe(W,{danger:!0,onClick:()=>{Je(null),vr()},children:[
|
|
86
|
-
/* @__PURE__ */we(B,{name:"close",className:"h-4 w-4"}),We.close]})]})]}),xo=!!fe&&Rt.some(e=>e.id===fe),ko=!Xt||xo||V?null:/* @__PURE__ */pe("div",{"data-modal-restore-tab":!0,"data-modal-id":Ot,className:"fixed left-1/2 z-(--z-restore-tab) flex -translate-x-1/2 items-center gap-1 rounded-lg border border-line-strong bg-surface px-2 py-1 shadow-lg",style:{bottom:"calc(var(--taskbar-height, 0px) + 12px)"},children:[
|
|
87
|
-
/* @__PURE__ */we("button",{type:"button",onClick:()=>cr(Ot),title:We.restore,className:"max-w-[16rem] truncate rounded px-2 py-0.5 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900",children:Ke||We.windowSuffix}),
|
|
88
|
-
/* @__PURE__ */we("button",{type:"button",onClick:()=>cr(Ot),title:We.restore,"aria-label":We.restore,className:"rounded px-2 py-0.5 text-xs leading-none text-ink-faintest hover:bg-gray-100 hover:text-gray-600",children:"▴"}),
|
|
89
|
-
/* @__PURE__ */we("button",{type:"button",onClick:()=>{vr()},title:We.close,"aria-label":We.close,className:"rounded px-2 py-0.5 text-xs leading-none text-ink-faintest hover:bg-gray-100 hover:text-gray-600",children:"✕"})]});return ge(
|
|
90
|
-
/* @__PURE__ */pe(dn.Provider,{value:null,children:[vo,bo,ko]}),document.body)}"undefined"!=typeof window&&window.addEventListener("keydown",e=>{Kr&&"Escape"===e.key&&(to(null),qr(!1))});var ao=100,so={past:[],future:[]};function lo(e,t){switch(t.type){case"record":{const n=e.past[e.past.length-1];if(null!==t.step.coalesceKey&&n?.coalesceKey===t.step.coalesceKey)return 0===e.future.length?e:{...e,future:[]};const r=[...e.past,t.step];return{past:r.length>ao?r.slice(r.length-ao):r,future:[]}}case"undo":return 0===e.past.length?e:{past:e.past.slice(0,-1),future:[t.redoStep,...e.future]};case"redo":return 0===e.future.length?e:{past:[...e.past,t.undoStep],future:e.future.slice(1)};case"clear":return 0===e.past.length&&0===e.future.length?e:so}}var co=/* @__PURE__ */new Set(["INPUT","TEXTAREA","SELECT"]);var uo=500,ho=250;function mo({children:e,canEdit:t=!0,perms:n,windowId:r}){const[o,i]=me(lo,so),a=ne(/* @__PURE__ */new Map),[s,l]=oe(0),c=s>0,[u,d]=oe(0),[h,m]=oe(0),f=h>0,{hasAnyPerm:p}=A(),w=t&&0===u&&(!(n&&n.length>0)||p(n)),y=ne(null),g=ne(!1),v=ae(()=>{const e={};for(const[t,n]of a.current)e[t]=n.getLast();return e},[]),b=ae((e,t)=>{a.current.has(e)||l(e=>e+1),a.current.set(e,t)},[]),x=ae(e=>{a.current.delete(e)&&l(e=>e-1)},[]),k=ae(e=>{d(t=>t+(e?1:-1))},[]),E=ae(e=>{m(t=>t+(e?1:-1))},[]),[M,C]=oe(0),S=M>0,N=ae(e=>{C(t=>t+(e?1:-1))},[]),T=Q(qe),z=T?.claimReadOnly;re(()=>{if(z&&!w)return z(!0),()=>z(!1)},[z,w]);const D=T?.claimOwnMount;re(()=>{if(D&&S)return D(!0),()=>D(!1)},[D,S]);const I=ne({last:0,count:0,tripped:!1}),P=ne(!1),R=ae((e,t,n)=>{if(g.current)return void(n&&function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}(n.prev,n.next)||(P.current=!0));if(!w||y.current)return;const r=I.current;if(r.tripped)return;const o=Date.now();if(o-r.last>ho&&(r.count=0),r.last=o,++r.count>uo)return r.tripped=!0,void console.error(`[efficient-shell] UndoProvider: "${e}" recorded ${uo} undo steps with no pause between them, which no user action can do. The value passed to useUndoable for this slice is almost certainly rebuilt on every render (a .map/.filter/object literal in the call) rather than held in state, so it reads as changed every time — and since recording a step re-renders the form, that is a loop. Undo recording is now off for this form to keep the tab responsive.`);y.current={values:v(),label:e,coalesceKey:t},queueMicrotask(()=>{const e=y.current;y.current=null,e&&i({type:"record",step:e})})},[w,v]),O=ae(e=>{for(const[t,n]of Object.entries(e)){const e=a.current.get(t);e&&(e.setLast(n),e.apply(n))}},[]),$=ae(()=>{const e=o.past[o.past.length-1];if(!e)return;const t={values:v(),label:e.label,coalesceKey:null};O(e.values),i({type:"undo",redoStep:t})},[o.past,v,O]),W=ae(()=>{const e=o.future[0];if(!e)return;const t={values:v(),label:e.label,coalesceKey:null};O(e.values),i({type:"redo",undoStep:t})},[o.future,v,O]),[K,j]=oe(0),F=ne(0),B=ne(0),q=ne(!1),H=ae(()=>{g.current=!0,P.current=!1,y.current=null,F.current+=1,B.current=F.current,j(F.current)},[]),U=ne(void 0),Y=ae(e=>{void 0!==e&&(void 0!==U.current&&e!==U.current&&(q.current=!0),U.current=e),H()},[H]);re(()=>{g.current&&K===B.current&&(g.current=!1,y.current=null,(P.current||q.current)&&i({type:"clear"}),P.current=!1,q.current=!1)},[K]);const X=ae(()=>{q.current=!0,i({type:"clear"}),H()},[H]),V=w&&o.past.length>0,G=w&&o.future.length>0,J=Wr(r),_=ne({undo:$,redo:W,canUndo:V,canRedo:G});_.current={undo:$,redo:W,canUndo:V,canRedo:G},re(()=>{if(!J||!w)return;const e=e=>{const t=function(e){if(!e.metaKey&&!e.ctrlKey||e.altKey)return null;const t=e.key.toLowerCase(),n="z"===t?e.shiftKey?"redo":"undo":"y"!==t||!e.ctrlKey||e.metaKey||e.shiftKey?null:"redo";if(!n)return null;const r=e.target;return r?.isContentEditable||r?.tagName&&co.has(r.tagName.toUpperCase())?null:n}(e);if(!t)return;const n=_.current;("undo"===t?n.canUndo:n.canRedo)&&(e.preventDefault(),"undo"===t?n.undo():n.redo())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[J,w]);const Z=de(()=>({register:b,unregister:x,record:R,undo:$,redo:W,clear:X,baseline:Y,canUndo:V,canRedo:G,enabled:w,hasState:c,handMounted:S,claimOwnMount:N,claimReadOnly:k,declaredEditable:f,claimEditable:E,undoLabel:V?o.past[o.past.length-1].label:null,redoLabel:G?o.future[0].label:null}),[b,x,R,$,W,X,Y,V,G,w,c,S,N,k,f,E,o.past,o.future]),ee=""!==kn(),te=Q(L)?.footerOpen??!1,ie=ee&&w&&c&&!S&&te;/* @__PURE__ */
|
|
91
|
-
return pe(qe.Provider,{value:Z,children:[ie&&/* @__PURE__ */we(En,{position:"left",quiet:!0,children:/* @__PURE__ */we(Ue,{auto:!0})}),e]})}function fo(){const e=Q(qe),t=ae(()=>{},[]);return{undo:e?.undo??t,redo:e?.redo??t,clear:e?.clear??t,baseline:e?.baseline??t,canUndo:e?.canUndo??!1,canRedo:e?.canRedo??!1,undoLabel:e?.undoLabel??null,redoLabel:e?.redoLabel??null,enabled:e?.enabled??!1,hasState:e?.hasState??!1}}function po(e){const t=Q(qe),n=t?.claimReadOnly,r=t?.claimEditable;re(()=>{const t=e?r:n;if(t)return t(!0),()=>t(!1)},[n,r,e])}function wo(e,t,n){const r=Q(qe),o=he(),i=ne(e),a=ne(t);a.current=t,re(()=>{if(r)return r.register(o,{getLast:()=>i.current,setLast:e=>{i.current=e},apply:e=>a.current(e)}),()=>r.unregister(o)},[r,o]);const{label:s,coalesceKey:l=null}=n,c=ne(r);c.current=r;const u=ne({label:s,coalesceKey:l});u.current={label:s,coalesceKey:l},re(()=>{const t=c.current;t&&(Object.is(e,i.current)||(t.record(u.current.label,u.current.coalesceKey,{prev:i.current,next:e}),i.current=e))},[e])}function yo(e,t){const[n,r]=oe(e);return wo(n,e=>r(()=>e),t),[n,r]}export{Mn as CancelButton,ze as DesktopHostProvider,ft as DocFavStar,nt as EntityWindowFallback,et as EntityWindowLoading,rt as EntityWindowState,fn as MODAL_SUBMIT_SELECTOR,io as Modal,En as ModalActions,Ue as UndoControls,mo as UndoProvider,Se as WINDOW_REGISTRY,Fe as WindowCrashedFallback,Be as WindowErrorBoundary,Rt as WindowManagerProvider,bn as WindowTitle,bt as activateWindowById,Vt as beginWindowGesture,ir as cancelWindowFront,Ne as client_default,no as commitExposeHighlight,or as confirmWindowDiscard,Gt as drainPerfEvents,Ur as exitExposeMode,On as forgetMaximizedWindowBoxes,Et as getActiveWindowRoute,eo as getExposeHighlight,cn as getWindowChromeVersion,Pn as getWindowPosition,it as isDraftEntityId,at as isDraftEntityWindow,Ee as isEntityEntry,ke as isPageEntry,Le as isShellApiClientConfigured,Je as isTabWindow,Xt as markMenuOpen,sn as readWindowChrome,tr as requestWindowFront,to as setExposeHighlight,Yt as setPerfCollecting,Oe as setShellHomeRoute,je as setShellTabStrip,Ce as setShellWindowRegistry,In as setWindowDefaultPosition,Rn as setWindowPosition,en as splitTitle,Qr as subscribeExposeHighlight,ln as subscribeWindowChrome,_e as tabGroupOf,Hr as toggleExposeMode,_n as useCurrentTabKey,Ae as useDesktopHost,kn as useEnclosingModalId,Wr as useIsActiveWindow,Ie as usePageSearch,fo as useUndo,po as useUndoCanEdit,wo as useUndoable,yo as useUndoableState,yn as useWidgetSettings,ct as useWindowDirty,dt as useWindowManager,vn as useWindowMenuItem,xn as useWindowTitle,rr as windowHoldsChanges};
|
package/dist/chunk-FMLUQCFB.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-LKAGXURQ.js";import{toDayMs as i,fmtSliderDate as t}from"./chunk-5CFERCYW.js";import{DAY_MS as a}from"./chunk-JRQMX4PK.js";import{useBrowserValueOnce as l}from"./chunk-WCCS4VFE.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-IUVGHHR3.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const j=l(Date.now,null),C=[],M=[],x=o().timeline,H=r();for(const e of p){const n=i(e.date??null);null===n?M.push({key:e.key,label:e.label,kind:e.kind}):C.push({...e,ms:n})}C.sort((e,n)=>e.ms-n.ms);const K=i(g??null);let L,R,w=!0;0===C.length?(R=K??j??0,L=R-30*a,w=null!==K||null!==j):(L=C[0].ms,R=K??C[C.length-1].ms,R-L<a&&(R=L+a));const N=C.length>0?Math.max(0,Math.round((R-L)/a)):0,O=u??(N>0?x.duration(N):void 0),D=[C.length>0?x.started(t(C[0].ms,H)):void 0,O,M.length>0?x.reached(C.length,p.length):void 0],E=C.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),F={};for(const e of C)e.phase&&(F[e.phase]=F[e.phase]||[]).push(e.ms);const G=Object.entries(F).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),Q="rail"===v,S=w&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:Q?"spread":"compressed",labels:Q?"none":"lanes",items:E,pending:M,phases:G,startMs:L,endMs:R,todayMs:j??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
|
|
2
|
-
return h("div",Q?{className:"shrink-0","data-timeline-variant":"rail",children:S}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:D,children:S})})}export{m as MilestoneTimeline};
|
package/dist/chunk-GMLOMLCS.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-UTQN5AIO.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{HEADING_TEXT as n}from"./chunk-BWJZTHZ6.js";import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{useShellStrings as o,splitAround as l}from"./chunk-IUVGHHR3.js";import{createContext as i,useContext as s,useState as c,useRef as a,useCallback as u,useEffect as d}from"react";import{jsxs as m,jsx as h,Fragment as f}from"react/jsx-runtime";var p=i(()=>Promise.resolve(!1)),g=()=>s(p),b=()=>Promise.resolve(!1),v=e=>b(e),y=()=>Promise.resolve(!1),x=e=>y(e),N=()=>Promise.resolve(null),k=e=>N(e),w={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:t({variant:"primary"})}},C=t({variant:"secondary"}),P=t({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function j(){/* @__PURE__ */
|
|
2
|
-
return h(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F({children:r}){const[t,i]=c(!1),[s,g]=c({message:""}),[v,x]=c(0),k=a(),F=a(null),T=a(0),E=a([]),$=a(null),D=a(null),H=u(e=>{F.current=e.id,k.current=e.resolve,x(e.id),g(e.options),i(!0)},[]),I=u(e=>{const r="string"==typeof e?{message:e}:e;return new Promise(e=>{const n={id:++T.current,options:r,resolve:e};null===F.current?H(n):E.current.push(n)})},[H]),[U,V]=c(!1),[W,K]=c({message:""}),[O,Q]=c(""),R=a(),S=u(e=>(K(e),Q(""),V(!0),new Promise(e=>{R.current=e})),[]),[Y,Z]=c(!1),[A,B]=c({}),[G,J]=c(""),q=a(),z=u(e=>{const r="string"==typeof e?{message:e}:e;return B(r),J(r.defaultValue??""),Z(!0),new Promise(e=>{q.current=e})},[]);d(()=>{b=I,y=S,N=z},[I,S,z]);const M=(e,r)=>{if(F.current!==e)return;const n=k.current,t=E.current.shift();t?H(t):(F.current=null,k.current=void 0,i(!1)),n?.(r)},X=e=>{V(!1),Q(""),R.current?.(e)},_=e=>{if(e){const e=G.trim();if(!e&&!A.allowEmpty)return Z(!1),void q.current?.(null);Z(!1),q.current?.(e)}else Z(!1),q.current?.(null)},ee=s.variant||(s.confirmLabel?.toLowerCase().includes("delete")||s.message.toLowerCase().includes("delete")?"danger":"info"),re=w[ee],ne=w["warning"===W.variant?"warning":"danger"],te=W.confirmWord,oe=null==te||O===te,le=o().dialog,[ie,se]=l(le.typeToConfirm);/* @__PURE__ */
|
|
3
|
-
return m(p.Provider,{value:I,children:[r,
|
|
4
|
-
/* @__PURE__ */h(e,{open:t,onClose:()=>M(v,!1),initialFocus:$,footer:/* @__PURE__ */m(f,{children:[
|
|
5
|
-
/* @__PURE__ */h("button",{ref:$,type:"button",onClick:()=>M(v,!1),className:C,children:s.cancelLabel||le.cancel}),
|
|
6
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>M(v,!0),className:re.button,children:s.confirmLabel||le.ok})]}),children:/* @__PURE__ */m("div",{className:"flex gap-4",children:[
|
|
7
|
-
/* @__PURE__ */h("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */h(j,{})}),
|
|
8
|
-
/* @__PURE__ */m("div",{className:"flex-1",children:[
|
|
9
|
-
/* @__PURE__ */h("h2",{className:n,children:s.title||le.confirmTitle}),
|
|
10
|
-
/* @__PURE__ */h("p",{className:"mt-2 text-sm text-gray-600",children:s.message})]})]})}),
|
|
11
|
-
/* @__PURE__ */h(e,{open:U,onClose:()=>X(!1),initialFocus:null!=te?void 0:D,footer:/* @__PURE__ */m(f,{children:[
|
|
12
|
-
/* @__PURE__ */h("button",{ref:D,type:"button",onClick:()=>X(!1),className:C,children:W.cancelLabel||le.destructiveCancel}),
|
|
13
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>X(!0),disabled:!oe,className:ne.button,children:te??W.confirmLabel??le.destructiveConfirm})]}),children:/* @__PURE__ */m("div",{className:"flex gap-4",children:[
|
|
14
|
-
/* @__PURE__ */h("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${ne.icon}`,children:/* @__PURE__ */h(j,{})}),
|
|
15
|
-
/* @__PURE__ */m("div",{className:"flex-1",children:[
|
|
16
|
-
/* @__PURE__ */h("h2",{className:`${n} pr-6`,children:W.title||le.destructiveTitle}),
|
|
17
|
-
/* @__PURE__ */h("p",{className:"mt-2 text-sm text-gray-600",children:W.message}),null!=te&&/* @__PURE__ */m(f,{children:[
|
|
18
|
-
/* @__PURE__ */m("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
|
|
19
|
-
/* @__PURE__ */h("kbd",{className:"rounded border border-line-strong bg-surface-sunken px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:te}),se]}),
|
|
20
|
-
/* @__PURE__ */h("input",{autoFocus:!0,type:"text",value:O,onChange:e=>Q(e.target.value),onKeyDown:e=>{"Enter"===e.key&&O===te&&X(!0)},placeholder:te,className:`mt-2 ${L} focus:border-red-500`})]})]})]})}),
|
|
21
|
-
/* @__PURE__ */m(e,{open:Y,onClose:()=>_(!1),title:A.title||le.promptTitle,footer:/* @__PURE__ */m(f,{children:[
|
|
22
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>_(!1),className:C,children:A.cancelLabel||le.cancel}),
|
|
23
|
-
/* @__PURE__ */h("button",{type:"button",onClick:()=>_(!0),disabled:!A.allowEmpty&&!G.trim(),className:P,children:A.confirmLabel||le.ok})]}),children:[A.message&&/* @__PURE__ */h("p",{className:"text-sm text-gray-600",children:A.message}),
|
|
24
|
-
/* @__PURE__ */h("input",{autoFocus:!0,type:"text",value:G,onChange:e=>J(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:A.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{F as ConfirmProvider,v as confirm,x as confirmDestructive,k as prompt,g as useConfirm};
|
package/dist/chunk-HC5KQZFG.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{DragBand as e,tooltipBesideBand as t}from"./chunk-KNZ7YTFH.js";import{niceAxis as r,niceMax as i,linearScale as n,axisGutter as o,bandScale as l}from"./chunk-2JWPNR2U.js";import{CHART_INK as a}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as h}from"./chunk-TWVUQUUD.js";import{usePlotWidth as s}from"./chunk-MAFUXCPZ.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-IUVGHHR3.js";import{formatPlain as d}from"./chunk-C3QOHMR6.js";import{useRef as u,useState as f,useId as g,useEffect as p}from"react";import{jsx as x,jsxs as y}from"react/jsx-runtime";function v({labels:v,values:b,height:k=220,width:M,bandPadding:w=.24,min:N,max:A,yTickCount:$=4,formatValue:j,yAxisLabel:P,xTickAnchor:R="center",children:U,overlay:E,tooltip:z,onSelect:D,zoom:C,ariaLabel:F,className:I,emptyLabel:L}){const S=c().charts,T=m(),V=j??(e=>d(e,T)),H=L??S.noData,W=u(null),Z=s(W),B=M??Z,[K,Q]=f(null),G=g();if(p(()=>{if(null!==K)return h(e=>"Escape"===e.key&&(Q(null),!0))},[K]),0===v.length||!b.some(Number.isFinite))/* @__PURE__ */
|
|
2
|
-
return x("div",{className:I,ref:W,children:/* @__PURE__ */x("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:H})});const J=b.filter(Number.isFinite),O=J.every(Number.isInteger),X=void 0===N&&void 0===A?r(Math.min(0,...J),Math.max(0,...J),{intervals:$+1,integer:O}):null,Y=void 0!==N&&void 0===A?r(N,Math.max(N,...J),{intervals:$+1,integer:O,zero:!1}):null,q=X?X.lo:N??Math.min(0,...J),_=X?X.hi:Y?Y.hi:A??i(Math.max(...J,0)),ee=X?X.ticks:Y?[q,...Y.ticks.filter(e=>e>q)]:n([q,_],{from:0,to:1}).ticks($+1),te={top:12,right:16,bottom:26,left:o(ee.map(V),48)+(P?10:0)},re=te.left,ie=Math.max(re+1,B-te.right),ne=te.top,oe=k-te.bottom,le=n([q,_],{from:oe,to:ne}),ae=l(v.length,{from:re,to:ie},w),he=(ie-re)/Math.max(1,v.length),se=he>=48,ce=se?1:Math.max(1,Math.ceil(v.length/Math.max(1,Math.floor(B/84)))),me=Math.max(2,Math.floor((he-6)/6.6)),de=e=>se&&e.length>me?`${e.slice(0,me-1).trimEnd()}…`:e;/* @__PURE__ */
|
|
3
|
-
return y("div",{className:`relative ${I??""}`,ref:W,children:[
|
|
4
|
-
/* @__PURE__ */y("svg",{width:"100%",height:k,viewBox:`0 0 ${B} ${k}`,role:"img","aria-label":F,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Q(null),onBlur:()=>Q(null),onKeyDown:e=>{if(D&&null!==K&&("Enter"===e.key||" "===e.key))return e.preventDefault(),void D(K);if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1;Q(e=>Math.min(v.length-1,Math.max(0,(e??0)+t)))},style:C?{userSelect:"none",touchAction:"pan-y"}:void 0,children:[
|
|
5
|
-
/* @__PURE__ */x("defs",{children:/* @__PURE__ */x("clipPath",{id:G,children:/* @__PURE__ */x("rect",{x:re,y:ne,width:ie-re,height:oe-ne})})}),ee.map(e=>/* @__PURE__ */x("line",{x1:re,y1:le(e),x2:ie,y2:le(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
|
|
6
|
-
/* @__PURE__ */x("line",{x1:re,y1:le(Math.max(q,0)),x2:ie,y2:le(Math.max(q,0)),stroke:a.axis,strokeWidth:1,shapeRendering:"crispEdges"}),ee.map(e=>/* @__PURE__ */x("text",{x:re-8,y:le(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:V(e)},`t${e}`)),P&&/* @__PURE__ */x("text",{x:14,y:(ne+oe)/2,transform:`rotate(-90 14 ${(ne+oe)/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:P}),
|
|
7
|
-
/* @__PURE__ */x("g",{clipPath:`url(#${G})`,children:U({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:B,height:k,clipId:G,active:K})}),E?.({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:B,height:k,clipId:G,active:K}),v.map((e,t)=>t%ce===0?/* @__PURE__ */x("text",{x:"start"===R?ae(t):ae.center(t),y:k-8,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:de(e)},`x${t}`):null),C?.drag&&/* @__PURE__ */x(e,{x0:ae.center(C.drag[0])-(ie-re)/v.length/2,x1:ae.center(C.drag[1])+(ie-re)/v.length/2,top:ne,bottom:oe}),v.map((e,t)=>/* @__PURE__ */x("rect",{x:ae.center(t)-(ie-re)/v.length/2,y:ne,width:(ie-re)/v.length,height:oe-ne,fill:"transparent",onMouseEnter:()=>Q(t),onPointerDown:C?()=>C.press(t):void 0,onPointerEnter:C?()=>C.over(t):void 0,onPointerUp:C?.release,onClick:D?()=>D(t):void 0,style:D?{cursor:"pointer"}:void 0},`h${t}`))]}),z&&null!==K&&
|
|
8
|
-
/* @__PURE__ */x("div",{className:"pointer-events-none absolute top-2 z-10",style:t(ae.center(K),ae.bandwidth,B),children:z(K)})]})}export{v as CartesianPlot};
|
package/dist/chunk-IUVGHHR3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{formatPlain as e,formatFixed as o,formatGrouped as t,formatPercent as a}from"./chunk-C3QOHMR6.js";import{createContext as i,useContext as n,useMemo as r,useEffect as s}from"react";import{jsx as l}from"react/jsx-runtime";function d(i){const n=o=>e(o,i),r=e=>t(e,i),s=(e,t)=>o(e,t,i),l=(e,o)=>a(e,o,i);return{window:{minimize:"Minimize",restore:"Restore",maximize:"Maximize",windowed:"Windowed",pinOnTop:"Pin on top",unpin:"Unpin from top",close:"Close",edit:"Edit",discard:"Discard",windowSuffix:"window",prev:"Prev",next:"Next",snapLayouts:"Snap layouts",snapLeft:"Snap left half",snapRight:"Snap right half",snapTopLeft:"Snap top-left quarter",snapTopRight:"Snap top-right quarter",snapBottomLeft:"Snap bottom-left quarter",snapBottomRight:"Snap bottom-right quarter"},taskbar:{closeWindow:"Close window",offscreenHint:"This window is off screen — click to bring it back",offscreenDot:"Off screen — click to bring this window back",expose:"Exposé — show all open windows as thumbnails",addToDesktop:"Add to desktop",removeFromDesktop:"Remove from desktop",minimizeAllWindows:"Minimize all",restoreAllWindows:"Restore all",closeAllWindows:"Close all"},logout:{goodbye:"Goodbye",seeYou:"See you next time"},about:{aboutPrefix:"About",thisApp:"this app",openSourceLicenses:"Open Source Licenses",whatsNew:"What's New",noChangelog:"No changelog available."},table:{empty:"Nothing to show",loading:"Loading",selectAll:"Select all rows",selectRow:"Select row"},select:{none:"— None —",noMatches:"No matches",allSelected:"All options selected",clear:"Clear selection",clearAll:"Clear all",changed:"Changed",selectedCount:e=>`${n(e)} selected`,remove:"Remove",reorderItem:(e,o,t)=>`${e}, ${n(o)} of ${n(t)}. Use arrow keys to reorder.`},notifications:{title:"Notifications",markAllRead:"Mark all read",dnd:"Do not disturb",dndOn:"Do not disturb is on",caughtUp:"All caught up",empty:"No notifications yet",viewAll:"View all notifications",byActor:e=>`by ${e}`,cardLabel:"Notification",dismiss:"Dismiss notification"},form:{errorSummaryTitle:"There is a problem"},help:{title:"Help",searchPlaceholder:"Search help…",empty:"No help articles yet.",noResults:"No articles match your search.",loading:"Loading",pickArticle:"Pick a help article from the left.",noBody:"This article has no body yet.",draft:"Draft",newArticle:"+ New",edit:"Edit"},update:{available:"A new version is available.",refreshNow:"Refresh now"},pageTabs:{label:"Open pages",close:"Close",favorite:"Favorite",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",unsaved:"Unsaved changes",copy:e=>`Copy ${e}`,copied:"Copied",tabMenu:"Window menu",groupToggle:(e,o)=>`${e}: ${n(o)} ${1===o?"tab":"tabs"}`,discardTitle:"Discard unsaved changes?",discardOne:"This page has changes that have not been saved. Close it anyway?",discardMany:"pages have changes that have not been saved. Close them anyway?",discardConfirm:"Discard and close",keepEditing:"Keep editing"},dialog:{close:"Close",cancel:"Cancel",ok:"OK",confirmTitle:"Confirm",destructiveTitle:"Confirm Action",destructiveCancel:"Dismiss",destructiveConfirm:"Delete",typeToConfirm:e=>`Type ${e} to confirm:`,promptTitle:"Enter a value",discardTitle:"Discard changes?",discardMessage:e=>e?`“${e}” has unsaved changes. Are you sure you want to close? All changes will be lost.`:"You have unsaved changes. Are you sure you want to close? All changes will be lost.",discardConfirm:"Discard",keepEditing:"Keep Editing"},calendar:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",monthPanel:"Choose a month",yearPanel:"Choose a year",chooseMonth:e=>`Choose a month, currently ${e}`,chooseYear:e=>`Choose a year, currently ${e}`},datePicker:{placeholder:"Select a date",dialog:"Choose a date",clear:"Clear",today:"Today",required:"Required"},dateRange:{placeholder:"Date Range",clearRange:"Clear date range",dialog:"Date range",from:"From",to:"To",start:"Start",end:"End",fromOnly:e=>`From ${e}`,toOnly:e=>`To ${e}`,range:(e,o)=>`${e} to ${o}`,required:"Required",last2Weeks:"Last 2 Weeks",lastMonth:"Last Month",last3Months:"Last 3 Months",last6Months:"Last 6 Months",last12Months:"Last 12 Months",lastHeading:"Last",last2WeeksShort:"2 weeks",lastMonthShort:"Month",last3MonthsShort:"3 months",last6MonthsShort:"6 months",last12MonthsShort:"12 months",custom:"Custom",clear:"Clear",cancel:"Cancel",apply:"Apply"},pagination:{label:"Pagination",first:"First page",previous:"Previous page",next:"Next page",last:"Last page"},list:{selected:e=>`${n(e)} selected`,selectedNotShown:(e,o)=>`${n(e)} selected, ${n(o)} not shown`,allLoaded:(e,o)=>`All ${r(e)} ${o} loaded`,count:(e,o)=>`${r(e)} ${o}`,loadedOf:(e,o,t)=>`${r(e)} of ${r(o)} ${t}`,loadingMore:"Loading more",loadError:"Couldn't load this list",loadErrorMessage:"Something went wrong fetching these records. Check your connection and try again.",retry:"Try again"},kanban:{loading:"Loading",empty:"No items.",dropHere:"Drop here",addItem:"Add item"},gantt:{loading:"Loading",empty:"No tasks.",task:"Task",scale:"Scale",day:"Day",week:"Week",month:"Month",today:"Today",barName:(e,o,t)=>`${e}, ${o} to ${t}`,milestoneName:(e,o)=>`${e}, milestone, ${o}`,done:"done",moveHint:"Arrow keys move it a day; Shift with an arrow changes the end date."},files:{attach:"Attach files",drop:"Drop files to attach",remove:e=>`Remove ${e}`,chooseMany:"Choose files",chooseOne:"Choose a file",dragMany:"or drag them here",dragOne:"or drag it here",notAccepted:(e,o)=>`${e} is not an accepted file type${o?` (${o})`:""}`,tooLarge:(e,o,t)=>`${e} is ${o} — the limit is ${t}`,tooMany:(e,o)=>`${e} was not added — ${n(o)} ${1===o?"file":"files"} is the limit`,bytes:e=>`${n(e)} B`,kilobytes:e=>`${n(e)} KB`,megabytes:e=>`${s(e,1)} MB`},media:{uploadImage:"Upload an image",uploadVideo:"Upload a video",uploadFile:"Upload a file",upload:"Upload media",cta:"Choose from library or upload",replace:"Replace",remove:"Remove",uploading:"Uploading",choosing:"Choosing",pickFailed:"The library could not be opened. Try again.",cover:"Cover",add:"Add",addMedia:"Add media",empty:"No media.",removeItem:e=>`Remove ${e}`,reorder:(e,o,t)=>`${e}, item ${n(o)} of ${n(t)}. Use arrow keys to reorder.`,image:"Image",video:"Video",changeImage:"Change image",changeVideo:"Change video",focus:"Image focus",usedIn:e=>`Used in ${n(e)} ${1===e?"place":"places"}`,notUsed:"Not used anywhere",moveTo:(e,o)=>{const t="image"===o?"image":"video"===o?"video":"file";return`Move ${n(e)} ${t}${1===e?"":"s"} to`},moveNowhere:"There is no folder to move to",moveToMenu:"Move to",files:"Files"},mediaLibrary:{products:"Products",allFiles:"All files",trash:"Trash",readOnlyBadge:"Read-only",folders:"Folders",readOnly:"Read-only. Edit these pictures in Products > Design > Media.",editedAtHq:e=>`Edited at HQ (${e}).`,readOnlyMenu:"Read-only · edited in Products > Design > Media",noProductFolder:"Products folders come from brand > design > finish. You cannot make a folder here.",noDropProducts:"Read-only. You cannot move or upload files into Products.",newFolder:"New folder",newSubfolder:"New subfolder",folderName:"Folder name",fileName:"File name",folderActions:"Folder actions",upload:"Upload",rename:"Rename",moveTo:"Move to",moveToTrash:"Move to Trash",deleteFolder:"Delete folder",folderNotEmpty:"Only an empty folder can be deleted. Move or delete what is in it first.",moveFilesToTrash:e=>`Move ${n(e)} files to Trash`,filesSelected:e=>`${n(e)} files selected`,fileCount:e=>`${n(e)} ${1===e?"file":"files"}`,selected:e=>`${n(e)} selected`,clearSelection:"Clear selection",selectAll:"Select all",replace:"Replace",cropEdit:"Crop & edit",copyUrl:"Copy URL",fileUrl:"File URL",urlLabel:"URL",openOriginal:"Open original",openInDesign:"Open in Design",restore:"Restore",deleteForever:"Delete forever",emptyTrash:"Empty trash",search:"Search file name",searchProducts:"Search design, finish, part number",mediaType:"Media type",allTypes:"All types",images:"Images",videos:"Videos",use:"Use",anyUse:"Any use",emailOnly:"Email only",websiteOnly:"Website only",notUsed:"Not used",sort:"Sort",newest:"Newest",byName:"Name",bySize:"Size",view:"View",grid:"Grid",list:"List",used:e=>`Used ${n(e)}`,email:"Email",private:"Private",daysAgo:e=>1===e?"1 day ago":`${n(e)} days ago`,details:"Details",name:"Name",type:"Type",size:"Size",resolution:"Resolution",addedBy:"Added by",folder:"Folder",usedIn:"Used in",places:e=>`${n(e)} ${1===e?"place":"places"}`,design:"Design",finish:"Finish",angleLug:"Angle · Lug",owner:"Owner",emptyProducts:"No pictures here yet",trashEmpty:"Trash is empty.",noMatches:"No matches.",emptyFolder:"No files in this folder yet.",oneChosen:e=>`1 selected · ${e}`,noneChosen:"Nothing selected",cancel:"Cancel",chooseImage:"Choose image",privateNoPick:"A private file cannot be used here.",alreadyHere:"The files are already here",folderAlreadyHere:"The folder is already here",notIntoItself:"A folder cannot go inside itself"},lightbox:{label:"Preview",close:"Close preview",previous:"Previous",next:"Next",counter:(e,o)=>`${n(e)} / ${n(o)}`,openOriginal:"Open original",openFile:"Open file"},brandAsset:{save:e=>`Save ${e}`,remove:e=>`Remove ${e}`,discard:"Discard change",saveFailed:e=>`Could not save ${e}.`,removeFailed:e=>`Could not remove ${e}.`,region:(e,o)=>`${e} for ${o}`,usedFor:e=>`Used for ${e}.`,previews:e=>`${e} previews`,preview:"Preview",alt:(e,o)=>`${e} ${o}`},copy:{copy:"Copy",copyLabel:e=>`Copy ${e}`,copied:"Copied",copyValue:e=>`Copy ${e}`,copiedValue:"Copied!",copiedLabel:e=>`${e} copied`,failed:"Could not copy to the clipboard"},keypad:{backspace:"Backspace",enter:"Enter"},banner:{dismiss:"Dismiss"},transfer:{uploading:"Uploading",error:"Error",retry:"Retry",dismiss:"Dismiss",cancel:"Cancel",cancelVerb:e=>`Cancel ${e}`},count:{items:e=>`${n(e)} ${1===e?"item":"items"}`,tabs:e=>`${n(e)} ${1===e?"tab":"tabs"}`,windows:e=>`${n(e)} ${1===e?"window":"windows"}`},badge:{remove:"Remove",removeItem:e=>`Remove ${e}`},breadcrumbs:{label:"Breadcrumb",hidden:"Hidden crumbs"},emptyState:{message:"Nothing here yet."},errors:{notFound:"Page not found",notFoundBody:"The page you're looking for doesn't exist or was moved.",forbidden:"Access denied",forbiddenBody:"You don't have permission to view this page.",noAccess:"You don't have access to this",serverError:"Something went wrong",serverErrorBody:"An unexpected error occurred. Please try again.",retry:"Try again",details:"Error details"},search:{placeholder:"Search...",escBadge:"ESC",searching:"Searching",noResults:"No results found.",minChars:e=>`Type at least ${n(e)} characters to search...`,navigate:"navigate",open:"open",close:"close",enterKey:"Enter",escKey:"Esc",recent:"Recent",favorites:"Favorites",actions:"Actions",listLabel:"Search results",groupCount:(e,o)=>`${n(e)}${o?"+":""}`,groupLabel:(e,o,t)=>`${e}, ${n(o)}${t?"+":""}`,seeAll:e=>`See all ${e}`,searchFailed:"Search failed — check your connection and try again.",partialFailure:"Some results could not be loaded.",tabKey:"Tab",nextGroup:"next group"},grid:{selectAll:"Select all",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:e=>`Delete row ${e}`,insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteColumn:e=>`Delete column ${e}`,resize:"Drag to resize · double-click to auto-fit",fill:"Drag to fill"},sidebar:{resize:"Drag to resize · double-click to reset",sections:"Sections",closeSections:"Close sections"},resizeHandle:{label:"Resize panel",hint:"Drag to resize · double-click to reset"},number:{increase:"Increase",decrease:"Decrease"},slider:{value:e=>`${e} value`},accordion:{changed:e=>`${e} changed`},settingView:{auto:"auto",edited:"Changed in this view",resetName:e=>`Reset ${e}`,inheritName:e=>`Inherit parent layout for ${e}`,inheritParentLayout:"Inherit parent layout",backToDefault:"back to the site default",backToAuto:"back to auto",backTo:e=>`back to ${e}`,tip:(e,o)=>`${e} (${o})`,viewDesktop:"Desktop",viewTablet:"Tablet",viewPhone:"Phone"},displayChips:{shown:"Shown",hidden:"Hidden",shownHint:"Shown · click to hide",hiddenHint:"Hidden · click to show"},corners:{radius:"Corner radius",unit:"px",radiusMark:"R"},iconPicker:{button:(e,o)=>`${e}: ${o}`},iconNames:{none:"None","arrow-right":"Arrow","arrow-long-right":"Long arrow","arrow-up-right":"Arrow up right","chevron-right":"Chevron",external:"External",cart:"Cart",bag:"Bag",tag:"Tag",email:"Email",location:"Location",play:"Play",download:"Download",search:"Search",car:"Car",phone:"Phone",chat:"Chat","chevron-left":"Chevron left",package:"Package",truck:"Truck","shield-check":"Shield check",wheel:"Wheel","receipt-refund":"Refund receipt",dot:"Dot",cross:"Cross",slash:"Slash",triangle:"Triangle"},widths:{column:e=>`Column ${e}`,divider:(e,o)=>`Divider between column ${e} and column ${o}`,dividerValue:(e,o,t,a)=>`Column ${e} ${l(o,0)}, column ${t} ${l(a,0)}`,dragHint:"Drag to change the widths",hint:(e,o)=>`Type a width or drag a line. No column goes below ${l(o,0)}.`,equal:"equal widths"},color:{swatch:(e,o)=>`${e}: ${o}`,none:"None",panel:e=>`${e} picker`,square:"Saturation and brightness",squareValue:(e,o)=>`Saturation ${l(e,0)}, brightness ${l(o,0)}`,hue:"Hue",opacity:e=>`${e} opacity`,hex:e=>`${e} hex code`,presets:"Presets",clear:"No color"},imageFocus:{picture:(e,o)=>`${e}: ${o}`,hint:"Drag the dot on the picture, or move it with the arrow keys. Shift moves it further.",noImage:"Choose an image first. There is nothing to focus yet."},link:{linkType:"Link type",address:"Link address",addressPlaceholder:"Link (e.g. /wheels or https://…)",unsafe:"Use a web address (https://…), a page on this site (/…), mailto: or tel:.",unavailable:e=>`${e} (unavailable)`,filter:"Filter",noFilter:"No filter (all products)",value:"Value",filterHint:"Filters come from Product Types. Only values in this site's catalogue are listed.",title:"Link",apply:"Apply",cancel:"Cancel",remove:"Remove",addLink:"Add a link",text:e=>`${e} text`,linkOf:(e,o)=>`${e} link: ${o||"none"}`},textToolbar:{formatting:"Formatting",bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",color:"Color",link:"Link",sup:"Superscript",sub:"Subscript",code:"Code",alignment:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",alignJustify:"Justify",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",letterCase:"Letter case",caseNone:"As typed",caseUpper:"Uppercase",caseLower:"Lowercase",clear:"Clear formatting"},tree:{empty:"Nothing here yet",dropHere:"Drop here",dragHint:"Drag to move",moveHint:"Alt+Arrow Up or Alt+Arrow Down moves it",insertHere:"Insert here"},layout:{desktop:"Desktop",sidebar:"Sidebar",switchToDesktop:"Switch to Desktop",switchToSidebar:"Switch to Sidebar",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",keepSidebarOpen:"Keep sidebar open",goHome:"Go to Home",resizeSidebar:"Resize sidebar",search:"Search…",navLabel:"Main menu",openWindows:"Open windows",favoriteApps:"Favorite apps",openFavorite:e=>`Open ${e}`,removeFavorite:"Remove from Favorites",pageResult:"Page",accountMenu:e=>`Account menu for ${e}`,profile:"My Profile",notifications:"Notifications",reportIssue:"Suggestion or Bug",signOut:"Sign Out",signOutTitle:"Sign Out",signOutMessage:"Do you want to log out? All windows will reopen when you log back in.",openMenu:"Open menu",closeMenu:"Close menu",openTabs:"Open tabs",getTheApp:e=>`Get the ${e} app`,openApp:"Open",dismiss:"Dismiss",deviceUsesSidebar:"This device always uses the Sidebar layout. Your choice still applies when you sign in on a computer.",largerScreensOnly:"Larger screens only",usedOnThisDevice:"Used on this device",back:"Back"},markdown:{screenshot:"Screenshot"},severity:{success:"ok",warning:"warning",danger:"critical",unrecognised:e=>`unrecognised severity ${e}`},meter:{noData:"no data",warningAt:e=>`warning ≥ ${n(e)}`,criticalAt:e=>`critical ≥ ${n(e)}`,legendWarning:"warning",legendCritical:"critical",noReading:"no reading",noBudget:"no budget",ofBudget:e=>`${e} of budget`,budget:"budget",pace:"expected by now",hoursMinutes:(e,o)=>`${n(e)}h ${n(o)}m`,minutesSeconds:(e,o)=>`${n(e)}m ${n(o)}s`,seconds:e=>`${n(e)}s`},charts:{showTable:"Show the data as a table",loading:"Loading chart data",noData:"No data in this window.",windowStart:"Window start",windowEnd:"Window end",window:(e,o,t)=>`Time window — showing ${e} to ${o} of ${n(t)} intervals`,overIntervals:(e,o)=>`${e.join(", ")} over ${n(o)} intervals`,acrossCategories:(e,o)=>`${e.join(", ")} across ${n(o)} categories`,acrossMeasures:(e,o)=>`${e.join(", ")} across ${n(o)} measures`,breakdown:(e,o)=>`Breakdown of ${e} across ${n(o)} segments`,funnel:(e,o,t)=>`Funnel of ${n(e)} stages, ${o} down to ${t}`,radialTrack:e=>`${n(e)} categories, as concentric proportions`,radialCycle:e=>`${n(e)} categories, around a cycle`,tableFrom:"From",tableTo:"To",tableItem:"Item",tableLevel:"Level",tableSeries:"Series",inBucket:e=>`${e} in this bucket`,zoomRange:(e,o,t)=>`${e} – ${o} · ${n(t)} ${1===t?"interval":"intervals"}`,zoomClear:"Clear",zoomLevel:(e,o)=>`${e} avg · ${o} peak`,inCategory:e=>`${e} in this category`,value:"Value",share:"Share",count:"Count",flow:"Flow",totalFlow:"Total flow",throughput:"Throughput",open:"Open",high:"High",low:"Low",close:"Close",maximum:"Maximum",q3:"Q3",median:"Median",q1:"Q1",minimum:"Minimum",distribution:"Distribution",fiveNumber:(e,o)=>`${e}: five-number summary for ${n(o)} categories`,outliers:e=>`${n(e)} outlier${e>1?"s":""} beyond the whiskers`,price:"Price",ohlc:(e,o)=>`${e}: open, high, low and close across ${n(o)} periods`,closedAbove:"Closed above its open",closedBelow:"Closed below its open",noFlows:"No flows to chart.",chord:e=>`Flows between ${n(e)} participants`,chordFolded:e=>`+${n(e)} more in Other`,noStages:"No stages to chart.",ofFirstStage:"Of first stage",droppedHere:"Dropped here",intensity:"Intensity",noActivity:"No activity in this window.",heatmap:(e,o,t)=>`${e} across ${n(o)} rows and ${n(t)} columns`,countAxis:"count",histogram:(e,o,t)=>`${e}: ${n(o)} bins over ${n(t)} observations`,observations:"Observations",notEnough:"Not enough eligible requests to judge.",objectiveMet:e=>`objective ${e} met`,objectiveMissed:e=>`objective ${e} missed`,nothingToPlot:"Nothing to plot.",nothingToCompare:"Nothing to compare.",other:"Other",nothingToBreakDown:"Nothing to break down.",range:"Range",rangeLabel:(e,o)=>`${e}: low and high across ${n(o)} categories`,nothingToRank:"Nothing to rank in this window.",emphasised:"(emphasised)",sankey:(e,o)=>`Flow between ${n(e)} nodes over ${n(o)} links`,noObservations:"No observations in this window.",xAxis:"x",yAxis:"y",size:"Size",scatter:(e,o,t)=>`${e.join(", ")}: ${o} against ${t}`,outsideRange:e=>`${n(e)} ${1===e?"point":"points"} outside the shown range`,waterfall:(e,o,t)=>`Waterfall of ${n(e)} steps from ${o} to ${t}`,balance:"Balance",increase:"Increase",decrease:"Decrease",runningTotal:"Running total",sunburst:(e,o)=>`Hierarchy of ${e} across ${n(o)} levels`,treemap:e=>`Treemap of ${n(e)} items`,trendUp:"up",trendDown:"down",trendFlat:"flat"},timeline:{days:e=>`${r(e)} days`,daysToToday:e=>`${r(e)} days to today`,notReached:"Not yet reached",next:"Next",more:e=>`+${n(e)} more`,today:"Today",todayTitle:e=>`Today — ${e}`,open:e=>`Open ${e}`,openButton:"Open",scrub:"Scrub the timeline",alsoToCome:e=>`Also to come: ${e.join(", ")}`,start:e=>`Start · ${e}`,events:(e,o)=>`${n(e)} events · ${o.join(", ")}`,started:e=>`started ${e}`,duration:e=>`${r(e)} day${1===e?"":"s"}`,reached:(e,o)=>`${n(e)} of ${n(o)} milestones`,milestones:e=>`${e} milestones`},production:{heading:"Production progress",start:"Start",estimated:"Estimated",estimatedCompletion:"Estimated completion",estDone:"Est. done",play:"Play",pause:"Pause",playTitle:"Play the timeline, report by report",backTo:e=>`Back to ${e}`,showing:e=>`Showing ${e}`,overall:e=>`${l(e,0)} overall`,inStock:e=>`${r(e)} pc in stock`,noReport:"No production report filed yet",leadTime:e=>`${r(e)} day${1===e?"":"s"} lead time`,report:"Production report",shipment:"Shipment",inspection:"Inspection",invoice:"Invoice",scrub:"Scrub the production timeline",label:(e,o)=>`Production reports and events, ${e} to ${o}`},containers:{items:e=>`${n(e)} items`,pieces:e=>`${n(e)} pcs`,split:(e,o)=>`(${n(e)} instr / ${n(o)} loaded)`,added:(e,o)=>`${n(e)} new (${n(o)} pcs)`,fill:(e,o)=>`${s(e,1)} / ${n(o)} m³`,total:"Total:",instructed:e=>`${s(e,2)} m³ instruction`,loaded:e=>`${s(e,2)} m³ loaded`,volume:e=>`${s(e,2)} m³`,noVolume:"Volume: N/A (no volume data for these part numbers)"},toast:{notification:"Notification",undo:"Undo"},map:{failed:"The map could not be drawn here. The list has everything it shows.",approximate:e=>`${e}, approximate location`,approximateTitle:e=>`${e} (approximate)`,places:e=>1===e?"place":"places",group:(e,o)=>`${n(e)} ${o} here`,stops:e=>`Stops ${e}`,closeBy:(e,o)=>`${n(e)} more ${o} close by, drawn when the map is closer`,spread:"Press to see them apart",cycle:"They stand on one spot: press for the next of them",fullScreen:"Full screen",leaveFullScreen:"Leave full screen",chosen:e=>`${e}, chosen on the map`,closeCard:"Close",openRecord:"Open"},modelViewer:{loading:"Loading the 3D model",noWebgl:"This browser can't show 3D, so this is a still picture.",failed:"The 3D model didn't load, so this is a still picture. Reload the page to try again."},pdf:{previousPage:"Previous page",nextPage:"Next page",pageOf:(e,o)=>`${n(e)} / ${n(o)}`,zoomOut:"Zoom out",zoomIn:"Zoom in",zoom:"Zoom",fitWidth:"Fit width",fitPage:"Fit page",fit:"Fit",fitHint:"Fit to the pane: follows its size until you zoom by hand",print:"Print",download:"Download",email:"Email",loading:"Loading PDF",loadFailed:"Failed to load PDF",allowPopups:"Allow popups to print"},loading:{label:"Loading"},language:{title:"Language",description:"The language of menus, labels and messages.",reloadNote:"The page reloads when you change the language."},entityList:{open:"Open",copy:"Copy",copyColumn:e=>`Copy ${e}`,copyRows:e=>1===e?"Copy row":`Copy ${n(e)} rows`,exportSelected:"Export selected to CSV",selectAll:"Select all",selectAllLoaded:e=>`Select all ${n(e)} loaded`,clearSelection:"Clear selection",refresh:"Refresh",copiedText:"Text",copiedRows:e=>1===e?"Row":`${n(e)} rows`,exported:e=>`Exported ${n(e)} ${1===e?"row":"rows"}.`,exportTruncated:(e,o)=>`Exported ${n(e)} of ${n(o)} rows. The server capped this export, so the file is incomplete.`,exportTruncatedUnknown:e=>`Exported only some of the ${n(e)} rows. The server capped this export, so the file is incomplete.`,exportFailed:"CSV export failed."},columns:{choose:"Choose columns",heading:"Columns",reset:"Reset",saveDefault:"Save as default for all users",savedDefault:"Saved as default",select:"Select",selectDone:"Done",showSelection:"Show selection column",hideSelection:"Hide selection column"},record:{loading:"Loading record",signInRequired:"Sign in required",signInBody:"Your session may have expired. Sign in again to open this record.",notFound:"Record not found",loadFailed:"Couldn't load record",checkConnection:"Check your connection and try again.",rejected:"The server rejected this request.",retry:"Try again"},password:{current:"Current Password",newPassword:"New Password",confirm:"Confirm Password",submit:"Change Password",submitting:"Changing",done:"Done",currentRequired:"Current password is required.",tooShort:e=>`New password must be at least ${n(e)} characters.`,mismatch:"Passwords do not match.",failed:"Failed to change password.",changed:"Your password has been changed successfully."},pdfAction:{label:"PDF",loading:"Loading",preview:"Preview",download:"Download",email:"Send by Email",downloaded:e=>`${e} downloaded.`,tookTooLong:e=>`${e} took too long to load. Please try again.`,previewLoading:"LOADING PDF",previewTookTooLong:"This document took too long to load. Close this window and try again.",previewFailed:"Failed to load PDF."},undo:{undo:"Undo",redo:"Redo",undoStep:(e,o)=>`Undo ${e} (${o})`,redoStep:(e,o)=>`Redo ${e} (${o})`,nothingToUndo:"Nothing to undo",nothingToRedo:"Nothing to redo"},sounds:{title:"Sounds",enable:"Sound effects",autosave:"Changes are saved automatically",choice:(e,o)=>`${e} — ${o}`,packClassic:"Classic",packMinimal:"Minimal",packRetro:"Retro",packSoft:"Soft",packArcade:"Arcade",packSilent:"Silent",eventClick:"Click",eventSuccess:"Success",eventError:"Error",eventNotification:"Notification",eventStartup:"Startup",eventTimerDone:"Timer",eventLogout:"Logout"},serverStatus:{connected:"Connected",disconnected:"Disconnected",checking:"Checking",lastOkTitle:(e,o)=>`${e} · last ok ${o}`,details:"Server connection details",lastPoll:e=>`Last poll ${e}.`,lastFailure:e=>`Last failure ${e}.`,firstPoll:"First poll in flight",server:"Server",protocol:"Protocol",browser:"Browser",online:"Online",offline:"Offline",lastOk:"Last OK",lastFail:"Last fail",latency:"Latency",poll:"Poll",pollEvery:e=>`every ${n(e)} s`,session:"Session",user:"User",notSignedIn:"Not signed in",role:"Role",build:"Build",app:"App",userAgent:"UA",pingHint:"Click ↻ to ping now",refresh:"Refresh"},bulkImport:{description:"Paste from spreadsheets, type directly, or upload a CSV. Rows don't need to be in order — they'll be matched. Values not in the list will be added to the end. Fields left blank will not be affected.",lines:e=>`${n(e)} lines`,total:(e,o)=>`${e}: ${o}`,clear:"Clear",upload:"Upload CSV",importLines:e=>`Import ${n(e)} Lines`,importing:"Importing",importFailed:"Import failed.",enterAtLeastOne:e=>`Enter at least one ${e||"value"}.`,allSkipped:"All rows skipped.",cancel:"Cancel",mapTitle:"Map CSV columns to fields",skip:"— Skip —",columnOption:(e,o)=>`Column ${n(e)} (e.g. ${o})`,rowsDetected:e=>`${n(e)} rows detected`,confirmMapping:"Confirm Mapping",duplicatesTitle:"Duplicate entries detected",duplicatesFound:e=>`${n(e)} ${1===e?"value appears":"values appear"} more than once in your import. Choose how to handle each before proceeding.`,occurrences:e=>`${n(e)} occurrences`,keepFirst:"Keep first",keepLast:"Keep last",keepAll:"Keep all",skipAll:"Skip all",keptDropped:(e,o)=>`${n(e)} kept · ${n(o)} dropped`,proceed:"Proceed",duplicatesMerged:e=>`${n(e)} ${1===e?"value appeared":"values appeared"} more than once. Each is merged into a single line with its quantity summed — review before proceeding.`,mergedFrom:"Merged from",mergedRows:e=>`${n(e)} rows`,mergeSummary:(e,o)=>`${n(e)} duplicate rows → ${n(o)} merged line${1===o?"":"s"}`},preview:{windowTitle:e=>`${e} - Preview`,untitled:"Untitled",position:(e,o)=>`${n(e)} of ${n(o)}`,namedPosition:(e,o)=>`${e} · ${o}`,previousFile:"Previous file",nextFile:"Next file",open:"Open",formats:"PDF · DXF · 3D · Images",dropHere:e=>`Drop a file here, or click ${e}.`,supportedFormats:"Supported formats",formatPdf:"multi-page document viewer",formatDxf:e=>`vector CAD drawings (optional ${e} peer dep)`,format3d:e=>`3D models (optional ${e} peer dep)`,formatImage:"raster images",dwgNote:"DWG files need to be converted to PDF or DXF first (server-side).",dropToOpen:"Drop to open",dwgUnsupported:"DWG files need server-side conversion. Convert to PDF or DXF first.",unsupportedType:e=>`Unsupported file type: .${e||"unknown"}`,converting:"Converting file",download:"Download",email:"Email",howToNavigate:"How to navigate",stopMeasuring:"Stop measuring (Esc)",scrollToZoom:"Scroll to zoom",closePanel:"Close",annotate:"Annotate",annotateHint:"Annotate this image",view:"View",viewHint:"Back to viewer",copy:"Copy",save:"Save",imageFailed:"Failed to load image.",downloadFailed:"Download failed — couldn't reach the file."},drawing:{loading:"Loading drawing",notInstalled:"dxf-viewer is not installed in this app.",renderFailed:"Failed to render DXF.",layers:"Layers",layersHint:"Toggle layer visibility",allLayers:"All",noLayers:"None",measure:"Measure",measureHint:"Measure distance — click two points on the drawing, or type DI / DIM below",auto:"Auto",autoHint:"Auto — AutoCAD DIMLINEAR: measures ΔX or ΔY, whichever is larger between the two picks",horizontalHint:"Horizontal — distance along the X axis between two picks (AutoCAD DIMLINEAR horizontal)",verticalHint:"Vertical — distance along the Y axis between two picks (AutoCAD DIMLINEAR vertical)",point:"Point",pointHint:"Point — straight-line (Euclidean) distance between two picks (AutoCAD DIST)",fixX:"fix Δx",fixY:"fix Δy",fixHint:"Lock the second pick's axis coord to first pick + this value (mm). The reported measurement becomes the perpendicular distance.",clearFixed:"Clear fixed distance",horizontalDistance:e=>"Horizontal distance (Δx) between the two picked points"+(e?" — Auto resolved to the X axis":""),verticalDistance:e=>"Vertical distance (Δy) between the two picked points"+(e?" — Auto resolved to the Y axis":""),straightDistance:"Straight-line distance between the two picked points",fit:"Fit",fitHint:"Fit drawing to view",dragToPan:"Drag to pan",fitToReset:"Fit to reset",typeToMeasure:e=>`Type ${e} to measure`,commandPlaceholder:"Type a command — DI, DIM, H, V, Z, LA (? for help)",commandHelp:"Commands: DI distance · DIM/DLI linear dim · H / V force axis · <number> lock Δ · U undo pick · Z fit · LA layers · Esc exit",echoDistance:(e,o,t)=>`Distance = ${e} ΔX = ${o} ΔY = ${t}`,echoLinear:(e,o)=>`Linear dimension = ${e} (${o})`,echoLocked:(e,o,t,a)=>`${e} = ${o} with ${t} locked to ${a}`,axisLocked:(e,o)=>`${e} locked to ${o} — the label shows the perpendicular distance`,fixedCleared:"Fixed distance cleared.",fixedNeedsAxis:"Fixed distances apply in H or V mode — type H or V first.",echoDist:"DIST — click two points; straight-line distance (Esc to exit)",echoDimLinear:"DIMLINEAR — click two points; measures ΔX or ΔY, whichever is larger (H / V to force)",echoHorizontal:"Horizontal — ΔX between the two picks",echoVertical:"Vertical — ΔY between the two picks",echoAuto:"Auto (DIMLINEAR) — measures along the dominant axis of the two picks",measureOn:"Measure on — click two points.",measureOff:"Measure off.",pickRemoved:"Last pick removed.",zoomExtents:"Zoom extents.",layersToggled:"Layer panel toggled.",measurementCleared:"Measurement cleared.",readOnly:e=>`${e} is a drawing command — Preview is a read-only viewer. Measuring: DI, DIM, H, V (? for help)`,unknownCommand:e=>`Unknown command "${e}" — try DI, DIM, H, V, Z, LA (? for help)`,cancelled:"*Cancel*"},model:{loading:"Loading 3D model",stepNote:"STEP files load OpenCascade WASM (~5 MB) on first use.",notInstalled:"online-3d-viewer is not installed in this app. Add it to enable 3D file viewing.",loadFailed:"Failed to load 3D model.",rootNode:"Root",node:"Node",collapse:"Collapse",expand:"Expand",fitToView:"Fit to view",hide:"Hide",show:"Show",isometric:"ISO",isometricView:"Isometric view",top:"TOP",topView:"Top view",front:"FRT",frontView:"Front view",side:"SDE",sideView:"Side view",perspective:"Perspective",orthographic:"Orthographic",toPerspective:"Switch to perspective view",toOrthographic:"Switch to orthographic view",snapshot:"Save snapshot as PNG",measureHint:"Measure distance — click two points on the model",point:"Point",pointHint:"Point — measure straight-line distance between two picked points",perpendicularHint:"Perpendicular — pick two surfaces and measure the perpendicular gap between them",straightDistance:"Straight-line distance between the two picked points",perpendicularDistance:"Perpendicular distance between the two picked surfaces",meshesHint:"Toggle meshes panel",displayHint:"Toggle display panel",downloadOriginal:"Download original file",meshes:"Meshes",readingModel:"Reading model",noStructure:"No structure available",allVisible:"All visible",hiddenCount:e=>`${n(e)} hidden`,dragToRotate:"Drag to rotate",rightDragToPan:"Right-click drag to pan",display:"Model Display",backgroundColor:"Background Color",showEdges:"Show Edges",edgeColor:"Edge Color",edgeThreshold:"Edge Threshold",sectionView:"Section View",angle:"Angle",axis:"Axis",flipHint:"Flip section direction",flip:"flip →",flipped:"← flipped",position:"Position",resetDisplay:"Reset to Default"},annotator:{toolSelect:"Select / Move",toolDraw:"Pen / Draw",toolRect:"Rectangle",toolEllipse:"Ellipse",toolArrow:"Arrow",toolMosaic:"Mosaic",toolText:"Text",toolCrop:"Crop",weight:"Weight",radius:"Radius",size:"Size",padding:"Pad",fontSystem:"System",fontSerif:"Serif",fontMono:"Mono",fontCursive:"Cursive",bold:"Bold",boldLetter:"B",italic:"Italic",italicLetter:"I",underline:"Underline",underlineLetter:"U",border:"Border",borderColor:"Text-box border color",addBorder:"Add a border",removeBorder:"Remove border",fill:"Fill",fillColor:"Text-box background color",addFill:"Add a background fill",removeFill:"Remove fill",add:"Add",zoomOut:"Zoom out",zoomIn:"Zoom in",fit:"Fit",fitHint:"Fit to area",undo:"Undo",applyCrop:"Apply Crop",cancel:"Cancel",apply:"Apply",hintSelected:"Drag to move. Drag a corner to resize. Delete / Backspace removes. Click outside to deselect.",hintSelect:"Tap a shape to select. Double-click text to edit.",hintText:"Click to drop a text label.",hintCrop:"Drag a rectangle to set the crop region.",hintDraw:"Drag to draw freehand.",hintShape:"Drag on the image to draw.",textPlaceholder:"Type then Enter…",loadFailed:"Failed to load image",exportFailed:"Failed to export",clipboardUnsupported:"Clipboard images not supported in this browser",copyFailed:"Failed to copy",copied:"Copied to clipboard",copyRefused:"Copy failed (clipboard permission?)"},attachment:{fallbackName:"attachment",noLink:"This attachment has no download link.",spreadsheetFailed:"Could not open the spreadsheet — opening the file instead.",workbookUnavailable:"Spreadsheet preview is unavailable for this file type. Opening the file instead.",noViewer:"Opening this file outside the app — no viewer can show it here.",loading:"LOADING FILE",loadFailed:"Failed to load this file."},aboutApp:{title:e=>`About ${e}`,version:e=>`Version ${e}`,partOf:e=>`Part of the ${e} desktop environment`,shellVersion:e=>`shell v${e}`,notepad:"Color-coded notes with checklists, desktop stickies and entity autolinking.",preview:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar.",files:"Personal file manager with folders, uploads, quota, trash, sharing and desktop shortcut folders.",browser:"Minimal web browser with bookmarks, history and navigation bar."}}}var c=d(),p=/* @__PURE__ */new Map;var h=i(c),u=i(null),m=/* @__PURE__ */new Set;var g=c,w={};function f(){return g}function $({value:e=w,locale:o,children:t}){const a=n(u),i=r(()=>function(e){if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return void(m.has(e)||(m.add(e),console.error(`[efficient-shell] ShellStringsProvider: locale="${e}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`)))}}(o),[o]),f=void 0===o?a?.locale:i,$=r(()=>{const o=function(e){if(!e)return c;let o=p.get(e);return o||(o=d(e),p.set(e,o)),o}(f),t={};for(const a of Object.keys(o))t[a]={...o[a],...e[a]??{}};return t},[e,f]),v=r(()=>({locale:f}),[f]),y=null!==a;return s(()=>{if(!y)return g=$,()=>{g===$&&(g=c)}},[$,y]),/* @__PURE__ */l(u.Provider,{value:v,children:/* @__PURE__ */l(h.Provider,{value:$,children:t})})}function v(){return n(h)}function y(){return n(u)?.locale}function b(e){const[o="",...t]=e("\0").split("\0");return[o,t.join("")]}export{c as DEFAULT_SHELL_STRINGS,$ as ShellStringsProvider,f as currentShellStrings,b as splitAround,y as useShellLocale,v as useShellStrings};
|
package/dist/chunk-JPE4TYRQ.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{SearchableSelect as e}from"./chunk-G2JPTPRS.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-GEITUFYK.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-3SIRRK3F.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-UTISUEO4.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-IUVGHHR3.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:O="",tidyAddress:j,addressAddon:E}=t,T=void 0!==t.onApply,U=u().link,$=y.isSafe??k,R=d(),S=c(null),z=c(null),[A,P]=p({url:n}),D=T?A.url:n,[I,K]=p(!1),[Y,G]=p(null),[H,M]=p(null),[V,W]=p(!1),B=c(null),L=c(()=>{});L.current=T?t.onCancel:()=>{},m(()=>{if(T)return s(e=>{const a=S.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(L.current(),!0)},()=>S.current)},[T]),m(()=>{if(!T)return;const e=z.current;e?(e.focus(),e.select()):S.current?.querySelector("button, input")?.focus()},[]);const Q=o??[{value:b,label:U.address,target:{type:"text"}}],Z=Y&&Y.against===D?Y.kind:y.kindOf(D),q=Q.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===Z),J=q.find(e=>"text"===e.target.type),X=q.find(e=>e.value===Z)??J??q[0];if(!X)return null;const _="text"!==X.target.type,ee=_?y.targetOf(D):D,ae=h(X.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:U.unavailable(e)}),re="select"===X.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(D):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=H&&H.against===D?H.text:D,se=_?D:j?j(oe.trim()).trim():oe.trim(),ue=T&&j?se:oe,de=!_&&""!==ue.trim()&&!$(ue),ce=de&&(!T||I);_&&V&&W(!1);const pe=(e,a)=>{T?P({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{G(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{K(!1);const a=e.trim();a?$(e)?(M({text:e,against:a}),me(a)):M({text:e,against:D}):(M({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===z.current||B.current?.contains(a)))return;if(W(!1),T||!j||C)return;const l=j(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!T||!se)return;if(!_&&de)return void K(!0);const e=_&&A.url===se?A.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(a,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
-
return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
-
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:n})};let ke;if("text"===X.target.type)ke=/* @__PURE__ */f(r,{ref:z,id:`${R}-address`,size:"sm",type:"text",invalid:ce,"aria-label":U.address,"aria-describedby":ce?`${R}-why`:void 0,placeholder:F??U.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:C,onChange:e=>ve(e.target.value),onFocus:()=>W(!0),onBlur:ge,onKeyDown:j&&!T?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===X.target.type?X.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):X.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:X.target.placeholder},...be(e,ee)];ke=xe(X.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe(U.linkType,X.value,q.map(e=>({value:e.value,label:e.label})),e=>{M(null),K(!1);const a=q.find(a=>a.value===e);if(!a||"text"===a.target.type)return void G({kind:e,against:D});const l=h(a.target)[0];G({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&V&&!C&&"text"===X.target.type&&/* @__PURE__ */f("div",{ref:B,onBlur:ge,children:E({url:oe,onChange:ve})}),re&&xe(U.filter,ne?.param??"",[{value:"",label:U.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe(U.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${R}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:U.unsafe}),X.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:X.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:U.filterHint})]});if(!T)/* @__PURE__ */
|
|
4
|
-
return f("div",{ref:S,className:`flex min-w-0 flex-auto flex-col gap-2 ${O}`.trim(),role:N?"group":void 0,"aria-label":N,children:ye});const we=t.onRemove;/* @__PURE__ */
|
|
5
|
-
return v("div",{ref:S,role:"dialog","aria-label":N??U.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${O}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:a({inline:!0}),children:U.title}):/* @__PURE__ */f("label",{htmlFor:`${R}-address`,className:a({inline:!0}),children:U.title}),ye,
|
|
6
|
-
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:U.remove}):null,
|
|
7
|
-
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
-
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>L.current(),children:U.cancel}),
|
|
9
|
-
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:C||""===se,children:U.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),F=d(),O=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
|
-
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
-
/* @__PURE__ */f(r,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
-
/* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?F:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${n.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
-
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
-
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:F,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),O()},onRemove:t?()=>{i(""),O()}:void 0,onCancel:O})})]})}export{y as LinkPicker,w as TextLinkField};
|
package/dist/chunk-KGAYYSFE.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-F4VILY3O.js";import{IconButton_default as a}from"./chunk-NWS5G7FE.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{Tooltip as n}from"./chunk-F2RAIGCG.js";import{useShellStrings as s}from"./chunk-IUVGHHR3.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
-
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":I,windows:R,className:S="",layout:j="grid"}){const A=s().textToolbar,q=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!q.words&&!q.paragraph)return null;const L=m(n,k,x,q.cells.paragraph),$=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,B=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:$(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:$(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,G=l(A),U=e.map(e=>[e,G[e],r(e)]),F=C?e.filter(e=>C.allow.includes(e)):[],H=C&&F.includes(C.value)?C.value:F[0],K=[["none",A.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",A.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",A.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],O=x&&L?g(A.clear,/* @__PURE__ */i(a,{className:$(!1),"aria-label":A.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,T=/* @__PURE__ */t(d,{children:[B("bold",A.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),B("italic",A.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),B("underline",A.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),B("strike",A.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(A.color,/* @__PURE__ */i(a,{pressed:k.open,className:$(k.open,"rosh-tb-color"),"aria-label":A.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,B("link",A.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),B("sup",A.sup,/* @__PURE__ */i(o,{name:"superscript"})),B("sub",A.sub,/* @__PURE__ */i(o,{name:"subscript"})),B("code",A.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===L?O:null]}),V=/* @__PURE__ */t(d,{children:[C&&F.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":A.alignment,onKeyDown:e=>p(e,F,e=>C.onChange(e)),children:U.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:$(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===H?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(A.bullet,/* @__PURE__ */i(a,{className:$("bullet"===D.pressed),"aria-label":A.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(A.number,/* @__PURE__ */i(a,{className:$("number"===D.pressed),"aria-label":A.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,B("quote",A.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":A.letterCase,onKeyDown:e=>p(e,K.map(([e])=>e),e=>M.onChange(e)),children:K.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:$(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===L?O:null]}),E="row"===j,P=E?" is-row":q.flow?" is-flow":q.oneRow?" is-one-row":q.words&&void 0===N&&"words"!==L?" is-eight":"",W=b(n,Boolean(k)),Y={"--rosh-tb-color-col":String(W.color),"--rosh-tb-link-col":String(W.link),...E?{"--rosh-tb-cells":String(q.cells.words+q.cells.paragraph),"--rosh-tb-groupgap":q.words&&q.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let z;return z=E?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:T}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:V}):null]}):q.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[T,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),V]}):q.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:T}),
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:V})]}):/* @__PURE__ */t(d,{children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==L?" is-eight":""),children:T}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:V}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${P} ${S}`.trim(),style:Y,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":I??A.formatting,children:z}),R]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-LQCNIQ3I.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as i,usePopupLevel as t,usePopupLevelBindings as r,windowScrimStyle as o,OverlayLayerProvider as l,scrimHasCorners as n,CloseButton as d,popupLayerStyle as a}from"./chunk-SF4IIV5Z.js";import{useDiscardGuard as s}from"./chunk-FRCTA5FS.js";import{dialogA11y as m}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as c}from"./chunk-UVHXVSB2.js";import{useFocusTrap as p,useScrollLock as h}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as u,DESCRIPTION_TEXT as f,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{useHydrated as y}from"./chunk-WCCS4VFE.js";import{registerModalEscapeInterceptor as v}from"./chunk-TWVUQUUD.js";import{useRef as x,useId as w,useState as g,useEffect as k}from"react";import{createPortal as j}from"react-dom";import{jsxs as N,Fragment as C,jsx as W}from"react/jsx-runtime";var V={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},F={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function $(e,i){const t=window.innerHeight-(i.top+i.height);if("bottom"===e)return{left:i.left,width:i.width,bottom:t};const r={top:i.top,height:i.height};return"left"===e?{...r,left:i.left}:{...r,right:window.innerWidth-(i.left+i.width)}}function B({open:B,onClose:H,side:S="right",size:U="md",title:Z,description:D,footer:I,children:T,blocking:z=!1,dirty:A=!1,initialFocus:E,"aria-label":G,"aria-labelledby":Y,"aria-describedby":J,className:O=""}){const Q=x(null),R=w(),X=w(),q=w(),K=e(y()),[L,M]=g(null),P=s({open:B,dirty:A,onClose:H,title:Z,layer:L}),_=x(null),ee=i(B&&null!==K,_),ie=t(B&&null!==K,_),te=r(ie,L),re=o(ie),oe=null!==ie.host;if(c(B),p(Q,B&&null!==K,E,te),h(B),k(()=>{if(B)return v(()=>!te.current?.(document.activeElement)&&(z||P(),!0),()=>Q.current)},[B,z,P,te]),!B||!K)return null;const le="bottom"===S,ne={...le?{maxHeight:"85vh"}:{},...ee?$(S,ee):{}};/* @__PURE__ */
|
|
2
|
-
return N(C,{children:[/* @__PURE__ */W("span",{ref:_,hidden:!0,"data-popup-anchor":""}),j(
|
|
3
|
-
/* @__PURE__ */W(l,{value:L,children:/* @__PURE__ */N("div",{ref:M,className:oe?"fixed inset-0 pointer-events-none":"fixed inset-0",style:a(ie),role:"presentation","data-overlay-layer":"",children:[
|
|
4
|
-
/* @__PURE__ */W("div",{className:"fixed bg-black/30 backdrop-blur-sm "+(oe?"pointer-events-auto"+(n(ie)?" rounded-(--radius-window)":""):"inset-0"),style:re??void 0,hidden:oe&&!re,onClick:z?void 0:P,"aria-hidden":"true","data-popup-scrim":oe?"window":"system"}),
|
|
5
|
-
/* @__PURE__ */N("div",{ref:Q,...m({modal:!0,titleId:Z?q:void 0,labelledBy:Y,label:G}),"aria-describedby":J??(D?X:T?R:void 0),"data-drawer-side":S,"data-popup-panel":"",style:ne,className:[`fixed flex flex-col ${b}`,oe?"pointer-events-auto":"",le?"":`w-full max-w-full ${V[U]}`,ee?"":F[S],le?"rounded-t-xl":"",O].filter(Boolean).join(" "),children:[Z?/* @__PURE__ */N("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
6
|
-
/* @__PURE__ */N("div",{className:"min-w-0",children:[
|
|
7
|
-
/* @__PURE__ */W("h2",{id:q,className:u,children:Z}),D&&/* @__PURE__ */W("p",{id:X,className:`mt-0.5 ${f}`,children:D})]}),!z&&/* @__PURE__ */W(d,{onClose:P})]}):!z&&/* @__PURE__ */W("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */W(d,{onClose:P})}),
|
|
8
|
-
/* @__PURE__ */N("div",{id:R,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[D&&!Z&&/* @__PURE__ */W("p",{id:X,className:`mb-3 ${f} ${z?"":"pr-8"}`.trim(),children:D}),T]}),I&&/* @__PURE__ */W("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:I})]})]})}),K)]})}export{B as Drawer};
|
package/dist/chunk-LZOKBMAF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="13.21.0",a=r;export{a as APP_VERSION,r as VERSION};
|