@objectstack/console 14.6.0 → 14.8.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/dist/.objectui-sha +1 -1
- package/dist/assets/{AdapterProvider-cnK1q1oP.js → AdapterProvider-BzVT9qYv.js} +1 -1
- package/dist/assets/{AiPendingActionsPage-mX_Izb42.js → AiPendingActionsPage-B4I03oil.js} +1 -1
- package/dist/assets/{ApiConsolePage-fUV9bmEg.js → ApiConsolePage-_wjPZg_8.js} +1 -1
- package/dist/assets/AppDocsIndex-B3Y96Lvd.js +1 -0
- package/dist/assets/{AppManagementPage-BRmzB5eR.js → AppManagementPage-DxZABvOm.js} +1 -1
- package/dist/assets/ApprovalsInboxPage-DAjFkDy9.js +1 -0
- package/dist/assets/{AuditLogPage-REsiCTKG.js → AuditLogPage-CuKdhFr9.js} +1 -1
- package/dist/assets/{ComponentNavView-B4EBSM-o.js → ComponentNavView-DebBry51.js} +1 -1
- package/dist/assets/CreateViewDialog-BCEk3ESW.js +1 -0
- package/dist/assets/DashboardView-Bi_ea9x6.js +1 -0
- package/dist/assets/{DeveloperHubPage-B6pD0HUk.js → DeveloperHubPage-CEFVU_4t.js} +1 -1
- package/dist/assets/DocShell-C09YMyAT.js +1 -0
- package/dist/assets/{ExpressionProvider-D94jBDAc.js → ExpressionProvider-gKUl8r3a.js} +1 -1
- package/dist/assets/{FlowRunsPage-C4Setjuz.js → FlowRunsPage-Of98wriv.js} +1 -1
- package/dist/assets/{IntegrationsPage-EOVS24Ho.js → IntegrationsPage-D2Eh-wKl.js} +2 -2
- package/dist/assets/{InterfaceListPage-BFlwb0U7.js → InterfaceListPage-BuAQSxuZ.js} +1 -1
- package/dist/assets/ManagedByBadge-3xVjmTY7.js +1 -0
- package/dist/assets/MarketplaceAccessDenied-YG6RAG6U.js +1 -0
- package/dist/assets/MarketplaceInstalledPage-BFESaZWD.js +1 -0
- package/dist/assets/MarketplacePackagePage-Vy7JiFQ0.js +4 -0
- package/dist/assets/MarketplacePage-C9kQ9UzP.js +1 -0
- package/dist/assets/MetadataInspector-Dc5CNMYV.js +1 -0
- package/dist/assets/{MetadataProvider-C8ABa_gQ.js → MetadataProvider-Bkb-vkjJ.js} +1 -1
- package/dist/assets/{MonacoImpl-nyLaER8_.js → MonacoImpl-_--K1JSa.js} +1 -1
- package/dist/assets/ObjectDataPage-B_qdf_tA.js +1 -0
- package/dist/assets/PageView-CO7Yco3U.js +1 -0
- package/dist/assets/ProfilePage--OycjBXX.js +1 -0
- package/dist/assets/PublicFormsPage-CI1LZQKt.js +1 -0
- package/dist/assets/RecordDetailView-BQzH8bIG.js +2 -0
- package/dist/assets/RecordFormPage-D3fuaSOR.js +1 -0
- package/dist/assets/ReportDefaultInspector-DfAMgr8D.js +3 -0
- package/dist/assets/ReportView-DyMm1CCA.js +2 -0
- package/dist/assets/{SearchResultsPage-B3ShD29d.js → SearchResultsPage-CVsVjc9k.js} +1 -1
- package/dist/assets/{SettingsHub-DgLunUQU.js → SettingsHub-DTr02Vxf.js} +1 -1
- package/dist/assets/{SettingsView-DFfL8vn4.js → SettingsView-BN_M8m7j.js} +1 -1
- package/dist/assets/{SystemHubPage-A9Z1FplZ.js → SystemHubPage-DGggPmsC.js} +1 -1
- package/dist/assets/abnfDiagram-VRR7QNED-BM2gIA2H.js +1 -0
- package/dist/assets/appRoute-C7XNGt8B.js +1 -0
- package/dist/assets/architecture-TIHT7OUA-X9gN3Z_J.js +1 -0
- package/dist/assets/architectureDiagram-ZJ3FMSHR-wyeItulr.js +36 -0
- package/dist/assets/assistantBus-CbDb2Mju.js +1 -0
- package/dist/assets/{blockDiagram-677ZJIJ3-BmONypzo.js → blockDiagram-677ZJIJ3-BybRqe6u.js} +2 -2
- package/dist/assets/{c4Diagram-LMCZKHZV-DqIiaVjm.js → c4Diagram-LMCZKHZV-CZhtNS_4.js} +2 -2
- package/dist/assets/channel-BAx__6e1.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-BbTX8O4m.js → chunk-32BRIVSS-CjQ2uFsO.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-DkgICN4F.js → chunk-52WLFC77-BBx3j8yk.js} +1 -1
- package/dist/assets/chunk-5FCAYU7R-w3UK8d6o.js +1 -0
- package/dist/assets/chunk-5HE753X5-Cg3JdNF3.js +1 -0
- package/dist/assets/chunk-5JV3BV7I-Dm-WSvPI.js +1 -0
- package/dist/assets/chunk-5TONJI2A-CQhZ6bam.js +2 -0
- package/dist/assets/chunk-BIQX33UG-_A6SWMTr.js +1 -0
- package/dist/assets/{chunk-C7G6YPKG-UMP_bNDd.js → chunk-C7G6YPKG-CrZlt4pv.js} +1 -1
- package/dist/assets/chunk-CQNSW5MT-DaOzt4Yv.js +1 -0
- package/dist/assets/chunk-CYSBUYHQ-Dr63T7GU.js +1 -0
- package/dist/assets/chunk-EMLP6XTP-BYfeYg3o.js +1 -0
- package/dist/assets/{chunk-EX3LRPZG-B0dJ64Ff.js → chunk-EX3LRPZG-x9nXH4xc.js} +2 -2
- package/dist/assets/{chunk-FWX5IMBZ-B8cCL4T7.js → chunk-FWX5IMBZ-cqzp-iMz.js} +1 -1
- package/dist/assets/{chunk-HOUHSVGY-B5nScni0.js → chunk-HOUHSVGY-Bfkm0El3.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-zJg8KmvA.js → chunk-ICXQ74PX-WsDRuBhL.js} +1 -1
- package/dist/assets/chunk-JG7HCLWE-Dj9pjBYh.js +2 -0
- package/dist/assets/{chunk-KEIR6QF5-CxDrFr0l.js → chunk-KEIR6QF5-DtEGfq38.js} +4 -4
- package/dist/assets/{chunk-MOJQB5TN-DBKCpvOi.js → chunk-MOJQB5TN-K_QM_tTs.js} +1 -1
- package/dist/assets/chunk-MOZMSUNE-DxgOd8pF.js +1 -0
- package/dist/assets/{chunk-OGEWGWER-bKk51Nxt.js → chunk-OGEWGWER-CSkoB3Mi.js} +1 -1
- package/dist/assets/chunk-OSBZ3O6U-BSRxNamX.js +1 -0
- package/dist/assets/{chunk-PUDLZKDR-CKn_9iXM.js → chunk-PUDLZKDR-BUt9iFAU.js} +3 -3
- package/dist/assets/{chunk-Q4XR5HBZ-BP9atbVx.js → chunk-Q4XR5HBZ-B99LraLe.js} +1 -1
- package/dist/assets/chunk-QBLGF6JB-Xeo4xx7q.js +1 -0
- package/dist/assets/chunk-R7FJI6CG-D2Ok5kyf.js +1 -0
- package/dist/assets/{chunk-RYQCIY6F-B5RR1tIz.js → chunk-RYQCIY6F-CdJb5y8u.js} +1 -1
- package/dist/assets/chunk-U6XO7XAA-Cwwl_Wmn.js +2 -0
- package/dist/assets/{chunk-V7JOEXUC-DTerDTcg.js → chunk-V7JOEXUC-CzVnJgzj.js} +2 -2
- package/dist/assets/chunk-VAUOI2AC-HYDQgaka.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-jB_W-MHs.js → chunk-VR4S4FIN-B2IyRlJ4.js} +1 -1
- package/dist/assets/{chunk-WYO6CB5R-Cndg0Yo5.js → chunk-WYO6CB5R-C0_XZtpj.js} +2 -2
- package/dist/assets/chunk-XXDRQBXY-CtU5D9C8.js +1 -0
- package/dist/assets/chunk-YOTPTUD7-7OTU2RwK.js +1 -0
- package/dist/assets/{chunk-ZGVPDNZ5-BUUSzPje.js → chunk-ZGVPDNZ5-Bq7O6ELQ.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-DiVkGMIZ.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-DiVkGMIZ.js +1 -0
- package/dist/assets/cose-bilkent-JH36ORCC-DqKYLwMN.js +1 -0
- package/dist/assets/cynefin-VYW2F7L2-C94HS-Ni.js +1 -0
- package/dist/assets/cynefinDiagram-TSTJHNR4-CFApUIdk.js +62 -0
- package/dist/assets/cytoscape.esm-CQFVGiJu.js +321 -0
- package/dist/assets/{dagre-VKFMJZFB-Crs38V5P.js → dagre-VKFMJZFB-D4HlgjaA.js} +1 -1
- package/dist/assets/{dagre-CXRCoUWR.js → dagre-dpRSp0QF.js} +1 -1
- package/dist/assets/data-adapter-CCueB_gY.js +7 -0
- package/dist/assets/diagram-FQU43EPY-BcnxfyH-.js +3 -0
- package/dist/assets/{diagram-G47NLZAW-CSNJrWDK.js → diagram-G47NLZAW-CJxJUVu9.js} +1 -1
- package/dist/assets/diagram-NH7WQ7WH-DmBVlyYR.js +24 -0
- package/dist/assets/{diagram-OA4YK3LP-C2A07yOA.js → diagram-OA4YK3LP-CkaF9SQg.js} +3 -3
- package/dist/assets/diagram-WEI45ONY-8cpfjoG3.js +41 -0
- package/dist/assets/{dist-YwlXXOlT.js → dist-B4b49_J4.js} +1 -1
- package/dist/assets/ebnfDiagram-CCIWWBDH-kX04JbNj.js +1 -0
- package/dist/assets/{erDiagram-Q63AITRT-DjK6P1sf.js → erDiagram-Q63AITRT-GjnOtXoL.js} +2 -2
- package/dist/assets/eventmodeling-45OFAUF4-BuchSCe8.js +1 -0
- package/dist/assets/{exceljs.min-Dpb6mnud.js → exceljs.min-BSnPgFSx.js} +1 -1
- package/dist/assets/flowDiagram-23GEKE2U-CpcHvuan.js +1 -0
- package/dist/assets/framework-DUXRLJaF.js +36 -0
- package/dist/assets/{ganttDiagram-NO4QXBWP-UPhpWlEd.js → ganttDiagram-NO4QXBWP-7HpPOGwX.js} +2 -2
- package/dist/assets/{getIcon-p-vXfFiY.js → getIcon-PwXhgLNw.js} +1 -1
- package/dist/assets/gitGraph-TEB2WS4Q-B2hHXR-t.js +1 -0
- package/dist/assets/gitGraphDiagram-IHSO6WYX-BgBKFUwZ.js +106 -0
- package/dist/assets/{graphlib-B8gBHxth.js → graphlib-DS17s2tU.js} +1 -1
- package/dist/assets/highlighted-body-OFNGDK62-Cdc_XtSh.js +1 -0
- package/dist/assets/{i18n-DGsfMUMn.js → i18n-DALEd5g8.js} +3 -3
- package/dist/assets/index-BCvtzf7n.css +2 -0
- package/dist/assets/index-C_G40cue.js +2 -0
- package/dist/assets/info-DKCQHKI2-B_PilpBz.js +1 -0
- package/dist/assets/infoDiagram-FWYZ7A6U-CTsG_9Mj.js +2 -0
- package/dist/assets/infrastructure-Bc4DRENl.js +3 -0
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-DvmRhm8H.js → ishikawaDiagram-FXEZZL3T-DgMu6-jd.js} +2 -2
- package/dist/assets/{journeyDiagram-5HDEW3XC-DFf6bjOX.js → journeyDiagram-5HDEW3XC-CKI4PBJp.js} +2 -2
- package/dist/assets/{kanban-definition-HUTT4EX6-DLK5X8Ol.js → kanban-definition-HUTT4EX6-ChvGKWDx.js} +2 -2
- package/dist/assets/{katex-CddkPoXu.js → katex-B7rAX3Vi.js} +1 -1
- package/dist/assets/{map-DsCK-0Cs.js → map-BaFkSB1l.js} +1 -1
- package/dist/assets/mermaid-GHXKKRXX-D6paxo1u.js +1 -0
- package/dist/assets/mermaid-parser.core-B2-C9kB8.js +3 -0
- package/dist/assets/{mermaid.core-D3axazyv.js → mermaid.core-CskcjgHM.js} +2 -2
- package/dist/assets/metadata-admin-DYtDZDTS.js +23 -0
- package/dist/assets/{mindmap-definition-LN4V7U3C-DwbonLR_.js → mindmap-definition-LN4V7U3C-BSAiSefe.js} +2 -2
- package/dist/assets/packet-7NZHBO7P-qOo2g-vE.js +1 -0
- package/dist/assets/pegDiagram-2B236MQR-BUG9TR1Z.js +1 -0
- package/dist/assets/pie-RZYD4A2V-U1Vrb5_c.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-D8jBhNXT.js → pieDiagram-ENE6RG2P-CqKv9PBi.js} +3 -3
- package/dist/assets/plugin-calendar-C5OJe0lx.js +1 -0
- package/dist/assets/{plugin-charts-DPNohuuV.js → plugin-charts-C4pZYso-.js} +2 -2
- package/dist/assets/plugin-chatbot-B6HiHZjD.js +120 -0
- package/dist/assets/plugin-dashboard-BMm8A0um.js +6 -0
- package/dist/assets/plugin-form-zDPLpTAc.js +1 -0
- package/dist/assets/plugin-gantt-Bdm-Yvii.js +102 -0
- package/dist/assets/plugin-grid-BJGu5-41.js +8 -0
- package/dist/assets/plugin-kanban-BN37MzOm.js +1 -0
- package/dist/assets/plugin-map-Bamjhlg6.js +1 -0
- package/dist/assets/{plugin-markdown-CFO9Lenx.js → plugin-markdown-Cg477jm9.js} +1 -1
- package/dist/assets/plugin-report-9ivqW5g0.js +59 -0
- package/dist/assets/plugin-timeline-C9C1_Un7.js +1 -0
- package/dist/assets/plugin-tree-BDrBkDUi.js +1 -0
- package/dist/assets/plugin-view-YLoG5wfy.js +1 -0
- package/dist/assets/plugins-views-DyIUCjnC.js +4 -0
- package/dist/assets/preferLocal-CKqyhTP9.js +1 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-Do3adYzz.js → quadrantDiagram-ABIIQ3AL-DyfgU6pe.js} +2 -2
- package/dist/assets/radar-I7S5WNFK-BXCATs_F.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-M5RydKKn.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-Cx_YZh-R.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-u_O-iXWA.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6-8zQc29Q0.js +1 -0
- package/dist/assets/railroadDiagram-RFXS5EU6-DOOVaoMM.js +1 -0
- package/dist/assets/{requirementDiagram-TGXJPOKE-CClkXauU.js → requirementDiagram-TGXJPOKE-B0370dfa.js} +2 -2
- package/dist/assets/{sankeyDiagram-HTMAVEWB-DlUFch6E.js → sankeyDiagram-HTMAVEWB-BAioZail.js} +2 -2
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-BEDTwji4.js → sequenceDiagram-DBY2YBRQ-B20vuf87.js} +3 -3
- package/dist/assets/{skeletons-ySdMMgAT.js → skeletons-CnYUdj-X.js} +1 -1
- package/dist/assets/{src-X8yirhNO.js → src--kVwJFRS.js} +1 -1
- package/dist/assets/{src-D0ZYDfff.js → src-CKPhOIOh.js} +1 -1
- package/dist/assets/{src-CSRoqdRD.js → src-Cglm_8jd.js} +4 -4
- package/dist/assets/src-DD4w6yW2.js +18 -0
- package/dist/assets/src-LTygtqhe.js +1 -0
- package/dist/assets/{stateDiagram-2N3HPSRC-BN6M4MGy.js → stateDiagram-2N3HPSRC-BScu2B9X.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-9fyTUlZR.js +1 -0
- package/dist/assets/swimlanes-5IMT3BWC-VepjEXMA.js +1 -0
- package/dist/assets/swimlanesDiagram-G3AALYLV-i6IYZT2a.js +8 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-B6Oiv_gP.js → timeline-definition-FHXFAJF6-CvpwpY5P.js} +2 -2
- package/dist/assets/treeView-QDETBFTQ-BiM0w_uS.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-CuKHZODJ.js +1 -0
- package/dist/assets/{types-B99y2QyO.js → types-KTMf42UB.js} +1 -1
- package/dist/assets/ui-components-t1CVb1Ox.js +42 -0
- package/dist/assets/ui-layout-C7dEpbqb.js +1 -0
- package/dist/assets/use-book-data-Ddcv6p9p.js +1 -0
- package/dist/assets/{useMetadata-DemWIEqg.js → useMetadata-Ca0oaT4_.js} +1 -1
- package/dist/assets/{useOpenRecordList-B3tjtz1e.js → useOpenRecordList-C75NAaDm.js} +1 -1
- package/dist/assets/{usePackageL10n-CiFMHfKe.js → usePackageL10n-DfeTyD2w.js} +1 -1
- package/dist/assets/utils-Bxty7IIa.js +1 -0
- package/dist/assets/{vendor-charts-D_CNNxD5.js → vendor-charts-HLBqza5P.js} +6 -6
- package/dist/assets/vendor-dndkit-DoG7p74h.js +5 -0
- package/dist/assets/vendor-i18n-ByHglwq-.js +1 -0
- package/dist/assets/{vendor-icons-core-DvLgTVYc.js → vendor-icons-core-CO5pY7RP.js} +1 -1
- package/dist/assets/{vendor-markdown-BJvgKhXw.js → vendor-markdown-DlkSIxwM.js} +25 -25
- package/dist/assets/vendor-objectstack-BjCqbVaM.js +96 -0
- package/dist/assets/vendor-radix-CWCRv2pn.js +46 -0
- package/dist/assets/{vendor-react-BGDDiZfJ.js → vendor-react-BKSb6vFP.js} +3 -3
- package/dist/assets/vendor-sentry-C3ouQ5cr.js +501 -0
- package/dist/assets/{vendor-ui-utils-BzQBRdq3.js → vendor-ui-utils-D-WJ115h.js} +1 -1
- package/dist/assets/{vennDiagram-L72KCM5P-DqRcgOxS.js → vennDiagram-L72KCM5P-DlCQcm_6.js} +2 -2
- package/dist/assets/wardley-OPB4EBWU-zwaHU-Tl.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-BDyIMWfB.js → wardleyDiagram-EHGQE667-mesER_Po.js} +3 -3
- package/dist/assets/{xychartDiagram-FW5EYKEG-BRNQk20I.js → xychartDiagram-FW5EYKEG-cODEcpNB.js} +2 -2
- package/dist/index.html +6 -6
- package/package.json +1 -1
- package/dist/assets/AppDocsIndex-Bzh_4ehZ.js +0 -1
- package/dist/assets/ApprovalsInboxPage-DKgnvZ-2.js +0 -1
- package/dist/assets/ConsoleFloatingChatbot-BW-g5YTu.js +0 -1
- package/dist/assets/CreateViewDialog-BhCe1ZPc.js +0 -1
- package/dist/assets/DashboardView-CUXRWKPH.js +0 -1
- package/dist/assets/ManagedByBadge-Dpgfl255.js +0 -1
- package/dist/assets/MarketplaceAccessDenied-DuO_FDoh.js +0 -1
- package/dist/assets/MarketplaceInstalledPage-4MFyBXDW.js +0 -1
- package/dist/assets/MarketplacePackagePage-BDeaeKiT.js +0 -4
- package/dist/assets/MarketplacePage-DXMWpCHb.js +0 -1
- package/dist/assets/MetadataInspector-YoFTAkMA.js +0 -1
- package/dist/assets/ObjectDataPage-BSvqdmym.js +0 -1
- package/dist/assets/PageView-Dlpz3HgH.js +0 -1
- package/dist/assets/ProfilePage-2H6e2j4o.js +0 -1
- package/dist/assets/PublicFormsPage-DXYBK10A.js +0 -1
- package/dist/assets/RecordDetailView-CEdkDgV8.js +0 -9
- package/dist/assets/RecordFormPage-Bj3lDGqC.js +0 -1
- package/dist/assets/ReportDefaultInspector-BNtsE5kW.js +0 -3
- package/dist/assets/ReportView-COxfnluU.js +0 -2
- package/dist/assets/abnfDiagram-VRR7QNED-o_fBNeYD.js +0 -1
- package/dist/assets/appRoute-1sYdkwBz.js +0 -1
- package/dist/assets/architecture-TIHT7OUA-BF_0SrOH.js +0 -1
- package/dist/assets/architectureDiagram-ZJ3FMSHR-Bk_LES5L.js +0 -36
- package/dist/assets/assistantBus-BFk4fCbM.js +0 -1
- package/dist/assets/channel-CvRTB8GE.js +0 -1
- package/dist/assets/chunk-VAUOI2AC-BrcFPe7Z.js +0 -1
- package/dist/assets/chunk-XXDRQBXY-DGANY6E3.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-BGL42sFI.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-BGL42sFI.js +0 -1
- package/dist/assets/cose-bilkent-JH36ORCC-DJ-X6wmF.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-CXt4AgYW.js +0 -1
- package/dist/assets/cynefinDiagram-TSTJHNR4-C5mKt5aU.js +0 -62
- package/dist/assets/cytoscape.esm-B3I8pqwA.js +0 -321
- package/dist/assets/data-adapter-CAqKExcJ.js +0 -7
- package/dist/assets/diagram-FQU43EPY-Bkx8ccpS.js +0 -3
- package/dist/assets/diagram-NH7WQ7WH-PaRAbfdR.js +0 -24
- package/dist/assets/diagram-WEI45ONY-BEyyGNpU.js +0 -41
- package/dist/assets/ebnfDiagram-CCIWWBDH-CtfwkNuv.js +0 -1
- package/dist/assets/eventmodeling-45OFAUF4-Dmacb12o.js +0 -1
- package/dist/assets/flowDiagram-23GEKE2U-DfQvGNQk.js +0 -1
- package/dist/assets/framework-CWU64Lvg.js +0 -36
- package/dist/assets/gitGraph-TEB2WS4Q-ChM6j6Bd.js +0 -1
- package/dist/assets/gitGraphDiagram-IHSO6WYX-B6Qcltd9.js +0 -106
- package/dist/assets/highlighted-body-OFNGDK62-CcYD5yKj.js +0 -1
- package/dist/assets/index-BhMd7RVY.js +0 -2
- package/dist/assets/index-Dt-GIgSI.css +0 -2
- package/dist/assets/info-DKCQHKI2-C0RTkygr.js +0 -1
- package/dist/assets/infoDiagram-FWYZ7A6U-CgEoZeWY.js +0 -2
- package/dist/assets/infrastructure-DexdbqHf.js +0 -3
- package/dist/assets/marketplaceApi-1mMRJWDq.js +0 -1
- package/dist/assets/mermaid-GHXKKRXX-DWvjDOK-.js +0 -1
- package/dist/assets/mermaid-parser.core-DV_Ys_OF.js +0 -6
- package/dist/assets/metadata-admin-R79BWSDJ.js +0 -23
- package/dist/assets/packet-7NZHBO7P-DSHvkxBR.js +0 -1
- package/dist/assets/pegDiagram-2B236MQR-B4IMkAIV.js +0 -1
- package/dist/assets/pie-RZYD4A2V-DjNUdL88.js +0 -1
- package/dist/assets/plugin-calendar-GOvhSPjZ.js +0 -1
- package/dist/assets/plugin-chatbot-BT49v2CR.js +0 -120
- package/dist/assets/plugin-dashboard-N2kUovsm.js +0 -6
- package/dist/assets/plugin-form-QFhBvb96.js +0 -1
- package/dist/assets/plugin-gantt-2HGBxhYq.js +0 -93
- package/dist/assets/plugin-grid-qkHiovZ2.js +0 -8
- package/dist/assets/plugin-kanban-D8kWLfql.js +0 -1
- package/dist/assets/plugin-map-CXsqUoPv.js +0 -1
- package/dist/assets/plugin-report-CH4uZunJ.js +0 -59
- package/dist/assets/plugin-timeline-3MSv2v9S.js +0 -1
- package/dist/assets/plugin-tree-_3HdWuAy.js +0 -1
- package/dist/assets/plugin-view-CTBpbehM.js +0 -1
- package/dist/assets/plugins-views-BxKprmRN.js +0 -4
- package/dist/assets/radar-I7S5WNFK-qO0bWLwF.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-CAj9esX-.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-Ci_Yg729.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-Tz7H2Jrw.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6-BJIalSaK.js +0 -1
- package/dist/assets/railroadDiagram-RFXS5EU6-DDA7XtKq.js +0 -1
- package/dist/assets/recordFormNavigation-8nEYNxNo.js +0 -1
- package/dist/assets/src-TG89vY9R.js +0 -18
- package/dist/assets/stateDiagram-v2-6OUMAXLB-DCaXJLPh.js +0 -1
- package/dist/assets/surfaceAgent-qmokOosD.js +0 -1
- package/dist/assets/swimlanes-5IMT3BWC-Bycq06w3.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-DWFAvAh7.js +0 -8
- package/dist/assets/treeView-QDETBFTQ-Cc2FYETg.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-a4EjGpO3.js +0 -1
- package/dist/assets/ui-components-DHIW7RSX.js +0 -42
- package/dist/assets/ui-layout-DeDkO2oG.js +0 -1
- package/dist/assets/useRecordApprovals-R3Q7Bt7f.js +0 -1
- package/dist/assets/utils-Bixzg6Bz.js +0 -1
- package/dist/assets/vendor-dndkit-CzBh0_98.js +0 -5
- package/dist/assets/vendor-i18n-B6GOGCem.js +0 -1
- package/dist/assets/vendor-objectstack-6Mgxtaa1.js +0 -96
- package/dist/assets/vendor-radix-DCTEpigg.js +0 -46
- package/dist/assets/vendor-sentry-CHRc7_3y.js +0 -501
- package/dist/assets/wardley-OPB4EBWU-CuNyH0xZ.js +0 -1
package/dist/assets/{xychartDiagram-FW5EYKEG-BRNQk20I.js → xychartDiagram-FW5EYKEG-cODEcpNB.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{dn as e,ot as t,rt as n}from"./vendor-charts-
|
|
1
|
+
import{dn as e,ot as t,rt as n}from"./vendor-charts-HLBqza5P.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as i}from"./src-CKPhOIOh.js";import{D as a,H as o,K as s,U as c,a as l,b as u,c as d,f,v as p,w as m,y as h,z as g}from"./chunk-WYO6CB5R-C0_XZtpj.js";import{t as _}from"./chunk-VAUOI2AC-HYDQgaka.js";import"./chunk-HOUHSVGY-Bfkm0El3.js";import{i as v}from"./chunk-ICXQ74PX-WsDRuBhL.js";import{t as y}from"./chunk-Q4XR5HBZ-B99LraLe.js";var b=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:r(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[e(t,n,{3:1,4:2,7:4,5:i,36:a,37:o,38:s}),{1:[3]},e(t,n,{4:2,7:4,3:8,5:i,36:a,37:o,38:s}),e(t,n,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:a,37:o,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(c,[2,36]),e(c,[2,37]),e(c,[2,38]),{1:[2,1]},e(t,n,{4:2,7:4,3:21,5:i,36:a,37:o,38:s}),{1:[2,3]},e(c,[2,5]),e(t,[2,7],{4:22,36:a,37:o,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},e(T,[2,18]),{1:[2,2]},e(T,[2,8]),e(T,[2,9]),e(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),e(E,[2,40]),e(E,[2,41]),e(D,[2,42]),e(D,[2,44]),e(D,[2,45]),e(D,[2,46]),e(D,[2,47]),e(D,[2,48]),e(D,[2,49]),e(D,[2,50]),e(D,[2,51]),e(D,[2,52]),e(D,[2,53]),e(T,[2,10]),e(T,[2,24],{32:41,31:56,24:x,29:S}),e(T,[2,26]),e(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,11]),e(T,[2,32],{35:60,29:C}),e(T,[2,34]),{33:[1,61]},e(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},e(T,[2,14]),{17:66,24:w},e(T,[2,16]),e(T,[2,17]),e(D,[2,43]),e(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(T,[2,33]),{29:[1,70]},e(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(k,[2,23],{30:[1,73]}),e(T,[2,15]),e(T,[2,28]),e(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,35]),e(T,[2,19]),{25:75,27:64,29:O},e(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,a.length-=e,o.length-=e}r(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),a.push(h.yytext),o.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:r(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:r(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:r(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:r(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:r(function(){return this._more=!0,this},`more`),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:r(function(e){this.unput(this.match.slice(e))},`less`),pastInput:r(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:r(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:r(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:r(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:r(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:r(function(){return this.next()||this.lex()},`lex`),begin:r(function(e){this.conditionStack.push(e)},`begin`),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:r(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:r(function(e){this.begin(e)},`pushState`),stateStackSize:r(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:r(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function j(){this.yy={}}return r(j,`Parser`),j.prototype=A,A.Parser=j,new j})();b.parser=b;var x=b;function S(e){return e.type===`bar`}r(S,`isBarPlot`);function C(e){return e.type===`band`}r(C,`isBandAxisData`);function w(e){return e.type===`linear`}r(w,`isLinearAxisData`);var T=class{constructor(e){this.parentGroup=e}static{r(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=y(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},E=.7,D=.2,O=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{r(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){E*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(E*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=D*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=D*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},k=class extends O{static{r(this,`BandAxis`)}constructor(e,n,r,i,a){super(e,i,a,n),this.categories=r,this.scale=t().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=t().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),i.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},A=class extends O{static{r(this,`LinearAxis`)}constructor(e,t,r,i,a){super(e,i,a,t),this.domain=r,this.scale=n().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=n().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function j(e,t,n,r){let i=new T(r);return C(e)?new k(t,n,e.categories,e.title,i):new A(t,n,[e.min,e.max],e.title,i)}r(j,`getAxis`);var M=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{r(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function N(e,t,n,r){return new M(new T(r),e,t,n)}r(N,`getChartTitleComponent`);var ee=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{r(this,`LinePlot`)}getDrawableElement(){let t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),n;if(n=this.orientation===`horizontal`?e().y(e=>e[0]).x(e=>e[1])(t):e().x(e=>e[0]).y(e=>e[1])(t),!n)return[];let r=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:n,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let e=[];for(let[n,[r,i]]of t.entries()){let t=this.plotData.pointLabels[n];t&&(this.orientation===`horizontal`?e.push({x:i+10,y:r,text:t,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):e.push({x:r,y:i-10,text:t,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}e.length>0&&r.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:e})}return r}},te=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{r(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},ne=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{r(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new ee(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new te(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break}return e}};function re(e,t,n){return new ne(e,t,n)}r(re,`getPlotComponent`);var ie=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:N(e,t,n,r),plot:re(e,t,n),xAxis:j(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:j(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{r(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},ae=class{static{r(this,`XYChartBuilder`)}static build(e,t,n,r){return new ie(e,t,n,r).getDrawableElement()}},P=0,F,I=U(),L=H(),R=W(),z=L.plotColorPalette.split(`,`).map(e=>e.trim()),B=!1,V=!1;function H(){let e=a(),t=u();return v(e.xyChart,t.themeVariables.xyChart)}r(H,`getChartDefaultThemeConfig`);function U(){let e=u();return v(f.xyChart,e.xyChart)}r(U,`getChartDefaultConfig`);function W(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}r(W,`getChartDefaultData`);function G(e){let t=u();return g(e.trim(),t)}r(G,`textSanitizer`);function K(e){F=e}r(K,`setTmpSVGG`);function q(e){e===`horizontal`?I.chartOrientation=`horizontal`:I.chartOrientation=`vertical`}r(q,`setOrientation`);function J(e){R.xAxis.title=G(e.text)}r(J,`setXAxisTitle`);function Y(e,t){R.xAxis={type:`linear`,title:R.xAxis.title,min:e,max:t},B=!0}r(Y,`setXAxisRangeData`);function X(e){R.xAxis={type:`band`,title:R.xAxis.title,categories:e.map(e=>G(e.text))},B=!0}r(X,`setXAxisBand`);function oe(e){R.yAxis.title=G(e.text)}r(oe,`setYAxisTitle`);function se(e,t){R.yAxis={type:`linear`,title:R.yAxis.title,min:e,max:t},V=!0}r(se,`setYAxisRangeData`);function ce(e){let t=Math.min(...e),n=Math.max(...e),r=w(R.yAxis)?R.yAxis.min:1/0,i=w(R.yAxis)?R.yAxis.max:-1/0;R.yAxis={type:`linear`,title:R.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}r(ce,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!B){let t=w(R.xAxis)?R.xAxis.min:1/0,n=w(R.xAxis)?R.xAxis.max:-1/0;Y(Math.min(t,1),Math.max(n,e.length))}if(C(R.xAxis)&&e.length>R.xAxis.categories.length&&(e=e.slice(0,R.xAxis.categories.length)),V||ce(e),C(R.xAxis)&&(t=R.xAxis.categories.map((t,n)=>[t,e[n]])),w(R.xAxis)){let n=R.xAxis.min,r=R.xAxis.max,i=(r-n)/(e.length-1),a=[];for(let e=n;e<=r;e+=i)a.push(`${e}`);t=a.map((t,n)=>[t,e[n]])}return t}r(Z,`transformDataWithoutCategory`);function Q(e){return z[e===0?0:e%z.length]}r(Q,`getPlotColorFromPalette`);function le(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?G(e.label):``),i=Z(n),a=r.some(e=>e!==``);R.plots.push({type:`line`,strokeFill:Q(P),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),P++}r(le,`setLineData`);function $(e,t){let n=Z(t.map(e=>e.value));R.plots.push({type:`bar`,fill:Q(P),data:n}),P++}r($,`setBarData`);function ue(){if(R.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return R.title=m(),ae.build(I,R,L,F)}r(ue,`getDrawableElem`);function de(){return L}r(de,`getChartThemeConfig`);function fe(){return I}r(fe,`getChartConfig`);function pe(){return R}r(pe,`getXYChartData`);var me={parser:x,db:{getDrawableElem:ue,clear:r(function(){l(),P=0,I=U(),R=W(),L=H(),z=L.plotColorPalette.split(`,`).map(e=>e.trim()),B=!1,V=!1},`clear`),setAccTitle:c,getAccTitle:h,setDiagramTitle:s,getDiagramTitle:m,getAccDescription:p,setAccDescription:o,setOrientation:q,setXAxisTitle:J,setXAxisRangeData:Y,setXAxisBand:X,setYAxisTitle:oe,setYAxisRangeData:se,setLineData:le,setBarData:$,setTmpSVGG:K,getChartThemeConfig:de,getChartConfig:fe,getXYChartData:pe},renderer:{draw:r((e,t,n,a)=>{let o=a.db,s=o.getChartThemeConfig(),c=o.getChartConfig(),l=o.getXYChartData().plots[0].data.map(e=>e[1]);function u(e){return e===`top`?`text-before-edge`:`middle`}r(u,`getDominantBaseLine`);function f(e){return e===`left`?`start`:e===`right`?`end`:`middle`}r(f,`getTextAnchor`);function p(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}r(p,`getTextTransformation`),i.debug(`Rendering xychart chart
|
|
7
7
|
`+e);let m=_(t),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,c.width).attr(`height`,c.height).attr(`class`,`background`);d(m,c.height,c.width,!0),m.attr(`viewBox`,`0 0 ${c.width} ${c.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let v=o.getDrawableElem(),y={};function b(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&y[n]&&(i=y[n]),n+=e[r],t=y[n],t||=y[n]=i.append(`g`).attr(`class`,e[r])}return t}r(b,`getGroup`);for(let e of v){if(e.data.length===0)continue;let t=b(e.groupTexts);switch(e.type){case`rect`:if(t.selectAll(`rect`).data(e.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),c.showDataLabel){let n=c.showDataLabelOutsideBar;if(c.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*a<=n.width-o};r(i,`fitsHorizontally`);let a=.7,o=10,c=e.data.map((e,t)=>({data:e,label:l[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),u=c.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...u)),f=r(e=>n?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);t.selectAll(`text`).data(c).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,n?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};r(i,`fitsInBar`);let a=e.data.map((e,t)=>({data:e,label:l[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),u=r(e=>n?e.data.y-10:e.data.y+10,`determineLabelYPosition`);t.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,u).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,n?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:t.selectAll(`text`).data(e.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>u(e.verticalPos)).attr(`text-anchor`,e=>f(e.horizontalPos)).attr(`transform`,e=>p(e)).text(e=>e.text);break;case`path`:t.selectAll(`path`).data(e.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth);break}}},`draw`)}};export{me as diagram};
|
package/dist/index.html
CHANGED
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
<script>
|
|
47
47
|
window.process = window.process || { env: { NODE_ENV: 'development' }, version: '', platform: 'browser' };
|
|
48
48
|
</script>
|
|
49
|
-
<script type="module" crossorigin src="./assets/index-
|
|
49
|
+
<script type="module" crossorigin src="./assets/index-C_G40cue.js"></script>
|
|
50
50
|
<link rel="stylesheet" crossorigin href="./assets/ui-components-BL3SEdAz.css">
|
|
51
51
|
<link rel="stylesheet" crossorigin href="./assets/plugin-dashboard-DnNKJB60.css">
|
|
52
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
53
|
-
<link rel="modulepreload" href="./assets/framework-
|
|
54
|
-
<link rel="modulepreload" href="./assets/ui-components-
|
|
55
|
-
<link rel="modulepreload" href="./assets/vendor-radix-
|
|
56
|
-
<link rel="modulepreload" href="./assets/vendor-react-
|
|
52
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BCvtzf7n.css">
|
|
53
|
+
<link rel="modulepreload" href="./assets/framework-DUXRLJaF.js" />
|
|
54
|
+
<link rel="modulepreload" href="./assets/ui-components-t1CVb1Ox.js" />
|
|
55
|
+
<link rel="modulepreload" href="./assets/vendor-radix-CWCRv2pn.js" />
|
|
56
|
+
<link rel="modulepreload" href="./assets/vendor-react-BKSb6vFP.js" />
|
|
57
57
|
</head>
|
|
58
58
|
<body>
|
|
59
59
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectstack/console",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.8.0",
|
|
4
4
|
"description": "Prebuilt Console SPA pinned to this @objectstack/framework release. Source of truth: @object-ui/console (https://github.com/objectstack-ai/objectui).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/objectstack-ai/framework/tree/main/packages/console",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{a as t,m as n,r,s as i,y as a}from"./vendor-react-BGDDiZfJ.js";import{Ha as o,uc as s}from"./ui-components-DHIW7RSX.js";import{a as c,i as l,n as u,r as d}from"./index-BhMd7RVY.js";var f=e(a(),1),p=r();function m(){let{appName:e}=n(),{books:r,docs:a,state:m}=u(),h=(0,f.useMemo)(()=>r.filter(t=>l(t)===e),[r,e]),g=(0,f.useMemo)(()=>d(h,a),[h,a]);return m===`loading`?(0,p.jsx)(`div`,{className:`flex h-full items-center justify-center p-10 text-muted-foreground`,children:(0,p.jsx)(o,{className:`h-5 w-5 animate-spin`,"aria-label":`Loading documentation`})}):g.length===1?(0,p.jsx)(i,{to:`/apps/${e}/docs/${g[0].slug}`,replace:!0}):(0,p.jsx)(c,{children:(0,p.jsx)(`div`,{className:`mx-auto max-w-3xl p-4 sm:p-6`,children:g.length===0?(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-16 text-center text-muted-foreground`,children:[(0,p.jsx)(s,{className:`h-10 w-10`}),(0,p.jsx)(`p`,{className:`text-sm`,children:`This app does not ship any documentation yet.`}),(0,p.jsx)(t,{to:`/docs`,className:`text-sm font-medium text-primary hover:underline`,children:`Browse all documentation`})]}):(0,p.jsx)(`ul`,{className:`grid gap-3 sm:grid-cols-2`,children:g.map(n=>(0,p.jsx)(`li`,{children:(0,p.jsxs)(t,{to:`/apps/${e}/docs/${n.slug}`,className:`flex h-full items-start gap-3 rounded-md border border-border p-3 hover:bg-muted/50`,children:[(0,p.jsx)(s,{className:`mt-0.5 h-5 w-5 shrink-0 text-muted-foreground`}),(0,p.jsxs)(`div`,{className:`min-w-0`,children:[(0,p.jsx)(`div`,{className:`text-sm font-semibold`,children:n.label}),n.description?(0,p.jsx)(`div`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:n.description}):n.subtitle?(0,p.jsx)(`div`,{className:`mt-0.5 truncate font-mono text-[11px] text-muted-foreground/70`,children:n.subtitle}):null,(0,p.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground/80`,children:[n.docCount,` `,n.docCount===1?`article`:`articles`]})]})]})},n.name))})})})}export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{a as t,m as n,r,y as i}from"./vendor-react-BGDDiZfJ.js";import{d as a,f as ee}from"./infrastructure-DexdbqHf.js";import{l as te}from"./framework-CWU64Lvg.js";import{Ai as ne,Ar as re,Bs as ie,Bt as o,Cr as s,Es as ae,Gt as oe,Ht as se,Jt as ce,K as le,Kt as ue,Ps as de,Qt as fe,Sc as pe,Sr as me,Ss as he,Us as ge,Ut as _e,Vs as ve,Wi as ye,Wr as be,Wt as xe,X as Se,Xt as c,Yo as Ce,Yt as we,Zt as Te,_r as l,_t as u,br as d,cs as Ee,dr as De,dt as Oe,er as ke,fr as Ae,ft as je,gr as f,gs as Me,gt as p,hi as Ne,hr as m,ht as Pe,ji as Fe,js as Ie,kc as h,ln as Le,lt as Re,mr as g,mt as ze,nr as Be,os as Ve,pc as He,pn as Ue,pt as We,q as Ge,qt as Ke,sr as qe,tr as Je,ut as Ye,vr as _,vt as Xe,xr as v,yr as y,yt as Ze,zr as Qe}from"./ui-components-DHIW7RSX.js";import{r as b}from"./vendor-ui-utils-BzQBRdq3.js";var x=e(i(),1),$e=`${``.replace(/\/$/,``)}/api/v1`;async function S(e,t){let n=await fetch(`${$e}${e}`,{credentials:`include`,headers:{"Content-Type":`application/json`,...t?.headers||{}},...t}),r=null;try{r=await n.json()}catch{}if(!n.ok){let e=r?.code??`HTTP_${n.status}`,t=r?.message??r?.error??n.statusText,i=Error(`${e}: ${t}`);throw i.code=e,i.status=n.status,i.details=r,i}return r}var C={listProcesses(e={}){let t=new URLSearchParams;e.object&&t.set(`object`,e.object),e.activeOnly&&t.set(`activeOnly`,`true`);let n=t.toString();return S(`/approvals/processes${n?`?${n}`:``}`)},listRequests(e={}){let t=new URLSearchParams;e.status&&t.set(`status`,e.status),e.object&&t.set(`object`,e.object),e.recordId&&t.set(`recordId`,e.recordId);let n=Array.isArray(e.approverId)?e.approverId.filter(Boolean).join(`,`):e.approverId;n&&t.set(`approverId`,n),e.submitterId&&t.set(`submitterId`,e.submitterId),e.q?.trim()&&t.set(`q`,e.q.trim()),e.limit!=null&&t.set(`limit`,String(e.limit)),e.offset!=null&&t.set(`offset`,String(e.offset));let r=t.toString();return S(`/approvals/requests${r?`?${r}`:``}`)},async getRequest(e){return{data:await S(`/approvals/requests/${encodeURIComponent(e)}`)}},listActions(e){return S(`/approvals/requests/${encodeURIComponent(e)}/actions`)},async approve(e,t){let n=await S(`/approvals/requests/${encodeURIComponent(e)}/approve`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,finalized:n.finalized}},async reject(e,t){let n=await S(`/approvals/requests/${encodeURIComponent(e)}/reject`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,finalized:n.finalized}},async recall(e,t){return{data:(await S(`/approvals/requests/${encodeURIComponent(e)}/recall`,{method:`POST`,body:JSON.stringify(t)})).request,finalized:!0}},async reassign(e,t){return{data:(await S(`/approvals/requests/${encodeURIComponent(e)}/reassign`,{method:`POST`,body:JSON.stringify(t)})).request}},async remind(e,t={}){let n=await S(`/approvals/requests/${encodeURIComponent(e)}/remind`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,notified:n.notified}},async requestInfo(e,t){return{data:(await S(`/approvals/requests/${encodeURIComponent(e)}/request-info`,{method:`POST`,body:JSON.stringify(t)})).request}},async sendBack(e,t){let n=await S(`/approvals/requests/${encodeURIComponent(e)}/revise`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,autoRejected:n.autoRejected===!0}},async resubmit(e,t={}){let n=await S(`/approvals/requests/${encodeURIComponent(e)}/resubmit`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,resumed:n.resumed===!0}},async comment(e,t){return{data:(await S(`/approvals/requests/${encodeURIComponent(e)}/comment`,{method:`POST`,body:JSON.stringify(t)})).request}},async submit(e){return S(`/approvals/requests`,{method:`POST`,body:JSON.stringify(e)})}};function et(e){if(!e)return[];let t=new Set;e.id&&t.add(e.id),e.email&&t.add(e.email);let n=[...e.roles||[],...typeof e.role==`string`?e.role.split(`,`):[]];for(let e of n){let n=String(e).trim();n&&t.add(`role:${n}`)}return Array.from(t)}var w=r(),tt=50,nt={pending:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-400`,approved:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400`,rejected:`border-red-200 bg-red-50 text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-400`,recalled:`border-border bg-muted text-muted-foreground`,returned:`border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-400`};function rt(e){if(!e)return`—`;try{return new Date(e).toLocaleString()}catch{return e}}function T(e){return e?e.includes(`@`)?e:e.startsWith(`role:`)?`Role: ${e.slice(5)}`:e.length>14?`${e.slice(0,6)}…${e.slice(-4)}`:e:`—`}function E(e){return e&&String(e).replace(/^flow:/,``).trim().split(/[_\-\s]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)||`—`}function it(e){return e.process_label||E(e.process_name)}function at(e){return e.step_label?e.step_label:e.current_step?E(e.current_step):null}function ot(e){return e.submitter_name||T(e.submitter_id)}function st(e,t){return t.pending_approver_names?.[e]||T(e)}function ct(e){return e.object_label||e.object_name}function D(e){return e.submitted_at||e.created_at||void 0}function O(e){let t=D(e);if(!t)return null;let n=Date.parse(t);return Number.isNaN(n)?null:(Date.now()-n)/36e5}function lt(e){if(e.status!==`pending`)return`text-muted-foreground`;let t=O(e);return t==null?`text-muted-foreground`:t>72?`text-red-600 dark:text-red-400 font-medium`:t>24?`text-amber-600 dark:text-amber-400`:`text-muted-foreground`}function ut(e){let t=Math.max(1,Math.round(Math.abs(e)/36e5));return t<48?`${t}h`:`${Math.round(t/24)}d`}var k=new Set([`id`,`created_at`,`updated_at`,`created_by`,`updated_by`,`organization_id`]);function A(e){return e.split(`_`).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function j(e,t){if(typeof t==`boolean`)return t?`✓`:`—`;if(typeof t==`number`){if(t>0xe8d4a51000&&/(_at$|_date$|^date_|_time$)/.test(e))try{return new Date(t).toLocaleDateString()}catch{}return t.toLocaleString()}let n=String(t);if(/^\d{4}-\d{2}-\d{2}T\d{2}/.test(n))try{return new Date(n).toLocaleString()}catch{}return n}var dt=/^[A-Za-z0-9_-]{15,}$/;function ft(e,t,n=6){if(!e||typeof e!=`object`||Array.isArray(e))return[];let r=[];for(let[i,a]of Object.entries(e)){if(k.has(i)||a==null||typeof a==`object`||String(a).trim()===``)continue;let e=t?.[i];if(!(!e&&typeof a==`string`&&dt.test(a.trim())&&!/^\d+$/.test(a.trim()))&&(r.push([A(i),e??j(i,a)]),r.length>=n))break}return r}function pt(){let{t:e,language:r}=te(),{user:i}=ee(),$e=a(),{appName:S}=n(),E=(0,x.useMemo)(()=>et(i),[i]),O=(0,x.useCallback)((t,n,r)=>String(e(`approvalsInbox.${t}`,{defaultValue:n,...r})),[e]),k=(0,x.useCallback)(e=>{if(!e)return`—`;let t=Date.parse(e);if(Number.isNaN(t))return e;let n=Math.round((Date.now()-t)/1e3);if(n<45)return O(`justNow`,`just now`);let i=Math.round(n/60);if(i<60)return O(`minutesAgo`,`{{count}}m ago`,{count:i});let a=Math.round(i/60);if(a<24)return O(`hoursAgo`,`{{count}}h ago`,{count:a});let ee=Math.round(a/24);if(ee<30)return O(`daysAgo`,`{{count}}d ago`,{count:ee});try{return new Date(e).toLocaleDateString(r)}catch{return e}},[O,r]),A=(0,x.useCallback)(e=>{switch(e){case`pending`:return O(`statusPending`,`Pending`);case`approved`:return O(`statusApproved`,`Approved`);case`rejected`:return O(`statusRejected`,`Rejected`);case`recalled`:return O(`statusRecalled`,`Recalled`);case`returned`:return O(`statusReturned`,`Returned for revision`);default:return e}},[O]),j=(0,x.useCallback)((e,t)=>{let n=e?.code??``,r=e?.status??0;return n===`NOT_IMPLEMENTED`||r===501?O(`recallUnavailable`,`Recall is not available on this deployment.`):n===`THROTTLED`||r===429?O(`remindThrottled`,`A reminder was sent recently — try again later.`):r===404?O(`requestGone`,`This request no longer exists. Refresh the list.`):n===`FORBIDDEN`||r===403?O(`notAllowed`,`You are not allowed to perform this action.`):n===`INVALID_STATE`||r===409?O(`alreadyDecided`,`This request was already decided. Refresh the list.`):e?.message||t},[O]);function dt({status:e}){return(0,w.jsx)(qe,{variant:`outline`,className:h(`font-medium`,nt[e]??``),children:A(e)})}let pt=(0,x.useCallback)(e=>`/apps/${S||`setup`}/${encodeURIComponent(e.object_name)}/record/${encodeURIComponent(e.record_id)}`,[S]),[M,mt]=(0,x.useState)(`pending`),[N,ht]=(0,x.useState)([]),[gt,_t]=(0,x.useState)(!1),[vt,yt]=(0,x.useState)(!1),[bt,xt]=(0,x.useState)(null),[St,Ct]=(0,x.useState)(null),[wt,Tt]=(0,x.useState)(0),[P,Et]=(0,x.useState)(null),[F,Dt]=(0,x.useState)(null),[Ot,kt]=(0,x.useState)([]),[At,jt]=(0,x.useState)(!1),[I,L]=(0,x.useState)(``),[R,Mt]=(0,x.useState)(``),[z,Nt]=(0,x.useState)(null),[B,Pt]=(0,x.useState)(``),[Ft,It]=(0,x.useState)(``),[Lt,Rt]=(0,x.useState)(`all`),[zt,Bt]=(0,x.useState)(`all`),[V,Vt]=(0,x.useState)(`all`),[H,Ht]=(0,x.useState)(new Set),[Ut,Wt]=(0,x.useState)(!1),[U,Gt]=(0,x.useState)(null),[Kt,qt]=(0,x.useState)(null),[Jt,Yt]=(0,x.useState)(!1),[Xt,Zt]=(0,x.useState)(``),[Qt,$t]=(0,x.useState)(!1),[en,tn]=(0,x.useState)(``),[nn,rn]=(0,x.useState)(!1),[an,on]=(0,x.useState)(``),[sn,cn]=(0,x.useState)(!1),[ln,un]=(0,x.useState)(``),[W,G]=(0,x.useState)(!1),[dn,fn]=(0,x.useState)([]),[pn,mn]=(0,x.useState)(-1);(0,x.useEffect)(()=>{if(M===`pending`)return;let e=window.setTimeout(()=>It(B),350);return()=>window.clearTimeout(e)},[B,M]);let K=(0,x.useCallback)(async()=>{_t(!0),Ct(null);try{let e=[];if(M===`pending`)e=E.length?(await C.listRequests({status:`pending`,approverId:E})).data:[],Tt(e.length),xt(null);else{let t={q:Ft||void 0,status:V===`all`?void 0:V,limit:tt,offset:0};if(M===`submitted`){let n=i?.id;if(n){let r=await C.listRequests({submitterId:n,...t});e=r.data,xt(r.total??r.data.length)}else e=[],xt(0)}else{let n=await C.listRequests(t);e=n.data,xt(n.total??n.data.length)}E.length&&C.listRequests({status:`pending`,approverId:E}).then(e=>Tt(e.data.length)).catch(()=>{})}e.sort((e,t)=>(D(t)||``).localeCompare(D(e)||``)),ht(e)}catch(e){Ct(e?.message||String(e)),ht([])}finally{_t(!1)}},[M,E,i?.id,Ft,V]);(0,x.useEffect)(()=>{K()},[K]);let hn=(0,x.useCallback)(async()=>{if(!(M===`pending`||vt)){yt(!0);try{let e=await C.listRequests({submitterId:M===`submitted`?i?.id??void 0:void 0,q:Ft||void 0,status:V===`all`?void 0:V,limit:tt,offset:N.length});ht(t=>{let n=new Set(t.map(e=>e.id));return[...t,...e.data.filter(e=>!n.has(e.id))]}),e.total!=null&&xt(e.total)}catch(e){b.error(j(e,O(`loadFailed`,`Failed to load request`)))}finally{yt(!1)}}},[M,vt,i?.id,Ft,V,N.length,j,O]),q=(0,x.useCallback)(async e=>{Et(e),jt(!0),L(``),Mt(``);try{let[t,n]=await Promise.all([C.getRequest(e),C.listActions(e)]);Dt(t.data),kt(n.data)}catch(e){b.error(j(e,O(`loadFailed`,`Failed to load request`))),Dt(null),kt([])}finally{jt(!1)}},[j,O]),gn=()=>{Et(null),Dt(null),kt([]),L(``),Mt(``)},J=(0,x.useCallback)(e=>{if(R.trim())return R.trim();if(!e)return i?.id||``;let t=new Set(e.pending_approvers||[]);for(let e of E)if(t.has(e))return e;return i?.id||``},[R,E,i?.id]),Y=(0,x.useCallback)(()=>{E.length&&C.listRequests({status:`pending`,approverId:E}).then(e=>Tt(e.data.length)).catch(()=>{})},[E]),_n=(0,x.useCallback)(async e=>{if(!F)return;let t=e===`recall`&&i?.id||J(F);if(!t){b.error(O(`noActor`,`Cannot determine the acting identity`));return}Nt(e);try{let n={actor_id:t,comment:I.trim()||void 0},r=await(e===`approve`?C.approve:e===`reject`?C.reject:C.recall)(F.id,n);if(b.success(e===`approve`?r.finalized?O(`approvedFinal`,`Approved`):O(`approvedWaiting`,`Approved — waiting on the remaining approvers`):e===`reject`?O(`rejectedToast`,`Rejected`):O(`recalledToast`,`Request recalled`)),L(``),e!==`recall`&&M===`pending`){let e=Rn.current,t=e.findIndex(e=>e.id===F.id),n=e[t+1]??e[t-1];K(),n&&n.id!==F.id?q(n.id):gn();return}let[i,a]=await Promise.all([C.getRequest(F.id),C.listActions(F.id)]);Dt(i.data),kt(a.data),K()}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{Nt(null)}},[F,J,I,K,i?.id,j,O,M,q]),X=(0,x.useCallback)(async e=>{let[t,n]=await Promise.all([C.getRequest(e),C.listActions(e)]);Dt(t.data),kt(n.data),K()},[K]),vn=(0,x.useCallback)(async()=>{if(!(!F||!Xt.trim())){G(!0);try{await C.reassign(F.id,{actor_id:J(F),to:Xt.trim(),comment:I.trim()||void 0}),b.success(O(`reassignSuccess`,`Handed to {{to}}`,{to:Xt.trim()})),Yt(!1),Zt(``),L(``),await X(F.id),Y()}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{G(!1)}}},[F,Xt,I,J,X,Y,j,O]),yn=(0,x.useCallback)(async()=>{if(F){G(!0);try{let e=await C.remind(F.id,{actor_id:i?.id});b.success(O(`remindSuccess`,`Reminder sent to {{count}} approver(s)`,{count:e.notified})),await X(F.id)}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{G(!1)}}},[F,i?.id,X,j,O]),bn=(0,x.useCallback)(async()=>{if(!(!F||!en.trim())){G(!0);try{await C.requestInfo(F.id,{actor_id:J(F),comment:en.trim()}),b.success(O(`requestInfoSent`,`Sent back to the requester for more information`)),$t(!1),tn(``),await X(F.id)}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{G(!1)}}},[F,en,J,X,j,O]),xn=(0,x.useCallback)(async()=>{if(F){G(!0);try{let e=await C.sendBack(F.id,{actor_id:J(F),comment:an.trim()||void 0});b.success(e.autoRejected?O(`sendBackAutoRejected`,`Revision limit reached — the request was auto-rejected`):O(`sendBackSuccess`,`Sent back for revision — the requester can now edit and resubmit`)),rn(!1),on(``),await X(F.id),Y()}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{G(!1)}}},[F,an,J,X,Y,j,O]),Sn=(0,x.useCallback)(async()=>{if(F){cn(!0);try{await C.resubmit(F.id,{actor_id:i?.id,comment:I.trim()||void 0}),b.success(O(`resubmitSuccess`,`Resubmitted — a new approval round has opened`)),L(``),await X(F.id),Y()}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{cn(!1)}}},[F,I,i?.id,X,Y,j,O]),Cn=(0,x.useCallback)(async()=>{if(!(!F||!ln.trim())){G(!0);try{await C.comment(F.id,{actor_id:i?.id,comment:ln.trim()}),un(``),await X(F.id)}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{G(!1)}}},[F,ln,i?.id,X,j,O]),wn=(0,x.useCallback)(async()=>{if(!dn.length)try{let e=``.replace(/\/$/,``),t=await(await fetch(`${e}/api/v1/data/sys_user?limit=100`,{credentials:`include`})).json();fn((t.records||[]).filter(e=>e.email&&e.name&&e.id!==i?.id).map(e=>({name:String(e.name),email:String(e.email)})))}catch{}},[dn.length,i?.id]),Tn=(0,x.useMemo)(()=>{if(!F||F.status!==`pending`)return!1;let e=new Set(F.pending_approvers||[]);return E.some(t=>e.has(t))||R.trim().length>0},[F,E,R]),En=(0,x.useMemo)(()=>!F||F.status!==`pending`?!1:F.submitter_id===i?.id||R.trim().length>0,[F,i?.id,R]),Dn=(0,x.useMemo)(()=>!F||F.status!==`returned`?!1:F.submitter_id===i?.id||R.trim().length>0,[F,i?.id,R]),On=(0,x.useMemo)(()=>{let e=new Set;for(let t of N)e.add(it(t));return Array.from(e).sort()},[N]),kn=(0,x.useMemo)(()=>{let e=new Set;for(let t of N)t.object_name&&e.add(t.object_name);return Array.from(e).sort()},[N]),Z=(0,x.useMemo)(()=>{let e=B.trim().toLowerCase();return N.filter(t=>Lt!==`all`&&it(t)!==Lt||zt!==`all`&&t.object_name!==zt||V!==`all`&&t.status!==V?!1:M!==`pending`||!e?!0:[t.process_name,t.process_label,t.step_label,t.object_name,t.record_id,t.record_title,t.submitter_id,t.submitter_name,...t.pending_approvers||[]].filter(Boolean).join(` `).toLowerCase().includes(e))},[N,B,Lt,zt,V,M]),An=(0,x.useMemo)(()=>P?Z.findIndex(e=>e.id===P):-1,[Z,P]);(0,x.useEffect)(()=>{if(H.size===0)return;let e=new Set(Z.map(e=>e.id)),t=!1,n=new Set;for(let r of H)e.has(r)?n.add(r):t=!0;t&&Ht(n)},[Z,H]),(0,x.useEffect)(()=>{pn>=Z.length&&mn(Z.length-1)},[Z.length,pn]);let Q=(0,x.useCallback)(e=>{if(e.status!==`pending`)return!1;let t=new Set(E);return(e.pending_approvers||[]).some(e=>t.has(e))},[E]),$=(0,x.useMemo)(()=>Z.filter(e=>H.has(e.id)&&Q(e)),[Z,H,Q]),jn=Z.filter(e=>e.status===`pending`),Mn=jn.length>0&&jn.every(e=>H.has(e.id)),Nn=(0,x.useCallback)(()=>{Ht(e=>{if(Mn)return new Set;let t=new Set(e);for(let e of jn)t.add(e.id);return t})},[Mn,jn]),Pn=(0,x.useCallback)(e=>{Ht(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Fn=(0,x.useCallback)(async e=>{let t=$;if(t.length===0)return;Wt(!0);let n=0,r=[];for(let a of t){let t=new Set(a.pending_approvers||[]),ee=E.find(e=>t.has(e))||i?.id||``;try{await(e===`approve`?C.approve:C.reject)(a.id,{actor_id:ee}),n++}catch{r.push(a.record_title||T(a.record_id))}}if(Wt(!1),Ht(new Set),r.length===0)b.success(e===`approve`?O(`bulkApproved`,`Approved {{count}} requests`,{count:n}):O(`bulkRejected`,`Rejected {{count}} requests`,{count:n}));else{let e=r.slice(0,3).join(`, `);b.error(O(`bulkPartial`,`{{ok}} succeeded, {{fail}} failed: {{which}}`,{ok:n,fail:r.length,which:e+(r.length>3?`…`:``)}))}K(),Y()},[$,E,i?.id,K,Y,O]),In=(0,x.useCallback)(async e=>{if(!Q(e)||Kt)return;let t=new Set(e.pending_approvers||[]),n=E.find(e=>t.has(e))||i?.id||``;qt(e.id);try{let t=await C.approve(e.id,{actor_id:n});b.success(t.finalized?O(`inlineApproved`,`Approved "{{title}}"`,{title:e.record_title||T(e.record_id)}):O(`approvedWaiting`,`Approved — waiting on the remaining approvers`)),K(),Y()}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{qt(null)}},[Q,Kt,E,i?.id,K,Y,j,O]),Ln=(0,x.useCallback)(async()=>{let e=U;if(!e)return;let t=new Set(e.pending_approvers||[]),n=E.find(e=>t.has(e))||i?.id||``;qt(e.id),Gt(null);try{await C.reject(e.id,{actor_id:n}),b.success(O(`inlineRejected`,`Rejected "{{title}}"`,{title:e.record_title||T(e.record_id)})),K(),Y()}catch(e){b.error(j(e,O(`actionFailed`,`Action failed`)))}finally{qt(null)}},[U,E,i?.id,K,Y,j,O]),Rn=(0,x.useRef)(Z);Rn.current=Z;let zn=(0,x.useRef)(pn);zn.current=pn,(0,x.useEffect)(()=>{let e=e=>{if(P||U)return;let t=e.target,n=t?.tagName;if(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||document.querySelector(`[role="alertdialog"]`))return;let r=Rn.current;if(!r.length)return;let i=zn.current;e.key===`j`||e.key===`ArrowDown`?(e.preventDefault(),mn(Math.min(i+1,r.length-1))):e.key===`k`||e.key===`ArrowUp`?(e.preventDefault(),mn(Math.max(i-1,0))):e.key===`Enter`&&i>=0&&r[i]?(e.preventDefault(),q(r[i].id)):(e.key===`x`||e.key===` `)&&i>=0&&r[i]&&M===`pending`?(e.preventDefault(),Pn(r[i].id)):e.key===`a`&&i>=0&&r[i]?(e.preventDefault(),In(r[i])):e.key===`r`&&i>=0&&r[i]&&Q(r[i])&&(e.preventDefault(),Gt(r[i]))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[P,U,M,q,Pn,In,Q]),(0,x.useEffect)(()=>{if(!P)return;let e=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=e.target,n=t?.tagName;if(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||document.querySelector(`[role="alertdialog"]`))return;let r=Rn.current,i=r.findIndex(e=>e.id===P);if(i<0)return;let a=e.key===`ArrowLeft`?r[i-1]:r[i+1];a&&(e.preventDefault(),q(a.id))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[P,q]);let Bn=!!B||Lt!==`all`||zt!==`all`||V!==`all`,Vn=e=>{mt(e),Vt(`all`),Rt(`all`),Bt(`all`),Pt(``),mn(-1)};function Hn({r:e}){return(0,w.jsxs)(`div`,{className:`min-w-0`,children:[(0,w.jsx)(`div`,{className:`font-medium truncate`,children:it(e)}),(0,w.jsxs)(`div`,{className:`text-xs text-muted-foreground truncate`,children:[at(e)||`—`,(e.round??1)>1&&(0,w.jsx)(`span`,{className:`ml-1.5 text-violet-600 dark:text-violet-400`,children:O(`roundChip`,`Round {{n}}`,{n:e.round})})]})]})}function Un({r:e}){return(0,w.jsxs)(`div`,{className:`min-w-0`,children:[(0,w.jsxs)(t,{to:pt(e),onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1 text-sm hover:underline truncate max-w-full`,title:e.record_id,children:[(0,w.jsx)(`span`,{className:`truncate`,children:e.record_title||T(e.record_id)}),(0,w.jsx)(Ce,{className:`h-3 w-3 shrink-0 text-muted-foreground`})]}),(0,w.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:ct(e)})]})}function Wn({r:e}){if(!Q(e))return null;let t=Kt===e.id;return(0,w.jsxs)(`div`,{className:`flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity`,onClick:e=>e.stopPropagation(),children:[(0,w.jsx)(s,{size:`sm`,variant:`ghost`,className:`h-7 px-2 text-emerald-700 hover:text-emerald-800 hover:bg-emerald-50 dark:text-emerald-400`,disabled:t,onClick:()=>void In(e),"aria-label":O(`approve`,`Approve`),children:(0,w.jsx)(Ie,{className:`h-4 w-4`})}),(0,w.jsx)(s,{size:`sm`,variant:`ghost`,className:`h-7 px-2 text-red-600 hover:text-red-700 hover:bg-red-50 dark:text-red-400`,disabled:t,onClick:()=>Gt(e),"aria-label":O(`reject`,`Reject`),children:(0,w.jsx)(he,{className:`h-4 w-4`})})]})}return(0,w.jsxs)(`div`,{className:`flex flex-col gap-4 sm:gap-6 p-4 sm:p-6 max-w-6xl`,children:[(0,w.jsxs)(`header`,{className:`flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`h1`,{className:`text-2xl font-semibold flex items-center gap-2`,children:[(0,w.jsx)(Ne,{className:`h-6 w-6`}),O(`title`,`Approvals Inbox`)]}),(0,w.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:O(`subtitle`,`Review and act on approval requests.`)})]}),(0,w.jsxs)(s,{variant:`outline`,size:`sm`,onClick:K,disabled:gt,className:`self-start sm:self-auto`,children:[(0,w.jsx)(ye,{className:`h-4 w-4 mr-2 ${gt?`animate-spin`:``}`}),O(`refresh`,`Refresh`)]})]}),St&&(0,w.jsxs)(De,{variant:`destructive`,children:[(0,w.jsx)(de,{className:`h-4 w-4`}),(0,w.jsx)(Ae,{children:St})]}),(0,w.jsxs)(Ye,{value:M,onValueChange:Vn,children:[(0,w.jsxs)(je,{children:[(0,w.jsxs)(We,{value:`pending`,children:[O(`tabMyPending`,`My Pending`),wt>0&&(0,w.jsx)(qe,{variant:`secondary`,className:`ml-2`,children:wt})]}),(0,w.jsx)(We,{value:`submitted`,children:O(`tabSubmitted`,`Submitted by me`)}),(0,w.jsx)(We,{value:`all`,children:O(`tabAll`,`All`)})]}),(0,w.jsxs)(Oe,{value:M,className:`mt-4 space-y-3`,children:[!gt&&(N.length>0||M!==`pending`&&(Ft||V!==`all`))&&(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsxs)(`div`,{className:`relative flex-1 min-w-[200px] max-w-sm`,children:[(0,w.jsx)(Fe,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground`}),(0,w.jsx)(Le,{value:B,onChange:e=>Pt(e.target.value),placeholder:O(`searchPlaceholder`,`Search record, process, requester…`),className:`pl-8 h-8 text-sm`}),B&&(0,w.jsx)(`button`,{type:`button`,onClick:()=>Pt(``),className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,"aria-label":O(`clearSearch`,`Clear search`),children:(0,w.jsx)(re,{className:`h-3.5 w-3.5`})})]}),M!==`pending`&&(0,w.jsxs)(ce,{value:V,onValueChange:Vt,children:[(0,w.jsx)(Te,{className:`h-8 w-auto min-w-[130px] text-sm`,children:(0,w.jsx)(fe,{placeholder:O(`statusFilter`,`Status`)})}),(0,w.jsxs)(we,{children:[(0,w.jsx)(c,{value:`all`,children:O(`allStatuses`,`All statuses`)}),(0,w.jsx)(c,{value:`pending`,children:A(`pending`)}),(0,w.jsx)(c,{value:`approved`,children:A(`approved`)}),(0,w.jsx)(c,{value:`rejected`,children:A(`rejected`)}),(0,w.jsx)(c,{value:`recalled`,children:A(`recalled`)}),(0,w.jsx)(c,{value:`returned`,children:A(`returned`)})]})]}),On.length>1&&(0,w.jsxs)(ce,{value:Lt,onValueChange:Rt,children:[(0,w.jsx)(Te,{className:`h-8 w-auto min-w-[140px] text-sm`,children:(0,w.jsx)(fe,{placeholder:O(`processFilter`,`Process`)})}),(0,w.jsxs)(we,{children:[(0,w.jsx)(c,{value:`all`,children:O(`allProcesses`,`All processes`)}),On.map(e=>(0,w.jsx)(c,{value:e,children:e},e))]})]}),kn.length>1&&(0,w.jsxs)(ce,{value:zt,onValueChange:Bt,children:[(0,w.jsx)(Te,{className:`h-8 w-auto min-w-[140px] text-sm`,children:(0,w.jsx)(fe,{placeholder:O(`objectFilter`,`Object`)})}),(0,w.jsxs)(we,{children:[(0,w.jsx)(c,{value:`all`,children:O(`allObjects`,`All objects`)}),kn.map(e=>(0,w.jsx)(c,{value:e,children:e},e))]})]}),Bn&&(0,w.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:O(`filterCount`,`{{shown}} of {{total}}`,{shown:Z.length,total:N.length})})]}),M===`pending`&&H.size>0&&(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2 rounded-md border bg-accent/30 text-sm`,children:[(0,w.jsxs)(`span`,{children:[(0,w.jsx)(`strong`,{children:H.size}),` `,O(`selected`,`selected`),$.length!==H.size&&(0,w.jsx)(`span`,{className:`text-muted-foreground ml-1`,children:O(`actionableCount`,`({{count}} actionable)`,{count:$.length})})]}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsxs)(g,{children:[(0,w.jsx)(me,{asChild:!0,children:(0,w.jsxs)(s,{size:`sm`,disabled:Ut||$.length===0,children:[(0,w.jsx)(Ie,{className:`h-3.5 w-3.5 mr-1`}),O(`approveN`,`Approve {{count}}`,{count:$.length||``})]})}),(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`bulkApproveTitle`,`Approve {{count}} requests?`,{count:$.length})}),(0,w.jsx)(_,{children:O(`bulkApproveBody`,`Each request is approved with your identity and its flow continues down the approve branch.`)})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{onClick:()=>Fn(`approve`),children:O(`approveN`,`Approve {{count}}`,{count:$.length})})]})]})]}),(0,w.jsxs)(g,{children:[(0,w.jsx)(me,{asChild:!0,children:(0,w.jsxs)(s,{size:`sm`,variant:`outline`,disabled:Ut||$.length===0,className:`border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground`,children:[(0,w.jsx)(he,{className:`h-3.5 w-3.5 mr-1`}),O(`rejectN`,`Reject {{count}}`,{count:$.length||``})]})}),(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`bulkRejectTitle`,`Reject {{count}} requests?`,{count:$.length})}),(0,w.jsx)(_,{children:O(`bulkRejectBody`,`This rejects the selected requests and notifies their submitters.`)})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{onClick:()=>Fn(`reject`),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:O(`rejectN`,`Reject {{count}}`,{count:$.length})})]})]})]}),(0,w.jsx)(s,{size:`sm`,variant:`ghost`,onClick:()=>Ht(new Set),disabled:Ut,children:O(`clear`,`Clear`)})]})]}),gt?(0,w.jsxs)(`div`,{className:`space-y-2`,children:[(0,w.jsx)(o,{className:`h-10 w-full`}),(0,w.jsx)(o,{className:`h-10 w-full`}),(0,w.jsx)(o,{className:`h-10 w-full`})]}):N.length===0?(0,w.jsx)(`div`,{className:`flex items-center justify-center min-h-[240px] rounded-md border border-dashed`,children:(0,w.jsxs)(le,{children:[(0,w.jsx)(Se,{children:O(`emptyTitle`,`No requests`)}),(0,w.jsx)(Ge,{children:M===`pending`?O(`emptyPending`,`You're all caught up — nothing is waiting on you.`):O(`emptyOther`,`Nothing here yet.`)}),M===`pending`&&(0,w.jsx)(s,{variant:`link`,size:`sm`,className:`mt-1`,onClick:()=>Vn(`all`),children:O(`emptyViewAll`,`Browse all requests`)})]})}):Z.length===0?(0,w.jsx)(`div`,{className:`flex items-center justify-center min-h-[160px] rounded-md border border-dashed text-sm text-muted-foreground`,children:O(`noMatches`,`No matches for current filters.`)}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Je,{className:`hidden md:block`,children:(0,w.jsx)(Be,{className:`p-0`,children:(0,w.jsxs)(ze,{children:[(0,w.jsx)(Xe,{children:(0,w.jsxs)(Ze,{children:[M===`pending`&&(0,w.jsx)(u,{className:`w-10`,children:(0,w.jsx)(ke,{checked:Mn,onCheckedChange:Nn,"aria-label":O(`selectAll`,`Select all`),disabled:jn.length===0})}),(0,w.jsx)(u,{children:O(`colRequest`,`Request`)}),(0,w.jsx)(u,{children:O(`colRecord`,`Record`)}),(0,w.jsx)(u,{children:O(`colRequester`,`Requester`)}),(0,w.jsx)(u,{children:O(`colStatus`,`Status`)}),(0,w.jsx)(u,{children:O(`colWaiting`,`Submitted`)}),(0,w.jsx)(u,{className:`w-20`,"aria-label":O(`colActions`,`Actions`)})]})}),(0,w.jsx)(Pe,{children:Z.map((e,t)=>(0,w.jsxs)(Ze,{className:h(`group cursor-pointer hover:bg-accent/50`,pn===t&&`ring-2 ring-inset ring-ring bg-accent/30`),onClick:()=>{mn(t),q(e.id)},children:[M===`pending`&&(0,w.jsx)(p,{className:`w-10`,onClick:e=>e.stopPropagation(),children:(0,w.jsx)(ke,{checked:H.has(e.id),onCheckedChange:()=>Pn(e.id),disabled:e.status!==`pending`,"aria-label":O(`selectRow`,`Select request`)})}),(0,w.jsx)(p,{children:(0,w.jsx)(Hn,{r:e})}),(0,w.jsx)(p,{children:(0,w.jsx)(Un,{r:e})}),(0,w.jsx)(p,{children:(0,w.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sm`,children:[(0,w.jsx)(Qe,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,w.jsx)(`span`,{className:`truncate`,title:e.submitter_id||``,children:ot(e)})]})}),(0,w.jsx)(p,{children:(0,w.jsx)(dt,{status:e.status})}),(0,w.jsxs)(p,{className:h(`text-xs whitespace-nowrap`,lt(e)),title:rt(D(e)),children:[(0,w.jsx)(Me,{className:`h-3 w-3 inline mr-1`}),k(D(e)),e.status===`pending`&&e.sla_due_at&&(0,w.jsx)(`div`,{className:h(`mt-0.5 text-[10px] font-medium`,Date.parse(e.sla_due_at)<Date.now()?`text-red-600 dark:text-red-400`:`text-muted-foreground`),children:Date.parse(e.sla_due_at)<Date.now()?O(`slaOverdue`,`SLA overdue {{dur}}`,{dur:ut(Date.now()-Date.parse(e.sla_due_at))}):O(`slaRemaining`,`SLA {{dur}} left`,{dur:ut(Date.parse(e.sla_due_at)-Date.now())})})]}),(0,w.jsx)(p,{className:`w-20`,children:(0,w.jsx)(Wn,{r:e})})]},e.id))})]})})}),(0,w.jsx)(`div`,{className:`md:hidden space-y-2`,children:Z.map(e=>(0,w.jsx)(Je,{className:`cursor-pointer active:bg-accent/50`,onClick:()=>void q(e.id),children:(0,w.jsxs)(Be,{className:`p-3 space-y-1.5`,children:[(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,w.jsx)(`div`,{className:`font-medium text-sm truncate`,children:it(e)}),(0,w.jsx)(dt,{status:e.status})]}),(0,w.jsxs)(`div`,{className:`text-sm truncate`,children:[e.record_title||T(e.record_id),(0,w.jsx)(`span`,{className:`text-muted-foreground text-xs ml-1.5`,children:ct(e)})]}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,w.jsxs)(`span`,{className:`inline-flex items-center gap-1 truncate`,children:[(0,w.jsx)(Qe,{className:`h-3 w-3`}),ot(e)]}),(0,w.jsxs)(`span`,{className:h(`inline-flex items-center gap-1 whitespace-nowrap`,lt(e)),children:[(0,w.jsx)(Me,{className:`h-3 w-3`}),k(D(e))]})]}),Q(e)&&(0,w.jsxs)(`div`,{className:`flex gap-2 pt-1`,onClick:e=>e.stopPropagation(),children:[(0,w.jsxs)(s,{size:`sm`,className:`h-7 flex-1`,disabled:Kt===e.id,onClick:()=>void In(e),children:[(0,w.jsx)(Ie,{className:`h-3.5 w-3.5 mr-1`}),O(`approve`,`Approve`)]}),(0,w.jsxs)(s,{size:`sm`,variant:`outline`,className:`h-7 flex-1 border-destructive text-destructive`,disabled:Kt===e.id,onClick:()=>Gt(e),children:[(0,w.jsx)(he,{className:`h-3.5 w-3.5 mr-1`}),O(`reject`,`Reject`)]})]})]})},e.id))}),M!==`pending`&&bt!=null&&(0,w.jsxs)(`div`,{className:`flex items-center justify-center gap-3 py-1`,children:[(0,w.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:O(`loadedOf`,`Loaded {{loaded}} of {{total}}`,{loaded:N.length,total:bt})}),N.length<bt&&(0,w.jsx)(s,{size:`sm`,variant:`outline`,disabled:vt,onClick:()=>void hn(),children:vt?O(`loadingMore`,`Loading…`):O(`loadMore`,`Load more`)})]}),(0,w.jsx)(`div`,{className:`hidden md:block text-[11px] text-muted-foreground`,children:O(`keyboardHint`,`Keyboard: j/k move · Enter open · x select · a approve · r reject`)})]})]})]}),(0,w.jsx)(g,{open:Jt,onOpenChange:e=>{e||(Yt(!1),Zt(``))},children:(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`reassignTitle`,`Hand this approval to someone else?`)}),(0,w.jsx)(_,{children:O(`reassignBody`,`Your approver slot moves to the person you pick — they are notified and can act immediately.`)})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(Ue,{htmlFor:`reassign-to`,className:`text-xs`,children:O(`reassignTo`,`New approver`)}),(0,w.jsx)(Le,{id:`reassign-to`,list:`reassign-user-options`,value:Xt,onChange:e=>Zt(e.target.value),placeholder:O(`reassignToPlaceholder`,`Pick a user or type an email / role:<name>`),className:`mt-1`}),(0,w.jsx)(`datalist`,{id:`reassign-user-options`,children:dn.map(e=>(0,w.jsx)(`option`,{value:e.email,children:e.name},e.email))})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{disabled:!Xt.trim()||W,onClick:()=>void vn(),children:O(`reassignBtn`,`Reassign`)})]})]})}),(0,w.jsx)(g,{open:Qt,onOpenChange:e=>{e||($t(!1),tn(``))},children:(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`requestInfoTitle`,`Ask the requester for more information?`)}),(0,w.jsx)(_,{children:O(`requestInfoBody`,`The request stays pending; the requester is notified and can reply on the thread.`)})]}),(0,w.jsx)(Re,{value:en,onChange:e=>tn(e.target.value),rows:3,placeholder:O(`requestInfoPlaceholder`,`What do you need from the requester?`)}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{disabled:!en.trim()||W,onClick:()=>void bn(),children:O(`requestInfoBtn`,`Request info`)})]})]})}),(0,w.jsx)(g,{open:nn,onOpenChange:e=>{e||(rn(!1),on(``))},children:(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`sendBackTitle`,`Send this request back for revision?`)}),(0,w.jsx)(_,{children:O(`sendBackBody`,`This round ends and the record unlocks so the requester can fix the data. When they resubmit, a fresh approval round opens for all approvers.`)})]}),(0,w.jsx)(Re,{value:an,onChange:e=>on(e.target.value),rows:3,placeholder:O(`sendBackPlaceholder`,`What needs to be fixed before this can be approved?`)}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{disabled:W,onClick:()=>void xn(),children:O(`sendBackBtn`,`Send back`)})]})]})}),(0,w.jsx)(g,{open:!!U,onOpenChange:e=>!e&&Gt(null),children:(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`rejectOneTitle`,`Reject "{{title}}"?`,{title:U?U.record_title||T(U.record_id):``})}),(0,w.jsx)(_,{children:O(`rejectOneBody`,`This rejects the request and notifies the submitter.`)})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{onClick:()=>void Ln(),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:O(`reject`,`Reject`)})]})]})}),(0,w.jsx)(se,{open:!!P,onOpenChange:e=>!e&&gn(),children:(0,w.jsxs)(_e,{className:`w-full sm:max-w-xl overflow-y-auto`,children:[(0,w.jsxs)(oe,{children:[(0,w.jsx)(ue,{children:F?it(F):O(`drawerTitle`,`Approval Request`)}),(0,w.jsx)(xe,{children:F?at(F)||ct(F):``})]}),F&&An>=0&&Z.length>1&&(0,w.jsxs)(`div`,{className:`flex items-center justify-between mt-2 text-xs text-muted-foreground`,children:[(0,w.jsxs)(s,{variant:`ghost`,size:`sm`,className:`h-7 px-2`,disabled:An<=0,onClick:()=>{let e=Z[An-1];e&&q(e.id)},children:[(0,w.jsx)(ve,{className:`h-4 w-4 mr-0.5`}),O(`prevRequest`,`Previous`)]}),(0,w.jsx)(`span`,{children:O(`positionOf`,`{{index}} of {{total}}`,{index:An+1,total:Z.length})}),(0,w.jsxs)(s,{variant:`ghost`,size:`sm`,className:`h-7 px-2`,disabled:An>=Z.length-1,onClick:()=>{let e=Z[An+1];e&&q(e.id)},children:[O(`nextRequest`,`Next`),(0,w.jsx)(ie,{className:`h-4 w-4 ml-0.5`})]})]}),At?(0,w.jsxs)(`div`,{className:`space-y-2 mt-6`,children:[(0,w.jsx)(o,{className:`h-6 w-3/4`}),(0,w.jsx)(o,{className:`h-6 w-1/2`}),(0,w.jsx)(o,{className:`h-20 w-full`})]}):F?(0,w.jsxs)(`div`,{className:`space-y-4 mt-6`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,w.jsx)(dt,{status:F.status}),(F.round??1)>1&&(0,w.jsx)(qe,{variant:`outline`,className:`text-[10px] border-violet-200 text-violet-700 dark:border-violet-500/30 dark:text-violet-400`,children:O(`roundChip`,`Round {{n}}`,{n:F.round})}),(0,w.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:rt(D(F)),children:[(0,w.jsx)(Me,{className:`h-3 w-3`}),O(`submittedAgo`,`Submitted {{when}}`,{when:k(D(F))})]}),F.completed_at&&(0,w.jsxs)(`span`,{children:[`· `,O(`completedAt`,`Completed {{when}}`,{when:k(F.completed_at)})]}),F.status===`pending`&&F.sla_due_at&&(0,w.jsx)(qe,{variant:`outline`,className:h(`text-[10px]`,Date.parse(F.sla_due_at)<Date.now()?`border-red-200 bg-red-50 text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-400`:`border-border text-muted-foreground`),children:Date.parse(F.sla_due_at)<Date.now()?O(`slaOverdue`,`SLA overdue {{dur}}`,{dur:ut(Date.now()-Date.parse(F.sla_due_at))}):O(`slaRemaining`,`SLA {{dur}} left`,{dur:ut(Date.parse(F.sla_due_at)-Date.now())})})]}),(0,w.jsx)(Je,{children:(0,w.jsxs)(Be,{className:`p-4 space-y-3`,children:[(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,w.jsxs)(`div`,{className:`min-w-0`,children:[(0,w.jsxs)(t,{to:pt(F),className:`text-base font-semibold hover:underline inline-flex items-center gap-1.5`,children:[(0,w.jsx)(`span`,{className:`truncate`,children:F.record_title||T(F.record_id)}),(0,w.jsx)(Ce,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`})]}),(0,w.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:ct(F)})]}),(0,w.jsx)(`div`,{className:`text-right text-xs text-muted-foreground shrink-0`,children:(0,w.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,w.jsx)(Qe,{className:`h-3 w-3`}),(0,w.jsx)(`span`,{title:F.submitter_id||``,children:ot(F)})]})})]}),ft(F.payload,F.payload_display).length>0&&(0,w.jsx)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-2 text-sm border-t pt-3`,children:ft(F.payload,F.payload_display).map(([e,t])=>(0,w.jsxs)(`div`,{className:`min-w-0`,children:[(0,w.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e}),(0,w.jsx)(`div`,{className:`truncate`,title:t,children:t})]},e))}),F.status===`pending`&&(F.pending_approvers||[]).length>0&&(0,w.jsxs)(`div`,{className:`border-t pt-3`,children:[(0,w.jsx)(`div`,{className:`text-[11px] text-muted-foreground mb-1`,children:O(`waitingOn`,`Waiting on`)}),(0,w.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:(F.pending_approvers||[]).map((e,t)=>(0,w.jsx)(qe,{variant:`outline`,className:`text-[11px]`,title:e,children:st(e,F)},t))})]})]})}),(F.flow_steps?.length??0)>1&&(0,w.jsx)(`div`,{className:`flex items-center px-1`,"aria-label":O(`stepProgress`,`Approval steps`),children:F.flow_steps.map((e,t)=>(0,w.jsxs)(x.Fragment,{children:[t>0&&(0,w.jsx)(`div`,{className:h(`h-px flex-1 mx-2`,e.state===`done`||e.state===`current`?`bg-emerald-300 dark:bg-emerald-700`:`bg-border`)}),(0,w.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[(0,w.jsx)(`span`,{className:h(`flex items-center justify-center h-5 w-5 rounded-full text-[10px] font-semibold`,e.state===`done`&&`bg-emerald-500 text-white`,e.state===`current`&&`bg-amber-500 text-white ring-2 ring-amber-200 dark:ring-amber-500/30`,e.state===`upcoming`&&`bg-muted text-muted-foreground border`),children:e.state===`done`?(0,w.jsx)(ge,{className:`h-3 w-3`}):t+1}),(0,w.jsx)(`span`,{className:h(`text-xs`,e.state===`current`?`font-medium`:`text-muted-foreground`),children:e.label})]})]},e.id))}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`h3`,{className:`text-sm font-semibold mb-3`,children:O(`history`,`Activity`)}),Ot.length===0?(0,w.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:O(`noActions`,`No actions yet.`)}):(0,w.jsx)(`ol`,{className:`relative space-y-3 pl-5 before:absolute before:left-[7px] before:top-1 before:bottom-1 before:w-px before:bg-border`,children:Ot.map(e=>{let t=e.action===`approve`?`bg-emerald-500`:e.action===`reject`?`bg-destructive`:e.action===`submit`?`bg-blue-500`:e.action===`reassign`?`bg-indigo-500`:e.action===`remind`||e.action===`request_info`?`bg-amber-500`:e.action===`comment`?`bg-slate-400`:e.action===`escalate`?`bg-red-500`:e.action===`revise`?`bg-violet-500`:e.action===`resubmit`?`bg-blue-500`:`bg-muted-foreground`,n=e.actor_id===`system:sla`?O(`systemSlaActor`,`System (SLA)`):e.actor_name??(e.actor_id&&e.actor_id===F.submitter_id?ot(F):T(e.actor_id)),r=e.action===`submit`?O(`actSubmit`,`Submitted`):e.action===`approve`?O(`actApprove`,`Approved`):e.action===`reject`?O(`actReject`,`Rejected`):e.action===`recall`?O(`actRecall`,`Recalled`):e.action===`reassign`?O(`actReassign`,`Reassigned`):e.action===`remind`?O(`actRemind`,`Reminder sent`):e.action===`request_info`?O(`actRequestInfo`,`Requested more info`):e.action===`comment`?O(`actComment`,`Commented`):e.action===`escalate`?O(`actEscalate`,`SLA escalated`):e.action===`revise`?O(`actRevise`,`Sent back for revision`):e.action===`resubmit`?O(`actResubmit`,`Resubmitted`):e.action;return(0,w.jsxs)(`li`,{className:`relative text-xs`,children:[(0,w.jsx)(`span`,{className:`absolute -left-[18px] top-1 h-3 w-3 rounded-full ring-2 ring-background ${t}`,"aria-hidden":!0}),(0,w.jsxs)(`div`,{className:`flex items-baseline gap-1.5 flex-wrap`,children:[(0,w.jsx)(`span`,{className:`font-medium`,children:r}),(0,w.jsx)(`span`,{className:`text-muted-foreground`,children:`·`}),(0,w.jsx)(`span`,{title:e.actor_id||``,children:n}),(0,w.jsx)(`span`,{className:`ml-auto text-muted-foreground text-[10px]`,title:rt(e.created_at),children:k(e.created_at)})]}),e.comment&&(0,w.jsxs)(`div`,{className:`text-muted-foreground italic mt-0.5`,children:[`"`,e.comment,`"`]})]},e.id)})}),F.status===`pending`&&(Tn||En)&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2 mt-3`,children:[(0,w.jsx)(Le,{value:ln,onChange:e=>un(e.target.value),onKeyDown:e=>{e.key===`Enter`&&ln.trim()&&(e.preventDefault(),Cn())},placeholder:O(`replyPlaceholder`,`Reply on this request…`),className:`h-8 text-sm`}),(0,w.jsx)(s,{size:`sm`,variant:`outline`,className:`h-8 px-2 shrink-0`,disabled:!ln.trim()||W,onClick:()=>void Cn(),children:(0,w.jsx)(ne,{className:`h-3.5 w-3.5`})})]})]}),F.payload!=null&&(0,w.jsxs)(`details`,{className:`group`,children:[(0,w.jsx)(`summary`,{className:`cursor-pointer text-xs text-muted-foreground hover:text-foreground select-none`,children:O(`rawData`,`Raw data (JSON)`)}),(0,w.jsxs)(`div`,{className:`mt-2`,children:[(0,w.jsx)(`div`,{className:`flex justify-end`,children:(0,w.jsxs)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(JSON.stringify(F.payload,null,2)),b.success(O(`copied`,`Copied`))}catch{b.error(O(`copyFailed`,`Copy failed`))}},className:`text-[10px] text-muted-foreground hover:text-foreground inline-flex items-center gap-1`,children:[(0,w.jsx)(Ee,{className:`h-3 w-3`}),O(`copy`,`Copy`)]})}),(0,w.jsx)(`pre`,{className:`text-[11px] bg-muted/50 rounded p-2 overflow-auto max-h-48 mt-1`,children:JSON.stringify(F.payload,null,2)})]})]}),F.status===`pending`&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Ke,{}),(0,w.jsxs)(`div`,{className:`space-y-3`,children:[$e&&(0,w.jsxs)(`details`,{className:`group`,children:[(0,w.jsx)(`summary`,{className:`cursor-pointer text-xs text-muted-foreground hover:text-foreground select-none`,children:O(`overrideActor`,`Act as another identity (admin)`)}),(0,w.jsxs)(`div`,{className:`mt-2`,children:[(0,w.jsx)(Ue,{htmlFor:`actor-override`,className:`text-xs`,children:O(`actor`,`Actor`)}),(0,w.jsx)(`input`,{id:`actor-override`,type:`text`,value:R,onChange:e=>Mt(e.target.value),placeholder:`${O(`auto`,`Auto`)}: ${J(F)||`—`}`,className:`w-full mt-1 px-3 py-2 text-sm border rounded-md bg-background`}),(0,w.jsx)(`div`,{className:`text-[10px] text-muted-foreground mt-1`,children:O(`overrideHint`,`e.g. role:sales_manager. Leave blank to use the auto-detected identity.`)})]})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(Ue,{htmlFor:`comment`,className:`text-xs`,children:O(`comment`,`Comment (optional)`)}),(0,w.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mt-1.5`,children:[O(`quickPhrase1`,`Approved — meets requirements.`),O(`quickPhrase2`,`Approved with conditions — please monitor execution.`),O(`quickPhrase3`,`Please add supporting material and resubmit.`)].map(e=>(0,w.jsx)(`button`,{type:`button`,onClick:()=>L(e),className:`text-[11px] px-2 py-0.5 rounded-full border text-muted-foreground hover:text-foreground hover:bg-accent transition-colors`,children:e},e))}),(0,w.jsx)(Re,{id:`comment`,value:I,onChange:e=>L(e.target.value),rows:2,className:`mt-1`})]}),(0,w.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,w.jsxs)(s,{size:`sm`,onClick:()=>_n(`approve`),disabled:!Tn||z!==null,children:[(0,w.jsx)(Ie,{className:`h-4 w-4 mr-1`}),z===`approve`?O(`approving`,`Approving…`):O(`approve`,`Approve`)]}),(0,w.jsxs)(g,{children:[(0,w.jsx)(me,{asChild:!0,children:(0,w.jsxs)(s,{size:`sm`,variant:`outline`,disabled:!Tn||z!==null,className:`border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground`,children:[(0,w.jsx)(he,{className:`h-4 w-4 mr-1`}),z===`reject`?O(`rejecting`,`Rejecting…`):O(`reject`,`Reject`)]})}),(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`rejectTitle`,`Reject this request?`)}),(0,w.jsx)(_,{children:O(`rejectBody`,`This marks the request as rejected and notifies the submitter.`)})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{onClick:()=>_n(`reject`),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:O(`reject`,`Reject`)})]})]})]}),Tn&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(s,{size:`sm`,variant:`outline`,disabled:z!==null||W,className:`border-violet-300 text-violet-700 hover:bg-violet-50 dark:text-violet-400`,onClick:()=>rn(!0),children:[(0,w.jsx)(Ve,{className:`h-4 w-4 mr-1`}),O(`sendBackBtn`,`Send back`)]}),(0,w.jsxs)(s,{size:`sm`,variant:`outline`,disabled:z!==null||W,className:`border-amber-300 text-amber-700 hover:bg-amber-50 dark:text-amber-400`,onClick:()=>$t(!0),children:[(0,w.jsx)(ae,{className:`h-4 w-4 mr-1`}),O(`requestInfoBtn`,`Request info`)]}),(0,w.jsxs)(s,{size:`sm`,variant:`outline`,disabled:z!==null||W,onClick:()=>{wn(),Yt(!0)},children:[(0,w.jsx)(pe,{className:`h-4 w-4 mr-1`}),O(`reassignBtn`,`Reassign`)]})]}),En&&(0,w.jsxs)(s,{size:`sm`,variant:`outline`,disabled:W,onClick:()=>void yn(),children:[(0,w.jsx)(He,{className:`h-4 w-4 mr-1`}),O(`remindBtn`,`Send reminder`)]}),En&&(0,w.jsxs)(g,{children:[(0,w.jsx)(me,{asChild:!0,children:(0,w.jsxs)(s,{size:`sm`,variant:`outline`,disabled:z!==null,children:[(0,w.jsx)(be,{className:`h-4 w-4 mr-1`}),z===`recall`?O(`recalling`,`Recalling…`):O(`recall`,`Recall`)]})}),(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`recallTitle`,`Recall this request?`)}),(0,w.jsx)(_,{children:O(`recallBody`,`This withdraws your request. Approvers can no longer act on it, and the record is unlocked.`)})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{onClick:()=>_n(`recall`),children:O(`recall`,`Recall`)})]})]})]})]}),!Tn&&(0,w.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:En?O(`whyDisabledSubmitter`,`You submitted this request, so you can recall it — but only the assigned approvers can approve or reject.`):O(`whyDisabled`,`Only the assigned approvers can act on this request. It is waiting on: {{who}}.`,{who:(F.pending_approvers||[]).map(e=>st(e,F)).join(`, `)||`—`})})]})]}),Dn&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Ke,{}),(0,w.jsxs)(`div`,{className:`space-y-3`,children:[(0,w.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:O(`returnedHint`,`An approver sent this back to you. The record is unlocked — fix the data, then resubmit to start a new approval round.`)}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(Ue,{htmlFor:`resubmit-comment`,className:`text-xs`,children:O(`comment`,`Comment (optional)`)}),(0,w.jsx)(Re,{id:`resubmit-comment`,value:I,onChange:e=>L(e.target.value),rows:2,className:`mt-1`,placeholder:O(`resubmitPlaceholder`,`What did you change?`)})]}),(0,w.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,w.jsx)(s,{asChild:!0,size:`sm`,variant:`outline`,children:(0,w.jsxs)(t,{to:pt(F),children:[(0,w.jsx)(Ce,{className:`h-4 w-4 mr-1`}),O(`editRecordBtn`,`Edit record`)]})}),(0,w.jsxs)(s,{size:`sm`,disabled:sn,onClick:()=>void Sn(),children:[(0,w.jsx)(ye,{className:h(`h-4 w-4 mr-1`,sn&&`animate-spin`)}),sn?O(`resubmitting`,`Resubmitting…`):O(`resubmitBtn`,`Resubmit`)]}),(0,w.jsxs)(g,{children:[(0,w.jsx)(me,{asChild:!0,children:(0,w.jsxs)(s,{size:`sm`,variant:`outline`,disabled:sn,children:[(0,w.jsx)(be,{className:`h-4 w-4 mr-1`}),O(`recall`,`Recall`)]})}),(0,w.jsxs)(l,{children:[(0,w.jsxs)(d,{children:[(0,w.jsx)(v,{children:O(`abandonTitle`,`Abandon this revision?`)}),(0,w.jsx)(_,{children:O(`abandonBody`,`This withdraws the request instead of resubmitting it. The approval ends here.`)})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(f,{children:O(`cancel`,`Cancel`)}),(0,w.jsx)(m,{onClick:()=>_n(`recall`),children:O(`recall`,`Recall`)})]})]})]})]})]})]})]}):null]})})]})}export{pt as ApprovalsInboxPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{d as t,f as n,r,y as i}from"./vendor-react-BGDDiZfJ.js";import{l as a}from"./framework-CWU64Lvg.js";import{Cr as o,Di as s,Jt as c,Qt as l,Xt as u,Yt as d,Zt as f,ft as p,j as m,pi as h,pt as g,ut as _}from"./ui-components-DHIW7RSX.js";import{r as v}from"./vendor-ui-utils-BzQBRdq3.js";import{i as y,n as b,s as x,t as ee}from"./assistantBus-BFk4fCbM.js";import{a as te,d as S,f as ne,i as re,l as ie,n as C,t as w}from"./surfaceAgent-qmokOosD.js";import{C as ae,a as oe,f as T,g as E,h as D,m as O,r as se,t as ce,u as le,y as ue}from"./plugin-chatbot-BT49v2CR.js";import{E as k,n as de}from"./marketplaceApi-1mMRJWDq.js";var A=e(i(),1);function j(e){return e.some(e=>D(e.name))&&e.some(e=>E(e.name))}function M({agents:e,showAgentPickerProp:t,envOptIn:n=!1,aiStudioEnabled:r=!0}){return t===void 0?n?!0:r&&j(e):t}var N=r(),P={ask:{zh:`智能助手`,en:`Assistant`},build:{zh:`构建助手`,en:`Build assistant`}};function F(e,t,n){let r=t?P[O(t)]:void 0;return r?e?r.zh:r.en:n}function fe(e,t,n,r,i){let a=(e??``).toLowerCase().startsWith(`zh`),o=F(a,n,r),s=i.slice(0,2).map(e=>e.label||e.name),c=O(n??``)===`build`;if(a){let e=c?[`帮我搭一个客户跟进 CRM`,`搭一个项目与任务管理应用`,`给当前应用加一个仪表盘`]:[s[0]?`查询最近创建的${s[0]}`:`帮我查询最近的数据`,s[0]?`统计${s[0]}的总数量`:`统计各对象的记录数量`,s[1]?`${s[1]}有哪些字段?`:`当前应用里有哪些数据对象?`].filter(Boolean);return{agentLabel:o,labels:{emptyTitle:`你好,我是${o}`,emptyDescription:c?`告诉我你想管理什么,我会为你搭出完整应用——对象、视图、仪表盘和示例数据一次到位;也可以直接说要改哪里。`:`随时帮你查询和分析「${t}」中的数据。试试下面的问题,或直接输入你的需求。`,clear:`清空对话`,sendHint:`发送`,agentActivity:`执行过程`,toolCompleted:`已完成`,toolRunning:`运行中`,toolAwaitingApproval:`等待确认`,toolFailed:`失败`,connectionWaiting:`正在等待服务器响应…`,connectionStalledLabel:`仍在处理中…`,connectionOfflineLabel:`网络已断开,正在重连…`,designingPlanLabel:`正在为你设计方案…`,designingPlanHints:[`梳理需要记录的数据…`,`设计对象与字段…`,`关联相关记录…`,`配置关系与查找字段…`,`规划页面与视图…`,`布置表单与列表…`,`补充默认值与校验…`,`规划一个看板来跟踪…`,`复核整体结构是否自洽…`,`汇总成完整方案…`],toolDetailsHidden:`已隐藏工具参数和原始结果,仅保留过程摘要。`,copy:`复制`,copied:`已复制`,regenerate:`重新生成`,model:`模型`,submit:`发送`,uploadFiles:`上传文件`,stopResponse:`停止生成`,sendFailedRateLimited:`发送过于频繁,请稍候再试。你的消息已保留在输入框中。`,sendFailedGeneric:`消息发送失败,请重试。你的消息已保留在输入框中。`,trace:`调试 trace`,viewTrace:`查看调试 trace`},placeholder:`向${o}提问…`,loadingPlaceholder:`正在加载助手…`,title:`${t} 智能助手`,newChat:`开启新对话`,share:`分享对话`,reviewDraft:e=>`查看 ${e} 项变更`,publishDrafts:`发布`,published:`已发布`,nextSteps:`下一步`,planTitle:`方案预览`,planQuestions:`搭建前请确认`,planAssumptions:`假设`,planDeferred:`待补 / 暂未搭建`,planApproveHint:`回复以确认或调整该方案。`,planApprove:`开始搭建`,planAdjust:`调整方案`,planBuilt:`已搭建`,planReady:`方案已就绪。点击开始搭建,或告诉我需要调整什么。`,planApproveMessage:`确认,开始搭建。`,planApproveDefaultsMessage:`确认搭建,未决问题按你的合理假设和默认处理。`,planAnswer:(e,t)=>`关于「${e}」,我选择「${t}」。`,publishOk:`已发布,对象已生效。`,publishFailed:`发布失败`,seedWarn:`已发布,但部分示例数据未能载入。`,openBuiltApp:`打开应用`,suggestions:e}}let l=c?[`Build me a customer follow-up CRM`,`Build a project & task tracker`,`Add a dashboard to this app`]:[s[0]?`Show the latest ${s[0]}`:`Show my most recent records`,s[0]?`How many ${s[0]} are there?`:`Count records by status`,s[1]?`What fields does ${s[1]} have?`:`What data can I work with here?`].filter(Boolean);return{agentLabel:o,labels:{emptyTitle:`Hi, I'm ${o}`,emptyDescription:c?`Tell me what you want to manage and I'll build the app — objects, views, a dashboard and sample data in one go. Or just say what to change.`:`I can help you query and analyze your ${t} data. Try a prompt below, or just type your question.`,clear:`Clear`,sendHint:`to send`,agentActivity:`Agent activity`,toolCompleted:`Completed`,toolRunning:`Running`,toolAwaitingApproval:`Awaiting approval`,toolFailed:`Failed`,connectionWaiting:`Waiting for server…`,connectionStalledLabel:`Still working…`,connectionOfflineLabel:`Connection lost — reconnecting…`,designingPlanLabel:`Designing your app…`,designingPlanHints:[`Mapping out the data you’ll track…`,`Shaping objects and their fields…`,`Connecting related records…`,`Setting up relationships and lookups…`,`Planning the screens and views…`,`Laying out forms and lists…`,`Adding sensible defaults and validations…`,`Sketching a dashboard to track it…`,`Double-checking the structure hangs together…`,`Pulling the plan together…`],toolDetailsHidden:`Tool inputs and raw results are hidden in this view.`,copy:`Copy`,copied:`Copied`,regenerate:`Regenerate`,model:`Model`,submit:`Submit`,uploadFiles:`Upload files`,stopResponse:`Stop response`,sendFailedRateLimited:`You're sending messages too quickly. Your message is kept below — wait a moment and try again.`,sendFailedGeneric:`Couldn't send your message. It's kept below — please try again.`,trace:`trace`,viewTrace:`View trace`},placeholder:`Ask ${o}...`,loadingPlaceholder:`Loading assistant...`,title:`${t} Assistant`,newChat:`New chat`,share:`Share conversation`,reviewDraft:e=>`Review ${e} change${e===1?``:`s`}`,publishDrafts:`Publish`,published:`Published`,nextSteps:`What's next`,planTitle:`Proposed plan`,planQuestions:`Confirm before building`,planAssumptions:`Assumptions`,planDeferred:`Not yet built`,planApproveHint:`Reply to approve or adjust this plan.`,planApprove:`Build it`,planAdjust:`Adjust`,planBuilt:`Built`,planReady:`The plan is ready. Build it now, or tell me what to adjust.`,planApproveMessage:`Looks good — build it as proposed.`,planApproveDefaultsMessage:`Build it with your best assumptions; use sensible defaults for the open questions.`,planAnswer:(e,t)=>`For "${e}", go with: ${t}.`,publishOk:`Published — objects are now live.`,publishFailed:`Publish failed`,seedWarn:`Published, but some sample data failed to load.`,openBuiltApp:`Open app`,suggestions:l}}var I=`/api/v1/ai`;function L(e){if(e)return e.replace(/\/$/,``);let t={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_SENTRY_DSN:`https://1373a588ceb9da150b11e64bf85f583d@o4510356161757184.ingest.us.sentry.io/4511439670673408`,VITE_SENTRY_ENVIRONMENT:`production`,VITE_SENTRY_SEND_DEFAULT_PII:`true`,VITE_SERVER_URL:``,VITE_USE_MOCK_SERVER:`false`},n=t.VITE_AI_BASE_URL;return n?n.replace(/\/$/,``):`${(t.VITE_SERVER_URL??``).replace(/\/$/,``)}${I}`}function pe(e,t){if(!e||e.type!==`object`)return null;let n=e.label||e.name||`this object`;return(t??``).toLowerCase().startsWith(`zh`)?[`为「${n}」补充字段`,`为「${n}」建议校验规则`,`添加一个状态选项字段`]:[`Add fields to ${n}`,`Suggest validations for ${n}`,`Add a status picklist field`]}var R=new Set([`view`,`record`,`page`,`dashboard`,`design`,`report`,`metadata`]);function z(e){try{return decodeURIComponent(e)}catch{return e}}function me(e,t){let n=e.split(`/`).filter(Boolean),r=n.indexOf(`apps`);if(r===-1||n.length<r+3)return{};let i=z(n[r+2]);if(R.has(i)||!t.some(e=>e.name===i))return{};let a=n[r+3]?z(n[r+3]):void 0,o=a&&a!==`new`?a:void 0;return{objectName:i,...o?{recordId:o}:{}}}function B({appLabel:e,appName:r,objects:i,agents:S,agentsLoading:w,activeAgent:T,onAgentChange:E,showAgentPicker:D,chatApi:O,apiBase:j,defaultOpen:M=!1,conversationId:P,initialMessages:I,onNewChat:L}){let{language:R}=a(),z=n(),B=t(),V=A.useMemo(()=>me(B.pathname,i),[B.pathname,i]),{editor:H}=x(),{models:he,defaultModelId:ge}=le({apiBase:j}),[_e,ve]=A.useState(void 0),ye=_e??ge,U=A.useMemo(()=>!I||I.length===0?[]:ae(I),[I]),W=A.useMemo(()=>S.find(e=>e.name===T)?.label??T??e,[S,T,e]),{errorSuppressed:be,handleChatError:xe,setMessagesRef:Se,resetSuppression:G}=re({chatApi:O,conversationId:P}),{messages:K,isLoading:q,error:Ce,sendMessage:J,stop:we,reload:Te,clear:Ee,setMessages:Y}=ue({api:O,conversationId:P,model:ye,onError:xe,body:{context:{activeApp:e,appName:r,objects:i.map(e=>({name:e.name,label:e.label})),agentName:T,autoPublishAiBuilds:k().features.autoPublishAiBuilds,...V.objectName?{objectName:V.objectName}:{},...V.recordId?{recordId:V.recordId}:{},...H?{editing:H}:{}}},initialMessages:U,autoResponse:!O,autoResponseText:i.length>0?`I can help you work with ${i.map(e=>e.label||e.name).join(`, `)}. What would you like to do?`:`Thanks for your message! I'm here to help you navigate and manage your data.`,autoResponseDelay:600});A.useEffect(()=>{Se.current=Y},[Y]),A.useEffect(()=>{ne(P,ie(K))},[P,K]);let X=A.useMemo(()=>C(K)??C(U)??R,[K,U,R]),Z=A.useMemo(()=>fe(X,e,T,W,i),[X,e,T,W,i]),De=A.useMemo(()=>pe(H,X),[H,X]),Q=ce({messages:K,apiBase:j,continueConversation:e=>{G(),J(e)}}),Oe=(R??``).toLowerCase().startsWith(`zh`),ke=D&&S.length>1?S.length<=3?(0,N.jsx)(_,{value:T,onValueChange:E,children:(0,N.jsx)(p,{className:`h-7 gap-0.5 p-0.5`,"data-testid":`floating-chatbot-agent-picker`,children:S.map(e=>(0,N.jsx)(g,{value:e.name,disabled:w,title:e.description||void 0,className:`h-6 px-2.5 text-xs`,children:F(Oe,e.name,e.label)},e.name))})}):(0,N.jsxs)(c,{value:T,onValueChange:E,disabled:w,children:[(0,N.jsx)(f,{className:`h-7 w-[180px] text-xs`,"data-testid":`floating-chatbot-agent-picker`,children:(0,N.jsx)(l,{placeholder:`Choose agent...`})}),(0,N.jsx)(d,{align:`end`,children:S.map(e=>(0,N.jsxs)(u,{value:e.name,className:`text-xs`,children:[(0,N.jsx)(`span`,{className:`font-medium`,children:e.label}),e.description?(0,N.jsx)(`span`,{className:`block text-muted-foreground text-[10px] truncate max-w-[220px]`,children:e.description}):null]},e.name))})]}):null,[Ae,$]=A.useState(!1),je=A.useMemo(()=>j.replace(/\/v1\/ai$/,``).replace(/\/ai$/,``)||`/api`,[j]),Me=(0,N.jsxs)(N.Fragment,{children:[K.length>0?(0,N.jsx)(o,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":Z.newChat,title:Z.newChat,"data-testid":`floating-chatbot-new`,onClick:L,children:(0,N.jsx)(h,{className:`h-4 w-4`})}):null,P?(0,N.jsx)(o,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":Z.share,title:Z.share,"data-testid":`floating-chatbot-share`,onClick:()=>$(!0),children:(0,N.jsx)(s,{className:`h-4 w-4`})}):null]});return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(se,{onUpgrade:()=>window.open(de(),`_blank`,`noopener,noreferrer`),floatingConfig:{position:`bottom-right`,defaultOpen:M,panelWidth:420,panelHeight:560,title:Z.title,triggerSize:56},headerExtra:ke,headerActions:Me,messages:K,labels:Z.labels,models:he,selectedModelId:ye,onModelChange:ve,showAvatars:!0,hideClearBar:!0,assistantAvatarFallback:Z.agentLabel,suggestions:K.length===0?De??Z.suggestions:void 0,placeholder:T?Z.placeholder:w?Z.loadingPlaceholder:Z.placeholder,onSendMessage:e=>{G(),J(e)},onClear:Ee,onStop:q?we:void 0,onReload:Te,isLoading:q,error:be?void 0:Ce,enableMarkdown:!0,onToolApprove:Q.decide,toolDecisions:Q.decisions,toolApproveLabel:`Approve & run`,toolDenyLabel:`Reject`,toolDenyReason:`Operator rejected from chat`,onReviewDraft:e=>{e[0]&&y(e[0])},toolReviewLabel:Z.reviewDraft,onOpenBuiltApp:e=>z(`/apps/${encodeURIComponent(e)}`),openBuiltAppLabel:Z.openBuiltApp,onPreviewDraftApp:(e,t)=>z(t?.materialized?`/apps/${encodeURIComponent(e)}`:`/apps/${encodeURIComponent(e)}?preview=draft`),onDraftArtifacts:e=>{for(let t of e)ee(t)},fetchPendingDraftCount:te,onPublishDrafts:async e=>{try{let t=await fetch(`/api/v1/packages/${encodeURIComponent(e)}/publish-drafts`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:`{}`}),n=await t.json().catch(()=>null);if(!t.ok||n?.success===!1)throw Error(n?.error?.message||`HTTP ${t.status}`);let r=n?.data?.failedCount??n?.failedCount??0;if(r){let e=n?.data?.failed??n?.failed??[],t=e.find(e=>e?.error)??e[0],i=t?`${[t.type,t.name].filter(Boolean).join(` `)}${t.error?`: ${t.error}`:``}`:n?.error?.message;throw Error(i?`${i}${r>1?` (+${r-1} more)`:``}`:`${r} item(s) failed to publish`)}let i=n?.data?.seedApplied??n?.seedApplied;i&&i.success===!1?v.warning(Z.seedWarn,{description:i.error??(Array.isArray(i.errors)&&i.errors.length?String(i.errors[0]):void 0)}):v.success(Z.publishOk),b();let a=(n?.data?.published??n?.published??[]).find(e=>e?.type===`app`&&e?.name);return a?.name&&z(`/apps/${encodeURIComponent(a.name)}`),{ok:!0,health:oe(n)}}catch(e){return v.error(Z.publishFailed,{description:e instanceof Error?e.message:void 0}),!1}},publishDraftsLabel:Z.publishDrafts,nextStepsLabel:Z.nextSteps,planTitleLabel:Z.planTitle,planQuestionsLabel:Z.planQuestions,planAssumptionsLabel:Z.planAssumptions,planDeferredLabel:Z.planDeferred,planApproveHintLabel:Z.planApproveHint,planApproveLabel:Z.planApprove,planAdjustLabel:Z.planAdjust,planBuiltLabel:Z.planBuilt,planReadyLabel:Z.planReady,planApproveMessage:Z.planApproveMessage,planApproveDefaultsMessage:Z.planApproveDefaultsMessage,planAnswerMessage:Z.planAnswer,publishedLabel:Z.published,autoPublishDrafts:k().features.autoPublishAiBuilds}),P&&(0,N.jsx)(m,{open:Ae,onOpenChange:$,objectName:`ai_conversations`,recordId:P,recordLabel:`this conversation`,apiBase:je})]})}function V({appLabel:e,appName:t,objects:n,apiBase:r,defaultAgent:i,showAgentPicker:a,defaultOpen:o=!1,userId:s}){let c=A.useMemo(()=>L(r),[r]),l={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_SENTRY_DSN:`https://1373a588ceb9da150b11e64bf85f583d@o4510356161757184.ingest.us.sentry.io/4511439670673408`,VITE_SENTRY_ENVIRONMENT:`production`,VITE_SENTRY_SEND_DEFAULT_PII:`true`,VITE_SERVER_URL:``,VITE_USE_MOCK_SERVER:`false`},u=l.VITE_AI_DEFAULT_AGENT,{agents:d,isLoading:f,error:p}=T({apiBase:c}),m=M({agents:d,showAgentPickerProp:a,envOptIn:l.VITE_AI_SHOW_AGENT_PICKER===`true`,aiStudioEnabled:k().features.aiStudio!==!1}),[h,g]=A.useState(void 0);A.useEffect(()=>{if(!h&&d.length>0){let e=d.some(e=>O(e.name)===`build`),t=w(`default`,{agents:d,appDefaultAgent:i??u??(e?`build`:void 0),aiStudioEnabled:k().features.aiStudio!==!1});t&&g(t)}},[d,h,i,u]);let _=h?`${c}/agents/${encodeURIComponent(h)}/chat`:void 0,v=h?O(h)===`build`:!1,{conversationId:y,initialMessages:b,startNew:x}=S({userId:h?s:void 0,scope:h,apiBase:c,resumeMode:v?`resume`:`fresh`});return(0,N.jsx)(B,{appLabel:e,appName:t,objects:n,agents:d,agentsLoading:f,agentsError:p,activeAgent:h,onAgentChange:g,showAgentPicker:m,chatApi:_,apiBase:c,defaultOpen:o,conversationId:y,initialMessages:b,onNewChat:x},`${_??`local`}:${y??`pending`}`)}export{V as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{r as t,y as n}from"./vendor-react-BGDDiZfJ.js";import{l as r}from"./framework-CWU64Lvg.js";import{$s as i,Cr as a,Gn as o,Ia as s,Jn as c,Kn as l,Ps as u,Qa as d,Wa as f,Xn as p,Yn as m,Zs as h,gi as g,gs as _,kc as v,ln as y,mi as b,qn as x,uo as S}from"./ui-components-DHIW7RSX.js";import{a as C,i as w,n as T,o as E,r as D,s as O,t as k}from"./plugin-view-CTBpbehM.js";var A=e(n(),1),j=t();function M({title:e,description:t,icon:n,actions:r,accentColor:i,sticky:a=!1,className:o,"data-testid":s}){return(0,j.jsxs)(`div`,{style:{"--page-header-accent":i||`hsl(var(--primary))`},className:v(`relative shrink-0 border-b bg-background z-10`,a&&`sticky top-0 bg-background/85 backdrop-blur supports-[backdrop-filter]:bg-background/75`,o),"data-testid":s??`page-header`,children:[(0,j.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-x-0 top-0 h-[2px] opacity-80`,style:{background:`linear-gradient(90deg, transparent, var(--page-header-accent), transparent)`}}),(0,j.jsxs)(`div`,{className:`flex justify-between items-center gap-3 py-2.5 sm:py-3 px-4 sm:px-6`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0 flex-1`,children:[n&&(0,j.jsx)(`div`,{className:v(`shrink-0 inline-flex items-center justify-center rounded-lg`,`h-9 w-9 sm:h-10 sm:w-10`,`[&_svg]:h-[18px] [&_svg]:w-[18px] sm:[&_svg]:h-5 sm:[&_svg]:w-5`),style:{color:`var(--page-header-accent)`,background:`linear-gradient(135deg, color-mix(in srgb, var(--page-header-accent) 18%, transparent), color-mix(in srgb, var(--page-header-accent) 6%, transparent))`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, var(--page-header-accent) 22%, transparent)`},children:n}),(0,j.jsxs)(`div`,{className:`min-w-0`,children:[(0,j.jsx)(`h1`,{className:`text-base sm:text-lg lg:text-xl font-semibold tracking-tight text-foreground truncate leading-tight`,children:e}),t&&(0,j.jsx)(`p`,{className:`text-xs sm:text-sm text-muted-foreground truncate hidden sm:block max-w-xl mt-0.5`,children:t})]})]}),r&&(0,j.jsx)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 shrink-0`,children:r})]})]})}function N(e){return[{type:`grid`,icon:d,label:e(`console.objectView.viewTypeGrid`),description:e(`console.objectView.viewTypeGridDesc`)},{type:`kanban`,icon:b,label:e(`console.objectView.viewTypeKanban`),description:e(`console.objectView.viewTypeKanbanDesc`)},{type:`calendar`,icon:i,label:e(`console.objectView.viewTypeCalendar`),description:e(`console.objectView.viewTypeCalendarDesc`)},{type:`gallery`,icon:S,label:e(`console.objectView.viewTypeGallery`),description:e(`console.objectView.viewTypeGalleryDesc`)},{type:`timeline`,icon:_,label:e(`console.objectView.viewTypeTimeline`),description:e(`console.objectView.viewTypeTimelineDesc`)},{type:`gantt`,icon:g,label:e(`console.objectView.viewTypeGantt`),description:e(`console.objectView.viewTypeGanttDesc`)},{type:`map`,icon:s,label:e(`console.objectView.viewTypeMap`),description:e(`console.objectView.viewTypeMapDesc`)},{type:`chart`,icon:h,label:e(`console.objectView.viewTypeChart`),description:e(`console.objectView.viewTypeChartDesc`)},{type:`tree`,icon:f,label:e(`console.objectView.viewTypeTree`),description:e(`console.objectView.viewTypeTreeDesc`)}]}function P(e,t){for(let n=1;n<1e3;n++){let r=`${e} ${n}`;if(!t.has(r))return r}return e}var F={kanban:[{key:`groupByField`,i18nKey:`console.objectView.groupByField`,helpI18nKey:`console.objectView.groupByFieldHelp`,filter:e=>e.type===`select`||e.type===`boolean`,preferred:T}],calendar:[{key:`startDateField`,i18nKey:`console.objectView.startDateField`,helpI18nKey:`console.objectView.startDateFieldHelp`,filter:e=>e.type===`date`,preferred:D},{key:`titleField`,i18nKey:`console.objectView.titleField`,helpI18nKey:`console.objectView.titleFieldHelp`,filter:e=>e.type===`text`}],timeline:[{key:`startDateField`,i18nKey:`console.objectView.startDateField`,helpI18nKey:`console.objectView.timelineDateFieldHelp`,filter:e=>e.type===`date`,preferred:D},{key:`titleField`,i18nKey:`console.objectView.titleField`,helpI18nKey:`console.objectView.titleFieldHelp`,filter:e=>e.type===`text`}],gantt:[{key:`startDateField`,i18nKey:`console.objectView.startDateField`,helpI18nKey:`console.objectView.ganttStartDateFieldHelp`,filter:e=>e.type===`date`,preferred:D},{key:`endDateField`,i18nKey:`console.objectView.endDateField`,helpI18nKey:`console.objectView.ganttEndDateFieldHelp`,filter:e=>e.type===`date`,preferred:k},{key:`titleField`,i18nKey:`console.objectView.titleField`,helpI18nKey:`console.objectView.titleFieldHelp`,filter:e=>e.type===`text`}],gallery:[{key:`coverField`,i18nKey:`console.objectView.imageField`,helpI18nKey:`console.objectView.imageFieldHelp`,filter:e=>E(e)}],map:[{key:`latitudeField`,i18nKey:`console.objectView.latitudeField`,helpI18nKey:`console.objectView.latitudeFieldHelp`,filter:e=>e.type===`number`&&C(e,`latitude`)},{key:`longitudeField`,i18nKey:`console.objectView.longitudeField`,helpI18nKey:`console.objectView.longitudeFieldHelp`,filter:e=>e.type===`number`&&C(e,`longitude`)}],chart:[{key:`chartType`,i18nKey:`console.objectView.chartType`,helpI18nKey:`console.objectView.chartTypeHelp`,kind:`enum`,enumOptions:[{value:`bar`,i18nKey:`console.objectView.chartTypeBar`},{value:`line`,i18nKey:`console.objectView.chartTypeLine`},{value:`pie`,i18nKey:`console.objectView.chartTypePie`},{value:`area`,i18nKey:`console.objectView.chartTypeArea`},{value:`scatter`,i18nKey:`console.objectView.chartTypeScatter`}],defaultValue:`bar`},{key:`xAxisField`,i18nKey:`console.objectView.xAxisField`,helpI18nKey:`console.objectView.xAxisFieldHelp`,filter:e=>e.type===`select`||e.type===`boolean`||e.type===`date`||e.type===`text`,preferred:T},{key:`yAxisFields`,i18nKey:`console.objectView.yAxisField`,helpI18nKey:`console.objectView.yAxisFieldHelp`,filter:e=>e.type===`number`}],tree:[{key:`parentField`,i18nKey:`console.objectView.parentField`,helpI18nKey:`console.objectView.parentFieldHelp`,filter:e=>e.rawType===`tree`||e.rawType===`lookup`||e.rawType===`master_detail`}]};function I({open:e,onOpenChange:t,onCreate:n,existingLabels:i,availableTypes:s,objectDef:d}){let{t:f}=r(),h=(0,A.useMemo)(()=>N(f),[f]),g=(0,A.useMemo)(()=>s&&s.length>0?h.filter(e=>s.includes(e.type)):h,[h,s]),_=(0,A.useMemo)(()=>new Set(i??[]),[(i??[]).join(`\0`)]),b=(0,A.useMemo)(()=>d?w(d):[],[d]),[S,C]=(0,A.useState)(g[0]?.type??`grid`),[T,E]=(0,A.useState)(``),[D,k]=(0,A.useState)(!1),[M,I]=(0,A.useState)({});(0,A.useEffect)(()=>{e&&(C(g[0]?.type??`grid`),k(!1),I({}))},[e,g]),(0,A.useEffect)(()=>{if(!D){let e=g.find(e=>e.type===S);E(P(e?.label??`View`,_))}},[S,D,g,_]);let L=F[S]??[],R=e=>e.kind===`enum`?(e.enumOptions?.length??0)>0:d?(e.filter?b.filter(e.filter):b).length>0:!0,z=(0,A.useMemo)(()=>{let e={};return g.forEach(t=>{let n=(F[t.type]??[]).find(e=>!R(e));e[t.type]=n??null}),e},[g,b,d]),B=e=>M[`${S}.${e}`]??``,V=(e,t)=>I(n=>({...n,[`${S}.${e}`]:t})),H=T.trim(),U=H.length>0&&_.has(H),W=L.every(e=>B(e.key).length>0),G=H.length>0&&!U&&W;(0,A.useEffect)(()=>{L.length!==0&&L.forEach(e=>{if(B(e.key).length>0)return;if(e.kind===`enum`){e.defaultValue&&V(e.key,e.defaultValue);return}let t=e.filter?b.filter(e.filter):b;if(t.length===0)return;if(t.length===1){V(e.key,t[0].value);return}let n=O(t,e.preferred??[]);n&&V(e.key,n)})},[S,b]);let K=()=>{if(!G)return;let e={};L.forEach(t=>{let n=B(t.key);n&&(e[t.key]=t.key===`yAxisFields`?[n]:n)});let r={type:S,label:H};Object.keys(e).length>0&&(r[S]=e),n(r),t(!1)};return(0,j.jsx)(o,{open:e,onOpenChange:t,children:(0,j.jsxs)(l,{className:`sm:max-w-[560px]`,"data-testid":`create-view-dialog`,children:[(0,j.jsxs)(m,{children:[(0,j.jsx)(p,{children:f(`console.objectView.createView`)}),(0,j.jsx)(x,{children:f(`console.objectView.createViewDesc`)})]}),(0,j.jsx)(`div`,{className:`grid grid-cols-4 gap-2 py-2`,"data-testid":`create-view-type-grid`,children:g.map(({type:e,label:t,description:n,icon:r})=>{let i=e===S,a=z[e],o=!!a,s=o?f(`console.objectView.viewTypeUnavailable`,{field:f(a.i18nKey)}):void 0;return(0,j.jsxs)(`button`,{type:`button`,"data-testid":`create-view-type-${e}`,"aria-pressed":i,"aria-disabled":o,disabled:o,title:s,onClick:()=>{o||C(e)},className:v(`group flex flex-col items-start gap-1 rounded-lg border bg-background p-3 text-left transition-colors`,!o&&`hover:border-primary/60 hover:bg-accent/40`,i&&!o?`border-primary ring-2 ring-primary/30 bg-accent/40`:`border-border`,o&&`opacity-50 cursor-not-allowed`),children:[(0,j.jsx)(r,{className:v(`h-5 w-5`,i&&!o?`text-primary`:`text-muted-foreground group-hover:text-foreground`)}),(0,j.jsx)(`div`,{className:`text-xs font-medium leading-tight`,children:t}),(0,j.jsx)(`div`,{className:`text-[10px] leading-tight text-muted-foreground line-clamp-2`,children:o?f(`console.objectView.viewTypeUnavailableShort`):n})]},e)})}),L.length>0&&(0,j.jsx)(`div`,{className:`space-y-3 rounded-md border border-dashed bg-muted/30 p-3`,"data-testid":`create-view-required-fields`,children:L.map(e=>{let t=B(e.key),n=e.kind===`enum`,r=n?[]:e.filter?b.filter(e.filter):b,i=!n&&b.length>0&&r.length===0;return(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsxs)(`label`,{htmlFor:`create-view-required-${e.key}`,className:`text-xs font-medium`,children:[f(e.i18nKey),(0,j.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),(0,j.jsxs)(`select`,{id:`create-view-required-${e.key}`,"data-testid":`create-view-required-${e.key}`,value:t,onChange:t=>V(e.key,t.target.value),disabled:i,className:v(`h-9 w-full rounded-md border bg-background px-2 text-xs`,`border-input`),children:[(0,j.jsx)(`option`,{value:``,children:f(n?`console.objectView.selectOption`:`console.objectView.selectField`)}),n?e.enumOptions.map(e=>(0,j.jsx)(`option`,{value:e.value,children:f(e.i18nKey)},e.value)):r.map(e=>(0,j.jsx)(`option`,{value:e.value,children:e.label},e.value))]}),e.helpI18nKey&&!i&&(0,j.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:f(e.helpI18nKey)}),i&&(0,j.jsxs)(`p`,{className:`flex items-center gap-1 text-[11px] text-destructive`,"data-testid":`create-view-error-no-field-${e.key}`,children:[(0,j.jsx)(u,{className:`h-3 w-3`}),f(`console.objectView.noEligibleFieldForType`)]})]},e.key)})}),(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsxs)(`label`,{htmlFor:`create-view-name-input`,className:`text-xs font-medium`,children:[f(`console.objectView.title`),(0,j.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),(0,j.jsx)(y,{id:`create-view-name-input`,"data-testid":`create-view-name-input`,autoFocus:!0,value:T,onChange:e=>{E(e.target.value),k(!0)},onKeyDown:e=>{e.key===`Enter`&&G&&K()},placeholder:f(`console.objectView.newView`),className:`h-9`}),U&&(0,j.jsx)(`p`,{className:`text-[11px] text-destructive`,"data-testid":`create-view-error-duplicate`,children:f(`console.objectView.duplicateViewName`)})]}),(0,j.jsxs)(c,{className:`mt-2`,children:[(0,j.jsx)(a,{type:`button`,variant:`outline`,onClick:()=>t(!1),"data-testid":`create-view-cancel`,children:f(`console.objectView.cancel`)}),(0,j.jsx)(a,{type:`button`,disabled:!G,onClick:K,"data-testid":`create-view-submit`,children:f(`console.objectView.create`)})]})]})})}export{M as n,I as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{m as n,r,y as i}from"./vendor-react-BGDDiZfJ.js";import{E as a,L as o,R as s,l as c}from"./framework-CWU64Lvg.js";import{$a as l,Cr as u,Fc as d,Gn as f,Jn as p,K as m,Kn as h,X as g,Xn as _,Yn as v,q as y,qn as b}from"./ui-components-DHIW7RSX.js";import{r as x}from"./vendor-ui-utils-BzQBRdq3.js";import"./AdapterProvider-cnK1q1oP.js";import{n as S}from"./plugin-form-QFhBvb96.js";import"./MetadataProvider-C8ABa_gQ.js";import{r as C}from"./ExpressionProvider-D94jBDAc.js";import{t as w}from"./utils-Bixzg6Bz.js";import{n as T,r as E,t as D}from"./MetadataInspector-YoFTAkMA.js";import{n as O}from"./skeletons-ySdMMgAT.js";import{n as k}from"./plugin-dashboard-N2kUovsm.js";import{t as A}from"./useOpenRecordList-B3tjtz1e.js";var j=t({DashboardView:()=>P}),M=e(i(),1),N=r();function P({dataSource:e}){let t=A(),{dashboardName:r}=n(),{showDebug:i}=T(),j=o(),{t:P}=c(),{dashboardLabel:F,dashboardDescription:I}=d(),[L,R]=(0,M.useState)(!0),[z,B]=(0,M.useState)(null),V=(0,M.useCallback)(e=>{B(t=>(t&&t.resolve(e),null))},[]),H=(0,M.useCallback)(e=>new Promise(t=>{let n;if(typeof e==`string`){let t=e.match(/^(create|new|add|edit|update)_(.+)$/);if(t){let e=t[1];n={objectName:t[2],mode:e===`edit`||e===`update`?`edit`:`create`}}else n={objectName:e,mode:`create`}}else n=e;B({schema:n,resolve:t})}),[]),U=(0,M.useMemo)(()=>({export_dashboard_pdf:async()=>{x.info(P(`dashboardActions.pdfPreparing`));try{return window.print(),{success:!0}}catch(e){return x.error(P(`dashboardActions.exportFailed`,{message:e?.message||String(e)})),{success:!1,error:e?.message||String(e)}}},forecast_dashboard:async()=>(x.info(P(`dashboardActions.forecastSoon`)),{success:!0})}),[P]);(0,M.useEffect)(()=>{R(!0),queueMicrotask(()=>R(!1))},[r]);let{dashboards:W,objects:G}=s(),{app:K}=C(),q=E(W,r,K?._packageId),J=(0,M.useMemo)(()=>new Set((G||[]).map(e=>e?.name).filter(Boolean)),[G]),Y=(0,M.useMemo)(()=>{if(!q||J.size===0)return q;let e=q.widgets;if(!Array.isArray(e)||e.length===0)return q;let t=e.filter(e=>{let t=e?.requiresObject??e?.object;return t?J.has(t):!0});return t.length===e.length?q:{...q,widgets:t}},[q,J]);return L?(0,N.jsx)(O,{}):q?(0,N.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden bg-background`,children:[(0,N.jsx)(`div`,{className:`flex flex-col sm:flex-row justify-between sm:items-center gap-3 sm:gap-4 p-4 sm:p-6 border-b shrink-0`,children:(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(()=>{let e=w((Y||q).title,P),t=w(q.label,P),n=F({name:q.name,label:t});return(0,N.jsx)(`h1`,{className:`text-lg sm:text-xl md:text-2xl font-bold tracking-tight truncate`,children:e||n||q.name})})(),(()=>{let e=(Y||q).description??q.description,t=I({name:q.name,description:w(e,P)});return t?(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1 line-clamp-2`,children:t}):null})()]})}),(0,N.jsxs)(`div`,{className:`flex-1 overflow-hidden flex flex-col sm:flex-row relative`,children:[(0,N.jsx)(`div`,{className:`flex-1 min-w-0 overflow-auto p-2 sm:p-4 md:p-6`,children:(0,N.jsx)(a,{value:{openRecordList:t},children:(0,N.jsx)(k,{schema:Y,dataSource:e,modalHandler:H,scriptHandlers:U,hideHeaderText:!0})})}),(0,N.jsx)(D,{open:i,sections:[{title:`Dashboard Configuration`,data:Y}]})]}),z&&z.schema?.objectName?(0,N.jsx)(S,{schema:{type:`object-form`,formType:`modal`,objectName:z.schema.objectName,mode:z.schema.mode||`create`,recordId:z.schema.recordId,title:z.schema.title,description:z.schema.description,fields:z.schema.fields,open:!0,onOpenChange:e=>{e||V({success:!1})},onSuccess:e=>{V({success:!0,reload:!0,data:e})},onCancel:()=>{V({success:!1})},showSubmit:!0,showCancel:!0},dataSource:j}):z?(0,N.jsx)(f,{open:!0,onOpenChange:e=>{e||V({success:!1})},children:(0,N.jsxs)(h,{children:[(0,N.jsxs)(v,{children:[(0,N.jsx)(_,{children:z.schema?.title||P(`actionDialog.defaultActionTitle`)}),z.schema?.description&&(0,N.jsx)(b,{children:z.schema.description})]}),(0,N.jsxs)(p,{children:[(0,N.jsx)(u,{variant:`outline`,onClick:()=>V({success:!1}),children:P(`actionDialog.cancel`)}),(0,N.jsx)(u,{onClick:()=>V({success:!0}),children:P(`actionDialog.ok`)})]})]})}):null]}):(0,N.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,children:(0,N.jsxs)(m,{children:[(0,N.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted`,children:(0,N.jsx)(l,{className:`h-6 w-6 text-muted-foreground`})}),(0,N.jsx)(g,{children:P(`empty.dashboardNotFound`)}),(0,N.jsx)(y,{children:P(`empty.dashboardNotFoundDescription`,{name:r})})]})})}export{j as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./vendor-react-BGDDiZfJ.js";import{Ei as t,It as n,Lt as r,Rt as i,Tc as a,Va as o,kc as s,ki as c,sr as l,zt as u}from"./ui-components-DHIW7RSX.js";var d=e(),f={config:{icon:c,short:`Admin config`,title:`Administrator configuration`,body:()=>`These rows define how the platform behaves at runtime. Author them here; the runtime data they produce lives in a separate table.`,tone:`border-sky-300/60 bg-sky-50 text-sky-900 hover:bg-sky-100 dark:border-sky-500/40 dark:bg-sky-950/40 dark:text-sky-100`},system:{icon:o,short:`System-managed`,title:`Managed by the platform`,body:()=>`Rows here are created automatically when actions run on the source record. The list below is a read-only monitoring surface — row-level actions (Approve, Recall, Resend, …) live on each row.`,tone:`border-slate-300/60 bg-slate-50 text-slate-900 hover:bg-slate-100 dark:border-slate-500/40 dark:bg-slate-950/40 dark:text-slate-100`},"append-only":{icon:a,short:`Read-only · Audit log`,title:`Read-only historical record`,body:()=>`Immutable audit log. Rows cannot be created, edited, or deleted from the UI — they're written by the platform when events occur. Use Export to download for compliance review.`,tone:`border-zinc-300/60 bg-zinc-50 text-zinc-900 hover:bg-zinc-100 dark:border-zinc-500/40 dark:bg-zinc-950/40 dark:text-zinc-100`},"better-auth":{icon:t,short:`Identity`,title:`Managed by the identity provider`,body:e=>`This object's schema is owned by ${e}. Direct edits bypass password hashing, session validation, two-factor checks, and audit hooks. Manage these records through your authentication provider's sign-in, invitation, and security flows instead.`,tone:`border-amber-300/60 bg-amber-50 text-amber-900 hover:bg-amber-100 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-100`}};function p({managedBy:e,label:t,className:a}){if(!e||e===`platform`)return null;let o=f[e];if(!o)return null;let c=o.icon,p=t??`better-auth`;return(0,d.jsx)(i,{delayDuration:200,children:(0,d.jsxs)(n,{children:[(0,d.jsx)(u,{asChild:!0,children:(0,d.jsxs)(l,{variant:`outline`,"data-testid":`managed-by-badge`,"data-bucket":e,className:s(`gap-1 font-normal text-[11px] leading-none py-0.5 px-1.5 cursor-help`,o.tone,a),children:[(0,d.jsx)(c,{className:`h-3 w-3`,"aria-hidden":`true`}),(0,d.jsx)(`span`,{children:o.short})]})}),(0,d.jsxs)(r,{side:`bottom`,align:`start`,className:`max-w-xs text-xs leading-relaxed`,children:[(0,d.jsx)(`p`,{className:`font-semibold mb-1`,children:o.title}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:o.body(p)})]})]})})}export{p as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e,m as t,r as n}from"./vendor-react-BGDDiZfJ.js";import{l as r}from"./framework-CWU64Lvg.js";import{Cr as i,Va as a,nr as o,tr as s}from"./ui-components-DHIW7RSX.js";var c=n();function l(){let n=e(),{appName:l}=t(),{t:u}=r(),d=l?`/apps/${l}`:`/`;return(0,c.jsx)(`div`,{className:`container mx-auto max-w-2xl px-6 py-16`,children:(0,c.jsx)(s,{children:(0,c.jsxs)(o,{className:`flex flex-col items-center gap-4 py-12 text-center`,children:[(0,c.jsx)(`div`,{className:`rounded-full bg-muted p-3`,children:(0,c.jsx)(a,{className:`h-6 w-6 text-muted-foreground`})}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`h2`,{className:`text-lg font-semibold`,children:u(`marketplace.accessDenied.title`)}),(0,c.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:u(`marketplace.accessDenied.description`)})]}),(0,c.jsx)(i,{variant:`outline`,onClick:()=>n(d),children:u(`marketplace.action.backHome`)})]})})})}export{l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{f as n,m as r,r as i,y as a}from"./vendor-react-BGDDiZfJ.js";import{d as o}from"./infrastructure-DexdbqHf.js";import{Kt as s,l as c}from"./framework-CWU64Lvg.js";import{Bt as l,Cc as u,Cr as d,Gi as f,Ps as p,Yo as m,Yr as h,ar as g,ci as _,ir as v,nr as y,sr as b,tr as x}from"./ui-components-DHIW7RSX.js";import{_ as S,l as C,u as w}from"./marketplaceApi-1mMRJWDq.js";import{t as T}from"./MarketplaceAccessDenied-DuO_FDoh.js";var E=e(a(),1),D=i();function O(){let e=n(),{appName:t}=r(),i=o(),{t:a,language:s}=c(),u=t?`/apps/${t}`:``,[_,O]=(0,E.useState)([]),[k,A]=(0,E.useState)(`local`),[j,M]=(0,E.useState)(!0),[N,P]=(0,E.useState)(null),[F,I]=(0,E.useState)(null),L=async()=>{M(!0);try{let e=await C();e.connected?(A(`cloud`),O(e.items)):(A(`local`),O(await w()))}finally{M(!1)}};(0,E.useEffect)(()=>{L()},[]);let R=async e=>{if(confirm(a(`marketplace.uninstall.confirm`,{manifestId:e.manifestId,version:e.version}))){P(e.manifestId),I(null);try{await S(e.manifestId),I({ok:!0,message:a(`marketplace.uninstall.successInList`,{manifestId:e.manifestId})}),await L()}catch(e){I({ok:!1,message:e?.message??String(e)})}finally{P(null)}}};return i?(0,D.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,D.jsx)(`div`,{className:`flex justify-end`,children:(0,D.jsxs)(d,{variant:`outline`,size:`sm`,onClick:()=>void L(),disabled:j,children:[(0,D.jsx)(f,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),a(`marketplace.refresh`)]})}),F&&(0,D.jsx)(`div`,{className:`rounded-md border p-3 text-sm ${F.ok?`border-green-500/30 bg-green-500/5 text-green-700 dark:text-green-400`:`border-destructive/30 bg-destructive/5 text-destructive`}`,children:(0,D.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,D.jsx)(p,{className:`h-4 w-4 mt-0.5 shrink-0`,"aria-hidden":`true`}),(0,D.jsx)(`div`,{children:F.message})]})}),j&&_.length===0?(0,D.jsx)(`div`,{className:`grid gap-3`,children:Array.from({length:3}).map((e,t)=>(0,D.jsx)(l,{className:`h-20 w-full`},t))}):_.length===0?(0,D.jsxs)(`div`,{className:`text-center py-12 text-sm text-muted-foreground border rounded-md`,children:[(0,D.jsx)(`p`,{children:a(`marketplace.installedEmpty`)}),(0,D.jsx)(d,{variant:`link`,className:`mt-2`,onClick:()=>e(`${u}/system/marketplace`),children:a(`marketplace.browseLink`)})]}):(0,D.jsx)(`div`,{className:`grid gap-3`,children:_.map(t=>(0,D.jsxs)(x,{children:[(0,D.jsxs)(v,{className:`flex flex-row items-start justify-between gap-3 pb-2`,children:[(0,D.jsxs)(`div`,{className:`min-w-0`,children:[(0,D.jsxs)(g,{className:`text-base truncate flex items-center gap-2`,children:[t.manifestId,(0,D.jsx)(b,{variant:`outline`,children:a(`marketplace.versionBadge`,{version:t.version})})]}),(0,D.jsxs)(`div`,{className:`text-xs text-muted-foreground mt-1 flex flex-wrap gap-x-3 gap-y-1`,children:[(0,D.jsx)(`span`,{children:a(`marketplace.installedAt`,{when:new Date(t.installedAt).toLocaleString(s||void 0)})}),t.installedBy&&(0,D.jsx)(`span`,{children:a(`marketplace.installedBy`,{user:t.installedBy})}),(0,D.jsxs)(`span`,{children:[a(`marketplace.installedPackageId`),` `,(0,D.jsx)(`code`,{className:`font-mono`,children:t.packageId})]})]})]}),(0,D.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,D.jsxs)(d,{variant:`ghost`,size:`sm`,onClick:()=>e(`${u}/system/marketplace/${t.packageId}`),children:[(0,D.jsx)(m,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),a(`marketplace.action.details`)]}),k===`local`&&(0,D.jsxs)(d,{variant:`outline`,size:`sm`,onClick:()=>void R(t),disabled:N===t.manifestId,children:[(0,D.jsx)(h,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),N===t.manifestId?a(`marketplace.action.uninstalling`):a(`marketplace.action.uninstall`)]})]})]}),k===`local`&&(0,D.jsx)(y,{className:`pt-0 text-xs text-muted-foreground`,dangerouslySetInnerHTML:{__html:a(`marketplace.cachedAs`,{path:`.objectstack/installed-packages/${t.manifestId.replace(/[^a-zA-Z0-9._-]/g,`_`)}.json`})}})]},t.manifestId))}),(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground border-t pt-4`,dangerouslySetInnerHTML:{__html:a(`marketplace.installedAdditiveNote`)}})]}):(0,D.jsx)(T,{})}s.register(`marketplace:installed-list`,()=>(0,D.jsx)(O,{}),{namespace:`app-shell`,label:`Installed Marketplace Packages`,category:`plugin`,inputs:[]});var k=t({MarketplaceInstalledPage:()=>A});function A(){let e=n(),{appName:t}=r(),{t:i}=c(),a=t?`/apps/${t}`:``;return(0,D.jsxs)(`div`,{className:`flex flex-col gap-6 p-4 sm:p-6 max-w-5xl`,children:[(0,D.jsxs)(d,{variant:`ghost`,size:`sm`,className:`self-start`,onClick:()=>e(`${a}/system/marketplace`),children:[(0,D.jsx)(u,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),i(`marketplace.back`)]}),(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(_,{className:`h-6 w-6 text-primary`,"aria-hidden":`true`}),(0,D.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight`,children:i(`marketplace.installedTitle`)})]}),(0,D.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,dangerouslySetInnerHTML:{__html:i(`marketplace.installedSubtitle`)}})]}),(0,D.jsx)(O,{})]})}export{k as t};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{f as n,m as r,r as i,y as a}from"./vendor-react-BGDDiZfJ.js";import{d as o,h as s}from"./infrastructure-DexdbqHf.js";import{R as c,l}from"./framework-CWU64Lvg.js";import{$o as ee,Bt as u,Cc as te,Cn as ne,Cr as d,Ei as re,Gn as ie,Ha as f,Jn as ae,Jt as oe,Kn as se,Ns as ce,Oo as le,Pr as ue,Ps as p,Qt as de,Ti as m,Xn as fe,Xo as pe,Xt as me,Yn as he,Yo as ge,Yr as _e,Yt as ve,Zt as ye,_n as h,ar as be,ds as g,er as xe,hn as Se,ir as Ce,js as _,kc as we,mn as Te,nr as Ee,oc as De,pn as v,qn as Oe,rs as ke,sr as y,tr as Ae,wi as b,xa as x,ya as je}from"./ui-components-DHIW7RSX.js";import{r as S}from"./vendor-ui-utils-BzQBRdq3.js";import"./MetadataProvider-C8ABa_gQ.js";import{n as Me}from"./assistantBus-BFk4fCbM.js";import{E as C,_ as Ne,a as Pe,c as Fe,g as Ie,h as Le,i as Re,m as ze,o as Be,p as Ve,r as He,s as Ue,t as We,u as Ge}from"./marketplaceApi-1mMRJWDq.js";import{n as Ke,t as qe}from"./usePackageL10n-CiFMHfKe.js";import{t as Je}from"./MarketplaceAccessDenied-DuO_FDoh.js";var w=e(a(),1),T=i();function Ye(e){let t=e.replace(/\r\n/g,`
|
|
2
|
-
`).split(`
|
|
3
|
-
`),n=[],r=0;for(;r<t.length;){let e=t[r];if(e.startsWith("```")){let i=e.slice(3).trim();r++;let a=[];for(;r<t.length&&!t[r].startsWith("```");)a.push(t[r]),r++;r++,n.push({type:`code`,text:a.join(`
|
|
4
|
-
`),lang:i});continue}let i=/^(#{1,3})\s+(.*)$/.exec(e);if(i){let e=i[1].length;n.push({type:`h${e}`,text:i[2].trim()}),r++;continue}if(/^[-*]\s+/.test(e)){let e=[];for(;r<t.length&&/^[-*]\s+/.test(t[r]);)e.push(t[r].replace(/^[-*]\s+/,``)),r++;n.push({type:`ul`,items:e});continue}if(/^\d+\.\s+/.test(e)){let e=[];for(;r<t.length&&/^\d+\.\s+/.test(t[r]);)e.push(t[r].replace(/^\d+\.\s+/,``)),r++;n.push({type:`ol`,items:e});continue}if(!e.trim()){r++;continue}let a=[];for(;r<t.length&&t[r].trim()&&!/^#{1,3}\s+/.test(t[r])&&!/^[-*]\s+/.test(t[r])&&!/^\d+\.\s+/.test(t[r])&&!t[r].startsWith("```");)a.push(t[r]),r++;n.push({type:`p`,text:a.join(` `)})}return n}function E(e){let t=[],n=e,r=0,i=[{re:/`([^`]+)`/,render:e=>(0,T.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-[0.85em]`,children:e[1]},`k${r++}`)},{re:/\*\*([^*]+)\*\*/,render:e=>(0,T.jsx)(`strong`,{className:`font-semibold text-foreground`,children:e[1]},`k${r++}`)},{re:/\*([^*]+)\*/,render:e=>(0,T.jsx)(`em`,{children:e[1]},`k${r++}`)},{re:/\[([^\]]+)\]\(([^)]+)\)/,render:e=>(0,T.jsx)(`a`,{href:e[2],target:`_blank`,rel:`noopener noreferrer`,className:`text-violet-600 underline-offset-2 hover:underline dark:text-violet-400`,children:e[1]},`k${r++}`)}];for(;n;){let e=-1,r=null,a=null;for(let t of i){let i=t.re.exec(n);i&&(e===-1||i.index<e)&&(e=i.index,r=i,a=t)}if(!r||!a){t.push(n);break}e>0&&t.push(n.slice(0,e)),t.push(a.render(r)),n=n.slice(e+r[0].length)}return(0,T.jsx)(T.Fragment,{children:t.map((e,t)=>(0,T.jsx)(w.Fragment,{children:e},t))})}function Xe({source:e,className:t}){let n=Ye(e);return(0,T.jsx)(`div`,{className:`flex flex-col gap-4 text-sm leading-relaxed text-foreground/90 ${t??``}`,children:n.map((e,t)=>{switch(e.type){case`h1`:return(0,T.jsx)(`h2`,{className:`mt-2 text-xl font-bold tracking-tight`,children:E(e.text??``)},t);case`h2`:return(0,T.jsx)(`h3`,{className:`mt-3 text-base font-semibold tracking-tight`,children:E(e.text??``)},t);case`h3`:return(0,T.jsx)(`h4`,{className:`mt-2 text-sm font-semibold tracking-tight text-foreground/80`,children:E(e.text??``)},t);case`p`:return(0,T.jsx)(`p`,{children:E(e.text??``)},t);case`ul`:return(0,T.jsx)(`ul`,{className:`ml-1 flex list-none flex-col gap-1.5`,children:(e.items??[]).map((e,t)=>(0,T.jsxs)(`li`,{className:`flex gap-2`,children:[(0,T.jsx)(`span`,{"aria-hidden":`true`,className:`mt-1.5 inline-block h-1.5 w-1.5 shrink-0 rounded-full bg-violet-500/70`}),(0,T.jsx)(`span`,{children:E(e)})]},t))},t);case`ol`:return(0,T.jsx)(`ol`,{className:`ml-5 flex list-decimal flex-col gap-1.5 marker:text-muted-foreground`,children:(e.items??[]).map((e,t)=>(0,T.jsx)(`li`,{className:`pl-1`,children:E(e)},t))},t);case`code`:return(0,T.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border bg-muted/40 p-3 text-xs leading-relaxed`,children:(0,T.jsx)(`code`,{className:`font-mono`,children:e.text})},t)}return null})})}var Ze={node:`In-process · full trust`,sandbox:`Sandboxed`,worker:`Out-of-process`};function D({icon:e,label:t,items:n}){return!n||n.length===0?null:(0,T.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,T.jsx)(e,{className:`h-3.5 w-3.5 mt-0.5 text-muted-foreground shrink-0`,"aria-hidden":`true`}),(0,T.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,T.jsx)(`div`,{className:`text-xs font-medium`,children:t}),(0,T.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-0.5`,children:n.map(e=>(0,T.jsx)(`code`,{className:`font-mono text-[11px] px-1 py-0.5 rounded bg-muted break-all`,children:e},e))})]})]})}function Qe({version:e}){let{t}=l();if(!e?.contains_code)return null;let n=e.permissions??{},r=(n.services?.length??0)+(n.hooks?.length??0)+(n.network?.length??0)+(n.fs?.length??0)>0;return(0,T.jsxs)(`div`,{className:`rounded-md border border-amber-500/30 bg-amber-500/5 p-3 space-y-3 text-sm`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,T.jsx)(g,{className:`h-4 w-4 text-amber-600 shrink-0`,"aria-hidden":`true`}),t(`marketplace.disclosure.containsCode`,{defaultValue:`This package contains code`})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[e.runtime&&(0,T.jsx)(y,{variant:`outline`,children:t(`marketplace.disclosure.runtime.${e.runtime}`,{defaultValue:Ze[e.runtime]??e.runtime})}),e.platform_verified?(0,T.jsxs)(y,{variant:`outline`,className:`gap-1 border-green-500/40 text-green-700 dark:text-green-400`,children:[(0,T.jsx)(m,{className:`h-3 w-3`,"aria-hidden":`true`}),t(`marketplace.disclosure.reviewed`,{defaultValue:`Reviewed & approved`})]}):(0,T.jsxs)(y,{variant:`outline`,className:`gap-1 border-amber-500/40 text-amber-700 dark:text-amber-400`,children:[(0,T.jsx)(re,{className:`h-3 w-3`,"aria-hidden":`true`}),t(`marketplace.disclosure.unreviewed`,{defaultValue:`Not yet reviewed`})]}),e.signed&&(0,T.jsxs)(y,{variant:`outline`,className:`gap-1`,children:[(0,T.jsx)(_,{className:`h-3 w-3`,"aria-hidden":`true`}),t(`marketplace.disclosure.signed`,{defaultValue:`Signed`})]})]}),r?(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:t(`marketplace.disclosure.grantsIntro`,{defaultValue:`On install, this package will be granted:`})}),(0,T.jsx)(D,{icon:De,label:t(`marketplace.disclosure.services`,{defaultValue:`Platform services`}),items:n.services??void 0}),(0,T.jsx)(D,{icon:ue,label:t(`marketplace.disclosure.hooks`,{defaultValue:`Lifecycle hooks`}),items:n.hooks??void 0}),(0,T.jsx)(D,{icon:x,label:t(`marketplace.disclosure.network`,{defaultValue:`Network access`}),items:n.network??void 0}),(0,T.jsx)(D,{icon:le,label:t(`marketplace.disclosure.fs`,{defaultValue:`Filesystem access`}),items:n.fs??void 0})]}):(0,T.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:t(`marketplace.disclosure.noPermissions`,{defaultValue:`Requests no special permissions.`})})]})}var O=`${``.replace(/\/$/,``)}/api/v1/security/suggested-bindings`;function k(e={}){let t={Accept:`application/json`,...e},n=s.get();return n?{...t,Authorization:`Bearer ${n}`}:t}async function A(e){let t=null;try{t=await e.json()}catch{}if(!e.ok){let n=t?.error?.code??`HTTP_${e.status}`,r=t?.error?.message??t?.error??e.statusText,i=Error(typeof r==`string`?r:String(n));throw i.code=n,i.status=e.status,i}return t?.data??t}async function j(e={}){let t=new URLSearchParams;e.status&&t.set(`status`,e.status),e.packageId&&t.set(`packageId`,e.packageId);let n=t.toString(),r=await A(await fetch(`${O}${n?`?${n}`:``}`,{credentials:`include`,headers:k()}));return Array.isArray(r?.suggestions)?r.suggestions:[]}async function M(e){return(await A(await fetch(`${O}/${encodeURIComponent(e)}/confirm`,{method:`POST`,credentials:`include`,headers:k({"Content-Type":`application/json`})})))?.suggestion}async function N(e){return(await A(await fetch(`${O}/${encodeURIComponent(e)}/dismiss`,{method:`POST`,credentials:`include`,headers:k({"Content-Type":`application/json`})})))?.suggestion}function P({packageId:e,strings:t,className:n,onResolved:r}){let[i,a]=(0,w.useState)([]),[o,s]=(0,w.useState)(null),c=(0,w.useCallback)(()=>{let t=!1;return j({status:`pending`,...e?{packageId:e}:{}}).then(e=>{t||a(e)}).catch(()=>{}),()=>{t=!0}},[e]);(0,w.useEffect)(()=>c(),[c]);let l=async(e,n)=>{s(e.id);try{let i=n===`confirm`?await M(e.id):await N(e.id);a(t=>t.filter(t=>t.id!==e.id)),S.success(n===`confirm`?t.confirmedToast(e):t.dismissedToast(e)),r?.(i??e)}catch(e){S.error(e?.message??String(e))}finally{s(null)}};return i.length===0?null:(0,T.jsx)(`div`,{"data-testid":`suggested-bindings-panel`,className:we(`rounded-lg border border-amber-300/60 dark:border-amber-700/50 bg-amber-50 dark:bg-amber-950/30 px-3 py-2 space-y-2`,n),children:i.map(e=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(b,{className:`h-4 w-4 shrink-0 text-amber-600 dark:text-amber-400`}),(0,T.jsx)(`p`,{className:`flex-1 min-w-0 text-sm text-amber-900 dark:text-amber-200`,children:t.describe(e)}),(0,T.jsx)(d,{size:`sm`,disabled:o===e.id,onClick:()=>l(e,`confirm`),"data-testid":`suggested-binding-confirm-${e.permission_set_name}`,children:o===e.id?t.confirming:t.confirm}),(0,T.jsx)(d,{size:`sm`,variant:`ghost`,disabled:o===e.id,onClick:()=>l(e,`dismiss`),"data-testid":`suggested-binding-dismiss-${e.permission_set_name}`,children:t.dismiss})]},e.id))})}var $e=t({MarketplacePackagePage:()=>F});function F(){let e=n(),{packageId:t,appName:i}=r(),a=o(),{t:s,language:re}=l(),le={describe:e=>s(e.anchor===`guest`?`marketplace.suggestedBindings.promptGuest`:`marketplace.suggestedBindings.promptEveryone`,{set:e.permission_set_name}),confirm:s(`marketplace.suggestedBindings.confirm`),confirming:s(`marketplace.suggestedBindings.confirming`),dismiss:s(`marketplace.suggestedBindings.dismiss`),confirmedToast:e=>s(`marketplace.suggestedBindings.confirmedToast`,{set:e.permission_set_name,anchor:e.anchor}),dismissedToast:e=>s(`marketplace.suggestedBindings.dismissedToast`,{set:e.permission_set_name})},ue=i?`/apps/${i}`:``,{refresh:m}=c(),[g,we]=(0,w.useState)(null),[De,b]=(0,w.useState)(!0),[x,S]=(0,w.useState)(null),[Ye,E]=(0,w.useState)(!1),[Ze,D]=(0,w.useState)([]),[O,k]=(0,w.useState)(!1),[A,j]=(0,w.useState)(null),[M,N]=(0,w.useState)(``),[$e,F]=(0,w.useState)({}),[I,et]=(0,w.useState)(!1),[tt,nt]=(0,w.useState)(!1),[L,rt]=(0,w.useState)(!1),[R,z]=(0,w.useState)(null),[B,it]=(0,w.useState)(null),[V,H]=(0,w.useState)(null),[U,W]=(0,w.useState)(null),[G,K]=(0,w.useState)(null),[at,ot]=(0,w.useState)([]),[st,q]=(0,w.useState)(!1),[J,Y]=(0,w.useState)(null);(0,w.useEffect)(()=>{if(!C().features.installLocal)return;let e=!1;return(async()=>{let t=await Ge();e||ot(t)})(),()=>{e=!0}},[t,J]),(0,w.useEffect)(()=>{if(!t)return;let e=C().defaultEnvironmentId??``,n=!1;return(async()=>{let r=await He(t,e);n||!r||(H(r),it(r.version))})(),()=>{n=!0}},[t]),(0,w.useEffect)(()=>{let e=!1;return(async()=>{if(t){b(!0),S(null);try{let n=await Re(t);e||we(n)}catch(t){e||S(t?.message??String(t))}finally{e||b(!1)}}})(),()=>{e=!0}},[t]);let ct=async()=>{E(!0),z(null),j(null);let e=C().defaultEnvironmentId;if(e){k(!1),N(e),D([]);return}k(!0);try{let[e,n]=await Promise.all([Ue(),Fe()]),r=e.filter(e=>{let t=e.organization_id;return t?n.has(String(t)):!1});D(r),F({});let i=t;i&&Promise.all(r.map(async e=>{try{let t=await He(i,e.id);return t?[e.id,t.version]:null}catch{return null}})).then(e=>{let t={};for(let n of e)n&&(t[n[0]]=n[1]);F(t)}),e.length>0&&r.length===0?j(s(`marketplace.install.noPermission`)):r.length===1&&N(r[0].id)}catch(e){let t=e?.status;j(t===401||t===403?s(`marketplace.install.signInFirst`):e?.message??String(e))}finally{k(!1)}},lt=async()=>{if(!(!t||!M)){rt(!0),z(null);try{let e=(await Be({packageId:t,environmentId:M,seedSampleData:I}))?.installation?.version??g?.package?.latest_version?.version??g?.versions?.[0]?.version??``;it(e||`installed`);try{let e=C().defaultEnvironmentId||M;if(e){let n=await He(t,e);n&&H(n)}}catch{}let n=C().defaultEnvironmentId;if(!n||n===M)try{if(typeof sessionStorage<`u`)for(let e of Object.keys(sessionStorage))e.startsWith(`objectui:metadata:`)&&sessionStorage.removeItem(e);await m()}catch{}z({ok:!0,message:s(`marketplace.install.success`)}),Me()}catch(e){z({ok:!1,message:e?.message??String(e)})}finally{rt(!1)}}},ut=async()=>{if(t){q(!0),Y(null);try{let e=await Pe({packageId:t});try{await m(`app`)}catch{}Y({ok:!0,message:s(`marketplace.install.localSuccess`,{version:e.version,name:g?.package?qe(g.package,re).displayName:e.manifestId})}),Me()}catch(e){let t=e?.code,n=e?.message??String(e);t===`manifest_conflict`?n=s(`marketplace.install.localManifestConflict`,{message:n}):t===`unauthorized`?n=s(`marketplace.install.localUnauthorized`):t===`marketplace_unavailable`&&(n=s(`marketplace.install.localMarketplaceUnavailable`)),Y({ok:!1,message:n})}finally{q(!1)}}},dt=async()=>{if($&&confirm(s(`marketplace.uninstall.confirm`,{manifestId:$.manifestId,version:$.version}))){q(!0),Y(null);try{await Ne($.manifestId);try{await m(`app`)}catch{}Y({ok:!0,message:s(`marketplace.uninstall.successInDetail`,{manifestId:$.manifestId})})}catch(e){Y({ok:!1,message:e?.message??String(e)})}finally{q(!1)}}},ft=async()=>{if(V){W(`reseed`),K(null);try{let e=await Ie(V.installationId);e.ok?(H({...V,withSampleData:!0}),K({ok:!0,text:s(`marketplace.detail.reseedQueued`)||`Sample data will be re-seeded on next environment access.`})):K({ok:!1,text:e.error||`Re-seed failed`})}finally{W(null)}}},pt=async()=>{if(V&&confirm(s(`marketplace.detail.purgeConfirm`)||`Delete all sample records seeded by this package? User-added records will NOT be touched.`)){W(`purge`),K(null);try{let e=await ze(V.installationId);if(e.ok){H({...V,withSampleData:!1});let t=e.deleted??0;K({ok:!0,text:t>0?s(`marketplace.detail.purgeSuccess`,{count:t})||`Removed ${t} sample record(s).`:s(`marketplace.detail.purgeNoData`)||`No sample records found to purge.`})}else K({ok:!1,text:e.error||`Purge failed`})}finally{W(null)}}},mt=async()=>{if($){W(`reseed`),K(null);try{let e=await Le($.manifestId);ot(e=>e.map(e=>e.manifestId===$.manifestId?{...e,withSampleData:!0}:e));let t=e.inserted??0,n=e.updated??0,r=e.errors??0,i=s(`marketplace.detail.reseedLocalSuccess`,{inserted:t,updated:n})||`Sample data re-seeded (inserted=${t}, updated=${n}).`;K(r>0?{ok:!1,text:`${i} ${s(`marketplace.detail.reseedPartialErrors`,{count:r})||`(${r} record(s) failed to write)`}`}:{ok:!0,text:i})}catch(e){K({ok:!1,text:e?.message||`Re-seed failed`})}finally{W(null)}}},ht=async()=>{if($&&confirm(s(`marketplace.detail.purgeConfirm`)||`Delete all sample records seeded by this package? User-added records will NOT be touched.`)){W(`purge`),K(null);try{let e=await Ve($.manifestId);ot(e=>e.map(e=>e.manifestId===$.manifestId?{...e,withSampleData:!1}:e));let t=e.deleted??0;K({ok:!0,text:t>0?s(`marketplace.detail.purgeSuccess`,{count:t})||`Removed ${t} sample record(s).`:s(`marketplace.detail.purgeNoData`)||`No sample records found to purge.`})}catch(e){K({ok:!1,text:e?.message||`Purge failed`})}finally{W(null)}}};if(De)return(0,T.jsxs)(`div`,{className:`mx-auto w-full max-w-6xl flex flex-col gap-6 p-4 sm:p-6`,children:[(0,T.jsx)(u,{className:`h-8 w-32`}),(0,T.jsx)(u,{className:`h-16 w-full`}),(0,T.jsx)(u,{className:`h-64 w-full`})]});if(x||!g)return(0,T.jsxs)(`div`,{className:`mx-auto w-full max-w-6xl flex flex-col gap-6 p-4 sm:p-6`,children:[(0,T.jsxs)(d,{variant:`ghost`,size:`sm`,onClick:()=>e(`${ue}/system/marketplace`),children:[(0,T.jsx)(te,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),s(`marketplace.back`)]}),(0,T.jsxs)(`div`,{className:`flex items-start gap-3 rounded-md border border-destructive/30 bg-destructive/5 p-4 text-sm`,children:[(0,T.jsx)(p,{className:`h-4 w-4 mt-0.5 text-destructive`,"aria-hidden":`true`}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`font-medium text-destructive`,children:s(`marketplace.load.packageFailed`)}),(0,T.jsx)(`div`,{className:`text-muted-foreground mt-1`,children:x??s(`marketplace.load.notFound`)})]})]})]});let X=g.package,Z=qe(X,re),Q=X.latest_version?.version??g.versions[0]?.version??null,$=at.find(e=>e.manifestId===X.manifest_id)??null,gt=!!X.latest_version?.contains_code,_t=!!B&&B!==`installed`&&!!Q&&B!==Q,vt=C().features.installLocal,yt=!Q||st||L||!vt&&!!B&&!_t,bt=vt?{label:s(st?`marketplace.action.working`:$?`marketplace.action.reinstall`:`marketplace.action.install`),onClick:ut}:{label:L?s(`marketplace.action.installing`):B?_t?s(`marketplace.action.updateTo`,{defaultValue:`Update`,version:Q}):s(`marketplace.action.installed`,{defaultValue:`Installed`}):s(`marketplace.action.installToCloud`),onClick:ct},xt=X.category?s(`marketplace.category.${X.category}`,{defaultValue:X.category}):null;return a?(0,T.jsxs)(`div`,{className:`mx-auto w-full max-w-6xl flex flex-col gap-6 p-4 sm:p-6`,children:[(0,T.jsxs)(d,{variant:`ghost`,size:`sm`,className:`self-start -ml-2 text-muted-foreground hover:text-foreground`,onClick:()=>e(`${ue}/system/marketplace`),children:[(0,T.jsx)(te,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),s(`marketplace.back`)]}),(0,T.jsxs)(`div`,{className:`flex items-start gap-5 flex-wrap sm:flex-nowrap rounded-2xl border bg-gradient-to-br from-primary/5 via-background to-background p-6 sm:p-8`,children:[(0,T.jsx)(Ke,{iconUrl:X.icon_url,displayName:Z.displayName,manifestId:X.manifest_id,className:`h-20 w-20 rounded-2xl shadow-sm ring-1 ring-border shrink-0`,initialClassName:`text-3xl font-bold`}),(0,T.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,T.jsx)(`h1`,{className:`text-2xl sm:text-3xl font-bold tracking-tight truncate`,children:Z.displayName||X.manifest_id}),X.homepage_url&&(0,T.jsxs)(`a`,{href:X.homepage_url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,title:s(`marketplace.detail.homepage`),children:[(0,T.jsx)(ge,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:`hidden sm:inline`,children:s(`marketplace.detail.homepage`)})]})]}),(0,T.jsxs)(`div`,{className:`text-sm text-muted-foreground mt-2 flex flex-wrap items-center gap-1.5`,children:[(0,T.jsx)(`code`,{className:`font-mono text-xs px-1.5 py-0.5 rounded bg-muted`,children:X.manifest_id}),Q&&(0,T.jsx)(y,{variant:`outline`,children:s(`marketplace.versionBadge`,{version:Q})}),X.publisher&&X.publisher!==`private`&&(0,T.jsx)(y,{variant:X.publisher===`objectstack`?`default`:`secondary`,children:X.publisher}),xt&&(0,T.jsx)(y,{variant:`outline`,children:xt}),X.license&&(0,T.jsx)(y,{variant:`outline`,className:`font-normal`,children:X.license}),$&&(0,T.jsxs)(y,{variant:`default`,className:`bg-green-600 hover:bg-green-600 gap-1`,children:[(0,T.jsx)(_,{className:`h-3 w-3`,"aria-hidden":`true`}),s(`marketplace.detail.installedV`,{version:$.version})]}),!$&&B&&(0,T.jsxs)(y,{variant:`default`,className:`bg-green-600 hover:bg-green-600 gap-1`,children:[(0,T.jsx)(_,{className:`h-3 w-3`,"aria-hidden":`true`}),s(`marketplace.detail.installedV`,{version:B})]}),_t&&(0,T.jsxs)(y,{variant:`default`,className:`bg-amber-500 hover:bg-amber-500 gap-1`,children:[(0,T.jsx)(ce,{className:`h-3 w-3`,"aria-hidden":`true`}),s(`marketplace.detail.updateAvailable`,{defaultValue:`Update available`}),` → v`,Q]})]}),Z.description&&(0,T.jsx)(`p`,{className:`text-sm sm:text-base text-foreground/80 mt-3 max-w-2xl leading-relaxed`,children:Z.description})]}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0 self-start`,children:[(0,T.jsxs)(d,{onClick:bt.onClick,disabled:yt,size:`lg`,className:`min-w-[8rem]`,children:[(0,T.jsx)(ee,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),bt.label]}),$&&(0,T.jsxs)(Te,{children:[(0,T.jsx)(ne,{asChild:!0,children:(0,T.jsx)(d,{variant:`outline`,size:`lg`,className:`px-2.5`,"aria-label":s(`marketplace.detail.moreOptions`),children:(0,T.jsx)(pe,{className:`h-4 w-4`,"aria-hidden":`true`})})}),(0,T.jsxs)(Se,{align:`end`,className:`w-56`,children:[(0,T.jsxs)(h,{onSelect:mt,disabled:U!==null,children:[U===`reseed`?(0,T.jsx)(f,{className:`h-4 w-4 mr-2 animate-spin`,"aria-hidden":`true`}):(0,T.jsx)(ke,{className:`h-4 w-4 mr-2`,"aria-hidden":`true`}),$.withSampleData?s(`marketplace.detail.reseedAgain`)||`Re-seed sample data`:s(`marketplace.detail.addSampleData`)||`Add sample data`]}),(0,T.jsxs)(h,{onSelect:ht,disabled:U!==null||!$.withSampleData,className:`text-destructive focus:text-destructive`,children:[U===`purge`?(0,T.jsx)(f,{className:`h-4 w-4 mr-2 animate-spin`,"aria-hidden":`true`}):(0,T.jsx)(_e,{className:`h-4 w-4 mr-2`,"aria-hidden":`true`}),s(`marketplace.detail.purgeSampleData`)||`Purge sample data`]}),(0,T.jsxs)(h,{onSelect:dt,disabled:st,className:`text-destructive focus:text-destructive`,children:[(0,T.jsx)(_e,{className:`h-4 w-4 mr-2`,"aria-hidden":`true`}),s(`marketplace.detail.uninstallFromRuntime`)]})]})]}),!$&&V&&!C().cloudUrl&&(0,T.jsxs)(Te,{children:[(0,T.jsx)(ne,{asChild:!0,children:(0,T.jsx)(d,{variant:`outline`,size:`lg`,className:`px-2.5`,"aria-label":s(`marketplace.detail.moreOptions`)||`More options`,children:(0,T.jsx)(pe,{className:`h-4 w-4`,"aria-hidden":`true`})})}),(0,T.jsxs)(Se,{align:`end`,className:`w-56`,children:[(0,T.jsxs)(h,{onSelect:ft,disabled:U!==null,children:[U===`reseed`?(0,T.jsx)(f,{className:`h-4 w-4 mr-2 animate-spin`,"aria-hidden":`true`}):(0,T.jsx)(ke,{className:`h-4 w-4 mr-2`,"aria-hidden":`true`}),V.withSampleData?s(`marketplace.detail.reseedAgain`)||`Re-seed sample data`:s(`marketplace.detail.addSampleData`)||`Add sample data`]}),(0,T.jsxs)(h,{onSelect:pt,disabled:U!==null||!V.withSampleData,className:`text-destructive focus:text-destructive`,children:[U===`purge`?(0,T.jsx)(f,{className:`h-4 w-4 mr-2 animate-spin`,"aria-hidden":`true`}):(0,T.jsx)(_e,{className:`h-4 w-4 mr-2`,"aria-hidden":`true`}),s(`marketplace.detail.purgeSampleData`)||`Purge sample data`]})]})]})]})]}),G&&(0,T.jsxs)(`div`,{role:`status`,className:`flex items-start gap-2 rounded-md border p-3 text-sm ${G.ok?`border-green-500/30 bg-green-500/5 text-green-700 dark:text-green-400`:`border-destructive/30 bg-destructive/5 text-destructive`}`,children:[G.ok?(0,T.jsx)(_,{className:`h-4 w-4 mt-0.5 shrink-0`,"aria-hidden":`true`}):(0,T.jsx)(p,{className:`h-4 w-4 mt-0.5 shrink-0`,"aria-hidden":`true`}),(0,T.jsx)(`div`,{className:`flex-1`,children:G.text}),(0,T.jsx)(`button`,{type:`button`,className:`text-xs underline opacity-60 hover:opacity-100`,onClick:()=>K(null),children:s(`marketplace.action.dismiss`)})]}),J&&(0,T.jsxs)(`div`,{role:`status`,className:`flex items-start gap-2 rounded-md border p-3 text-sm whitespace-pre-wrap ${J.ok?`border-green-500/30 bg-green-500/5 text-green-700 dark:text-green-400`:`border-destructive/30 bg-destructive/5 text-destructive`}`,children:[J.ok?(0,T.jsx)(_,{className:`h-4 w-4 mt-0.5 shrink-0`,"aria-hidden":`true`}):(0,T.jsx)(p,{className:`h-4 w-4 mt-0.5 shrink-0`,"aria-hidden":`true`}),(0,T.jsxs)(`div`,{className:`flex-1`,children:[J.message,J.ok&&(0,T.jsx)(P,{packageId:X.manifest_id,strings:le,className:`mt-2`})]}),(0,T.jsx)(`button`,{type:`button`,className:`text-xs underline opacity-60 hover:opacity-100`,onClick:()=>Y(null),children:s(`marketplace.action.dismiss`)})]}),(0,T.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-3`,children:[(0,T.jsx)(`div`,{className:`lg:col-span-2 space-y-4`,children:(0,T.jsxs)(Ae,{children:[(0,T.jsx)(Ce,{children:(0,T.jsx)(be,{className:`text-base`,children:s(`marketplace.detail.about`)})}),(0,T.jsx)(Ee,{children:Z.readme?(0,T.jsx)(Xe,{source:Z.readme}):(0,T.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s(`marketplace.detail.noReadme`)})})]})}),(0,T.jsx)(`div`,{className:`space-y-4`,children:(0,T.jsxs)(Ae,{children:[(0,T.jsx)(Ce,{children:(0,T.jsx)(be,{className:`text-base`,children:s(`marketplace.detail.versions`)})}),(0,T.jsx)(Ee,{children:g.versions.length===0?(0,T.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s(`marketplace.detail.noApprovedVersions`)}):(0,T.jsx)(`ul`,{className:`space-y-3`,children:g.versions.map(e=>(0,T.jsxs)(`li`,{className:`space-y-1 text-sm`,children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,T.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,T.jsx)(je,{className:`h-3.5 w-3.5 text-muted-foreground`,"aria-hidden":`true`}),(0,T.jsxs)(`code`,{className:`font-mono`,children:[`v`,e.version]}),e.is_prerelease&&(0,T.jsx)(y,{variant:`outline`,className:`text-xs`,children:s(`marketplace.detail.prerelease`)})]}),(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.published_at?new Date(e.published_at).toLocaleDateString():`—`})]}),e.release_notes&&e.release_notes.trim()&&(0,T.jsx)(`p`,{className:`whitespace-pre-line pl-5 text-xs text-muted-foreground`,children:e.release_notes.trim()})]},e.id))})})]})})]}),(0,T.jsx)(ie,{open:Ye,onOpenChange:e=>{E(e),e||(z(null),nt(!1))},children:(0,T.jsxs)(se,{children:[(0,T.jsxs)(he,{children:[(0,T.jsx)(fe,{children:s(`marketplace.install.dialogTitle`,{name:Z.displayName||X.manifest_id})}),(0,T.jsx)(Oe,{children:C().defaultEnvironmentId?s(`marketplace.install.dialogDescCurrent`,{host:typeof window<`u`?window.location.host:``}):s(`marketplace.install.dialogDescPicker`)})]}),O?(0,T.jsx)(u,{className:`h-10 w-full`}):A?(0,T.jsxs)(`div`,{className:`rounded-md border border-amber-500/30 bg-amber-500/5 p-3 text-sm space-y-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,T.jsx)(p,{className:`h-4 w-4 mt-0.5 text-amber-600`,"aria-hidden":`true`}),(0,T.jsx)(`div`,{className:`flex-1`,children:A})]}),(0,T.jsx)(`a`,{href:We(X.id),target:`_blank`,rel:`noopener noreferrer`,children:(0,T.jsxs)(d,{variant:`outline`,size:`sm`,className:`w-full`,children:[(0,T.jsx)(ge,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),s(`marketplace.action.openOnCloud`)]})})]}):C().defaultEnvironmentId?(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(xe,{id:`seed`,checked:I,onCheckedChange:e=>et(e===!0)}),(0,T.jsx)(v,{htmlFor:`seed`,className:`text-sm font-normal cursor-pointer`,children:s(`marketplace.install.includeSampleData`)})]}):Ze.length===0?(0,T.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s(`marketplace.install.noEnvs`)}):(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,T.jsx)(v,{htmlFor:`env-select`,children:s(`marketplace.install.environment`)}),(0,T.jsxs)(oe,{value:M,onValueChange:N,children:[(0,T.jsx)(ye,{id:`env-select`,children:(0,T.jsx)(de,{placeholder:s(`marketplace.install.environmentPlaceholder`)})}),(0,T.jsx)(ve,{children:Ze.map(e=>{let t=$e[e.id],n=!!t&&!!Q&&t!==`installed`&&t!==Q;return(0,T.jsxs)(me,{value:e.id,children:[e.display_name||e.hostname||e.id,e.plan&&(0,T.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,e.plan]}),t&&(n?(0,T.jsxs)(`span`,{className:`text-amber-600`,children:[` · `,s(`marketplace.install.updateTo`,{defaultValue:`Update → v{{version}}`,version:Q})]}):(0,T.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · `,s(`marketplace.install.installedVersion`,{defaultValue:`Installed v{{version}}`,version:t})]}))]},e.id)})})]})]}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(xe,{id:`seed`,checked:I,onCheckedChange:e=>et(e===!0)}),(0,T.jsx)(v,{htmlFor:`seed`,className:`text-sm font-normal cursor-pointer`,children:s(`marketplace.install.includeSampleData`)})]})]}),gt&&!A&&(0,T.jsxs)(`div`,{className:`space-y-3`,children:[(0,T.jsx)(Qe,{version:X.latest_version}),(0,T.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,T.jsx)(xe,{id:`ack-perms`,checked:tt,onCheckedChange:e=>nt(e===!0)}),(0,T.jsx)(v,{htmlFor:`ack-perms`,className:`text-sm font-normal cursor-pointer leading-snug`,children:s(`marketplace.disclosure.acknowledge`,{defaultValue:`I understand this package runs code and grants the permissions above.`})})]})]}),R&&(0,T.jsx)(`div`,{className:`rounded-md border p-3 text-sm ${R.ok?`border-green-500/30 bg-green-500/5 text-green-700`:`border-destructive/30 bg-destructive/5 text-destructive`}`,children:R.message}),R?.ok===!0&&C().defaultEnvironmentId&&C().defaultEnvironmentId===M&&(0,T.jsx)(P,{packageId:X.manifest_id,strings:le}),(0,T.jsxs)(ae,{children:[(0,T.jsx)(d,{variant:`outline`,onClick:()=>E(!1),children:s(`marketplace.action.close`)}),!A&&(0,T.jsx)(d,{onClick:lt,disabled:!M||L||R?.ok===!0||gt&&!tt,children:s(L?`marketplace.action.installing`:`marketplace.action.install`)})]})]})})]}):(0,T.jsx)(Je,{})}export{P as n,$e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{f as n,m as r,r as i,y as a}from"./vendor-react-BGDDiZfJ.js";import{d as o}from"./infrastructure-DexdbqHf.js";import{l as s}from"./framework-CWU64Lvg.js";import{Bt as c,Cr as l,Gi as u,Oi as ee,Ps as te,ar as d,ci as f,ir as p,ji as ne,js as m,ln as h,nr as g,rr as _,sr as v,tr as y,ya as b}from"./ui-components-DHIW7RSX.js";import{n as re}from"./assistantBus-BFk4fCbM.js";import{E as ie,a as x,d as ae,f as oe,l as S,o as C,u as se}from"./marketplaceApi-1mMRJWDq.js";import{n as w,t as T}from"./usePackageL10n-CiFMHfKe.js";import{t as ce}from"./MarketplaceAccessDenied-DuO_FDoh.js";var E=t({MarketplacePage:()=>A}),D=e(a(),1),O=i();function k(){let{language:e,t}=s();return n=>{if(!n)return``;let r=new Date(n);if(Number.isNaN(r.getTime()))return``;let i=Math.floor((Date.now()-r.getTime())/864e5);if(i<1)return t(`marketplace.relativeTime.today`);try{let t=new Intl.RelativeTimeFormat(e||`en`,{numeric:`auto`});return i<30?t.format(-i,`day`):i<365?t.format(-Math.floor(i/30),`month`):t.format(-Math.floor(i/365),`year`)}catch{return i<30?t(`marketplace.relativeTime.daysAgo`,{count:i}):i<365?t(`marketplace.relativeTime.monthsAgo`,{count:Math.floor(i/30)}):t(`marketplace.relativeTime.yearsAgo`,{count:Math.floor(i/365)})}}}function A(){let e=n(),{appName:t}=r(),i=o(),{t:a,language:E}=s(),A=k(),j=t?`/apps/${t}`:``,[M,N]=(0,D.useState)([]),[P,F]=(0,D.useState)(!0),[I,L]=(0,D.useState)(null),[R,z]=(0,D.useState)(``),[B,V]=(0,D.useState)(``),[H,U]=(0,D.useState)([]),[W,le]=(0,D.useState)([]),[G,K]=(0,D.useState)(null),[q,J]=(0,D.useState)(null),[ue,Y]=(0,D.useState)(new Set),de=(0,D.useMemo)(()=>{let e=new Map;for(let t of H)e.set(t.manifestId,t);return e},[H]),X=async()=>{F(!0),L(null);try{let[e,t,n,r]=await Promise.all([ae({limit:100}),se(),oe(),S()]);N(e.items??[]),U(t),le(n.items??[]);let i=new Set;for(let e of t)i.add(e.manifestId);for(let e of r.items)i.add(e.manifestId);Y(i)}catch(e){L(e?.message??String(e)),N([])}finally{F(!1)}};(0,D.useEffect)(()=>{X()},[]);let fe=async e=>{K(e.id),J(null);try{ie().features.installLocal?await x({packageId:e.manifest_id||e.id,versionId:`latest`}):await C({packageId:e.id,environmentId:``,seedSampleData:!0}),J({ok:!0,text:a(`marketplace.org.installed`,{defaultValue:`Installed ${e.display_name}`,name:e.display_name})}),await X(),re()}catch(e){J({ok:!1,text:e?.message??String(e)})}finally{K(null)}},Z=(0,D.useMemo)(()=>{let e=new Set;for(let t of M)t.category&&e.add(t.category);return Array.from(e).sort()},[M]),Q=e=>{let t=`marketplace.category.${e}`,n=a(t,{defaultValue:e});return n===t?e:n},$=(0,D.useMemo)(()=>{let e=R.trim().toLowerCase();return M.filter(t=>{if(B&&t.category!==B)return!1;if(!e)return!0;let n=T(t,E);return`${n.displayName} ${t.manifest_id} ${n.description??``}`.toLowerCase().includes(e)})},[M,R,B,E]);return i?(0,O.jsxs)(`div`,{className:`flex flex-col gap-6 p-4 sm:p-6`,children:[(0,O.jsxs)(`div`,{className:`flex items-start justify-between gap-4 flex-wrap`,children:[(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(f,{className:`h-6 w-6 text-primary`,"aria-hidden":`true`}),(0,O.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight`,children:a(`marketplace.title`)})]}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:a(`marketplace.subtitle`)})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsxs)(l,{variant:`outline`,size:`sm`,onClick:()=>e(`${j}/system/marketplace/installed`),children:[(0,O.jsx)(ee,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),H.length>0?a(`marketplace.installedCount`,{count:H.length}):a(`marketplace.installed`)]}),(0,O.jsxs)(l,{variant:`outline`,size:`sm`,onClick:()=>void X(),disabled:P,children:[(0,O.jsx)(u,{className:`h-4 w-4 mr-1.5`,"aria-hidden":`true`}),a(`marketplace.refresh`)]})]})]}),(0,O.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3`,children:[(0,O.jsxs)(`div`,{className:`relative flex-1`,children:[(0,O.jsx)(ne,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}),(0,O.jsx)(h,{value:R,onChange:e=>z(e.target.value),placeholder:a(`marketplace.searchPlaceholder`),className:`pl-9`,"aria-label":a(`marketplace.searchAria`)})]}),Z.length>0&&(0,O.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,O.jsx)(l,{size:`sm`,variant:B===``?`default`:`outline`,onClick:()=>V(``),children:a(`marketplace.all`)}),Z.map(e=>(0,O.jsx)(l,{size:`sm`,variant:B===e?`default`:`outline`,onClick:()=>V(e),children:Q(e)},e))]})]}),I&&(0,O.jsxs)(`div`,{className:`flex items-start gap-3 rounded-md border border-destructive/30 bg-destructive/5 p-4 text-sm`,children:[(0,O.jsx)(te,{className:`h-4 w-4 mt-0.5 text-destructive`,"aria-hidden":`true`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`font-medium text-destructive`,children:a(`marketplace.load.failed`)}),(0,O.jsx)(`div`,{className:`text-muted-foreground mt-1`,children:I}),(0,O.jsx)(`div`,{className:`text-xs text-muted-foreground mt-2`,dangerouslySetInnerHTML:{__html:a(`marketplace.load.failedHint`)}})]})]}),W.length>0&&(0,O.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(f,{className:`h-5 w-5 text-primary`,"aria-hidden":`true`}),(0,O.jsx)(`h2`,{className:`text-sm font-semibold`,children:a(`marketplace.org.heading`,{defaultValue:`Your organization`})}),(0,O.jsx)(v,{variant:`secondary`,className:`text-xs`,children:W.length})]}),q&&(0,O.jsx)(`div`,{className:`rounded-md border p-3 text-sm ${q.ok?`border-green-500/30 bg-green-500/5 text-green-700 dark:text-green-400`:`border-destructive/30 bg-destructive/5 text-destructive`}`,children:q.text}),(0,O.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:W.map(e=>{let t=ue.has(e.manifest_id);return(0,O.jsxs)(y,{className:`flex flex-col`,"data-testid":`org-card-${e.manifest_id}`,children:[(0,O.jsxs)(p,{className:`flex flex-row items-start gap-3 pb-2`,children:[(0,O.jsx)(w,{iconUrl:e.icon_url,displayName:e.display_name,manifestId:e.manifest_id}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(d,{className:`text-base truncate`,children:e.display_name}),(0,O.jsx)(_,{className:`text-xs truncate`,children:(0,O.jsx)(`code`,{className:`font-mono`,children:e.manifest_id})})]}),e.visibility&&(0,O.jsx)(v,{variant:`outline`,className:`shrink-0 text-xs`,children:e.visibility})]}),(0,O.jsxs)(g,{className:`flex-1 flex flex-col gap-2`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground line-clamp-2`,children:e.description||a(`marketplace.noDescription`)}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mt-auto pt-2 flex-wrap`,children:[e.latest_version&&(0,O.jsxs)(v,{variant:`outline`,className:`text-xs`,children:[(0,O.jsx)(b,{className:`h-3 w-3 mr-1`,"aria-hidden":`true`}),a(`marketplace.versionBadge`,{version:e.latest_version})]}),(0,O.jsx)(`div`,{className:`ml-auto`,children:t?(0,O.jsxs)(v,{variant:`default`,className:`text-xs bg-green-600 hover:bg-green-600`,children:[(0,O.jsx)(m,{className:`h-3 w-3 mr-1`,"aria-hidden":`true`}),a(`marketplace.org.installedBadge`,{defaultValue:`Installed`})]}):(0,O.jsx)(l,{size:`sm`,onClick:()=>void fe(e),disabled:G===e.id,children:G===e.id?a(`marketplace.org.installing`,{defaultValue:`Installing…`}):a(`marketplace.org.install`,{defaultValue:`Install`})})})]})]})]},e.id)})}),(0,O.jsx)(`div`,{className:`border-b pt-2`})]}),P&&M.length===0?(0,O.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,O.jsxs)(y,{children:[(0,O.jsxs)(p,{className:`pb-2`,children:[(0,O.jsx)(c,{className:`h-10 w-10 rounded-lg mb-2`}),(0,O.jsx)(c,{className:`h-5 w-3/4`}),(0,O.jsx)(c,{className:`h-4 w-1/2 mt-1`})]}),(0,O.jsx)(g,{children:(0,O.jsx)(c,{className:`h-12 w-full`})})]},t))}):$.length===0?(0,O.jsx)(`div`,{className:`text-center py-12 text-sm text-muted-foreground`,children:M.length===0?a(`marketplace.noApprovedYet`):a(`marketplace.noMatchFilters`)}):(0,O.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:$.map(t=>{let n=de.get(t.manifest_id),r=T(t,E);return(0,O.jsxs)(y,{className:`cursor-pointer transition-colors hover:bg-accent/50 flex flex-col`,onClick:()=>e(`${j}/system/marketplace/${t.id}`),role:`link`,tabIndex:0,onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e(`${j}/system/marketplace/${t.id}`))},"data-testid":`marketplace-card-${t.manifest_id}`,children:[(0,O.jsxs)(p,{className:`flex flex-row items-start gap-3 pb-2`,children:[(0,O.jsx)(w,{iconUrl:t.icon_url,displayName:r.displayName,manifestId:t.manifest_id}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(d,{className:`text-base truncate`,children:r.displayName}),(0,O.jsx)(_,{className:`text-xs truncate`,children:(0,O.jsx)(`code`,{className:`font-mono`,children:t.manifest_id})})]}),t.publisher&&t.publisher!==`private`&&(0,O.jsx)(v,{variant:t.publisher===`objectstack`?`default`:`secondary`,className:`shrink-0`,children:t.publisher})]}),(0,O.jsxs)(g,{className:`flex-1 flex flex-col gap-2`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground line-clamp-2`,children:r.description||a(`marketplace.noDescription`)}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mt-auto pt-2 flex-wrap`,children:[n&&(0,O.jsxs)(v,{variant:`default`,className:`text-xs bg-green-600 hover:bg-green-600`,children:[(0,O.jsx)(m,{className:`h-3 w-3 mr-1`,"aria-hidden":`true`}),a(`marketplace.installedBadge`,{version:n.version})]}),t.latest_version?.version&&(0,O.jsxs)(v,{variant:`outline`,className:`text-xs`,children:[(0,O.jsx)(b,{className:`h-3 w-3 mr-1`,"aria-hidden":`true`}),a(`marketplace.versionBadge`,{version:t.latest_version.version})]}),t.category&&(0,O.jsx)(v,{variant:`outline`,className:`text-xs`,children:Q(t.category)}),t.latest_version?.published_at&&(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground ml-auto`,children:A(t.latest_version.published_at)})]})]})]},t.id)})})]}):(0,O.jsx)(ce,{})}export{E as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{r as t,y as n}from"./vendor-react-BGDDiZfJ.js";import{Dt as r,l as i}from"./framework-CWU64Lvg.js";import{Bs as a,Hs as o,Us as s,cs as c}from"./ui-components-DHIW7RSX.js";function l(e,t,n){if(!(!e||t==null)){if(n){let r=e.find(e=>e.name===t&&e._packageId===n);if(r)return r}return e.find(e=>e.name===t)}}var u=e(n(),1),d=t();function f({sections:e,open:t}){if(!t)return null;let{t:n}=i(),[r,l]=(0,u.useState)([`0`]),[f,p]=(0,u.useState)(null),m=async(e,t)=>{try{await navigator.clipboard.writeText(JSON.stringify(e,null,2)),p(t),setTimeout(()=>p(null),2e3)}catch(e){console.error(`Failed to copy:`,e)}},h=e=>{l(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])};return(0,d.jsxs)(`div`,{className:`w-80 border-l bg-background p-0 overflow-hidden flex flex-col shrink-0 z-20 transition-all`,children:[(0,d.jsxs)(`div`,{className:`px-4 py-3 border-b bg-muted/5 flex items-center justify-between`,children:[(0,d.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:n(`layout.metadata.panelTitle`)}),(0,d.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60`,children:n(`layout.metadata.jsonBadge`)})]}),(0,d.jsx)(`div`,{className:`flex-1 overflow-auto`,children:e.map((e,t)=>{let i=String(t),l=r.includes(i),u=f===t;return(0,d.jsxs)(`div`,{className:`border-b last:border-b-0`,children:[(0,d.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 hover:bg-muted/5 transition-colors`,children:[(0,d.jsxs)(`button`,{onClick:()=>h(i),className:`flex-1 flex items-center justify-between text-left`,children:[(0,d.jsx)(`h4`,{className:`text-xs font-semibold text-foreground`,children:e.title}),l?(0,d.jsx)(o,{className:`h-3 w-3 text-muted-foreground ml-2`}):(0,d.jsx)(a,{className:`h-3 w-3 text-muted-foreground ml-2`})]}),(0,d.jsx)(`button`,{onClick:()=>m(e.data,t),className:`p-1 hover:bg-muted rounded transition-colors ml-2`,title:n(`layout.metadata.copyJson`),children:u?(0,d.jsx)(s,{className:`h-3 w-3 text-green-600`}):(0,d.jsx)(c,{className:`h-3 w-3 text-muted-foreground`})})]}),l&&(0,d.jsx)(`div`,{className:`px-4 pb-4`,children:(0,d.jsx)(`div`,{className:`relative rounded-md border border-border/50 bg-muted/5 overflow-hidden`,children:(0,d.jsx)(`pre`,{className:`text-[11px] leading-relaxed p-3 overflow-auto max-h-96 font-mono text-foreground/90`,children:JSON.stringify(e.data,null,2)})})})]},t)})})]})}function p(){let[e,t]=(0,u.useState)((0,u.useMemo)(()=>{try{return typeof window<`u`?r(window.location.search).enabled:!1}catch{return!1}},[]));return{showDebug:e,toggleDebug:()=>t(e=>!e)}}export{p as n,l as r,f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{f as t,h as n,m as r,r as i,y as a}from"./vendor-react-BGDDiZfJ.js";import{d as ee,f as o,n as s,t as c}from"./infrastructure-DexdbqHf.js";import{l,q as u}from"./framework-CWU64Lvg.js";import{Ar as te,Cr as d,Fc as ne,K as f,Pi as re,Qi as ie,U as ae,Va as oe,X as p,q as m,rs as se}from"./ui-components-DHIW7RSX.js";import{t as ce}from"./RecordDetailView-CEdkDgV8.js";import{r as le}from"./useMetadata-DemWIEqg.js";import{t as h}from"./getIcon-p-vXfFiY.js";import{n as g,t as _}from"./CreateViewDialog-BhCe1ZPc.js";import{a as v,i as y,n as b,o as x,r as ue,s as de}from"./InterfaceListPage-BFlwb0U7.js";import{l as fe}from"./plugins-views-BxKprmRN.js";import{t as pe}from"./runtime-metadata-persistence-D1KKivGr.js";var S=e(a(),1),C=i();function me(e){let t=[];return e.forEach((e,n)=>{let r=/^filter\[(.+)\]$/.exec(n);r&&r[1]&&e!==``&&t.push([r[1],`=`,e])}),t}var w=new Set([`select`,`multiselect`,`radio`,`enum`,`boolean`]),T=4;function E({dataSource:e,objects:i}){let{appName:a,objectName:E}=r(),{t:D}=l(),{objectLabel:O,fieldLabel:k}=ne(),A=t(),[j,M]=n(),{can:N}=s(),{canRead:P}=c(E??``),{user:F}=o(),I=ee(),L=le(),[R,z]=S.useState(!1),B=S.useMemo(()=>(i||[]).find(e=>e.name===E),[i,E]),[he]=S.useState(()=>de(new URLSearchParams(window.location.search))),ge=S.useCallback(e=>{M(t=>x(t,e),{replace:!0})},[M]),V=Array.from(j.entries()).filter(([e])=>e.startsWith(`filter[`)).map(([e,t])=>`${e}=${t}`).join(`&`),H=S.useMemo(()=>{let e=me(new URLSearchParams(V)),t=e.filter(([e])=>P(e));if(t.length<e.length){let t=e.filter(([e])=>!P(e)).map(([e])=>e);console.warn(`[ObjectDataPage] Dropped URL filter(s) on unreadable field(s): ${t.join(`, `)}`)}return t.map(([e,t,n])=>n===`{current_user_id}`?[e,t,F?.id??n]:[e,t,n])},[V,P,F?.id]),_e=S.useCallback(e=>{M(t=>{let n=new URLSearchParams(t);return n.delete(`filter[${e}]`),n})},[M]),U=S.useMemo(()=>ue(B).filter(e=>P(e)),[B,P]),W=S.useMemo(()=>{let e=B?.fields;if(!e||typeof e!=`object`)return;let t=Object.entries(e).filter(([e,t])=>t&&!t.hidden&&w.has(t.type)&&P(e)).slice(0,T).map(([e])=>({field:e}));return t.length>0?{element:`dropdown`,fields:t}:void 0},[B,P]),G=S.useCallback(e=>`/apps/${a}/${E}/record/${encodeURIComponent(String(e))}`,[a,E]),K=u({navigation:{mode:`drawer`},objectName:E??``,onNavigate:e=>A(G(e))}),q=j.get(`recordId`),J=S.useCallback((e,t)=>{let n=e?.id??e?._id;if(t&&(t.metaKey||t.ctrlKey||t.button===1)&&n!=null){window.open(G(n),`_blank`);return}n!=null&&M(e=>{let t=new URLSearchParams(e);return t.set(`recordId`,String(n)),t})},[G,M]),ve=S.useCallback(()=>{M(e=>{let t=new URLSearchParams(e);return t.delete(`recordId`),t})},[M]);S.useEffect(()=>{q&&!K.isOpen?K.open({id:q}):!q&&K.isOpen&&K.close()},[q]);let Y=S.useMemo(()=>v(B),[B]),X=S.useMemo(()=>b(B),[B]),Z=S.useMemo(()=>y(B),[B]),Q=S.useMemo(()=>{let e=[`grid`];return Y&&e.push(`kanban`),X&&e.push(`calendar`),Z&&e.push(`gallery`),e},[Y,X,Z]),$=S.useMemo(()=>{if(B)return{type:`list-view`,objectName:B.name,viewType:`grid`,fields:U,...H.length?{filters:H}:{},kanban:Y,calendar:X,gallery:Z,userFilters:W,appearance:{allowedVisualizations:Q},showViewSwitcher:Q.length>1,showSearch:!0,showSort:!0,showFilters:!0,showGroup:!0,showHideFields:!0,showDensity:!0,showRecordCount:!0}},[B,U,H,Y,X,Z,W,Q]),ye=S.useCallback(async e=>{try{let t={...e,columns:Array.isArray(e.columns)&&e.columns.length>0?e.columns:U,...H.length?{filter:H}:{}},n=await pe(`view`,String(e?.name??e?.id??``),t,{metadataClient:L});n&&A(`../view/${n}`,{relative:`path`})}catch(e){console.error(`[ObjectDataPage] Failed to save view:`,e)}},[U,H,L,A]);return B?N(B.name,`read`)?(0,C.jsxs)(`div`,{className:`h-full flex flex-col bg-background min-w-0 overflow-hidden`,"data-testid":`object-data-page`,children:[(0,C.jsx)(`div`,{className:`hidden sm:block`,children:(0,C.jsx)(g,{title:(0,C.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,C.jsx)(`span`,{className:`truncate`,children:O(B)}),(0,C.jsx)(`span`,{className:`rounded border px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground`,children:D(`console.objectData.badge`,{defaultValue:`Data`})})]}),description:D(`console.objectData.description`,{defaultValue:`URL-defined data slice — not bound to any saved view.`}),icon:S.createElement(h(B?.icon),{className:`h-4 w-4`}),actions:(0,C.jsxs)(C.Fragment,{children:[N(B.name,`create`)&&(0,C.jsxs)(d,{size:`sm`,onClick:()=>A(`../new`,{relative:`path`}),className:`shadow-none gap-1.5 h-8 sm:h-9`,"data-testid":`object-data-new-button`,children:[(0,C.jsx)(ie,{className:`h-4 w-4`}),(0,C.jsx)(`span`,{className:`hidden sm:inline`,children:D(`console.objectView.new`)})]}),I&&(0,C.jsxs)(d,{size:`sm`,variant:`outline`,onClick:()=>z(!0),className:`shadow-none gap-1.5 h-8 sm:h-9`,"data-testid":`object-data-save-as-view`,children:[(0,C.jsx)(re,{className:`h-4 w-4`}),(0,C.jsx)(`span`,{className:`hidden sm:inline`,children:D(`console.objectData.saveAsView`,{defaultValue:`Save as view`})})]})]})})}),H.length>0&&(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 border-b px-3 sm:px-4 py-2 shrink-0`,"data-testid":`object-data-filter-chips`,children:[(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`console.objectData.filteredBy`,{defaultValue:`Filtered by`})}),H.map(([e,,t])=>(0,C.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border bg-muted/40 px-2 py-0.5 text-xs`,children:[(0,C.jsx)(`span`,{className:`font-medium`,children:k(B.name,e,e)}),(0,C.jsxs)(`span`,{className:`text-muted-foreground`,children:[`= `,String(t)]}),(0,C.jsx)(`button`,{type:`button`,onClick:()=>_e(e),className:`ml-0.5 rounded-full hover:bg-muted p-0.5`,"aria-label":D(`console.objectData.removeFilter`,{defaultValue:`Remove filter {{field}}`,field:e}),"data-testid":`object-data-remove-filter-${e}`,children:(0,C.jsx)(te,{className:`h-3 w-3`})})]},e))]}),(0,C.jsx)(`div`,{className:`flex-1 min-h-0 overflow-auto`,children:$&&(0,C.jsx)(fe,{schema:$,dataSource:e,userFilterSelections:he,onUserFilterSelectionsChange:ge,onRowClick:J})}),K.isOverlay&&(0,C.jsx)(ae,{...K,setIsOpen:e=>{e||ve()},title:O(B),children:t=>(0,C.jsx)(ce,{objectNameOverride:B.name,recordIdOverride:String(t?.id??t?._id??q??``),embedded:!0,dataSource:e,objects:i,onEdit:()=>{}})}),I&&(0,C.jsx)(_,{open:R,onOpenChange:z,onCreate:ye,objectDef:B})]}):(0,C.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,"data-testid":`object-data-403`,children:(0,C.jsxs)(f,{children:[(0,C.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted`,children:(0,C.jsx)(oe,{className:`h-6 w-6 text-muted-foreground`})}),(0,C.jsx)(p,{children:D(`console.objectData.noAccessTitle`,{defaultValue:`Access denied`})}),(0,C.jsx)(m,{children:D(`console.objectData.noAccess`,{defaultValue:`You do not have permission to view this data.`})})]})}):(0,C.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,children:(0,C.jsxs)(f,{children:[(0,C.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted`,children:(0,C.jsx)(se,{className:`h-6 w-6 text-muted-foreground`})}),(0,C.jsx)(p,{children:D(`console.objectView.objectNotFound`)}),(0,C.jsx)(m,{children:D(`console.objectView.objectNotFoundDescription`,{objectName:E})})]})})}export{E as ObjectDataPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{d as n,f as r,h as i,m as a,r as o,y as s}from"./vendor-react-BGDDiZfJ.js";import{d as c,f as l,m as u,n as d}from"./infrastructure-DexdbqHf.js";import{H as f,L as p,R as m,Y as h,b as g,l as _}from"./framework-CWU64Lvg.js";import{Cr as v,Fc as y,H as b,Io as x,K as S,X as C,_r as w,aa as T,br as E,gr as D,mr as O,q as k,vr as A,xr as j,yr as M}from"./ui-components-DHIW7RSX.js";import{r as N}from"./vendor-ui-utils-BzQBRdq3.js";import"./MetadataProvider-C8ABa_gQ.js";import{r as P}from"./ExpressionProvider-D94jBDAc.js";import{c as ee,i as te,l as ne,r as re,u as ie}from"./RecordDetailView-CEdkDgV8.js";import{n as F,r as I,t as L}from"./MetadataInspector-YoFTAkMA.js";import{t as R}from"./InterfaceListPage-BFlwb0U7.js";var z=e(s(),1),B=o();function V(e,t){if(/^https?:\/\//i.test(e)||e.startsWith(`mailto:`))return{href:e,external:!e.startsWith(`mailto:`)};let n=(t||``).replace(/\/+$/,``);return{href:`${n}${e}`,external:!!n}}function H({cta:e,apiBase:t,primary:n,onNavigate:r}){let{href:i,external:a}=V(e.url,t);return(0,B.jsx)(v,{asChild:!0,variant:n?`default`:`outline`,size:`sm`,children:(0,B.jsx)(`a`,{href:i,onClick:r,...a?{target:`_blank`,rel:`noopener noreferrer`}:{},"data-testid":`entitlement-cta-${n?`primary`:`secondary`}`,children:e.label})})}function ae({state:e,apiBase:t,onOpenChange:n}){let r=e.spec;return(0,B.jsx)(O,{open:e.open,onOpenChange:e=>{e||n(!1)},children:(0,B.jsxs)(w,{"data-testid":`environment-entitlement-dialog`,children:[(0,B.jsxs)(E,{children:[(0,B.jsx)(j,{children:r?.title}),(0,B.jsx)(A,{children:r?.message})]}),(0,B.jsxs)(M,{children:[(0,B.jsx)(D,{children:`Close`}),r?.secondaryCta&&(0,B.jsx)(H,{cta:r.secondaryCta,apiBase:t,primary:!1,onNavigate:()=>n(!1)}),r?.cta&&(0,B.jsx)(H,{cta:r.cta,apiBase:t,primary:!0,onNavigate:()=>n(!1)})]})]})})}var U=new Set([`DEV_ENV_PLAN_LOCKED`,`DEV_ENV_LIMIT`,`PRODUCTION_ENV_LIMIT`]);function W(e){return typeof e==`string`&&U.has(e)}var G=`/settings/billing`;function oe(e){let t=e?.code;if(!W(t))return null;let n=typeof e?.error==`string`&&e.error?e.error:typeof e?.message==`string`?e.message:``,r=typeof e?.upgrade_url==`string`&&e.upgrade_url?e.upgrade_url:G,i=typeof e?.contact_url==`string`&&e.contact_url?e.contact_url:``;return t===`PRODUCTION_ENV_LIMIT`?{code:t,title:`You already have your production environment`,message:n||`Each organization includes exactly one production environment. Create a separate organization for another, or contact us about an Enterprise arrangement.`,cta:i?{label:`Contact sales`,url:i}:void 0}:{code:t,title:t===`DEV_ENV_PLAN_LOCKED`?`Development environments are a paid feature`:`Development environment limit reached`,message:n||(t===`DEV_ENV_PLAN_LOCKED`?`Your free plan includes one production environment. Upgrade to add development environments — build in dev, then publish to production.`:`Capacity scales with AI seats. Add an AI seat, or archive an unused development environment to free one up.`),cta:{label:`Upgrade plan`,url:r}}}function K(e){return e.hasProductionEnv?e.canCreateDevelopmentEnv===!1?`upgrade_for_development`:`add_development`:`setup_production`}function q(e){return{code:`DEV_ENV_PLAN_LOCKED`,title:`Development environments are a paid feature`,message:`${e.plan&&e.plan!==`free`?`your ${e.plan} plan`:`your free plan`} includes one production environment. Upgrade to add development environments — build in dev, then publish to production.`,cta:{label:`Upgrade plan`,url:e.upgradeUrl||`/settings/billing`}}}var J=/^\s*\{\{\s*page\.([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\}\}\s*$/;function Y(e,t){let n=t;for(let t of e.split(`.`)){if(n==null)return;n=n[t]}return n}function se(e,t){if(!e.includes(`{{`))return e;let n=e.match(J);if(n){let e=Y(n[1],t);return e===void 0?``:e}return e.replace(/\{\{\s*page\.([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\}\}/g,(e,n)=>{let r=Y(n,t);return r==null?``:String(r)})}function X(e,t){if(typeof e==`string`)return se(e,t);if(Array.isArray(e))return e.map(e=>X(e,t));if(e&&typeof e==`object`){let n={};for(let[r,i]of Object.entries(e))n[r]=X(i,t);return n}return e}function Z(e,t){return t?X(e,t):e}var ce={id:`current-user`,name:`Demo User`,isPlatformAdmin:!1};function Q(e){let t=e.locations;return Array.isArray(t)?t.some(e=>e===`list_item`||e===`record_header`||e===`record_more`||e===`record_section`):!1}function $(e){let{dataSource:t,objects:n,objectName:i,onRefresh:a}=e,o=r(),{user:s,activeOrganization:c}=l(),{systemPermissions:f}=d(),{fieldLabel:p,fieldOptionLabel:m,actionParamText:h,actionParamOptionLabel:_,actionDescription:v}=y(),b=(0,z.useMemo)(()=>i?n?.find(e=>e.name===i):void 0,[n,i]),x=i||b?.name,S=(0,z.useCallback)(()=>{a?.()},[a]),C=g({dataSource:t,onUndo:()=>{S(),N.success(`Change undone`)}}),[w,T]=(0,z.useState)({open:!1,message:``}),[E,D]=(0,z.useState)({open:!1,params:[]}),[O,k]=(0,z.useState)({open:!1}),[A,j]=(0,z.useState)(null),[M,P]=(0,z.useState)({open:!1}),F=(0,z.useRef)(new Set),I=(0,z.useCallback)((e,t)=>new Promise(n=>{k({open:!0,spec:e,data:t,resolve:n})}),[]),L=(0,z.useCallback)((e,t)=>new Promise(n=>{T({open:!0,message:e,options:t,resolve:n})}),[]),R=(0,z.useCallback)((e,t)=>new Promise(r=>{let a=t?.params&&!Array.isArray(t.params)?t.params._rowRecord:void 0,o=typeof t?.objectName==`string`&&t.objectName?t.objectName:void 0,s=re(e,{objectName:o||i||b?.name||``,objects:n||[],fieldLabel:p,fieldOptionLabel:m,row:a}),c=o||i||b?.name,l=s.map(e=>({...e,label:h(c,t?.name,e.name,`label`,e.label)??e.label,placeholder:h(c,t?.name,e.name,`placeholder`,e.placeholder)??e.placeholder,helpText:h(c,t?.name,e.name,`helpText`,e.helpText)??e.helpText,options:Array.isArray(e.options)?e.options.map(n=>({...n,label:_(c,t?.name,e.name,n.value,n.label)})):e.options}));D({open:!0,params:l,title:t?.label||t?.title,description:v(c,t?.name,t?.description),resolve:r})}),[i,b,n,p,m,h,_]),V=s?{id:s.id,name:s.name,avatar:s.image,isPlatformAdmin:s?.isPlatformAdmin??!1,systemPermissions:f??[]}:{...ce,systemPermissions:f??[]},H=(0,z.useCallback)((e,t)=>{if(t?.type===`error`){N.error(e);return}if(t?.undo){N.success(e,{duration:t.duration,action:{label:t.undo.label||`Undo`,onClick:()=>{C.undo()}}});return}N.success(e,{duration:t?.duration})},[C]),U=(0,z.useCallback)((e,t)=>{t?.external||t?.newTab?window.open(e,`_blank`,`noopener,noreferrer`):o(e)},[o]),W=(0,z.useMemo)(()=>u(),[]),G=(0,z.useCallback)(e=>{P({open:!0,spec:e})},[]),K=(0,z.useCallback)(async(e,n)=>{try{let r=e.target||e.name,i=e.params||{},a=typeof r==`string`?r:``;if(a.startsWith(`/`)||/^https?:\/\//i.test(a)){let t={...i},r=t._rowRecord;delete t._rowRecord;let o=n?.pageVariables??void 0,s=Z(t,o),l=a;r&&/\{[a-z_][a-z0-9_]*\}/i.test(l)&&(l=l.replace(/\{([a-z_][a-z0-9_]*)\}/gi,(e,t)=>{let n=r[t];return n==null?``:encodeURIComponent(String(n))}));let u=l.startsWith(`http`)?l:`${l}`,d=e.bodyShape&&typeof e.bodyShape==`object`&&e.bodyShape.wrap?e.bodyShape.wrap:void 0,f=d?{[d]:s}:{...s};if(r&&e.recordIdParam){let t=r[e.recordIdField||`id`];t!=null&&(f[e.recordIdParam]=t)}/\/api\/v1\/auth\//.test(l)&&!f.organizationId&&c?.id&&(f.organizationId=c.id),e.bodyExtra&&typeof e.bodyExtra==`object`&&Object.assign(f,Z(e.bodyExtra,o));let p=(e.method||`POST`).toUpperCase(),m={method:p,headers:{"Content-Type":`application/json`},credentials:`include`};p!==`GET`&&p!==`DELETE`&&(m.body=JSON.stringify(f));let h=await W(u,m);if(!h.ok){let e=null;try{e=await h.json()}catch{}let t=oe(e);return t?(G(t),{success:!1}):{success:!1,error:e?.error||e?.message||`HTTP ${h.status}`}}let g=await h.json().catch(()=>({}));return e.refreshAfter!==!1&&S(),{success:!0,data:g&&typeof g==`object`&&!Array.isArray(g)&&`data`in g?g.data:g,reload:e.refreshAfter!==!1}}let o=e.objectName||x,s=i._rowRecord,l={...i};delete l._rowRecord;let u=l.recordId??s?.[e.recordIdField||`id`];delete l.recordId,e.bodyExtra&&typeof e.bodyExtra==`object`&&Object.assign(l,e.bodyExtra),o&&typeof t?.execute==`function`?await t.execute(o,r,l):o&&u&&Object.keys(l).length>0&&typeof t?.update==`function`&&await t.update(o,u,l);let d;if(e.undoable&&o&&u&&s&&Object.keys(l).length>0&&typeof t?.update==`function`){let t={};for(let e of Object.keys(l))t[e]=s[e]??null;d={id:`undo-${o}-${u}-${Date.now()}`,type:`update`,objectName:o,recordId:String(u),timestamp:Date.now(),description:e.label||`Undo ${o}`,undoData:t,redoData:{...l}}}let f=e.refreshAfter!==!1;return f&&S(),{success:!0,reload:f,undo:d}}catch(e){return{success:!1,error:e.message}}},[t,x,W,c,S,G]),q=(0,z.useCallback)(async(e,t)=>{let n=e.target||e.name;if(!n)return{success:!1,error:`No flow target provided for flow action`};try{let r={...e.params||{}},i=r._rowRecord;delete r._rowRecord;let a=r.recordId??i?.id;if(a==null){let n=Array.isArray(t?.selectedRecords)?t.selectedRecords:[];if(n.length===1)a=n[0]?.id;else if(n.length>1)return{success:!1,error:`This flow runs on a single record — select exactly one row.`};else if(Q(e))return{success:!1,error:`This flow runs on a single record — select a row first.`}}a!=null&&r.recordId==null&&(r.recordId=a);let o=await W(`/api/v1/automation/${encodeURIComponent(n)}/trigger`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({recordId:a,objectName:e.objectName||x,params:r})}),s=await o.json().catch(()=>null);if(!o.ok||s&&s.success===!1)return{success:!1,error:s?.error||`Flow "${n}" failed (HTTP ${o.status})`};let c=s?.data??{};if(c.status===`paused`&&c.screen)return j({flowName:n,runId:c.runId,screen:c.screen}),{success:!0,silent:!0};let l=e.refreshAfter!==!1;return l&&S(),{success:!0,data:s?.data,reload:l}}catch(e){return{success:!1,error:e.message}}},[W,x,S]),J=(0,z.useCallback)(async(e,t)=>{let n=e.target||e.name;if(!n)return{success:!1,error:`No action target provided`};let r=e.params&&!Array.isArray(e.params)?{...e.params}:{},i=r._rowRecord;delete r._rowRecord;let a=e.recordIdField||`id`,o=r.recordId??i?.[a];if(o==null){let n=Array.isArray(t?.selectedRecords)?t.selectedRecords:[];if(n.length===1)o=n[0]?.[a];else if(n.length>1)return{success:!1,error:`This action runs on a single record — select exactly one row.`};else if(Q(e))return{success:!1,error:`This action runs on a single record — select a row first.`}}let s=`${n}:${o??``}`;if(F.current.has(s))return{success:!1,error:`Action already in progress`};F.current.add(s);let c=null;if(e.opensInNewTab)try{c=window.open(`about:blank`,`_blank`),c&&(c.document.write(`<!doctype html><meta charset="utf-8"><title>正在打开… Opening…</title><body style="margin:0;font-family:system-ui,sans-serif;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;gap:16px;color:#4b5563"><div style="width:28px;height:28px;border:3px solid #e5e7eb;border-top-color:#6366f1;border-radius:50%;animation:s .8s linear infinite"></div><div>正在为你打开环境…</div><style>@keyframes s{to{transform:rotate(360deg)}}</style></body>`),c.document.close())}catch{c=null}try{let t=typeof e.newTabUrl==`string`?e.newTabUrl:``;if(e.opensInNewTab&&t){if(o==null){if(c)try{c.close()}catch{}return{success:!1,error:`This action runs on a single record — no record id available.`}}let n=`${window.location.origin}${t.replace(`{recordId}`,encodeURIComponent(String(o)))}`;if(c)try{c.location.href=n}catch{try{c.close()}catch{}window.location.href=n}else{let e=null;try{e=window.open(n,`_blank`)}catch{e=null}e||N(`浏览器拦截了弹窗 / Popup blocked`,{description:`点击在新标签页打开环境`,action:{label:`打开环境`,onClick:()=>{try{window.open(n,`_blank`)}catch{window.location.href=n}}},duration:1e4})}return e.refreshAfter===!0&&S(),{success:!0}}let i=e.objectName||x||`global`,a=await W(`/api/v1/actions/${encodeURIComponent(i)}/${encodeURIComponent(n)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({recordId:o,params:r})}),s=await a.json().catch(()=>null);if(!a.ok||s&&s.success===!1){let e=s?.error||`Action "${n}" failed (HTTP ${a.status})`;if(c)try{c.close()}catch{}return{success:!1,error:e}}let l=e.refreshAfter!==!1;l&&S();let u=s?.data,d=u&&typeof u==`object`&&typeof u.redirectUrl==`string`?u.redirectUrl:null;if(d)if(c)try{c.location.href=d}catch{try{c.close()}catch{}window.location.href=d}else{let e=null;try{e=window.open(d,`_blank`)}catch{e=null}e||N(`浏览器拦截了弹窗 / Popup blocked`,{description:`点击在新标签页打开环境`,action:{label:`打开环境`,onClick:()=>{try{window.open(d,`_blank`)}catch{window.location.href=d}}},duration:1e4})}else if(c)try{c.close()}catch{}return{success:!0,data:u,reload:l}}catch(e){if(c)try{c.close()}catch{}return{success:!1,error:e.message}}finally{F.current.delete(s)}},[W,x,S]);return{confirmHandler:L,toastHandler:H,navigateHandler:U,paramCollectionHandler:R,resultDialogHandler:I,apiHandler:K,flowHandler:q,serverActionHandler:J,authFetch:W,openEntitlementDialog:G,actionProviderProps:(0,z.useMemo)(()=>({context:{...i?{objectName:i}:{},user:V,apiBase:``,activeOrganization:c?{id:c.id,slug:c.slug,name:c.name}:null},onConfirm:L,onToast:H,onNavigate:U,onParamCollection:R,onResultDialog:I,handlers:{api:K,flow:q,script:J,modal:J}}),[i,V,c,L,H,U,R,I,K,q,J]),dialogs:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ie,{state:w,onOpenChange:e=>{e||T({open:!1,message:``})}}),(0,B.jsx)(ne,{state:E,onOpenChange:e=>{e||D({open:!1,params:[]})}}),(0,B.jsx)(ee,{state:O,onAcknowledge:()=>{O.resolve?.(),k({open:!1})}}),(0,B.jsx)(te,{state:A,authFetch:W,baseUrl:``,dataSource:t,objects:n,onClose:()=>j(null),onComplete:()=>{j(null),S()}}),(0,B.jsx)(ae,{state:M,apiBase:``,onOpenChange:e=>{e||P({open:!1})}})]})}}function le({children:e,...t}){let n=$(t);return(0,B.jsxs)(f,{...n.actionProviderProps,children:[e,n.dialogs]})}var ue=t({PageView:()=>de});function de(){let{t:e}=_(),{pageName:t}=a(),[o]=i(),{showDebug:s}=F(),l=r(),u=n(),d=c(),{pages:f,objects:g,getTypeStatus:v}=m(),{app:y}=P(),w=p(),[E,D]=(0,z.useState)(0),O=I(f,t,y?._packageId);if(!O){let n=v?.(`page`);return n===`idle`||n===`loading`?(0,B.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,"data-testid":`page-loading`,children:(0,B.jsx)(b,{className:`h-5 w-5 text-muted-foreground`})}):(0,B.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,children:(0,B.jsxs)(S,{children:[(0,B.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted`,children:(0,B.jsx)(x,{className:`h-6 w-6 text-muted-foreground`})}),(0,B.jsx)(C,{children:e(`empty.pageNotFound`)}),(0,B.jsx)(k,{children:e(`empty.pageNotFoundDescription`,{name:t})})]})})}let A=Object.fromEntries(o.entries()),j=u.pathname.match(/\/apps\/([^/]+)/)?.[1],M=d&&!!j&&!!t;return(0,B.jsx)(le,{dataSource:w,objects:g,onRefresh:()=>D(e=>e+1),children:(0,B.jsxs)(`div`,{className:`flex flex-row h-full w-full overflow-hidden relative`,children:[(0,B.jsxs)(`div`,{className:`flex-1 overflow-auto h-full relative`,children:[M&&(0,B.jsx)(`button`,{type:`button`,onClick:()=>{M&&l(`/apps/${j}/metadata/page/${encodeURIComponent(t)}`)},className:`absolute right-3 top-3 z-30 inline-flex h-7 w-7 items-center justify-center rounded-md border border-input bg-background/90 text-muted-foreground shadow-sm backdrop-blur hover:bg-accent hover:text-accent-foreground`,"data-testid":`page-edit-in-studio-button`,title:e(`common.editInStudio`,{defaultValue:`Edit in studio`}),"aria-label":e(`common.editInStudio`,{defaultValue:`Edit in studio`}),children:(0,B.jsx)(T,{className:`h-3.5 w-3.5`})}),O.interfaceConfig?.source?(0,B.jsx)(R,{page:O,reserveEditAffordance:M},E):(0,B.jsx)(h,{schema:{...O,type:O.type||`page`,context:{...O.context,params:A,refreshKey:E}}},E)]}),(0,B.jsx)(L,{open:s,sections:[{title:`Page Configuration`,data:O}]})]})})}export{q as a,K as i,$ as n,G as r,ue as t};
|