@lunora/studio 1.0.0-alpha.38 → 1.0.0-alpha.381
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 +201 -104
- package/README.md +7 -7
- package/dist/index.d.mts +1647 -0
- package/dist/index.d.ts +1039 -809
- package/dist/index.mjs +1 -0
- package/dist/mount.d.mts +23 -0
- package/dist/mount.d.ts +13 -11
- 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 +10 -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 +26 -0
- package/dist/packem_chunks/TableEditor.mjs +1 -0
- package/dist/packem_chunks/agents-panel.mjs +1 -0
- package/dist/packem_chunks/ai-knowledge.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/assistant-panel.mjs +3 -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/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/theme-indicator.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-DAHZ35kM.mjs +1 -0
- package/dist/packem_shared/ApiDocsPanel-sEDqUNQq.mjs +2 -0
- package/dist/packem_shared/ApiReferencePanel-CQxU1Ocx.mjs +1 -0
- package/dist/packem_shared/CommandPalette-BZCHLpst.mjs +1 -0
- package/dist/packem_shared/ConfirmButton-CIXYF6Mg.mjs +1 -0
- package/dist/packem_shared/ConnectionBadge-BfcoN-VE.mjs +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-B9kGlqXE.mjs +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-BQ3jRT74.mjs +1 -0
- package/dist/packem_shared/DataBrowser-CkVOu6py.mjs +4 -0
- package/dist/packem_shared/DataFilters--ocFTVT2.mjs +1 -0
- package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
- package/dist/packem_shared/GlobalDataBrowser-l2ECwXCm.mjs +1 -0
- package/dist/packem_shared/HomePanel-c7as4tvl.mjs +1 -0
- package/dist/packem_shared/MigrationsPanel-BQol4Un1.mjs +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-BFDG91tn.mjs +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
- package/dist/packem_shared/ScheduledJobs-Du8ZGL7v.mjs +1 -0
- package/dist/packem_shared/ShardInput-CoySruKZ.mjs +1 -0
- package/dist/packem_shared/Studio-BmbkaUrx.mjs +1 -0
- package/dist/packem_shared/StudioApp-CsyDnrg2.mjs +1 -0
- package/dist/packem_shared/StudioI18nProvider-CGXCPnQn.mjs +1 -0
- package/dist/packem_shared/advisor-view-gtf_DhUU.mjs +5 -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-DpxFQ0qO.d.mts +374 -0
- package/dist/packem_shared/app.d-DpxFQ0qO.d.ts +374 -0
- package/dist/packem_shared/assistant-provider-Dw0roZh3.mjs +1 -0
- package/dist/packem_shared/assistant-reason-D6EwMCxT.mjs +1 -0
- package/dist/packem_shared/auth-pager-DW77WeZw.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-BPy1pJRO.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-B5m1OosL.mjs +1 -0
- package/dist/packem_shared/data-view-params-C-_G-biH.mjs +1 -0
- package/dist/packem_shared/diagram-export-panel-Vdt-DZnO.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-3AR_-s_s.mjs +6 -0
- package/dist/packem_shared/grid-features-Drvfswwy.mjs +6 -0
- package/dist/packem_shared/grid-pagination-DY2erU65.mjs +1 -0
- package/dist/packem_shared/home-panel-TpxiaHgB.mjs +3 -0
- package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
- package/dist/packem_shared/internal-hIuTpSbx.mjs +2 -0
- package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
- package/dist/packem_shared/live-status-D1GasNsH.mjs +1 -0
- package/dist/packem_shared/log-fields-CV-9O0nh.mjs +8 -0
- package/dist/packem_shared/log-line-CYJQf6P-.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-z4CBi0y8.mjs +1 -0
- package/dist/packem_shared/reference-view-DENugPcj.mjs +13 -0
- package/dist/packem_shared/schema-diagram-CtVPhOGj.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-DCwooMGW.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-DZlpp4Vx.mjs +2 -0
- package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
- package/dist/packem_shared/table-list-sidebar-Bfmg04MD.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-CaOm4JS3.mjs +1 -0
- package/dist/packem_shared/use-admin-spec-CK7mk3Ui.mjs +1 -0
- package/dist/packem_shared/use-assistant-rpc-AKu8hvPm.mjs +1 -0
- package/dist/packem_shared/use-async-submit-D0r7-m2J.mjs +1 -0
- package/dist/packem_shared/use-auth-config-DameIc6y.mjs +1 -0
- package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
- package/dist/packem_shared/use-open-trace-BJKMJjeS.mjs +1 -0
- package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
- package/dist/packem_shared/use-studio-client-DCA50tF2.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-274SZA4F.js +1 -0
- package/dist/standalone/chunk-2DKLUTH2.js +1 -0
- package/dist/standalone/chunk-2KREOMPV.js +1 -0
- package/dist/standalone/chunk-2KTN53PK.js +1 -0
- package/dist/standalone/chunk-2NUCBQFU.js +1 -0
- package/dist/standalone/chunk-2VGEYQJ5.js +1 -0
- package/dist/standalone/chunk-337EJGCU.js +1 -0
- package/dist/standalone/chunk-3NYU3CCO.js +1 -0
- package/dist/standalone/chunk-3QNDJXLL.js +1 -0
- package/dist/standalone/chunk-4AG356VE.js +1 -0
- package/dist/standalone/chunk-4E6DQHFK.js +1 -0
- package/dist/standalone/chunk-4KPATTV6.js +1 -0
- package/dist/standalone/chunk-4SY2N2RS.js +1 -0
- package/dist/standalone/chunk-4TGALJHR.js +1 -0
- package/dist/standalone/chunk-4W7SB3SF.js +1 -0
- package/dist/standalone/chunk-4YEGXH2V.js +1 -0
- package/dist/standalone/chunk-5MIJ3KEK.js +1 -0
- package/dist/standalone/chunk-5NPU6VPX.js +1 -0
- package/dist/standalone/chunk-5PEAXTYQ.js +1 -0
- package/dist/standalone/chunk-5QK3ZHNZ.js +1 -0
- package/dist/standalone/chunk-66IUCD6W.js +1 -0
- package/dist/standalone/chunk-76D454G5.js +1 -0
- package/dist/standalone/chunk-7MQQPZQC.js +1 -0
- package/dist/standalone/chunk-7VZFX5O4.js +1 -0
- package/dist/standalone/chunk-7WGZSDRS.js +2 -0
- package/dist/standalone/chunk-A2LKDNNA.js +1 -0
- package/dist/standalone/chunk-A4F3YMBV.js +1 -0
- package/dist/standalone/chunk-A6TVTNKO.js +1 -0
- package/dist/standalone/chunk-ADABTCDI.js +1 -0
- package/dist/standalone/chunk-AE3ABYCE.js +1 -0
- package/dist/standalone/chunk-AFLNQEZ5.js +1 -0
- package/dist/standalone/chunk-AQ6LY5RO.js +14 -0
- package/dist/standalone/chunk-AWFFXR6S.js +1 -0
- package/dist/standalone/chunk-AY4DPAPO.js +1 -0
- package/dist/standalone/chunk-CL3JOU6F.js +1 -0
- package/dist/standalone/chunk-CVSIFPI5.js +1 -0
- package/dist/standalone/chunk-D2LGOQ32.js +1 -0
- package/dist/standalone/chunk-DA2CAFXI.js +1 -0
- package/dist/standalone/chunk-DELDS72W.js +1 -0
- package/dist/standalone/chunk-DJPK4PZV.js +1 -0
- package/dist/standalone/chunk-DRHZZ7IN.js +1 -0
- package/dist/standalone/chunk-DWKKQ75U.js +59 -0
- package/dist/standalone/chunk-EDL46BPM.js +1 -0
- package/dist/standalone/chunk-ELWBGGS7.js +2 -0
- package/dist/standalone/chunk-EOFWXI3T.js +1 -0
- package/dist/standalone/chunk-EVUVQB4Q.js +1 -0
- package/dist/standalone/chunk-F2DVDJV6.js +1 -0
- package/dist/standalone/chunk-FKOAI6VV.js +1 -0
- package/dist/standalone/chunk-FPODRWDZ.js +1 -0
- package/dist/standalone/chunk-FWM5Z6CH.js +1 -0
- package/dist/standalone/chunk-GCYQOJYI.js +1 -0
- package/dist/standalone/chunk-GDAZWXQW.js +1 -0
- package/dist/standalone/chunk-H6VTIXVB.js +1 -0
- package/dist/standalone/chunk-HBEZGCPB.js +1 -0
- package/dist/standalone/chunk-I626YY7T.js +4 -0
- package/dist/standalone/chunk-I7PUGF3D.js +1 -0
- package/dist/standalone/chunk-IMM6HPPD.js +1 -0
- package/dist/standalone/chunk-IQ5CIBXJ.js +1 -0
- package/dist/standalone/chunk-JELTLAEP.js +8 -0
- package/dist/standalone/chunk-JNWK5MJC.js +1 -0
- package/dist/standalone/chunk-JQBZDS6X.js +6 -0
- package/dist/standalone/chunk-JXUU3BD2.js +1 -0
- package/dist/standalone/chunk-K7GU4AIX.js +1 -0
- package/dist/standalone/chunk-KQVY73EU.js +7 -0
- package/dist/standalone/chunk-KVQ2GMJR.js +1 -0
- package/dist/standalone/chunk-KXUK7CSR.js +1 -0
- package/dist/standalone/chunk-L27FKJTG.js +1 -0
- package/dist/standalone/chunk-LHQFTCOS.js +1 -0
- package/dist/standalone/chunk-LJLNIVUA.js +8 -0
- package/dist/standalone/chunk-LMCBMC2V.js +1 -0
- package/dist/standalone/chunk-LYNQHGQ4.js +1 -0
- package/dist/standalone/chunk-LYVYUTQY.js +1 -0
- package/dist/standalone/chunk-MGYRQPAY.js +1 -0
- package/dist/standalone/chunk-MHZNDDGI.js +1 -0
- package/dist/standalone/chunk-MICDQTTJ.js +1 -0
- package/dist/standalone/chunk-ML6YSDEQ.js +4 -0
- package/dist/standalone/chunk-MNXXIISC.js +1 -0
- package/dist/standalone/chunk-MTBY4GXM.js +1 -0
- package/dist/standalone/chunk-MULFKWTQ.js +1 -0
- package/dist/standalone/chunk-N7FOBAV3.js +1 -0
- package/dist/standalone/chunk-NDIEUO4N.js +1 -0
- package/dist/standalone/chunk-NPZG7XK5.js +1 -0
- package/dist/standalone/chunk-NQ727GVM.js +1 -0
- package/dist/standalone/chunk-NYLSD5LR.js +1 -0
- package/dist/standalone/chunk-O4SDDSDL.js +1 -0
- package/dist/standalone/chunk-O5QATFN3.js +159 -0
- package/dist/standalone/chunk-O65QTRXU.js +1 -0
- package/dist/standalone/chunk-ODEIAS3V.js +1 -0
- package/dist/standalone/chunk-OJO6ERJ4.js +1 -0
- package/dist/standalone/chunk-OOUGGYHQ.js +1 -0
- package/dist/standalone/chunk-OR4RO6V4.js +1 -0
- package/dist/standalone/chunk-OVPS52RO.js +3 -0
- package/dist/standalone/chunk-OWRWDDJT.js +1 -0
- package/dist/standalone/chunk-OZID3UYF.js +1 -0
- package/dist/standalone/chunk-PDBW6GTJ.js +1 -0
- package/dist/standalone/chunk-Q7KRCKCE.js +1 -0
- package/dist/standalone/chunk-QCG2G6IF.js +1 -0
- package/dist/standalone/chunk-QF743FSL.js +1 -0
- package/dist/standalone/chunk-QHVUXMRV.js +1 -0
- package/dist/standalone/chunk-QLZGKBOW.js +1 -0
- package/dist/standalone/chunk-QOK2UU3L.js +1 -0
- package/dist/standalone/chunk-R3RIZDUS.js +1 -0
- package/dist/standalone/chunk-R6NJ4ER6.js +1 -0
- package/dist/standalone/chunk-RAJ327CY.js +1 -0
- package/dist/standalone/chunk-RIAOZECW.js +1 -0
- package/dist/standalone/chunk-RK3HQKPW.js +1 -0
- package/dist/standalone/chunk-RPRNYCFT.js +1 -0
- package/dist/standalone/chunk-SADHW6WJ.js +5 -0
- package/dist/standalone/chunk-SBQT2ZSX.js +1 -0
- package/dist/standalone/chunk-SCTYLLJT.js +1 -0
- package/dist/standalone/chunk-T7UKRA6J.js +1 -0
- package/dist/standalone/chunk-UAXX2RXT.js +1 -0
- package/dist/standalone/chunk-UFFUDDK7.js +1 -0
- package/dist/standalone/chunk-UOFMFYZ7.js +6 -0
- package/dist/standalone/chunk-UUOEHNMP.js +31 -0
- package/dist/standalone/chunk-V4JKKAAZ.js +3 -0
- package/dist/standalone/chunk-VGKDC2OQ.js +1 -0
- package/dist/standalone/chunk-VJQP4ARP.js +33 -0
- package/dist/standalone/chunk-VTTS5L36.js +1 -0
- package/dist/standalone/chunk-W3WGVJNJ.js +1 -0
- package/dist/standalone/chunk-W7CLOQOU.js +1 -0
- package/dist/standalone/chunk-WDR3BJ2C.js +1 -0
- package/dist/standalone/chunk-WONKLAKW.js +3 -0
- package/dist/standalone/chunk-WU2ST74V.js +1 -0
- package/dist/standalone/chunk-WVURFBJS.js +1 -0
- package/dist/standalone/chunk-X474JV2D.js +1 -0
- package/dist/standalone/chunk-XBHRAFJA.js +1 -0
- package/dist/standalone/chunk-XEIJUQ4B.js +1 -0
- package/dist/standalone/chunk-XOLTLG4I.js +5 -0
- package/dist/standalone/chunk-XSFGXEYO.js +1 -0
- package/dist/standalone/{chunk-BJGBHGK3.js → chunk-Y2YLTUMD.js} +1 -1
- package/dist/standalone/chunk-Y6OVSHPH.js +1 -0
- package/dist/standalone/chunk-YL5ZAR3P.js +1 -0
- package/dist/standalone/chunk-YNCZVYCO.js +1 -0
- package/dist/standalone/chunk-YTLKHICM.js +1 -0
- package/dist/standalone/chunk-YYJGL32M.js +1 -0
- package/dist/standalone/chunk-Z4BLDRDD.js +10 -0
- package/dist/standalone/chunk-ZBLG4UAV.js +1 -0
- package/dist/standalone/chunk-ZHZHI6KX.js +1 -0
- package/dist/standalone/chunk-ZPQBVYNN.js +1 -0
- package/dist/standalone/chunk-ZPQFM3A7.js +1 -0
- package/dist/standalone/chunk-ZZ6ZCOD4.js +1 -0
- package/dist/standalone/chunk-ZZA6VQDG.js +1 -0
- package/dist/standalone/studio.js +9 -214
- package/dist/styles.css +2 -2
- package/package.json +28 -23
- 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 -353
- 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 -365
- 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 -3178
- 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 -1052
- 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 -1731
- package/dist/packem_chunks/vector-browser.js +0 -281
- package/dist/packem_chunks/workflows-panel.js +0 -562
- package/dist/packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js +0 -52
- package/dist/packem_shared/ApiDocsPanel-D4CJf2ad.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-BeVNxSVm.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-D9MQk8I7.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-C48P1K5W.js +0 -16
- package/dist/packem_shared/StudioApp-Cqh-SYm2.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-CoGxi-oj.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/scroll-area-DLhcy-ml.js +0 -93
- 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-CPHA_-3I.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-async-submit-BWMDwRa4.js +0 -91
- 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-2F4VYKM6.js +0 -1
- package/dist/standalone/chunk-2GFAOIC3.js +0 -8
- package/dist/standalone/chunk-2K47A3P6.js +0 -1
- package/dist/standalone/chunk-2NGUNNGW.js +0 -1
- package/dist/standalone/chunk-2SAZ5BZ5.js +0 -4
- package/dist/standalone/chunk-2SE7II7A.js +0 -1
- package/dist/standalone/chunk-34OQUHSV.js +0 -1
- package/dist/standalone/chunk-3CJW6NWG.js +0 -4
- package/dist/standalone/chunk-3DBG4RIV.js +0 -1
- package/dist/standalone/chunk-3OA7PECS.js +0 -6
- package/dist/standalone/chunk-3UFZCRWL.js +0 -1
- package/dist/standalone/chunk-4FL3EDN5.js +0 -2
- package/dist/standalone/chunk-4JOKDSPU.js +0 -1
- package/dist/standalone/chunk-4QHKBC77.js +0 -1
- package/dist/standalone/chunk-5OIBXYZM.js +0 -1
- package/dist/standalone/chunk-6GFEVKJP.js +0 -1
- package/dist/standalone/chunk-7FF76BYY.js +0 -1
- package/dist/standalone/chunk-7TJJXVSE.js +0 -1
- package/dist/standalone/chunk-7YXOPTWI.js +0 -1
- package/dist/standalone/chunk-AHILM3ZP.js +0 -1
- package/dist/standalone/chunk-AJIUI7DD.js +0 -1
- package/dist/standalone/chunk-AJKR6PY7.js +0 -1
- package/dist/standalone/chunk-BOXSWNXZ.js +0 -1
- package/dist/standalone/chunk-CKSHCYGC.js +0 -2
- package/dist/standalone/chunk-DC72CQY4.js +0 -76
- package/dist/standalone/chunk-DWDILV2E.js +0 -1
- package/dist/standalone/chunk-FA3CCTXK.js +0 -1
- package/dist/standalone/chunk-FCSPAJW4.js +0 -1
- package/dist/standalone/chunk-GLUNBZRI.js +0 -1
- package/dist/standalone/chunk-GM4NPF3W.js +0 -1
- package/dist/standalone/chunk-GMSGZDDH.js +0 -13
- package/dist/standalone/chunk-GTM65MVX.js +0 -1
- package/dist/standalone/chunk-HLZ4YLRK.js +0 -1
- package/dist/standalone/chunk-HV7G6DFP.js +0 -5
- package/dist/standalone/chunk-I3VXCZZL.js +0 -1
- package/dist/standalone/chunk-IJPFHUJK.js +0 -2
- package/dist/standalone/chunk-IQ466Q6W.js +0 -1
- package/dist/standalone/chunk-IU6GTBPD.js +0 -1
- package/dist/standalone/chunk-IXDH4GL5.js +0 -1
- package/dist/standalone/chunk-J6J54MBP.js +0 -1
- package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
- package/dist/standalone/chunk-JTTVXBLU.js +0 -1
- package/dist/standalone/chunk-K3GNLVYK.js +0 -1
- package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
- package/dist/standalone/chunk-KJJ3WM6H.js +0 -4
- package/dist/standalone/chunk-KQTCLPLO.js +0 -4
- package/dist/standalone/chunk-KSKXW5PX.js +0 -1
- package/dist/standalone/chunk-KZ6INM5M.js +0 -1
- package/dist/standalone/chunk-L7SK4ZZD.js +0 -1
- package/dist/standalone/chunk-LAK5VSPI.js +0 -1
- package/dist/standalone/chunk-LEHGGJP2.js +0 -1
- package/dist/standalone/chunk-LNZIB2MD.js +0 -1
- package/dist/standalone/chunk-MZ756AFF.js +0 -1
- package/dist/standalone/chunk-N7G5I47W.js +0 -1
- package/dist/standalone/chunk-NV6RHG5L.js +0 -1
- package/dist/standalone/chunk-O3I57FXK.js +0 -1
- package/dist/standalone/chunk-O3NAGRTR.js +0 -1
- package/dist/standalone/chunk-OES45DFG.js +0 -13
- package/dist/standalone/chunk-OIC7EJWI.js +0 -1
- package/dist/standalone/chunk-OLE2AYTD.js +0 -1
- package/dist/standalone/chunk-P3ZMBPCY.js +0 -1
- package/dist/standalone/chunk-P5JW7HKP.js +0 -1
- package/dist/standalone/chunk-PVZI3CXP.js +0 -19
- package/dist/standalone/chunk-PZ7HD5T2.js +0 -1
- package/dist/standalone/chunk-Q3PTSVVU.js +0 -3
- package/dist/standalone/chunk-Q52CHOSY.js +0 -1
- package/dist/standalone/chunk-QAFAJBAW.js +0 -1
- package/dist/standalone/chunk-QBAT52GB.js +0 -1
- package/dist/standalone/chunk-QKQABJBE.js +0 -1
- package/dist/standalone/chunk-R5OQZYSW.js +0 -4
- package/dist/standalone/chunk-RRCPZMC2.js +0 -22
- package/dist/standalone/chunk-SE2TQAHJ.js +0 -1
- package/dist/standalone/chunk-SEU5V7I6.js +0 -1
- package/dist/standalone/chunk-SG3ALJJU.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-TI7SE33D.js +0 -1
- package/dist/standalone/chunk-TQ36RWOP.js +0 -1
- package/dist/standalone/chunk-UK64ZSUW.js +0 -1
- package/dist/standalone/chunk-VFJPO4UO.js +0 -1
- package/dist/standalone/chunk-VLXV72QE.js +0 -1
- package/dist/standalone/chunk-VON7JUPG.js +0 -1
- package/dist/standalone/chunk-WI7GWFEG.js +0 -1
- package/dist/standalone/chunk-WXPWVBIY.js +0 -1
- package/dist/standalone/chunk-X7RPB4K4.js +0 -1
- package/dist/standalone/chunk-XFSUINL3.js +0 -1
- package/dist/standalone/chunk-XGUOXHX4.js +0 -1
- package/dist/standalone/chunk-XNJNSCLM.js +0 -1
- package/dist/standalone/chunk-Y2ZPNDL7.js +0 -4
- package/dist/standalone/chunk-YAECF5LW.js +0 -1
- package/dist/standalone/chunk-ZHVTQ37P.js +0 -1
- package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
- package/dist/standalone/chunk-ZL4E2WVF.js +0 -1
- package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
- package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
- package/dist/standalone/chunk-ZYRGPDZB.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as ur}from"./chunk-N7FOBAV3.js";import{a as B,b as Q}from"./chunk-ADABTCDI.js";import{a,d as T}from"./chunk-5PEAXTYQ.js";var ko=T(B(),1),Yt=ko.createContext(null);var Io=T(B(),1);function M(t){let e=Io.useContext(Yt);return e||void 0,e}a(M,"useRouter");function et(t){return t[t.length-1]}a(et,"last");function mt(t,e){return typeof t=="function"?t(e):t}a(mt,"functionalUpdate");var Zt=Object.prototype.hasOwnProperty;function Tt(t){for(let e in t)if(Zt.call(t,e))return!0;return!1}a(Tt,"hasKeys");var Mt=a(()=>Object.create(null),"createNull"),gt=a((t,e)=>tt(t,e,!0),"nullReplaceEqualDeep");function tt(t,e,o,n=0){if(!1)return e;if(t===e)return t;if(n++>500)return e;let r=Array.isArray(t)&&Array.isArray(e);if(!r&&!(Xt(t)&&Xt(e)))return e;let i=Object.keys(t),s=i.length,c=Object.keys(e),l=c.length;if(r?s!==t.length||l!==e.length||s&&et(i)!==`${s-1}`||l&&et(c)!==`${l-1}`:s!==Object.getOwnPropertyNames(t).length||l!==Object.getOwnPropertyNames(e).length||Object.getOwnPropertySymbols(e).length)return e;let u=0,f,d,h;if(r){for(;u<l&&(h=u,d=t[h],f=e[h],f=d===f?d:typeof d=="object"?tt(d,f,o,n):f,f===d);u++);if(u===l&&s===l)return t}else{let m=s===l,g=!0;for(;u<l;u++){h=c[u],d=t[h];let S=e[h];f=d===S?d:typeof d=="object"?tt(d,S,o,n):S,m&&=f===d&&(i[u]===h||Zt.call(t,h)),g&&=Object.is(f,S),i[u]=f}if(m)return Object.getOwnPropertySymbols(t).length?e:t;if(g)return e}let p=r?c.fill(0):o?Mt():{};for(let m=0;m<l;m++)h=r?m:c[m],r?(d=t[h],m>u&&(f=e[h],f=d===f?d:typeof d=="object"?tt(d,f,o,n):f),p[h]=m<u?d:f):p[h]=i[m];return p}a(tt,"replaceEqualDeep");function Xt(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}a(Xt,"isPlainObject");function J(t,e,o,n){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++){let s=t[r],c=e[r];if(s!==c&&!J(s,c,o,n))return!1}return!0}if(Xt(t)&&Xt(e)){if(o){for(let i in e)if((n||e[i]!==void 0)&&!J(t[i],e[i],o,n))return!1;return!0}let r=0;if(n)r=Object.keys(t).length;else for(let i in t)t[i]!==void 0&&r++;for(let i in e)if((n||e[i]!==void 0)&&(r--===0||!J(t[i],e[i],o,n)))return!1;return r===0}return!1}a(J,"deepEqual");var fr=/[\x00-\x1f\x7f"<>`{}]/g;function dr(t){return t.replace(fr,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}a(dr,"sanitizePathSegment");function Oo(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,o=>{try{return decodeURI(o)}catch{return o}})}return dr(e)}a(Oo,"decodeSegment");var Le=["http:","https:","mailto:","tel:"];function it(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}a(it,"getUrlScheme");var ke=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Dt(t,e){if(!t)return!1;if(ke.test(t))return!0;let o=it(t);return o?!e.has(o):!1}a(Dt,"isDangerousProtocol");function bt(t){if(!t)return t;let e=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){let o=/%25|%5C/gi,n=0,r;for(e="";(r=o.exec(t))!==null;)e+=Oo(t.slice(n,r.index))+r[0],n=o.lastIndex;e+=Oo(n?t.slice(n):t)}return e}a(bt,"decodePath");function No(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}a(No,"encodePathLikeUrl");function Fo(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}a(Fo,"arraysEqual");function ut(){throw new Error("Invariant failed")}a(ut,"invariant");function at(t){return t.replace(/\/{2,}/g,"/")}a(at,"cleanPath");function Qt(t){return t==="/"?t:t.replace(/^\/+/,"")}a(Qt,"trimPathLeft");function H(t){let e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/+$/,""):t}a(H,"trimPathRight");function At(t){return H(Qt(t))}a(At,"trimPath");function te(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}a(te,"removeTrailingSlash");function ee(t,e,o="never",n){if(e.includes("//")&&(e=at(e)),e.startsWith("/"))return e.length===1||o==="preserve"?e:o==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;let r=e===".",i;if(n){i=r?t:t+"\0"+e;let u=n.get(i);if(u)return u}let s;if(r)s=t.split("/");else{for(t.includes("//")&&(t=at(t)),s=t.split("/");s.length>1&&et(s)==="";)s.pop();let u=e.split("/");for(let f=0,d=u.length;f<d;f++){let h=u[f];h===""?f?f===d-1&&s.push(h):s=[h]:h===".."?s.length>1?s.pop():s=[""]:h==="."||s.push(h)}}s.length>1&&(et(s)===""?o==="never"&&s.pop():o==="always"&&s.push(""));let c=s.join("/"),l=(r?at(c):c)||"/";return i&&n&&n.set(i,l),l}a(ee,"resolvePath");function To(t){let e=new Map(t.map(n=>[encodeURIComponent(n),n])),o=new RegExp([...e.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return n=>n.replace(o,r=>e.get(r)??r)}a(To,"compileDecodeCharMap");function hr(t){return t==null||t===""}a(hr,"isMissingSplat");function pr(t,e,o){if(typeof e!="string")return""+(e??void 0);let n=t==="_splat";if(n&&(!e||/^[a-zA-Z0-9\-._~!/]*$/.test(e)))return e;let r=encodeURIComponent(e);return n&&(r=r.replaceAll("%2F","/")),o?o(r):r}a(pr,"encodeParam");function oe(t,e,o,n,r){let i=t.endsWith("/")?"/":"",s="";for(let c of e){if(typeof c=="string"){s+=c;continue}let[l,u,f,d]=c,h=l===2,p=h&&d!==void 0?d+i:d,m=o[u];if(!(l===3&&m==null)){if(r&&(r[u]=m,h&&(r["*"]=m)),h&&hr(m)){if(f==="/"&&!p)continue;m=""}s+=f+pr(u,m,n)+(p||"")}}return s+i||"/"}a(oe,"interpolatePath");function q(t){return t?.isNotFound===!0}a(q,"isNotFound");function mr(){try{return sessionStorage}catch{return}}a(mr,"getSafeSessionStorage");var gr="tsr-scroll-restoration-v1_3",Ao=mr();function yr(){try{return JSON.parse(Ao?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}a(yr,"createScrollRestorationCache");var Ct=yr(),Mo="data-scroll-restoration-id",vr=a(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Sr(t){let e=t.getAttribute(Mo);if(e)return`[${Mo}="${e}"]`;let o="",n=t,r;for(;r=n.parentNode;){let i=1,s=n;for(;s=s.previousElementSibling;)i++;let c=`${n.localName}:nth-child(${i})`;o=o?`${c} > ${o}`:c,n=r}return o}a(Sr,"getScrollRestorationSelector");var ne=!1,re="window";function Ie(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}a(Ie,"getElement");function Do(t){let e=new Set;for(let o of t){if(o===re)continue;let n=Ie(o);n&&e.add(n)}return e}a(Do,"getScrollToTopElements");function $o(t,e){let o=e??t.options.scrollRestoration,n=t._scroll;if(o&&(n.e=!0),!1)return;let r=t.options.getScrollRestorationKey||vr,i=new Set,s=a(c=>{let l=Ct[c]||={};for(let u of i)u===document?l[re]={scrollX,scrollY}:u.isConnected&&(l[Sr(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})},"snapshotCurrentScrollTargets");o&&!n.s&&(n.s=!0,ne=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{ne||i.add(c.target)},!0),t.subscribe("onBeforeLoad",c=>{c.fromLocation&&s(r(c.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",s(r(t.stores.resolvedLocation.get()??t.stores.location.get()));try{Ao?.setItem(gr,JSON.stringify(Ct))}catch{}}),addEventListener("pageshow",c=>{c.persisted&&(history.scrollRestoration="manual")})),!n.r&&(n.r=!0,t.subscribe("onRendered",c=>{let l=t.options.scrollRestorationBehavior,u=t.options.scrollToTopSelectors,f=n.n,d=n.h,h;if(i.clear(),n.n=!0,n.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let p=r(c.toLocation),m=c.fromLocation&&r(c.fromLocation);if(n.e&&m&&m!==p){let g=Ct[m];if(g){let S=Ct[p];for(let y in g){if(y===re){if(f)continue}else{let R=Ie(y);if(!R||f&&u&&(h??=Do(u),h.has(R)))continue}S||(S=Ct[p]={}),S[y]??=g[y]}}}ne=!0;try{let g=c.toLocation.hash,S=c.toLocation.state.__hashScrollIntoViewOptions??!0,y=!1;if(f){!g&&u&&(h??=Do(u));let R=g&&S&&d,b=n.e?Ct[p]:void 0;if(b)for(let w in b){let{scrollX:C,scrollY:_}=b[w];if(w===re){if(R)continue;scrollTo({top:_,left:C,behavior:l}),y=!0}else{let v=Ie(w);v&&(v.scrollLeft=C,v.scrollTop=_,h?.delete(v))}}if(!g){let w={top:0,left:0,behavior:l};if(y||scrollTo(w),h)for(let C of h)C.scrollTo(w)}}!y&&g&&S&&document.getElementById(g)?.scrollIntoView(S)}finally{ne=!1}}))}a($o,"setupScrollRestoration");function Bo(t,e=String){let o;for(let n in t){let r=t[n];r!==void 0&&(o||=new URLSearchParams).set(n,e(r))}return o?o.toString():""}a(Bo,"encode");function Oe(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}a(Oe,"toValue");function Vo(t){let e=new URLSearchParams(t),o=Object.create(null);for(let[n,r]of e.entries()){let i=o[n];i==null?o[n]=Oe(r):Array.isArray(i)?i.push(Oe(r)):o[n]=[i,Oe(r)]}return o}a(Vo,"decode");var Ho=/^(?:\s|["[{\d-]|fa|nu|tr)/,zo=Rr(JSON.parse),Uo=_r(JSON.stringify,JSON.parse);function Rr(t){let e=t===JSON.parse;return o=>{o[0]==="?"&&(o=o.slice(1));let n=Vo(o);for(let r in n){let i=n[r];if(typeof i=="string"){if(e&&!Ho.test(i))continue;try{n[r]=t(i)}catch{}}}return n}}a(Rr,"parseSearchWith");function _r(t,e){let o=e===JSON.parse;function n(r){if(r&&typeof r=="object")try{return t(r)}catch{}else if(e&&typeof r=="string"){if(o&&!Ho.test(r))return r;try{return e(r),t(r)}catch{}}return r}return a(n,"stringifyValue"),r=>{let i=Bo(r,n);return i?`?${i}`:""}}a(_r,"stringifySearchWith");var Y="__root__";function Wo(t){t.statusCode=t.statusCode||t.code||307;let e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);let o=new Response(null,{status:t.statusCode,headers:e});if(o.options=t,t.throw)throw o;return o}a(Wo,"redirect");function se(t){return t instanceof Response&&!!t.options}a(se,"isRedirect");function Pt(t){let e=new Map,o,n;return{get(r){let i=e.get(r);if(i)return i.visited=!0,i.value},set(r,i){let s=e.get(r);if(s){s.value=i;return}if(e.size>=t){let l=o?.next().value;for(;!l||l.visited;)l?l.visited=!1:o=e.values(),l=o.next().value;l===n&&(o=void 0),e.delete(l.key)}let c={key:r,value:i,visited:!1};n=c,e.set(r,c)},clear(){e.clear(),o=void 0,n=void 0}}}a(Pt,"createSieveCache");var ft=4,Ko=5;function wr(t){let e=t.names;if(e)return e;let o=[];for(let n of t)typeof n!="string"&&o.push(n[1]);return t.names=o}a(wr,"getParamNames");function xr(t,e,o){let n=t.slice(e,o);if(n.charCodeAt(0)===36)return n.length===1?[2,"_splat","",void 0]:[1,n.slice(1),"",""];let r=n.indexOf("{");if(r>=0){let i=n.indexOf("}",r),s=n.charCodeAt(r+1)===45,c=r+(s?3:2);if(i>=0&&n.charCodeAt(c-1)===36&&(!s||c<i)){let l=n.slice(c,i);return[s?3:l?1:2,l||"_splat",n.slice(0,r),t.slice(e+i+1,l?o:t.length)]}}return n}a(xr,"parseSegment");function Et(t,e,o,n,r,i){let s=o,c=e.fullPath??e.from,l=e.options,u=c.length,f=c.endsWith("/")?u-1:u,d=l?.caseSensitive??t,h=l?.params?.parse??l?.parseParams,p,m=i?o-1:0;if(!n||c.includes("$")){p=i?.slice()??[];let y=et(p);y&&typeof y!="string"&&y[0]===2&&(p[p.length-1]=[y[0],y[1],y[2],y[3]===void 0?void 0:y[3]+c.substring(o-(c[o-2]==="/"?2:1),f)],m=u)}for(;s<u;){let y=s,R=c.indexOf("/",y),b=R===-1?u:R,w=xr(c,y,b);s=b+1;let C;if(typeof w=="string"){if(!n)continue;let _=w,v;d?v=n.static??=new Map:(_=w.toLowerCase(),v=n.staticInsensitive??=new Map);let x=v.get(_);if(x)C=x;else{let P=yt(n);C=P,v.set(_,P)}}else{let _=w[0],v=w[2],x=w[3]??"";if(_===2&&(b=u,s=b+1),p&&m<b&&(m<y-1&&p.push(c.slice(m,y-1)),w[2]="/"+v,_===2&&w[3]!==void 0&&f<u&&(w[3]=x.slice(0,-1)),p.push(w),m=b),!n)continue;let P=d&&!!(v||x);d||(v=v.toLowerCase(),x=x.toLowerCase());let L=_===1?n.dynamic??=[]:_===3?n.optional??=[]:n.wildcard??=[],k=_!==2&&!h&&L.find(E=>!E.parse&&E.caseSensitive===P&&E.prefix===v&&E.suffix===x);if(k)C=k;else{let E=yt(n,_,P,v,x);C=E,L.push(E),L.length===2&&r?.push(L)}}n=C}p&&m<f&&p.push(c.slice(m,f));let g=p?.slice();if(!n)return g;if(h&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){let y=yt(n,Ko);(n.pathless??=[]).push(y),n=y}let S=(e.path||!e.children)&&!e.isRoot;if(S&&f<u){let y=yt(n,ft);n.index=y,n=y}return n.parse=h??null,n.priority=l?.params?.priority??0,n.route||(n.data=g,S&&(n.route=e)),[n,s,g]}a(Et,"parseSegments");function qo(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}a(qo,"sortDynamic");function yt(t,e=0,o,n,r){return{kind:e,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:o,prefix:n,suffix:r}}a(yt,"createSegmentNode");function Go(t,e){let o=yt(),n=[];function r(i,s,c,l){let[u,f,d]=Et(!1,i,s,c,n,l);if(i.children)for(let h of i.children)r(h,f,u,d)}a(r,"visit");for(let i of t)r(i,1,o);for(let i of n)i.sort(qo);e.masksTree=o,e.flatCache=Pt(1e3)}a(Go,"processRouteMasks");function Jo(t,e){t||="/";let o=e.flatCache.get(t);if(o!==void 0)return o;let n=Ne(t,e.masksTree);return e.flatCache.set(t,n),n}a(Jo,"findFlatMatch");function Yo(t,e,o,n,r){t||="/",n||="/";let i=e?`case\0${t}`:t,s=r.singleCache.get(i);return s||(s=yt(),Et(e,{from:t},1,s),r.singleCache.set(i,s)),Ne(n,s,o)}a(Yo,"findSingleMatch");function Xo(t,e,o=!1){let n=o?t:`nofuzz\0${t}`,r=e.matchCache.get(n);if(r!==void 0)return r;t||="/";let i;try{i=Ne(t,e.segmentTree,o)}catch(s){if(s instanceof URIError)i=null;else throw s}return i&&(i.branch=Fe(i.route)),e.matchCache.set(n,i),i}a(Xo,"findRouteMatch");function Zo(t,e=!1){let o=yt(),n=[],r={},i={},s=0;function c(l,u,f,d){if(l.init(s),l.id in r&&ut(),r[l.id]=l,s!==0&&l.path){let g=H(l.fullPath);(!i[g]||l.fullPath.endsWith("/"))&&(i[g]=l)}s++;let[h,p,m]=Et(e,l,u,f,n,d);if(l._interpolation=m,l.children)for(let g of l.children)c(g,p,h,m)}a(c,"visit"),c(t,1,o);for(let l of n)l.sort(qo);return{processedTree:{segmentTree:o,singleCache:Pt(1e3),matchCache:Pt(1e3),flatCache:null,masksTree:null},routesById:r,routesByPath:i}}a(Zo,"processRouteTree");function Ne(t,e,o=!1){let n=t.split("/"),r=Cr(t,n,e,o);if(!r)return null;let[i]=Qo(t,n,r);return{route:r.node.route,rawParams:i}}a(Ne,"findMatch");function Qo(t,e,o){let n=br(o.node),r=o.node.data&&wr(o.node.data),i=Object.create(null),s=o.extract?.part??0,c=o.extract?.node??0,l=o.extract?.path??0,u=o.extract?.param??0;for(;c<n.length;s++,c++,l++){let f=n[c];if(f.kind===ft)break;if(f.kind===Ko){s--,l--;continue}let d=e[s],h=l;if(d&&(l+=d.length),f.kind===1||f.kind===3){let p=r[u++];if(f.kind===3&&o.skipped&1<<c){s--,l=h-1;continue}let m=f.suffix||f.prefix?d.substring(f.prefix.length,d.length-f.suffix.length):d;(m||f.kind===1)&&(i[p]=decodeURIComponent(m))}else if(f.kind===2){let p=f,m=t.substring(h+p.prefix.length,t.length-p.suffix.length),g=decodeURIComponent(m);i["*"]=g,i._splat=g;break}}return o.rawParams&&Object.assign(i,o.rawParams),[i,{part:s,node:c,path:l,param:u}]}a(Qo,"extractParams");function Fe(t){let e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}a(Fe,"buildRouteBranch");function br(t){let e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}a(br,"buildBranch");function Cr(t,e,o,n){if(t==="/"&&o.index)return{node:o.index,skipped:0};let r=!et(e),i=r&&t!=="/",s=e.length-(r?1:0),c=[{node:o,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let f=c.pop(),{node:d,index:h,skipped:p,statics:m,dynamics:g,optionals:S}=f,{extract:y,rawParams:R}=f;if(d.kind===2&&d.route&&!ae(u,f))continue;if(d.parse){if(!jo(t,e,f))continue;R=f.rawParams,y=f.extract}n&&d.route&&d.kind!==ft&&ae(l,f)&&(l=f);let b=h===s;if(b&&(d.route&&(!i||d.kind===ft||d.kind===2)&&ae(u,f)&&(u=f),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;let w=b?void 0:e[h],C;if(b&&d.index){let _={node:d.index,index:h,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R},v=!0;if(d.index.parse&&(jo(t,e,_)||(v=!1)),v){if(!g&&!S&&!p&&Pr(m,s))return _;ae(u,_)&&(u=_)}}if(d.wildcard)for(let _=d.wildcard.length-1;_>=0;_--){let v=d.wildcard[_],{prefix:x,suffix:P}=v;if(!(x&&(b||!(v.caseSensitive?w:C??=w.toLowerCase()).startsWith(x)))){if(P){if(b)continue;let L=e.slice(h).join("/"),k=L.slice(-P.length);if((v.caseSensitive?k:k.toLowerCase())!==P||L.length-P.length<x.length)continue}c.push({node:v,index:s,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}}if(d.optional){let _=p|1<<d.depth+1;for(let v=d.optional.length-1;v>=0;v--){let x=d.optional[v];c.push({node:x,index:h,skipped:_,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}if(!b)for(let v=d.optional.length-1;v>=0;v--){let x=d.optional[v],{prefix:P,suffix:L}=x;if(P||L){let k=x.caseSensitive?w:C??=w.toLowerCase();if(P&&!k.startsWith(P)||L&&k.indexOf(L,k.length-L.length)<P.length)continue}c.push({node:x,index:h+1,skipped:p,statics:m,dynamics:g,optionals:S+ie(s,h),extract:y,rawParams:R})}}if(!b&&d.dynamic&&w)for(let _=d.dynamic.length-1;_>=0;_--){let v=d.dynamic[_],{prefix:x,suffix:P}=v;if(x||P){let L=v.caseSensitive?w:C??=w.toLowerCase();if(x&&!L.startsWith(x)||P&&L.indexOf(P,L.length-P.length)<x.length)continue}c.push({node:v,index:h+1,skipped:p,statics:m,dynamics:g+ie(s,h),optionals:S,extract:y,rawParams:R})}if(!b&&d.staticInsensitive){let _=d.staticInsensitive.get(C??=w.toLowerCase());_&&c.push({node:_,index:h+1,skipped:p,statics:m+ie(s,h),dynamics:g,optionals:S,extract:y,rawParams:R})}if(!b&&d.static){let _=d.static.get(w);_&&c.push({node:_,index:h+1,skipped:p,statics:m+ie(s,h),dynamics:g,optionals:S,extract:y,rawParams:R})}if(d.pathless)for(let _=d.pathless.length-1;_>=0;_--){let v=d.pathless[_];c.push({node:v,index:h,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}}if(u)return u;if(n&&l){let f=l.index;for(let h=0;h<l.index;h++)f+=e[h].length;let d=f===t.length?"/":t.slice(f);return l.rawParams??=Object.create(null),l.rawParams["**"]=decodeURIComponent(d),l}return null}a(Cr,"getNodeMatch");function ie(t,e){return 2**(t-e-1)}a(ie,"segmentScore");function Pr(t,e){return t===2**(e-1)-1}a(Pr,"isPerfectStaticMatch");function jo(t,e,o){let n,r;try{[n,r]=Qo(t,e,o)}catch{return null}if(o.rawParams=n,o.extract=r,!o.node.parse)return!0;try{if(o.node.parse(n)===!1)return null}catch{}return!0}a(jo,"validateParseParams");function ae(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===ft)>(t.node.kind===ft)||e.node.kind===ft==(t.node.kind===ft)&&e.node.depth>t.node.depth))):!0}a(ae,"isFrameMoreSpecific");function tn(t,e,o){let n=At(t),r=`/${n}`,i=e?r:r.toLowerCase(),s=`${i}/`,c={input:a(({url:l})=>{let u=e?l.pathname:l.pathname.toLowerCase();return u===i?l.pathname="/":u.startsWith(s)&&(l.pathname=l.pathname.slice(r.length)),l},"input"),output:a(({url:l})=>(l.pathname=at(`/${n}${l.pathname}`),l),"output")};return o?{input:a(({url:l})=>ce(o,c.input({url:l})),"input"),output:a(({url:l})=>c.output({url:Te(o,l)}),"output")}:c}a(tn,"rewriteBasepath");function ce(t,e){let o=t?.input?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(ce,"executeRewriteInput");function Te(t,e){let o=t?.output?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(Te,"executeRewriteOutput");function Me(t){let e=t;return{get(){return e},set(o){e=mt(o,e)}}}a(Me,"createNonReactiveMutableStore");function De(t){return{get(){return t()}}}a(De,"createNonReactiveReadonlyStore");function en(t,e){let{createMutableStore:o,createReadonlyStore:n,batch:r}=e,i=new Map,s=o("idle"),c=o(t),l=o(void 0),u=o([]),f=n(()=>u.get().map(g=>i.get(g).get())),d=n(()=>({status:s.get(),isLoading:s.get()==="pending",matches:f.get(),location:c.get(),resolvedLocation:l.get()}));function h(g){let S=i.get(g);return S||(S=o(void 0),i.set(g,S)),S}a(h,"getMatchStore");let p={status:s,location:c,resolvedLocation:l,ids:u,matches:f,byRoute:i,__store:d,getMatchStore:h,setMatches:m};function m(g){let S=u.get(),y=g.map(R=>R.routeId);r(()=>{Fo(S,y)||u.set(y);for(let R of S)y.includes(R)||i.get(R).set(()=>{});for(let R of g){let b=h(R.routeId);b.get()!==R&&b.set(R)}})}return a(m,"setMatches"),p}a(en,"createRouterStores");var dt="__TSR_index",on="popstate",nn="beforeunload",Er=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function $t(t){let e=Er.exec(t);return e?"/"+t.slice(e[0].length):t}a($t,"normalizeProtocolRelative");function $e(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
2
|
+
\r`.includes(e)?"":encodeURIComponent(e))),$t(t)}a($e,"normalizeHref");function Be(t){let e=t.getLocation(),o=new Set,n=a(s=>{e=t.getLocation(),o.forEach(c=>c({location:e,action:s}))},"notify"),r=a(s=>{t.notifyOnIndexChange??!0?n(s):e=t.getLocation()},"handleIndexChange"),i=a(async s=>{let c=s.navigateOpts?.ignoreBlocker?void 0:t.getBlockers?.();if(typeof document<"u"&&c?.length&&(s.type==="PUSH"||s.type==="REPLACE"))for(let l of c){let u=Lt(s.path,s.state);if(await l.blockerFn({currentLocation:e,nextLocation:u,action:s.type})){t.onBlocked?.();return}}s.task()},"tryNavigation");return{get location(){return e},get length(){return t.getLength()},subscribers:o,subscribe:a(s=>(o.add(s),()=>{o.delete(s)}),"subscribe"),push:a((s,c,l)=>{let u=e.state[dt];c=Ae(u+1,c),i({task:a(()=>{t.pushState(s,c),n({type:"PUSH"})},"task"),navigateOpts:l,type:"PUSH",path:s,state:c})},"push"),replace:a((s,c,l)=>{let u=e.state[dt];c=Ae(u,c),i({task:a(()=>{t.replaceState(s,c),n({type:"REPLACE"})},"task"),navigateOpts:l,type:"REPLACE",path:s,state:c})},"replace"),go:a((s,c)=>{i({task:a(()=>{t.go(s,c?.ignoreBlocker??!1),r({type:"GO",index:s})},"task"),navigateOpts:c,type:"GO"})},"go"),back:a(s=>{i({task:a(()=>{t.back(s?.ignoreBlocker??!1),r({type:"BACK"})},"task"),navigateOpts:s,type:"BACK"})},"back"),forward:a(s=>{i({task:a(()=>{t.forward(s?.ignoreBlocker??!1),r({type:"FORWARD"})},"task"),navigateOpts:s,type:"FORWARD"})},"forward"),canGoBack:a(()=>e.state[dt]!==0,"canGoBack"),createHref:a(s=>t.createHref(s),"createHref"),block:a(s=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,s]),()=>{let l=t.getBlockers?.()??[];t.setBlockers?.(l.filter(u=>u!==s))}},"block"),flush:a(()=>t.flush?.(),"flush"),destroy:a(()=>t.destroy?.(),"destroy"),notify:n,_getBlockers:a(()=>t.getBlockers?.()??[],"_getBlockers")}}a(Be,"createHistory");function Ae(t,e){let o=He();return{...e,key:o,__TSR_key:o,[dt]:t}}a(Ae,"assignKeyAndIndex");function Ve(t){let e=t?.window??(typeof document<"u"?window:void 0),o=e.history.pushState,n=e.history.replaceState,r=[],i=a(()=>r,"_getBlockers"),s=a(v=>r=v,"_setBlockers"),c=a(v=>$e(t?.createHref?t.createHref(v):v),"createHref"),l=t?.parseLocation??(()=>Lt(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){let v=He();e.history.replaceState({[dt]:0,key:v,__TSR_key:v},"")}let u=l(),f,d=!1,h=!1,p=!1,m=!1,g=a(()=>u,"getLocation"),S,y=a(()=>{S&&(_._ignoreSubscribers=!0,(S[2]?e.history.pushState:e.history.replaceState)(S[1],"",S[0]),_._ignoreSubscribers=!1,S=void 0,f=void 0)},"flush"),R=a((v,x,P)=>{let L=t?.createHref?c(x):void 0,k=!!S;k||(f=u),u=Lt(x,P),S=[L??u.href,P,S?.[2]||v],k||queueMicrotask(()=>y())},"queueHistoryAction"),b=a(v=>{u=l(),_.notify({type:v})},"onPushPop"),w=a(async()=>{if(m=!1,h){h=!1;return}let v=l(),x=v.state[dt]-u.state[dt],P=x===1,L=x===-1,k=!P&&!L||d;d=!1;let E=k?"GO":L?"BACK":"FORWARD",O=k?{type:"GO",index:x}:{type:L?"BACK":"FORWARD"};if(p)p=!1;else{let F=i();if(typeof document<"u"&&F.length){for(let N of F)if(await N.blockerFn({currentLocation:u,nextLocation:v,action:E})){h=!0,e.history.go(-x),_.notify(O);return}}}u=l(),_.notify(O)},"onPushPopEvent"),C=a(v=>{if(m){m=!1;return}let x=!1,P=i();if(typeof document<"u"&&P.length)for(let L of P){let k=L.enableBeforeUnload??!0;if(k===!0){x=!0;break}if(typeof k=="function"&&k()===!0){x=!0;break}}if(x)return v.preventDefault(),v.returnValue=""},"onBeforeUnload"),_=Be({getLocation:g,getLength:a(()=>e.history.length,"getLength"),pushState:a((v,x)=>R(!0,v,x),"pushState"),replaceState:a((v,x)=>R(!1,v,x),"replaceState"),back:a(v=>(v&&(p=!0,m=!0),e.history.back()),"back"),forward:a(v=>{v&&(p=!0,m=!0),e.history.forward()},"forward"),go:a((v,x)=>{d=!0,x&&(p=!0,m=!0),e.history.go(v)},"go"),createHref:c,flush:y,destroy:a(()=>{e.history.pushState=o,e.history.replaceState=n,e.removeEventListener(nn,C,{capture:!0}),e.removeEventListener(on,w)},"destroy"),onBlocked:a(()=>{f&&u!==f&&(u=f)},"onBlocked"),getBlockers:i,setBlockers:s,notifyOnIndexChange:!1});return _._ignoreNextBeforeUnload=v=>{m=!1;try{v=new URL(v,e.document.baseURI).href,m=/^https?:/.test(v)&&(!v.includes("#")||v.split("#")[0]!==e.location.href.split("#")[0])}catch{}},e.addEventListener(nn,C,{capture:!0}),e.addEventListener(on,w),e.history.pushState=function(...v){let x=o.apply(e.history,v);return _._ignoreSubscribers||b("PUSH"),x},e.history.replaceState=function(...v){let x=n.apply(e.history,v);return _._ignoreSubscribers||b("REPLACE"),x},_}a(Ve,"createBrowserHistory");function Lr(t={initialEntries:["/"]}){let e=t.initialEntries,o=t.initialIndex?Math.min(Math.max(t.initialIndex,0),e.length-1):e.length-1,n=e.map((l,u)=>Ae(u,void 0)),r=a(()=>Lt(e[o],n[o]),"getLocation"),i=[];return Be({getLocation:r,getLength:a(()=>e.length,"getLength"),pushState:a((l,u)=>{o=o<e.length-1?o+1:e.length,n[o]=u,e[o]=l,o<e.length-1&&(e.length=o+1,n.length=o+1)},"pushState"),replaceState:a((l,u)=>{n[o]=u,e[o]=l},"replaceState"),back:a(()=>{o=Math.max(o-1,0)},"back"),forward:a(()=>{o=Math.min(o+1,e.length-1)},"forward"),go:a(l=>{o=Math.min(Math.max(o+l,0),e.length-1)},"go"),createHref:$e,getBlockers:a(()=>i,"_getBlockers"),setBlockers:a(l=>i=l,"_setBlockers")})}a(Lr,"createMemoryHistory");function Lt(t,e){let o=$e(t),n=o.indexOf("#"),r=o.indexOf("?");if(!e){let i=He();e={[dt]:0,key:i,__TSR_key:i}}return{href:o,pathname:o.slice(0,n>-1?r>-1?Math.min(n,r):n:r>-1?r:o.length),hash:n>-1?o.slice(n):"",search:r>-1?o.slice(r,n===-1?void 0:n):"",state:e}}a(Lt,"parseHref");function He(){return(Math.random()+1).toString(36).slice(7)}a(He,"createRandomKey");function ze(t,e){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==e||!!t.username||!!t.password}a(ze,"isExternalUrl");function Ue(t){return t.pathname+t.search+t.hash}a(Ue,"getUrlPath");function rn(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}a(rn,"routeNeedsLoad");function vt(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}a(vt,"getLocationChangeInfo");function sn({key:t,__TSR_key:e,__TSR_index:o,__hashScrollIntoViewOptions:n,...r}){return r}a(sn,"_getUserHistoryState");function ln(t){return t.findIndex(e=>e.status==="error"||e.status==="notFound"||e._notFound)+1}a(ln,"lifecycleEnd");function un(t,e,o,n,r,i){n&&(e=e.slice(0,n)),r&&(o=o.slice(0,r));for(let s of e){if(i&&t._tx!==i)return;o.some(c=>c.routeId===s.routeId)||t.routesById[s.routeId].options.onLeave?.(s)}for(let s of o){if(i&&t._tx!==i)return;t.routesById[s.routeId].options[e.some(c=>c.routeId===s.routeId)?"onStay":"onEnter"]?.(s)}}a(un,"runRouteLifecycle");var Ke=class{static{a(this,"RouterCore")}constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async o=>(o(),!1),this.update=o=>{let n=this.options;this.options={...n,...o},this.isServer=this.options.isServer??!1??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ve()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");let r=this.options.basepath??"/",i=this.options.rewrite,s=this.basepath!==r||n?.rewrite!==i||n?.caseSensitive!==this.options.caseSensitive;if(s&&(this.basepath=r,this.rewrite=r!=="/"&&At(r)?tn(r,this.options.caseSensitive,i):i),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||!1){this.routeTree=this.options.routeTree;let c;c=this.buildRouteTree(),!1,this.setRoutes(c)}if(this.stores)s&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let c=this.getStoreConfig(this);this.batch=c.batch,this.stores=en(this.latestLocation,c),$o(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let o=Zo(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Go(this.options.routeMasks,o.processedTree),{...o,resolvePathCache:Pt(1e3)}},this.subscribe=(o,n)=>{let r={eventType:o,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=o=>{for(let n of this.subscribers)if(n.eventType===o.type)try{n.fn(o)}catch(r){console.error(r)}},this.parseLocation=(o,n)=>{let r=a(({pathname:l,search:u,hash:f,href:d},h)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){let S=this.options.parseSearch(u),y=this.options.stringifySearch(S);return{href:l+y+f,publicHref:l+y+f,pathname:bt(l),external:!1,searchStr:y,search:gt(n?.search,S),hash:bt(f.slice(1)),state:tt(n?.state,h)}}let p=ce(this.rewrite,new URL(d,this.origin)),m=this.options.parseSearch(p.search),g=this.options.stringifySearch(m);return p.search=g,{href:p.href.replace(p.origin,""),publicHref:d,pathname:bt($t(p.pathname)),external:!!this.rewrite&&ze(p,this.origin),searchStr:g,search:gt(n?.search,m),hash:bt(p.hash.slice(1)),state:tt(n?.state,h)}},"parse"),i=r(o,o.state),{__tempLocation:s,__tempKey:c}=i.state;if(s&&(!c||c===this.tempLocationKey)){let l=r(s,{...s.state,__tempLocation:void 0,key:i.state.key,__TSR_key:i.state.__TSR_key});return l.maskedLocation=i,l}return i},this.matchRoutes=(o,n,r)=>typeof o=="string"?this.matchRoutesInternal({pathname:o,search:n},r):this.matchRoutesInternal(o,n),this.getMatchedRoutes=o=>{let n=Object.create(null),r=Xo(H(o),this.processedTree,!0);return r&&Object.assign(n,r.rawParams),[r?.branch||[this.routesById.__root__],n,r?.route]},this.buildLocation=o=>{if(!!1){let s=this.staticLocations.get(o);if(s)return s}let n=!1,r=a((s={})=>{if(s.href){let F=Lt(s.href,{});s={...s,to:ce(this.rewrite,new URL(F.pathname,this.origin)).pathname,search:this.options.parseSearch(F.search),hash:F.hash.slice(1)}}let c=o._fromLocation||this._pendingLocation||this.latestLocation,l,u=a(()=>(n=!0,c),"current"),f=a(()=>l??=this.matchRoutesLightweight(u()),"currentMatch"),d=s.to?`${s.to}`:".",h=ee(d[0]==="/"?"":s.unsafeRelative==="path"?u().pathname:s.from??f()[1],d,this.options.trailingSlash,this.resolvePathCache),p=this.routesByPath[H(h)],m=h.includes("$"),g;if(p)g=p._branch??=Fe(p);else if(m)g=[];else{let[F,N,D]=this.getMatchedRoutes(h);g=F,this.options.notFoundRoute&&(!D||D.path!=="/"&&N["**"])&&(g=[...g,this.options.notFoundRoute])}let S=m?p?._interpolation??Et(!1,{fullPath:h},0):void 0,y;for(let F of g){let N=F.options.params?.stringify??F.options.stringifyParams;if(N){let D=f()[3];if(y??=We(s.params,D),!Tt(y))break;y===D&&(y=Object.assign(Mt(),y));try{Object.assign(y,N(y))}catch{}}}y??=We(s.params,kr(s.params,S)?f()[3]:je);let R=o.leaveParams?h:$t(bt(S?oe(h,S,y,this.pathParamsDecoder):h)),b=Ir(g,o._includeValidateSearch),w=a(()=>{let F=f()[2];if(o._includeValidateSearch&&this.options.search?.strict){let N={};g.forEach(D=>{if(D.options.validateSearch)try{Object.assign(N,le(D.options.validateSearch,{...N,...F}))}catch{}}),F=N}return F},"fromSearch"),C=b.length?Or(b,w(),s):s.search===!0?w():typeof s.search=="function"?s.search(w()):s.search||je,_=this.options.stringifySearch(C),v=s.hash===!0?u().hash:typeof s.hash=="function"?s.hash(u().hash):s.hash||void 0,x=v?`#${v}`:"",P=s.state?s.state===!0?u().state:typeof s.state=="function"?s.state(u().state):s.state:je,L=`${R}${_}${x}`,k,E,O=!1;if(this.rewrite){let F=new URL(L,this.origin),N=F.origin,D=Te(this.rewrite,F);k=Ue(F),ze(D,N)?(E=D.href,O=!0):E=$t(Ue(D))}else k=No(L),E=k;return{publicHref:E,href:k,pathname:R,search:C,searchStr:_,state:P,hash:v??"",external:O,unmaskOnReload:s.unmaskOnReload}},"build"),i=r(o);if(o.mask)i.maskedLocation=r({from:o.from,...o.mask});else if(this.options.routeMasks){let s=Jo(i.pathname,this.processedTree);if(s){let c=Object.assign(Mt(),s.rawParams),{from:l,params:u,...f}=s.route,d=We(u,c);i.maskedLocation=r({from:o.from,...f,params:d})}}return!!1&&!n&&o._fromLocation&&this.staticLocations.set(o,i),i},this.commitLocation=async({viewTransition:o,ignoreBlocker:n,...r})=>{if(!1)return;let i=r.maskedLocation??r;if(i.external&&!!1)return an(this,i.publicHref,{replace:r.replace,ignoreBlocker:n});let s,c=H(this.latestLocation.href)===H(r.href)&&J(sn(r.state),sn(this.latestLocation.state)),l=this._commitPromise,u,f=new Promise(d=>{u=d});if(f.resolve=()=>{u(),l?.resolve()},this._commitPromise=f,c)this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...p}=r;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state={...p.state,__hashScrollIntoViewOptions:h??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=o,s=r.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:s}})}return this._scroll.n=r.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:o,resetScroll:n,hashScrollIntoView:r,viewTransition:i,ignoreBlocker:s,...c}={})=>{if(!1)return Promise.resolve();let l=this.buildLocation({...c,_includeValidateSearch:!0});this._pendingLocation=l;let u=this.commitLocation({...l,viewTransition:i,replace:o,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:s});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:o,reloadDocument:n,href:r,publicHref:i,...s})=>{if(!1)return;let c=r?it(r):void 0;if(c||n){if(o!==void 0||!r){let u=this.buildLocation({to:o,...s}),f=u.maskedLocation??u;r??=f.publicHref,i??=f.publicHref}return an(this,!c&&i?i:r,s)}return this.buildAndCommitLocation({...s,href:r,to:o,_isNavigate:!0})},this.load=async o=>{if(!1)return(void 0)(this,o);this.updateLatestLocation(),o?.action&&(this._scroll.h=o.action.type==="PUSH"||o.action.type==="REPLACE"),await dn(this,o)},this.startViewTransition=o=>{let n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&!!1&&typeof document.startViewTransition=="function"){let r;if(typeof n=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){let i=this.latestLocation,s=this.stores.resolvedLocation.get(),c=typeof n.types=="function"?n.types(vt(i,s)):n.types;if(c===!1)return o();r={update:o,types:c}}else r=o;return document.startViewTransition(r).updateCallbackDone}return o()},this.invalidate=o=>{let n=this._committed,r=o?.filter,i=this._preloads,s=new Set,c=a(f=>{(!r||r(f))&&s.add(f.id)},"consider");n.forEach(c),this._cache.forEach(c),i?.forEach(f=>f.forEach(c)),this._tx?.[3].forEach(c);let l=[];for(let[f,d]of i??[])d.some(h=>s.has(h.id))&&(i.delete(f),l.push(f));let u=a(f=>{if(s.has(f.id)){let d=this.routesById[f.routeId],h={...f,invalid:!0,...(o?.forcePending||f.status==="error"||f.status==="notFound")&&rn(d)?{status:"pending",error:void 0}:void 0};return f._flight=void 0,h}return f},"invalidate");this._committed=n.map(u);for(let[f,d]of this._cache)s.has(f)&&(d.invalid=!0,o?.forcePending&&(d.status="pending"));for(let f of s){let d=this._flights?.get(f);this._flights?.delete(f),d&&!d[2]&&l.push(d[1])}for(let f of l)f.abort();return this.shouldViewTransition=!1,this.load({sync:o?.sync})},this.resolveRedirect=o=>{let n=o.options,r=o.headers.get("Location")||n.href;if(!r){let s=this.buildLocation(n);r=(s.maskedLocation??s).publicHref||"/"}let i;if(ke.test(r)||(i=it(r))&&!this.protocolAllowlist.has(i))throw new Error("Redirect blocked: unsafe protocol");if(i==="http:"||i==="https:"){let s=new URL(r);s.pathname.startsWith("//")?r=s.href:ze(s,this.origin)||(r=Ue(s),i=void 0)}return i&&(n.reloadDocument=!0),n.href=r,o.headers.set("Location",r),o},this.clearCache=o=>{let n=this._cache,r=this._preloads,i=o?.filter,s=[],c=[];for(let[u,f]of n)(!i||i(f))&&(c.push(u),s.push(f));let l=[];for(let[u,f]of r??[])(!i||f.some(i))&&(l.push(u),s.push(...f));for(let u of c)n.delete(u);for(let u of l)r.delete(u);for(let u of s){let f=u._flight;u._flight=void 0,f&&!--f[2]&&(this._flights?.get(u.id)===f&&this._flights.delete(u.id),l.push(f[1]))}for(let u of l)u.abort()},this.loadRouteChunk=St,this.preloadRoute=o=>hn(this,o),this.matchRoute=(o,n)=>{let r={...o,to:o.to?ee(o.from||"",o.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:o.params||{},leaveParams:!0},i=this.buildLocation(r),s=this.stores.status.get()==="pending";if(n?.pending&&!s)return!1;let c=n?.pending??!s?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=Yo(i.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,c.pathname,this.processedTree);return!l||o.params&&!J(l.rawParams,o.params,!0)?!1:n?.includeSearch??!0?J(c.search,i.search,!0)?l.rawParams:!1:l.rawParams},this.getStoreConfig=e,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=To(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Uo,parseSearch:t.parseSearch??zo,protocolAllowlist:t.protocolAllowlist??Le}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let e=this.options.notFoundRoute;e&&(e.init(99999999999),this.routesById[e.id]!==e&&(e._interpolation=Et(!1,e,0)),this.routesById[e.id]=e)}matchRoutesInternal(t,e){let[o,n,r]=this.getMatchedRoutes(t.pathname),i=o,s=!1;(r?r.path!=="/"&&n["**"]:H(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:s=!0);let c=s?Nr(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=this._committed,f=a((h,p)=>{let m=u[p];return m?.routeId===h.id?m:h===this.options.notFoundRoute?u.find(g=>g.routeId===h.id):void 0},"previousAt"),d;for(let h=0;h<i.length;h++){let p=i[h],m=l[h-1],g,S,y;{let O=m?.search??t.search,F=m?._strictSearch??void 0;try{let N=le(p.options.validateSearch,{...O})??void 0;g={...O,...N},S={...F,...N}}catch(N){let D=N;if(N instanceof Bt||(D=new Bt(N.message,{cause:N})),e?.throwOnError)throw D;g=O,S={},y=D}}let R="",b="";try{R=p.options.loaderDeps?.({search:g})??"",b=R&&JSON.stringify(R)||""}catch(O){if(e?.throwOnError)throw O;y??=O}let w=Mt(),C=p._interpolation?oe(p.fullPath,p._interpolation,n,this.pathParamsDecoder,w):p.fullPath,_=p.id+C+b,v=f(p,h),x=this._cache.get(_)??(v?.id===_?v:void 0);d=x?._strictParams??Object.assign(w,d);let P;if(!x)try{cn(p,d)}catch(O){if(q(O)||se(O)?P=O:P=new fn(O.message,{cause:O}),e?.throwOnError)throw P}let L=v?"stay":"enter",k;if(x)k={...x,cause:L,search:v?gt(v.search,g):gt(x.search,g),_strictSearch:S,searchError:y};else{let O=rn(p)?"pending":"success";k={id:_,ssr:p.options.ssr,index:h,routeId:p.id,params:v?.params??d,_strictParams:d,pathname:C,updatedAt:Date.now(),search:v?gt(v.search,g):g,_strictSearch:S,searchError:y,status:O,isFetching:!1,error:void 0,paramsError:P,context:{},abortController:e?._controller??new AbortController,cause:L,loaderDeps:v?tt(v.loaderDeps,R):R,invalid:!1,preload:!1,staticData:p.options.staticData||{},fullPath:p.fullPath}}let E=c===p.id;k._notFound&&!E&&(k.error=void 0),k._notFound=E,l[h]=k}for(let h=0;h<l.length;h++){let p=l[h];p.params=p.cause==="stay"?gt(p.params,d):d,e?._controller&&(p.context={})}return l}matchRoutesLightweight(t){let e=et(this.stores.ids.get()),o=e?this.stores.byRoute.get(e).get():void 0,n=o?.id,r=this.lightweightCache.get(t);if(r&&r[0]===n)return r[1];let[i,s]=this.getMatchedRoutes(t.pathname),c=et(i),l={...t.search};for(let h of i)try{Object.assign(l,le(h.options.validateSearch,l))}catch{}let u=o&&o.routeId===c.id&&o.pathname===t.pathname,f;if(u)f=o.params;else{let h=s;for(let p of i)try{cn(p,h)}catch{}f=h}let d=[i,c.fullPath,l,f];return this.lightweightCache.set(t,[n,d]),d}};async function an(t,e,{replace:o,ignoreBlocker:n}){if(!Dt(e,t.protocolAllowlist)){if(!n){let r=t.history._getBlockers();for(let i of r)if(i?.blockerFn&&await i.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:o?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(e),o?window.location.replace(e):window.location.href=e}}a(an,"documentNavigation");var Bt=class extends Error{static{a(this,"SearchParamError")}},fn=class extends Error{static{a(this,"PathParamError")}};function le(t,e){if(t==null)return{};if("~standard"in t){let o=t["~standard"].validate(e);if(o instanceof Promise)throw new Bt("Async validation not supported");if(o.issues)throw new Bt(JSON.stringify(o.issues,void 0,2),{cause:o});return o.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}a(le,"validateSearch");function We(t,e){if(t===void 0||t===!0)return e;let o=Object.create(null);return t===!1||t===null?o:typeof t=="function"?(Object.assign(o,e),Object.assign(o,t(o))):Object.assign(o,e,t)}a(We,"resolveNextParams");function kr(t,e){return typeof t=="function"?!0:!e||t===!1||t===null?!1:t===void 0||t===!0||e.some(o=>typeof o!="string"&&!Zt.call(t,o[1]))}a(kr,"needsInheritedParams");var je=Object.freeze({});function Ir(t,e){let o=[];for(let n=0;n<t.length;n++){let r=t[n].options;if("search"in r)r.search?.middlewares&&o.push(...r.search.middlewares);else if(r.preSearchFilters||r.postSearchFilters){let s=a(({search:c,next:l})=>{let u=l(r.preSearchFilters?r.preSearchFilters.reduce((f,d)=>d(f),c):c);return r.postSearchFilters?r.postSearchFilters.reduce((f,d)=>d(f),u):u},"legacyMiddleware");o.push(s)}let i=r.validateSearch;if(e&&i){let s=a(({search:c,next:l,meta:u})=>{let f=l(c);try{let d=le(i,f);if(u&&d)for(let h in d)h in f||(u.defaulted||=new Map).set(h,d[h]);return{...f,...d}}catch{}return f},"validate");o.push(s)}}return o}a(Ir,"getSearchMiddlewares");function Or(t,e,o){let n=a((r,i,s)=>{if(r>=t.length){if(!o.search)return{};if(o.search===!0)return i;let l=mt(o.search,i);return s&&(s.explicit=l),l}let c=a((l,u)=>{if(u){let f=s||{};return{search:n(r+1,l,f),meta:f}}return n(r+1,l,s)},"next");return t[r]({search:i,next:c,meta:s})},"applyNext");return n(0,e)}a(Or,"applySearchMiddleware");function Nr(t,e){if(t!=="root"){let o;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.options.notFoundComponent)return r.id;o||=r.children&&r.id}if(o)return o}return Y}a(Nr,"findGlobalNotFoundRouteId");function cn(t,e){let o=t.options.params?.parse??t.options.parseParams;o&&Object.assign(e,o(e))}a(cn,"extractStrictParams");function qe(t,e){return t.options[e]?.preload?.()}a(qe,"preloadComponent");function Fr(t,e){let o=qe(t,"component"),n=qe(t,"pendingComponent");return e&&(n?n=n.then(e):e()),o&&n?Promise.all([o,n]).then(()=>{}):o??n}a(Fr,"loadComponents");function St(t,e,o){let n=a(()=>e===!1?void 0:e?qe(t,e):Fr(t,o),"afterLazy"),r=t._lazy;if(r)return r===!0?n():r.then(n);if(!t.lazyFn)return n();let i=t.lazyFn().then(s=>{{let{id:c,...l}=s.options;Object.assign(t.options,l),t._lazy=!0}},s=>{throw t._lazy=void 0,s});return t._lazy=i,i.then(n)}a(St,"loadRouteChunk");function fe(t){let e=t.findIndex(o=>o.status!=="success"||o._notFound)+1;return e&&e<t.length?t.slice(0,e):t}a(fe,"_getRenderedMatches");function Ye(t,e,o){let n=t._tx;return e&&n?.[2]===o&&!n[3].some(r=>r.routeId===e)}a(Ye,"_isRouteDeparting");var rt=0,lt=1,de=2,z=3,ht=[4];function zt(t){return typeof t[0]=="number"}a(zt,"isControl");function _t(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((o,n)=>{let r=a(()=>n(e),"abort");e.addEventListener("abort",r,{once:!0}),Promise.resolve(t).then(o,n).then(()=>e.removeEventListener("abort",r))})}a(_t,"waitFor");function wt(t,e){return t.routesById[e.routeId]}a(wt,"getRoute");function Ut(t,e,o){return se(t)?[z,t]:q(t)?(t.routeId||=o,[de,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[lt,t]):[rt,t]}a(Ut,"normalize");function Xe(t,e){let o=Ut(e,!0,t.id);if(o[0]!==lt)return o;try{t.options.onError?.(o[1])}catch(n){o=Ut(n,!0,t.id)}return o}a(Xe,"normalizeError");function Ht(t,e,o,n,r){return r[0].signal.aborted?ht:to(t,e,o,Xe(o,n),r)}a(Ht,"normalizeLaneError");async function Tr(t,e,o,n,r,i){let[s,c]=e,l=o[0].signal,u=!!o[3];for(let f=o[6]??0;f<n;f++){let d=c[f],h=wt(t,d);d.abortController=o[0];let p=c[f-1]?.context??t.options.context??{},m={params:d.params,location:s,navigate:a(R=>t.navigate({...R,_fromLocation:s}),"navigate"),buildLocation:t.buildLocation,cause:u?"preload":d.cause,abortController:o[0],preload:u,matches:c,routeId:h.id};try{let R=d._ctx||=h.options.context?h.options.context({...m,deps:d.loaderDeps,context:p})||{}:void 0;d.context={...p,...R}}catch(R){return ct(t,d),[f,Ht(t,e,h,R,o)]}if(l.aborted)return[f,ht];let g=d.paramsError??d.searchError;if(g!==void 0)return ct(t,d),[f,Ht(t,e,h,g,o)];let S=h.options.beforeLoad;if(!S)continue;let y=d.status;f>=i&&(d.status="pending",o[7]?.());try{Wt(t,d,"beforeLoad",o[0]);let R=S({...m,search:d.search,context:d.context,...t.options.additionalContext}),b=await(typeof R?.then=="function"?_t(R,l):R);if(l.aborted)return[f,ht];let w=to(t,e,h,Ut(b,!1,h.id),o);if(w[0]!==rt)return ct(t,d),[f,w];d.context={...d.context,...b}}catch(R){return ct(t,d),[f,Ht(t,e,h,R,o)]}finally{d.status=y,Wt(t,d,!1,o[0])}}r()}a(Tr,"contextualize");function Ze(t,e,o){if(!(!o||--o[2])){if(t._flights?.get(e.id)===o){let n=t._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(e)&&n[3].some(r=>r.id===e.id)&&n[3].some(r=>r.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return o[1]}}a(Ze,"releaseOwnedFlight");function ct(t,e){let o=e._flight;e._flight=void 0,Ze(t,e,o)?.abort()}a(ct,"releaseFlight");function U(t,e,o,n){let r=[];for(let i of e)if(!o?.includes(i)){let s=i._flight;if(i._flight=void 0,n&&s?.[2]===1&&t._flights?.get(i.id)===s&&o?.some(c=>c.id===i.id))s[2]=0;else{let c=Ze(t,i,s);c&&r.push(c)}}for(let i of r)i.abort()}a(U,"transferMatchResources");function Qe(t){for(let e of t){let o=e._flight;o&&o[2]++}}a(Qe,"acquireMatchResources");function Wt(t,e,o,n){if(e.isFetching=o,n&&t._tx?.[0]!==n)return;let r=t.stores.byRoute.get(e.routeId),i=r?.get();i?.id===e.id&&r.set({...i,isFetching:o})}a(Wt,"setFetching");function Sn(t,e,o,n,r,i,s){let c=e[0];return{params:o.params,location:c,navigate:a(l=>t.navigate({...l,_fromLocation:c}),"navigate"),cause:s?"preload":o.cause,abortController:r,preload:s,deps:o.loaderDeps,parentMatchPromise:i,context:o.context,route:n,...t.options.additionalContext}}a(Sn,"getLoaderContext");async function pn(t,e,o,n,r,i,s){let c=s[0],l=c.signal;if(l.aborted)return ht;if(!r)return[rt,void 0];let u=o._flight;Wt(t,o,"loader",c);try{if(!u){let f=new AbortController;u=[Promise.resolve().then(()=>r(Sn(t,e,o,n,f,i,!!s[3]))).then(d=>Ut(d,!1,n.id),d=>Ut(d,!0,n.id)).then(d=>(d[0]!==rt&&t._flights?.get(o.id)===u&&(t._flights.delete(o.id),u[2]||f.abort()),d[0]===lt&&u[2]?Xe(n,d[1]):d)),f,1],(t._flights??=new Map).set(o.id,u)}return o._flight=u,o.abortController=u[1],to(t,e,n,await _t(u[0],l),s)}catch(f){if(f!==l||!l.aborted)throw f;return ct(t,o),ht}finally{Wt(t,o,!1,c)}}a(pn,"loadResource");function mn(t,e,o){e[0]!==z&&(t.status="success",t.error=void 0,e[0]===rt?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=o):t.invalid=!0)}a(mn,"settleInto");function Mr(t,e,o){let n=t._cache.get(e.id);if(n!==o||t._committed.some(i=>i.id===e.id&&i._flight===e._flight))return;let r={...e,_notFound:void 0,context:{}};r._flight&&r._flight[2]++,t._cache.set(e.id,r),n&&ct(t,n)}a(Mr,"cacheLoaderMatch");function gn(t,e){return e[0]===lt||e[0]===de?{...t,status:e[0]===lt?"error":"notFound",error:e[1],_flight:void 0}:t}a(gn,"getParentSnapshot");function Dr(t,e,o,n,r,i,s){let c=e[1][o],l=wt(t,c),u=!!i[3],f=t._cache.get(c.id),d,h=!1,p;try{if(c.status==="success"&&(d=l.options.shouldReload,typeof d=="function"&&(d=d(Sn(t,e,c,l,i[0],r,u))),i[0].signal.aborted&&(p=ht)),!p)if(c.status!=="success")h=!0;else{let E=u||c.preload?l.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:l.options.staleTime??t.options.defaultStaleTime??0;h=!!(c.invalid||d||d===void 0&&Date.now()-c.updatedAt>=E&&(i[5]||c.cause==="enter"||i[2].some(O=>O.routeId===c.routeId&&O.id!==c.id)))}}catch(E){c.invalid=!0,ct(t,c),p=Ht(t,e,l,E,i)}let m=l.options.loader,g=typeof m=="function",S=g?m:m?.handler,y=!u||l.options.preload!==!1,R=y&&m?t._flights?.get(c.id):void 0;R===c._flight||p?R=void 0:R&&!h&&!u&&d===void 0?h=!0:h||(R=void 0);let b=!!(m&&h&&c.status==="success"&&!u&&!i[4]&&((g?void 0:m.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),w=h&&y,C=w&&!b&&(c.status!=="success"||!!m),_=o>=s?i[7]:void 0,v=l.lazyFn&&l._lazy!==!0?_:void 0;if(w&&!m&&(c.invalid=!1,c.updatedAt=Date.now()),R&&R[2]++,C){let E=c._flight;c._flight=R,Ze(t,c,E)?.abort(),o>=s&&(c.status="pending"),_?.()}w||(c.isFetching=!1);let x=!p&&C?pn(t,e,c,l,S,r,i).then(E=>(mn(c,E,u),E[0]===rt&&(m&&!i[0].signal.aborted&&Mr(t,c,f),o>=s&&(c.status="pending")),E)):Promise.resolve(p??[rt,c.loaderData]),P=(async()=>{try{let O=St(l,void 0,v);O&&await _t(O,i[0].signal)}catch(O){if(!e[1].some((F,N)=>N<=o&&(F.status==="error"||F.status==="notFound"||F._notFound)))return[o,Ht(t,e,l,O,i)]}let E=await x;C&&E[0]===rt&&c.status==="pending"&&!i[0].signal.aborted&&(c.status="success",_?.())})();if(n.push([o,x,P]),!b)return x.then(E=>gn(c,E));let L={...c,status:"pending",preload:!1,_flight:R};c.invalid=!1,c.isFetching="loader";let k=pn(t,e,L,l,S,r,i).then(E=>(c.isFetching=!1,mn(L,E,!1),E));return(e[2]??=[]).push([o,k,P,L]),k.then(E=>gn(L,E))}a(Dr,"createLoaderTask");async function Ge(t,e,o,n,r=0){let i=o?.[1][1],s=i?.routeId?e.findIndex(c=>c.routeId===i.routeId):o?.[0]??e.length-1;s<0&&(s=0);for(let c=s;c>=0;c--){let l=wt(t,e[c]);try{let u=St(l,!1);u&&await _t(u,n)}catch(u){if(u===n&&n.aborted)throw u}if(l.options.notFoundComponent)return c}return i?.routeId?s:r}a(Ge,"getNotFoundBoundary");function Rt(t,e){e[2]&&(U(t,e[2].map(o=>o[3])),e[2]=void 0)}a(Rt,"discardBackground");async function yn(t,e,o,n){let r;try{await Promise.all(t.map(i=>i[1].then(async s=>{let c=i[0];if(!(n&&c>=await n)){if(s[0]>=z)throw[c,s];!r&&s[0]!==rt&&(r=[c,s],await Promise.all((o??[]).map(l=>{if(!(l[0]<=c))return l[1].then(u=>{if(u[0]===z)throw[l[0],u]})})))}})))}catch(i){return i}return e??r}a(yn,"settleTasks");function to(t,e,o,n,r,i){for(;n[0]===z;){let s=n[1],c=s.options;try{if((c.href||s.headers.has("Location"))&&(t.resolveRedirect(s),c.reloadDocument)||(c.reloadDocument?r[3]:r[1]>=20))return n;let l=t.buildLocation({...c,_fromLocation:e[0],_includeValidateSearch:!0}),u=l.maskedLocation??l;if(u.external){let f=s.clone();return f.options={...c},f.headers.set("Location",u.publicHref),t.resolveRedirect(f),r[3]?[z,f]:[z,f,u]}return[z,s,l]}catch(l){n=i?[lt,l]:Xe(o,l),i=!0}}return n}a(to,"materializeRedirect");async function Rn(t,e,o,n,r,i){let s=e[1],c=await r,l=!1,u=s.findIndex(p=>p._notFound),f=a(p=>p[1][0]===de?Ge(t,s,p,n.signal):p[0],"boundaryOf"),d=u<0?s.length:u;if((c?.[1][0]??0)>=z)d=0;else if(c){d=c[2]??=await f(c);for(let p of o){if(p[0]>=d)break;let m=await p[1];if(m[0]!==rt&&m[0]<z&&!("loaderData"in s[p[0]])){c=[p[0],m],d=c[2]=await f(c);break}}}for(let p of o){if(p[0]>=d)break;let m=await p[2];if(m){c=m;break}}if((c?.[1][0]??0)>=z){let p=c[1];if(p[0]!==z||p[1].options.reloadDocument||p[2])return Rt(t,e),p;l=!0,c=[0,[lt,new Error("Too many redirects")]]}let h=c?c[2]??await f(c):u;if(h>=0){let p=c?.[1],m=p?.[0],g=s[h],S=p?.[1],y=a(()=>{p&&(g._notFound=void 0,m===lt?g.status="error":(S.routeId=g.routeId,g.routeId===t.routeTree.id?(g.status="success",g._notFound=!0):g.status="notFound"),g.error=S,g.isFetching=!1)},"install");y(),p||i?.();let R=wt(t,g);try{await _t(p?Promise.resolve().then(()=>St(R,m===lt?"errorComponent":"notFoundComponent")):Promise.all([St(R),St(R,"notFoundComponent")]),n.signal)}catch(b){if(b===n.signal&&n.signal.aborted)return Rt(t,e),ht}p?l&&(n.abort(),await Promise.all([...o.map(b=>b[1]),...o.map(b=>b[2]),...(e[2]??[]).map(b=>b[1])]),Rt(t,e),U(t,s),y()):g.status="success"}return e}a(Rn,"reduceLane");async function _n(t,e,o,n=0,r=e[1].length){let i=e[1];for(let s=n;s<r;s++){let c=i[s],l=wt(t,c).options;if(l.head||l.scripts)try{let u={ssr:t.options.ssr,matches:i,match:c,params:c.params,loaderData:c.loaderData},[f,d]=await _t(Promise.all([l.head?.(u),l.scripts?.(u)]),o);c.meta=f?.meta,c.links=f?.links,c.headScripts=f?.scripts,c.styles=f?.styles,c.scripts=d}catch(u){if(u===o&&o.aborted)break;console.error(u)}if(c.status!=="success"||c._notFound)break}return e}a(_n,"projectLane");async function wn(t,e,o,n){let r=[e,o],i=n[0].signal,s;try{let c=t.stores.matches.get(),l=o.findIndex(y=>y._notFound);if(t.options.notFoundMode!=="root"&&l>=0){let y=await Ge(t,o,void 0,i,l);o[l]._notFound=void 0,o[y]._notFound=!0,l=y}let u=l<0?o.length:l+1,f=0;for(;f<u&&f!==l;){let y=o[f],R=n[2][f],b=c[f];if(R?.id!==y.id||R.status!=="success"||y.preload||b?.id!==y.id||b.status!=="success"||(f++,R._notFound||b._notFound))break}let d=[],h=n[6]??0,p=h?Promise.resolve(o[h-1]):void 0,m=a(()=>{for(let y=h;y<u&&!i.aborted;y++)p=Dr(t,r,y,d,p,n,f)},"planSuccessfulLane"),g=await Tr(t,r,n,u,m,f);if(g){if(n[4]=!0,u=g[0],g[1][0]===de){let y=await Ge(t,o,g,i);g[2]=y,u=Math.min(u,y+1)}else g[1][0]>=z&&(u=0);m()}if(!i.aborted&&!n[3]){let y=[];for(let[R,b]of t._flights??[])b[2]||(t._flights.delete(R),y.push(b[1]));for(let R of y)R.abort()}let S=Rn(t,r,d,n[0],yn(d,g,r[2]),n[7]);r[2]?.length&&(r[3]=yn(r[2],void 0,void 0,S.then(y=>zt(y)?0:fe(o).length,()=>0))),s=await S}catch(c){if(Rt(t,r),c===i&&i.aborted)return ht;throw c}return zt(s)?s:_n(t,s,i,n[6]===o.length?n[6]:0)}a(wn,"executeClientLane");function Je(t,e){if(t._tx!==e)return;let o=e[3],n=t.stores.matches.get(),r=t._pending;for(let i=0;i<o.length;i++){let s=o[i],c=s.status==="success"&&!s._notFound,l=n[i]?.id===s.id&&n[i]?.status==="pending";if(c&&!l)continue;let u=wt(t,s),f=c||s.invalid?0:u.options.pendingMs??t.options.defaultPendingMs,d=u.options.pendingComponent??t.options.defaultPendingComponent;if(!d||typeof f!="number"||f===1/0){r&&(r[0]=e,r[2]=0,r[4]=!0);return}let h=u.options.pendingMinMs??t.options.defaultPendingMinMs??0,p=!1;if(r?.[1]===s.id?(p=r[0]!==e,r[0]=e):(clearTimeout(r?.[3]),t._pending=r=void 0),r||(t._pending=r=[e,s.id,l?Date.now()+h:e[4]+f,void 0,l||void 0,d]),r[4]&&!p&&r[5]===d)return;if(r[5]=d,!r[4]){clearTimeout(r[3]);let S=r[2]-Date.now();if(S>0){r[3]=setTimeout(()=>Je(t,e),S);return}r[2]=0}let m=o.map(S=>({...S,_flight:void 0}));m[i].status="pending";let g=r[4]=t.startTransition(()=>t.stores.setMatches(m),m).then(S=>(S&&t._pending===r&&r[4]===g&&!r[2]&&(r[2]=Date.now()+h),S));return}}a(Je,"offerPending");function Vt(t,e){let o=t._pending;(t._tx===e||!t._tx?.[3].some(n=>n.id===o?.[1]))&&(clearTimeout(o?.[3]),t._pending=void 0)}a(Vt,"finishPending");async function vn(t,e){let o=t._pending;if(!o)return;clearTimeout(o[3]);let n=o[2]-Date.now();if(!o[4]||n<=0||!fe(e[3]).some(i=>i.id===o[1]))return;let r;try{await _t(new Promise(i=>{r=setTimeout(i,n)}),e[0].signal)}catch{}clearTimeout(r)}a(vn,"awaitPendingMinimum");function xn(t,e){t._committed=e,t.stores.setMatches(e)}a(xn,"publishMatches");function Ar(t,e,o,n){let r=t._committed,i=t._lifecycleEnd,s=t._cache;for(let f of o)f.preload=!1,n&&(f._assetEnd=void 0);let c=fe(o).length,l=new Map;{let f=Date.now(),d=new Set;for(let h=0;h<o.length;h++){let p=o[h];(h<c||p.status==="success")&&d.add(p.id)}for(let h of[...r,...s.values()]){if(h.status!=="success"||d.has(h.id))continue;let p=wt(t,h);!p.options.loader||f-h.updatedAt>=(h.preload?p.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:p.options.gcTime??t.options.defaultGcTime??3e5)||l.set(h.id,s.get(h.id)===h?h:{...h,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=l;let u=t._lifecycleEnd=ln(o);xn(t,o),U(t,[...s.values(),...r].filter(f=>f._flight&&l.get(f.id)!==f),o),un(t,r,o,i,u,e)}a(Ar,"commitMatches");async function ue(t,e){let o=t._tx;for(;o&&o!==e;)e=o,await o[5],o=t._tx}a(ue,"awaitCurrent");function bn(t,e,o){let n=o[1].options,r=o[2];if(!r)return t.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return t.navigate({href:(r.maskedLocation??r).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});r._redirects=e[1]+1,t._pendingLocation=r;let i=t.commitLocation({...r,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===r&&(t._pendingLocation=void 0)}),i}a(bn,"followRedirect");async function $r(t,e,o,n,r){let i=o.map(l=>({...l}));Qe(i);for(let l of n)ct(t,i[l[0]]),i[l[0]]=l[3];let s=[e[2],i],c;try{c=await Rn(t,s,n,e[0],r)}catch(l){throw U(t,i),l}if(zt(c)){U(t,i),c[0]===z&&t._tx===e&&t._committed===o&&await bn(t,e,c);return}if(await _n(t,c,e[0].signal),t._tx!==e||t._committed!==o){U(t,i);return}for(let l of i){let u=t._cache.get(l.id);u?._flight&&u._flight===l._flight&&(t._cache.delete(l.id),ct(t,u))}xn(t,i),U(t,o,i)}a($r,"runBackground");async function Br(t,e,o,n,r,i){let s=await wn(t,e[2],e[3],[e[0],e[1],t._committed,void 0,r,o,i,n]);if(zt(s)){let d=s[0]===z&&t._tx===e;if((!d||s[1].options.reloadDocument)&&Vt(t,e),U(t,e[3]),e[3]=[],!d)return;if(t._tx!==e){Vt(t,e);return}await bn(t,e,s);return}let c=s[1];if(t._tx===e&&await vn(t,e),t._tx!==e){Vt(t,e),U(t,c),Rt(t,s);return}let l=e[2],u=vt(l,t.stores.resolvedLocation.get()),f=s[2];await t.startViewTransition(async()=>{if(t._tx===e&&await vn(t,e),t._tx!==e){Vt(t,e),U(t,c),Rt(t,s);return}let d=a(()=>{Vt(t,e),Ar(t,e,c,i),t._tx===e&&(t.emit({type:"onLoad",...u}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...u}))},"commit"),h=await t.startTransition(d,c);if(t._tx!==e){Rt(t,s);return}f?.length&&$r(t,e,c,f,s[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(l),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...u}),h&&t._tx===e&&t.emit({type:"onRendered",...u})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}a(Br,"runClientTransaction");async function dn(t,e){let o=!1,n=t._tx,r=t.stores.resolvedLocation.get(),i=r??t.stores.location.get(),s=t.latestLocation,c=t._pendingLocation,l=c?.href===s.href?c._redirects??0:0,u=t._handoff,f=o?void 0:u?.[0](),d=new AbortController,h=t._preflight;if(t._preflight=d,!o&&!f&&u?.[1](),h?.abort(),!d.signal.aborted){let C=vt(s,r);t.emit({type:"onBeforeNavigate",...C}),d.signal.aborted||t.emit({type:"onBeforeLoad",...C})}if(d.signal.aborted){await ue(t,n);return}let p=i.href===s.href,m=d,g=t.matchRoutes(s,{_controller:d});Qe(g);let S=f?u[1](g):void 0;if(S?m=f:f?.abort(),d.signal.aborted){U(t,g),await ue(t,n);return}t._preflight=void 0;let y,R=a(()=>Br(t,w,p,()=>Je(t,w),e?.sync,S),"run"),b=e?.sync?new Promise(C=>y=C):Promise.resolve().then(R),w=[m,l,s,g,Date.now(),b.then(()=>ue(t,w))];if(t._tx=w,n){for(let C of t.stores.matches.get()){if(t._tx!==w)break;C.isFetching&&Wt(t,C,!1)}n[0].abort(),U(t,n[3],w[3],!0)}if(t._tx!==w){U(t,w[3]),w[3]=[],y?.(),await ue(t,w);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(s)}),(S||!t._committed.length&&g[0]?.status!=="success"&&!g.some(C=>C._notFound))&&Je(t,w),y?.(R()),await w[5]}a(dn,"loadClientRoute");async function hn(t,e){let o=t.buildLocation(e);for(let n=0;;n++){let r=t._committed,i=new AbortController,s,c,l;try{try{s=t.matchRoutes(o,{_controller:i}),Qe(s),c=(t._preloads??=new Map).set(i,s),l=await wn(t,o,s,[i,n,r,!0])}finally{c&&(c=c.delete(i),U(t,s)),i.abort()}if(!zt(l))return l[1];if(!c||l.length<3)return;o=l[2]}catch(u){q(u)||console.error(u);return}}}a(hn,"preloadClientRoute");var eo="Error preloading route! \u261D\uFE0F";var he=class{static{a(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let o=this.options,n=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Y:this.parentRoute||ut();let r=n?Y:o?.path;r&&r!=="/"&&(r=Qt(r));let i=o?.id||r,s=n?Y:at((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(i??""));r==="__root__"&&(r="/");let c=s==="__root__"?"/":r===void 0?this.parentRoute.fullPath:at(this.parentRoute.fullPath+"/"+r);this._path=r,this._id=s,this._fullPath=c,this._to=H(c)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Wo({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var oo=class extends he{static{a(this,"BaseRootRoute")}constructor(t){super(t)}};var no=T(B(),1);function Cn(t,e){let o=t.stores.location,n=new Set,r,i,s=a(c=>{Ye(t,e,c)||(r=c,n.forEach(l=>l()))},"update");return[()=>r??o.get(),c=>(n.size||(r=o.get(),i=o.subscribe(s).unsubscribe),n.add(c),()=>{n.delete(c),n.size||(i(),r=void 0)})]}a(Cn,"createLinkScope");var pt=no.createContext(void 0),Pn=no.createContext(void 0);var ve=T(B(),1);function En({update:t,notify:e,unwatched:o}){return{link:n,unlink:r,propagate:i,checkDirty:s,shallowPropagate:c};function n(u,f,d){let h=f.depsTail;if(h!==void 0&&h.dep===u)return;let p=h!==void 0?h.nextDep:f.deps;if(p!==void 0&&p.dep===u){p.version=d,f.depsTail=p;return}let m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===f)return;let g=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=g),h!==void 0?h.nextDep=g:f.deps=g,m!==void 0?m.nextSub=g:u.subs=g}function r(u,f=u.sub){let d=u.dep,h=u.prevDep,p=u.nextDep,m=u.nextSub,g=u.prevSub;return p!==void 0?p.prevDep=h:f.depsTail=h,h!==void 0?h.nextDep=p:f.deps=p,m!==void 0?m.prevSub=g:d.subsTail=g,g!==void 0?g.nextSub=m:(d.subs=m)===void 0&&o(d),p}function i(u){let f=u.nextSub,d;t:do{let h=u.sub,p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(u,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&e(h),p&1){let m=h.subs;if(m!==void 0){let g=(u=m).nextSub;g!==void 0&&(d={value:f,prev:d},f=g);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue t}break}while(!0)}function s(u,f){let d,h=0,p=!1;t:do{let m=u.dep,g=m.flags;if(f.flags&16)p=!0;else if((g&17)===17){if(t(m)){let S=m.subs;S.nextSub!==void 0&&c(S),p=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,f=m,++h;continue}if(!p){let S=u.nextDep;if(S!==void 0){u=S;continue}}for(;h--;){let S=f.subs,y=S.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=S,p){if(t(f)){y&&c(S),f=u.sub;continue}p=!1}else f.flags&=-33;f=u.sub;let R=u.nextDep;if(R!==void 0){u=R;continue t}}return p}while(!0)}function c(u){do{let f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&e(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}a(En,"createReactiveSystem");function In(t,e,o){let n=typeof t=="object",r=n?t:void 0;return{next:(n?t.next:t)?.bind(r),error:(n?t.error:e)?.bind(r),complete:(n?t.complete:o)?.bind(r)}}a(In,"toObserver");var ro=[],me=0,{link:Ln,unlink:zr,propagate:Ur,checkDirty:On,shallowPropagate:kn}=En({update(t){return t._update()},notify(t){ro[so++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,ge(t))}}),pe=0,so=0,ot,io=0;function ao(t){try{++io,t()}finally{--io||co()}}a(ao,"batch");function ge(t){let e=t.depsTail,o=e!==void 0?e.nextDep:t.deps;for(;o!==void 0;)o=zr(o,t)}a(ge,"purgeDeps");function co(){if(!(io>0)){for(;pe<so;){let t=ro[pe];ro[pe++]=void 0,t.notify()}pe=0,so=0}}a(co,"flush");function ye(t,e){let o=typeof t=="function",n=t,r={_snapshot:o?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:o?0:1,get(){return ot!==void 0&&Ln(r,ot,me),r._snapshot},subscribe(i){let s=In(i),c={current:!1},l=Wr(()=>{r.get(),c.current?(ot=void 0,s.next?.(r._snapshot)):c.current=!0});return{unsubscribe:a(()=>{l.stop()},"unsubscribe")}},_update(i){let s=ot,c=e?.compare??Object.is;if(o)ot=r,++me,r.depsTail=void 0;else if(i===void 0)return!1;o&&(r.flags=5);try{let l=r._snapshot,u=typeof i=="function"?i(l):i===void 0&&o?n(l):i;return l===void 0||!c(l,u)?(r._snapshot=u,!0):!1}finally{ot=s,o&&(r.flags&=-5),ge(r)}}};return o?(r.flags=17,r.get=function(){let i=r.flags;if(i&16||i&32&&On(r.deps,r)){if(r._update()){let s=r.subs;s!==void 0&&kn(s)}}else i&32&&(r.flags=i&-33);return ot!==void 0&&Ln(r,ot,me),r._snapshot}):r.set=function(i){if(r._update(i)){let s=r.subs;s!==void 0&&(Ur(s),kn(s),co())}},r}a(ye,"createAtom");function Wr(t){let e=a(()=>{let n=ot;ot=o,++me,o.depsTail=void 0,o.flags=6;try{return t()}finally{ot=n,o.flags&=-5,ge(o)}},"run"),o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let n=this.flags;n&16||n&32&&On(this.deps,this)?e():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ge(this)}};return e(),o}a(Wr,"effect");function jr(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(let[n,r]of t)if(!e.has(n)||!Object.is(r,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();let o=Nn(t);if(o.length!==Nn(e).length)return!1;for(let n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(e,o[n])||!Object.is(t[o[n]],e[o[n]]))return!1;return!0}a(jr,"shallow");function Nn(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}a(Nn,"getOwnKeys");var lo=T(B(),1),Fn=T(ur(),1);function Kr(t,e){return t===e}a(Kr,"defaultCompare");function W(t,e=n=>n,o){let n=o?.compare??Kr,r=(0,lo.useCallback)(s=>{let{unsubscribe:c}=t.subscribe(s);return c},[t]),i=(0,lo.useCallback)(()=>t.get(),[t]);return(0,Fn.useSyncExternalStoreWithSelector)(r,i,i,e,n)}a(W,"useSelector");var Tn={};function uo(t,e){let o=ve.useRef();return n=>{let r=t?.select?t.select(n):n;return t?.structuralSharing??e.options.defaultStructuralSharing?o.current=tt(o.current,r):r}}a(uo,"useStructuralSharing");function G(t){let e=M(),o=ve.useContext(t.from?Pn:pt),n=t.from??o,r=e.stores.getMatchStore(n);if(!1){let c=r.get();if(!c){(t.shouldThrow??!0)&&ut();return}return t.select?t.select(c):c}let i=uo(t,e),s=W(r,c=>c?i(c):Tn);if(s!==Tn)return s;(t.shouldThrow??!0)&&ut()}a(G,"useMatch");function Se(t){return G({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.search):e.search,"select")})}a(Se,"useSearch");var jt=T(B(),1);var Re=jt.useLayoutEffect;var fo=T(B(),1);function _e(t){let e=M();return fo.useCallback(o=>e.navigate({...o,from:o.from??t?.from}),[t?.from,e])}a(_e,"useNavigate");var kt=T(B(),1),st=T(Q(),1);var xt=class extends kt.Component{static{a(this,"CatchBoundary")}constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,e){let o=t.getResetKey();return e.error&&e.resetKey!==o?{resetKey:o,error:0}:{resetKey:o}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){let t=this.state.error;return t?kt.createElement(this.props.errorComponent??ho,{error:t[0],reset:this.reset}):this.props.children}};function ho({error:t}){let[e,o]=kt.useState(!1);return(0,st.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,st.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,st.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,st.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:a(()=>o(n=>!n),"onClick"),children:e?"Hide Error":"Show Error"})]}),(0,st.jsx)("div",{style:{height:".25rem"}}),e?(0,st.jsx)("div",{children:(0,st.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?(0,st.jsx)("code",{children:t.message}):null})}):null]})}a(ho,"ErrorComponent");var po=T(B(),1),Dn=T(Q(),1);var Mn=a(()=>!0,"getSnapshot"),qr=a(()=>!1,"getServerSnapshot");function An({children:t,fallback:e=null}){return(0,Dn.jsx)(po.default.Fragment,{children:Gr()?t:e})}a(An,"ClientOnly");function Gr(t=!0){return po.default.useSyncExternalStore(Jr,Mn,t?qr:Mn)}a(Gr,"useHydrated");function Jr(){return()=>{}}a(Jr,"subscribe");function mo(t){return G({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.loaderData):e.loaderData,"select")})}a(mo,"useLoaderData");function go(t){let{select:e,...o}=t;return G({...o,select:a(n=>e?e(n.loaderDeps):n.loaderDeps,"select")})}a(go,"useLoaderDeps");function yo(t){return G({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:a(e=>{let o=t.strict===!1?e.params:e._strictParams;return t.select?t.select(o):o},"select")})}a(yo,"useParams");function vo(t){return G({...t,select:a(e=>t.select?t.select(e.context):e.context,"select")})}a(vo,"useRouteContext");var A=T(B(),1);var Yr=T(Q(),1);function Xr(...t){let e=A.useRef(t),o=e.current;return t.forEach((n,r)=>{J(o[r],n,!1,!0)||(o[r]=n)}),e.current}a(Xr,"useStableValues");function we(t,e){t.preloadRoute(e).catch(o=>{console.warn(o),console.warn(eo)})}a(we,"preloadLink");function $n(t,e){let o=typeof t=="string"&&it(t);if(o)return e.has(o)?t:null}a($n,"resolveExternalLink");function Bn(t,e,o,n){let r=te(t.pathname,n),i=te(e.pathname,n);return(o?.exact?r!==i:!(r.startsWith(i)&&(r.length===i.length||r[i.length]==="/")))||(o?.includeSearch??!0)&&!J(t.search,e.search,!o?.exact,o?.explicitUndefined)?!1:!o?.includeHash||t.hash===e.hash}a(Bn,"resolveIsActive");function Zr(t,e,o){let n=M();if(!1)return es(n,t,e,o);let r=A.useRef(null),i=A.useCallback($=>{if(r.current=$,typeof e=="function")return e($);e&&(e.current=$)},[e]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:f,target:d,onClick:h,onBlur:p,onFocus:m,onMouseEnter:g,onMouseLeave:S,onTouchStart:y}=t,[R,b,w]=Xr(t.search,t.params,s),C=A.useContext(pt),_=(n.stores._linkScopes??={})[C]??=Cn(n,C),[v,x,P]=A.useMemo(()=>{let $=$n(c,n.protocolAllowlist);if($!==void 0){let nt=[$??void 0];return[t,()=>nt]}let K={...t},Gt,Ft,lr,Po=a(()=>{let nt=_[0]();if(nt!==Gt){K._fromLocation=nt;let Eo=n.buildLocation(K),Jt=Un(Eo,n,f),Lo=f||Jt&&!it(Jt)?Bn(nt,Eo,w,n.basepath):void 0;(!Ft||Ft[0]!==Jt||Ft[1]!==Lo)&&(Ft=[Jt,Lo]),Gt=nt}return Ft},"getLinkState");return[K,Po,w?.includeHash&&(()=>{let nt=Po();return nt[1]?lr??=[nt[0],!1]:nt})]},[n,_,t.from,t.hash,t.href,c,R,b,t.state,t.mask,t.unsafeRelative,w,f]),[L,k]=A.useSyncExternalStore(_[1],x,P||x),E=k===void 0&&L,O=f||L===void 0,F=A.useRef(!1),N=t.reloadDocument||E||O?!1:l??n.options.defaultPreload,D=u??n.options.defaultPreloadDelay??0,Nt=A.useCallback($=>{let K=$?.isIntersecting;if(!(K??N==="intent")){K===!1&&xe(r);return}if(!D){we(n,v);return}r.t??=setTimeout(()=>{r.t=void 0,we(n,v)},D)},[n,v,r,N,D]);A.useEffect(()=>{if(!N)return;N==="render"&&!F.current&&(F.current=!0,we(n,v));let $=!0,K;return N==="viewport"&&r.current&&typeof IntersectionObserver=="function"&&(K=new IntersectionObserver(Gt=>{$&&Nt(Gt.pop())},{rootMargin:"100px"}),K.observe(r.current)),()=>{$=!1,K?.disconnect(),xe(r)}},[n,v,N,Nt,r]);let Z=Hn(t,o);if(Z.ref=e?i:r,E)return Z.href=E,Z;let Ee=a($=>{let K=d??$.currentTarget.getAttribute("target");!O&&!($.metaKey||$.altKey||$.ctrlKey||$.shiftKey)&&!$.defaultPrevented&&(!K||K==="_self")&&$.button===0&&($.preventDefault(),xe(r),n.navigate({...t,_fromLocation:v._fromLocation}))},"handleClick"),cr=a(()=>{N==="intent"&&we(n,v)},"handleTouchStart"),Co=a(()=>{N==="intent"&&xe(r)},"handleLeave");return Z.onClick=It(h,Ee),Z.onBlur=It(p,Co),Z.onFocus=It(m,Nt),Z.onMouseEnter=It(g,Nt),Z.onMouseLeave=It(S,Co),Z.onTouchStart=It(y,cr),zn(Z,t,k,L,O,o)}a(Zr,"useLinkProps");var Qr={},ts={className:"active"},Vn=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function Hn(t,e){let o={};for(let n in t)Vn.has(n)||n==="type"&&e!==void 0||n==="disabled"&&e==="a"||(o[n]=t[n]);return o}a(Hn,"collectElementProps");function zn(t,e,o,n,r,i){let{activeProps:s,inactiveProps:c,className:l,style:u,target:f}=e,d=mt(o?s:c,{})??(o?ts:Qr);Object.assign(t,d),t.href=n,i!=="a"&&(t.disabled=r),t.target=f;let h=d.style;(u||h)&&(t.style=u&&h?{...u,...h}:u||h);let p=d.className;return(l||p)&&(t.className=l?p?`${l} ${p}`:l:p),r&&(t.role="link",t["aria-disabled"]=!0),o&&(t["data-status"]="active",t["aria-current"]="page"),t}a(zn,"applyLinkState");function es(t,e,o,n){let{to:r,disabled:i,activeOptions:s}=e,c=$n(r,t.protocolAllowlist),l=c===void 0?t.buildLocation(e):void 0,u=l?Un(l,t,i):c??void 0,f=i||!u,d=c??(u&&it(u)?u:void 0),h=Hn(e,n);return h.ref=o,d?(h.href=d,h):zn(h,e,!!l&&!(!i&&!u)&&!s?.includeHash&&Bn(t.stores.location.get(),l,s,t.basepath),u,f,n)}a(es,"getServerLinkProps");var xe=a(t=>{clearTimeout(t.t),t.t=void 0},"cancelPreload"),It=a((t,e)=>t?o=>o.defaultPrevented||(t(o),o.defaultPrevented||e(o)):e,"composeHandlers");function Un(t,e,o){if(o)return;let n=t.maskedLocation??t,r=n.external?n.publicHref:e.history.createHref(n.publicHref)||"/";if(!((n.external||r!==n.publicHref)&&Dt(r,e.protocolAllowlist)))return r}a(Un,"getHrefOption");var So=A.memo(A.forwardRef((t,e)=>{let o=t._asChild||"a",n=Zr(t,e,o),r=typeof t.children=="function"?t.children({isActive:n["data-status"]==="active"}):t.children;return A.createElement(o,n,r)}),os);function os(t,e){let o=0;for(let n in e)if(o++,t[n]!==e[n]&&(!Vn.has(n)||!J(t[n],e[n],!1,!0)))return!1;for(let n in t)o--;return o===0}a(os,"areLinkPropsEqual");var Ro=T(B(),1),_o=T(Q(),1);var Wn=class extends he{static{a(this,"Route")}constructor(t){super(t),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>vo({...e,from:this.id}),this.useSearch=e=>Se({...e,from:this.id}),this.useParams=e=>yo({...e,from:this.id}),this.useLoaderDeps=e=>go({...e,from:this.id}),this.useLoaderData=e=>mo({...e,from:this.id}),this.useNavigate=()=>_e({from:this.fullPath}),this.Link=Ro.default.forwardRef((e,o)=>(0,_o.jsx)(So,{ref:o,from:this.fullPath,...e}))}};function ns(t){return new Wn(t)}a(ns,"createRoute");var jn=class extends oo{static{a(this,"RootRoute")}constructor(t){super(t),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>vo({...e,from:this.id}),this.useSearch=e=>Se({...e,from:this.id}),this.useParams=e=>yo({...e,from:this.id}),this.useLoaderDeps=e=>go({...e,from:this.id}),this.useLoaderData=e=>mo({...e,from:this.id}),this.useNavigate=()=>_e({from:this.fullPath}),this.Link=Ro.default.forwardRef((e,o)=>(0,_o.jsx)(So,{ref:o,from:this.fullPath,...e}))}};function rs(t){return new jn(t)}a(rs,"createRootRoute");var vc=T(B(),1);var be=T(Q(),1);function Kn(t){let e=M();if(!1){let n=`not-found-${e.stores.location.get().pathname}-${e.stores.status.get()}`;return(0,be.jsx)(xt,{getResetKey:a(()=>n,"getResetKey"),onCatch:a((r,i)=>{if(q(r))t.onCatch?.(r,i);else throw r},"onCatch"),errorComponent:a(({error:r})=>{if(q(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}let o=`not-found-${W(e.stores.location,n=>n.pathname)}-${W(e.stores.status)}`;return(0,be.jsx)(xt,{getResetKey:a(()=>o,"getResetKey"),onCatch:a((n,r)=>{if(q(n))t.onCatch?.(n,r);else throw n},"onCatch"),errorComponent:a(({error:n})=>{if(q(n))return t.fallback?.(n);throw n},"errorComponent"),children:t.children})}a(Kn,"CatchNotFound");function qn(){return(0,be.jsx)("p",{children:"Not Found"})}a(qn,"DefaultGlobalNotFound");var Gn=T(Q(),1);function Jn({children:t}){let e=M();return null}a(Jn,"ScriptOnce");var Pc=T(B(),1),Ce=T(Q(),1);function wo(t,e,o){return e.options.notFoundComponent?(0,Ce.jsx)(e.options.notFoundComponent,{...o}):t.options.defaultNotFoundComponent?(0,Ce.jsx)(t.options.defaultNotFoundComponent,{...o}):(0,Ce.jsx)(qn,{})}a(wo,"renderRouteNotFound");var Xn=T(Q(),1);function Yn(t){return null}a(Yn,"getScrollRestorationScriptForRouter");function Zn(){let t=M(),e=Yn(t);return e?(0,Xn.jsx)(Jn,{children:e}):null}a(Zn,"ScrollRestoration");var j=T(B(),1);var V=T(Q(),1);function Kt(t,e){let o=e?.options.pendingComponent??t.options.defaultPendingComponent;return o?(0,V.jsx)(o,{}):null}a(Kt,"renderPending");var ss=a((t,e)=>t[0]===e[0]&&t[1]===e[1],"outletMatchSelectionEqual"),tr=a((t,e,o)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||o===!1||o==="data-only"||!t.ssr,"canWrapInSuspense"),Pe=j.memo(a(function({routeId:e}){let o=M();if(!1)return Qn(o,o.stores.byRoute.get(e).get());let n=o.stores.getMatchStore(e);return Qn(o,W(n))},"MatchImpl"));function Qn(t,e){let o=t.routesById[e.routeId],n=Kt(t,o),r=o.options.errorComponent??t.options.defaultErrorComponent,i=o.options.onCatch??t.options.defaultOnCatch,s=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,c=e.ssr===!1||e.ssr==="data-only",l=tr(t,o,e.ssr)&&(o.options.wrapInSuspense??n??(o.options.errorComponent?.preload||c)),u=(0,V.jsx)(is,{match:e});c&&(u=(0,V.jsx)(An,{fallback:n,children:u})),s&&(u=(0,V.jsx)(Kn,{fallback:a(h=>{if(h.routeId??=e.routeId,h.routeId!==e.routeId)throw h;return j.createElement(s,h)},"fallback"),children:u})),r&&(u=(0,V.jsx)(xt,{getResetKey:a(()=>e,"getResetKey"),errorComponent:r,onCatch:a((h,p)=>{if(q(h))throw h.routeId??=e.routeId,h;i?.(h,p)},"onCatch"),children:u})),l&&(u=(0,V.jsx)(j.Suspense,{fallback:n,children:u}));let f=null,d=o.isRoot&&o.options.shellComponent;return d?(0,V.jsx)(pt.Provider,{value:e.routeId,children:(0,V.jsxs)(d,{children:[u,f]})}):(0,V.jsxs)(pt.Provider,{value:e.routeId,children:[u,f]})}a(Qn,"matchView");var is=j.memo(a(function({match:e}){let o=M(),n=e.routeId,r=o.routesById[n],i=j.useMemo(()=>{let c=(r.options.remountDeps??o.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return c?JSON.stringify(c):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,o.options.defaultRemountDeps]),s=j.useMemo(()=>{let c=r.options.component??o.options.defaultComponent;return c?(0,V.jsx)(c,{},i):(0,V.jsx)(er,{})},[i,r.options.component,o.options.defaultComponent]);if(e.status==="pending"){if(o.ssr&&!tr(o,r,e.ssr))return s;if(o._tx)throw o._tx[5];return Kt(o,r)}if(e.status==="notFound")return wo(o,r,e.error);if(e.status==="error"){if(!1){let c=(r.options.errorComponent??o.options.defaultErrorComponent)||ho;return(0,V.jsx)(c,{error:e.error,reset:void 0,info:{componentStack:""}})}throw e.error}return s},"MatchInnerImpl")),er=j.memo(a(function(){let e=M(),o=j.useContext(pt),n,r,i;if(!1){let c=e.stores.matches.get(),l=c.findIndex(f=>f.routeId===o),u=c[l];n=!!u._notFound,r=u.error,i=c[l+1]?.routeId}else{let c=e.stores.getMatchStore(o);[n,r]=W(c,l=>[!!l._notFound,l.error],{compare:ss}),i=W(e.stores.ids,l=>l[l.indexOf(o)+1])}if(n)return wo(e,e.routesById[o],r);if(!i)return null;let s=(0,V.jsx)(Pe,{routeId:i});return o===Y?(0,V.jsx)(j.Suspense,{fallback:Kt(e),children:s}):s},"OutletImpl"));var xo=T(B(),1);function bo(t,e){let o=t[1];t.length=0,o?.(e)}a(bo,"settleOwner");function or({t}){let e=M(),o=e._rendered??=[],n=void 0;return e.startTransition=(r,i)=>new Promise(s=>{bo(o,!1),o.push(i,s),t(e),xo.startTransition(r)}),Re(()=>{let r=e.history.subscribe(e.load);if(n?.current)return r;n&&(n.current=!0),e.updateLatestLocation();let i=e.latestLocation,s=e.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(H(i.publicHref)!==H(s.publicHref))return e.commitLocation({...s,replace:!0,ignoreBlocker:!0}),r;let c=e.stores.resolvedLocation.get();return c?.href===i.href&&c.state.__TSR_key===i.state.__TSR_key?o.push(e.stores.matches.get(),l=>{l&&e.emit({type:"onRendered",...vt(c,c)})}):e._tx||e.load({sync:!0}).catch(console.error),r},[e,e.history]),null}a(or,"Transitioner");var Ot=T(B(),1);var X=T(Q(),1);function rr(){let t=M(),e=t.routesById[Y],o=Kt(t,e),n=(0,X.jsxs)(X.Fragment,{children:[!!1&&(0,X.jsx)(or,{t:Ot.useState()[1]}),t.ssr?(0,X.jsx)(nr,{}):(0,X.jsx)(Ot.Suspense,{fallback:o,children:(0,X.jsx)(nr,{})})]});return t.options.InnerWrap?(0,X.jsx)(t.options.InnerWrap,{children:n}):n}a(rr,"Matches");function nr(){let t=M(),e=t._rendered,o=W(t.stores.matches,s=>e[0]??s),n=o[0],r=n?.routeId;Re(()=>{e[0]===o&&bo(e,!0)},[e,o]);let i=r?(0,X.jsx)(Pe,{routeId:r}):null;return t.options.disableGlobalCatchBoundary?i:(0,X.jsx)(xt,{getResetKey:a(()=>n,"getResetKey"),onCatch:void 0,children:i})}a(nr,"MatchesInner");var sr=a(t=>({createMutableStore:ye,createReadonlyStore:ye,batch:ao}),"getStoreFactory");var as=a(t=>new ir(t),"createRouter"),ir=class extends Ke{static{a(this,"Router")}constructor(t){super(t,sr)}};var Sl=T(B(),1),qt=T(Q(),1);function ar({router:t,children:e,...o}){Tt(o)&&t.update({...t.options,...o,context:{...t.options.context,...o.context}});let n=(0,qt.jsx)(Yt.Provider,{value:t,children:e});return t.options.Wrap?(0,qt.jsx)(t.options.Wrap,{children:n}):n}a(ar,"RouterContextProvider");function cs({router:t,...e}){return(0,qt.jsx)(ar,{router:t,...e,children:(0,qt.jsx)(rr,{})})}a(cs,"RouterProvider");function ls(t){let e=M({warn:t?.router===void 0}),o=t?.router||e;if(!1){let n=o.stores.__store.get();return t?.select?t.select(n):n}return W(o.stores.__store,uo(t,o))}a(ls,"useRouterState");export{Ve as a,Lr as b,M as c,ao as d,ye as e,jr as f,W as g,Se as h,_e as i,ns as j,rs as k,er as l,as as m,cs as n,ls as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as y,r as w}from"./chunk-VJQP4ARP.js";import{a as v}from"./chunk-A6TVTNKO.js";import{b as _}from"./chunk-ADABTCDI.js";import{a as m,d as g}from"./chunk-5PEAXTYQ.js";var x=g(v(),1);var a=g(_(),1);var k=m((s,e)=>{if(e==="")return[{match:!1,offset:0,text:s}];let n=[],l=s.toLowerCase(),o=e.toLowerCase(),t=0;for(let r=l.indexOf(o);r!==-1;r=l.indexOf(o,t))r>t&&n.push({match:!1,offset:t,text:s.slice(t,r)}),n.push({match:!0,offset:r,text:s.slice(r,r+e.length)}),t=r+e.length;return t<s.length&&n.push({match:!1,offset:t,text:s.slice(t)}),n},"N"),L=m(s=>{let e=(0,x.c)(9),{highlight:n,value:l}=s;if(l==null){let d;return e[0]===Symbol.for("react.memo_cache_sentinel")?(d=(0,a.jsx)("span",{className:"text-muted-foreground/50 italic",children:"NULL"}),e[0]=d):d=e[0],d}let o,t,r;if(e[1]!==n||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d=w(l);if(n===void 0||n===""){r=(0,a.jsx)("span",{title:d,children:d});break e}o=d,t=k(d,n).map(j)}e[1]=n,e[2]=l,e[3]=o,e[4]=t,e[5]=r}else o=e[3],t=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let c;return e[6]!==o||e[7]!==t?(c=(0,a.jsx)("span",{title:o,children:t}),e[6]=o,e[7]=t,e[8]=c):c=e[8],c},"v"),O=m(s=>{let e=(0,x.c)(22),{columns:n,rows:l}=s,o=y(),t;e[0]!==o?(t=o("Field"),e[0]=o,e[1]=t):t=e[1];let r;e[2]!==t?(r=(0,a.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]=r):r=e[3];let c;if(e[4]!==l||e[5]!==o){let i;e[7]!==o?(i=m((b,p)=>(0,a.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:o("Row {n}",{n:p+1})},p),"c"),e[7]=o,e[8]=i):i=e[8],c=l.map(i),e[4]=l,e[5]=o,e[6]=c}else c=e[6];let d;e[9]!==r||e[10]!==c?(d=(0,a.jsx)("thead",{className:"sticky top-0 z-10 bg-muted",children:(0,a.jsxs)("tr",{children:[r,c]})}),e[9]=r,e[10]=c,e[11]=d):d=e[11];let f;if(e[12]!==n||e[13]!==l){let i;e[15]!==l?(i=m(b=>(0,a.jsxs)("tr",{className:"hover:bg-muted/40",children:[(0,a.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:b}),l.map((p,N)=>(0,a.jsx)("td",{className:"max-w-md truncate border-b border-border px-3 py-1.5 font-mono",children:(0,a.jsx)(L,{value:p[b]})},N))]},b),"c"),e[15]=l,e[16]=i):i=e[16],f=n.map(i),e[12]=n,e[13]=l,e[14]=f}else f=e[14];let h;e[17]!==f?(h=(0,a.jsx)("tbody",{children:f}),e[17]=f,e[18]=h):h=e[18];let u;return e[19]!==d||e[20]!==h?(u=(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"db-transposed",children:(0,a.jsxs)("table",{className:"border-collapse text-xs",children:[d,h]})}),e[19]=d,e[20]=h,e[21]=u):u=e[21],u},"T"),T=m(({children:s,layout:e="card",testId:n})=>(0,a.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":n,children:s}),"j");function j(s){return(0,a.jsx)("mark",{className:s.match?"rounded-sm bg-warning/40 text-foreground":"bg-transparent text-inherit",children:s.text},s.offset)}m(j,"_");export{L as a,O as b,T as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ne}from"./chunk-5MIJ3KEK.js";import{a as A}from"./chunk-AWFFXR6S.js";import{a as re}from"./chunk-RAJ327CY.js";import{b as te}from"./chunk-EDL46BPM.js";import{a as Q}from"./chunk-MTBY4GXM.js";import"./chunk-4KPATTV6.js";import{i as ee}from"./chunk-V4JKKAAZ.js";import"./chunk-4SY2N2RS.js";import"./chunk-4AG356VE.js";import{a as w}from"./chunk-VGKDC2OQ.js";import"./chunk-SCTYLLJT.js";import"./chunk-OZID3UYF.js";import{b as j}from"./chunk-F2DVDJV6.js";import"./chunk-L27FKJTG.js";import{a as X}from"./chunk-LYVYUTQY.js";import{c as I,d as P,n as H}from"./chunk-KQVY73EU.js";import"./chunk-ZPQBVYNN.js";import{B as Y,g as U,h as q,j as O,p as W,s as G,w as V}from"./chunk-VJQP4ARP.js";import"./chunk-PDBW6GTJ.js";import"./chunk-A6TVTNKO.js";import{a as he,b as ge}from"./chunk-ADABTCDI.js";import{a as o,d as M}from"./chunk-5PEAXTYQ.js";var c=M(he(),1);var n=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=q(X.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}},"Ae"),$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,s]=i.pop()??[void 0,void 0];typeof s=="boolean"?r.push({key:u,text:s?"true":"false"}):typeof s=="object"&&s!==null&&!l.has(s)&&(l.add(s),Array.isArray(s)?i.push(...s.map(p=>[void 0,p])):i.push(...Object.entries(s)))}return r},"Re"),ae=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])${ae(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=ae(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(s=>Oe(s,e[s])),i=r.flatMap(s=>Ie(e[s])).flatMap(s=>{let p=JSON.stringify(s).slice(1,-1);return p===s?[s]:[s,p]}).toSorted((s,p)=>p.length-s.length),u=t;for(let s of l)u=Re(u,s);for(let s of i)u=je(u,s);return u},"$e"),Te=10,Fe=o(t=>t===void 0?"undefined":JSON.stringify(t,W,2),"Ce"),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),"Ee"),Ge=o(({functions:t,runAsIdentity:e=!1}={})=>{let r=Y(),l=H(),[i,u]=(0,c.useState)(null),[s,p]=(0,c.useState)(null),S=t??i??[],[R,C]=(0,c.useState)(""),[y,k]=(0,c.useState)("{}"),[g,T]=(0,c.useState)(""),[b,se]=(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 a=!1;return l.listFunctions().then(f=>(a||u(f),f)).catch(f=>{a||p(O(f))}),()=>{a=!0}},[l,t]);let B=R===""?S[0]?.path??"":R,d=S.find(a=>a.path===B),le=o(async()=>{if(!d)return;let a;try{a=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 U(l,d.kind,f,a,E):await l.query(Ne,{args:a,functionPath:d.path,userId:K},E);te(g),v(m),x("success"),D("success")}catch(m){v(void 0),N(Ce(O(m),a,Z)),x("error"),D("error")}},"H"),de=o(a=>{if(C(a.path),T(a.shardKey),a.redacted){v(void 0),N(r("Re-enter the sensitive values before running this again.")),x("error");return}k(a.argsText)},"G"),ue=o(a=>{C(a.target.value)},"W"),ce=o(a=>{k(a.target.value)},"X"),fe=o(a=>{se(a.target.value)},"Y"),J=o(()=>{G(le())},"j"),L=e?b.trim():"",_=$==="running"||d===void 0,pe=o(()=>{k(ve(d?.args))},"_");return(0,n.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-runner",children:[s!==null&&(0,n.jsx)("p",{className:"text-sm text-destructive","data-testid":"function-discover-error",role:"alert",children:s}),(0,n.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsx)(A,{htmlFor:"function-select",children:r("Function")}),(0,n.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(a=>(0,n.jsxs)("option",{value:a.path,children:[a.path," (",a.kind,")"]},a.path))}),d!==void 0&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,n.jsx)("span",{className:"mr-1.5 font-medium",children:r("Signature")}),(0,n.jsx)("code",{className:"font-mono","data-testid":"function-signature",children:xe(d.args)})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)(A,{htmlFor:"args-input",children:r("Arguments")}),(0,n.jsx)(w,{"data-testid":"prefill-button",disabled:d===void 0,onClick:pe,size:"xs",type:"button",variant:"ghost",children:r("Prefill")})]}),(0,n.jsx)(ne,{"aria-label":r("Arguments"),className:"font-mono text-xs","data-testid":"args-input",id:"args-input",onChange:ce,value:y})]}),(0,n.jsx)(re,{onChange:T,testId:"shard-input",value:g}),e&&(0,n.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"run-as-field",children:[(0,n.jsx)(A,{htmlFor:"run-as-input",children:r("Run as identity (userId)")}),(0,n.jsx)(ee,{"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,n.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,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[L!==""&&d!==void 0&&d.kind!=="query"?(0,n.jsx)(Q,{confirmLabel:r("This will execute `{functionPath}` as user `{userId}`.",{functionPath:d.path,userId:L}),disabled:_,onConfirm:J,testId:"run-button",children:r("Run")}):(0,n.jsx)(w,{"data-testid":"run-button",disabled:_,onClick:J,type:"button",children:r("Run")}),d!==void 0&&(0,n.jsx)(j,{variant:"outline",children:d.kind}),e&&b.trim()!==""&&(0,n.jsx)(j,{"data-testid":"run-as-badge",variant:"secondary",children:r("as {userId}",{userId:b.trim()})})]})]}),$==="error"&&F!==null&&(0,n.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,n.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,n.jsx)("ul",{className:"flex flex-col overflow-hidden rounded-xl border border-border","data-testid":"fn-history",children:z.map((a,f)=>(0,n.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,n.jsx)("span",{className:a.status==="success"?"text-success":"text-destructive","data-testid":`fn-history-status-${f.toString()}`,children:a.status==="success"?"\u2713":"\u2717"})," ",(0,n.jsxs)("span",{className:"font-mono text-xs",children:[a.path," (",a.kind,")"]})," ",(0,n.jsx)("time",{className:"text-xs text-muted-foreground",children:V(a.at)})," ",(0,n.jsx)(w,{className:"ml-auto","data-testid":`fn-history-load-${f.toString()}`,onClick:o(()=>{de(a)},"onClick"),size:"xs",type:"button",variant:"ghost",children:r("Load")})]},a.id))})]})},"Ge");export{Ge as FunctionRunner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c}from"./chunk-ADABTCDI.js";import{b as e}from"./chunk-5PEAXTYQ.js";var t=e(r=>{"use strict";var u=c().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;r.c=function(_){return u.H.useMemoCache(_)}});var i=e((n,s)=>{"use strict";s.exports=t()});export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,b as a}from"./chunk-5PEAXTYQ.js";var x=a(u=>{"use strict";var m=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),V=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),J=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),K=Symbol.for("react.view_transition"),j=Symbol.iterator;function F(t){return t===null||typeof t!="object"?null:(t=j&&t[j]||t["@@iterator"],typeof t=="function"?t:null)}i(F,"getIteratorFn");var N={isMounted:i(function(){return!1},"isMounted"),enqueueForceUpdate:i(function(){},"enqueueForceUpdate"),enqueueReplaceState:i(function(){},"enqueueReplaceState"),enqueueSetState:i(function(){},"enqueueSetState")},g=Object.assign,$={};function E(t,e,n){this.props=t,this.context=e,this.refs=$,this.updater=n||N}i(E,"Component");E.prototype.isReactComponent={};E.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};E.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function h(){}i(h,"ComponentDummy");h.prototype=E.prototype;function C(t,e,n){this.props=t,this.context=e,this.refs=$,this.updater=n||N}i(C,"PureComponent");var d=C.prototype=new h;d.constructor=C;g(d,E.prototype);d.isPureReactComponent=!0;var w=Array.isArray;function R(){}i(R,"noop");var f={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function A(t,e,n){var r=n.ref;return{$$typeof:m,type:t,key:e,ref:r!==void 0?r:null,props:n}}i(A,"ReactElement");function tt(t,e){return A(t.type,e,t.props)}i(tt,"cloneAndReplaceKey");function S(t){return typeof t=="object"&&t!==null&&t.$$typeof===m}i(S,"isValidElement");function et(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}i(et,"escape");var P=/\/+/g;function T(t,e){return typeof t=="object"&&t!==null&&t.key!=null?et(""+t.key):e.toString(36)}i(T,"getElementKey");function nt(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(R,R):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}i(nt,"resolveThenable");function _(t,e,n,r,o){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var c=!1;if(t===null)c=!0;else switch(s){case"bigint":case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case m:case z:c=!0;break;case H:return c=t._init,_(c(t._payload),e,n,r,o)}}if(c)return o=o(t),c=r===""?"."+T(t,0):r,w(o)?(n="",c!=null&&(n=c.replace(P,"$&/")+"/"),_(o,e,n,"",function(q){return q})):o!=null&&(S(o)&&(o=tt(o,n+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace(P,"$&/")+"/")+c)),e.push(o)),1;c=0;var l=r===""?".":r+":";if(w(t))for(var p=0;p<t.length;p++)r=t[p],s=l+T(r,p),c+=_(r,e,n,s,o);else if(p=F(t),typeof p=="function")for(t=p.call(t),p=0;!(r=t.next()).done;)r=r.value,s=l+T(r,p++),c+=_(r,e,n,s,o);else if(s==="object"){if(typeof t.then=="function")return _(nt(t),e,n,r,o);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return c}i(_,"mapIntoArray");function y(t,e,n){if(t==null)return t;var r=[],o=0;return _(t,r,"","",function(s){return e.call(n,s,o++)}),r}i(y,"mapChildren");function rt(t){if(t._status===-1){var e=t._result,n=e();n.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r,n.status===void 0&&(n.status="fulfilled",n.value=r))},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r,n.status===void 0&&(n.status="rejected",n.reason=r))}),t._status===-1&&(t._status=0,t._result=n)}if(t._status===1)return t._result.default;throw t._result}i(rt,"lazyInitializer");var O=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function I(t){var e=f.T,n={};n.types=e!==null?e.types:null,f.T=n;try{var r=t(),o=f.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(R,O)}catch(s){O(s)}finally{e!==null&&n.types!==null&&(e.types=n.types),f.T=e}}i(I,"startTransition");function k(t){var e=f.T;if(e!==null){var n=e.types;n===null?e.types=[t]:n.indexOf(t)===-1&&n.push(t)}else I(k.bind(null,t))}i(k,"addTransitionType");var ut={map:y,forEach:i(function(t,e,n){y(t,function(){e.apply(this,arguments)},n)},"forEach"),count:i(function(t){var e=0;return y(t,function(){e++}),e},"count"),toArray:i(function(t){return y(t,function(e){return e})||[]},"toArray"),only:i(function(t){if(!S(t))throw Error("React.Children.only expected to receive a single React element child.");return t},"only")};u.Activity=b;u.Children=ut;u.Component=E;u.Fragment=G;u.Profiler=B;u.PureComponent=C;u.StrictMode=W;u.Suspense=Z;u.ViewTransition=K;u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f;u.__COMPILER_RUNTIME={__proto__:null,c:i(function(t){return f.H.useMemoCache(t)},"c")};u.addTransitionType=k;u.cache=function(t){return function(){return t.apply(null,arguments)}};u.cacheSignal=function(){return null};u.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var r=g({},t.props),o=t.key;if(e!=null)for(s in e.key!==void 0&&(o=""+e.key),e)!Y.call(e,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&e.ref===void 0||(r[s]=e[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];r.children=c}return A(t.type,o,r)};u.createContext=function(t){return t={$$typeof:V,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Q,_context:t},t};u.createElement=function(t,e,n){var r,o={},s=null;if(e!=null)for(r in e.key!==void 0&&(s=""+e.key),e)Y.call(e,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=e[r]);var c=arguments.length-2;if(c===1)o.children=n;else if(1<c){for(var l=Array(c),p=0;p<c;p++)l[p]=arguments[p+2];o.children=l}if(t&&t.defaultProps)for(r in c=t.defaultProps,c)o[r]===void 0&&(o[r]=c[r]);return A(t,s,o)};u.createRef=function(){return{current:null}};u.forwardRef=function(t){return{$$typeof:X,render:t}};u.isValidElement=S;u.lazy=function(t){return{$$typeof:H,_payload:{_status:-1,_result:t},_init:rt}};u.memo=function(t,e){return{$$typeof:J,type:t,compare:e===void 0?null:e}};u.startTransition=I;u.unstable_useCacheRefresh=function(){return f.H.useCacheRefresh()};u.use=function(t){return f.H.use(t)};u.useActionState=function(t,e,n){return f.H.useActionState(t,e,n)};u.useCallback=function(t,e){return f.H.useCallback(t,e)};u.useContext=function(t){return f.H.useContext(t)};u.useDebugValue=function(){};u.useDeferredValue=function(t,e){return f.H.useDeferredValue(t,e)};u.useEffect=function(t,e){return f.H.useEffect(t,e)};u.useEffectEvent=function(t){return f.H.useEffectEvent(t)};u.useId=function(){return f.H.useId()};u.useImperativeHandle=function(t,e,n){return f.H.useImperativeHandle(t,e,n)};u.useInsertionEffect=function(t,e){return f.H.useInsertionEffect(t,e)};u.useLayoutEffect=function(t,e){return f.H.useLayoutEffect(t,e)};u.useMemo=function(t,e){return f.H.useMemo(t,e)};u.useOptimistic=function(t,e){return f.H.useOptimistic(t,e)};u.useReducer=function(t,e,n){return f.H.useReducer(t,e,n)};u.useRef=function(t){return f.H.useRef(t)};u.useState=function(t){return f.H.useState(t)};u.useSyncExternalStore=function(t,e,n){return f.H.useSyncExternalStore(t,e,n)};u.useTransition=function(){return f.H.useTransition()};u.version="19.3.1"});var ot=a((lt,M)=>{"use strict";M.exports=x()});var U=a(v=>{"use strict";var st=Symbol.for("react.transitional.element"),it=Symbol.for("react.fragment");function L(t,e,n){var r=null;if(n!==void 0&&(r=""+n),e.key!==void 0&&(r=""+e.key),"key"in e){n={};for(var o in e)o!=="key"&&(n[o]=e[o])}else n=e;return e=n.ref,{$$typeof:st,type:t,key:r,ref:e!==void 0?e:null,props:n}}i(L,"jsxProd");v.Fragment=it;v.jsx=L;v.jsxs=L});var ft=a((at,D)=>{"use strict";D.exports=U()});export{ot as a,ft as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as C}from"./chunk-VGKDC2OQ.js";import"./chunk-SCTYLLJT.js";import"./chunk-OZID3UYF.js";import{a as $}from"./chunk-NQ727GVM.js";import{b as v}from"./chunk-F2DVDJV6.js";import"./chunk-L27FKJTG.js";import{a as j}from"./chunk-JQBZDS6X.js";import"./chunk-4YEGXH2V.js";import{a as I,b as _,c as q,d as p,e as o,f as i}from"./chunk-4TGALJHR.js";import"./chunk-FPODRWDZ.js";import"./chunk-MNXXIISC.js";import"./chunk-EOFWXI3T.js";import{a as g}from"./chunk-LYVYUTQY.js";import{c as h}from"./chunk-YL5ZAR3P.js";import{a as K,e as S}from"./chunk-ZZ6ZCOD4.js";import"./chunk-KQVY73EU.js";import"./chunk-ZPQBVYNN.js";import{B as T,w as F}from"./chunk-VJQP4ARP.js";import"./chunk-PDBW6GTJ.js";import{a as oe}from"./chunk-A6TVTNKO.js";import{a as ne,b as ie}from"./chunk-ADABTCDI.js";import{a as d,d as k}from"./chunk-5PEAXTYQ.js";var Q=k(oe(),1),G=k(ne(),1);var e=k(ie(),1);var H="agent_threads",de="agent_messages",L="agent_run_queue",J=100,N=250,le={},ce={filters:[],limit:J,offset:0,orderBy:{column:"updatedAt",direction:"desc"},skipCount:!0,table:H},c=d((s,t)=>{let a=s[t];return typeof a=="string"?a:void 0},"c"),B=d((s,t)=>{let a=s[t];return typeof a=="number"?a:void 0},"E"),O=d(s=>{let{usage:t}=s;if(t===null||typeof t!="object")return;let{totalTokens:a}=t;return typeof a=="number"?a:void 0},"H"),me=d(s=>{let{toolCalls:t}=s;return Array.isArray(t)?t.map(a=>a!==null&&typeof a=="object"?a.name:void 0).filter(a=>typeof a=="string"):[]},"de"),ue=d(s=>{switch(s){case"awaiting_input":return"warning";case"cancelled":return"warning";case"error":return"destructive";case"running":return"info";default:return"outline"}},"le"),he=d(s=>{switch(s){case"approved":return"success";case"rejected":return"destructive";default:return"warning"}},"ie"),ge=d(s=>{let t=(0,Q.c)(3),{fetched:a}=s,m=T(),l;return t[0]!==a||t[1]!==m?(l=a<=N?null:(0,e.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"agents-messages-truncated",children:m("Showing the latest {count} messages; older ones are not shown.",{count:N})}),t[0]=a,t[1]=m,t[2]=l):l=t[2],l},"ce"),Te=d(({initialShardKey:s=""})=>{let t=T(),[a,m]=(0,G.useState)(void 0),{data:l}=h(g.listTables,le,{live:!0,shardKey:s}),V=l!==void 0,f=Array.isArray(l)&&l.some(r=>r.name===H),W=Array.isArray(l)&&l.some(r=>r.name===L),{data:E,error:X,errorSource:Y,liveError:Z}=h(g.readTablePage,ce,{enabled:f,live:!0,shardKey:s}),ee={filters:[{column:"threadKey",operator:"eq",value:a??""}],limit:N+1,offset:0,orderBy:{column:"seq",direction:"desc"},skipCount:!0,table:de},{data:P}=h(g.readTablePage,{limit:J,offset:0,orderBy:{column:"position",direction:"asc"},skipCount:!0,table:L},{enabled:W,live:!0,shardKey:s}),{data:U,error:te,errorSource:ae}=h(g.readTablePage,ee,{enabled:f&&a!==void 0,live:!0,shardKey:s}),b=Array.isArray(E?.rows)?E.rows:[],re=Array.isArray(P?.rows)?P.rows:[],z=d(r=>re.filter(n=>c(n,"threadKey")===r).length,"C"),M=Array.isArray(U?.rows)?U.rows:[],R=M.slice(0,N).toReversed(),D=b.find(r=>c(r,"key")===a),x;return V&&!f?x=(0,e.jsx)($,{description:t("No @lunora/agent tables found in this deployment. Add lunora/agents.ts with defineAgent(...) and merge the agent schema extension to run durable AI agents."),testId:"agents-unconfigured",title:t("No agents configured")}):f&&b.length===0?x=(0,e.jsx)($,{description:t("No agent has run yet. Start a run with ctx.agents.<name>.run(...) and its thread appears here."),testId:"agents-empty",title:t("No agent threads yet")}):x=(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsx)(K,{className:"overflow-hidden py-0",children:(0,e.jsx)(S,{className:"px-0",children:(0,e.jsxs)(I,{"data-testid":"agents-threads-table",children:[(0,e.jsx)(_,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(o,{children:t("Agent")}),(0,e.jsx)(o,{children:t("Key")}),(0,e.jsx)(o,{children:t("Status")}),(0,e.jsx)(o,{children:t("Queued")}),(0,e.jsx)(o,{children:t("Messages")}),(0,e.jsx)(o,{children:t("Tokens")}),(0,e.jsx)(o,{children:t("Updated")}),(0,e.jsx)(o,{"aria-label":t("Actions")})]})}),(0,e.jsx)(q,{children:b.map(r=>{let n=c(r,"key")??"",u=c(r,"status"),y=O(r);return(0,e.jsxs)(p,{"data-active":n===a?"":void 0,"data-testid":`agents-thread-${n}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:c(r,"agent")??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:n}),(0,e.jsx)(i,{children:(0,e.jsx)(v,{"data-testid":`agents-thread-status-${n}`,variant:ue(u),children:u??"\u2014"})}),(0,e.jsx)(i,{className:"tabular-nums",children:z(n)===0?(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}):(0,e.jsx)(v,{"data-testid":`agents-thread-queued-${n}`,variant:"warning",children:z(n)})}),(0,e.jsx)(i,{className:"tabular-nums",children:B(r,"messageCount")??"\u2014"}),(0,e.jsx)(i,{className:"tabular-nums text-muted-foreground",children:y??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:F(B(r,"updatedAt"),"\u2014")}),(0,e.jsx)(i,{className:"text-right",children:(0,e.jsx)(C,{"data-testid":`agents-thread-open-${n}`,onClick:d(()=>{m(n)},"onClick"),size:"sm",type:"button",variant:"outline",children:t("Timeline")})})]},n)})})]})})}),te!==null&&(0,e.jsx)(j,{error:ae,shardKey:s,testId:"agents-messages-error"}),a!==void 0&&(0,e.jsx)(K,{className:"overflow-hidden py-0","data-testid":"agents-thread-detail",children:(0,e.jsxs)(S,{className:"flex flex-col gap-3 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t("Timeline")," \xB7 ",a,D!==void 0&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \xB7 ",t("Usage"),": ",O(D)??0," ",t("Tokens")]})]}),(0,e.jsx)(C,{"data-testid":"agents-thread-detail-close",onClick:d(()=>{m(void 0)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Close")})]}),(0,e.jsx)(ge,{fetched:M.length}),R.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:t("This thread has no messages yet.")}):(0,e.jsxs)(I,{"data-testid":"agents-messages-table",children:[(0,e.jsx)(_,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(o,{children:t("Role")}),(0,e.jsx)(o,{children:t("Content")}),(0,e.jsx)(o,{children:t("Tool")}),(0,e.jsx)(o,{children:t("Approval")})]})}),(0,e.jsx)(q,{children:R.map((r,n)=>{let u=c(r,"role")??"\u2014",y=me(r),se=c(r,"toolName"),w=c(r,"status"),A=B(r,"seq")??n;return(0,e.jsxs)(p,{"data-testid":`agents-message-${String(A)}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs align-top text-muted-foreground",children:u}),(0,e.jsx)(i,{className:"max-w-md font-mono text-xs whitespace-pre-wrap break-words",children:c(r,"content")??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs align-top text-muted-foreground",children:se??(y.length>0?y.join(", "):"\u2014")}),(0,e.jsx)(i,{className:"align-top",children:w===void 0?(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"\u2014"}):(0,e.jsx)(v,{"data-testid":`agents-message-approval-${String(A)}`,variant:he(w),children:w})})]},c(r,"messageKey")??`${u}:${String(A)}`)})})]})]})})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-agents-panel",children:[X!==null&&(0,e.jsx)(j,{error:Y,shardKey:s,testId:"agents-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("Agents run as durable workflows. Each run persists a thread of assistant and tool messages; select a thread to inspect its timeline, tool calls, approvals, and token usage.")}),Z!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"agents-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")}),x]})},"Ee");export{Te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as p,c as l}from"./chunk-4KPATTV6.js";import{a as h}from"./chunk-ADABTCDI.js";import{a as t,d as g}from"./chunk-5PEAXTYQ.js";var u=g(h(),1);var a={console:"`",palette:"k"},c="lunora-studio-shortcuts",r=new Set,w=t(o=>{let n=typeof o?.console=="string"?o.console.toLowerCase():void 0,s=typeof o?.palette=="string"?o.palette.toLowerCase():void 0;return n?.length===1&&s?.length===1&&n!==s?{console:n,palette:s}:a},"p"),e=a,m=t(()=>{e=w(p(c)[0]);for(let o of r)o()},"S");m();var y=t(o=>(r.add(o),()=>{r.delete(o)}),"g"),i=t(()=>e,"a"),S=t(()=>(0,u.useSyncExternalStore)(y,i,i),"w"),L=t((o,n)=>{if(n.length!==1)return;let s=n.toLowerCase(),f=o==="console"?"palette":"console";e=e[f]===s?{...e,[o]:s,[f]:e[o]}:{...e,[o]:s},l(c,[e]);for(let d of r)d()},"y"),v=t(()=>{e=a,l(c,[e]);for(let o of r)o()},"C");export{S as a,L as b,v as c};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{a as Pe}from"./chunk-5MIJ3KEK.js";import{a as he}from"./chunk-AWFFXR6S.js";import{a as le}from"./chunk-WDR3BJ2C.js";import{a as V}from"./chunk-KVQ2GMJR.js";import{d as Ie,f as Oe,g as $e,k as ie}from"./chunk-2NUCBQFU.js";import{a as Ce}from"./chunk-RAJ327CY.js";import"./chunk-EDL46BPM.js";import"./chunk-4KPATTV6.js";import{i as we}from"./chunk-V4JKKAAZ.js";import"./chunk-4SY2N2RS.js";import"./chunk-4AG356VE.js";import{a as U}from"./chunk-VGKDC2OQ.js";import"./chunk-SCTYLLJT.js";import"./chunk-OZID3UYF.js";import{a as E}from"./chunk-NQ727GVM.js";import{b as Se}from"./chunk-F2DVDJV6.js";import"./chunk-L27FKJTG.js";import{a as ke}from"./chunk-LYVYUTQY.js";import{n as F}from"./chunk-KQVY73EU.js";import"./chunk-ZPQBVYNN.js";import{B as M,b as be,g as ye,h as oe,i as se,j as ue,p as ve,s as Ne,v as ae,x as fe}from"./chunk-VJQP4ARP.js";import"./chunk-PDBW6GTJ.js";import{a as te}from"./chunk-A6TVTNKO.js";import{a as me,b as re}from"./chunk-ADABTCDI.js";import{a as u,d as L}from"./chunk-5PEAXTYQ.js";var Qe=L(te(),1),xe=L(me(),1);var Y=L(te(),1),X=L(me(),1);var R=L(re(),1);var Xe=oe(ke.listTables),Ye=["react","client","cli"],Ze={action:"action",mutation:"mutation",query:"query"},Te=u(t=>{let e=t.indexOf(":");return e===-1?{file:"",fn:t}:{file:t.slice(0,e),fn:t.slice(e+1)}},"Q"),et=u(({file:t,fn:e,kind:a})=>`await client.${Ze[a]}(api.${t}.${e}, { /* args */ });`,"ae"),tt=u(t=>{let e=`api.${t.file}.${t.fn}`;switch(t.kind){case"action":return`const { call: ${t.fn} } = useAction(${e});`;case"mutation":return`const ${t.fn} = useMutation(${e});`;default:return`const data = useQuery(${e}, { /* args */ });`}},"se"),rt=u(({file:t,fn:e})=>`lunora run ${t}:${e} --args '{ }'`,"oe"),at=u(t=>["// Read rows",`const rows = await ctx.db.query("${t}").collect();`,"","// Insert a row",`const id = await ctx.db.insert("${t}", { /* fields */ });`,"","// Generated types",`type Row = Doc<"${t}">;`,`type RowId = Id<"${t}">;`].join(`
|
|
2
|
+
`),"ce"),nt=u((t,e)=>{switch(t){case"cli":return rt(e);case"client":return et(e);default:return tt(e)}},"re"),Re=u(t=>{let e=(0,Y.c)(19),{code:a,label:r,testId:n}=t,s=M(),o;e[0]!==a?(o=u(()=>{ae(a)},"c"),e[0]=a,e[1]=o):o=e[1];let i=o,c;e[2]!==r?(c=(0,R.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:r}),e[2]=r,e[3]=c):c=e[3];let m=`${n}-copy`,l;e[4]!==s?(l=s("Copy"),e[4]=s,e[5]=l):l=e[5];let p;e[6]!==i||e[7]!==m||e[8]!==l?(p=(0,R.jsx)(U,{"data-testid":m,onClick:i,size:"xs",type:"button",variant:"ghost",children:l}),e[6]=i,e[7]=m,e[8]=l,e[9]=p):p=e[9];let f;e[10]!==c||e[11]!==p?(f=(0,R.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[c,p]}),e[10]=c,e[11]=p,e[12]=f):f=e[12];let h;e[13]!==a||e[14]!==n?(h=(0,R.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":n,children:a}),e[13]=a,e[14]=n,e[15]=h):h=e[15];let g;return e[16]!==f||e[17]!==h?(g=(0,R.jsxs)("div",{className:"flex flex-col gap-1.5",children:[f,h]}),e[16]=f,e[17]=h,e[18]=g):g=e[18],g},"U"),ot=u(t=>{let e=(0,Y.c)(46),{file:a,fn:r,kind:n}=t,s=M(),[o,i]=(0,X.useState)("react"),c,m,l;if(e[0]!==a||e[1]!==r||e[2]!==n||e[3]!==s||e[4]!==o){let w={file:a,fn:r,kind:n},P;e[8]!==s?(P=s("CLI"),e[8]=s,e[9]=P):P=e[9];let O;e[10]!==s?(O=s("Client"),e[10]=s,e[11]=O):O=e[11];let S;e[12]!==s?(S=s("React"),e[12]=s,e[13]=S):S=e[13];let T;e[14]!==P||e[15]!==O||e[16]!==S?(T={cli:P,client:O,react:S},e[14]=P,e[15]=O,e[16]=S,e[17]=T):T=e[17],l=T;let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=u(_=>{i(_.currentTarget.dataset.tab)},"B"),e[18]=A):A=e[18],c=A,m=nt(o,w),e[0]=a,e[1]=r,e[2]=n,e[3]=s,e[4]=o,e[5]=c,e[6]=m,e[7]=l}else c=e[5],m=e[6],l=e[7];let p=m,f=`api.${a}.${r}`,h;e[19]!==f?(h=(0,R.jsx)("h2",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"api-fn-title",children:f}),e[19]=f,e[20]=h):h=e[20];let g;e[21]!==n||e[22]!==s?(g=s("Call this {kind} from your app.",{kind:n}),e[21]=n,e[22]=s,e[23]=g):g=e[23];let x;e[24]!==g?(x=(0,R.jsx)("p",{className:"text-xs text-muted-foreground",children:g}),e[24]=g,e[25]=x):x=e[25];let v;e[26]!==h||e[27]!==x?(v=(0,R.jsxs)("div",{children:[h,x]}),e[26]=h,e[27]=x,e[28]=v):v=e[28];let N;e[29]!==s?(N=s("Snippet flavour"),e[29]=s,e[30]=N):N=e[30];let y;e[31]!==c||e[32]!==o||e[33]!==l?(y=Ye.map(w=>(0,R.jsx)(U,{"aria-selected":o===w,"data-tab":w,"data-testid":`api-tab-${w}`,onClick:c,role:"tab",size:"xs",type:"button",variant:o===w?"default":"outline",children:l[w]},w)),e[31]=c,e[32]=o,e[33]=l,e[34]=y):y=e[34];let b;e[35]!==N||e[36]!==y?(b=(0,R.jsx)("div",{"aria-label":N,className:"flex gap-1.5","data-testid":"api-tabs",role:"tablist",children:y}),e[35]=N,e[36]=y,e[37]=b):b=e[37];let I=l[o],C=`api-snippet-${o}`,$;e[38]!==p||e[39]!==I||e[40]!==C?($=(0,R.jsx)(Re,{code:p,label:I,testId:C}),e[38]=p,e[39]=I,e[40]=C,e[41]=$):$=e[41];let k;return e[42]!==$||e[43]!==v||e[44]!==b?(k=(0,R.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"api-fn-doc",children:[v,b,$]}),e[42]=$,e[43]=v,e[44]=b,e[45]=k):k=e[45],k},"de"),st=u(t=>{let e=(0,Y.c)(19),{name:a}=t,r=M(),n;e[0]!==a?(n=at(a),e[0]=a,e[1]=n):n=e[1];let s=n,o;e[2]!==a?(o=(0,R.jsx)("h2",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"api-table-title",children:a}),e[2]=a,e[3]=o):o=e[3];let i;e[4]!==r?(i=r("Read and write this table through the typed data model."),e[4]=r,e[5]=i):i=e[5];let c;e[6]!==i?(c=(0,R.jsx)("p",{className:"text-xs text-muted-foreground",children:i}),e[6]=i,e[7]=c):c=e[7];let m;e[8]!==o||e[9]!==c?(m=(0,R.jsxs)("div",{children:[o,c]}),e[8]=o,e[9]=c,e[10]=m):m=e[10];let l;e[11]!==r?(l=r("Data model"),e[11]=r,e[12]=l):l=e[12];let p;e[13]!==s||e[14]!==l?(p=(0,R.jsx)(Re,{code:s,label:l,testId:"api-snippet-table"}),e[13]=s,e[14]=l,e[15]=p):p=e[15];let f;return e[16]!==m||e[17]!==p?(f=(0,R.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"api-table-doc",children:[m,p]}),e[16]=m,e[17]=p,e[18]=f):f=e[18],f},"fe"),je=u(t=>{let e=(0,Y.c)(8),{active:a,label:r,onSelect:n,testId:s,value:o}=t,i;e[0]!==n||e[1]!==o?(i=u(()=>{n(o)},"m"),e[0]=n,e[1]=o,e[2]=i):i=e[2];let c=i,m=a?"page":void 0,l;return e[3]!==r||e[4]!==c||e[5]!==m||e[6]!==s?(l=(0,R.jsx)("button",{"aria-current":m,className:"w-full truncate rounded-md px-2 py-1 text-start font-mono text-xs text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground","data-testid":s,onClick:c,type:"button",children:r}),e[3]=r,e[4]=c,e[5]=m,e[6]=s,e[7]=l):l=e[7],l},"G"),it=u(t=>{let e=new Map;for(let a of t){let{file:r,fn:n}=Te(a.path),s=e.get(r)??[];s.push({fn:n,kind:a.kind,path:a.path}),e.set(r,s)}return[...e.entries()].map(([a,r])=>({file:a,items:r.toSorted((n,s)=>n.fn.localeCompare(s.fn))})).toSorted((a,r)=>a.file.localeCompare(r.file))},"pe"),Ae=u(t=>{let e=(0,Y.c)(58),{functions:a,initialShardKey:r}=t,n=M(),s=F(),[o,i]=(0,X.useState)(null),[c,m]=(0,X.useState)(null),l,p;e[0]!==s||e[1]!==r?(l=u(()=>{let _=!1;return s.query(Xe,{},se(r??"")).then(j=>(_||i(j),j)).catch(()=>{_||i([])}),()=>{_=!0}},"o"),p=[s,r],e[0]=s,e[1]=r,e[2]=l,e[3]=p):(l=e[2],p=e[3]),(0,X.useEffect)(l,p);let f,h,g,x,v,N,y,b,I,C;if(e[4]!==a||e[5]!==c||e[6]!==n||e[7]!==o){let _=a??[],j=it(_),q=(o??[]).map(lt).toSorted(dt),J;e[18]===Symbol.for("react.memo_cache_sentinel")?(J=u(K=>{m({kind:"fn",path:K})},"P"),e[18]=J):J=e[18];let W=J,Q;e[19]===Symbol.for("react.memo_cache_sentinel")?(Q=u(K=>{m({kind:"table",name:K})},"j"),e[19]=Q):Q=e[19];let Ve=Q;h=c?.kind==="fn"?_.find(K=>K.path===c.path):void 0,f=_.length>0||q.length>0,g=h===void 0?void 0:Te(h.path),I="grid min-h-0 gap-6 md:grid-cols-[16rem_minmax(0,1fr)]",C="lunora-api-docs",e[20]!==n?(x=n("API resources"),e[20]=n,e[21]=x):x=e[21],v="flex flex-col gap-4 overflow-y-auto",N="api-rail";let ne;e[22]!==c||e[23]!==n?(ne=u(K=>(0,R.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,R.jsx)("span",{className:"px-2 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:K.file||n("(root)")}),K.items.map(ee=>(0,R.jsx)(je,{active:c?.kind==="fn"&&c.path===ee.path,label:ee.fn,onSelect:W,testId:`api-rail-fn-${ee.path}`,value:ee.path},ee.path))]},K.file),"q"),e[22]=c,e[23]=n,e[24]=ne):ne=e[24],y=j.map(ne),b=q.length>0&&(0,R.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,R.jsx)("span",{className:"px-2 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n("Tables")}),q.map(K=>(0,R.jsx)(je,{active:c?.kind==="table"&&c.name===K,label:K,onSelect:Ve,testId:`api-rail-table-${K}`,value:K},K))]}),e[4]=a,e[5]=c,e[6]=n,e[7]=o,e[8]=f,e[9]=h,e[10]=g,e[11]=x,e[12]=v,e[13]=N,e[14]=y,e[15]=b,e[16]=I,e[17]=C}else f=e[8],h=e[9],g=e[10],x=e[11],v=e[12],N=e[13],y=e[14],b=e[15],I=e[16],C=e[17];let $;e[25]!==f||e[26]!==n?($=!f&&(0,R.jsx)("p",{className:"px-2 text-xs text-muted-foreground","data-testid":"api-rail-empty",children:n("No functions or tables to document yet.")}),e[25]=f,e[26]=n,e[27]=$):$=e[27];let k;e[28]!==$||e[29]!==x||e[30]!==v||e[31]!==N||e[32]!==y||e[33]!==b?(k=(0,R.jsxs)("nav",{"aria-label":x,className:v,"data-testid":N,children:[y,b,$]}),e[28]=$,e[29]=x,e[30]=v,e[31]=N,e[32]=y,e[33]=b,e[34]=k):k=e[34];let w;e[35]!==c||e[36]!==n?(w=c===null&&(0,R.jsx)(E,{description:n("Select a function or table to see how to call it from your app."),testId:"api-empty",title:n("API usage snippets")}),e[35]=c,e[36]=n,e[37]=w):w=e[37];let P;e[38]!==c?.kind||e[39]!==h||e[40]!==g?(P=c?.kind==="fn"&&h!==void 0&&g!==void 0&&(0,R.jsx)(ot,{file:g.file,fn:g.fn,kind:h.kind},h.path),e[38]=c?.kind,e[39]=h,e[40]=g,e[41]=P):P=e[41];let O;e[42]!==c?.kind||e[43]!==h||e[44]!==n?(O=c?.kind==="fn"&&h===void 0&&(0,R.jsx)(E,{testId:"api-empty",title:n("API usage snippets")}),e[42]=c?.kind,e[43]=h,e[44]=n,e[45]=O):O=e[45];let S;e[46]!==c?(S=c?.kind==="table"&&(0,R.jsx)(st,{name:c.name}),e[46]=c,e[47]=S):S=e[47];let T;e[48]!==w||e[49]!==P||e[50]!==O||e[51]!==S?(T=(0,R.jsxs)("div",{className:"min-w-0",children:[w,P,O,S]}),e[48]=w,e[49]=P,e[50]=O,e[51]=S,e[52]=T):T=e[52];let A;return e[53]!==k||e[54]!==T||e[55]!==I||e[56]!==C?(A=(0,R.jsxs)("div",{className:I,"data-testid":C,children:[k,T]}),e[53]=k,e[54]=T,e[55]=I,e[56]=C,e[57]=A):A=e[57],A},"ke");function lt(t){return t.name}u(lt,"ue");function dt(t,e){return t.localeCompare(e)}u(dt,"me");var We=L(te(),1);var B=L(te(),1);var z=L(me(),1);var d=L(re(),1);var ct=u(t=>typeof t=="number"?"number":typeof t=="boolean"?"boolean":"string","we"),Me=u(t=>{if(t.enum!==void 0&&t.enum.length>0)return t.enum;if(t.anyOf!==void 0&&t.anyOf.length>0&&t.anyOf.every(e=>e.const!==void 0))return t.anyOf.map(e=>e.const)},"Q"),ce=u(t=>t===void 0?"any":t.const!==void 0?JSON.stringify(t.const):t.enum!==void 0&&t.enum.length>0?t.enum.map(e=>JSON.stringify(e)).join(" | "):t.anyOf!==void 0&&t.anyOf.length>0?t.anyOf.map(e=>ce(e)).join(" | "):t.type==="array"?`array<${ce(t.items)}>`:t.type??"any","z"),pt=u(t=>{let e=Me(t);return e!==void 0?t.type??ct(e[0]):ce(t)},"ke"),mt=u(t=>{let e=Me(t);return e===void 0?void 0:e.map(a=>JSON.stringify(a)).join(" | ")},"Oe"),ut=u(t=>{let e=[];t.minimum!==void 0?e.push(`${String(t.minimum)} \u2264`):t.exclusiveMinimum!==void 0&&e.push(`${String(t.exclusiveMinimum)} <`);let a=e.length>0;e.push("value"),t.maximum!==void 0?e.push(`\u2264 ${String(t.maximum)}`):t.exclusiveMaximum!==void 0&&e.push(`< ${String(t.exclusiveMaximum)}`);let r=e.length>(a?2:1);return a||r?e.join(" "):void 0},"$e"),ft=u(t=>{if(t.type==="object"&&t.properties!==void 0)return t;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties!==void 0)return t.items},"Te"),Z=u(t=>{if(t===void 0)return null;if(t.const!==void 0)return t.const;if(t.enum!==void 0&&t.enum.length>0)return t.enum[0];if(t.anyOf!==void 0&&t.anyOf.length>0)return Z(t.anyOf[0]);switch(t.type){case"array":return[];case"boolean":return!1;case"number":return 0;case"object":{let e={};for(let[a,r]of Object.entries(t.properties??{}))e[a]=Z(r);return e}case"string":return"";default:return null}},"D"),de=u(t=>{let e=(0,B.c)(7),{label:a,value:r}=t,n;e[0]!==a?(n=(0,d.jsx)("span",{className:"text-muted-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let s;e[2]!==r?(s=(0,d.jsx)("span",{className:"text-foreground",children:r}),e[2]=r,e[3]=s):s=e[3];let o;return e[4]!==n||e[5]!==s?(o=(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 font-mono text-[10px]",children:[n,s]}),e[4]=n,e[5]=s,e[6]=o):o=e[6],o},"K"),ht=u(t=>{let e=(0,B.c)(40),{name:a,required:r,schema:n}=t,s=M(),o;e[0]!==n?(o=ut(n),e[0]=n,e[1]=o):o=e[1];let i=o,c;e[2]!==n?(c=mt(n),e[2]=n,e[3]=c):c=e[3];let m=c,l=n["x-lunora-table"],p=n.format!==void 0||i!==void 0||m!==void 0||l!==void 0,f;e[4]!==n?(f=ft(n),e[4]=n,e[5]=f):f=e[5];let h=f,g=r?"*":"?",x;e[6]!==g?(x=(0,d.jsx)("span",{className:"text-muted-foreground",children:g}),e[6]=g,e[7]=x):x=e[7];let v;e[8]!==a||e[9]!==x?(v=(0,d.jsxs)("span",{className:"font-mono text-foreground",children:[a,x]}),e[8]=a,e[9]=x,e[10]=v):v=e[10];let N;e[11]!==n?(N=pt(n),e[11]=n,e[12]=N):N=e[12];let y;e[13]!==N?(y=(0,d.jsx)("span",{className:"font-mono text-muted-foreground",children:N}),e[13]=N,e[14]=y):y=e[14];let b;e[15]!==v||e[16]!==y?(b=(0,d.jsxs)("div",{className:"flex items-baseline gap-2",children:[v,y]}),e[15]=v,e[16]=y,e[17]=b):b=e[17];let I;e[18]!==n.description?(I=n.description!==void 0&&(0,d.jsx)("p",{className:"max-w-prose text-muted-foreground",children:n.description}),e[18]=n.description,e[19]=I):I=e[19];let C;e[20]!==p||e[21]!==i||e[22]!==l||e[23]!==n.format||e[24]!==s||e[25]!==m?(C=p&&(0,d.jsxs)("div",{className:"flex flex-wrap gap-1",children:[n.format!==void 0&&(0,d.jsx)(de,{label:s("Format"),value:n.format}),i!==void 0&&(0,d.jsx)(de,{label:s("Range"),value:i}),m!==void 0&&(0,d.jsx)(de,{label:s("Value in"),value:m}),l!==void 0&&(0,d.jsx)(de,{label:s("relation"),value:l})]}),e[20]=p,e[21]=i,e[22]=l,e[23]=n.format,e[24]=s,e[25]=m,e[26]=C):C=e[26];let $;e[27]!==I||e[28]!==C||e[29]!==b?($=(0,d.jsxs)("div",{className:"flex flex-col gap-1 py-2",children:[b,I,C]}),e[27]=I,e[28]=C,e[29]=b,e[30]=$):$=e[30];let k=$;if(h===void 0){let S;return e[31]!==k?(S=(0,d.jsx)("div",{className:"border-b border-border/50 last:border-b-0",children:k}),e[31]=k,e[32]=S):S=e[32],S}let w;e[33]!==k?(w=(0,d.jsx)("summary",{className:"cursor-pointer marker:text-muted-foreground",children:k}),e[33]=k,e[34]=w):w=e[34];let P;e[35]!==h?(P=(0,d.jsx)("div",{className:"mb-2 ml-2 border-l border-border pl-3",children:(0,d.jsx)(qe,{schema:h})}),e[35]=h,e[36]=P):P=e[36];let O;return e[37]!==w||e[38]!==P?(O=(0,d.jsxs)("details",{className:"border-b border-border/50 last:border-b-0",children:[w,P]}),e[37]=w,e[38]=P,e[39]=O):O=e[39],O},"Ce"),qe=u(t=>{let e=(0,B.c)(7),{schema:a}=t,r;e[0]!==a.required?(r=new Set(a.required),e[0]=a.required,e[1]=r):r=e[1];let n=r,s;e[2]!==a.properties?(s=Object.entries(a.properties??{}),e[2]=a.properties,e[3]=s):s=e[3];let o=s,i;return e[4]!==n||e[5]!==o?(i=(0,d.jsx)("div",{className:"flex flex-col",children:o.map(c=>{let[m,l]=c;return(0,d.jsx)(ht,{name:m,required:n.has(m),schema:l},m)})}),e[4]=n,e[5]=o,e[6]=i):i=e[6],i},"Z"),_e=u(t=>{let e=(0,B.c)(10),{schema:a,testId:r}=t;if(a?.type!=="object"||Object.keys(a.properties??{}).length===0){let o;e[0]!==a?(o=ce(a),e[0]=a,e[1]=o):o=e[1];let i;return e[2]!==o||e[3]!==r?(i=(0,d.jsx)("p",{className:"font-mono text-xs text-muted-foreground","data-testid":r,children:o}),e[2]=o,e[3]=r,e[4]=i):i=e[4],i}let n;e[5]!==a?(n=(0,d.jsx)(qe,{schema:a}),e[5]=a,e[6]=n):n=e[6];let s;return e[7]!==n||e[8]!==r?(s=(0,d.jsx)("div",{className:"text-xs","data-testid":r,children:n}),e[7]=n,e[8]=r,e[9]=s):s=e[9],s},"V"),gt=["curl","javascript","lunora"],xt={lunora:"Lunora",curl:"cURL",javascript:"JavaScript"},bt=u(t=>`api.${t.replaceAll(/[/:]/g,".")}`,"Ae"),yt=u(t=>{let e=Z(t.argsSchema)??{};return t.functionPath===void 0?e:{args:e,functionPath:t.functionPath}},"je"),vt=u((t,e,a)=>{let r=`${a}${e.httpPath}`,n=JSON.stringify(yt(e),void 0,2),s=JSON.stringify(Z(e.argsSchema)??{},void 0,2);switch(t){case"curl":{let o=e.method!=="GET"&&e.method!=="HEAD",i=[`curl -X ${e.method} ${JSON.stringify(r)}`];return o&&i.push(' -H "Content-Type: application/json"',` -d '${n}'`),i.join(` \\
|
|
3
|
+
`)}case"lunora":return e.functionPath===void 0?`await fetch(${JSON.stringify(e.httpPath)}, { method: ${JSON.stringify(e.method)} });`:`import { useLunora } from "@lunora/react";
|
|
4
|
+
import { api } from "./_generated/api";
|
|
5
|
+
|
|
6
|
+
const client = useLunora();
|
|
7
|
+
await client.${e.kind??"query"}(${bt(e.functionPath)}, ${s});`;default:{let o=e.method!=="GET"&&e.method!=="HEAD"?`{
|
|
8
|
+
method: ${JSON.stringify(e.method)},
|
|
9
|
+
headers: { "Content-Type": "application/json" },
|
|
10
|
+
body: JSON.stringify(${n}),
|
|
11
|
+
}`:`{ method: ${JSON.stringify(e.method)} }`;return`const response = await fetch(${JSON.stringify(r)}, ${o});
|
|
12
|
+
const data = await response.json();`}}},"Ie"),Nt=u(t=>{let e=(0,B.c)(24),{operation:a,server:r}=t,n=M(),[s,o]=(0,z.useState)("curl"),i;e[0]!==a||e[1]!==s||e[2]!==r?(i=vt(s,a,r),e[0]=a,e[1]=s,e[2]=r,e[3]=i):i=e[3];let c=i,m;e[4]!==c?(m=u(()=>{ae(c)},"d"),e[4]=c,e[5]=m):m=e[5];let l=m,p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=u(I=>{o(I.currentTarget.dataset.sample)},"u"),e[6]=p):p=e[6];let f=p,h;e[7]!==s?(h=gt.map(I=>(0,d.jsx)("button",{"aria-selected":s===I,className:"rounded px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:text-foreground aria-selected:bg-muted aria-selected:font-medium aria-selected:text-foreground","data-sample":I,"data-testid":`api-sample-${I}`,onClick:f,role:"tab",type:"button",children:xt[I]},I)),e[7]=s,e[8]=h):h=e[8];let g;e[9]!==h?(g=(0,d.jsx)("div",{className:"flex gap-1",role:"tablist",children:h}),e[9]=h,e[10]=g):g=e[10];let x;e[11]!==n?(x=n("Copy"),e[11]=n,e[12]=x):x=e[12];let v;e[13]!==l||e[14]!==x?(v=(0,d.jsx)(U,{"data-testid":"api-sample-copy",onClick:l,size:"xs",type:"button",variant:"ghost",children:x}),e[13]=l,e[14]=x,e[15]=v):v=e[15];let N;e[16]!==g||e[17]!==v?(N=(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-2",children:[g,v]}),e[16]=g,e[17]=v,e[18]=N):N=e[18];let y;e[19]!==c?(y=(0,d.jsx)("pre",{className:"overflow-auto px-3 pb-3 font-mono text-xs","data-testid":"api-sample-source",children:c}),e[19]=c,e[20]=y):y=e[20];let b;return e[21]!==N||e[22]!==y?(b=(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card","data-testid":"api-code-samples",children:[N,y]}),e[21]=N,e[22]=y,e[23]=b):b=e[23],b},"Pe"),kt={blue:"text-info",emerald:"text-success",neutral:"text-muted-foreground",orange:"text-warning",red:"text-destructive",violet:"text-royal-amethyst"},wt=u(t=>{switch(t.toUpperCase()){case"DELETE":return"red";case"GET":return"emerald";case"PATCH":return"orange";case"POST":return"blue";case"PUT":return"orange";default:return"neutral"}},"_e"),St=u(t=>{switch(t){case"action":return"violet";case"mutation":return"orange";case"query":return"emerald";default:return"neutral"}},"Be"),ge=u(t=>{let e=(0,B.c)(7),{kind:a,method:r,testId:n}=t,s;e[0]!==a||e[1]!==r?(s=a??r.toUpperCase(),e[0]=a,e[1]=r,e[2]=s):s=e[2];let o=s,i=a===void 0?wt(r):St(a),c=`${kt[i]} font-mono text-[10px] tracking-wide uppercase`,m;return e[3]!==o||e[4]!==c||e[5]!==n?(m=(0,d.jsx)(Se,{className:c,"data-testid":n,variant:"ghost",children:o}),e[3]=o,e[4]=c,e[5]=n,e[6]=m):m=e[6],m},"q"),Ke=u(t=>t.startsWith("2")?"text-emerald-600 dark:text-emerald-400":t==="default"||t.startsWith("4")||t.startsWith("5")?"text-red-600 dark:text-red-400":"text-muted-foreground","ee"),ze=u(t=>t.startsWith("2")?"bg-emerald-500":t==="default"||t.startsWith("4")||t.startsWith("5")?"bg-red-500":"bg-muted-foreground","te"),It=new Set([" ",`
|
|
13
|
+
`,"\r"]),Je=" ",Ot=u(t=>{let e="";for(let n of t)It.has(n)||(e+=n);let a=0,r=e.length;for(;a<r&&(e[a]??"")<=Je;)a+=1;for(;r>a&&(e[r-1]??"")<=Je;)r-=1;return e.slice(a,r)},"Je"),$t=/^(?:[a-z][\d+.a-z-]*:)?\/\//i,Ct=u((t,e)=>{let a=globalThis.location?.origin??"",r=e===""?a:e,n=Ot(t);if(r===""){if($t.test(n))throw new Error(`restDispatch: refusing to send the admin token off-origin (${n} names its own host and there is no origin to check it against)`);return n}let s=new URL(n,r);if(s.origin!==new URL(r).origin)throw new Error(`restDispatch: refusing to send the admin token off-origin (${s.origin} is not ${r})`);return s.toString()},"Ke"),Pt=u(async(t,e,a,r)=>{let n=t.method!=="GET"&&t.method!=="HEAD",s=Ct(t.httpPath,a),o=await(await fetch(s,{body:n?JSON.stringify(e):void 0,headers:{...n?{"content-type":"application/json"}:{},...r===null||r===""?{}:{authorization:`Bearer ${r}`}},method:t.method})).text();try{return JSON.parse(o)}catch{return o}},"ze"),jt=u(t=>JSON.stringify(Z(t.argsSchema)??{},void 0,2),"Fe"),Le=(0,z.createContext)(null),Be=u(()=>{let t=(0,z.use)(Le);if(t===null)throw new be("INTERNAL","useOperationRun must be used within an OperationRunProvider");return t},"se"),Tt=u(({children:t,operation:e})=>{let a=M(),r=F(),[n,s]=(0,z.useState)(()=>jt(e)),[o,i]=(0,z.useState)(""),[c,m]=(0,z.useState)("idle"),[l,p]=(0,z.useState)(void 0),[f,h]=(0,z.useState)(null),[g,x]=(0,z.useState)(null),v=u(async()=>{let N;try{N=n.trim()===""?{}:JSON.parse(n)}catch(b){m("error"),p(void 0),x(null),h(a("Invalid JSON args: {message}",{message:ue(b)}));return}m("running"),h(null);let y=performance.now();try{let b=await(e.functionPath===void 0?Pt(e,N,r.url,r.getAuthToken()):ye(r,e.kind,oe(e.functionPath),N,se(o)));p(b),x(Math.round(performance.now()-y)),m("success")}catch(b){p(void 0),x(Math.round(performance.now()-y)),h(ue(b)),m("error")}},"v");return(0,d.jsx)(Le,{value:{argsText:n,durationMs:g,error:f,operation:e,response:l,send:u(()=>{Ne(v())},"send"),setArgsText:s,setShardKey:i,shardKey:o,status:c},children:t})},"We"),Rt=u(()=>{let t=(0,B.c)(48),e=M(),{argsText:a,operation:r,send:n,setArgsText:s,setShardKey:o,shardKey:i,status:c}=Be(),m;t[0]!==s?(m=u(j=>{s(j.target.value)},"d"),t[0]=s,t[1]=m):m=t[1];let l=m,p;t[2]!==n?(p=u(j=>{j.key==="Enter"&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),n())},"u"),t[2]=n,t[3]=p):p=t[3];let f=p,h=c==="running",g;t[4]!==r.kind||t[5]!==r.method?(g=(0,d.jsx)(ge,{kind:r.kind,method:r.method,testId:"api-try-method"}),t[4]=r.kind,t[5]=r.method,t[6]=g):g=t[6];let x=r.functionPath??r.httpPath,v;t[7]!==x?(v=(0,d.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",children:x}),t[7]=x,t[8]=v):v=t[8];let N=h?"animate-pulse":void 0,y;t[9]!==N?(y=(0,d.jsx)(ie,{className:N,icon:$e,strokeWidth:2}),t[9]=N,t[10]=y):y=t[10];let b;t[11]!==h||t[12]!==e?(b=e(h?"Sending\u2026":"Send"),t[11]=h,t[12]=e,t[13]=b):b=t[13];let I;t[14]!==h||t[15]!==n||t[16]!==y||t[17]!==b?(I=(0,d.jsxs)(U,{"data-testid":"api-try-send",disabled:h,onClick:n,size:"sm",type:"button",children:[y,b]}),t[14]=h,t[15]=n,t[16]=y,t[17]=b,t[18]=I):I=t[18];let C;t[19]!==g||t[20]!==v||t[21]!==I?(C=(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border bg-muted px-3 py-2",children:[g,v,I]}),t[19]=g,t[20]=v,t[21]=I,t[22]=C):C=t[22];let $;t[23]!==e?($=e("Arguments (JSON)"),t[23]=e,t[24]=$):$=t[24];let k;t[25]!==$?(k=(0,d.jsx)(he,{htmlFor:"api-try-args",children:$}),t[25]=$,t[26]=k):k=t[26];let w;t[27]!==a?(w=a.split(`
|
|
14
|
+
`),t[27]=a,t[28]=w):w=t[28];let P=Math.min(12,Math.max(3,w.length)),O;t[29]!==a||t[30]!==l||t[31]!==f||t[32]!==P?(O=(0,d.jsx)(Pe,{className:"font-mono text-xs","data-testid":"api-try-args",id:"api-try-args",onChange:l,onKeyDown:f,rows:P,spellCheck:!1,value:a}),t[29]=a,t[30]=l,t[31]=f,t[32]=P,t[33]=O):O=t[33];let S;t[34]!==k||t[35]!==O?(S=(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[k,O]}),t[34]=k,t[35]=O,t[36]=S):S=t[36];let T;t[37]!==r.functionPath||t[38]!==o||t[39]!==i||t[40]!==e?(T=r.functionPath!==void 0&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsx)(he,{htmlFor:"shard-input",children:e("Shard key (optional)")}),(0,d.jsx)(Ce,{id:"shard-input",onChange:o,testId:"shard-input",value:i})]}),t[37]=r.functionPath,t[38]=o,t[39]=i,t[40]=e,t[41]=T):T=t[41];let A;t[42]!==S||t[43]!==T?(A=(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-3",children:[S,T]}),t[42]=S,t[43]=T,t[44]=A):A=t[44];let _;return t[45]!==A||t[46]!==C?(_=(0,d.jsxs)("div",{className:"overflow-hidden rounded-xl border border-border bg-card","data-testid":"api-try-it",children:[C,A]}),t[45]=A,t[46]=C,t[47]=_):_=t[47],_},"qe"),At=u(t=>{let e=(0,B.c)(51),{operation:a}=t,r=M(),n=`api-operation-${a.operationId}`,s=a.key,o;e[0]!==a.kind||e[1]!==a.method?(o=(0,d.jsx)(ge,{kind:a.kind,method:a.method,testId:"api-operation-method"}),e[0]=a.kind,e[1]=a.method,e[2]=o):o=e[2];let i=a.functionPath??a.httpPath,c;e[3]!==i?(c=(0,d.jsx)("code",{className:"truncate font-mono text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=c):c=e[4];let m;e[5]!==o||e[6]!==c?(m=(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[o,c]}),e[5]=o,e[6]=c,e[7]=m):m=e[7];let l;e[8]!==a.title?(l=(0,d.jsx)("h1",{className:"text-lg font-semibold text-foreground","data-testid":"api-operation-title",children:a.title}),e[8]=a.title,e[9]=l):l=e[9];let p;e[10]!==a.description?(p=a.description!==void 0&&(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:a.description}),e[10]=a.description,e[11]=p):p=e[11];let f;e[12]!==m||e[13]!==l||e[14]!==p?(f=(0,d.jsxs)("header",{className:"sticky top-0 z-10 -mx-6 -mt-6 flex flex-col gap-2 border-b border-border bg-background px-6 pt-6 pb-3",children:[m,l,p]}),e[12]=m,e[13]=l,e[14]=p,e[15]=f):f=e[15];let h;e[16]!==r?(h=r("Try it"),e[16]=r,e[17]=h):h=e[17];let g;e[18]!==h?(g=(0,d.jsx)("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:h}),e[18]=h,e[19]=g):g=e[19];let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=(0,d.jsx)(Rt,{}),e[20]=x):x=e[20];let v;e[21]!==g?(v=(0,d.jsxs)("section",{className:"flex flex-col gap-2",children:[g,x]}),e[21]=g,e[22]=v):v=e[22];let N;e[23]!==r?(N=r("Request arguments"),e[23]=r,e[24]=N):N=e[24];let y;e[25]!==N?(y=(0,d.jsx)("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:N}),e[25]=N,e[26]=y):y=e[26];let b;e[27]!==a.argsSchema?(b=(0,d.jsx)(_e,{schema:a.argsSchema,testId:"api-operation-args"}),e[27]=a.argsSchema,e[28]=b):b=e[28];let I;e[29]!==y||e[30]!==b?(I=(0,d.jsxs)("section",{className:"flex flex-col gap-2",children:[y,b]}),e[29]=y,e[30]=b,e[31]=I):I=e[31];let C;e[32]!==r?(C=r("Response body"),e[32]=r,e[33]=C):C=e[33];let $;e[34]!==C?($=(0,d.jsx)("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:C}),e[34]=C,e[35]=$):$=e[35];let k;if(e[36]!==a.responses||e[37]!==r){let O;e[39]!==r?(O=u(S=>(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-xl border border-border bg-card p-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("span",{className:`inline-flex items-center gap-1.5 font-mono text-xs font-semibold ${Ke(S.status)}`,children:[(0,d.jsx)("span",{className:`size-1.5 rounded-full ${ze(S.status)}`}),S.status]}),S.schema!==void 0&&(0,d.jsx)("span",{className:"rounded border border-border px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:r("application/json")})]}),S.description!==void 0&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:S.description}),S.schema!==void 0&&(0,d.jsx)(_e,{schema:S.schema,testId:`api-response-${S.status}`})]},S.status),"C"),e[39]=r,e[40]=O):O=e[40],k=a.responses.map(O),e[36]=a.responses,e[37]=r,e[38]=k}else k=e[38];let w;e[41]!==$||e[42]!==k?(w=(0,d.jsxs)("section",{className:"flex flex-col gap-3",children:[$,k]}),e[41]=$,e[42]=k,e[43]=w):w=e[43];let P;return e[44]!==a.key||e[45]!==n||e[46]!==v||e[47]!==I||e[48]!==w||e[49]!==f?(P=(0,d.jsxs)("div",{className:"flex flex-col gap-6 duration-200 animate-in fade-in-0 slide-in-from-bottom-1","data-testid":n,children:[f,v,I,w]},s),e[44]=a.key,e[45]=n,e[46]=v,e[47]=I,e[48]=w,e[49]=f,e[50]=P):P=e[50],P},"He"),_t={boolean:"text-royal-amethyst",key:"text-sky-sapphire",number:"text-warning",plain:"",string:"text-success"},Jt=/"(?:[^"\\]|\\.)*"|\b(?:true|false|null)\b|-?\d+(?:\.\d+)?/g,Mt=/^\s*:/,qt=u((t,e,a)=>a.startsWith('"')?Mt.test(t.slice(e))?"key":"string":a==="true"||a==="false"||a==="null"?"boolean":"number","Xe"),Kt=u(t=>{let e=[],a=0;for(let r of t.matchAll(Jt)){let{index:n}=r,s=r[0],o=n+s.length;n>a&&e.push({kind:"plain",start:a,text:t.slice(a,n)}),e.push({kind:qt(t,o,s),start:n,text:s}),a=o}return a<t.length&&e.push({kind:"plain",start:a,text:t.slice(a)}),e},"Ye"),zt=u(t=>{let e=(0,B.c)(4),{code:a}=t,r;e[0]!==a?(r=Kt(a).map(Lt),e[0]=a,e[1]=r):r=e[1];let n;return e[2]!==r?(n=(0,d.jsx)(d.Fragment,{children:r}),e[2]=r,e[3]=n):n=e[3],n},"Qe");function Lt(t){return(0,d.jsx)("span",{className:_t[t.kind],children:t.text},t.start)}u(Lt,"Ze");var De="__live__",Bt=u(t=>t.schema===void 0?"":JSON.stringify(Z(t.schema),void 0,2),"et"),Dt=u((t,e,a)=>a?t??"":e===void 0?"":JSON.stringify(e,ve,2),"tt"),Wt=u(t=>{let e=(0,B.c)(18),{active:a,running:r,showError:n}=t,s=M();if(r){let p;e[0]!==s?(p=s("Sending\u2026"),e[0]=s,e[1]=p):p=e[1];let f;return e[2]!==p?(f=(0,d.jsx)("p",{className:"px-3 py-3 text-xs text-muted-foreground","data-testid":"api-response-running",children:p}),e[2]=p,e[3]=f):f=e[3],f}if(a===void 0||a.body===""){let p;e[4]!==a?.live||e[5]!==s?(p=a?.live===!0?s("Send a request to see the response."):s("No example for this response."),e[4]=a?.live,e[5]=s,e[6]=p):p=e[6];let f;return e[7]!==p?(f=(0,d.jsx)("p",{className:"px-3 py-3 text-xs text-muted-foreground","data-testid":"api-response-idle",children:p}),e[7]=p,e[8]=f):f=e[8],f}let o=n&&"text-destructive",i;e[9]!==o?(i=fe("max-h-[28rem] overflow-auto px-3 py-3 font-mono text-xs",o),e[9]=o,e[10]=i):i=e[10];let c=n?"api-response-error":"api-response-body",m;e[11]!==a.body||e[12]!==n?(m=n?a.body:(0,d.jsx)(zt,{code:a.body}),e[11]=a.body,e[12]=n,e[13]=m):m=e[13];let l;return e[14]!==i||e[15]!==c||e[16]!==m?(l=(0,d.jsx)("pre",{className:i,"data-testid":c,children:m}),e[14]=i,e[15]=c,e[16]=m,e[17]=l):l=e[17],l},"rt"),Ut=u(({durationMs:t,error:e,failed:a,operation:r,ran:n,response:s,t:o})=>{let i=r.responses.map(c=>({body:Bt(c),durationMs:null,id:c.status,label:c.status,live:!1,status:c.status}));return n?[{body:Dt(e,s,a),durationMs:t,id:De,label:o("Live"),live:!0,status:a?"error":"200"},...i]:i},"st"),Et=u(()=>{let t=(0,B.c)(19),e=M(),{durationMs:a,error:r,operation:n,response:s,status:o}=Be(),i=o==="running",c=o==="error",m=o==="success"||c,l=Ut({durationMs:a,error:r,failed:c,operation:n,ran:m,response:s,t:e}),p=m?De:l.find(Ft)?.id??l[0]?.id??"",[f,h]=(0,z.useState)(null),g=l.find(j=>j.id===(f??p))??l[0],x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=u(j=>{let{id:q}=j.currentTarget.dataset;q!==void 0&&h(q)},"m"),t[0]=x):x=t[0];let v=x,N=u(()=>{g!==void 0&&ae(g.body)},"w"),y=g?.live===!0?g.durationMs:null,b=g?.live===!0&&g.status==="error",I="flex min-h-0 flex-col rounded-xl border border-border bg-card",C="api-response-panel",$;t[1]!==e?($=e("Response"),t[1]=e,t[2]=$):$=t[2];let k;t[3]!==$?(k=(0,d.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:$}),t[3]=$,t[4]=k):k=t[4];let w=y!==null&&(0,d.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:e("{ms} ms",{ms:y})}),P=g!==void 0&&g.body!==""&&(0,d.jsx)(U,{"aria-label":e("Copy"),"data-testid":"api-response-copy",onClick:N,size:"icon-xs",type:"button",variant:"ghost",children:(0,d.jsx)(ie,{icon:Ie,strokeWidth:2})}),O;t[5]!==w||t[6]!==P?(O=(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[w,P]}),t[5]=w,t[6]=P,t[7]=O):O=t[7];let S;t[8]!==k||t[9]!==O?(S=(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-2",children:[k,O]}),t[8]=k,t[9]=O,t[10]=S):S=t[10];let T=l.length>0&&(0,d.jsx)("div",{className:"flex gap-1 overflow-x-auto border-b border-border px-2 py-1.5",role:"tablist",children:l.map(j=>{let q=j.id===g?.id;return(0,d.jsxs)("button",{"aria-selected":q,className:fe("inline-flex items-center gap-1.5 rounded px-2 py-0.5 font-mono text-xs transition-colors hover:text-foreground aria-selected:bg-muted aria-selected:font-medium",q?Ke(j.status):"text-muted-foreground"),"data-id":j.id,"data-testid":j.live?"api-response-tab-live":`api-response-tab-${j.status}`,onClick:v,role:"tab",type:"button",children:[(0,d.jsx)("span",{className:`size-1.5 rounded-full ${ze(j.status)}`}),j.label]},j.id)})}),A;t[11]!==g||t[12]!==i||t[13]!==b?(A=(0,d.jsx)(Wt,{active:g,running:i,showError:b}),t[11]=g,t[12]=i,t[13]=b,t[14]=A):A=t[14];let _;return t[15]!==A||t[16]!==S||t[17]!==T?(_=(0,d.jsxs)("div",{className:I,"data-testid":C,children:[S,T,A]}),t[15]=A,t[16]=S,t[17]=T,t[18]=_):_=t[18],_},"nt");function Ft(t){return t.status.startsWith("2")}u(Ft,"ot");var Ht=u((t,e)=>{let a=e.trim().toLowerCase();return a===""?t:t.map(r=>({...r,operations:r.operations.filter(n=>`${n.summary} ${n.operationId}`.toLowerCase().includes(a))})).filter(r=>r.operations.length>0)},"it"),pe=u(t=>{let e=(0,B.c)(53),{model:a}=t,r=M(),n=a.groups[0]?.operations[0]?.key??"",[s,o]=(0,z.useState)(n),[i,c]=(0,z.useState)(""),m;e[0]!==n||e[1]!==a.operationByKey||e[2]!==s?(m=a.operationByKey.get(s)??a.operationByKey.get(n),e[0]=n,e[1]=a.operationByKey,e[2]=s,e[3]=m):m=e[3];let l=m,p,f,h,g,x,v,N,y,b,I;if(e[4]!==i||e[5]!==a.groups||e[6]!==a.server||e[7]!==l?.key||e[8]!==r){p=Ht(a.groups,i);let O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=u(J=>{let{key:W}=J.currentTarget.dataset;W!==void 0&&o(W)},"C"),e[19]=O):O=e[19];let S=O,T;e[20]===Symbol.for("react.memo_cache_sentinel")?(T=u(J=>{c(J.target.value)},"A"),e[20]=T):T=e[20];let A=T;f=a.server??"",b="grid min-h-0 flex-1 grid-cols-1 overflow-hidden lg:grid-cols-[16rem_minmax(0,1fr)_22rem]",I="api-reference",e[21]!==r?(x=r("API operations"),e[21]=r,e[22]=x):x=e[22],v="flex min-h-0 flex-col overflow-y-auto border-r border-border",N="api-reference-nav";let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=(0,d.jsx)(ie,{className:"pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-muted-foreground",icon:Oe,strokeWidth:2}),e[23]=_):_=e[23];let j;e[24]!==r?(j=r("Filter operations"),e[24]=r,e[25]=j):j=e[25],e[26]!==i||e[27]!==j?(y=(0,d.jsx)("div",{className:"sticky top-0 z-10 border-b border-border bg-sidebar p-2",children:(0,d.jsxs)("div",{className:"relative",children:[_,(0,d.jsx)(we,{className:"h-7 pl-7","data-testid":"api-filter",onChange:A,placeholder:j,value:i})]})}),e[26]=i,e[27]=j,e[28]=y):y=e[28],h="flex flex-col gap-4 p-2";let q;e[29]!==l?.key||e[30]!==r?(q=u(J=>(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,d.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:J.name||r("(root)")}),(0,d.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground/70",children:J.operations.length})]}),J.operations.map(W=>{let Q=W.key===l?.key;return(0,d.jsxs)("button",{"aria-current":Q?"page":void 0,className:"flex items-center justify-between gap-2 rounded-md border-l-2 border-transparent px-2 py-1 text-start text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground aria-[current=page]:border-primary aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground","data-key":W.key,"data-testid":`api-nav-${W.operationId}`,onClick:S,type:"button",children:[(0,d.jsx)("span",{className:"truncate",children:W.summary}),(0,d.jsx)(ge,{kind:W.kind,method:W.method})]},W.key)})]},J.name),"L"),e[29]=l?.key,e[30]=r,e[31]=q):q=e[31],g=p.map(q),e[4]=i,e[5]=a.groups,e[6]=a.server,e[7]=l?.key,e[8]=r,e[9]=p,e[10]=f,e[11]=h,e[12]=g,e[13]=x,e[14]=v,e[15]=N,e[16]=y,e[17]=b,e[18]=I}else p=e[9],f=e[10],h=e[11],g=e[12],x=e[13],v=e[14],N=e[15],y=e[16],b=e[17],I=e[18];let C;e[32]!==p.length||e[33]!==r?(C=p.length===0&&(0,d.jsx)("p",{className:"px-2 py-1 text-xs text-muted-foreground","data-testid":"api-nav-empty",children:r("No operations match your filter.")}),e[32]=p.length,e[33]=r,e[34]=C):C=e[34];let $;e[35]!==C||e[36]!==h||e[37]!==g?($=(0,d.jsxs)("div",{className:h,children:[g,C]}),e[35]=C,e[36]=h,e[37]=g,e[38]=$):$=e[38];let k;e[39]!==$||e[40]!==x||e[41]!==v||e[42]!==N||e[43]!==y?(k=(0,d.jsxs)("nav",{"aria-label":x,className:v,"data-testid":N,children:[y,$]}),e[39]=$,e[40]=x,e[41]=v,e[42]=N,e[43]=y,e[44]=k):k=e[44];let w;e[45]!==l||e[46]!==f?(w=l===void 0?(0,d.jsx)("div",{className:"lg:col-span-2"}):(0,d.jsxs)(Tt,{operation:l,children:[(0,d.jsx)("div",{className:"min-w-0 overflow-y-auto p-6","data-testid":"api-reference-main",children:(0,d.jsx)(At,{operation:l})}),(0,d.jsxs)("aside",{className:"flex min-w-0 flex-col gap-4 overflow-y-auto border-border p-4 lg:border-l","data-testid":"api-reference-aside",children:[(0,d.jsx)(Nt,{operation:l,server:f}),(0,d.jsx)(Et,{})]})]},l.key),e[45]=l,e[46]=f,e[47]=w):w=e[47];let P;return e[48]!==k||e[49]!==w||e[50]!==b||e[51]!==I?(P=(0,d.jsxs)("div",{className:b,"data-testid":I,children:[k,w]}),e[48]=k,e[49]=w,e[50]=b,e[51]=I,e[52]=P):P=e[52],P},"wt");var H=L(re(),1);var Gt=["get","post","put","patch","delete","head","options","trace"],Ue=u(t=>t?.content?.["application/json"]?.schema,"y"),Qt=u((t,e)=>Object.entries(t.responses??{}).map(([a,r])=>{let n=r.$ref?.replace("#/components/responses/",""),s=n===void 0?r:e.components?.responses?.[n]??r;return{description:s.description,schema:Ue(s),status:a}}),"j"),Vt=u((t,e,a,r,n)=>{let s=Ue(r.requestBody),o=s?.properties?.functionPath?.const,i=typeof o=="string"?o:void 0,c=i===void 0?s:s?.properties?.args,m=r.operationId??`${a} ${e}`;return{argsSchema:c,description:r.description,functionPath:i,httpPath:e,key:t,kind:r["x-lunora-function-kind"],method:a.toUpperCase(),operationId:m,requestSchema:s,responses:Qt(r,n),summary:r.summary??m,tags:r.tags??[],title:r.summary??m}},"b"),Xt=u(t=>{let e=[];for(let[a,r]of Object.entries(t.paths??{})){let n=a.includes("#")?a.slice(0,a.indexOf("#")):a;for(let s of Gt){let o=r[s];o!==void 0&&e.push(Vt(a,n,s,o,t))}}return e},"x"),Yt=u(t=>{let e=t??{},a=Xt(e),r=new Map((e.tags??[]).map(i=>[i.name,i.description])),n=new Set,s=[],o=u(i=>{if(n.has(i))return;n.add(i);let c=a.filter(m=>(m.tags[0]??"")===i);c.length>0&&s.push({description:r.get(i),name:i,operations:c})},"l");for(let i of e.tags??[])o(i.name);for(let i of a)o(i.tags[0]??"");return{groups:s,operationByKey:new Map(a.map(i=>[i.key,i])),server:e.servers?.[0]?.url,title:e.info?.title??"API reference",version:e.info?.version}},"w"),Zt=u(t=>{let{paths:e}=t;return e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0},"R"),er=u(t=>{let e=t;return Zt(e)?{kind:"empty"}:{kind:"ready",spec:e}},"T"),Ee=u(t=>{let e=(0,We.c)(23),{spec:a}=t,r=M(),n=F(),s;e[0]!==n?(s=u(()=>n.fetchOpenApi(),"n"),e[0]=n,e[1]=s):s=e[1];let o=le(a,s,er),i;e[2]!==o.kind||e[3]!==o.spec?(i=o.kind==="ready"?Yt(o.spec):void 0,e[2]=o.kind,e[3]=o.spec,e[4]=i):i=e[4];let c=i;if(o.kind==="loading"){let l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,H.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"api-reference-loading",children:[(0,H.jsx)(V,{className:"h-8 w-48"}),(0,H.jsx)(V,{className:"h-64 w-full"})]}),e[5]=l):l=e[5],l}if(o.kind==="error"){let l;e[6]!==o.message||e[7]!==r?(l=r("Couldn't load the OpenAPI spec: {message}",{message:o.message}),e[6]=o.message,e[7]=r,e[8]=l):l=e[8];let p;e[9]!==r?(p=r("API reference unavailable"),e[9]=r,e[10]=p):p=e[10];let f;return e[11]!==l||e[12]!==p?(f=(0,H.jsx)(E,{description:l,testId:"api-reference-error",title:p}),e[11]=l,e[12]=p,e[13]=f):f=e[13],f}if(o.kind==="empty"||c===void 0){let l;e[14]!==r?(l=r("Run `lunora codegen` and wire `_generated/openapi.json` to the worker to render the API reference here."),e[14]=r,e[15]=l):l=e[15];let p;e[16]!==r?(p=r("No OpenAPI spec configured"),e[16]=r,e[17]=p):p=e[17];let f;return e[18]!==l||e[19]!==p?(f=(0,H.jsx)(E,{description:l,testId:"api-reference-empty",title:p}),e[18]=l,e[19]=p,e[20]=f):f=e[20],f}let m;return e[21]!==c?(m=(0,H.jsx)(pe,{model:c}),e[21]=c,e[22]=m):m=e[22],m},"H");var Fe=L(te(),1);var G=L(re(),1);var He=u(t=>(t.methods??[]).filter(e=>e["x-lunora-function-kind"]!=="stream"),"k"),tr=u(t=>(t.params??[]).find(e=>e.name==="args")??(t.params??[])[0],"w"),rr=u(t=>t["x-tags"]?.[0]?.name??(t.name.includes(":")?t.name.slice(0,t.name.indexOf(":")):""),"C"),ar=u(t=>{let e=tr(t)?.schema;return{argsSchema:e,description:t.description,functionPath:t.name,httpPath:"/_lunora/rpc",key:t.name,kind:t["x-lunora-function-kind"],method:"POST",operationId:t.name,requestSchema:e,responses:[{description:t.result?.name,schema:t.result?.schema,status:"200"}],summary:t.summary??t.name,tags:[rr(t)],title:t.summary??t.name}},"I"),nr=u(t=>{let e=t??{},a=He(e).map(n=>ar(n)),r=new Map;for(let n of a){let s=n.tags[0]??"",o=r.get(s)??[];o.push(n),r.set(s,o)}return{groups:[...r.entries()].map(([n,s])=>({name:n,operations:s.toSorted((o,i)=>o.operationId.localeCompare(i.operationId))})).toSorted((n,s)=>n.name.localeCompare(s.name)),operationByKey:new Map(a.map(n=>[n.key,n])),title:e.info?.title??"API reference",version:e.info?.version}},"v"),or=u(t=>He(t).length===0,"N"),sr=u(t=>{let e=t;return or(e)?{kind:"empty"}:{kind:"ready",spec:e}},"b"),Ge=u(t=>{let e=(0,Fe.c)(23),{spec:a}=t,r=M(),n=F(),s;e[0]!==n?(s=u(()=>n.fetchOpenRpc(),"a"),e[0]=n,e[1]=s):s=e[1];let o=le(a,s,sr),i;e[2]!==o.kind||e[3]!==o.spec?(i=o.kind==="ready"?nr(o.spec):void 0,e[2]=o.kind,e[3]=o.spec,e[4]=i):i=e[4];let c=i;if(o.kind==="loading"){let l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,G.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"openrpc-reference-loading",children:[(0,G.jsx)(V,{className:"h-8 w-48"}),(0,G.jsx)(V,{className:"h-64 w-full"})]}),e[5]=l):l=e[5],l}if(o.kind==="error"){let l;e[6]!==o.message||e[7]!==r?(l=r("Couldn't load the OpenRPC spec: {message}",{message:o.message}),e[6]=o.message,e[7]=r,e[8]=l):l=e[8];let p;e[9]!==r?(p=r("API reference unavailable"),e[9]=r,e[10]=p):p=e[10];let f;return e[11]!==l||e[12]!==p?(f=(0,G.jsx)(E,{description:l,testId:"openrpc-reference-error",title:p}),e[11]=l,e[12]=p,e[13]=f):f=e[13],f}if(o.kind==="empty"||c===void 0){let l;e[14]!==r?(l=r("Run `lunora codegen --api-spec openrpc` and wire `_generated/openrpc.json` to the worker to render the OpenRPC reference here."),e[14]=r,e[15]=l):l=e[15];let p;e[16]!==r?(p=r("No OpenRPC spec configured"),e[16]=r,e[17]=p):p=e[17];let f;return e[18]!==l||e[19]!==p?(f=(0,G.jsx)(E,{description:l,testId:"openrpc-reference-empty",title:p}),e[18]=l,e[19]=p,e[20]=f):f=e[20],f}let m;return e[21]!==c?(m=(0,G.jsx)(pe,{model:c}),e[21]=c,e[22]=m):m=e[22],m},"B");var D=L(re(),1);var ir=["reference","snippets"],lr=["openapi","openrpc"],Zr=u(t=>{let e=(0,Qe.c)(51),{functions:a,initialShardKey:r,openApiSpec:n,openRpcSpec:s}=t,o=M(),[i,c]=(0,xe.useState)("reference"),[m,l]=(0,xe.useState)("openapi"),p;e[0]!==o?(p=o("Reference"),e[0]=o,e[1]=p):p=e[1];let f;e[2]!==o?(f=o("Snippets"),e[2]=o,e[3]=f):f=e[3];let h;e[4]!==p||e[5]!==f?(h={reference:p,snippets:f},e[4]=p,e[5]=f,e[6]=h):h=e[6];let g=h,x;e[7]!==o?(x=o("OpenAPI"),e[7]=o,e[8]=x):x=e[8];let v;e[9]!==o?(v=o("OpenRPC"),e[9]=o,e[10]=v):v=e[10];let N;e[11]!==x||e[12]!==v?(N={openapi:x,openrpc:v},e[11]=x,e[12]=v,e[13]=N):N=e[13];let y=N,b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=u(J=>{c(J.currentTarget.dataset.view)},"S"),e[14]=b):b=e[14];let I=b,C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=u(J=>{l(J.currentTarget.dataset.format)},"A"),e[15]=C):C=e[15];let $=C,k;e[16]!==o?(k=o("API view"),e[16]=o,e[17]=k):k=e[17];let w;e[18]!==i||e[19]!==g?(w=ir.map(J=>(0,D.jsx)(U,{"aria-selected":i===J,"data-testid":`api-view-${J}`,"data-view":J,onClick:I,role:"tab",size:"sm",type:"button",variant:i===J?"default":"outline",children:g[J]},J)),e[18]=i,e[19]=g,e[20]=w):w=e[20];let P;e[21]!==w||e[22]!==k?(P=(0,D.jsx)("div",{"aria-label":k,className:"flex gap-1.5","data-testid":"api-view-toggle",role:"tablist",children:w}),e[21]=w,e[22]=k,e[23]=P):P=e[23];let O;e[24]!==m||e[25]!==y||e[26]!==o||e[27]!==i?(O=i==="reference"&&(0,D.jsx)("div",{"aria-label":o("API spec format"),className:"flex gap-1.5","data-testid":"api-format-toggle",role:"tablist",children:lr.map(J=>(0,D.jsx)(U,{"aria-selected":m===J,"data-format":J,"data-testid":`api-format-${J}`,onClick:$,role:"tab",size:"sm",type:"button",variant:m===J?"default":"outline",children:y[J]},J))}),e[24]=m,e[25]=y,e[26]=o,e[27]=i,e[28]=O):O=e[28];let S;e[29]!==P||e[30]!==O?(S=(0,D.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-3 border-b border-border px-6 py-3",children:[P,O]}),e[29]=P,e[30]=O,e[31]=S):S=e[31];let T;e[32]!==a||e[33]!==r||e[34]!==i?(T=i==="snippets"&&(0,D.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-6",children:(0,D.jsx)(Ae,{functions:a,initialShardKey:r})}),e[32]=a,e[33]=r,e[34]=i,e[35]=T):T=e[35];let A;e[36]!==m||e[37]!==n||e[38]!==i?(A=i==="reference"&&m==="openapi"&&(0,D.jsx)(Ee,{spec:n}),e[36]=m,e[37]=n,e[38]=i,e[39]=A):A=e[39];let _;e[40]!==m||e[41]!==s||e[42]!==i?(_=i==="reference"&&m==="openrpc"&&(0,D.jsx)(Ge,{spec:s}),e[40]=m,e[41]=s,e[42]=i,e[43]=_):_=e[43];let j;e[44]!==T||e[45]!==A||e[46]!==_?(j=(0,D.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[T,A,_]}),e[44]=T,e[45]=A,e[46]=_,e[47]=j):j=e[47];let q;return e[48]!==S||e[49]!==j?(q=(0,D.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"lunora-api-tab",children:[S,j]}),e[48]=S,e[49]=j,e[50]=q):q=e[50],q},"k");export{Zr as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as i}from"./chunk-VJQP4ARP.js";import{a as c}from"./chunk-A6TVTNKO.js";import{b as m}from"./chunk-ADABTCDI.js";import{a as s,d as n}from"./chunk-5PEAXTYQ.js";var d=n(c(),1);var p=n(m(),1);function b(r){let e=(0,d.c)(8),t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=i("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=(0,p.jsx)("label",{"data-slot":"label",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}s(b,"m");export{b as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as L,d as W,e as $,f as q,h as D,i as F,j as H,k as A,l as S,m as I,n as J,o as M,p as P}from"./chunk-DWKKQ75U.js";import{a as O}from"./chunk-A2LKDNNA.js";import{a as X,b as z,c as B,d as K,e as E,f as G}from"./chunk-4TGALJHR.js";import{B as C,r as j}from"./chunk-VJQP4ARP.js";import{a as U}from"./chunk-A6TVTNKO.js";import{b as V}from"./chunk-ADABTCDI.js";import{a as f,d as T}from"./chunk-5PEAXTYQ.js";var N=T(U(),1);var t=T(V(),1);var _=50,R={value:{colors:{dark:["var(--chart-1)"],light:["var(--chart-1)"]},label:"value"}},Q=f(r=>{let a=r.columns.find(e=>r.rows.length>0&&r.rows.every(n=>typeof n[e]=="number"))??null;return{label:r.columns.find(e=>e!==a)??null,value:a}},"D"),Y=f(r=>{let a=(0,N.c)(3),{data:e,kind:n}=r,l;return a[0]!==e||a[1]!==n?(l=(0,t.jsx)(H,{className:"h-full w-full",config:R,children:n==="area"?(0,t.jsxs)(F,{data:e,children:[(0,t.jsx)(L,{vertical:!1}),(0,t.jsx)(q,{axisLine:!1,dataKey:"label",tickLine:!1}),(0,t.jsx)(S,{content:(0,t.jsx)(A,{})}),(0,t.jsx)($,{dataKey:"value",fill:"var(--color-value-0)",fillOpacity:.2,stroke:"var(--color-value-0)",type:"monotone"})]}):(0,t.jsxs)(D,{data:e,children:[(0,t.jsx)(L,{vertical:!1}),(0,t.jsx)(q,{axisLine:!1,dataKey:"label",tickLine:!1}),(0,t.jsx)(S,{content:(0,t.jsx)(A,{})}),(0,t.jsx)(W,{dataKey:"value",dot:!1,stroke:"var(--color-value-0)",strokeWidth:2,type:"monotone"})]})}),a[0]=e,a[1]=n,a[2]=l):l=a[2],l},"J"),na=f(r=>{let a=(0,N.c)(21),{axes:e,kind:n,result:l}=r,u=C(),o;a[0]!==l?(o=Q(l),a[0]=l,a[1]=o):o=a[1];let d=o,m;a[2]!==l.columns?(m=new Set(l.columns),a[2]=l.columns,a[3]=m):m=a[3];let s=m,c=e!==void 0&&s.has(e.x)?e.x:d.label,p;a[4]!==e?.y||a[5]!==s?(p=e?.y.find(i=>s.has(i)),a[4]=e?.y,a[5]=s,a[6]=p):p=a[6];let x=p,y=x??d.value,b;a[7]!==c||a[8]!==l.rows||a[9]!==y?(b=y===null?[]:l.rows.slice(0,_).map((i,w)=>({label:c===null?`#${(w+1).toString()}`:j(i[c]),value:Number(i[y])||0})),a[7]=c,a[8]=l.rows,a[9]=y,a[10]=b):b=a[10];let k=b;if(y===null){let i;a[11]!==u?(i=u("No numeric column to chart."),a[11]=u,a[12]=i):i=a[12];let w;return a[13]!==i?(w=(0,t.jsx)("p",{className:"p-4 text-sm text-muted-foreground","data-testid":"sql-chart-empty",children:i}),a[13]=i,a[14]=w):w=a[14],w}let h=n??(e!==void 0&&x!==void 0?e.kind:"bar"),v;a[15]!==k||a[16]!==h?(v=h==="bar"?(0,t.jsxs)(I,{className:"h-full w-full",config:R,data:k,children:[(0,t.jsx)(M,{dataKey:"label"}),(0,t.jsx)(J,{dataKey:"value"}),(0,t.jsx)(P,{})]}):(0,t.jsx)(Y,{data:k,kind:h}),a[15]=k,a[16]=h,a[17]=v):v=a[17];let g;return a[18]!==h||a[19]!==v?(g=(0,t.jsx)("div",{className:"h-80 w-full p-3","data-chart-kind":h,"data-testid":"sql-chart",children:v}),a[18]=h,a[19]=v,a[20]=g):g=a[20],g},"oe"),oa=f(r=>{let a=(0,N.c)(19),{result:e}=r,n=C();if(e.columns.length===0){let s;a[0]!==e.rowCount||a[1]!==n?(s=n("{count} rows",{count:e.rowCount}),a[0]=e.rowCount,a[1]=n,a[2]=s):s=a[2];let c;return a[3]!==s?(c=(0,t.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:s}),a[3]=s,a[4]=c):c=a[4],c}let l;a[5]!==e.columns?(l=e.columns.map(Z),a[5]=e.columns,a[6]=l):l=a[6];let u;a[7]!==l?(u=(0,t.jsx)(z,{className:"sticky top-0 z-10 bg-muted",children:(0,t.jsx)(K,{children:l})}),a[7]=l,a[8]=u):u=a[8];let o;if(a[9]!==e.columns||a[10]!==e.rows){let s;a[12]!==e.columns?(s=f((c,p)=>(0,t.jsx)(K,{"data-testid":"sql-row",children:e.columns.map(x=>(0,t.jsx)(G,{className:"max-w-md truncate font-mono text-xs",children:(0,t.jsx)(O,{value:c[x]})},x))},p),"s"),a[12]=e.columns,a[13]=s):s=a[13],o=e.rows.map(s),a[9]=e.columns,a[10]=e.rows,a[11]=o}else o=a[11];let d;a[14]!==o?(d=(0,t.jsx)(B,{children:o}),a[14]=o,a[15]=d):d=a[15];let m;return a[16]!==u||a[17]!==d?(m=(0,t.jsxs)(X,{"data-testid":"sql-rows",children:[u,d]}),a[16]=u,a[17]=d,a[18]=m):m=a[18],m},"ne");function Z(r){return(0,t.jsx)(E,{children:r},r)}f(Z,"P");export{na as a,oa as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-5PEAXTYQ.js";var v=new Set(["contains","eq","gt","gte","has","lt","lte","ne"]),a=s(r=>typeof r=="number"&&Number.isSafeInteger(r)?String(r):r,"i"),n=s(r=>{if(typeof r!="string")return;let e=r.trim();return e===""?void 0:e},"s"),p=s(r=>{if(r===null||typeof r!="object")return!1;let e=r,o=e.path===void 0||Array.isArray(e.path)&&e.path.every(i=>typeof i=="string");return typeof e.column=="string"&&typeof e.operator=="string"&&v.has(e.operator)&&o},"g"),f=s(r=>{if(typeof r!="string"||r==="")return[];try{let e=JSON.parse(r);return Array.isArray(e)?e.filter(p):[]}catch{return[]}},"f"),g=s(r=>{if(typeof r!="string"||r==="")return;let e=r.lastIndexOf(":");if(e<=0)return;let o=r.slice(0,e),i=r.slice(e+1);if(!(i!=="asc"&&i!=="desc"))return{column:o,direction:i}},"p"),u=/^[\da-f]{16}$/u,y=s(r=>{let e={};if(typeof r.pins=="string"&&r.pins!==""){let c=r.pins.split(",").filter(h=>h!==""&&h.length<=64).slice(0,12);c.length>0&&(e.pins=c.join(","))}r.schema==="global"&&(e.schema="global");let o=n(r.table);o!==void 0&&(e.table=o);let i=n(a(r.shard));i!==void 0&&(e.shard=i);let d=n(a(r.search));d!==void 0&&(e.search=d);let t=n(r.order);t!==void 0&&g(t)!==void 0&&(e.order=t);let l=n(r.filters);return l!==void 0&&f(l).length>0&&(e.filters=l),e},"y"),b=s(r=>{let e=f(r.filters),o=g(r.order);return{filters:e.length>0?e:void 0,orderBy:o,search:n(a(r.search)),shard:n(a(r.shard)),table:n(r.table),tier:r.schema==="global"?"global":"shard"}},"b"),m=s(r=>{let e=r.filters??[];return{filters:e.length>0?JSON.stringify(e):void 0,order:r.orderBy===void 0?void 0:`${r.orderBy.column}:${r.orderBy.direction}`,schema:r.tier==="global"?"global":void 0,search:r.search!==void 0&&r.search!==""?r.search:void 0,shard:r.shard!==void 0&&r.shard!==""?r.shard:void 0,table:r.table!==void 0&&r.table!==""?r.table:void 0}},"v"),S=s(r=>{let{version:e}=r;return typeof e=="string"&&u.test(e)?{version:e}:{}},"S");export{y as a,b,m as c,S as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-5PEAXTYQ.js";var s=o((e,t)=>t(e==="unsafe-response"?"The model returned a statement that is not read-only, so it was discarded.":e==="too-long"?"The statement is too long to rewrite. Select a shorter part of it.":e==="empty-response"?"The model returned nothing usable.":"The model could not be reached."),"o");export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as S}from"./chunk-NQ727GVM.js";import{a as q,b as M,c as A,d as w,e as C,f as E}from"./chunk-4TGALJHR.js";import{a as L}from"./chunk-ZZ6ZCOD4.js";import{B as g,j as v,r as N,s as j}from"./chunk-VJQP4ARP.js";import"./chunk-PDBW6GTJ.js";import{a as I}from"./chunk-A6TVTNKO.js";import{a as H,b as R}from"./chunk-ADABTCDI.js";import{a as u,d as x}from"./chunk-5PEAXTYQ.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)(L,{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:N(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:v(n),loading:!1,rows:null}}))}}},[s]);return(0,d.useEffect)(()=>{let t={cancelled:!1};return j(l(t)),()=>{t.cancelled=!0}},[l]),s===void 0?(0,a.jsx)(S,{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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-5PEAXTYQ.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{b as h}from"./chunk-F2DVDJV6.js";import"./chunk-L27FKJTG.js";import{b as I}from"./chunk-YL5ZAR3P.js";import{a as y,e as S}from"./chunk-ZZ6ZCOD4.js";import{n as k}from"./chunk-KQVY73EU.js";import"./chunk-ZPQBVYNN.js";import{B as A}from"./chunk-VJQP4ARP.js";import"./chunk-PDBW6GTJ.js";import{a as $}from"./chunk-A6TVTNKO.js";import{b as z}from"./chunk-ADABTCDI.js";import{a as u,d as w}from"./chunk-5PEAXTYQ.js";var N=w($(),1);var a=w(z(),1);var j=[{key:"accounts",label:"Accounts"},{key:"apiKey",label:"API keys"},{key:"admin",label:"Admin"},{key:"organization",label:"Organizations"},{key:"passkey",label:"Passkeys"},{key:"twoFactor",label:"Two-factor"}],v=u(e=>{if(e===void 0)return"\u2014";let i=[[86400,"d"],[3600,"h"],[60,"m"]];for(let[t,d]of i)if(e>=t&&e%t===0)return`${String(e/t)}${d}`;return`${String(e)}s`},"v"),p=u(e=>{let i=(0,N.c)(8),{children:t,heading:d,testId:n}=e,l;i[0]!==d?(l=(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:d})}),i[0]=d,i[1]=l):l=i[1];let s;i[2]!==t?(s=(0,a.jsx)(S,{className:"p-3",children:t}),i[2]=t,i[3]=s):s=i[3];let c;return i[4]!==l||i[5]!==s||i[6]!==n?(c=(0,a.jsxs)(y,{className:"gap-0 py-0","data-testid":n,children:[l,s]}),i[4]=l,i[5]=s,i[6]=n,i[7]=c):c=i[7],c},"h"),o=u(e=>{let i=(0,N.c)(7),{label:t,value:d}=e,n;i[0]!==t?(n=(0,a.jsx)("span",{className:"text-sm",children:t}),i[0]=t,i[1]=n):n=i[1];let l;i[2]!==d?(l=(0,a.jsx)("span",{className:"text-sm text-muted-foreground tabular-nums",children:d}),i[2]=d,i[3]=l):l=i[3];let s;return i[4]!==n||i[5]!==l?(s=(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs",children:[n,l]}),i[4]=n,i[5]=l,i[6]=s):s=i[6],s},"c"),M=u(()=>{let e=(0,N.c)(20),i=k(),t=A(),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=["lunora-auth-config"],e[0]=d):d=e[0];let n;e[1]!==i?(n=u(()=>i.getAuthConfig(),"r"),e[1]=i,e[2]=n):n=e[2];let{data:l,error:s}=I(d,n),c;e[3]!==t?(c=u(r=>(0,a.jsx)(h,{variant:r?"success":"outline",children:t(r?"Enabled":"Disabled")}),"u"),e[3]=t,e[4]=c):c=e[4];let m=c,g;e[5]!==s?(g=s!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"auth-config-error",role:"alert",children:s}),e[5]=s,e[6]=g):g=e[6];let f;e[7]!==l||e[8]!==s||e[9]!==t?(f=s===null&&l===void 0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"auth-config-loading",children:t("Loading auth configuration\u2026")}),e[7]=l,e[8]=s,e[9]=t,e[10]=f):f=e[10];let x;e[11]!==l||e[12]!==s||e[13]!==m||e[14]!==t?(x=s===null&&l!==void 0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{heading:t("Enabled capabilities"),testId:"auth-config-capabilities",children:(0,a.jsx)("ul",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:j.map(r=>{let P=l.capabilities[r.key];return(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs","data-testid":`auth-config-cap-${r.key}`,children:[(0,a.jsx)("span",{className:"text-sm",children:t(r.label)}),m(P)]},r.key)})})}),(0,a.jsx)(p,{heading:t("Plugins"),testId:"auth-config-plugins",children:l.plugins.length===0?(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:t("No plugins enabled.")}):(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:l.plugins.map(C)})}),(0,a.jsx)(p,{heading:t("Sign-in methods"),testId:"auth-config-signin",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o,{label:t("Email & password"),value:m(l.emailAndPassword)}),(0,a.jsx)(o,{label:t("Social providers"),value:l.socialProviders.length===0?t("None"):(0,a.jsx)("span",{className:"flex flex-wrap justify-end gap-1",children:l.socialProviders.map(q)})})]})}),l.organization.enabled&&(0,a.jsx)(p,{heading:t("Organizations"),testId:"auth-config-org",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o,{label:t("Teams"),value:m(l.organization.teams)}),(0,a.jsx)(o,{label:t("Custom roles"),value:m(l.organization.roles)})]})}),(0,a.jsx)(p,{heading:t("Session policy"),testId:"auth-config-session",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o,{label:t("Expires in"),value:v(l.session.expiresIn)}),(0,a.jsx)(o,{label:t("Refresh after"),value:v(l.session.updateAge)}),(0,a.jsx)(o,{label:t("Fresh window"),value:v(l.session.freshAge)}),(0,a.jsx)(o,{label:t("Cookie cache"),value:m(l.session.cookieCache===!0)})]})}),(0,a.jsx)(p,{heading:t("Rate limit"),testId:"auth-config-ratelimit",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o,{label:t("Status"),value:m(l.rateLimit.enabled)}),l.rateLimit.enabled&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o,{label:t("Max requests"),value:l.rateLimit.max??"\u2014"}),(0,a.jsx)(o,{label:t("Window"),value:v(l.rateLimit.window)})]})]})}),l.userFields.length>0&&(0,a.jsx)(p,{heading:t("Plugin user fields"),testId:"auth-config-user-fields",children:(0,a.jsx)("ul",{className:"flex flex-col gap-2",children:l.userFields.map(r=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs","data-testid":`auth-config-user-field-${r.name}`,children:[(0,a.jsxs)("span",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-mono text-xs",children:r.name}),r.plugin!==void 0&&(0,a.jsx)("span",{className:"text-[11px] text-muted-foreground",children:r.plugin})]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(h,{variant:"outline",children:r.type}),r.required&&(0,a.jsx)(h,{variant:"secondary",children:t("required")}),r.unique&&(0,a.jsx)(h,{variant:"secondary",children:t("unique")})]})]},r.name))})}),(0,a.jsx)(y,{className:"gap-0 py-0",children:(0,a.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground","data-testid":"auth-config-note",children:t("OAuth providers, email templates, and rate limits are configured at deploy time in the better-auth setup and aren't editable here. See the Mail tab for email output.")})})]}),e[11]=l,e[12]=s,e[13]=m,e[14]=t,e[15]=x):x=e[15];let b;return e[16]!==g||e[17]!==f||e[18]!==x?(b=(0,a.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"auth-config",children:[g,f,x]}),e[16]=g,e[17]=f,e[18]=x,e[19]=b):b=e[19],b},"O");function C(e){return(0,a.jsx)(h,{"data-testid":`auth-config-plugin-${e}`,variant:"outline",children:e},e)}u(C,"P");function q(e){return(0,a.jsx)(h,{"data-testid":`auth-config-provider-${e}`,variant:"outline",children:e},e)}u(q,"z");export{M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as O}from"./chunk-5MIJ3KEK.js";import{a as C}from"./chunk-AWFFXR6S.js";import{a as c}from"./chunk-NQ727GVM.js";import{b as N}from"./chunk-F2DVDJV6.js";import"./chunk-L27FKJTG.js";import{a as k}from"./chunk-JQBZDS6X.js";import"./chunk-4YEGXH2V.js";import{a as w,b as T,c as A,d as f,e as s,f as l}from"./chunk-4TGALJHR.js";import"./chunk-FPODRWDZ.js";import"./chunk-MNXXIISC.js";import"./chunk-EOFWXI3T.js";import{a as v}from"./chunk-LYVYUTQY.js";import{c as p}from"./chunk-YL5ZAR3P.js";import{a as b,e as S}from"./chunk-ZZ6ZCOD4.js";import"./chunk-KQVY73EU.js";import"./chunk-ZPQBVYNN.js";import{B as y}from"./chunk-VJQP4ARP.js";import"./chunk-PDBW6GTJ.js";import"./chunk-A6TVTNKO.js";import{a as R,b as V}from"./chunk-ADABTCDI.js";import{a as n,d as x}from"./chunk-5PEAXTYQ.js";var F=x(R(),1);var e=x(V(),1);var $=n(a=>{let t=a.trim();if(t.length===0)return{context:void 0,error:null};try{let o=JSON.parse(t);return o===null||typeof o!="object"||Array.isArray(o)?{context:void 0,error:"Targeting context must be a JSON object."}:{context:o,error:null}}catch{return{context:void 0,error:"Targeting context is not valid JSON."}}},"H"),q='{ "targetingKey": "user-123", "plan": "premium" }',D=n(a=>a.type==="object"?JSON.stringify(a.value):String(a.value),"R"),Y=n(({initialShardKey:a=""})=>{let t=y(),[o,j]=(0,F.useState)(""),{context:g,error:m}=$(o),I=g===void 0?{}:{context:g},{data:i,error:J,errorSource:K,liveError:E}=p(v.listFlags,I,{live:!0,shardKey:a}),u=i!==void 0,L=i?.configured??!1,h=Array.isArray(i?.flags)?[...i.flags].toSorted((r,B)=>r.key.localeCompare(B.key)):[],d;return u&&!L?d=(0,e.jsx)(c,{description:t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),testId:"flags-unconfigured",title:t("No flags provider configured")}):u&&h.length===0?d=(0,e.jsx)(c,{description:t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),testId:"flags-empty",title:t("No flags read")}):d=(0,e.jsx)(b,{className:"overflow-hidden py-0",children:(0,e.jsx)(S,{className:"px-0",children:(0,e.jsxs)(w,{"data-testid":"flags-table",children:[(0,e.jsx)(T,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(s,{children:t("Key")}),(0,e.jsx)(s,{children:t("Type")}),(0,e.jsx)(s,{children:t("Value")}),(0,e.jsx)(s,{children:t("Reason")}),(0,e.jsx)(s,{children:t("Variant")})]})}),(0,e.jsx)(A,{children:h.map(r=>(0,e.jsxs)(f,{"data-testid":`flags-row-${r.key}`,children:[(0,e.jsx)(l,{className:"font-mono text-xs",children:r.key}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.type}),(0,e.jsx)(l,{className:"font-mono text-xs",children:D(r)}),(0,e.jsx)(l,{children:r.errorCode===void 0?(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:r.reason??"\u2014"}):(0,e.jsx)(N,{"data-testid":`flags-error-${r.key}`,variant:"destructive",children:r.errorCode})}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.variant??"\u2014"})]},r.key))})]})})}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-flags-panel",children:[J!==null&&(0,e.jsx)(k,{error:K,shardKey:a,testId:"flags-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(C,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),(0,e.jsx)(O,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:n(r=>{j(r.target.value)},"onChange"),placeholder:q,rows:3,value:o}),m!==null&&(0,e.jsx)("p",{className:"text-xs text-destructive","data-testid":"flags-context-error",role:"alert",children:t(m)}),E!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"flags-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")})]}),d]})},"W");export{Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b}from"./chunk-A6TVTNKO.js";import{a as v}from"./chunk-ADABTCDI.js";import{a as i,d as m}from"./chunk-5PEAXTYQ.js";var n=m(b(),1),r=m(v(),1);var x=i(function(t,a,s){let e=(0,n.c)(4),o=a===void 0?300:a,[d,f]=(0,r.useState)(t),[p,l]=(0,r.useState)(s);s!==void 0&&s!==p&&(l(s),f(t));let u,c;return e[0]!==o||e[1]!==t?(u=i(()=>{let T=setTimeout(()=>{f(t)},o);return()=>{clearTimeout(T)}},"c"),c=[t,o],e[0]=o,e[1]=t,e[2]=u,e[3]=c):(u=e[2],c=e[3]),(0,r.useEffect)(u,c),d},"T");export{x as a};
|