@lunora/studio 1.0.0-alpha.34 → 1.0.0-alpha.340
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/LICENSE.md +6 -0
- package/README.md +1 -1
- package/dist/index.d.mts +1597 -0
- package/dist/index.d.ts +991 -807
- package/dist/index.mjs +1 -0
- package/dist/mount.d.mts +22 -0
- package/dist/mount.d.ts +11 -10
- package/dist/mount.mjs +1 -0
- package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
- package/dist/packem_chunks/ApiTab.mjs +1 -0
- package/dist/packem_chunks/AuditPanel.mjs +1 -0
- package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
- package/dist/packem_chunks/ExportImportPanel.mjs +6 -0
- package/dist/packem_chunks/FileBrowser.mjs +4 -0
- package/dist/packem_chunks/FunctionRunner.mjs +1 -0
- package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
- package/dist/packem_chunks/HealthPanel.mjs +1 -0
- package/dist/packem_chunks/InsightsPanel.mjs +1 -0
- package/dist/packem_chunks/LogsPanel.mjs +1 -0
- package/dist/packem_chunks/MailPanel.mjs +2 -0
- package/dist/packem_chunks/MetricsPanel.mjs +1 -0
- package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
- package/dist/packem_chunks/PitrPanel.mjs +1 -0
- package/dist/packem_chunks/SchemaViewer.mjs +1 -0
- package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
- package/dist/packem_chunks/SettingsPanel.mjs +1 -0
- package/dist/packem_chunks/SqlEditorPanel.mjs +10 -0
- package/dist/packem_chunks/TableEditor.mjs +1 -0
- package/dist/packem_chunks/agents-panel.mjs +1 -0
- package/dist/packem_chunks/ai-usage-panel.mjs +1 -0
- package/dist/packem_chunks/analytics-panel.mjs +1 -0
- package/dist/packem_chunks/architecture-panel.mjs +1 -0
- package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
- package/dist/packem_chunks/auth-config-panel.mjs +1 -0
- package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
- package/dist/packem_chunks/containers-panel.mjs +1 -0
- package/dist/packem_chunks/dashboards-panel.mjs +1 -0
- package/dist/packem_chunks/evals-panel.mjs +1 -0
- package/dist/packem_chunks/fanout-panel.mjs +1 -0
- package/dist/packem_chunks/flags-panel.mjs +1 -0
- package/dist/packem_chunks/issues-panel.mjs +1 -0
- package/dist/packem_chunks/kv-browser.mjs +1 -0
- package/dist/packem_chunks/log-drains-panel.mjs +4 -0
- package/dist/packem_chunks/migrations-route.mjs +1 -0
- package/dist/packem_chunks/organizations-panel.mjs +1 -0
- package/dist/packem_chunks/payments-panel.mjs +1 -0
- package/dist/packem_chunks/permissions-panel.mjs +1 -0
- package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
- package/dist/packem_chunks/queues-panel.mjs +1 -0
- package/dist/packem_chunks/reactors-panel.mjs +1 -0
- package/dist/packem_chunks/rls-panel.mjs +1 -0
- package/dist/packem_chunks/schedule-panel.mjs +1 -0
- package/dist/packem_chunks/sparkline.mjs +1 -0
- package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
- package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
- package/dist/packem_chunks/sync-client-panel.mjs +1 -0
- package/dist/packem_chunks/traces-panel.mjs +1 -0
- package/dist/packem_chunks/users-panel.mjs +1 -0
- package/dist/packem_chunks/vector-browser.mjs +1 -0
- package/dist/packem_chunks/workflows-panel.mjs +1 -0
- package/dist/packem_shared/ADMIN_FUNCTIONS-B8yyk5BX.mjs +1 -0
- package/dist/packem_shared/ApiDocsPanel-Py7C4ibM.mjs +2 -0
- package/dist/packem_shared/ApiReferencePanel-DlYVADAy.mjs +1 -0
- package/dist/packem_shared/CommandPalette-CM1hqAOD.mjs +1 -0
- package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
- package/dist/packem_shared/ConnectionBadge-B8Hj5DaE.mjs +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DvhNw0BI.mjs +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +1 -0
- package/dist/packem_shared/DataBrowser-DxlLv5x1.mjs +4 -0
- package/dist/packem_shared/DataFilters-CYZFt2EK.mjs +1 -0
- package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
- package/dist/packem_shared/GlobalDataBrowser-TFTQpSVj.mjs +1 -0
- package/dist/packem_shared/HomePanel-BVz2sDQ4.mjs +1 -0
- package/dist/packem_shared/MigrationsPanel-fUyhbt0w.mjs +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-nYyfjjse.mjs +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
- package/dist/packem_shared/ScheduledJobs-zSeU_6cN.mjs +1 -0
- package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
- package/dist/packem_shared/Studio-CNqMkRmB.mjs +1 -0
- package/dist/packem_shared/StudioApp-CUxEVr__.mjs +1 -0
- package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
- package/dist/packem_shared/advisor-view-CXiPdw4B.mjs +1 -0
- package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
- package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
- package/dist/packem_shared/app.d-D45VvUTx.d.mts +351 -0
- package/dist/packem_shared/app.d-D45VvUTx.d.ts +351 -0
- package/dist/packem_shared/auth-pager-DiDnXsfe.mjs +1 -0
- package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
- package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
- package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
- package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
- package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
- package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
- package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
- package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
- package/dist/packem_shared/data-grid-BHTuvSI7.mjs +1 -0
- package/dist/packem_shared/data-view-params-DhYmAkcj.mjs +1 -0
- package/dist/packem_shared/diagram-export-panel-BMLzao0Y.mjs +2 -0
- package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
- package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
- package/dist/packem_shared/error-alert-D-ftqyo-.mjs +1 -0
- package/dist/packem_shared/grid-features-CIdZ8Dqo.mjs +6 -0
- package/dist/packem_shared/grid-pagination-DgzyzfBh.mjs +1 -0
- package/dist/packem_shared/home-panel-CF-MfsnH.mjs +3 -0
- package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
- package/dist/packem_shared/internal-BXEjuLPN.mjs +2 -0
- package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
- package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
- package/dist/packem_shared/log-fields-BolUoZ9g.mjs +1 -0
- package/dist/packem_shared/log-line-BWDt_F56.mjs +1 -0
- package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
- package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
- package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
- package/dist/packem_shared/recording-client-CFBkH4uZ.mjs +1 -0
- package/dist/packem_shared/reference-view-BrsL8UGn.mjs +13 -0
- package/dist/packem_shared/schema-diagram-ghsOCED7.mjs +2 -0
- package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
- package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
- package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
- package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
- package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
- package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
- package/dist/packem_shared/sql-result-table-COsfUSGc.mjs +1 -0
- package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
- package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
- package/dist/packem_shared/studio-BcHsk7mT.mjs +2 -0
- package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
- package/dist/packem_shared/table-list-sidebar-DwqtHSHU.mjs +1 -0
- package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
- package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
- package/dist/packem_shared/use-admin-query-I1uILsUP.mjs +1 -0
- package/dist/packem_shared/use-admin-spec-BdNLZbTO.mjs +1 -0
- package/dist/packem_shared/use-async-submit-2eBBD0-m.mjs +1 -0
- package/dist/packem_shared/use-auth-config-DQ8tNyBh.mjs +1 -0
- package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
- package/dist/packem_shared/use-open-trace-B_0LbTD7.mjs +1 -0
- package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
- package/dist/packem_shared/use-sql-assistant-DetnUyFf.mjs +1 -0
- package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
- package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
- package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
- package/dist/standalone/chunk-253UHWDX.js +1 -0
- package/dist/standalone/chunk-2I4NHEKA.js +1 -0
- package/dist/standalone/chunk-2IKDEUCX.js +1 -0
- package/dist/standalone/chunk-2SNK7KHX.js +1 -0
- package/dist/standalone/chunk-37WYCOQ2.js +1 -0
- package/dist/standalone/chunk-3FYMEXVB.js +1 -0
- package/dist/standalone/chunk-3N5PRV3V.js +1 -0
- package/dist/standalone/chunk-3YXASVTP.js +1 -0
- package/dist/standalone/chunk-43GV7LQK.js +1 -0
- package/dist/standalone/chunk-4CGBMYO3.js +6 -0
- package/dist/standalone/chunk-4NOMAGEO.js +1 -0
- package/dist/standalone/chunk-4ZEL6BYL.js +1 -0
- package/dist/standalone/chunk-55UGUCQ6.js +1 -0
- package/dist/standalone/chunk-5B2RTXBS.js +1 -0
- package/dist/standalone/chunk-5QR2SQIS.js +1 -0
- package/dist/standalone/chunk-5SLTDY4C.js +1 -0
- package/dist/standalone/chunk-5Y5UTG4N.js +1 -0
- package/dist/standalone/chunk-6XKL22OG.js +3 -0
- package/dist/standalone/chunk-6ZSIPBTC.js +6 -0
- package/dist/standalone/chunk-74IYYDDI.js +19 -0
- package/dist/standalone/chunk-7G4Z6Q7X.js +1 -0
- package/dist/standalone/chunk-7GVT36VI.js +1 -0
- package/dist/standalone/chunk-7Q256NLI.js +1 -0
- package/dist/standalone/chunk-7RKB5KS7.js +1 -0
- package/dist/standalone/chunk-7Y3SY37W.js +1 -0
- package/dist/standalone/chunk-APEQELK3.js +1 -0
- package/dist/standalone/chunk-AUAECCXB.js +1 -0
- package/dist/standalone/{chunk-BJGBHGK3.js → chunk-AUGKHAMQ.js} +1 -1
- package/dist/standalone/chunk-BFQMOALO.js +1 -0
- package/dist/standalone/chunk-BOMPSVRC.js +1 -0
- package/dist/standalone/chunk-BTG6YDYM.js +1 -0
- package/dist/standalone/chunk-BTQ72TPT.js +1 -0
- package/dist/standalone/chunk-CCDX5RYT.js +1 -0
- package/dist/standalone/chunk-CGQMJYCW.js +1 -0
- package/dist/standalone/chunk-CVXNHIQW.js +1 -0
- package/dist/standalone/chunk-DBHZXRL6.js +1 -0
- package/dist/standalone/chunk-DBZ4TBP5.js +1 -0
- package/dist/standalone/chunk-DEFCA7GG.js +5 -0
- package/dist/standalone/chunk-DHGPCQ2F.js +1 -0
- package/dist/standalone/chunk-E4PXACVL.js +3 -0
- package/dist/standalone/chunk-E5DXYVPB.js +1 -0
- package/dist/standalone/chunk-ECY2JC5F.js +1 -0
- package/dist/standalone/chunk-EE227HDE.js +1 -0
- package/dist/standalone/chunk-ENIA26XP.js +1 -0
- package/dist/standalone/chunk-EWMBX5N2.js +1 -0
- package/dist/standalone/chunk-FCXFQF2W.js +1 -0
- package/dist/standalone/chunk-FPI7AMQJ.js +1 -0
- package/dist/standalone/chunk-FUL4ROKH.js +1 -0
- package/dist/standalone/chunk-FUYEZFBP.js +1 -0
- package/dist/standalone/chunk-G2F22AMT.js +1 -0
- package/dist/standalone/chunk-GC4XRCRZ.js +1 -0
- package/dist/standalone/chunk-GHQ2VDI2.js +1 -0
- package/dist/standalone/chunk-GOFZ4Y74.js +1 -0
- package/dist/standalone/chunk-GUDC24NJ.js +1 -0
- package/dist/standalone/chunk-GWVYDOBH.js +1 -0
- package/dist/standalone/chunk-GYBCO7NN.js +1 -0
- package/dist/standalone/chunk-HCFJBY65.js +1 -0
- package/dist/standalone/chunk-HCTJKP5J.js +1 -0
- package/dist/standalone/chunk-HGHIVU76.js +1 -0
- package/dist/standalone/chunk-HH52IEFY.js +4 -0
- package/dist/standalone/chunk-HIJGQX6F.js +4 -0
- package/dist/standalone/chunk-HPYJUVCC.js +1 -0
- package/dist/standalone/chunk-I26MS5PJ.js +1 -0
- package/dist/standalone/chunk-ICRKYAYO.js +1 -0
- package/dist/standalone/chunk-IRSSZXC3.js +1 -0
- package/dist/standalone/chunk-ITT6MM23.js +1 -0
- package/dist/standalone/chunk-IWZ7GVQO.js +1 -0
- package/dist/standalone/chunk-JR4ROUBB.js +1 -0
- package/dist/standalone/chunk-K2EHRNYW.js +1 -0
- package/dist/standalone/chunk-K3UAOIR7.js +1 -0
- package/dist/standalone/chunk-KCFO2BVI.js +15 -0
- package/dist/standalone/chunk-KF7Y5S5O.js +1 -0
- package/dist/standalone/chunk-LHG2JVIM.js +2 -0
- package/dist/standalone/chunk-LXCVA5SP.js +1 -0
- package/dist/standalone/chunk-M3QKMHAP.js +15 -0
- package/dist/standalone/chunk-MVWZMWPD.js +1 -0
- package/dist/standalone/chunk-NCBLHBRW.js +1 -0
- package/dist/standalone/chunk-NCCORPSU.js +7 -0
- package/dist/standalone/chunk-NCPW7WHO.js +1 -0
- package/dist/standalone/chunk-NGVP66OH.js +1 -0
- package/dist/standalone/chunk-NQZALRU3.js +1 -0
- package/dist/standalone/chunk-NRP22GKC.js +1 -0
- package/dist/standalone/chunk-NXQW5E6W.js +1 -0
- package/dist/standalone/chunk-O2FW4VRL.js +1 -0
- package/dist/standalone/chunk-OI5HX3ZO.js +1 -0
- package/dist/standalone/chunk-OLIKYC3C.js +59 -0
- package/dist/standalone/chunk-OPM7ESDV.js +1 -0
- package/dist/standalone/chunk-OQ6I6OXT.js +2 -0
- package/dist/standalone/chunk-OYCUPD3Q.js +1 -0
- package/dist/standalone/chunk-PSMQQV6S.js +1 -0
- package/dist/standalone/chunk-Q6ED4KUL.js +1 -0
- package/dist/standalone/chunk-Q6IT6ZD7.js +1 -0
- package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-QAQDMS6R.js} +1 -1
- package/dist/standalone/chunk-QJLHH3ET.js +1 -0
- package/dist/standalone/chunk-R3ADWOYR.js +1 -0
- package/dist/standalone/chunk-R6U22RSY.js +1 -0
- package/dist/standalone/chunk-RB3WPSY5.js +14 -0
- package/dist/standalone/chunk-RGMVGZV4.js +1 -0
- package/dist/standalone/chunk-RWVIV3U7.js +1 -0
- package/dist/standalone/chunk-S4Z7K55A.js +1 -0
- package/dist/standalone/chunk-SA2OGF3F.js +1 -0
- package/dist/standalone/chunk-SC6P4M3S.js +1 -0
- package/dist/standalone/chunk-SJQERRSZ.js +1 -0
- package/dist/standalone/chunk-SU6QNITV.js +1 -0
- package/dist/standalone/chunk-T6IV7OKH.js +1 -0
- package/dist/standalone/chunk-UC7MNI2F.js +1 -0
- package/dist/standalone/chunk-UIIKW4II.js +1 -0
- package/dist/standalone/chunk-UJQNKTYE.js +1 -0
- package/dist/standalone/chunk-UVL7N5IL.js +1 -0
- package/dist/standalone/chunk-UYEZR3BI.js +1 -0
- package/dist/standalone/chunk-VCFEO3RI.js +1 -0
- package/dist/standalone/chunk-VDC6JP4A.js +1 -0
- package/dist/standalone/chunk-VENSZ6LF.js +1 -0
- package/dist/standalone/chunk-VESGIGMQ.js +1 -0
- package/dist/standalone/chunk-VJ7RCBJ7.js +1 -0
- package/dist/standalone/chunk-VNMKNORK.js +1 -0
- package/dist/standalone/chunk-VQRCJJXS.js +1 -0
- package/dist/standalone/chunk-VVCXVAA7.js +8 -0
- package/dist/standalone/chunk-VXJJSPX3.js +1 -0
- package/dist/standalone/chunk-WJRYEML4.js +1 -0
- package/dist/standalone/chunk-WUI2PUY6.js +1 -0
- package/dist/standalone/chunk-WVWCUB4S.js +1 -0
- package/dist/standalone/chunk-WVYIBXUH.js +1 -0
- package/dist/standalone/chunk-X4MAMXRE.js +1 -0
- package/dist/standalone/chunk-XBQ66PGW.js +1 -0
- package/dist/standalone/chunk-XGCIDUJF.js +1 -0
- package/dist/standalone/chunk-XKISL2CG.js +1 -0
- package/dist/standalone/chunk-Y3AYVFTK.js +1 -0
- package/dist/standalone/chunk-YZ72ZAGX.js +1 -0
- package/dist/standalone/chunk-ZJQIGWLG.js +1 -0
- package/dist/standalone/chunk-ZKJS6EBE.js +1 -0
- package/dist/standalone/chunk-ZKV2XC5B.js +1 -0
- package/dist/standalone/chunk-ZPNTFCVI.js +1 -0
- package/dist/standalone/studio.js +9 -214
- package/dist/styles.css +2 -2
- package/package.json +26 -22
- package/dist/index.js +0 -41
- package/dist/mount.js +0 -27
- package/dist/packem_chunks/ApiTab.js +0 -251
- package/dist/packem_chunks/AuditPanel.js +0 -200
- package/dist/packem_chunks/ExportImportPanel.js +0 -198
- package/dist/packem_chunks/FileBrowser.js +0 -2932
- package/dist/packem_chunks/FunctionRunner.js +0 -343
- package/dist/packem_chunks/FunctionStatsPanel.js +0 -377
- package/dist/packem_chunks/HealthPanel.js +0 -648
- package/dist/packem_chunks/InsightsPanel.js +0 -462
- package/dist/packem_chunks/LogsPanel.js +0 -827
- package/dist/packem_chunks/MailPanel.js +0 -441
- package/dist/packem_chunks/MetricsPanel.js +0 -1344
- package/dist/packem_chunks/MigrationsPanel.js +0 -239
- package/dist/packem_chunks/PitrPanel.js +0 -252
- package/dist/packem_chunks/SchemaViewer.js +0 -2513
- package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -95
- package/dist/packem_chunks/SettingsPanel.js +0 -391
- package/dist/packem_chunks/SqlEditorPanel.js +0 -2323
- package/dist/packem_chunks/TableEditor.js +0 -313
- package/dist/packem_chunks/analytics-panel.js +0 -261
- package/dist/packem_chunks/auth-config-panel.js +0 -179
- package/dist/packem_chunks/auth-sessions-panel.js +0 -175
- package/dist/packem_chunks/containers-panel.js +0 -247
- package/dist/packem_chunks/dashboards-panel.js +0 -780
- package/dist/packem_chunks/fanout-panel.js +0 -482
- package/dist/packem_chunks/flags-panel.js +0 -176
- package/dist/packem_chunks/kv-browser.js +0 -1896
- package/dist/packem_chunks/log-drains-panel.js +0 -273
- package/dist/packem_chunks/organizations-panel.js +0 -670
- package/dist/packem_chunks/payments-panel.js +0 -186
- package/dist/packem_chunks/permissions-panel.js +0 -805
- package/dist/packem_chunks/queues-panel.js +0 -148
- package/dist/packem_chunks/rls-panel.js +0 -315
- package/dist/packem_chunks/schedule-panel.js +0 -831
- package/dist/packem_chunks/sparkline.js +0 -79
- package/dist/packem_chunks/storage-rules-panel.js +0 -140
- package/dist/packem_chunks/subscriptions-panel.js +0 -238
- package/dist/packem_chunks/users-panel.js +0 -1265
- package/dist/packem_chunks/vector-browser.js +0 -281
- package/dist/packem_chunks/workflows-panel.js +0 -562
- package/dist/packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js +0 -48
- package/dist/packem_shared/ApiDocsPanel-Cu6mD4u7.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-Co_wpRF2.js +0 -230
- package/dist/packem_shared/CommandPalette-BUPpbpMc.js +0 -373
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
- package/dist/packem_shared/DataBrowser-DSNK1tPg.js +0 -4493
- package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/GlobalDataBrowser-ErfvIs1S.js +0 -289
- package/dist/packem_shared/HomePanel-DQk3P8xX.js +0 -14
- package/dist/packem_shared/OpenRpcReferencePanel-DLWzrIx9.js +0 -192
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-ClaNpZsg.js +0 -262
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
- package/dist/packem_shared/Studio-Biu37c3O.js +0 -16
- package/dist/packem_shared/StudioApp-D6a2ZmXS.js +0 -657
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/advisor-view-D3-U4kRR.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/alert-CdAET2K_.js +0 -68
- package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
- package/dist/packem_shared/browser-storage-tLOxkIHd.js +0 -185
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-DURq3ElK.js +0 -175
- package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-Jz8FqQ2C.js +0 -183
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
- package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
- package/dist/packem_shared/error-alert-BBT6D22d.js +0 -114
- package/dist/packem_shared/grid-features-CUr8Z1_O.js +0 -745
- package/dist/packem_shared/home-panel-Bo-Mgrkn.js +0 -1639
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-DTsYVn-g.js +0 -97
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
- package/dist/packem_shared/reference-view-CSKyUyPl.js +0 -2141
- package/dist/packem_shared/select-UkNYCT3s.js +0 -273
- package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
- package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
- package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-C4sgu0F7.js +0 -4015
- package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
- package/dist/packem_shared/table-list-sidebar-B5psdSV1.js +0 -832
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/use-admin-query-BHPKmPuj.js +0 -106
- package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
- package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
- package/dist/standalone/chunk-25VHPD2I.js +0 -1
- package/dist/standalone/chunk-2GGMGPEP.js +0 -1
- package/dist/standalone/chunk-2K47A3P6.js +0 -1
- package/dist/standalone/chunk-2NGUNNGW.js +0 -1
- package/dist/standalone/chunk-3CJW6NWG.js +0 -4
- package/dist/standalone/chunk-3OA7PECS.js +0 -6
- package/dist/standalone/chunk-4H2OJBXO.js +0 -1
- package/dist/standalone/chunk-4MLAVZP4.js +0 -1
- package/dist/standalone/chunk-4QHKBC77.js +0 -1
- package/dist/standalone/chunk-55YA7ZZI.js +0 -76
- package/dist/standalone/chunk-5OH3VPZF.js +0 -1
- package/dist/standalone/chunk-5OIBXYZM.js +0 -1
- package/dist/standalone/chunk-5PQMXK24.js +0 -1
- package/dist/standalone/chunk-6GFEVKJP.js +0 -1
- package/dist/standalone/chunk-764T6X6X.js +0 -1
- package/dist/standalone/chunk-7M3F6U4L.js +0 -1
- package/dist/standalone/chunk-7TJJXVSE.js +0 -1
- package/dist/standalone/chunk-7VF3IAAW.js +0 -2
- package/dist/standalone/chunk-AHILM3ZP.js +0 -1
- package/dist/standalone/chunk-AJIUI7DD.js +0 -1
- package/dist/standalone/chunk-AQGOX5DK.js +0 -1
- package/dist/standalone/chunk-BACPICH6.js +0 -1
- package/dist/standalone/chunk-BET2625I.js +0 -1
- package/dist/standalone/chunk-BQUQS7QN.js +0 -1
- package/dist/standalone/chunk-CKSHCYGC.js +0 -2
- package/dist/standalone/chunk-DCECRP45.js +0 -1
- package/dist/standalone/chunk-DFP2DADO.js +0 -1
- package/dist/standalone/chunk-DORBUITF.js +0 -1
- package/dist/standalone/chunk-DVKPRFIJ.js +0 -1
- package/dist/standalone/chunk-DWDILV2E.js +0 -1
- package/dist/standalone/chunk-E6WUCLSI.js +0 -1
- package/dist/standalone/chunk-E7WLF6IU.js +0 -1
- package/dist/standalone/chunk-EVPLBWUT.js +0 -8
- package/dist/standalone/chunk-FCSPAJW4.js +0 -1
- package/dist/standalone/chunk-FKO3HO6I.js +0 -4
- package/dist/standalone/chunk-G2ICR3DL.js +0 -1
- package/dist/standalone/chunk-GJ6PGSES.js +0 -13
- package/dist/standalone/chunk-GMSGZDDH.js +0 -13
- package/dist/standalone/chunk-GTM65MVX.js +0 -1
- package/dist/standalone/chunk-GVRM4U6W.js +0 -2
- package/dist/standalone/chunk-GZDWDDXN.js +0 -1
- package/dist/standalone/chunk-HV7G6DFP.js +0 -5
- package/dist/standalone/chunk-ISJAJWYI.js +0 -1
- package/dist/standalone/chunk-J6J54MBP.js +0 -1
- package/dist/standalone/chunk-JIDZFLTB.js +0 -4
- package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
- package/dist/standalone/chunk-K3GNLVYK.js +0 -1
- package/dist/standalone/chunk-K4ZDRTQM.js +0 -1
- package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
- package/dist/standalone/chunk-KTK3V4DC.js +0 -1
- package/dist/standalone/chunk-KZ6INM5M.js +0 -1
- package/dist/standalone/chunk-LI43EKM6.js +0 -1
- package/dist/standalone/chunk-MFPTVCJ6.js +0 -1
- package/dist/standalone/chunk-MPYFGAOW.js +0 -1
- package/dist/standalone/chunk-O3NAGRTR.js +0 -1
- package/dist/standalone/chunk-O77VNUFD.js +0 -1
- package/dist/standalone/chunk-PA3LN4XJ.js +0 -1
- package/dist/standalone/chunk-PN5NCZDX.js +0 -1
- package/dist/standalone/chunk-PVZI3CXP.js +0 -19
- package/dist/standalone/chunk-PZ7HD5T2.js +0 -1
- package/dist/standalone/chunk-QAFAJBAW.js +0 -1
- package/dist/standalone/chunk-QBAT52GB.js +0 -1
- package/dist/standalone/chunk-QHIIRFG7.js +0 -1
- package/dist/standalone/chunk-RRCPZMC2.js +0 -22
- package/dist/standalone/chunk-RSEEHNFI.js +0 -1
- package/dist/standalone/chunk-SEU5V7I6.js +0 -1
- package/dist/standalone/chunk-SGDQIWAR.js +0 -4
- package/dist/standalone/chunk-SVR644RF.js +0 -1
- package/dist/standalone/chunk-SYEIXTEU.js +0 -1
- package/dist/standalone/chunk-T5HRXUSY.js +0 -1
- package/dist/standalone/chunk-TAD43CG5.js +0 -1
- package/dist/standalone/chunk-TBMYIZIO.js +0 -1
- package/dist/standalone/chunk-TDL7NEWA.js +0 -1
- package/dist/standalone/chunk-TM7CMA7X.js +0 -1
- package/dist/standalone/chunk-TQ36RWOP.js +0 -1
- package/dist/standalone/chunk-TY7L2V4E.js +0 -1
- package/dist/standalone/chunk-U4OAQPBT.js +0 -1
- package/dist/standalone/chunk-UDSVXA42.js +0 -1
- package/dist/standalone/chunk-UII66UVF.js +0 -1
- package/dist/standalone/chunk-UK64ZSUW.js +0 -1
- package/dist/standalone/chunk-VEZO7G5Q.js +0 -3
- package/dist/standalone/chunk-VLXV72QE.js +0 -1
- package/dist/standalone/chunk-VSHUSN6T.js +0 -1
- package/dist/standalone/chunk-VYMCCC6O.js +0 -1
- package/dist/standalone/chunk-WXPWVBIY.js +0 -1
- package/dist/standalone/chunk-X72PYOEW.js +0 -1
- package/dist/standalone/chunk-X7MMBSNW.js +0 -1
- package/dist/standalone/chunk-XIGIWZLO.js +0 -4
- package/dist/standalone/chunk-XNJNSCLM.js +0 -1
- package/dist/standalone/chunk-XUGSA2NG.js +0 -1
- package/dist/standalone/chunk-Y2ZPNDL7.js +0 -4
- package/dist/standalone/chunk-YM6BBZDN.js +0 -1
- package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
- package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{D as xe,I as Ge,J as Ce,K as Qe,L as Ze,M as et,N as tt,b as Q,d as He,f as qe,l as Xe}from"./chunk-MVWZMWPD.js";import{a as O,c as L,i as Je,w as ve}from"./chunk-AUAECCXB.js";import{a as $e,c as be,d as ie,g as M,i as ge,j as J}from"./chunk-BOMPSVRC.js";import{a as t,c as Mt,d as E,e as k,f as St,g as ae,i as ze}from"./chunk-I26MS5PJ.js";var ht=E(St(),1);var Et=E(k(),1);var Te={};Mt(Te,{Control:()=>Ct,Description:()=>vt,Error:()=>bt,Item:()=>It,Label:()=>Rt,Root:()=>pt,Validity:()=>yt});var P=E(k(),1);var Fe=E(k(),1);var rt="data-valid",ot="data-invalid";var se={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ot={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},it={disabled:!1,...Ot},H={valid(r){return r===null?null:r?{[rt]:""}:{[ot]:""}}};var wt={invalid:void 0,name:void 0,validityData:{state:se,errors:[],error:"",value:"",initialValue:null},setValidityData:M,disabled:void 0,setTouched:M,setDirty:M,setFilled:M,setFocused:M,validationMode:"onSubmit",shouldValidateOnChange:t(()=>!1,"shouldValidateOnChange"),state:it,registerFieldControl:M,validation:{getValidationProps:t((r,e=ge)=>e,"getValidationProps"),inputRef:{current:null},registeredInputs:new Map,registerInput:M,getInputControl:t(()=>null,"getInputControl"),commit:t(async()=>{},"commit"),change:M}},Oe=Fe.createContext(wt);function Y(r=!0){let e=Fe.useContext(Oe);if(e.setValidityData===M&&!r)throw new Error(be(28));return e}t(Y,"useFieldRootContext");var ye=E(k(),1);var _t=ye.createContext(void 0);function nt(r=!1){let e=ye.useContext(_t);if(!e&&!r)throw new Error(be(86));return e}t(nt,"useFieldsetRootContext");var Ie=E(k(),1);var Pt=Ie.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:M,validationMode:"onSubmit",submitCountRef:{current:0}});function Z(){return Ie.useContext(Pt)}t(Z,"useFormContext");var ne=E(k(),1);var Ee=E(k(),1);var we=Ee.createContext({controlId:void 0,registerControlId:M,resetControlId:M,labelId:void 0,setLabelId:M,messageIds:[],setMessageIds:M,getDescriptionProps:t(r=>r,"getDescriptionProps")});function U(){return Ee.useContext(we)}t(U,"useLabelableContext");var at=E(ae(),1);var Ve=t(function(e){let o=Q(),[s,c]=ne.useState(o),[d,l]=ne.useState(),[R,f]=ne.useState([]),u=s===void 0?o:s,a=ie(()=>new Map),{messageIds:b}=U(),C=L((D,I)=>{let x=a.current;I===void 0?x.delete(D):x.set(D,I),c(w=>{if(x.size===0)return w;let A;for(let i of x.values()){if(i===w)return w;A===void 0&&(A=i)}return A})}),g=L(()=>{a.current.size===0&&c(o)}),v=ne.useCallback(D=>{let I=D["aria-describedby"]?D["aria-describedby"].split(" "):[];return I.push(...b,...R),{...D,"aria-describedby":Array.from(new Set(I)).join(" ")||void 0}},[b,R]),N=ne.useMemo(()=>({controlId:u,registerControlId:C,resetControlId:g,labelId:d,setLabelId:l,messageIds:R,setMessageIds:f,getDescriptionProps:v}),[u,C,g,d,l,R,f,v]);return(0,at.jsx)(we.Provider,{value:N,children:e.children})},"LabelableProvider");var _e=E(k(),1);function st(r={}){let{id:e,enabled:o=!0}=r,{controlId:s,registerControlId:c,resetControlId:d}=U(),l=Q(),R=ie(()=>Symbol()),f=_e.useRef(!1),u=_e.useRef(!1),a=L(()=>{!f.current||c===M||(f.current=!1,c(R.current,void 0))});return O(()=>{if(!o||c===M){a();return}let b;if(e!==void 0)u.current=!0,b=e;else if(u.current)b=l;else{d();return}if(b===void 0){a();return}f.current=!0,c(R.current,b)},[e,o,c,d,l,R,a]),O(()=>a,[a]),(o?s:void 0)??e??l}t(st,"useLabelableId");function lt(r,e){let o=Q(r);return O(()=>(e(o),()=>{e(s=>s===o?void 0:s)}),[o,e]),o}t(lt,"useRegisteredLabelId");function dt(r={}){let{id:e,fallbackControlId:o,native:s=!1,setLabelId:c,focusControl:d}=r,{controlId:l,setLabelId:R}=U(),f=L(g=>{R(g),c?.(g)}),u=lt(e,f),a=l??o;function b(g){if(d){d(g,a);return}if(!a)return;let v=ve(g.currentTarget).getElementById(a);Je(v)&&At(v)}t(b,"focusControl");function C(g){qe(g.nativeEvent)?.closest("button,input,select,textarea")||(!g.defaultPrevented&&g.detail>1&&g.preventDefault(),!s&&b(g))}return t(C,"handleInteraction"),s?{id:u,htmlFor:a,onMouseDown:C}:{id:u,onClick:C,onPointerDown(g){g.preventDefault()}}}t(dt,"useLabel");function At(r){r.focus({focusVisible:!0})}t(At,"focusElementWithVisible");var oe=E(k(),1);function le(r,e){return{...r,state:{...r.state,valid:!e&&r.state.valid}}}t(le,"getCombinedFieldValidityData");var Pe=Object.keys(se);function kt(r,e){return r.matches(":disabled")?!1:!e||r.form===e?!0:r.form===null&&!r.hasAttribute("form")}t(kt,"isEligibleInput");function ut(r,e){let o=null;for(let s of r.keys())if(kt(s,e)){if(!s.validity.valid)return s;o??=s}return o}t(ut,"findRepresentativeInput");function ct(r){return{...se,valid:!r,customError:r}}t(ct,"makeState");function Ae(r){return r&&r.validationMessage?[r.validationMessage]:[]}t(Ae,"getNativeErrors");function ft(r){let{elementRef:e,formRef:o}=Z(),{setValidityData:s,validate:c,validityData:d,validationDebounceTime:l,invalid:R,markedDirtyRef:f,state:u,shouldValidateOnChange:a,validationMode:b,registeredFieldIdRef:C}=r,{controlId:g,getDescriptionProps:v}=U(),N=xe(),D=oe.useRef(null),I=ie(()=>new Map).current,x=oe.useRef(0),w=oe.useRef(null),A=oe.useCallback((S,j)=>(I.set(S,j),()=>{I.delete(S)}),[I]),i=L(()=>{let S=ut(I,e.current);return S&&I.get(S)?.controlRef.current||null}),V=L(async(S,j=!1)=>{x.current+=1;let h=x.current;function $(n,m=R){let p=C.current??g;if(p==null)return;let y=o.current.fields.get(p);if(!y)return;let W=le(n,m);o.current.fields.set(p,{...y,validityData:W})}t($,"updateRegisteredFieldValidity");function ee(n,m){let p=n.valid===!1?m:[];return{value:S,state:n,error:p[0]??"",errors:p,initialValue:d.initialValue}}t(ee,"makeValidityData");function te(n,m){let p=n.validity.customError?n.validationMessage:"",y=m.replace(/\r\n?/g,`
|
|
2
|
+
`);n.setCustomValidity(y),w.current=[n,y,p]}t(te,"setCustomValidity");function X(){let n=w.current;w.current=null,n&&(!n[0].willValidate||n[0].validationMessage===n[1])&&n[0].setCustomValidity(n[2])}t(X,"clearCustomValidity");function _(n,m,p){let y=ee(n,m);$(y,p),s(y)}t(_,"publish");function q(n){let m=Pe.reduce((y,W)=>(y[W]=n.validity[W],y),{}),p=!1;for(let y of Pe)if(y!=="valid"){if(y==="valueMissing"&&m[y])p=!0;else if(m[y])return m}return p&&!f.current&&(m.valid=!0,m.valueMissing=!1),m}t(q,"getState");function re(){return I.size>0?ut(I,e.current):D.current}t(re,"resolveRepresentativeInput");let T=re();function G(){return T=re(),T?.willValidate?q(T):ct(!1)}if(t(G,"refreshState"),j){if(u.valid!==!1||!T)return;if(!T.validity.valueMissing){X();let n=re(),m=n?.validity.customError?Ae(n):[];_(ct(m.length>0),m,!1);return}for(let n of Pe)if(n!=="valid"&&n!=="valueMissing"&&n!=="customError"&&T.validity[n])return}N.clear(),X();let B=G(),K=Ae(T),ue=a();if(K.length===0||ue){let n=Array.from(o.current.fields.values()).reduce((y,W)=>(W.name&&(y[W.name]=W.getValue()),y),{}),m=c(S,n),p;if(typeof m=="object"&&m!==null&&"then"in m){if(B.valid===!1?_(B,K):(b==="onSubmit"||!d.state.customError)&&(B.valid=null,_(B,K)),p=await m,h!==x.current)return;B=G()}else p=m;K=p?[].concat(p).filter(Boolean):[],K.length>0?(B.valid=!1,B.customError=!0,T?.willValidate&&te(T,K.join(`
|
|
3
|
+
`))):K=Ae(T)}_(B,K)}),F=L((S,j=!1)=>{if(N.clear(),x.current+=1,j)return;let h=a();h&&S!==""&&l?N.start(l,()=>{V(S)}):V(S,!h)}),z=oe.useCallback((S,j={})=>$e(v(j),u.valid===!1&&!u.disabled&&!S?{"aria-invalid":!0}:ge),[v,u.disabled,u.valid]);return oe.useMemo(()=>({getValidationProps:z,inputRef:D,registeredInputs:I,registerInput:A,getInputControl:i,commit:V,change:F}),[z,I,A,i,V,F])}t(ft,"useFieldValidation");var he=E(k(),1);function mt(r){let{change:e,commit:o,invalid:s,markedDirtyRef:c,name:d,setRegisteredFieldName:l,registeredFieldIdRef:R,setValidityData:f,validityData:u}=r,{formRef:a}=Z(),b=he.useRef(null),C=he.useRef(null),g=he.useRef(!1),v=L(()=>{let i=C.current;if(i)return i.getValue?i.getValue():i.value});function N(i){return i.value===void 0?v():i.value}t(N,"getRegistrationValue");let D=L(()=>{let i=C.current;if(c.current=!0,!i){o(u.value);return}o(N(i))});function I(){let i=C.current;!i||!i.id||a.current.fields.set(i.id,{getValue:v,name:d??i.name,controlRef:i.controlRef,validityData:le(u,s),validate:D})}t(I,"refreshRegistration");function x(i=C.current?.id){i&&a.current.fields.delete(i)}t(x,"deleteRegistration");function w(i){if(g.current)return;g.current=!0;let V=N(i);f(F=>F.initialValue===V?F:{...F,initialValue:V})}t(w,"captureInitialValue"),O(()=>{let i=C.current;!i||!i.id||(l(d?void 0:i.name),a.current.fields.set(i.id,{getValue:v,name:d??i.name,controlRef:i.controlRef,validityData:le(u,s),validate:D}))},[a,v,s,d,l,D,u]),O(()=>{let i=a.current.fields;return()=>{let V=C.current?.id;V&&i.delete(V)}},[a]);let A=L((i,V)=>{if(!V){b.current===i&&(b.current=null,e(void 0,!0),x(),C.current=null,l(void 0),R.current=void 0);return}let F=C.current?.id,z=b.current;z&&z!==i&&e(void 0,!0),b.current=i,C.current=V,d||l(V.name),R.current=V.id,F&&F!==V.id&&x(F),w(V),I()});return[D,A]}t(mt,"useFieldControlRegistration");var De=E(ae(),1);var Ut=P.forwardRef(t(function(e,o){let{errors:s,validationMode:c,submitCountRef:d}=Z(),{render:l,className:R,validate:f,validationDebounceTime:u=0,validationMode:a=c,name:b,disabled:C=!1,invalid:g,dirty:v,touched:N,actionsRef:D,style:I,...x}=e,w=nt(!0)?.disabled,A=L(f||(()=>null)),i=w||C,[V,F]=P.useState(!1),[z,S]=P.useState(!1),[j,h]=P.useState(!1),[$,ee]=P.useState(!1),te=v??z,X=N??V,_=P.useRef(te),q=P.useRef(void 0),[re,T]=P.useState(),G=b??re;O(()=>{v!==void 0&&(_.current=v)},[v]);let B=L(Re=>{v===void 0&&(Re&&(_.current=!0),S(Re))}),K=L(Re=>{N===void 0&&F(Re)}),ue=L(()=>a==="onChange"||a==="onSubmit"&&d.current>0),n=G&&Object.hasOwn(s,G)?s[G]:null,m=!!(Array.isArray(n)?n.length:n),p=g===!0||m,[y,W]=P.useState({state:se,error:"",errors:[],value:null,initialValue:null}),We=!p&&(i?null:y.state.valid),me=P.useMemo(()=>({disabled:i,touched:X,dirty:te,valid:We,filled:j,focused:$}),[i,X,te,We,j,$]),pe=ft({setValidityData:W,validate:A,validityData:y,validationDebounceTime:u,invalid:p,markedDirtyRef:_,state:me,shouldValidateOnChange:ue,validationMode:a,registeredFieldIdRef:q}),[Ye,Ke]=mt({change:pe.change,commit:pe.commit,invalid:p,markedDirtyRef:_,name:b,setRegisteredFieldName:T,registeredFieldIdRef:q,setValidityData:W,validityData:y});P.useImperativeHandle(D,()=>({validate:Ye}),[Ye]);let Lt=P.useMemo(()=>({invalid:p,name:G,validityData:y,setValidityData:W,disabled:i,setTouched:K,setDirty:B,setFilled:h,setFocused:ee,validationMode:a,shouldValidateOnChange:ue,state:me,registerFieldControl:Ke,validation:pe}),[p,G,y,i,K,B,h,ee,a,ue,me,Ke,pe]),Nt=J("div",e,{ref:o,state:me,props:x,stateAttributesMapping:H});return(0,De.jsx)(Oe.Provider,{value:Lt,children:Nt})},"FieldRootInner")),pt=P.forwardRef(t(function(e,o){return(0,De.jsx)(Ve,{children:(0,De.jsx)(Ut,{...e,ref:o})})},"FieldRoot"));var ce=E(k(),1);var Le=E(k(),1);var ke=Le.createContext({disabled:!1});function Ne(){return Le.useContext(ke)}t(Ne,"useFieldItemContext");var Rt=ce.forwardRef(t(function(e,o){let{render:s,className:c,style:d,id:l,nativeLabel:R=!0,...f}=e,u=Y(!1),a=Ne(),{labelId:b}=U(),C={...u.state,disabled:u.disabled||a.disabled},g=ce.useRef(null),v=dt({id:b??l,native:R});return J("label",e,{ref:[o,g],state:C,props:[v,f],stateAttributesMapping:H})},"FieldLabel"));var de=E(k(),1);var Ue=E(ae(),1);var jt={...H,...Xe},bt=de.forwardRef(t(function(e,o){let{render:s,id:c,className:d,match:l,style:R,...f}=e,u=Q(c),{validityData:a,state:b,name:C}=Y(!1),{setMessageIds:g}=U(),{errors:v}=Z(),N=C&&Object.hasOwn(v,C)?v[C]:null,D=!!(Array.isArray(N)?N.length:N),I=typeof l=="string",x=!1;l===!0?x=!0:b.disabled?x=!1:I?x=!!a.state[l]:x=D||a.state.valid===!1;let{mounted:w,transitionStatus:A,setMounted:i}=Ce(x);O(()=>{if(!(!x||!u))return g(_=>_.concat(u)),()=>{g(_=>_.filter(q=>q!==u))}},[x,u,g]);let V=de.useRef(null),[F,z]=de.useState(null),[S,j]=de.useState(null),h=a.error;!I&&D?h=N:a.errors.length>1&&(h=a.errors);let $=h;Array.isArray(h)&&($=h.length>1?(0,Ue.jsx)("ul",{children:h.map(_=>(0,Ue.jsx)("li",{children:_},_))}):h[0]);let ee=Array.isArray(h)?JSON.stringify(h):h;x&&ee!==S&&(j(ee),z($)),Ge({open:x,ref:V,onComplete(){x||i(!1)}});let te={...b,transitionStatus:A},X=J("div",e,{ref:[o,V],state:te,props:[{id:u,children:x?$:F},f],stateAttributesMapping:jt,enabled:w});return w?X:null},"FieldError"));var gt=E(k(),1);var vt=gt.forwardRef(t(function(e,o){let{render:s,id:c,className:d,style:l,...R}=e,f=Q(c),u=Y(!1),a=Ne(),{setMessageIds:b}=U(),C={...u.state,disabled:u.disabled||a.disabled};return O(()=>{if(f)return b(v=>v.concat(f)),()=>{b(v=>v.filter(N=>N!==f))}},[f,b]),J("p",e,{ref:o,state:C,props:[{id:f},R],stateAttributesMapping:H})},"FieldDescription"));var Me=E(k(),1);function xt(r,e,o,s,c=!0,d){let{registerFieldControl:l}=Y(),R=ie(()=>Symbol());O(()=>{let f=R.current;if(!c){l(f,void 0);return}l(f,{controlRef:r,getValue:s,id:e,name:d,value:o})},[r,c,s,e,d,l,R,o]),O(()=>{let f=R.current;return()=>{l(f,void 0)}},[l,R])}t(xt,"useRegisterFieldControl");var Ct=Me.forwardRef(t(function(e,o){let{render:s,className:c,id:d,name:l,value:R,disabled:f=!1,onValueChange:u,defaultValue:a,autoFocus:b=!1,style:C,...g}=e,{state:v,name:N,disabled:D,setTouched:I,setDirty:x,validityData:w,setFocused:A,setFilled:i,validationMode:V,validation:F}=Y(),{clearErrors:z,elementRef:S,submitCountRef:j}=Z(),h=D||f,$=N??l,ee={...v,disabled:h},{labelId:te}=U(),X=st({id:d}),[_]=Qe({controlled:R,default:a,name:"FieldControl",state:"value"}),q=R!==void 0,re=q?_:void 0,T=re==null?void 0:String(re),G=L(()=>F.inputRef.current?.value);xt(F.inputRef,X,T,G,!h,l),O(()=>{let n=T??F.inputRef.current?.value;n!==void 0&&i(n!=="")},[T,F.inputRef,i]),Ze(T,()=>{T!==void 0&&(z($),x(T!==(w.initialValue??"")),F.change(T))});let B=Me.useRef(null),K=xe();return O(()=>{b&&B.current===He(ve(B.current))&&A(!0)},[b,A]),J("input",e,{ref:[o,B],state:ee,props:[{id:X,disabled:h,name:$,ref:F.inputRef,"aria-labelledby":te,autoFocus:b,...q?{value:re}:{defaultValue:a},onChange(n){let m=n.currentTarget.value,p=tt(et.none,n.nativeEvent);u?.(m,p),!q&&(x(m!==(w.initialValue??"")),i(m!==""),!n.nativeEvent.defaultPrevented&&!p.isCanceled&&(z($),F.change(m)))},onFocus(){A(!0)},onBlur(n){if(I(!0),A(!1),V==="onBlur"){let m=n.currentTarget.value;F.commit(m),q&&queueMicrotask(()=>{let p=F.inputRef.current?.value;p!==void 0&&p!==m&&p!==(w.initialValue??"")&&F.commit(p)})}},onKeyDown(n){if(n.currentTarget.tagName==="INPUT"&&n.key==="Enter"){I(!0);let m=n.currentTarget.value,p=n.currentTarget.form;if(p&&p===S.current&&!n.defaultPrevented){let y=n.currentTarget,W=j.current;K.start(0,()=>{j.current===W&&F.commit(y.value)})}else F.commit(m)}}},g,n=>F.getValidationProps(h,n)],stateAttributesMapping:H})},"FieldControl"));var fe=E(k(),1);var Ft=E(ae(),1);var yt=t(function(e){let{children:o}=e,{validityData:s,invalid:c}=Y(!1),d=fe.useMemo(()=>le(s,c),[s,c]),l=d.state.valid===!1,{transitionStatus:R}=Ce(l),f=fe.useMemo(()=>({...d,validity:d.state,transitionStatus:R}),[d,R]);return(0,Ft.jsx)(fe.Fragment,{children:o(f)})},"FieldValidity");var Se=E(k(),1);var je=E(ae(),1);var It=Se.forwardRef(t(function(e,o){let{render:s,className:c,style:d,disabled:l=!1,...R}=e,{state:f,disabled:u}=Y(!1),a=u||l,b={...f,disabled:a},C=Se.useMemo(()=>({disabled:a}),[a]),g=J("div",e,{ref:o,state:b,props:R,stateAttributesMapping:H});return(0,je.jsx)(Ve,{children:(0,je.jsx)(ke.Provider,{value:C,children:g})})},"FieldItem"));var Vt=E(ae(),1);var Be=Et.forwardRef(t(function(e,o){return(0,Vt.jsx)(Te.Control,{ref:o,...e})},"Input"));var Dt=E(ae(),1);function Pi(r){let e=(0,ht.c)(10),o,s,c;e[0]!==r?({className:o,type:c,...s}=r,e[0]=r,e[1]=o,e[2]=s,e[3]=c):(o=e[1],s=e[2],c=e[3]);let d;e[4]!==o?(d=ze("h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",o),e[4]=o,e[5]=d):d=e[5];let l;return e[6]!==s||e[7]!==d||e[8]!==c?(l=(0,Dt.jsx)(Be,{type:c,"data-slot":"input",className:d,...s}),e[6]=s,e[7]=d,e[8]=c,e[9]=l):l=e[9],l}t(Pi,"m");export{H as a,Y as b,Z as c,U as d,st as e,dt as f,Ne as g,xt as h,Pi as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as g}from"./chunk-4ZEL6BYL.js";import{c as k}from"./chunk-DHGPCQ2F.js";import{l as S}from"./chunk-NCCORPSU.js";import{d as _,f as y,g as v,p as C}from"./chunk-74IYYDDI.js";import{a as i,d as N,e as L,f as T,g as F}from"./chunk-I26MS5PJ.js";var w=N(L(),1);var j={},A=y(g.aiGenerateSql),I=y(g.aiTableFilter),O=y(g.aiChartConfig),Q=i(s=>{let e=S(),[l,d]=(0,w.useState)({}),[n,t]=(0,w.useState)({}),a=k(g.aiAvailable,j,{shardKey:s}),[u,c]=(0,w.useState)(!1),x=u||a.data?.available===!1,p=i(o=>{d(r=>({...r,[o]:!0})),t(r=>({...r,[o]:void 0}))},"i"),h=i((o,r)=>{d(b=>({...b,[o]:!1})),r!==void 0&&t(b=>({...b,[o]:r})),r==="no-ai-binding"&&c(!0)},"a"),f=i(async o=>{p("sql");try{let{result:r}=await e.query(A,o,v(s));return h("sql",r.degraded?r.reason:void 0),r.degraded?void 0:r.sql}catch{h("sql","ai-error");return}},"f");return{generate:i(async(o,r)=>f({failedError:r?.error,failedSql:r?.sql,prompt:o}),"generate"),inferChart:i(async o=>{p("chart");try{let{result:r}=await e.query(O,o,v(s));return h("chart",r.degraded?r.reason:void 0),r.degraded?void 0:r.chart}catch{h("chart","ai-error");return}},"inferChart"),pending:i(o=>l[o]===!0,"pending"),reason:i(o=>n[o],"reason"),rewrite:i(async(o,r)=>f({editSql:r,prompt:o}),"rewrite"),suggestFilter:i(async(o,r)=>{p("filter");try{let{result:b}=await e.query(I,{prompt:o,table:r},v(s));return h("filter",b.degraded?b.reason:void 0),b.degraded?void 0:b.clauses}catch{h("filter","ai-error");return}},"suggestFilter"),unavailable:x}},"Q");var q=N(T(),1);var m=N(F(),1);var G=i((s,e)=>{if(e==="")return[{match:!1,offset:0,text:s}];let l=[],d=s.toLowerCase(),n=e.toLowerCase(),t=0;for(let a=d.indexOf(n);a!==-1;a=d.indexOf(n,t))a>t&&l.push({match:!1,offset:t,text:s.slice(t,a)}),l.push({match:!0,offset:a,text:s.slice(a,a+e.length)}),t=a+e.length;return t<s.length&&l.push({match:!1,offset:t,text:s.slice(t)}),l},"N"),U=i(s=>{let e=(0,q.c)(9),{highlight:l,value:d}=s;if(d==null){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,m.jsx)("span",{className:"text-muted-foreground/50 italic",children:"NULL"}),e[0]=c):c=e[0],c}let n,t,a;if(e[1]!==l||e[2]!==d){a=Symbol.for("react.early_return_sentinel");e:{let c=C(d);if(l===void 0||l===""){a=(0,m.jsx)("span",{title:c,children:c});break e}n=c,t=G(c,l).map(z)}e[1]=l,e[2]=d,e[3]=n,e[4]=t,e[5]=a}else n=e[3],t=e[4],a=e[5];if(a!==Symbol.for("react.early_return_sentinel"))return a;let u;return e[6]!==n||e[7]!==t?(u=(0,m.jsx)("span",{title:n,children:t}),e[6]=n,e[7]=t,e[8]=u):u=e[8],u},"v"),P=i(s=>{let e=(0,q.c)(22),{columns:l,rows:d}=s,n=_(),t;e[0]!==n?(t=n("Field"),e[0]=n,e[1]=t):t=e[1];let a;e[2]!==t?(a=(0,m.jsx)("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:t}),e[2]=t,e[3]=a):a=e[3];let u;if(e[4]!==d||e[5]!==n){let f;e[7]!==n?(f=i((o,r)=>(0,m.jsx)("th",{className:"border-b border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase tabular-nums text-muted-foreground",children:n("Row {n}",{n:r+1})},r),"c"),e[7]=n,e[8]=f):f=e[8],u=d.map(f),e[4]=d,e[5]=n,e[6]=u}else u=e[6];let c;e[9]!==a||e[10]!==u?(c=(0,m.jsx)("thead",{className:"sticky top-0 z-10 bg-muted",children:(0,m.jsxs)("tr",{children:[a,u]})}),e[9]=a,e[10]=u,e[11]=c):c=e[11];let x;if(e[12]!==l||e[13]!==d){let f;e[15]!==d?(f=i(o=>(0,m.jsxs)("tr",{className:"hover:bg-muted/40",children:[(0,m.jsx)("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono font-medium whitespace-nowrap",scope:"row",children:o}),d.map((r,b)=>(0,m.jsx)("td",{className:"max-w-md truncate border-b border-border px-3 py-1.5 font-mono",children:(0,m.jsx)(U,{value:r[o]})},b))]},o),"c"),e[15]=d,e[16]=f):f=e[16],x=l.map(f),e[12]=l,e[13]=d,e[14]=x}else x=e[14];let p;e[17]!==x?(p=(0,m.jsx)("tbody",{children:x}),e[17]=x,e[18]=p):p=e[18];let h;return e[19]!==c||e[20]!==p?(h=(0,m.jsx)("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"db-transposed",children:(0,m.jsxs)("table",{className:"border-collapse text-xs",children:[c,p]})}),e[19]=c,e[20]=p,e[21]=h):h=e[21],h},"T"),V=i(({children:s,layout:e="card",testId:l})=>(0,m.jsx)("div",{className:e==="fill"?"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-border":"overflow-x-auto border border-border bg-card","data-testid":l,children:s}),"j");function z(s){return(0,m.jsx)("mark",{className:s.match?"rounded-sm bg-warning/40 text-foreground":"bg-transparent text-inherit",children:s.text},s.offset)}i(z,"_");export{Q as a,U as b,P as c,V as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as pe,d as ne,e as kt,f as me}from"./chunk-NRP22GKC.js";import{a as de,b as Ut}from"./chunk-UC7MNI2F.js";import{D as gt,b as ie,c as fe,e as Lt,f as ue}from"./chunk-MVWZMWPD.js";import{a as ht,c as lt}from"./chunk-AUAECCXB.js";import{c as At,j as X}from"./chunk-BOMPSVRC.js";import{a as o,c as Ge,d as O,e as Q,f as Ke,g as _t,i as oe}from"./chunk-I26MS5PJ.js";var je=O(Ke(),1);var at={};Ge(at,{Content:()=>Le,Corner:()=>Fe,Root:()=>ye,Scrollbar:()=>_e,Thumb:()=>ke,Viewport:()=>We});var s=O(Q(),1);var $t=O(Q(),1);var le=$t.createContext(void 0);function j(){let e=$t.useContext(le);if(e===void 0)throw new Error(At(53));return e}o(j,"useScrollAreaRootContext");function I(e,t,l){if(!e)return 0;let v=getComputedStyle(e),g=`${t}${l==="x"?"Inline":"Block"}`,p=parseFloat(v[`${g}Start`]);return l==="x"&&t==="margin"?p*2:p+parseFloat(v[`${g}End`])}o(I,"getOffset");var he="data-has-overflow-x",Se="data-has-overflow-y",xe="data-overflow-x-start",be="data-overflow-x-end",Re="data-overflow-y-start",we="data-overflow-y-end";var Et=o(e=>t=>t?{[e]:""}:null,"attr"),st={hasOverflowX:Et(he),hasOverflowY:Et(Se),overflowXStart:Et(xe),overflowXEnd:Et(be),overflowYStart:Et(Re),overflowYEnd:Et(we),cornerHidden:o(()=>null,"cornerHidden")};var Ft="--scroll-area-corner-height",jt="--scroll-area-corner-width";var Ae="data-orientation";var Ee=O(_t(),1);var Je={x:0,y:0},ge={width:0,height:0},Qe={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},tr={x:!0,y:!0,corner:!0},ye=s.forwardRef(o(function(t,l){let{render:v,className:g,overflowEdgeThreshold:p,style:x,...c}=t,{xStart:m,xEnd:b,yStart:E,yEnd:P}=er(p),_=ie(),y=gt(),T=gt(),{nonce:L,disableStyleElements:U}=me(),[it,k]=s.useState(!1),[B,tt]=s.useState(!1),[et,rt]=s.useState(!1),[ft,M]=s.useState(!1),[xt,d]=s.useState(!1),[$,G]=s.useState(ge),[bt,ut]=s.useState(ge),[R,ot]=s.useState(Qe),[H,h]=s.useState(tr),K=s.useRef(null),n=s.useRef(null),a=s.useRef(null),f=s.useRef(null),u=s.useRef(null),S=s.useRef(null),F=s.useRef(null),A=s.useRef(null),C=s.useRef(0),N=s.useRef(0),Z=s.useRef(0),dt=s.useRef(0),D=s.useRef("vertical"),Y=s.useRef(Je),W=s.useRef(null);function z(r){let i=r?rt:tt,w=r?y:T;i(!0),w.start(500,()=>{i(!1)})}o(z,"startScrolling");let q=lt(r=>{let i=r.x-Y.current.x,w=r.y-Y.current.y;Y.current=r,w!==0&&z(!0),i!==0&&z(!1)}),J=lt(()=>{let r=n.current;r&&W.current===null&&(W.current=r.style.scrollSnapType,r.style.scrollSnapType="none")}),Mt=lt(r=>{if(r.button!==0||A.current!==null&&(D.current==="vertical"?u.current:S.current)?.hasPointerCapture(A.current))return;A.current=r.pointerId,C.current=r.clientY,N.current=r.clientX,D.current=r.currentTarget.getAttribute(Ae);let i=n.current;i&&(Z.current=i.scrollTop,dt.current=i.scrollLeft,J()),(D.current==="vertical"?u.current:S.current)?.setPointerCapture(r.pointerId)}),yt=lt(r=>{if(r.pointerId!==A.current)return;A.current=null,(D.current==="vertical"?rt:tt)(!1),W.current!==null&&(n.current&&(n.current.style.scrollSnapType=W.current),W.current=null);let i=D.current==="vertical"?u.current:S.current;i?.hasPointerCapture(r.pointerId)&&i.releasePointerCapture(r.pointerId)}),Rt=lt(r=>{if(r.pointerId!==A.current)return;if(r.buttons%2===0){yt(r);return}let i=n.current;if(!i)return;let w=D.current==="vertical",nt=w?u.current:S.current,vt=w?a.current:f.current;if(!nt||!vt)return;let Dt=w?"y":"x",Yt=I(vt,"padding",Dt),Xt=I(nt,"margin",Dt),Pt=w?nt.offsetHeight:nt.offsetWidth,Ot=(w?vt.offsetHeight:vt.offsetWidth)-Pt-Yt-Xt,Wt=w?r.clientY-C.current:r.clientX-N.current,ee=Ot<=0?0:Wt/Ot,re=w?i.scrollHeight:i.scrollWidth,Tt=w?i.clientHeight:i.clientWidth,It=(w?Z.current:dt.current)+ee*(re-Tt);w?i.scrollTop=It:i.scrollLeft=It,r.preventDefault(),z(w)});function wt(r){M(r.pointerType==="touch")}o(wt,"handleTouchModalityChange");function pt(r){if(wt(r),r.pointerType!=="touch"){let i=Lt(K.current,r.target);k(i)}}o(pt,"handlePointerEnterOrMove");let mt=s.useMemo(()=>({scrolling:B||et,hasOverflowX:!H.x,hasOverflowY:!H.y,overflowXStart:R.xStart,overflowXEnd:R.xEnd,overflowYStart:R.yStart,overflowYEnd:R.yEnd,cornerHidden:H.corner}),[B,et,H.x,H.y,H.corner,R]),Ct={role:"presentation",onPointerEnter:pt,onPointerMove:pt,onPointerDown:wt,onPointerLeave(){k(!1)},style:{position:"relative",[Ft]:`${$.height}px`,[jt]:`${$.width}px`}},Ht=X("div",t,{state:mt,ref:[l,K],props:[Ct,c],stateAttributesMapping:st}),Qt=s.useMemo(()=>({handlePointerDown:Mt,handlePointerMove:Rt,handlePointerUp:yt,handleScroll:q,disableViewportSnap:J,cornerSize:$,setCornerSize:G,thumbSize:bt,setThumbSize:ut,hasMeasuredScrollbar:xt,setHasMeasuredScrollbar:d,touchModality:ft,cornerRef:F,scrollingX:B,scrollingY:et,hovering:it,setHovering:k,viewportRef:n,scrollbarYRef:a,scrollbarXRef:f,thumbYRef:u,thumbXRef:S,rootId:_,hiddenState:H,setHiddenState:h,overflowEdges:R,setOverflowEdges:ot,viewportState:mt,overflowEdgeThreshold:{xStart:m,xEnd:b,yStart:E,yEnd:P}}),[Mt,Rt,yt,q,J,$,bt,xt,ft,B,et,it,_,H,R,mt,m,b,E,P]);return(0,Ee.jsxs)(le.Provider,{value:Qt,children:[!U&&kt.getElement(L),Ht]})},"ScrollAreaRoot"));function er(e){let t=typeof e=="number"?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}o(er,"normalizeOverflowEdgeThreshold");var St=O(Q(),1);var Bt=O(Q(),1);var se=Bt.createContext(void 0);function Ce(){let e=Bt.useContext(se);if(e===void 0)throw new Error(At(55));return e}o(Ce,"useScrollAreaViewportContext");var Oe="--scroll-area-overflow-x-start",Te="--scroll-area-overflow-x-end",Ne="--scroll-area-overflow-y-start",Ve="--scroll-area-overflow-y-end";var Gt="--scroll-area-thumb-height",Kt="--scroll-area-thumb-width";var Xe=O(_t(),1);var Pe=[Oe,Te,Ne,Ve],De=!1;function or(){De||fe.engine.webkit||(typeof CSS<"u"&&"registerProperty"in CSS&&Pe.forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),De=!0)}o(or,"removeCSSVariableInheritance");var We=St.forwardRef(o(function(t,l){let{render:v,className:g,style:p,...x}=t,{viewportRef:c,scrollbarYRef:m,scrollbarXRef:b,thumbYRef:E,thumbXRef:P,cornerRef:_,cornerSize:y,setCornerSize:T,setThumbSize:L,rootId:U,setHiddenState:it,hiddenState:k,setHasMeasuredScrollbar:B,handleScroll:tt,touchModality:et,setHovering:rt,setOverflowEdges:ft,overflowEdgeThreshold:M,viewportState:xt}=j(),d=Ut(),$=St.useRef(!0),G=St.useRef([NaN,NaN,NaN,NaN]),bt=gt(),ut=gt(),R=lt(()=>{let n=c.current,a=m.current,f=b.current,u=E.current,S=P.current,F=_.current;if(!n)return;let A=n.scrollHeight,C=n.scrollWidth,N=n.clientHeight,Z=n.clientWidth,dt=n.scrollTop,D=n.scrollLeft,Y=G.current,W=Number.isNaN(Y[0]);if(Y[0]=N,Y[1]=A,Y[2]=Z,Y[3]=C,W&&B(!0),A===0||C===0)return;let z=nr(n),q=z.y,J=z.x,Mt=Z/C,yt=N/A,Rt=Math.max(0,C-Z),wt=Math.max(0,A-N),pt=0,mt=0;J||(pt=ne(d==="rtl"?-D:D,Rt),mt=Rt-pt);let Ct=q?0:ne(dt,wt),Ht=q?0:wt-Ct,Qt=J?0:Z,r=q?0:N,i=0,w=0;!J&&!q&&(i=a?.offsetWidth||0,w=f?.offsetHeight||0);let nt=y.width===0&&y.height===0,vt=nt?i:0,Dt=nt?w:0,Yt=I(f,"padding","x"),Xt=I(a,"padding","y"),Pt=I(S,"margin","x"),te=I(u,"margin","y"),Ot=Qt-Yt-Pt,Wt=r-Xt-te,ee=f?Math.min(f.offsetWidth-vt,Ot):Ot,re=a?Math.min(a.offsetHeight-Dt,Wt):Wt,Tt=Math.max(16,ee*Mt),zt=Math.max(16,re*yt);if(L(V=>Zt(V,{width:Tt,height:zt})),a&&u){let V=a.offsetHeight-zt-Xt-te,Nt=Ye(u,Gt,dt,wt,A,zt,V);u.style.transform=`translate3d(0,${Nt}px,0)`}if(f&&S){let V=f.offsetWidth-Tt-Yt-Pt,Nt=d==="rtl"?-D:D,ce=Ye(S,Kt,Nt,Rt,C,Tt,V);S.style.transform=`translate3d(${d==="rtl"?-ce:ce}px,0,0)`}let It=[pt,mt,Ct,Ht];Pe.forEach((V,Nt)=>{n.style.setProperty(V,`${It[Nt]}px`)}),F&&T(V=>Zt(V,{width:i,height:w})),it(V=>Zt(V,z));let Be={xStart:!J&&pt>M.xStart,xEnd:!J&&mt>M.xEnd,yStart:!q&&Ct>M.yStart,yEnd:!q&&Ht>M.yEnd};ft(V=>Zt(V,Be))});ht(()=>{or()},[]),ht(()=>{queueMicrotask(R)},[R,k,d,M.xStart,M.xEnd,M.yStart,M.yEnd]),ht(()=>{c.current?.matches(":hover")&&rt(!0)},[c,rt]),ht(()=>{let n=c.current;if(typeof ResizeObserver>"u"||!n)return;let a=!1,f=new ResizeObserver(()=>{if(!a){a=!0;let u=G.current;if(u[0]===n.clientHeight&&u[1]===n.scrollHeight&&u[2]===n.clientWidth&&u[3]===n.scrollWidth)return}R()});return f.observe(n),ut.start(0,()=>{let u=n.getAnimations({subtree:!0});u.length!==0&&Promise.allSettled(u.map(S=>S.finished)).then(R).catch(()=>{})}),()=>{f.disconnect(),ut.clear()}},[R,c,ut]);function ot(){$.current=!1}o(ot,"handleUserInteraction");let H={role:"presentation",...U&&{"data-id":`${U}-viewport`},tabIndex:k.x&&k.y?-1:0,className:kt.className,style:{overflow:"scroll"},onScroll(){c.current&&(R(),(et||!$.current)&&tt({x:c.current.scrollLeft,y:c.current.scrollTop}),bt.start(100,()=>{$.current=!0}))},onWheel:ot,onPointerMove:ot,onPointerEnter:ot,onKeyDown:ot},h=X("div",t,{ref:[l,c],state:xt,props:[H,x],stateAttributesMapping:st}),K=St.useMemo(()=>({computeThumbPosition:R}),[R]);return(0,Xe.jsx)(se.Provider,{value:K,children:h})},"ScrollAreaViewport"));function nr(e){let t=e.clientHeight>=e.scrollHeight,l=e.clientWidth>=e.scrollWidth;return{y:t,x:l,corner:t||l}}o(nr,"getHiddenState");function Zt(e,t){for(let l in t)if(e[l]!==t[l])return t;return e}o(Zt,"pickState");function Ye(e,t,l,v,g,p,x){let c=pe(l,0,v),m=l-c,b=Math.max(16,p*g/(g+Math.abs(m)));return e.style.setProperty(t,m?`${b}px`:""),(v?c/v*x:0)+(m>0?p-b:0)}o(Ye,"applyOverscrollThumb");var Jt=O(Q(),1);var qt=O(Q(),1);var ae=qt.createContext(void 0);function ze(){let e=qt.useContext(ae);if(e===void 0)throw new Error(At(54));return e}o(ze,"useScrollAreaScrollbarContext");var Ie=O(_t(),1);var _e=Jt.forwardRef(o(function(t,l){let{render:v,className:g,orientation:p="vertical",keepMounted:x=!1,style:c,...m}=t,{hovering:b,scrollingX:E,scrollingY:P,hiddenState:_,scrollbarYRef:y,scrollbarXRef:T,viewportRef:L,thumbYRef:U,thumbXRef:it,handlePointerDown:k,handlePointerUp:B,handleScroll:tt,disableViewportSnap:et,rootId:rt,thumbSize:ft,hasMeasuredScrollbar:M,viewportState:xt}=j(),d=p==="vertical",$={...xt,hovering:b,scrolling:d?P:E,orientation:p},G=Ut(),bt=!M&&!x,ut=d?_.y:_.x,R=x||!ut;Jt.useEffect(()=>{if(!R)return;let h=L.current,K=d?y.current:T.current;if(!K)return;function n(a){if(!h||a.ctrlKey)return;let f=!d,u=f?"scrollLeft":"scrollTop",S=f?a.deltaX:a.deltaY;if(S===0)return;let F=f?h.scrollWidth-h.clientWidth:h.scrollHeight-h.clientHeight,A=f&&G==="rtl"?-F:0,C=f&&G==="rtl"?0:F,N=h[u];N<=A&&S<0||N>=C&&S>0||(a.preventDefault(),h[u]=Math.min(C,Math.max(A,N+S)),tt({x:h.scrollLeft,y:h.scrollTop}))}return o(n,"handleWheel"),de(K,"wheel",n,{passive:!1})},[G,tt,d,T,y,R,L]);let ot={...rt&&{"data-id":`${rt}-scrollbar`},"aria-hidden":!0,onPointerDown(h){if(h.button!==0)return;let K=ue(h.nativeEvent),n=d?U.current:it.current;if(n&&Lt(n,K))return;let a=L.current;if(!a)return;let f=d?y.current:T.current;if(!n||!f)return;let u=d?"y":"x",S=I(n,"margin",u),F=I(f,"padding",u),A=d?n.offsetHeight:n.offsetWidth,C=f.getBoundingClientRect(),N=d?h.clientY-C.top-A/2-F+S/2:h.clientX-C.left-A/2-F+S/2,Z=d?a.scrollHeight:a.scrollWidth,dt=d?a.clientHeight:a.clientWidth,Y=(d?f.offsetHeight:f.offsetWidth)-A-F-S;if(Y<=0)return;let W=N/Y,z=Z-dt;et(),d?a.scrollTop=W*z:G==="rtl"?a.scrollLeft=-(1-W)*z:a.scrollLeft=W*z,tt({x:a.scrollLeft,y:a.scrollTop}),k(h)},onMouseDown(h){h.preventDefault()},onPointerUp:B,onPointerCancel:B,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:bt?"hidden":void 0,...d?{top:0,bottom:`var(${Ft})`,insetInlineEnd:0,[Gt]:`${ft.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${jt})`,bottom:0,[Kt]:`${ft.width}px`}}},H=X("div",t,{ref:[l,d?y:T],state:$,props:[ot,m],stateAttributesMapping:st});return R?(0,Ie.jsx)(ae.Provider,{value:p,children:H}):null},"ScrollAreaScrollbar"));var Vt=O(Q(),1);var Le=Vt.forwardRef(o(function(t,l){let{render:v,className:g,style:p,...x}=t,{computeThumbPosition:c}=Ce(),{hasMeasuredScrollbar:m,viewportState:b}=j(),E=Vt.useRef(null),P=Vt.useRef(m);return ht(()=>{if(typeof ResizeObserver>"u")return;let y=!1,T=new ResizeObserver(()=>{!y&&(y=!0,!P.current)||c()});return E.current&&T.observe(E.current),()=>{T.disconnect()}},[c]),X("div",t,{ref:[l,E],state:b,stateAttributesMapping:st,props:[{role:"presentation",style:{minWidth:"fit-content"}},x]})},"ScrollAreaContent"));var Ue=O(Q(),1);var ke=Ue.forwardRef(o(function(t,l){let{render:v,className:g,style:p,...x}=t,{thumbYRef:c,thumbXRef:m,handlePointerDown:b,handlePointerMove:E,handlePointerUp:P,scrollingX:_,scrollingY:y,hasMeasuredScrollbar:T}=j(),L=ze(),U=L==="vertical";return X("div",t,{ref:[l,U?c:m],state:{scrolling:U?y:_,orientation:L},props:[{onPointerDown:b,onPointerMove:E,onPointerUp:P,onPointerCancel:P,style:{visibility:T?void 0:"hidden",...U?{height:"var(--scroll-area-thumb-height)"}:{width:"var(--scroll-area-thumb-width)"}}},x]})},"ScrollAreaThumb"));var $e=O(Q(),1);var Fe=$e.forwardRef(o(function(t,l){let{render:v,className:g,style:p,...x}=t,{cornerRef:c,cornerSize:m,hiddenState:b}=j(),E=X("div",t,{ref:[l,c],props:[{"aria-hidden":!0,style:{position:"absolute",bottom:0,insetInlineEnd:0,width:m.width,height:m.height}},x]});return b.corner?null:E},"ScrollAreaCorner"));var ct=O(_t(),1);function No(e){let t=(0,je.c)(14),l,v,g;t[0]!==e?({className:v,children:l,...g}=e,t[0]=e,t[1]=l,t[2]=v,t[3]=g):(l=t[1],v=t[2],g=t[3]);let p;t[4]!==v?(p=oe("relative",v),t[4]=v,t[5]=p):p=t[5];let x;t[6]!==l?(x=(0,ct.jsx)(at.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:l}),t[6]=l,t[7]=x):x=t[7];let c,m;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=(0,ct.jsx)(lr,{}),m=(0,ct.jsx)(at.Corner,{}),t[8]=c,t[9]=m):(c=t[8],m=t[9]);let b;return t[10]!==g||t[11]!==p||t[12]!==x?(b=(0,ct.jsxs)(at.Root,{"data-slot":"scroll-area",className:p,...g,children:[x,c,m]}),t[10]=g,t[11]=p,t[12]=x,t[13]=b):b=t[13],b}o(No,"z");function lr({className:e,orientation:t="vertical",...l}){return(0,ct.jsx)(at.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:oe("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent",e),...l,children:(0,ct.jsx)(at.Thumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-md bg-border"})})}o(lr,"h");export{No as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as D}from"./chunk-5SLTDY4C.js";import{a as k}from"./chunk-6XKL22OG.js";import"./chunk-FUYEZFBP.js";import"./chunk-OQ6I6OXT.js";import"./chunk-SJQERRSZ.js";import"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as N}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as B}from"./chunk-ZJQIGWLG.js";import"./chunk-NCPW7WHO.js";import"./chunk-IRSSZXC3.js";import"./chunk-55UGUCQ6.js";import{a as u}from"./chunk-4ZEL6BYL.js";import{c as p}from"./chunk-DHGPCQ2F.js";import{e as R}from"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as S}from"./chunk-RWVIV3U7.js";import{a as A,b as C,c as P,d as b,e as l,f as n}from"./chunk-HCTJKP5J.js";import{a as v,e as w}from"./chunk-2IKDEUCX.js";import{d as j,u as I}from"./chunk-74IYYDDI.js";import{a as m,d as H,g as Q}from"./chunk-I26MS5PJ.js";var e=H(Q(),1);var _="payment_subscriptions",O="payment_events",V=[_,O],Y={},E=new Set(["active","trialing"]),z=new Set(["past_due","unpaid"]),s=m((a,t)=>{if(a[t]!==void 0)return a[t];let h=a.__doc__;return typeof h=="string"?R(h)?.[t]:void 0},"a"),o=m(a=>typeof a=="string"?a:typeof a=="number"||typeof a=="bigint"||typeof a=="boolean"?String(a):"","s"),J=m(a=>E.has(a)?"default":z.has(a)?"destructive":"outline","q"),ie=m(({limit:a=100})=>{let t=j(),h=k(),{data:x}=p(u.listTables,Y,{live:!0}),F=x!==void 0,L=Array.isArray(x)&&V.every(r=>x.some(d=>d.name===r)),c=h.payments&&L,i=p(u.readTablePage,{filters:[],limit:a,offset:0,orderBy:{column:"updatedAt",direction:"desc"},search:"",table:_},{enabled:c}),f=p(u.readTablePage,{filters:[],limit:25,offset:0,orderBy:{column:"processedAt",direction:"desc"},search:"",table:O},{enabled:c}),g=p(u.facetColumn,{column:"state",table:_},{enabled:c});D(()=>{if(c)return Promise.all([i.poll(),f.poll(),g.poll()])},!0);let y=i.data?.rows??[],M=f.data?.rows??[],U=i.error??f.error,q=i.error===null?f.errorSource:i.errorSource,G=i.data?.total??y.length,T=g.data?.values===void 0?y.filter(r=>E.has(o(s(r,"state")))).length:g.data.values.reduce((r,d)=>r+(E.has(o(d.value))?d.count:0),0);return F&&!c?(0,e.jsx)("div",{className:"flex flex-col gap-4","data-testid":"payments-panel",children:(0,e.jsx)(S,{description:t("No @lunora/payment tables found in this deployment. Add `.extend(paymentExtension)` to lunora/schema.ts and wire `payment` on createShardDO() to sync customers and subscriptions."),testId:"payments-unconfigured",title:t("No payments configured")})}):(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"payments-panel",children:[(0,e.jsx)("div",{className:"flex items-center gap-2","data-testid":"payments-summary",children:(0,e.jsxs)(v,{className:"justify-between gap-0 py-0",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[(0,e.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Subscriptions")}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:T}),(0,e.jsx)(N,{variant:"default",children:t("{count} active",{count:T})})]})]}),(0,e.jsx)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:t("{total} total",{total:G})})]})}),U===null?void 0:(0,e.jsx)(B,{error:q}),y.length===0&&!i.isLoading?(0,e.jsx)(S,{testId:"payments-empty",title:t("No subscriptions yet")}):(0,e.jsx)(v,{className:"overflow-hidden py-0",children:(0,e.jsx)(w,{className:"px-0",children:(0,e.jsxs)(A,{children:[(0,e.jsx)(C,{children:(0,e.jsxs)(b,{children:[(0,e.jsx)(l,{children:t("Provider")}),(0,e.jsx)(l,{children:t("Reference")}),(0,e.jsx)(l,{children:t("Plan")}),(0,e.jsx)(l,{children:t("State")}),(0,e.jsx)(l,{children:t("Renews")})]})}),(0,e.jsx)(P,{children:y.map(r=>{let d=o(s(r,"state"));return(0,e.jsxs)(b,{"data-testid":"payment-subscription-row",children:[(0,e.jsx)(n,{children:o(s(r,"provider"))}),(0,e.jsx)(n,{children:o(s(r,"referenceId"))}),(0,e.jsx)(n,{children:o(s(r,"priceId"))}),(0,e.jsx)(n,{children:(0,e.jsx)(N,{variant:J(d),children:d})}),(0,e.jsx)(n,{children:I(s(r,"currentPeriodEnd"))})]},o(s(r,"providerSubscriptionId")))})})]})})}),(0,e.jsxs)(v,{className:"overflow-hidden py-0",children:[(0,e.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,e.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Recent webhook events")})}),(0,e.jsx)(w,{className:"px-0",children:(0,e.jsx)(A,{children:(0,e.jsx)(P,{children:M.map(r=>(0,e.jsxs)(b,{"data-testid":"payment-event-row",children:[(0,e.jsx)(n,{children:o(s(r,"provider"))}),(0,e.jsx)(n,{className:"font-medium",children:o(s(r,"type"))}),(0,e.jsx)(n,{className:"text-muted-foreground",children:o(s(r,"providerEventId"))}),(0,e.jsx)(n,{children:I(s(r,"processedAt"))})]},o(s(r,"providerEventId"))))})})})]})]})},"oe");export{ie as PaymentsPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as H}from"./chunk-5SLTDY4C.js";import{b as x}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{b as z}from"./chunk-DHGPCQ2F.js";import{l as O}from"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as _}from"./chunk-RWVIV3U7.js";import{a as q,b as B,c as E,d as S,e as i,f as s}from"./chunk-HCTJKP5J.js";import{a as A,e as L}from"./chunk-2IKDEUCX.js";import{d as W}from"./chunk-74IYYDDI.js";import{a as R,d as M,f as $,g as D}from"./chunk-I26MS5PJ.js";var I=M($(),1);var n=M(D(),1);var F=2e3,G=new Set(["open"]),ie=R(Q=>{let e=(0,I.c)(41),{read:y}=Q,t=W(),j=O(),v;e[0]!==j||e[1]!==y?(v=R(()=>Promise.resolve(y?y():j.debug()),"T"),e[0]=j,e[1]=y,e[2]=v):v=e[2];let V=v,K=y?"injected":"live",b;e[3]!==K?(b=["lunora-studio","sync-client-debug",K],e[3]=K,e[4]=b):b=e[4];let{data:c,poll:Y}=z(b,V);if(H(Y,!0,F),!c){let r;e[5]!==t?(r=t("Reading the sync client's state\u2026"),e[5]=t,e[6]=r):r=e[6];let g;e[7]!==t?(g=t("Sync client"),e[7]=t,e[8]=g):g=e[8];let T;return e[9]!==r||e[10]!==g?(T=(0,n.jsx)(A,{children:(0,n.jsx)(L,{children:(0,n.jsx)(_,{description:r,title:g})})}),e[9]=r,e[10]=g,e[11]=T):T=e[11],T}let{pendingWrites:k,shards:N,subscriptions:w}=c,l;e[12]!==t?(l=t("This Studio session's sync client"),e[12]=t,e[13]=l):l=e[13];let a;e[14]!==l?(a=(0,n.jsx)("span",{className:"text-sm font-medium",children:l}),e[14]=l,e[15]=a):a=e[15];let P=c.connectionStatus==="connected"?"default":"secondary",o;e[16]!==c.connectionStatus||e[17]!==P?(o=(0,n.jsx)(x,{variant:P,children:c.connectionStatus}),e[16]=c.connectionStatus,e[17]=P,e[18]=o):o=e[18];let d;e[19]!==k||e[20]!==t?(d=k>0?(0,n.jsx)(x,{variant:"secondary",children:t("{count} pending writes",{count:k})}):null,e[19]=k,e[20]=t,e[21]=d):d=e[21];let h;e[22]!==a||e[23]!==o||e[24]!==d?(h=(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[a,o,d]}),e[22]=a,e[23]=o,e[24]=d,e[25]=h):h=e[25];let u;e[26]!==t?(u=t("Reads client.debug() for the client running in this page \u2014 not your application's client. Call client.debug() in your app to diagnose a specific stuck overlay there."),e[26]=t,e[27]=u):u=e[27];let m;e[28]!==u?(m=(0,n.jsx)("p",{className:"text-muted-foreground text-xs",children:u}),e[28]=u,e[29]=m):m=e[29];let p;e[30]!==N||e[31]!==t?(p=N.length===0?(0,n.jsx)(_,{description:t("No shard connection has been opened yet."),title:t("No shards")}):(0,n.jsxs)(q,{children:[(0,n.jsx)(B,{children:(0,n.jsxs)(S,{children:[(0,n.jsx)(i,{children:t("Shard")}),(0,n.jsx)(i,{children:t("Socket")}),(0,n.jsx)(i,{children:t("Confirmed watermark")})]})}),(0,n.jsx)(E,{children:N.map(r=>(0,n.jsxs)(S,{children:[(0,n.jsx)(s,{children:r.shardKey??t("(default)")}),(0,n.jsx)(s,{children:(0,n.jsx)(x,{variant:G.has(r.wsState)?"default":"secondary",children:r.wsState})}),(0,n.jsx)(s,{children:r.confirmedMutationWatermark})]},r.shardKey??"__default__"))})]}),e[30]=N,e[31]=t,e[32]=p):p=e[32];let f;e[33]!==w||e[34]!==t?(f=w.length===0?(0,n.jsx)(_,{description:t("This client holds no live queries or shapes."),title:t("No subscriptions")}):(0,n.jsxs)(q,{children:[(0,n.jsx)(B,{children:(0,n.jsxs)(S,{children:[(0,n.jsx)(i,{children:t("Subscription")}),(0,n.jsx)(i,{children:t("Kind")}),(0,n.jsx)(i,{children:t("Acked")}),(0,n.jsx)(i,{children:t("Cursor")}),(0,n.jsx)(i,{children:t("Pending overlays")})]})}),(0,n.jsx)(E,{children:w.map(r=>(0,n.jsxs)(S,{children:[(0,n.jsx)(s,{className:"font-mono text-xs",children:r.functionPath}),(0,n.jsx)(s,{children:r.kind}),(0,n.jsx)(s,{children:(0,n.jsx)(x,{variant:r.acked?"default":"secondary",children:r.acked?t("yes"):t("no")})}),(0,n.jsx)(s,{children:r.serverCursor??"\u2014"}),(0,n.jsx)(s,{children:r.pendingOptimisticLayers})]},r.id))})]}),e[33]=w,e[34]=t,e[35]=f):f=e[35];let C;return e[36]!==m||e[37]!==p||e[38]!==f||e[39]!==h?(C=(0,n.jsx)(A,{children:(0,n.jsxs)(L,{className:"flex flex-col gap-4",children:[h,m,p,f]})}),e[36]=m,e[37]=p,e[38]=f,e[39]=h,e[40]=C):C=e[40],C},"ie");export{ie as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as p}from"./chunk-55UGUCQ6.js";import{d as f}from"./chunk-74IYYDDI.js";import{a as v,d,f as g,g as h}from"./chunk-I26MS5PJ.js";var x=d(g(),1);var c=d(h(),1);var y=v(b=>{let e=(0,x.c)(14),{message:i,prefix:n}=b,r=f(),t=p(),l;e[0]!==t?(l=v(()=>{t?.openConsole({errorsOnly:!0})},"l"),e[0]=t,e[1]=l):l=e[1];let u=l;if(i===void 0)return null;let m=`${n}-live-error`,o;e[2]!==i||e[3]!==r?(o=r("Live unavailable: {liveError}",{liveError:i}),e[2]=i,e[3]=r,e[4]=o):o=e[4];let s;e[5]!==t||e[6]!==n||e[7]!==u||e[8]!==r?(s=t===void 0?null:(0,c.jsx)("button",{className:"underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":`${n}-live-error-console`,onClick:u,type:"button",children:r("Show in console")}),e[5]=t,e[6]=n,e[7]=u,e[8]=r,e[9]=s):s=e[9];let a;return e[10]!==m||e[11]!==o||e[12]!==s?(a=(0,c.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-destructive","data-testid":m,role:"status",children:[o,s]}),e[10]=m,e[11]=o,e[12]=s,e[13]=a):a=e[13],a},"E");export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ae}from"./chunk-FPI7AMQJ.js";import{a as A}from"./chunk-37WYCOQ2.js";import{a as re}from"./chunk-LXCVA5SP.js";import{a as te}from"./chunk-7Q256NLI.js";import{b as ee}from"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import{i as W}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-7Y3SY37W.js";import{a as w}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as O}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as Q}from"./chunk-4ZEL6BYL.js";import{c as I,d as P,l as U}from"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{d as q,e as G,f as V,h as j,n as H,q as X,u as Y}from"./chunk-74IYYDDI.js";import{a as o,d as M,e as he,g as ge}from"./chunk-I26MS5PJ.js";var c=M(he(),1);var a=M(ge(),1);var be=o(t=>t.kind==="id"?t.table===void 0?"id":`id<${t.table}>`:t.kind==="array"?t.element===void 0?"array":`${t.element}[]`:t.kind,"me"),xe=o(t=>t===void 0||t.length===0?"()":`(${t.map(e=>`${e.name}${e.optional?"?":""}: ${be(e)}`).join(", ")})`,"ge"),ye=o(t=>{switch(t){case"array":return[];case"bigint":return I(0n);case"boolean":return!1;case"bytes":return I(new ArrayBuffer(0));case"number":return 0;case"object":case"record":return{};default:return""}},"be"),ve=o(t=>{let e={};for(let r of t??[])r.optional||(e[r.name]=ye(r.kind));return JSON.stringify(e,void 0,2)},"xe"),Ne=V(Q.runAs),h="\xABsensitive\xBB",we=o(t=>(t??[]).filter(e=>e.sensitive===!0).map(e=>e.name),"ve"),Ae=o((t,e)=>{if(e.length===0)return t;try{let r=JSON.parse(t);if(typeof r!="object"||r===null||Array.isArray(r))return"";let l={...r};for(let i of e)Object.hasOwn(l,i)&&(l[i]=h);return JSON.stringify(l,null,2)}catch{return""}},"Ne"),Se=4,ke=o(t=>{let e=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength);try{return new TextDecoder("utf-8",{fatal:!0}).decode(e)}catch{return}},"Se"),$e=o(t=>Array.isArray(t)?[]:Object.keys(t).filter(e=>e.length>0),"we"),Ie=o(t=>{let e=[],r=new Set,l=[t];for(;l.length>0;){let i=l.pop();if(typeof i=="string")i.length>0&&e.push(i);else if(typeof i=="number"||typeof i=="bigint")e.push(String(i));else if(i instanceof ArrayBuffer||ArrayBuffer.isView(i)){let u=ke(i);u!==void 0&&u.length>0&&e.push(u)}else typeof i=="object"&&i!==null&&!r.has(i)&&(r.add(i),e.push(...$e(i)),l.push(...Object.values(i)))}return e},"ke"),Oe=o((t,e)=>{let r=[],l=new Set,i=[[t,e]];for(;i.length>0;){let[u,n]=i.pop()??[void 0,void 0];typeof n=="boolean"?r.push({key:u,text:n?"true":"false"}):typeof n=="object"&&n!==null&&!l.has(n)&&(l.add(n),Array.isArray(n)?i.push(...n.map(p=>[void 0,p])):i.push(...Object.entries(n)))}return r},"Re"),se=o(t=>t.replaceAll(/[$()*+.?[\\\]^{|}]/gu,String.raw`\$&`),"P"),je=o((t,e)=>e.length>=Se?t.replaceAll(e,h):t.replaceAll(new RegExp(`(?<![A-Za-z0-9])${se(e)}(?![A-Za-z0-9])`,"gu"),h),"Oe"),Re=o((t,e)=>{let r=t.replaceAll(`"${e.text}"`,h);if(e.key===void 0)return r;let l=se(e.key);return r.replaceAll(new RegExp(`(?<![A-Za-z0-9_])${l}=${e.text}(?![A-Za-z0-9_])`,"gu"),`${e.key}=${h}`).replaceAll(new RegExp(String.raw`"${l}":\s*${e.text}(?![A-Za-z0-9_])`,"gu"),`"${e.key}":${h}`)},"Ie"),Ce=o((t,e,r)=>{if(r.length===0||typeof e!="object"||e===null)return t;let l=r.flatMap(n=>Oe(n,e[n])),i=r.flatMap(n=>Ie(e[n])).flatMap(n=>{let p=JSON.stringify(n).slice(1,-1);return p===n?[n]:[n,p]}).toSorted((n,p)=>p.length-n.length),u=t;for(let n of l)u=Re(u,n);for(let n of i)u=je(u,n);return u},"$e"),Te=10,Fe=o(t=>t===void 0?"undefined":JSON.stringify(t,H,2),"Ee"),ze=o((t,e)=>[{argsText:Ae(e.argsText,e.sensitive),at:Date.now(),id:(t[0]?.id??0)+1,kind:e.selected.kind,path:e.selected.path,redacted:e.sensitive.length>0,shardKey:e.shardKey,status:e.runStatus},...t].slice(0,Te),"je"),Ge=o(({functions:t,runAsIdentity:e=!1}={})=>{let r=q(),l=U(),[i,u]=(0,c.useState)(null),[n,p]=(0,c.useState)(null),S=t??i??[],[R,C]=(0,c.useState)(""),[y,k]=(0,c.useState)("{}"),[g,T]=(0,c.useState)(""),[b,ne]=(0,c.useState)(""),[$,x]=(0,c.useState)("idle"),[ie,v]=(0,c.useState)(void 0),[F,N]=(0,c.useState)(null),[z,oe]=(0,c.useState)([]);(0,c.useEffect)(()=>{if(t!==void 0)return;let s=!1;return l.listFunctions().then(f=>(s||u(f),f)).catch(f=>{s||p(j(f))}),()=>{s=!0}},[l,t]);let B=R===""?S[0]?.path??"":R,d=S.find(s=>s.path===B),le=o(async()=>{if(!d)return;let s;try{s=y.trim()===""?{}:P(JSON.parse(y))}catch(m){x("error"),v(void 0),N(r("Invalid JSON args: {message}",{message:m.message}));return}let f={__lunoraRef:d.path},E=g.trim()===""?{}:{shardKey:g.trim()},K=e?b.trim():"",Z=we(d.args),D=o(m=>{oe(me=>ze(me,{argsText:y,runStatus:m,selected:d,sensitive:Z,shardKey:g}))},"M");x("running"),N(null);try{let m=K===""?await G(l,d.kind,f,s,E):await l.query(Ne,{args:s,functionPath:d.path,userId:K},E);ee(g),v(m),x("success"),D("success")}catch(m){v(void 0),N(Ce(j(m),s,Z)),x("error"),D("error")}},"H"),de=o(s=>{if(C(s.path),T(s.shardKey),s.redacted){v(void 0),N(r("Re-enter the sensitive values before running this again.")),x("error");return}k(s.argsText)},"G"),ue=o(s=>{C(s.target.value)},"W"),ce=o(s=>{k(s.target.value)},"X"),fe=o(s=>{ne(s.target.value)},"Y"),J=o(()=>{X(le())},"C"),L=e?b.trim():"",_=$==="running"||d===void 0,pe=o(()=>{k(ve(d?.args))},"_");return(0,a.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-runner",children:[n!==null&&(0,a.jsx)("p",{className:"text-sm text-destructive","data-testid":"function-discover-error",role:"alert",children:n}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)(A,{htmlFor:"function-select",children:r("Function")}),(0,a.jsx)("select",{"aria-label":r("Function"),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"function-select",id:"function-select",onChange:ue,value:B,children:S.map(s=>(0,a.jsxs)("option",{value:s.path,children:[s.path," (",s.kind,")"]},s.path))}),d!==void 0&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,a.jsx)("span",{className:"mr-1.5 font-medium",children:r("Signature")}),(0,a.jsx)("code",{className:"font-mono","data-testid":"function-signature",children:xe(d.args)})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)(A,{htmlFor:"args-input",children:r("Arguments")}),(0,a.jsx)(w,{"data-testid":"prefill-button",disabled:d===void 0,onClick:pe,size:"xs",type:"button",variant:"ghost",children:r("Prefill")})]}),(0,a.jsx)(ae,{"aria-label":r("Arguments"),className:"font-mono text-xs","data-testid":"args-input",id:"args-input",onChange:ce,value:y})]}),(0,a.jsx)(te,{onChange:T,testId:"shard-input",value:g}),e&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"run-as-field",children:[(0,a.jsx)(A,{htmlFor:"run-as-input",children:r("Run as identity (userId)")}),(0,a.jsx)(W,{"aria-label":r("Run as identity (userId)"),className:"font-mono text-xs","data-testid":"run-as-input",id:"run-as-input",onChange:fe,placeholder:r("Leave empty to run as admin"),value:b}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:r("Dev only: runs the function as this user so you can test auth and RLS. Forged over the admin gate.")})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[L!==""&&d!==void 0&&d.kind!=="query"?(0,a.jsx)(re,{confirmLabel:r("This will execute `{functionPath}` as user `{userId}`.",{functionPath:d.path,userId:L}),disabled:_,onConfirm:J,testId:"run-button",children:r("Run")}):(0,a.jsx)(w,{"data-testid":"run-button",disabled:_,onClick:J,type:"button",children:r("Run")}),d!==void 0&&(0,a.jsx)(O,{variant:"outline",children:d.kind}),e&&b.trim()!==""&&(0,a.jsx)(O,{"data-testid":"run-as-badge",variant:"secondary",children:r("as {userId}",{userId:b.trim()})})]})]}),$==="error"&&F!==null&&(0,a.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs text-destructive","data-testid":"error",role:"alert",children:F}),$==="success"&&(0,a.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"result",children:Fe(ie)}),z.length>0&&(0,a.jsx)("ul",{className:"flex flex-col overflow-hidden rounded-xl border border-border","data-testid":"fn-history",children:z.map((s,f)=>(0,a.jsxs)("li",{className:"flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-sm last:border-b-0","data-testid":"fn-history-row",children:[(0,a.jsx)("span",{className:s.status==="success"?"text-success":"text-destructive","data-testid":`fn-history-status-${f.toString()}`,children:s.status==="success"?"\u2713":"\u2717"})," ",(0,a.jsxs)("span",{className:"font-mono text-xs",children:[s.path," (",s.kind,")"]})," ",(0,a.jsx)("time",{className:"text-xs text-muted-foreground",children:Y(s.at)})," ",(0,a.jsx)(w,{className:"ml-auto","data-testid":`fn-history-load-${f.toString()}`,onClick:o(()=>{de(s)},"onClick"),size:"xs",type:"button",variant:"ghost",children:r("Load")})]},s.id))})]})},"Ge");export{Ge as FunctionRunner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d,d as o,f as c,g as b,i as s}from"./chunk-I26MS5PJ.js";var l=o(c(),1);var u=o(b(),1);function p(n){let i=(0,l.c)(8),r,e;i[0]!==n?({className:r,...e}=n,i[0]=n,i[1]=r,i[2]=e):(r=i[1],e=i[2]);let t;i[3]!==r?(t=s("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",r),i[3]=r,i[4]=t):t=i[4];let a;return i[5]!==e||i[6]!==t?(a=(0,u.jsx)("textarea",{"data-slot":"textarea",className:t,...e}),i[5]=e,i[6]=t,i[7]=a):a=i[7],a}d(p,"b");export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as g}from"./chunk-K3UAOIR7.js";import"./chunk-ZJQIGWLG.js";import"./chunk-NCPW7WHO.js";import"./chunk-IRSSZXC3.js";import"./chunk-55UGUCQ6.js";import{a as f}from"./chunk-4ZEL6BYL.js";import{c as m}from"./chunk-DHGPCQ2F.js";import"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import"./chunk-HCTJKP5J.js";import"./chunk-2IKDEUCX.js";import{d as p}from"./chunk-74IYYDDI.js";import{a as r,d as h,f as S,g as A}from"./chunk-I26MS5PJ.js";var R=h(S(),1);var k=h(A(),1);var _=r((e,s)=>({"admin-token-weak":e("Weak admin token"),"auth-secret-weak":e("Weak auth secret"),"cookies-insecure":e("Session cookies are not Secure"),"cors-wildcard-credentials":e("Wildcard CORS with credentials"),"csrf-disabled":e("CSRF/origin guard is off"),"dev-args-unredacted":e("Request log keeps un-redacted args"),"security-headers-disabled":e("Security headers are off"),"ws-gate-open":e("User subscriptions are ungated")})[s.kind],"k"),w=r(e=>Array.isArray(e.findings)?e.findings:[],"g"),b=r(e=>({"admin-token-weak":"LUNORA_ADMIN_TOKEN","auth-secret-weak":"AUTH_SECRET","cookies-insecure":"BETTER_AUTH_URL","cors-wildcard-credentials":"LUNORA_ALLOWED_ORIGINS","csrf-disabled":"LUNORA_SECURITY_CSRF","dev-args-unredacted":"request log","security-headers-disabled":"LUNORA_SECURITY_HEADERS","ws-gate-open":"LUNORA_WS_BEARER"})[e.kind],"S"),E=r((e,s)=>({"admin-token-weak":e("Your admin token is {length} characters \u2014 use at least {min} for a brute-force-resistant secret.",{length:s.detail?.length,min:s.detail?.min}),"auth-secret-weak":e("Your auth secret is {length} characters \u2014 use at least {min} (e.g. `openssl rand -hex 32`) to sign sessions safely.",{length:s.detail?.length,min:s.detail?.min}),"cookies-insecure":e("BETTER_AUTH_URL is a plaintext http:// origin, so session cookies cannot be Secure and ride in cleartext. Serve auth over https:// in production."),"cors-wildcard-credentials":e("LUNORA_ALLOWED_ORIGINS includes a wildcard while credentials are allowed \u2014 browsers reject this and it defeats the allowlist. Name explicit origins instead of *."),"csrf-disabled":e("LUNORA_SECURITY_CSRF is off, so cross-origin state-changing cookie requests are not blocked. Re-enable it in production to keep mutations un-forgeable."),"dev-args-unredacted":e("This worker reports a development environment, so the request log stores raw args and identity. Confirm it isn't a mislabeled production deploy."),"security-headers-disabled":e("LUNORA_SECURITY_HEADERS is off, so HSTS, CSP, nosniff, and frame-options are not applied. Re-enable the baseline headers in production."),"ws-gate-open":e("LUNORA_WS_BEARER is unset, so the WebSocket upgrade gate is open: anyone who can reach the worker can open a socket and run ordinary user subscriptions. Admin subscriptions are unaffected \u2014 they need the admin token. Set it if subscribers should present a shared credential.")})[s.kind],"A"),O=r(()=>{let e=(0,R.c)(8),s=p(),i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];let{data:a,error:d,errorSource:c}=m(f.getSecurityAudit,i),n;if(e[1]!==a||e[2]!==s){let u=a===void 0?null:w(a);n=u===null?null:u.map(t=>({description:E(s,t),entity:b(t),issueType:_(s,t),key:t.kind,level:t.level})),e[1]=a,e[2]=s,e[3]=n}else n=e[3];let l=n,o;return e[4]!==d||e[5]!==c||e[6]!==l?(o=(0,k.jsx)(g,{error:d,errorSource:c,rows:l,testId:"lunora-security-advisor"}),e[4]=d,e[5]=c,e[6]=l,e[7]=o):o=e[7],o},"T");export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-I26MS5PJ.js";var u={highErrorRate:.05,highWriteContention:.1,lowCacheHitRate:.5,minCacheSamples:10,minConflictCalls:5,minErrorCalls:5,slowFunctionMs:1e3,storageCriticalBytes:5368709120,storageWarnBytes:1073741824},h={error:0,info:2,warning:1},g=e((a,i)=>{let s=[];if(a.maxDurationMs>=i.slowFunctionMs){let t=a.scannedTables??[];t.length>0?s.push({fn:a.path,kind:"missing-index",severity:"warning",tables:t.map(r=>r.table),value:a.maxDurationMs}):s.push({fn:a.path,kind:"slow-function",severity:"info",value:a.maxDurationMs})}a.calls>=i.minErrorCalls&&a.errors/a.calls>=i.highErrorRate&&s.push({fn:a.path,kind:"high-error-rate",message:a.lastErrorMessage??void 0,severity:"error",value:a.errors/a.calls});let n=a.conflicts??0;return n>0&&a.calls>=i.minConflictCalls&&n/a.calls>=i.highWriteContention&&s.push({fn:a.path,kind:"high-write-contention",severity:"warning",value:n/a.calls}),s},"h"),v=e((a,i,s=u)=>{let n=[];if(typeof a?.databaseSize=="number"&&a.databaseSize>=s.storageWarnBytes&&n.push({kind:"storage-headroom",severity:a.databaseSize>=s.storageCriticalBytes?"error":"warning",value:a.databaseSize}),a?.cache){let{evictions:t,hits:r,misses:c}=a.cache,o=r+c;if(o>=s.minCacheSamples){let l=r/o;l<s.lowCacheHitRate&&n.push({kind:"low-cache-hit-rate",severity:"warning",value:l})}t>0&&t>r&&n.push({kind:"high-evictions",severity:"warning",value:t})}for(let t of i??[])n.push(...g(t,s));return n.toSorted((t,r)=>h[t.severity]-h[r.severity])},"u");export{v as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as R}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-7Y3SY37W.js";import{a as B}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as S}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as q}from"./chunk-ZJQIGWLG.js";import"./chunk-NCPW7WHO.js";import"./chunk-IRSSZXC3.js";import"./chunk-55UGUCQ6.js";import{a as U}from"./chunk-4ZEL6BYL.js";import{c as O}from"./chunk-DHGPCQ2F.js";import"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as D}from"./chunk-RWVIV3U7.js";import{a as G,b as J,c as K,d as F,e as s,f as o}from"./chunk-HCTJKP5J.js";import{a as V,e as W}from"./chunk-2IKDEUCX.js";import{d as P,u as H}from"./chunk-74IYYDDI.js";import{a as n,d as j,e as re,f as ae,g as ie}from"./chunk-I26MS5PJ.js";var X=j(ae(),1),M=j(re(),1);var t=j(ie(),1);var ne=n(e=>e==="ok"?"success":e==="failed"?"destructive":e==="expired"?"warning":"secondary","te"),Q=n(e=>e.endpoint??e.id,"M"),ve=n(()=>{let e=(0,X.c)(38),r=P(),[i,Y]=(0,M.useState)("all"),[l,Z]=(0,M.useState)(""),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={},e[0]=g):g=e[0];let{data:I,error:d,errorSource:x,isLoading:_,refetch:v}=O(U.listPushSubscriptions,g),N;if(e[1]!==I?.subscriptions||e[2]!==d||e[3]!==x||e[4]!==_||e[5]!==i||e[6]!==v||e[7]!==l||e[8]!==r){let L=I?.subscriptions??[],T=l.trim().toLowerCase(),A=L.filter(a=>i!=="all"&&a.kind!==i?!1:T===""?!0:`${Q(a)} ${a.userId??""}`.toLowerCase().includes(T)),b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=n(a=>{Z(a.target.value)},"w"),e[10]=b):b=e[10];let ee=b,w;e[11]!==v?(w=n(()=>{v()},"y"),e[11]=v,e[12]=w):w=e[12];let E=w,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=["all","web-push","fcm"],e[13]=k):k=e[13];let te=k,c;e[14]!==i||e[15]!==r?(c=(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"nt-kind-filter",role:"tablist",children:te.map(a=>(0,t.jsx)(B,{"aria-selected":i===a,"data-testid":`nt-kind-${a}`,onClick:n(()=>{Y(a)},"onClick"),role:"tab",size:"sm",type:"button",variant:i===a?"secondary":"ghost",children:a==="all"?r("All"):a},a))}),e[14]=i,e[15]=r,e[16]=c):c=e[16];let m;e[17]!==r?(m=r("Filter devices"),e[17]=r,e[18]=m):m=e[18];let h;e[19]!==r?(h=r("filter endpoint, user"),e[19]=r,e[20]=h):h=e[20];let u;e[21]!==l||e[22]!==m||e[23]!==h?(u=(0,t.jsx)(R,{"aria-label":m,className:"h-8 w-56","data-testid":"nt-search",onChange:ee,placeholder:h,value:l}),e[21]=l,e[22]=m,e[23]=h,e[24]=u):u=e[24];let f;e[25]!==r?(f=r("Refresh"),e[25]=r,e[26]=f):f=e[26];let p;e[27]!==E||e[28]!==f?(p=(0,t.jsx)(B,{className:"ml-auto","data-testid":"nt-refresh",onClick:E,size:"sm",type:"button",variant:"outline",children:f}),e[27]=E,e[28]=f,e[29]=p):p=e[29];let $=L.length>0&&(0,t.jsx)(S,{"data-testid":"nt-count",variant:"secondary",children:r("{count} devices",{count:L.length})}),y;e[30]!==p||e[31]!==$||e[32]!==c||e[33]!==u?(y=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,u,p,$]}),e[30]=p,e[31]=$,e[32]=c,e[33]=u,e[34]=y):y=e[34];let C;e[35]!==d||e[36]!==x?(C=d!==null&&(0,t.jsx)(q,{error:x,testId:"nt-error"}),e[35]=d,e[36]=x,e[37]=C):C=e[37],N=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-notifications",children:[y,C,d===null&&!_&&A.length===0&&(0,t.jsx)(D,{description:r("Registered Web Push / FCM devices appear here. Configure lunora/notify.ts with defineNotify({ store }) and register a device with ctx.push.register(...)."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"})}),testId:"nt-empty",title:r("No registered devices.")}),A.length>0&&(0,t.jsx)(V,{className:"overflow-hidden py-0",children:(0,t.jsx)(W,{className:"max-h-[30rem] overflow-auto px-0",children:(0,t.jsxs)(G,{"data-testid":"nt-table",children:[(0,t.jsx)(J,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(s,{children:r("kind")}),(0,t.jsx)(s,{children:r("endpoint")}),(0,t.jsx)(s,{children:r("user")}),(0,t.jsx)(s,{children:r("last seen")}),(0,t.jsx)(s,{children:r("status")}),(0,t.jsx)(s,{children:r("error")})]})}),(0,t.jsx)(K,{children:A.map(a=>{let z=Q(a);return(0,t.jsxs)(F,{"data-testid":"nt-row",children:[(0,t.jsx)(o,{children:(0,t.jsx)(S,{variant:"outline",children:a.kind})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs",title:z,children:z}),(0,t.jsx)(o,{className:"max-w-[16ch] truncate font-mono text-xs",children:a.userId??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,t.jsx)(o,{className:"text-muted-foreground tabular-nums",children:H(a.lastSeenAt,"\u2014")}),(0,t.jsx)(o,{children:(0,t.jsx)(S,{"data-testid":`nt-status-${a.id}`,variant:ne(a.lastStatus),children:a.lastStatus??r("n/a")})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",title:a.lastError??void 0,children:a.lastError??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},a.id)})})]})})})]}),e[1]=I?.subscriptions,e[2]=d,e[3]=x,e[4]=_,e[5]=i,e[6]=v,e[7]=l,e[8]=r,e[9]=N}else N=e[9];return N},"ge");export{ve as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as q}from"./chunk-NCBLHBRW.js";import{a as k}from"./chunk-K2EHRNYW.js";import"./chunk-VESGIGMQ.js";import"./chunk-OLIKYC3C.js";import"./chunk-AUGKHAMQ.js";import"./chunk-WJRYEML4.js";import{a as A}from"./chunk-R6U22RSY.js";import{a as $}from"./chunk-7Q256NLI.js";import"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import"./chunk-OQ6I6OXT.js";import"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-SJQERRSZ.js";import"./chunk-7Y3SY37W.js";import"./chunk-AUAECCXB.js";import{b as K}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as F}from"./chunk-ZJQIGWLG.js";import"./chunk-NCPW7WHO.js";import"./chunk-IRSSZXC3.js";import"./chunk-55UGUCQ6.js";import{a as T}from"./chunk-4ZEL6BYL.js";import{c as S}from"./chunk-DHGPCQ2F.js";import"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as O}from"./chunk-RWVIV3U7.js";import{a as j,e as w}from"./chunk-2IKDEUCX.js";import{d as I,u as E}from"./chunk-74IYYDDI.js";import{a as p,d as C,f as D,g as H}from"./chunk-I26MS5PJ.js";var M=C(D(),1);var m=C(H(),1);var L=p(s=>s.length===0?void 0:{max:Math.max(...s),mean:s.reduce((e,t)=>e+t,0)/s.length,min:Math.min(...s)},"F"),B=/^gen_ai\.evaluation\.(.+)\.score$/u,P=p(s=>{let e=[];for(let t of s)for(let n of t.spans)for(let[a,l]of Object.entries(n.attributes??{})){let o=B.exec(a);if(!o||typeof l!="number")continue;let i=o[1],c=n.attributes?.[`gen_ai.evaluation.${i}.label`];e.push({...typeof c=="string"?{label:c}:{},name:i,score:l,spanName:n.name,startTs:t.startTs+n.offsetMs,traceId:t.traceId})}return e.toSorted((t,n)=>n.startTs-t.startTs)},"q"),Q=p(s=>{let e=[];for(let t of s?.series??[]){let n=B.exec(t.name);n&&e.push({name:n[1],points:t.points})}return e},"D"),R=p((s,e)=>{let t=new Set([...s.map(a=>a.name),...e.map(a=>a.name)]),n=[];for(let a of t){let l=s.filter(r=>r.name===a),o=e.find(r=>r.name===a)?.points??[],i=o.at(-1)?.last??l[0]?.score,c=o.length>0?{max:Math.max(...o.map(r=>r.max)),mean:o.reduce((r,d)=>r+d.sum,0)/o.reduce((r,d)=>r+d.count,0),min:Math.min(...o.map(r=>r.min))}:L(l.map(r=>r.score));n.push({...i===void 0?{}:{latest:i},...c,name:a,points:o,runs:l})}return n.toSorted((a,l)=>a.name.localeCompare(l.name))},"H"),U=p(s=>Array.isArray(s?.traces)?s.traces:[],"L"),N=p(s=>s===void 0?"\u2014":s.toFixed(2),"y"),z=p(s=>{let e=(0,M.c)(34),{card:t,onOpenTrace:n}=s,a=I(),l;e[0]!==t.name?(l=(0,m.jsx)("h3",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"ev-name",children:t.name}),e[0]=t.name,e[1]=l):l=e[1];let o;e[2]!==t.latest?(o=N(t.latest),e[2]=t.latest,e[3]=o):o=e[3];let i;e[4]!==o?(i=(0,m.jsx)("span",{className:"font-mono text-lg text-foreground","data-testid":"ev-latest",children:o}),e[4]=o,e[5]=i):i=e[5];let c;e[6]!==l||e[7]!==i?(c=(0,m.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[l,i]}),e[6]=l,e[7]=i,e[8]=c):c=e[8];let r;e[9]!==t.max||e[10]!==t.mean||e[11]!==t.min||e[12]!==a?(r=a("min {min} \xB7 mean {mean} \xB7 max {max}",{max:N(t.max),mean:N(t.mean),min:N(t.min)}),e[9]=t.max,e[10]=t.mean,e[11]=t.min,e[12]=a,e[13]=r):r=e[13];let d;e[14]!==r?(d=(0,m.jsx)("p",{className:"font-mono text-xs text-muted-foreground","data-testid":"ev-summary",children:r}),e[14]=r,e[15]=d):d=e[15];let u;e[16]!==t.name||e[17]!==t.points||e[18]!==a?(u=t.points.length>1?(0,m.jsx)(q,{ariaLabel:a("Score trend for {name}",{name:t.name}),className:"h-10 w-full",series:t.points.map(G),testId:"ev-trend"}):(0,m.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"ev-no-trend",children:a("No durable history yet \u2014 pass ctx.metrics to recordEvaluation to chart a trend.")}),e[16]=t.name,e[17]=t.points,e[18]=a,e[19]=u):u=e[19];let h;if(e[20]!==t.runs||e[21]!==n||e[22]!==a){let v;e[24]!==n||e[25]!==a?(v=p(f=>(0,m.jsxs)("div",{className:"flex items-center justify-between gap-2 font-mono text-xs","data-testid":"ev-run",children:[(0,m.jsxs)("span",{className:"truncate text-muted-foreground",children:[E(f.startTs)," \xB7 ",f.spanName]}),(0,m.jsxs)("span",{className:"flex items-center gap-2",children:[f.label===void 0?null:(0,m.jsx)(K,{variant:"outline",children:f.label}),(0,m.jsx)("span",{className:"text-foreground",children:N(f.score)}),n===void 0?null:(0,m.jsx)("button",{className:"text-muted-foreground underline-offset-2 hover:underline",onClick:p(()=>{n(f.traceId)},"onClick"),title:a("Open the trace {trace}",{trace:f.traceId}),type:"button",children:f.traceId.slice(0,8)})]})]},`${f.traceId}:${f.spanName}`),"x"),e[24]=n,e[25]=a,e[26]=v):v=e[26],h=t.runs.slice(0,5).map(v),e[20]=t.runs,e[21]=n,e[22]=a,e[23]=h}else h=e[23];let x;e[27]!==h?(x=(0,m.jsx)("div",{className:"flex flex-col gap-1",children:h}),e[27]=h,e[28]=x):x=e[28];let g;return e[29]!==c||e[30]!==d||e[31]!==u||e[32]!==x?(g=(0,m.jsx)(j,{"data-testid":"ev-card",children:(0,m.jsxs)(w,{className:"flex flex-col gap-3 p-4",children:[c,d,u,x]})}),e[29]=c,e[30]=d,e[31]=u,e[32]=x,e[33]=g):g=e[33],g},"P"),oe=p(s=>{let e=(0,M.c)(19),{initialShardKey:t}=s,n=I(),{queryShardKey:a,setShardKey:l,shardKey:o}=A(t),i=k(a),c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={},e[0]=c):c=e[0];let r;e[1]!==a?(r={live:!0,shardKey:a},e[1]=a,e[2]=r):r=e[2];let{data:d,error:u}=S(T.getTraces,c,r),h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h={},e[3]=h):h=e[3];let x;e[4]!==a?(x={live:!0,shardKey:a},e[4]=a,e[5]=x):x=e[5];let{data:g}=S(T.getMetricHistory,h,x),v;if(e[6]!==d||e[7]!==u||e[8]!==g||e[9]!==i||e[10]!==l||e[11]!==o||e[12]!==n){let f=R(P(U(d)),Q(g)),y;e[14]!==l||e[15]!==o?(y=(0,m.jsx)($,{onChange:l,testId:"ev-shard-input",value:o}),e[14]=l,e[15]=o,e[16]=y):y=e[16];let b;e[17]!==u?(b=u===null?null:(0,m.jsx)(F,{error:u,testId:"ev-error"}),e[17]=u,e[18]=b):b=e[18],v=(0,m.jsxs)("section",{className:"flex flex-col gap-4","data-testid":"ev-panel",children:[y,b,f.length===0?(0,m.jsx)(O,{description:n("Call recordEvaluation from a graded run and its score shows up here."),testId:"ev-empty",title:n("No evals recorded")}):(0,m.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:f.map(_=>(0,m.jsx)(z,{card:_,onOpenTrace:i},_.name))})]}),e[6]=d,e[7]=u,e[8]=g,e[9]=i,e[10]=l,e[11]=o,e[12]=n,e[13]=v}else v=e[13];return v},"re");function G(s){return s.last}p(G,"Q");export{oe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as v,e as U}from"./chunk-I26MS5PJ.js";var a=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var o=[["path",{d:"M17.9998 15C17.9998 15 13.5809 9.00001 11.9998 9C10.4187 8.99999 5.99985 15 5.99985 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var r=[["path",{d:"M18 6L6.00081 17.9992M17.9992 18L6 6.00085",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var s=[["path",{d:"M2.99969 17.0002C2.99969 17.9302 2.99969 18.3952 3.10192 18.7767C3.37932 19.8119 4.18796 20.6206 5.22324 20.898C5.60474 21.0002 6.06972 21.0002 6.99969 21.0002L16.9997 21.0002C17.9297 21.0002 18.3947 21.0002 18.7762 20.898C19.8114 20.6206 20.6201 19.8119 20.8975 18.7767C20.9997 18.3952 20.9997 17.9302 20.9997 17.0002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.4998 11.5002C16.4998 11.5002 13.1856 16.0002 11.9997 16.0002C10.8139 16.0002 7.49976 11.5002 7.49976 11.5002M11.9997 15.0002V3.00016",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var m=[["path",{d:"M2 12C2 8.31087 2 6.4663 2.81382 5.15877C3.1149 4.67502 3.48891 4.25427 3.91891 3.91554C5.08116 3 6.72077 3 10 3H14C17.2792 3 18.9188 3 20.0811 3.91554C20.5111 4.25427 20.8851 4.67502 21.1862 5.15877C22 6.4663 22 8.31087 22 12C22 15.6891 22 17.5337 21.1862 18.8412C20.8851 19.325 20.5111 19.7457 20.0811 20.0845C18.9188 21 17.2792 21 14 21H10C6.72077 21 5.08116 21 3.91891 20.0845C3.48891 19.7457 3.1149 19.325 2.81382 18.8412C2 17.5337 2 15.6891 2 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M9.5 3L9.5 21",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 7H6M5 10H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]];var S=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];var h=[["path",{d:"M18 14C18 14 13.5811 19 12 19C10.4188 19 6 14 6 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 9.99996C18 9.99996 13.5811 5.00001 12 5C10.4188 4.99999 6 10 6 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var e=[["path",{d:"M7.5 14.5C7.5 11.2002 7.5 9.55025 8.52513 8.52513C9.55025 7.5 11.2002 7.5 14.5 7.5C17.7998 7.5 19.4497 7.5 20.4749 8.52513C21.5 9.55025 21.5 11.2002 21.5 14.5C21.5 17.7998 21.5 19.4497 20.4749 20.4749C19.4497 21.5 17.7998 21.5 14.5 21.5C11.2002 21.5 9.55025 21.5 8.52513 20.4749C7.5 19.4497 7.5 17.7998 7.5 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7.5 16.5C6.10355 16.5 5.40533 16.5 4.84402 16.3036C3.83866 15.9518 3.0482 15.1613 2.69641 14.156C2.5 13.5947 2.5 12.8964 2.5 11.5V9.5C2.5 6.20017 2.5 4.55025 3.52513 3.52513C4.55025 2.5 6.20017 2.5 9.5 2.5H11.5C12.8964 2.5 13.5947 2.5 14.156 2.69641C15.1613 3.0482 15.9518 3.83866 16.3036 4.84402C16.5 5.40533 16.5 6.10355 16.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var f=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var k=[["path",{d:"M21.0477 3.05293C18.8697 0.707363 2.48648 6.4532 2.50001 8.551C2.51535 10.9299 8.89809 11.6617 10.6672 12.1581C11.7311 12.4565 12.016 12.7625 12.2613 13.8781C13.3723 18.9305 13.9301 21.4435 15.2014 21.4996C17.2278 21.5892 23.1733 5.342 21.0477 3.05293Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.4999 12.5L14.9999 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]];var n=v(U(),1),q={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},A=(0,n.forwardRef)(({color:u="currentColor",size:d=24,strokeWidth:c,absoluteStrokeWidth:M=!1,className:w="",altIcon:F,showAlt:B=!1,icon:P,primaryColor:I,secondaryColor:i,disableSecondaryOpacity:L=!1,...T},D)=>{let x=c!==void 0?M?Number(c)*24/Number(d):c:void 0,C=x!==void 0?{strokeWidth:x,stroke:"currentColor"}:{},R={ref:D,...q,width:d,height:d,color:I||u,className:w,...C,...T},y=[...B&&F?F:P].sort(([,p],[,t])=>{let l=p.opacity!==void 0;return t.opacity!==void 0?1:l?-1:0}).map(([p,t])=>{let l=t.opacity!==void 0,g=l&&!L?t.opacity:void 0,b=i?{...t.stroke!==void 0?{stroke:l?i:I||u}:{fill:l?i:I||u}}:{};return(0,n.createElement)(p,{...t,...C,...b,opacity:g,key:t.key})});return(0,n.createElement)("svg",R,y)});A.displayName="HugeiconsIcon";export{a,o as b,r as c,e as d,s as e,f,k as g,m as h,S as i,h as j,A as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as E,e as _}from"./chunk-CVXNHIQW.js";import{a as $}from"./chunk-253UHWDX.js";import{a as de}from"./chunk-NCBLHBRW.js";import{a as ce}from"./chunk-K2EHRNYW.js";import"./chunk-VESGIGMQ.js";import"./chunk-OLIKYC3C.js";import"./chunk-AUGKHAMQ.js";import"./chunk-WJRYEML4.js";import{a as le}from"./chunk-R6U22RSY.js";import{a as re}from"./chunk-7Q256NLI.js";import"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import"./chunk-OQ6I6OXT.js";import"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-SJQERRSZ.js";import"./chunk-7Y3SY37W.js";import"./chunk-AUAECCXB.js";import{b as K}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as ie}from"./chunk-ZJQIGWLG.js";import"./chunk-NCPW7WHO.js";import"./chunk-IRSSZXC3.js";import"./chunk-55UGUCQ6.js";import{a as J}from"./chunk-4ZEL6BYL.js";import{c as H}from"./chunk-DHGPCQ2F.js";import"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as ne}from"./chunk-RWVIV3U7.js";import{a as R,b as W,c as Z,d as A,e as M,f as S}from"./chunk-HCTJKP5J.js";import{a as q,b as D,c as U,e as oe}from"./chunk-2IKDEUCX.js";import{d as F,u as ae}from"./chunk-74IYYDDI.js";import{a as p,d as se,f as be,g as ge}from"./chunk-I26MS5PJ.js";var O=se(be(),1);var o=se(ge(),1);var G="gen_ai.usage.input_tokens",Q="gen_ai.usage.output_tokens",V="gen_ai.usage.cost",fe="gen_ai.request.model",Te="lunora.usage.cost.source",xe=new Set(["ai.embed","ai.generate","ai.stream"]),ue=6e4,Ce=1440,ve="unknown",X=p(()=>({calls:0,estimatedCost:0,inputTokens:0,outputTokens:0,providerCost:0}),"q"),Y=p((n,e)=>{let s=n?.[e];return typeof s=="string"&&s!==""?s:void 0},"J"),z=p((n,e)=>{let s=n?.[e];return typeof s=="number"&&Number.isFinite(s)?s:void 0},"L"),ee=p(n=>Y(n,Te)==="provider"?"provider":"estimated","Q"),me=p((n,e)=>n.reduce((s,a)=>s+e(a),0),"Y"),B=p(n=>n.providerCost+n.estimatedCost,"F"),ke=p(n=>n.estimatedCost>0?n.providerCost>0?"mixed":"estimated":n.providerCost>0?"provider":"none","ae"),ye=p((n,e)=>({calls:n.calls+e.calls,estimatedCost:n.estimatedCost+e.estimatedCost,inputTokens:n.inputTokens+e.inputTokens,outputTokens:n.outputTokens+e.outputTokens,providerCost:n.providerCost+e.providerCost}),"ce"),Ie=p(n=>{let e=X(),s=0,a=0,t=0;for(let c of n){let l=me(c.points,i=>i.sum),r=me(c.points,i=>i.count);c.name===G?(e.inputTokens+=l,s+=r):c.name===Q?(e.outputTokens+=l,a+=r):(t+=r,ee(c.attributes)==="provider"?e.providerCost+=l:e.estimatedCost+=l)}return e.calls=Math.max(s,a,t),e},"ge"),Ne=p((n,e)=>B(e)-B(n)||e.inputTokens+e.outputTokens-(n.inputTokens+n.outputTokens)||n.key.localeCompare(e.key),"Ne"),pe=p((n,e)=>{let s=new Map;for(let a of n){let t=e(a);s.set(t,{key:t,...ye(s.get(t)??X(),a)})}return[...s.values()].toSorted(Ne)},"Z"),we=p(n=>(n?.series??[]).filter(e=>e.name===G||e.name===Q||e.name===V),"xe"),Me=p(n=>Y(n.attributes,fe)??ve,"Se"),Se=p(n=>{let e=new Map;for(let s of n){let a=Me(s),t=JSON.stringify([s.functionPath,a]),c=e.get(t)??{functionPath:s.functionPath,model:a,series:[]};c.series.push(s),e.set(t,c)}return[...e.values()].map(({functionPath:s,model:a,series:t})=>({functionPath:s,model:a,...Ie(t)}))},"Ie"),_e=p(n=>{let e=new Map;for(let r of n){if(r.name!==V)continue;let i=ee(r.attributes)==="provider";for(let u of r.points){let m=e.get(u.bucketMs)??{bucketMs:u.bucketMs,estimatedCost:0,providerCost:0};i?m.providerCost+=u.sum:m.estimatedCost+=u.sum,e.set(u.bucketMs,m)}}let s=[...e.keys()].toSorted((r,i)=>r-i),a=s[0],t=s.at(-1);if(a===void 0||t===void 0)return[];let c=Math.max(a,t-(Ce-1)*ue),l=[];for(let r=c;r<=t;r+=ue)l.push(e.get(r)??{bucketMs:r,estimatedCost:0,providerCost:0});return l},"_e"),Pe=p(n=>{let e=[];for(let s of n)for(let a of s.spans){if(!xe.has(a.name))continue;let{attributes:t}=a,c=z(t,V),l=z(t,G),r=z(t,Q);e.push({...c===void 0?{}:{cost:c,costSource:ee(t)},functionPath:s.functionPath,...l===void 0?{}:{inputTokens:l},model:Y(t,fe)??ve,ok:a.ok,...r===void 0?{}:{outputTokens:r},startTs:s.startTs+a.offsetMs,streaming:a.name==="ai.stream",traceId:s.traceId})}return e.toSorted((s,a)=>a.startTs-s.startTs)},"Me"),Fe=p(n=>n.map(e=>{let s=e.cost??0;return{calls:1,estimatedCost:e.costSource==="provider"?0:s,functionPath:e.functionPath,inputTokens:e.inputTokens??0,model:e.model,outputTokens:e.outputTokens??0,providerCost:e.costSource==="provider"?s:0}}),"Oe"),Oe=p((n,e)=>{let s=we(n),a=Pe(e),t=s.length>0,c=t?Se(s):Fe(a),l=X(),r="none";for(let i of c)l=ye(l,i);return t?r="history":a.length>0&&(r="live"),{byFunction:pe(c,i=>i.functionPath),byModel:pe(c,i=>i.model),calls:a,source:r,totals:l,trend:t?_e(s):[]}},"Ae"),Ke=p(n=>Array.isArray(n?.traces)?n.traces:[],"Ee"),Ae=25,te=p(n=>{let e=(0,O.c)(16),{provenance:s,value:a}=n,t=F();if(s==="none"){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}),e[0]=m):m=e[0],m}let c;e[1]!==s||e[2]!==a?(c=s==="provider"?E(a):`~${E(a)}`,e[1]=s,e[2]=a,e[3]=c):c=e[3];let l;e[4]!==c?(l=(0,o.jsx)("span",{className:"tabular-nums",children:c}),e[4]=c,e[5]=l):l=e[5];let r;e[6]!==s||e[7]!==t?(r=s==="estimated"?(0,o.jsx)(K,{title:t("Derived from a price table, not reported by the provider."),variant:"warning",children:t("Estimated")}):null,e[6]=s,e[7]=t,e[8]=r):r=e[8];let i;e[9]!==s||e[10]!==t?(i=s==="mixed"?(0,o.jsx)(K,{title:t("Includes cost derived from a price table, not reported by the provider."),variant:"warning",children:t("Partly estimated")}):null,e[9]=s,e[10]=t,e[11]=i):i=e[11];let u;return e[12]!==l||e[13]!==r||e[14]!==i?(u=(0,o.jsxs)("span",{className:"inline-flex items-center gap-2",children:[l,r,i]}),e[12]=l,e[13]=r,e[14]=i,e[15]=u):u=e[15],u},"V"),he=p(n=>{let e=(0,O.c)(40),{keyLabel:s,rows:a,testId:t,title:c}=n,l=F(),r;e[0]!==c?(r=(0,o.jsx)(D,{className:"px-4 py-3",children:(0,o.jsx)(U,{children:c})}),e[0]=c,e[1]=r):r=e[1];let i;e[2]!==s?(i=(0,o.jsx)(M,{children:s}),e[2]=s,e[3]=i):i=e[3];let u;e[4]!==l?(u=l("Calls"),e[4]=l,e[5]=u):u=e[5];let m;e[6]!==u?(m=(0,o.jsx)(M,{className:"text-end",children:u}),e[6]=u,e[7]=m):m=e[7];let k;e[8]!==l?(k=l("Input tokens"),e[8]=l,e[9]=k):k=e[9];let y;e[10]!==k?(y=(0,o.jsx)(M,{className:"text-end",children:k}),e[10]=k,e[11]=y):y=e[11];let b;e[12]!==l?(b=l("Output tokens"),e[12]=l,e[13]=b):b=e[13];let T;e[14]!==b?(T=(0,o.jsx)(M,{className:"text-end",children:b}),e[14]=b,e[15]=T):T=e[15];let g;e[16]!==l?(g=l("Cost"),e[16]=l,e[17]=g):g=e[17];let d;e[18]!==g?(d=(0,o.jsx)(M,{className:"text-end",children:g}),e[18]=g,e[19]=d):d=e[19];let x;e[20]!==d||e[21]!==i||e[22]!==m||e[23]!==y||e[24]!==T?(x=(0,o.jsx)(W,{children:(0,o.jsxs)(A,{children:[i,m,y,T,d]})}),e[20]=d,e[21]=i,e[22]=m,e[23]=y,e[24]=T,e[25]=x):x=e[25];let h;if(e[26]!==a||e[27]!==t){let N;e[29]!==t?(N=p(w=>(0,o.jsxs)(A,{"data-testid":`${t}-row`,children:[(0,o.jsx)(S,{className:"max-w-[280px] truncate font-mono",title:w.key,children:w.key}),(0,o.jsx)(S,{className:"text-end tabular-nums",children:_(w.calls)}),(0,o.jsx)(S,{className:"text-end tabular-nums",children:_(w.inputTokens)}),(0,o.jsx)(S,{className:"text-end tabular-nums",children:_(w.outputTokens)}),(0,o.jsx)(S,{className:"text-end",children:(0,o.jsx)(te,{provenance:ke(w),value:B(w)})})]},w.key),"x"),e[29]=t,e[30]=N):N=e[30],h=a.map(N),e[26]=a,e[27]=t,e[28]=h}else h=e[28];let f;e[31]!==h?(f=(0,o.jsx)(Z,{children:h}),e[31]=h,e[32]=f):f=e[32];let v;e[33]!==x||e[34]!==f?(v=(0,o.jsxs)(R,{children:[x,f]}),e[33]=x,e[34]=f,e[35]=v):v=e[35];let C;return e[36]!==r||e[37]!==v||e[38]!==t?(C=(0,o.jsxs)(q,{className:"gap-0 py-0","data-testid":t,children:[r,v]}),e[36]=r,e[37]=v,e[38]=t,e[39]=C):C=e[39],C},"ee"),$e=p(n=>{let e=(0,O.c)(55),{calls:s,onOpenTrace:a}=n,t=F(),c;e[0]!==t?(c=t("Recent calls"),e[0]=t,e[1]=c):c=e[1];let l;e[2]!==c?(l=(0,o.jsx)(D,{className:"px-4 py-3",children:(0,o.jsx)(U,{children:c})}),e[2]=c,e[3]=l):l=e[3];let r;e[4]!==t?(r=t("When"),e[4]=t,e[5]=r):r=e[5];let i;e[6]!==r?(i=(0,o.jsx)(M,{children:r}),e[6]=r,e[7]=i):i=e[7];let u;e[8]!==t?(u=t("Function"),e[8]=t,e[9]=u):u=e[9];let m;e[10]!==u?(m=(0,o.jsx)(M,{children:u}),e[10]=u,e[11]=m):m=e[11];let k;e[12]!==t?(k=t("Model"),e[12]=t,e[13]=k):k=e[13];let y;e[14]!==k?(y=(0,o.jsx)(M,{children:k}),e[14]=k,e[15]=y):y=e[15];let b;e[16]!==t?(b=t("Input tokens"),e[16]=t,e[17]=b):b=e[17];let T;e[18]!==b?(T=(0,o.jsx)(M,{className:"text-end",children:b}),e[18]=b,e[19]=T):T=e[19];let g;e[20]!==t?(g=t("Output tokens"),e[20]=t,e[21]=g):g=e[21];let d;e[22]!==g?(d=(0,o.jsx)(M,{className:"text-end",children:g}),e[22]=g,e[23]=d):d=e[23];let x;e[24]!==t?(x=t("Cost"),e[24]=t,e[25]=x):x=e[25];let h;e[26]!==x?(h=(0,o.jsx)(M,{className:"text-end",children:x}),e[26]=x,e[27]=h):h=e[27];let f;e[28]!==t?(f=t("Trace"),e[28]=t,e[29]=f):f=e[29];let v;e[30]!==f?(v=(0,o.jsx)(M,{children:f}),e[30]=f,e[31]=v):v=e[31];let C;e[32]!==T||e[33]!==d||e[34]!==h||e[35]!==v||e[36]!==i||e[37]!==m||e[38]!==y?(C=(0,o.jsx)(W,{children:(0,o.jsxs)(A,{children:[i,m,y,T,d,h,v]})}),e[32]=T,e[33]=d,e[34]=h,e[35]=v,e[36]=i,e[37]=m,e[38]=y,e[39]=C):C=e[39];let N;if(e[40]!==s||e[41]!==a||e[42]!==t){let j;e[44]!==a||e[45]!==t?(j=p(I=>(0,o.jsxs)(A,{"data-testid":"ai-call",children:[(0,o.jsx)(S,{className:"font-mono text-muted-foreground",children:ae(I.startTs)}),(0,o.jsx)(S,{className:"font-mono",children:(0,o.jsxs)("span",{className:"inline-flex items-center gap-2",children:[I.functionPath,I.streaming?(0,o.jsx)(K,{variant:"outline",children:t("stream")}):null,I.ok?null:(0,o.jsx)(K,{variant:"destructive",children:t("failed")})]})}),(0,o.jsx)(S,{className:"max-w-[240px] truncate font-mono",title:I.model,children:I.model}),(0,o.jsx)(S,{className:"text-end tabular-nums",children:I.inputTokens===void 0?"\u2014":_(I.inputTokens)}),(0,o.jsx)(S,{className:"text-end tabular-nums",children:I.outputTokens===void 0?"\u2014":_(I.outputTokens)}),(0,o.jsx)(S,{className:"text-end",children:(0,o.jsx)(te,{provenance:I.cost===void 0?"none":I.costSource??"estimated",value:I.cost??0})}),(0,o.jsx)(S,{children:(0,o.jsx)("button",{className:"font-mono text-muted-foreground underline-offset-2 hover:underline",onClick:p(()=>{a(I.traceId)},"onClick"),title:t("Open the trace {trace}",{trace:I.traceId}),type:"button",children:I.traceId.slice(0,8)})})]},`${I.traceId}:${I.startTs.toString()}:${I.model}`),"U"),e[44]=a,e[45]=t,e[46]=j):j=e[46],N=s.slice(0,Ae).map(j),e[40]=s,e[41]=a,e[42]=t,e[43]=N}else N=e[43];let w;e[47]!==N?(w=(0,o.jsx)(Z,{children:N}),e[47]=N,e[48]=w):w=e[48];let P;e[49]!==C||e[50]!==w?(P=(0,o.jsxs)(R,{children:[C,w]}),e[49]=C,e[50]=w,e[51]=P):P=e[51];let L;return e[52]!==l||e[53]!==P?(L=(0,o.jsxs)(q,{className:"gap-0 py-0","data-testid":"ai-calls",children:[l,P]}),e[52]=l,e[53]=P,e[54]=L):L=e[54],L},"Pe"),Ee=p(n=>{let e=(0,O.c)(48),{totals:s,trend:a}=n,t=F(),c;e[0]!==s?(c=ke(s),e[0]=s,e[1]=c):c=e[1];let l=c,r;e[2]!==t||e[3]!==a?(r=a.length>=2?(0,o.jsx)(de,{ariaLabel:t("Cost per minute"),className:"h-7 w-24",series:a,testId:"ai-trend"}):void 0,e[2]=t,e[3]=a,e[4]=r):r=e[4];let i;e[5]!==l||e[6]!==t||e[7]!==s.estimatedCost||e[8]!==s.providerCost?(i=l==="none"?t("No cost reported"):(0,o.jsx)("span",{"data-testid":"ai-cost-split",children:t("{provider} provider-reported \xB7 {estimated} estimated",{estimated:E(s.estimatedCost),provider:E(s.providerCost)})}),e[5]=l,e[6]=t,e[7]=s.estimatedCost,e[8]=s.providerCost,e[9]=i):i=e[9];let u;e[10]!==t?(u=t("Total cost"),e[10]=t,e[11]=u):u=e[11];let m;e[12]!==s?(m=B(s),e[12]=s,e[13]=m):m=e[13];let k;e[14]!==l||e[15]!==m?(k=(0,o.jsx)(te,{provenance:l,value:m}),e[14]=l,e[15]=m,e[16]=k):k=e[16];let y;e[17]!==r||e[18]!==i||e[19]!==u||e[20]!==k?(y=(0,o.jsx)($,{chart:r,footer:i,label:u,testId:"ai-total-cost",value:k}),e[17]=r,e[18]=i,e[19]=u,e[20]=k,e[21]=y):y=e[21];let b;e[22]!==t?(b=t("Input tokens"),e[22]=t,e[23]=b):b=e[23];let T;e[24]!==s.inputTokens?(T=_(s.inputTokens),e[24]=s.inputTokens,e[25]=T):T=e[25];let g;e[26]!==b||e[27]!==T?(g=(0,o.jsx)($,{label:b,testId:"ai-input-tokens",value:T}),e[26]=b,e[27]=T,e[28]=g):g=e[28];let d;e[29]!==t?(d=t("Output tokens"),e[29]=t,e[30]=d):d=e[30];let x;e[31]!==s.outputTokens?(x=_(s.outputTokens),e[31]=s.outputTokens,e[32]=x):x=e[32];let h;e[33]!==d||e[34]!==x?(h=(0,o.jsx)($,{label:d,testId:"ai-output-tokens",value:x}),e[33]=d,e[34]=x,e[35]=h):h=e[35];let f;e[36]!==t?(f=t("Calls"),e[36]=t,e[37]=f):f=e[37];let v;e[38]!==s.calls?(v=_(s.calls),e[38]=s.calls,e[39]=v):v=e[39];let C;e[40]!==f||e[41]!==v?(C=(0,o.jsx)($,{label:f,testId:"ai-calls-total",value:v}),e[40]=f,e[41]=v,e[42]=C):C=e[42];let N;return e[43]!==g||e[44]!==h||e[45]!==C||e[46]!==y?(N=(0,o.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4","data-testid":"ai-totals",children:[y,g,h,C]}),e[43]=g,e[44]=h,e[45]=C,e[46]=y,e[47]=N):N=e[47],N},"Ue"),Ye=p(n=>{let e=(0,O.c)(28),{initialShardKey:s}=n,a=F(),{queryShardKey:t,setShardKey:c,shardKey:l}=le(s),r=ce(t),i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];let u;e[1]!==t?(u={live:!0,shardKey:t},e[1]=t,e[2]=u):u=e[2];let{data:m,error:k}=H(J.getTraces,i,u),y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y={},e[3]=y):y=e[3];let b;e[4]!==t?(b={live:!0,shardKey:t},e[4]=t,e[5]=b):b=e[5];let{data:T}=H(J.getMetricHistory,y,b),g,d;e[6]!==m||e[7]!==T?(d=Oe(T,Ke(m)),g=d.trend.map(Le),e[6]=m,e[7]=T,e[8]=g,e[9]=d):(g=e[8],d=e[9]);let x=g,h;e[10]!==c||e[11]!==l?(h=(0,o.jsx)(re,{onChange:c,testId:"ai-shard-input",value:l}),e[10]=c,e[11]=l,e[12]=h):h=e[12];let f;e[13]!==k?(f=k===null?null:(0,o.jsx)(ie,{error:k,testId:"ai-error"}),e[13]=k,e[14]=f):f=e[14];let v;e[15]!==r||e[16]!==a||e[17]!==x||e[18]!==d.byFunction||e[19]!==d.byModel||e[20]!==d.calls||e[21]!==d.source||e[22]!==d.totals?(v=d.source==="none"?(0,o.jsx)(ne,{description:a("Spend shows up here once an action calls ctx.ai.model(...) \u2014 tokens and cost per function and per model."),testId:"ai-empty",title:a("No AI usage recorded")}):(0,o.jsxs)(o.Fragment,{children:[d.source==="live"?(0,o.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"ai-live-only",children:a("No durable history yet \u2014 these totals come from the live trace ring and reset when the shard hibernates.")}):(0,o.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"ai-window",children:a("Totals cover the retained metric history (up to the last 24 hours).")}),(0,o.jsx)(Ee,{totals:d.totals,trend:x}),(0,o.jsxs)("div",{className:"grid gap-3 xl:grid-cols-2",children:[(0,o.jsx)(he,{keyLabel:a("Function"),rows:d.byFunction,testId:"ai-by-function",title:a("By function")}),(0,o.jsx)(he,{keyLabel:a("Model"),rows:d.byModel,testId:"ai-by-model",title:a("By model")})]}),d.calls.length===0?(0,o.jsx)(q,{children:(0,o.jsx)(oe,{className:"p-4 text-xs text-muted-foreground","data-testid":"ai-no-calls",children:a("No recent calls in the live trace ring \u2014 it empties when the shard hibernates.")})}):(0,o.jsx)($e,{calls:d.calls,onOpenTrace:r})]}),e[15]=r,e[16]=a,e[17]=x,e[18]=d.byFunction,e[19]=d.byModel,e[20]=d.calls,e[21]=d.source,e[22]=d.totals,e[23]=v):v=e[23];let C;return e[24]!==h||e[25]!==f||e[26]!==v?(C=(0,o.jsxs)("section",{className:"flex flex-col gap-4","data-testid":"ai-panel",children:[h,f,v]}),e[24]=h,e[25]=f,e[26]=v,e[27]=C):C=e[27],C},"Ze");function Le(n){return n.providerCost+n.estimatedCost}p(Le,"Ke");export{Ye as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as N}from"./chunk-RWVIV3U7.js";import{a as q,b as M,c as A,d as w,e as C,f as E}from"./chunk-HCTJKP5J.js";import{a as v}from"./chunk-2IKDEUCX.js";import{d as g,h as j,p as L,q as S}from"./chunk-74IYYDDI.js";import{a as u,d as x,e as H,f as I,g as R}from"./chunk-I26MS5PJ.js";var Q=x(I(),1),d=x(H(),1);var a=x(R(),1);var T={volume:"Request volume per function",latency:"Latency p50 / p95 per function",hotShards:"Hot shards"},O=Object.keys(T),P={error:null,loading:!0,rows:null},$=u(s=>Object.keys(s[0]??{}),"B"),U=u(s=>{let e=(0,Q.c)(22),{state:y,title:o}=s,l=g(),{error:t,loading:r,rows:n}=y,c;if(e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==o){let b=n===null?[]:$(n),i;e[6]!==l||e[7]!==o?(i=l(o),e[6]=l,e[7]=o,e[8]=i):i=e[8];let p;e[9]!==i?(p=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i})}),e[9]=i,e[10]=p):p=e[10];let m;e[11]!==r||e[12]!==l?(m=r&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:l("Loading\u2026")}),e[11]=r,e[12]=l,e[13]=m):m=e[13];let h;e[14]!==t||e[15]!==r?(h=!r&&t!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:t}),e[14]=t,e[15]=r,e[16]=h):h=e[16];let f;e[17]!==t||e[18]!==r||e[19]!==n||e[20]!==l?(f=!r&&t===null&&n!==null&&n.length===0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:l("No data points yet.")}),e[17]=t,e[18]=r,e[19]=n,e[20]=l,e[21]=f):f=e[21],c=(0,a.jsxs)(v,{className:"gap-0 py-0","data-testid":`analytics-panel-${o}`,children:[p,m,h,f,!r&&t===null&&n!==null&&n.length>0&&(0,a.jsxs)(q,{children:[(0,a.jsx)(M,{children:(0,a.jsx)(w,{children:b.map(W)})}),(0,a.jsx)(A,{children:n.map((V,B)=>(0,a.jsx)(w,{children:b.map(k=>(0,a.jsx)(E,{className:"font-mono text-xs",children:L(V[k])},k))},B))})]})]}),e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=c}else c=e[5];return c},"V"),G=u(({runQuery:s}={})=>{let e=g(),[y,o]=(0,d.useState)({}),l=(0,d.useCallback)(async t=>{if(s!==void 0)for(let r of O){if(t.cancelled)return;o(n=>({...n,[r]:P}));try{let{rows:n}=await s(r);t.cancelled||o(c=>({...c,[r]:{error:null,loading:!1,rows:n}}))}catch(n){t.cancelled||o(c=>({...c,[r]:{error:j(n),loading:!1,rows:null}}))}}},[s]);return(0,d.useEffect)(()=>{let t={cancelled:!1};return S(l(t)),()=>{t.cancelled=!0}},[l]),s===void 0?(0,a.jsx)(N,{description:e("Analytics usage panels read through your worker, never from the browser. Pass studio.analyticsSqlQuery, a runner that calls an admin-only action running functionUsageQuery(panel) through ctx.analyticsSql, to enable these panels."),icon:(0,a.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"})}),testId:"analytics-not-configured",title:e("Analytics usage panels are not wired up.")}):(0,a.jsx)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:O.map(t=>(0,a.jsx)(U,{state:y[t]??P,title:T[t]},t))})},"X");function W(s){return(0,a.jsx)(C,{children:s},s)}u(W,"$");export{G as AnalyticsPanel};
|