@lunora/studio 1.0.0-alpha.14 → 1.0.0-alpha.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +6 -0
- package/README.md +1 -1
- package/dist/index.d.mts +1515 -0
- package/dist/index.d.ts +910 -802
- package/dist/index.mjs +1 -0
- package/dist/mount.d.mts +21 -0
- package/dist/mount.d.ts +10 -10
- package/dist/mount.mjs +1 -0
- package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
- package/dist/packem_chunks/ApiTab.mjs +1 -0
- package/dist/packem_chunks/AuditPanel.mjs +1 -0
- package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
- package/dist/packem_chunks/ExportImportPanel.mjs +3 -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 +9 -0
- package/dist/packem_chunks/TableEditor.mjs +1 -0
- package/dist/packem_chunks/agents-panel.mjs +1 -0
- package/dist/packem_chunks/analytics-panel.mjs +1 -0
- package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
- package/dist/packem_chunks/auth-config-panel.mjs +1 -0
- package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
- package/dist/packem_chunks/containers-panel.mjs +1 -0
- package/dist/packem_chunks/dashboards-panel.mjs +1 -0
- package/dist/packem_chunks/evals-panel.mjs +1 -0
- package/dist/packem_chunks/fanout-panel.mjs +1 -0
- package/dist/packem_chunks/flags-panel.mjs +1 -0
- package/dist/packem_chunks/issues-panel.mjs +1 -0
- package/dist/packem_chunks/kv-browser.mjs +1 -0
- package/dist/packem_chunks/log-drains-panel.mjs +4 -0
- package/dist/packem_chunks/migrations-route.mjs +1 -0
- package/dist/packem_chunks/organizations-panel.mjs +1 -0
- package/dist/packem_chunks/payments-panel.mjs +1 -0
- package/dist/packem_chunks/permissions-panel.mjs +1 -0
- package/dist/packem_chunks/queues-panel.mjs +1 -0
- package/dist/packem_chunks/reactors-panel.mjs +1 -0
- package/dist/packem_chunks/rls-panel.mjs +1 -0
- package/dist/packem_chunks/schedule-panel.mjs +1 -0
- package/dist/packem_chunks/sparkline.mjs +1 -0
- package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
- package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
- package/dist/packem_chunks/sync-client-panel.mjs +1 -0
- package/dist/packem_chunks/traces-panel.mjs +1 -0
- package/dist/packem_chunks/users-panel.mjs +1 -0
- package/dist/packem_chunks/vector-browser.mjs +1 -0
- package/dist/packem_chunks/workflows-panel.mjs +1 -0
- package/dist/packem_shared/ADMIN_FUNCTIONS-B6z7VLYt.mjs +1 -0
- package/dist/packem_shared/ApiDocsPanel-BOxViKDM.mjs +2 -0
- package/dist/packem_shared/ApiReferencePanel--YThTzHb.mjs +1 -0
- package/dist/packem_shared/CommandPalette-C4UrhLxv.mjs +1 -0
- package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
- package/dist/packem_shared/ConnectionBadge-B_8fcft2.mjs +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +1 -0
- package/dist/packem_shared/DataBrowser-rqpuEiuQ.mjs +4 -0
- package/dist/packem_shared/DataFilters-3nbW0uax.mjs +1 -0
- package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
- package/dist/packem_shared/GlobalDataBrowser-BKm77TNC.mjs +1 -0
- package/dist/packem_shared/HomePanel-YG8qu2Nb.mjs +1 -0
- package/dist/packem_shared/MigrationsPanel-CYe0ygT8.mjs +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-Bn5UVD7s.mjs +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
- package/dist/packem_shared/ScheduledJobs-DN0yQoo6.mjs +1 -0
- package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
- package/dist/packem_shared/Studio-D8OZ5P-V.mjs +1 -0
- package/dist/packem_shared/StudioApp-VZ3I91QA.mjs +1 -0
- package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
- package/dist/packem_shared/advisor-view-5mZH6453.mjs +1 -0
- package/dist/packem_shared/aggregateMetrics-A-Y7OH6R.mjs +1 -0
- package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
- package/dist/packem_shared/app.d-D1bPR8FO.d.mts +252 -0
- package/dist/packem_shared/app.d-D1bPR8FO.d.ts +252 -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--2hKx4L2.mjs +1 -0
- package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
- package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
- package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
- package/dist/packem_shared/data-grid-BqNXJ9PF.mjs +1 -0
- package/dist/packem_shared/data-view-params-qoSTqjAj.mjs +1 -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-CczbAfst.mjs +1 -0
- package/dist/packem_shared/grid-features-D8w5isjt.mjs +6 -0
- package/dist/packem_shared/home-panel-BID7w6j3.mjs +3 -0
- package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
- package/dist/packem_shared/internal-CwaF9YNk.mjs +2 -0
- package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
- package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
- package/dist/packem_shared/log-fields-SBxKyBug.mjs +1 -0
- package/dist/packem_shared/log-line-Dzg4YZ-K.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/quote-identifier-CGiYFBvY.mjs +1 -0
- package/dist/packem_shared/recording-client-BEZ6tVgo.mjs +1 -0
- package/dist/packem_shared/reference-view-CZxBZSRo.mjs +13 -0
- package/dist/packem_shared/schema-diagram-DU83ObYH.mjs +2 -0
- package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
- package/dist/packem_shared/select-Cx8-CokP.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-DysT8h5P.mjs +1 -0
- package/dist/packem_shared/stat-card-D0Fe04cX.mjs +1 -0
- package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
- package/dist/packem_shared/studio-ByaR_3g9.mjs +2 -0
- package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
- package/dist/packem_shared/table-list-sidebar-BxZm3sBJ.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-Cbj2GuHu.mjs +1 -0
- package/dist/packem_shared/use-async-submit-DAKymxcP.mjs +1 -0
- package/dist/packem_shared/use-auth-config-gxJL0E1r.mjs +1 -0
- package/dist/packem_shared/use-open-trace-B5LJ96_0.mjs +1 -0
- package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
- package/dist/packem_shared/use-sql-assistant-CFRzdA9E.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/packem_shared/wire-codec-Dl3VeNrd.mjs +1 -0
- package/dist/standalone/chunk-25NFR6EB.js +1 -0
- package/dist/standalone/chunk-2AFIMJPZ.js +1 -0
- package/dist/standalone/chunk-2DO5EQCU.js +1 -0
- package/dist/standalone/chunk-2L64LHIR.js +1 -0
- package/dist/standalone/chunk-2QSOSRNW.js +1 -0
- package/dist/standalone/chunk-35DM4JJG.js +1 -0
- package/dist/standalone/chunk-3ILVYCWG.js +4 -0
- package/dist/standalone/chunk-3PKWDMXA.js +1 -0
- package/dist/standalone/chunk-3ZKYTFKY.js +1 -0
- package/dist/standalone/chunk-43Y54D7O.js +1 -0
- package/dist/standalone/chunk-46ZJ3TM4.js +2 -0
- package/dist/standalone/chunk-4GTO7FL5.js +1 -0
- package/dist/standalone/chunk-4L4WTGN5.js +1 -0
- package/dist/standalone/chunk-56AFJWER.js +1 -0
- package/dist/standalone/chunk-5AUOM7FK.js +1 -0
- package/dist/standalone/chunk-5GFSKIB2.js +1 -0
- package/dist/standalone/chunk-5JDWLCSH.js +1 -0
- package/dist/standalone/chunk-5PCGB55O.js +1 -0
- package/dist/standalone/chunk-5WJXVZMZ.js +1 -0
- package/dist/standalone/chunk-66UGPQVC.js +1 -0
- package/dist/standalone/chunk-7QMV55PO.js +1 -0
- package/dist/standalone/chunk-7QRRR3K6.js +1 -0
- package/dist/standalone/chunk-7RIRJD2P.js +1 -0
- package/dist/standalone/chunk-B5FXTB7H.js +1 -0
- package/dist/standalone/chunk-BX3F7MXP.js +1 -0
- package/dist/standalone/chunk-C3TOZ4LG.js +1 -0
- package/dist/standalone/chunk-C5L4BSYY.js +1 -0
- package/dist/standalone/chunk-CKZQXAZE.js +1 -0
- package/dist/standalone/chunk-CSUROWL2.js +1 -0
- package/dist/standalone/chunk-CXNZVJ3S.js +1 -0
- package/dist/standalone/chunk-D27D4UUI.js +1 -0
- package/dist/standalone/chunk-DEJLINCJ.js +1 -0
- package/dist/standalone/chunk-DQHYNFE4.js +9 -0
- package/dist/standalone/chunk-EA2JKR5D.js +1 -0
- package/dist/standalone/chunk-EBWXFG4H.js +1 -0
- package/dist/standalone/chunk-ECQTVV2J.js +1 -0
- package/dist/standalone/chunk-EG6XHY7N.js +1 -0
- package/dist/standalone/chunk-EIKBBMM4.js +1 -0
- package/dist/standalone/chunk-EILTQDXX.js +1 -0
- package/dist/standalone/chunk-ERWZGAOA.js +1 -0
- package/dist/standalone/chunk-F7UC63UN.js +1 -0
- package/dist/standalone/chunk-FKVZRPV5.js +1 -0
- package/dist/standalone/chunk-FNGY5SUZ.js +3 -0
- package/dist/standalone/chunk-FO26ZU7E.js +1 -0
- package/dist/standalone/chunk-FSRSK4LY.js +1 -0
- package/dist/standalone/chunk-G63MGXPG.js +1 -0
- package/dist/standalone/chunk-HEAQVSNS.js +1 -0
- package/dist/standalone/chunk-HODZXHVK.js +1 -0
- package/dist/standalone/chunk-I52I2DJG.js +1 -0
- package/dist/standalone/chunk-I5OKDKON.js +1 -0
- package/dist/standalone/chunk-IFLTA2OD.js +1 -0
- package/dist/standalone/chunk-IMOHEGMV.js +1 -0
- package/dist/standalone/chunk-JAZCU2PP.js +1 -0
- package/dist/standalone/chunk-JBIN7W2B.js +11 -0
- package/dist/standalone/chunk-JHEUUNXM.js +2 -0
- package/dist/standalone/chunk-JJA7KHJK.js +1 -0
- package/dist/standalone/chunk-JVUZEYKQ.js +1 -0
- package/dist/standalone/chunk-JYMXJUJ2.js +1 -0
- package/dist/standalone/chunk-K7AJEMKE.js +1 -0
- package/dist/standalone/chunk-KDWJAKFX.js +1 -0
- package/dist/standalone/chunk-KEZZGUYY.js +3 -0
- package/dist/standalone/chunk-LC3XGRNU.js +14 -0
- package/dist/standalone/chunk-LJC5BM3X.js +1 -0
- package/dist/standalone/chunk-M6MCQSPI.js +1 -0
- package/dist/standalone/chunk-MIVYBFY3.js +1 -0
- package/dist/standalone/chunk-MNAASONZ.js +1 -0
- package/dist/standalone/chunk-MRJNT4OH.js +1 -0
- package/dist/standalone/chunk-MVKXAIW3.js +7 -0
- package/dist/standalone/chunk-N6KHKQJH.js +1 -0
- package/dist/standalone/chunk-NBC6NJFJ.js +1 -0
- package/dist/standalone/chunk-NCCAMFB6.js +1 -0
- package/dist/standalone/chunk-NE7AR3N3.js +1 -0
- package/dist/standalone/chunk-NPERN4YF.js +1 -0
- package/dist/standalone/chunk-O2FV34ZD.js +1 -0
- package/dist/standalone/chunk-OGUKYRFM.js +1 -0
- package/dist/standalone/chunk-OKG3HWSJ.js +1 -0
- package/dist/standalone/chunk-OOESPRIZ.js +1 -0
- package/dist/standalone/chunk-OOKV3V3X.js +6 -0
- package/dist/standalone/chunk-PAUQAU23.js +1 -0
- package/dist/standalone/chunk-PKCC4J5W.js +1 -0
- package/dist/standalone/chunk-PYT4RZJH.js +1 -0
- package/dist/standalone/chunk-Q3HF6P2M.js +1 -0
- package/dist/standalone/chunk-Q4CAKBWN.js +1 -0
- package/dist/standalone/chunk-QKEJLVC5.js +1 -0
- package/dist/standalone/chunk-QSOJFV42.js +1 -0
- package/dist/standalone/chunk-RK3WWWTT.js +1 -0
- package/dist/standalone/chunk-RLLKECZT.js +1 -0
- package/dist/standalone/chunk-RPQL45FL.js +1 -0
- package/dist/standalone/chunk-S3CRZLGS.js +1 -0
- package/dist/standalone/chunk-S63ID2FC.js +1 -0
- package/dist/standalone/chunk-SB35BJ7A.js +1 -0
- package/dist/standalone/chunk-SSNHCN4D.js +1 -0
- package/dist/standalone/chunk-T2IE5GKA.js +15 -0
- package/dist/standalone/chunk-TGHH7ZFA.js +1 -0
- package/dist/standalone/chunk-TJRQUJFS.js +1 -0
- package/dist/standalone/chunk-TQCXJX4I.js +1 -0
- package/dist/standalone/chunk-TRL7AHZK.js +4 -0
- package/dist/standalone/chunk-TWTNWOJU.js +1 -0
- package/dist/standalone/chunk-TZI3JW3Q.js +1 -0
- package/dist/standalone/chunk-UBVWMMQG.js +1 -0
- package/dist/standalone/chunk-UDCVU3Z5.js +1 -0
- package/dist/standalone/chunk-UKL4FSKP.js +1 -0
- package/dist/standalone/chunk-ULIQFBZU.js +1 -0
- package/dist/standalone/chunk-USC5APTS.js +1 -0
- package/dist/standalone/chunk-UWDFH35E.js +1 -0
- package/dist/standalone/chunk-UYEZR3BI.js +1 -0
- package/dist/standalone/chunk-V36AL47B.js +1 -0
- package/dist/standalone/chunk-VPPKG2IW.js +1 -0
- package/dist/standalone/chunk-VVOVVU53.js +1 -0
- package/dist/standalone/chunk-WQYWA7U6.js +1 -0
- package/dist/standalone/chunk-WR675JUF.js +1 -0
- package/dist/standalone/chunk-WUWBZPUK.js +1 -0
- package/dist/standalone/chunk-X43AA6RX.js +8 -0
- package/dist/standalone/chunk-XSLMHPP2.js +59 -0
- package/dist/standalone/chunk-XZMOZFE6.js +1 -0
- package/dist/standalone/chunk-Y4Q25F6X.js +19 -0
- package/dist/standalone/chunk-Y6CXU7T4.js +1 -0
- package/dist/standalone/chunk-YEBHHIAY.js +1 -0
- package/dist/standalone/chunk-YFLOZILV.js +1 -0
- package/dist/standalone/chunk-YFPU55K4.js +1 -0
- package/dist/standalone/chunk-YKXDMIHQ.js +1 -0
- package/dist/standalone/chunk-Z5APSEW7.js +1 -0
- package/dist/standalone/chunk-ZB74UWVA.js +1 -0
- package/dist/standalone/chunk-ZE2Q22OK.js +1 -0
- package/dist/standalone/chunk-ZOWSTFP5.js +1 -0
- package/dist/standalone/studio.js +9 -378
- package/dist/styles.css +2 -2
- package/package.json +21 -18
- package/dist/index.js +0 -41
- package/dist/mount.js +0 -26
- package/dist/packem_shared/ADMIN_FUNCTIONS-CZJCZ4c7.js +0 -47
- package/dist/packem_shared/ApiDocsPanel-yEz0fiof.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
- package/dist/packem_shared/ApiTab-DdubReQI.js +0 -251
- package/dist/packem_shared/AuditPanel-CE5ofjCc.js +0 -200
- package/dist/packem_shared/CommandPalette-BtgkBzZI.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-DpL8U-Nf.js +0 -4475
- package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/ExportImportPanel-ChsSUCYZ.js +0 -197
- package/dist/packem_shared/FileBrowser-DsRBnVhZ.js +0 -2932
- package/dist/packem_shared/FunctionRunner-D4cZ6fuA.js +0 -343
- package/dist/packem_shared/FunctionStatsPanel-BVelWgNv.js +0 -375
- package/dist/packem_shared/GlobalDataBrowser-3X9uRfdO.js +0 -289
- package/dist/packem_shared/HealthPanel-CxUVKfvo.js +0 -648
- package/dist/packem_shared/HomePanel-tfqpZxuu.js +0 -1334
- package/dist/packem_shared/InsightsPanel-DNg3K9XN.js +0 -461
- package/dist/packem_shared/LogsPanel-B4LoSRj0.js +0 -827
- package/dist/packem_shared/MailPanel-CcpdyWYs.js +0 -440
- package/dist/packem_shared/MetricsPanel-CxoyWbNb.js +0 -1611
- package/dist/packem_shared/MigrationsPanel-DGwJGWDA.js +0 -239
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
- package/dist/packem_shared/PitrPanel-CKUzyyHi.js +0 -252
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-BWNwIN3I.js +0 -262
- package/dist/packem_shared/SchemaViewer-RclXFo9Q.js +0 -2512
- package/dist/packem_shared/SecurityAdvisorPanel-Dqql1Z5O.js +0 -92
- package/dist/packem_shared/SettingsPanel-D5iTY0YE.js +0 -390
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
- package/dist/packem_shared/SqlEditorPanel-Dj-In-B3.js +0 -13
- package/dist/packem_shared/Studio-VWvKNOw4.js +0 -33
- package/dist/packem_shared/StudioApp-BhQ6T2pn.js +0 -657
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/TableEditor-BY8bTpCl.js +0 -11
- package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/app.d-BVJFkXyj.d.ts +0 -300
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-DURq3ElK.js +0 -175
- package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
- 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/grid-features-CzUfqgsM.js +0 -840
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
- package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
- package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
- package/dist/packem_shared/sql-editor-panel-CMdxstu5.js +0 -2562
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-D8ry3tJR.js +0 -11043
- package/dist/packem_shared/table-_RzNvy3R.js +0 -246
- package/dist/packem_shared/table-editor-CWx68ZCg.js +0 -407
- package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/use-admin-query-BkbdNFNz.js +0 -105
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,d as F,e as G,g as mn}from"./chunk-YKXDMIHQ.js";function zt(t,e){t.indexOf(e)===-1&&t.push(e)}i(zt,"addUniqueItem");function Mt(t,e){let o=t.indexOf(e);o>-1&&t.splice(o,1)}i(Mt,"removeItem");var U=i((t,e,o)=>o>e?e:o<t?t:o,"clamp");var vt=i(()=>{},"warning"),J=i(()=>{},"invariant");var X={};var Be=i(t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),"isNumericalString");var Ie=i(t=>typeof t=="object"&&t!==null,"isObject");var Fe=i(t=>/^0[^.\s]+$/u.test(t),"isZeroValueString");function Oe(t){let e;return()=>(e===void 0&&(e=t()),e)}i(Oe,"memo");var k=i(t=>t,"noop");var lt=i((...t)=>t.reduce((e,o)=>r=>o(e(r))),"pipe");var ft=i((t,e,o)=>{let r=e-t;return r?(o-t)/r:1},"progress");var Tt=class{static{i(this,"SubscriptionManager")}constructor(){this.subscriptions=[]}add(e){return zt(this.subscriptions,e),()=>Mt(this.subscriptions,e)}notify(e,o,r){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,o,r);else for(let a=0;a<n;a++){let s=this.subscriptions[a];s&&s(e,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var j=i(t=>t*1e3,"secondsToMilliseconds"),H=i(t=>t/1e3,"millisecondsToSeconds");var je=i((t,e)=>e?t*(1e3/e):0,"velocityPerSecond");var fn=i((t,e,o)=>(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,"calcBezier"),Tl=1e-7,Vl=12;function Sl(t,e,o,r,n){let a,s,l=0;do s=e+(o-e)/2,a=fn(s,r,n)-t,a>0?o=s:e=s;while(Math.abs(a)>Tl&&++l<Vl);return s}i(Sl,"binarySubdivide");function Ct(t,e,o,r){if(t===e&&o===r)return k;let n=i(a=>Sl(a,0,1,t,o),"getTForX");return a=>a===0||a===1?a:fn(n(a),e,r)}i(Ct,"cubicBezier");var bo=i(t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,"mirrorEasing");var wo=i(t=>e=>1-t(1-e),"reverseEasing");var Ao=Ct(.33,1.53,.69,.99),me=wo(Ao),Ne=bo(me);var Ge=i(t=>t>=1?1:(t*=2)<1?.5*me(t):.5*(2-Math.pow(2,-10*(t-1))),"anticipate");var We=i(t=>1-Math.sin(Math.acos(t)),"circIn"),Ue=wo(We),Ke=bo(We);var _r=Ct(.42,0,1,1),Yr=Ct(0,0,.58,1),ze=Ct(.42,0,.58,1);var Xr=i(t=>Array.isArray(t)&&typeof t[0]!="number","isEasingArray");var He=i(t=>Array.isArray(t)&&typeof t[0]=="number","isBezierDefinition");var pn={linear:k,easeIn:_r,easeInOut:ze,easeOut:Yr,circIn:We,circInOut:Ke,circOut:Ue,backIn:me,backInOut:Ne,backOut:Ao,anticipate:Ge},Pl=i(t=>typeof t=="string","isValidEasing"),Mo=i(t=>{if(He(t)){J(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,o,r,n]=t;return Ct(e,o,r,n)}else if(Pl(t))return J(pn[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),pn[t];return t},"easingDefinitionToFunction");var $e=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function hn(t){let e=new Set,o=new Set,r=!1,n=!1,a=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function l(c){a.has(c)&&(u.schedule(c),t()),c(s)}i(l,"triggerCallback");let u={schedule:i((c,m=!1,f=!1)=>{let d=f&&r?e:o;return m&&a.add(c),d.add(c),c},"schedule"),cancel:i(c=>{o.delete(c),a.delete(c)},"cancel"),process:i(c=>{if(s=c,r){n=!0;return}r=!0;let m=e;e=o,o=m,e.forEach(l),e.clear(),r=!1,n&&(n=!1,u.process(c))},"process")};return u}i(hn,"createRenderStep");var bl=40;function Co(t,e){let o=!1,r=!0,n={delta:0,timestamp:0,isProcessing:!1},a=i(()=>o=!0,"flagRunNextFrame"),s=$e.reduce((T,S)=>(T[S]=hn(a),T),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:m,update:f,preRender:p,render:d,postRender:h}=s,g=i(()=>{let T=X.useManualTiming,S=T?n.timestamp:performance.now();o=!1,T||(n.delta=r?1e3/60:Math.max(Math.min(S-n.timestamp,bl),1)),n.timestamp=S,n.isProcessing=!0,l.process(n),u.process(n),c.process(n),m.process(n),f.process(n),p.process(n),d.process(n),h.process(n),n.isProcessing=!1,o&&e&&(r=!1,t(g))},"processBatch"),x=i(()=>{o=!0,r=!0,n.isProcessing||t(g)},"wake");return{schedule:$e.reduce((T,S)=>{let M=s[S];return T[S]=(E,D=!1,b=!1)=>(o||x(),M.schedule(E,D,b)),T},{}),cancel:i(T=>{for(let S=0;S<$e.length;S++)s[$e[S]].cancel(T)},"cancel"),state:n,steps:s}}i(Co,"createRenderBatcher");var{schedule:w,cancel:Q,state:O,steps:_e}=Co(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0);var Do;function wl(){Do=void 0}i(wl,"clearTime");var B={now:i(()=>(Do===void 0&&B.set(O.isProcessing||X.useManualTiming?O.timestamp:performance.now()),Do),"now"),set:i(t=>{Do=t,queueMicrotask(wl)},"set")};var dn=i(t=>e=>typeof e=="string"&&e.startsWith(t),"checkStringStartsWith"),Eo=dn("--"),Al=dn("var(--"),fe=i(t=>Al(t)?Ml.test(t.split("/*")[0].trim()):!1,"isCSSVariableToken"),Ml=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qr(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}i(qr,"containsCSSVariable");var pt={test:i(t=>typeof t=="number","test"),parse:parseFloat,transform:i(t=>t,"transform")},Vt={...pt,transform:i(t=>U(0,1,t),"transform")},Ye={...pt,default:1};var Dt=i(t=>Math.round(t*1e5)/1e5,"sanitize");var pe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gn(t){return t==null}i(gn,"isNullish");var xn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var he=i((t,e)=>o=>!!(typeof o=="string"&&xn.test(o)&&o.startsWith(t)||e&&!gn(o)&&Object.prototype.hasOwnProperty.call(o,e)),"isColorString"),Ro=i((t,e,o)=>r=>{if(typeof r!="string")return r;let[n,a,s,l]=r.match(pe);return{[t]:parseFloat(n),[e]:parseFloat(a),[o]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},"splitColor");var Cl=i(t=>U(0,255,t),"clampRgbUnit"),Zr={...pt,transform:i(t=>Math.round(Cl(t)),"transform")},ht={test:he("rgb","red"),parse:Ro("red","green","blue"),transform:i(({red:t,green:e,blue:o,alpha:r=1})=>"rgba("+Zr.transform(t)+", "+Zr.transform(e)+", "+Zr.transform(o)+", "+Dt(Vt.transform(r))+")","transform")};function Dl(t){let e="",o="",r="",n="";return t.length>5?(e=t.substring(1,3),o=t.substring(3,5),r=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),o=t.substring(2,3),r=t.substring(3,4),n=t.substring(4,5),e+=e,o+=o,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}}i(Dl,"parseHex");var Xe={test:he("#"),parse:Dl,transform:ht.transform};var qe=i(t=>({test:i(e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,"test"),parse:parseFloat,transform:i(e=>`${e}${t}`,"transform")}),"createUnitType"),rt=qe("deg"),Y=qe("%"),v=qe("px"),Jr=qe("vh"),Qr=qe("vw"),Lo={...Y,parse:i(t=>Y.parse(t)/100,"parse"),transform:i(t=>Y.transform(t*100),"transform")};var Et={test:he("hsl","hue"),parse:Ro("hue","saturation","lightness"),transform:i(({hue:t,saturation:e,lightness:o,alpha:r=1})=>"hsla("+Math.round(t)+", "+Y.transform(Dt(e))+", "+Y.transform(Dt(o))+", "+Dt(Vt.transform(r))+")","transform")};var R={test:i(t=>ht.test(t)||Xe.test(t)||Et.test(t),"test"),parse:i(t=>ht.test(t)?ht.parse(t):Et.test(t)?Et.parse(t):Xe.parse(t),"parse"),transform:i(t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):Et.transform(t),"transform"),getAnimatableNone:i(t=>{let e=R.parse(t);return e.alpha=0,R.transform(e)},"getAnimatableNone")};var yn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function El(t){return isNaN(t)&&typeof t=="string"&&(t.match(pe)?.length||0)+(t.match(yn)?.length||0)>0}i(El,"test");var Tn="number",Vn="color",Rl="var",Ll="var(",vn="${}",kl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rt(t){let e=t.toString(),o=[],r={color:[],number:[],var:[]},n=[],a=0,l=e.replace(kl,u=>(R.test(u)?(r.color.push(a),n.push(Vn),o.push(R.parse(u))):u.startsWith(Ll)?(r.var.push(a),n.push(Rl),o.push(u)):(r.number.push(a),n.push(Tn),o.push(parseFloat(u))),++a,vn)).split(vn);return{values:o,split:l,indexes:r,types:n}}i(Rt,"analyseComplexValue");function Bl(t){return Rt(t).values}i(Bl,"parseComplexValue");function Sn({split:t,types:e}){let o=t.length;return r=>{let n="";for(let a=0;a<o;a++)if(n+=t[a],r[a]!==void 0){let s=e[a];s===Tn?n+=Dt(r[a]):s===Vn?n+=R.transform(r[a]):n+=r[a]}return n}}i(Sn,"buildTransformer");function Il(t){return Sn(Rt(t))}i(Il,"createTransformer");var Fl=i(t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t,"convertNumbersToZero"),Ol=i((t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Fl(t),"convertToZero");function jl(t){let e=Rt(t);return Sn(e)(e.values.map((r,n)=>Ol(r,e.split[n])))}i(jl,"getAnimatableNone");var K={test:El,parse:Bl,createTransformer:Il,getAnimatableNone:jl};function ti(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(e-t)*6*o:o<1/2?e:o<2/3?t+(e-t)*(2/3-o)*6:t}i(ti,"hueToRgb");function Pn({hue:t,saturation:e,lightness:o,alpha:r}){t/=360,e/=100,o/=100;let n=0,a=0,s=0;if(!e)n=a=s=o;else{let l=o<.5?o*(1+e):o+e-o*e,u=2*o-l;n=ti(u,l,t+1/3),a=ti(u,l,t),s=ti(u,l,t-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}i(Pn,"hslaToRgba");function de(t,e){return o=>o>0?e:t}i(de,"mixImmediate");var A=i((t,e,o)=>t+(e-t)*o,"mixNumber");var ei=i((t,e,o)=>{let r=t*t,n=o*(e*e-r)+r;return n<0?0:Math.sqrt(n)},"mixLinearColor"),Nl=[Xe,ht,Et],Gl=i(t=>Nl.find(e=>e.test(t)),"getColorType");function bn(t){let e=Gl(t);if(vt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let o=e.parse(t);return e===Et&&(o=Pn(o)),o}i(bn,"asRGBA");var oi=i((t,e)=>{let o=bn(t),r=bn(e);if(!o||!r)return de(t,e);let n={...o};return a=>(n.red=ei(o.red,r.red,a),n.green=ei(o.green,r.green,a),n.blue=ei(o.blue,r.blue,a),n.alpha=A(o.alpha,r.alpha,a),ht.transform(n))},"mixColor");var ko=new Set(["none","hidden"]);function wn(t,e){return ko.has(t)?o=>o<=0?t:e:o=>o>=1?e:t}i(wn,"mixVisibility");function Wl(t,e){return o=>A(t,e,o)}i(Wl,"mixNumber");function Bo(t){return typeof t=="number"?Wl:typeof t=="string"?fe(t)?de:R.test(t)?oi:zl:Array.isArray(t)?An:typeof t=="object"?R.test(t)?oi:Ul:de}i(Bo,"getMixer");function An(t,e){let o=[...t],r=o.length,n=t.map((a,s)=>Bo(a)(a,e[s]));return a=>{for(let s=0;s<r;s++)o[s]=n[s](a);return o}}i(An,"mixArray");function Ul(t,e){let o={...t,...e},r={};for(let n in o)t[n]!==void 0&&e[n]!==void 0&&(r[n]=Bo(t[n])(t[n],e[n]));return n=>{for(let a in r)o[a]=r[a](n);return o}}i(Ul,"mixObject");function Kl(t,e){let o=[],r={color:0,var:0,number:0};for(let n=0;n<e.values.length;n++){let a=e.types[n],s=t.indexes[a][r[a]],l=t.values[s]??0;o[n]=l,r[a]++}return o}i(Kl,"matchOrder");var zl=i((t,e)=>{let o=K.createTransformer(e),r=Rt(t),n=Rt(e);return r.indexes.var.length===n.indexes.var.length&&r.indexes.color.length===n.indexes.color.length&&r.indexes.number.length>=n.indexes.number.length?ko.has(t)&&!n.values.length||ko.has(e)&&!r.values.length?wn(t,e):lt(An(Kl(r,n),n.values),o):(vt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),de(t,e))},"mixComplex");function Io(t,e,o){return typeof t=="number"&&typeof e=="number"&&typeof o=="number"?A(t,e,o):Bo(t)(t,e)}i(Io,"mix");var Mn=i(t=>{let e=i(({timestamp:o})=>t(o),"passTimestamp");return{start:i((o=!0)=>w.update(e,o),"start"),stop:i(()=>Q(e),"stop"),now:i(()=>O.isProcessing?O.timestamp:B.now(),"now")}},"frameloopDriver");var Fo=i((t,e,o=10)=>{let r="",n=Math.max(Math.round(e/o),2);for(let a=0;a<n;a++)r+=Math.round(t(a/(n-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},"generateLinearEasing");function ge(t){let e=0,o=50,r=t.next(e);for(;!r.done&&e<2e4;)e+=o,r=t.next(e);return e>=2e4?1/0:e}i(ge,"calcGeneratorDuration");function Cn(t,e=100,o){let r=o({...t,keyframes:[0,e]}),n=Math.min(ge(r),2e4);return{type:"keyframes",ease:i(a=>r.next(n*a).value/e,"ease"),duration:H(n)}}i(Cn,"createGeneratorEasing");var I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ni(t,e){return t*Math.sqrt(1-e*e)}i(ni,"calcAngularFreq");var Hl=12;function $l(t,e,o){let r=o;for(let n=1;n<Hl;n++)r=r-t(r)/e(r);return r}i($l,"approximateRoot");var ii=.001;function _l({duration:t=I.duration,bounce:e=I.bounce,velocity:o=I.velocity,mass:r=I.mass}){let n,a;vt(t<=j(I.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-e;s=U(I.minDamping,I.maxDamping,s),t=U(I.minDuration,I.maxDuration,H(t)),s<1?(n=i(c=>{let m=c*s,f=m*t,p=m-o,d=ni(c,s),h=Math.exp(-f);return ii-p/d*h},"envelope"),a=i(c=>{let f=c*s*t,p=f*o+o,d=Math.pow(s,2)*Math.pow(c,2)*t,h=Math.exp(-f),g=ni(Math.pow(c,2),s);return(-n(c)+ii>0?-1:1)*((p-d)*h)/g},"derivative")):(n=i(c=>{let m=Math.exp(-c*t),f=(c-o)*t+1;return-ii+m*f},"envelope"),a=i(c=>{let m=Math.exp(-c*t),f=(o-c)*(t*t);return m*f},"derivative"));let l=5/t,u=$l(n,a,l);if(t=j(t),isNaN(u))return{stiffness:I.stiffness,damping:I.damping,duration:t};{let c=Math.pow(u,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}i(_l,"findSpring");var Yl=["duration","bounce"],Xl=["stiffness","damping","mass"];function Dn(t,e){return e.some(o=>t[o]!==void 0)}i(Dn,"isSpringType");function ql(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!Dn(t,Xl)&&Dn(t,Yl))if(e.velocity=0,t.visualDuration){let o=t.visualDuration,r=2*Math.PI/(o*1.2),n=r*r,a=2*U(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:I.mass,stiffness:n,damping:a}}else{let o=_l({...t,velocity:0});e={...e,...o,mass:I.mass},e.isResolvedFromDuration=!0}return e}i(ql,"getSpringOptions");function xe(t=I.visualDuration,e=I.bounce){let o=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:r,restDelta:n}=o,a=o.keyframes[0],s=o.keyframes[o.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:c,mass:m,duration:f,velocity:p,isResolvedFromDuration:d}=ql({...o,velocity:-H(o.velocity||0)}),h=p||0,g=c/(2*Math.sqrt(u*m)),x=s-a,y=H(Math.sqrt(u/m)),V=Math.abs(x)<5;r||(r=V?I.restSpeed.granular:I.restSpeed.default),n||(n=V?I.restDelta.granular:I.restDelta.default);let T,S,M,E,D,b;if(g<1)M=ni(y,g),E=(h+g*y*x)/M,T=i(P=>{let N=Math.exp(-g*y*P);return s-N*(E*Math.sin(M*P)+x*Math.cos(M*P))},"resolveSpring"),D=g*y*E+x*M,b=g*y*x-E*M,S=i(P=>Math.exp(-g*y*P)*(D*Math.sin(M*P)+b*Math.cos(M*P)),"resolveVelocity");else if(g===1){T=i(N=>s-Math.exp(-y*N)*(x+(h+y*x)*N),"resolveSpring");let P=h+y*x;S=i(N=>Math.exp(-y*N)*(y*P*N-h),"resolveVelocity")}else{let P=y*Math.sqrt(g*g-1);T=i(ut=>{let yt=Math.exp(-g*y*ut),mt=Math.min(P*ut,300);return s-yt*((h+g*y*x)*Math.sinh(mt)+P*x*Math.cosh(mt))/P},"resolveSpring");let N=(h+g*y*x)/P,Z=g*y*N-x*P,Ut=g*y*x-N*P;S=i(ut=>{let yt=Math.exp(-g*y*ut),mt=Math.min(P*ut,300);return yt*(Z*Math.sinh(mt)+Ut*Math.cosh(mt))},"resolveVelocity")}let $={calculatedDuration:d&&f||null,velocity:i(P=>j(S(P)),"velocity"),next:i(P=>{if(!d&&g<1){let Z=Math.exp(-g*y*P),Ut=Math.sin(M*P),ut=Math.cos(M*P),yt=s-Z*(E*Ut+x*ut),mt=j(Z*(D*Ut+b*ut));return l.done=Math.abs(mt)<=r&&Math.abs(s-yt)<=n,l.value=l.done?s:yt,l}let N=T(P);if(d)l.done=P>=f;else{let Z=j(S(P));l.done=Math.abs(Z)<=r&&Math.abs(s-N)<=n}return l.value=l.done?s:N,l},"next"),toString:i(()=>{let P=Math.min(ge($),2e4),N=Fo(Z=>$.next(P*Z).value,P,30);return P+"ms "+N},"toString"),toTransition:i(()=>{},"toTransition")};return $}i(xe,"spring");xe.applyToOptions=t=>{let e=Cn(t,100,xe);return t.ease=e.ease,t.duration=j(e.duration),t.type="keyframes",t};var Zl=5;function Oo(t,e,o){let r=Math.max(e-Zl,0);return je(o-t(r),e-r)}i(Oo,"getGeneratorVelocity");function Ze({keyframes:t,velocity:e=0,power:o=.8,timeConstant:r=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:s,min:l,max:u,restDelta:c=.5,restSpeed:m}){let f=t[0],p={done:!1,value:f},d=i(b=>l!==void 0&&b<l||u!==void 0&&b>u,"isOutOfBounds"),h=i(b=>l===void 0?u:u===void 0||Math.abs(l-b)<Math.abs(u-b)?l:u,"nearestBoundary"),g=o*e,x=f+g,y=s===void 0?x:s(x);y!==x&&(g=y-f);let V=i(b=>-g*Math.exp(-b/r),"calcDelta"),T=i(b=>y+V(b),"calcLatest"),S=i(b=>{let $=V(b),P=T(b);p.done=Math.abs($)<=c,p.value=p.done?y:P},"applyFriction"),M,E,D=i(b=>{d(p.value)&&(M=b,E=xe({keyframes:[p.value,h(p.value)],velocity:Oo(T,b,p.value),damping:n,stiffness:a,restDelta:c,restSpeed:m}))},"checkCatchBoundary");return D(0),{calculatedDuration:null,next:i(b=>{let $=!1;return!E&&M===void 0&&($=!0,S(b),D(b)),M!==void 0&&b>=M?E.next(b-M):(!$&&S(b),p)},"next")}}i(Ze,"inertia");function Jl(t,e,o){let r=[],n=o||X.mix||Io,a=t.length-1;for(let s=0;s<a;s++){let l=n(t[s],t[s+1]);if(e){let u=Array.isArray(e)?e[s]||k:e;l=lt(u,l)}r.push(l)}return r}i(Jl,"createMixers");function En(t,e,{clamp:o=!0,ease:r,mixer:n}={}){let a=t.length;if(J(a===e.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];let s=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());let l=Jl(e,r,n),u=l.length,c=i(m=>{if(s&&m<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(m<t[f+1]);f++);let p=ft(t[f],t[f+1],m);return l[f](p)},"interpolator");return o?m=>c(U(t[0],t[a-1],m)):c}i(En,"interpolate");function Rn(t,e){let o=t[t.length-1];for(let r=1;r<=e;r++){let n=ft(0,e,r);t.push(A(o,1,n))}}i(Rn,"fillOffset");function Ln(t){let e=[0];return Rn(e,t.length-1),e}i(Ln,"defaultOffset");function kn(t,e){return t.map(o=>o*e)}i(kn,"convertOffsetToTimes");function Ql(t,e){return t.map(()=>e||ze).splice(0,t.length-1)}i(Ql,"defaultEasing");function Ht({duration:t=300,keyframes:e,times:o,ease:r="easeInOut"}){let n=Xr(r)?r.map(Mo):Mo(r),a={done:!1,value:e[0]},s=kn(o&&o.length===e.length?o:Ln(e),t),l=En(s,e,{ease:Array.isArray(n)?n:Ql(e,n)});return{calculatedDuration:t,next:i(u=>(a.value=l(u),a.done=u>=t,a),"next")}}i(Ht,"keyframes");var tc=i(t=>t!==null,"isNotNull");function Lt(t,{repeat:e,repeatType:o="loop"},r,n=1){let a=t.filter(tc),l=n<0||e&&o!=="loop"&&e%2===1?0:a.length-1;return!l||r===void 0?a[l]:r}i(Lt,"getFinalKeyframe");var ec={decay:Ze,inertia:Ze,tween:Ht,keyframes:Ht,spring:xe};function jo(t){typeof t.type=="string"&&(t.type=ec[t.type])}i(jo,"replaceTransitionType");var kt=class{static{i(this,"WithPromise")}constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,o){return this.finished.then(e,o)}};var oc=i(t=>t/100,"percentToProgress"),St=class extends kt{static{i(this,"JSAnimation")}constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==B.now()&&this.tick(B.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;jo(e);let{type:o=Ht,repeat:r=0,repeatDelay:n=0,repeatType:a,velocity:s=0}=e,{keyframes:l}=e,u=o||Ht;u!==Ht&&typeof l[0]!="number"&&(this.mixKeyframes=lt(oc,Io(l[0],l[1])),l=[0,100]);let c=u({...e,keyframes:l});a==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...l].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=ge(c));let{calculatedDuration:m}=c;this.calculatedDuration=m,this.resolvedDuration=m+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=c}updateTime(e){let o=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(e,o=!1){let{generator:r,totalDuration:n,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);let{delay:c=0,keyframes:m,repeat:f,repeatType:p,repeatDelay:d,type:h,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),o?this.currentTime=e:this.updateTime(e);let y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),V=this.playbackSpeed>=0?y<0:y>n;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let T=this.currentTime,S=r;if(f){let b=Math.min(this.currentTime,n)/l,$=Math.floor(b),P=b%1;!P&&b>=1&&(P=1),P===1&&$--,$=Math.min($,f+1),$%2&&(p==="reverse"?(P=1-P,d&&(P-=d/l)):p==="mirror"&&(S=s)),T=U(0,1,P)*l}let M;V?(this.delayState.value=m[0],M=this.delayState):M=S.next(T),a&&!V&&(M.value=a(M.value));let{done:E}=M;!V&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return D&&h!==Ze&&(M.value=Lt(m,this.options,x,this.speed)),g&&g(M.value),D&&this.finish(),M}then(e,o){return this.finished.then(e,o)}get duration(){return H(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(this.currentTime)}set time(e){e=j(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let o=this.generator.next(e).value;return Oo(r=>this.generator.next(r).value,e,o)}get speed(){return this.playbackSpeed}set speed(e){let o=this.playbackSpeed!==e;o&&this.driver&&this.updateTime(B.now()),this.playbackSpeed=e,o&&this.driver&&(this.time=H(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Mn,startTime:o}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),this.options.onPlay?.();let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(B.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Bn(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}i(Bn,"fillWildcards");var $t=i(t=>t*180/Math.PI,"radToDeg"),si=i(t=>{let e=$t(Math.atan2(t[1],t[0]));return ai(e)},"rotate"),rc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i(t=>(Math.abs(t[0])+Math.abs(t[3]))/2,"scale"),rotate:si,rotateZ:si,skewX:i(t=>$t(Math.atan(t[1])),"skewX"),skewY:i(t=>$t(Math.atan(t[2])),"skewY"),skew:i(t=>(Math.abs(t[1])+Math.abs(t[2]))/2,"skew")},ai=i(t=>(t=t%360,t<0&&(t+=360),t),"rebaseAngle"),In=si,Fn=i(t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),"scaleX"),On=i(t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),"scaleY"),ic={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fn,scaleY:On,scale:i(t=>(Fn(t)+On(t))/2,"scale"),rotateX:i(t=>ai($t(Math.atan2(t[6],t[5]))),"rotateX"),rotateY:i(t=>ai($t(Math.atan2(-t[2],t[0]))),"rotateY"),rotateZ:In,rotate:In,skewX:i(t=>$t(Math.atan(t[4])),"skewX"),skewY:i(t=>$t(Math.atan(t[1])),"skewY"),skew:i(t=>(Math.abs(t[1])+Math.abs(t[4]))/2,"skew")};function No(t){return t.includes("scale")?1:0}i(No,"defaultTransformValue");function Go(t,e){if(!t||t==="none")return No(e);let o=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,n;if(o)r=ic,n=o;else{let l=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=rc,n=l}if(!n)return No(e);let a=r[e],s=n[1].split(",").map(nc);return typeof a=="function"?a(s):s[a]}i(Go,"parseValueFromTransform");var jn=i((t,e)=>{let{transform:o="none"}=getComputedStyle(t);return Go(o,e)},"readTransformValue");function nc(t){return parseFloat(t.trim())}i(nc,"convertTransformToNumber");var dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set([...dt,"pathRotation"]);var li=i(t=>t===pt||t===v,"isNumOrPxType"),sc=new Set(["x","y","z"]),ac=dt.filter(t=>!sc.has(t));function Nn(t){let e=[];return ac.forEach(o=>{let r=t.getValue(o);r!==void 0&&(e.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),e}i(Nn,"removeNonTranslationalTransform");var Pt={width:i(({x:t},{paddingLeft:e="0",paddingRight:o="0",boxSizing:r})=>{let n=t.max-t.min;return r==="border-box"?n:n-parseFloat(e)-parseFloat(o)},"width"),height:i(({y:t},{paddingTop:e="0",paddingBottom:o="0",boxSizing:r})=>{let n=t.max-t.min;return r==="border-box"?n:n-parseFloat(e)-parseFloat(o)},"height"),top:i((t,{top:e})=>parseFloat(e),"top"),left:i((t,{left:e})=>parseFloat(e),"left"),bottom:i(({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),"bottom"),right:i(({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),"right"),x:i((t,{transform:e})=>Go(e,"x"),"x"),y:i((t,{transform:e})=>Go(e,"y"),"y")};Pt.translateX=Pt.x;Pt.translateY=Pt.y;var _t=new Set,ci=!1,ui=!1,mi=!1;function Gn(){if(ui){let t=Array.from(_t).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),o=new Map;e.forEach(r=>{let n=Nn(r);n.length&&(o.set(r,n),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();let n=o.get(r);n&&n.forEach(([a,s])=>{r.getValue(a)?.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ui=!1,ci=!1,_t.forEach(t=>t.complete(mi)),_t.clear()}i(Gn,"measureAllKeyframes");function Wn(){_t.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ui=!0)})}i(Wn,"readAllKeyframes");function Un(){mi=!0,Wn(),Gn(),mi=!1}i(Un,"flushKeyframeResolvers");var Bt=class{static{i(this,"KeyframeResolver")}constructor(e,o,r,n,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=o,this.name=r,this.motionValue=n,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(_t.add(this),ci||(ci=!0,w.read(Wn),w.resolveKeyframes(Gn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:o,element:r,motionValue:n}=this;if(e[0]===null){let a=n?.get(),s=e[e.length-1];if(a!==void 0)e[0]=a;else if(r&&o){let l=r.readValue(o,s);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=s),n&&a===void 0&&n.set(e[0])}Bn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),_t.delete(this)}cancel(){this.state==="scheduled"&&(_t.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Kn=i(t=>t.startsWith("--"),"isCSSVar");function Wo(t,e,o){Kn(e)?t.style.setProperty(e,o):t.style[e]=o}i(Wo,"setStyle");var zn={};function Uo(t,e){let o=Oe(t);return()=>zn[e]??o()}i(Uo,"memoSupports");var Hn=Uo(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var Ko=Uo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var Yt=i(([t,e,o,r])=>`cubic-bezier(${t}, ${e}, ${o}, ${r})`,"cubicBezierAsString");var fi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yt([0,.65,.55,1]),circOut:Yt([.55,0,1,.45]),backIn:Yt([.31,.01,.66,-.59]),backOut:Yt([.33,1.53,.69,.99])};function pi(t,e){if(t)return typeof t=="function"?Ko()?Fo(t,e):"ease-out":He(t)?Yt(t):Array.isArray(t)?t.map(o=>pi(o,e)||fi.easeOut):fi[t]}i(pi,"mapEasingToNativeEasing");function $n(t,e,o,{delay:r=0,duration:n=300,repeat:a=0,repeatType:s="loop",ease:l="easeOut",times:u}={},c=void 0){let m={[e]:o};u&&(m.offset=u);let f=pi(l,n);Array.isArray(f)&&(m.easing=f);let p={delay:r,duration:n,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),t.animate(m,p)}i($n,"startWaapiAnimation");function zo(t){return typeof t=="function"&&"applyToOptions"in t}i(zo,"isGenerator");function _n({type:t,...e}){return zo(t)&&Ko()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}i(_n,"applyGeneratorOptions");var ye=class extends kt{static{i(this,"NativeAnimation")}constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:o,name:r,keyframes:n,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:l,onComplete:u}=e;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=e,J(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=_n(e);this.animation=$n(o,r,n,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let m=Lt(n,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(m),Wo(o,r,m),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return H(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(Number(this.animation.currentTime)||0)}set time(e){let o=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=j(e),o&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:o,rangeEnd:r,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Hn()?(this.animation.timeline=e,o&&(this.animation.rangeStart=o),r&&(this.animation.rangeEnd=r),k):n(this)}};var Yn={anticipate:Ge,backInOut:Ne,circInOut:Ke};function lc(t){return t in Yn}i(lc,"isUnsupportedEase");function Xn(t){typeof t.ease=="string"&&lc(t.ease)&&(t.ease=Yn[t.ease])}i(Xn,"replaceStringEasing");var hi=10,Ho=class extends ye{static{i(this,"NativeAnimationExtended")}constructor(e){Xn(e),jo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:o,onUpdate:r,onComplete:n,element:a,...s}=this.options;if(!o)return;if(e!==void 0){o.set(e);return}let l=new St({...s,autoplay:!1}),u=Math.max(hi,B.now()-this.startTime),c=U(0,hi,u-hi),m=l.sample(u).value,{name:f}=this.options;a&&f&&Wo(a,f,m),o.setWithVelocity(l.sample(Math.max(0,u-c)).value,m,c),l.stop()}};var di=i((t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(K.test(t)||t==="0")&&!t.startsWith("url(")),"isAnimatable");function cc(t){let e=t[0];if(t.length===1)return!0;for(let o=0;o<t.length;o++)if(t[o]!==e)return!0}i(cc,"hasKeyframesChanged");function qn(t,e,o,r){let n=t[0];if(n===null)return!1;if(e==="display"||e==="visibility")return!0;let a=t[t.length-1],s=di(n,e),l=di(a,e);return vt(s===l,`You are trying to animate ${e} from "${n}" to "${a}". "${s?a:n}" is not an animatable value.`,"value-not-animatable"),!s||!l?!1:cc(t)||(o==="spring"||zo(o))&&r}i(qn,"canAnimate");function Je(t){t.duration=0,t.type="keyframes"}i(Je,"makeAnimationInstant");var $o=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);var uc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Zn(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&uc.test(t[e]))return!0;return!1}i(Zn,"hasBrowserOnlyColors");var mc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),fc=Oe(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Jn(t){let{motionValue:e,name:o,repeatDelay:r,repeatType:n,damping:a,type:s,keyframes:l}=t,u=e?.owner?.current;if(!(u instanceof HTMLElement)&&!(u instanceof SVGElement))return!1;let{onUpdate:c,transformTemplate:m}=e.owner.getProps();return fc()&&o&&($o.has(o)||mc.has(o)&&Zn(l))&&(o!=="transform"||!m)&&!c&&!r&&n!=="mirror"&&a!==0&&s!=="inertia"}i(Jn,"supportsBrowserAnimation");var pc=40,_o=class extends kt{static{i(this,"AsyncMotionValueAnimation")}constructor({autoplay:e=!0,delay:o=0,type:r="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:s="loop",keyframes:l,name:u,motionValue:c,element:m,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=B.now();let p={autoplay:e,delay:o,type:r,repeat:n,repeatDelay:a,repeatType:s,name:u,motionValue:c,element:m,...f},d=m?.KeyframeResolver||Bt;this.keyframeResolver=new d(l,(h,g,x)=>this.onKeyframesResolved(h,g,p,!x),u,c,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,o,r,n){this.keyframeResolver=void 0;let{name:a,type:s,velocity:l,delay:u,isHandoff:c,onUpdate:m}=r;this.resolvedAt=B.now();let f=!0;qn(e,a,s,l)||(f=!1,(X.instantAnimations||!u)&&m?.(Lt(e,r,o)),e[0]=e[e.length-1],Je(r),r.repeat=0);let d={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>pc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:e},h=f&&!c&&Jn(d),g=d.motionValue?.owner?.current,x;if(h)try{x=new Ho({...d,element:g})}catch{x=new St(d)}else x=new St(d);x.finished.then(()=>{this.notifyFinished()}).catch(k),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(e,o){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Un()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Yo(t,e,o,r=0,n=1){let a=Array.from(t).sort((c,m)=>c.sortNodePosition(m)).indexOf(e),s=t.size,l=(s-1)*r;return typeof o=="function"?o(a,s):n===1?a*r:l-a*r}i(Yo,"calcChildStagger");var Qn=30,hc=i(t=>!isNaN(parseFloat(t)),"isFloat"),ts={current:void 0},gi=class{static{i(this,"MotionValue")}constructor(e,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let n=B.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=o.owner}setCurrent(e){this.current=e,this.updatedAt=B.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=hc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,o){this.events[e]||(this.events[e]=new Tt);let r=this.events[e].add(o);return e==="change"?()=>{r(),w.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,o){this.passiveEffect=e,this.stopPassiveEffect=o}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,o=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ts.current&&ts.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=B.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Qn)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Qn);return je(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(e){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=e(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function ct(t,e){return new gi(t,e)}i(ct,"motionValue");function Xo(t,e){if(t?.inherit&&e){let{inherit:o,...r}=t;return{...e,...r}}return t}i(Xo,"resolveTransition");function ve(t,e){let o=t?.[e]??t?.default??t;return o!==t?Xo(o,t):o}i(ve,"getValueTransition");var dc={type:"spring",stiffness:500,damping:25,restSpeed:10},gc=i(t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),"criticallyDampedSpring"),xc={type:"keyframes",duration:.8},yc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},es=i((t,{keyframes:e})=>e.length>2?xc:it.has(t)?t.startsWith("scale")?gc(e[1]):dc:yc,"getDefaultTransition");var vc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function os(t){for(let e in t)if(!vc.has(e))return!0;return!1}i(os,"isTransitionDefined");var Xt=i((t,e,o,r={},n,a)=>s=>{let l=ve(r,t)||{},u=l.delay||r.delay||0,{elapsed:c=0}=r;c=c-j(u);let m={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:i(p=>{e.set(p),l.onUpdate&&l.onUpdate(p)},"onUpdate"),onComplete:i(()=>{s(),l.onComplete&&l.onComplete()},"onComplete"),name:t,motionValue:e,element:a?void 0:n};os(l)||Object.assign(m,es(t,m)),m.duration&&(m.duration=j(m.duration)),m.repeatDelay&&(m.repeatDelay=j(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let f=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Je(m),m.delay===0&&(f=!0)),(X.instantAnimations||X.skipAnimations||n?.shouldSkipAnimations||l.skipAnimations)&&(f=!0,Je(m),m.delay=0),m.allowFlatten=!l.type&&!l.ease,f&&!a&&e.get()!==void 0){let p=Lt(m.keyframes,l);if(p!==void 0){w.update(()=>{m.onUpdate(p),m.onComplete()});return}}return l.isSync?new St(m):new _o(m)},"animateMotionValue");var Tc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vc(t){let e=Tc.exec(t);if(!e)return[,];let[,o,r,n]=e;return[`--${o??r}`,n]}i(Vc,"parseCSSVariable");var Sc=4;function xi(t,e,o=1){J(o<=Sc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,n]=Vc(t);if(!r)return;let a=window.getComputedStyle(e).getPropertyValue(r);if(a){let s=a.trim();return Be(s)?parseFloat(s):s}return fe(n)?xi(n,e,o+1):n}i(xi,"getVariableValue");function rs(t){let e=[{},{}];return t?.values.forEach((o,r)=>{e[0][r]=o.get(),e[1][r]=o.getVelocity()}),e}i(rs,"getValueState");function qt(t,e,o,r){if(typeof e=="function"){let[n,a]=rs(r);e=e(o!==void 0?o:t.custom,n,a)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){let[n,a]=rs(r);e=e(o!==void 0?o:t.custom,n,a)}return e}i(qt,"resolveVariantFromProps");function tt(t,e,o){let r=t.getProps();return qt(r,e,o!==void 0?o:r.custom,t)}i(tt,"resolveVariant");var qo=new Set(["width","height","top","left","right","bottom",...dt]);var Qe=i(t=>Array.isArray(t),"isKeyframesTarget");function Pc(t,e,o){t.hasValue(e)?t.getValue(e).set(o):t.addValue(e,ct(o))}i(Pc,"setMotionValue");function bc(t){return Qe(t)?t[t.length-1]||0:t}i(bc,"resolveFinalValueInKeyframes");function is(t,e){let o=tt(t,e),{transitionEnd:r={},transition:n={},...a}=o||{};a={...a,...r};for(let s in a){let l=bc(a[s]);Pc(t,s,l)}}i(is,"setTarget");var C=i(t=>!!(t&&t.getVelocity),"isMotionValue");function ns(t){return!!(C(t)&&t.add)}i(ns,"isWillChangeMotionValue");function Te(t,e){let o=t.getValue("willChange");if(ns(o))return o.add(e);if(!o&&X.WillChange){let r=new X.WillChange("auto");t.addValue("willChange",r),r.add(e)}}i(Te,"addValueToWillChange");function Ve(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}i(Ve,"camelToDash");var ss="framerAppearId",to="data-"+Ve(ss);function Zo(t){return t.props[to]}i(Zo,"getOptimisedAppearId");function wc({protectedKeys:t,needsAnimating:e},o){let r=t.hasOwnProperty(o)&&e[o]!==!0;return e[o]=!1,r}i(wc,"shouldBlockAnimation");function Jo(t,e,{delay:o=0,transitionOverride:r,type:n}={}){let{transition:a,transitionEnd:s,...l}=e,u=t.getDefaultTransition();a=a?Xo(a,u):u;let c=a?.reduceMotion,m=a?.skipAnimations;r&&(a=r);let f=[],p=n&&t.animationState&&t.animationState.getState()[n],d=a?.path;d&&d.animateVisualElement(t,l,a,o,f);for(let h in l){let g=t.getValue(h,t.latestValues[h]??null),x=l[h];if(x===void 0||p&&wc(p,h))continue;let y={delay:o,...ve(a||{},h)};m&&(y.skipAnimations=!0);let V=g.get();if(V!==void 0&&!g.isAnimating()&&!Array.isArray(x)&&x===V&&!y.velocity){w.update(()=>g.set(x));continue}let T=!1;if(window.MotionHandoffAnimation){let E=Zo(t);if(E){let D=window.MotionHandoffAnimation(E,h,w);D!==null&&(y.startTime=D,T=!0)}}Te(t,h);let S=c??t.shouldReduceMotion;g.start(Xt(h,g,x,S&&qo.has(h)?{type:!1}:y,t,T));let M=g.animation;M&&f.push(M)}if(s){let h=i(()=>w.update(()=>{s&&is(t,s)}),"applyTransitionEnd");f.length?Promise.all(f).then(h):h()}return f}i(Jo,"animateTarget");function Qo(t,e,o={}){let r=tt(t,e,o.type==="exit"?t.presenceContext?.custom:void 0),{transition:n=t.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(n=o.transitionOverride);let a=r?()=>Promise.all(Jo(t,r,o)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(u=0)=>{let{delayChildren:c=0,staggerChildren:m,staggerDirection:f}=n;return Ac(t,e,u,c,m,f,o)}:()=>Promise.resolve(),{when:l}=n;if(l){let[u,c]=l==="beforeChildren"?[a,s]:[s,a];return u().then(()=>c())}else return Promise.all([a(),s(o.delay)])}i(Qo,"animateVariant");function Ac(t,e,o=0,r=0,n=0,a=1,s){let l=[];for(let u of t.variantChildren)u.notify("AnimationStart",e),l.push(Qo(u,e,{...s,delay:o+(typeof r=="function"?0:r)+Yo(t.variantChildren,u,r,n,a)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(l)}i(Ac,"animateChildren");function as(t,e,o={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){let n=e.map(a=>Qo(t,a,o));r=Promise.all(n)}else if(typeof e=="string")r=Qo(t,e,o);else{let n=typeof e=="function"?tt(t,e,o.custom):e;r=Promise.all(Jo(t,n,o))}return r.then(()=>{t.notify("AnimationComplete",e)})}i(as,"animateVisualElement");var ls={test:i(t=>t==="auto","test"),parse:i(t=>t,"parse")};var tr=i(t=>e=>e.test(t),"testValueType");var yi=[pt,v,Y,rt,Qr,Jr,ls],vi=i(t=>yi.find(tr(t)),"findDimensionValueType");function cs(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Fe(t):!0}i(cs,"isNone");var Mc=new Set(["brightness","contrast","saturate","opacity"]);function Cc(t){let[e,o]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[r]=o.match(pe)||[];if(!r)return t;let n=o.replace(r,""),a=Mc.has(e)?1:0;return r!==o&&(a*=100),e+"("+a+n+")"}i(Cc,"applyDefaultFilter");var Dc=/\b([a-z-]*)\(.*?\)/gu,eo={...K,getAnimatableNone:i(t=>{let e=t.match(Dc);return e?e.map(Cc).join(" "):t},"getAnimatableNone")};var oo={...K,getAnimatableNone:i(t=>{let e=K.parse(t);return K.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))},"getAnimatableNone")};var Ti={...pt,transform:Math.round};var us={rotate:rt,pathRotation:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scale:Ye,scaleX:Ye,scaleY:Ye,scaleZ:Ye,skew:rt,skewX:rt,skewY:rt,distance:v,translateX:v,translateY:v,translateZ:v,x:v,y:v,z:v,perspective:v,transformPerspective:v,opacity:Vt,originX:Lo,originY:Lo,originZ:v};var Zt={borderWidth:v,borderTopWidth:v,borderRightWidth:v,borderBottomWidth:v,borderLeftWidth:v,borderRadius:v,borderTopLeftRadius:v,borderTopRightRadius:v,borderBottomRightRadius:v,borderBottomLeftRadius:v,width:v,maxWidth:v,height:v,maxHeight:v,top:v,right:v,bottom:v,left:v,inset:v,insetBlock:v,insetBlockStart:v,insetBlockEnd:v,insetInline:v,insetInlineStart:v,insetInlineEnd:v,padding:v,paddingTop:v,paddingRight:v,paddingBottom:v,paddingLeft:v,paddingBlock:v,paddingBlockStart:v,paddingBlockEnd:v,paddingInline:v,paddingInlineStart:v,paddingInlineEnd:v,margin:v,marginTop:v,marginRight:v,marginBottom:v,marginLeft:v,marginBlock:v,marginBlockStart:v,marginBlockEnd:v,marginInline:v,marginInlineStart:v,marginInlineEnd:v,fontSize:v,backgroundPositionX:v,backgroundPositionY:v,...us,zIndex:Ti,fillOpacity:Vt,strokeOpacity:Vt,numOctaves:Ti};var Ec={...Zt,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:eo,WebkitFilter:eo,mask:oo,WebkitMask:oo},er=i(t=>Ec[t],"getDefaultValueType");var Rc=new Set([eo,oo]);function or(t,e){let o=er(t);return Rc.has(o)||(o=K),o.getAnimatableNone?o.getAnimatableNone(e):void 0}i(or,"getAnimatableNone");var Lc=new Set(["auto","none","0"]);function ms(t,e,o){let r=0,n;for(;r<t.length&&!n;){let a=t[r];typeof a=="string"&&!Lc.has(a)&&Rt(a).values.length&&(n=t[r]),r++}if(n&&o)for(let a of e)t[a]=or(o,n)}i(ms,"makeNoneKeyframesAnimatable");var rr=class extends Bt{static{i(this,"DOMKeyframesResolver")}constructor(e,o,r,n,a){super(e,o,r,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let m=0;m<e.length;m++){let f=e[m];if(typeof f=="string"&&(f=f.trim(),fe(f))){let p=xi(f,o.current);p!==void 0&&(e[m]=p),m===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!qo.has(r)||e.length!==2)return;let[n,a]=e,s=vi(n),l=vi(a),u=qr(n),c=qr(a);if(u!==c&&Pt[r]){this.needsMeasurement=!0;return}if(s!==l)if(li(s)&&li(l))for(let m=0;m<e.length;m++){let f=e[m];typeof f=="string"&&(e[m]=parseFloat(f))}else Pt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:o}=this,r=[];for(let n=0;n<e.length;n++)(e[n]===null||cs(e[n]))&&r.push(n);r.length&&ms(e,r,o)}measureInitialState(){let{element:e,unresolvedKeyframes:o,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pt[r](e.measureViewportBox(),window.getComputedStyle(e.current)),o[0]=this.measuredOrigin;let n=o[o.length-1];n!==void 0&&e.getValue(r,n).jump(n,!1)}measureEndState(){let{element:e,name:o,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let n=e.getValue(o);n&&n.jump(this.measuredOrigin,!1);let a=r.length-1,s=r[a];r[a]=Pt[o](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}};var ro=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function ir(t,e,o){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;e&&(r=e.current);let n=o?.[t]??r.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(r=>r!=null)}i(ir,"resolveElements");var io=i((t,e)=>e&&typeof t=="number"?e.transform(t):t,"getValueAsType");function fs(t){return Ie(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}i(fs,"isHTMLElement");var{schedule:Jt,cancel:kc}=Co(queueMicrotask,!1);var nt={x:!1,y:!1};function nr(){return nt.x||nt.y}i(nr,"isDragActive");function Vi(t){return t==="x"||t==="y"?nt[t]?null:(nt[t]=!0,()=>{nt[t]=!1}):nt.x||nt.y?null:(nt.x=nt.y=!0,()=>{nt.x=nt.y=!1})}i(Vi,"setDragLock");function sr(t,e){let o=ir(t),r=new AbortController,n={passive:!0,...e,signal:r.signal};return[o,n,i(()=>r.abort(),"cancel")]}i(sr,"setupGesture");function Bc(t){return!(t.pointerType==="touch"||nr())}i(Bc,"isValidHover");function Si(t,e,o={}){let[r,n,a]=sr(t,o);return r.forEach(s=>{let l=!1,u=!1,c,m=i(()=>{s.removeEventListener("pointerleave",h)},"removePointerLeave"),f=i(x=>{c&&(c(x),c=void 0),m()},"endHover"),p=i(x=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),u&&(u=!1,f(x))},"onPointerUp"),d=i(()=>{l=!0,window.addEventListener("pointerup",p,n),window.addEventListener("pointercancel",p,n)},"onPointerDown"),h=i(x=>{if(x.pointerType!=="touch"){if(l){u=!0;return}f(x)}},"onPointerLeave"),g=i(x=>{if(!Bc(x))return;u=!1;let y=e(s,x);typeof y=="function"&&(c=y,s.addEventListener("pointerleave",h,n))},"onPointerEnter");s.addEventListener("pointerenter",g,n),s.addEventListener("pointerdown",d,n)}),a}i(Si,"hover");var Pi=i((t,e)=>e?t===e?!0:Pi(t,e.parentElement):!1,"isNodeOrChild");var Qt=i(t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,"isPrimaryPointer");var Ic=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bi(t){return Ic.has(t.tagName)||t.isContentEditable===!0}i(bi,"isElementKeyboardAccessible");var Fc=new Set(["INPUT","SELECT","TEXTAREA"]);function wi(t){return Fc.has(t.tagName)||t.isContentEditable===!0}i(wi,"isElementTextInput");var Se=new WeakSet;function ps(t){return e=>{e.key==="Enter"&&t(e)}}i(ps,"filterEvents");function Ai(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}i(Ai,"firePointerEvent");var hs=i((t,e)=>{let o=t.currentTarget;if(!o)return;let r=ps(()=>{if(Se.has(o))return;Ai(o,"down");let n=ps(()=>{Ai(o,"up")}),a=i(()=>Ai(o,"cancel"),"handleBlur");o.addEventListener("keyup",n,e),o.addEventListener("blur",a,e)});o.addEventListener("keydown",r,e),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),e)},"enableKeyboardPress");function ds(t){return Qt(t)&&!nr()}i(ds,"isValidPressEvent");var gs=new WeakSet;function Mi(t,e,o={}){let[r,n,a]=sr(t,o),s=i(l=>{let u=l.currentTarget;if(!ds(l)||gs.has(l))return;Se.add(u),o.stopPropagation&&gs.add(l);let c=e(u,l),m={...n,capture:!0},f=i((h,g)=>{window.removeEventListener("pointerup",p,m),window.removeEventListener("pointercancel",d,m),Se.has(u)&&Se.delete(u),ds(h)&&typeof c=="function"&&c(h,{success:g})},"onPointerEnd"),p=i(h=>{f(h,u===window||u===document||o.useGlobalTarget||Pi(u,h.target))},"onPointerUp"),d=i(h=>{f(h,!1)},"onPointerCancel");window.addEventListener("pointerup",p,m),window.addEventListener("pointercancel",d,m)},"startPress");return r.forEach(l=>{(o.useGlobalTarget?window:l).addEventListener("pointerdown",s,n),fs(l)&&(l.addEventListener("focus",c=>hs(c,n)),!bi(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}i(Mi,"press");function Pe(t){return Ie(t)&&"ownerSVGElement"in t}i(Pe,"isSVGElement");var ar=new WeakMap,lr,xs=i((t,e,o)=>(r,n)=>n&&n[0]?n[0][t+"Size"]:Pe(r)&&"getBBox"in r?r.getBBox()[e]:r[o],"getSize"),Oc=xs("inline","width","offsetWidth"),jc=xs("block","height","offsetHeight");function Nc({target:t,borderBoxSize:e}){ar.get(t)?.forEach(o=>{o(t,{get width(){return Oc(t,e)},get height(){return jc(t,e)}})})}i(Nc,"notifyTarget");function Gc(t){t.forEach(Nc)}i(Gc,"notifyAll");function Wc(){typeof ResizeObserver>"u"||(lr=new ResizeObserver(Gc))}i(Wc,"createResizeObserver");function ys(t,e){lr||Wc();let o=ir(t);return o.forEach(r=>{let n=ar.get(r);n||(n=new Set,ar.set(r,n)),n.add(e),lr?.observe(r)}),()=>{o.forEach(r=>{let n=ar.get(r);n?.delete(e),n?.size||lr?.unobserve(r)})}}i(ys,"resizeElement");var cr=new Set,be;function Uc(){be=i(()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};cr.forEach(e=>e(t))},"windowResizeHandler"),window.addEventListener("resize",be)}i(Uc,"createWindowResizeHandler");function vs(t){return cr.add(t),be||Uc(),()=>{cr.delete(t),!cr.size&&typeof be=="function"&&(window.removeEventListener("resize",be),be=void 0)}}i(vs,"resizeWindow");function ur(t,e){return typeof t=="function"?vs(t):ys(t,e)}i(ur,"resize");var te={value:null,addProjectionMetrics:null};function Ts(t){return Pe(t)&&t.tagName==="svg"}i(Ts,"isSVGSVGElement");var Kc=[...yi,R,K],Vs=i(t=>Kc.find(tr(t)),"findValueType");var Ci=i(()=>({translate:0,scale:1,origin:0,originPoint:0}),"createAxisDelta"),It=i(()=>({x:Ci(),y:Ci()}),"createDelta"),Di=i(()=>({min:0,max:0}),"createAxis"),L=i(()=>({x:Di(),y:Di()}),"createBox");var Ss=new WeakMap;function bt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}i(bt,"isAnimationControls");function gt(t){return typeof t=="string"||Array.isArray(t)}i(gt,"isVariantLabel");var mr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],no=["initial",...mr];function Ft(t){return bt(t.animate)||no.some(e=>gt(t[e]))}i(Ft,"isControllingVariants");function so(t){return!!(Ft(t)||t.variants)}i(so,"isVariantNode");function Ps(t,e,o){for(let r in e){let n=e[r],a=o[r];if(C(n))t.addValue(r,n);else if(C(a))t.addValue(r,ct(n,{owner:t}));else if(a!==n)if(t.hasValue(r)){let s=t.getValue(r);s.liveStyle===!0?s.jump(n):s.hasAnimated||s.set(n)}else{let s=t.getStaticValue(r);t.addValue(r,ct(s!==void 0?s:n,{owner:t}))}}for(let r in o)e[r]===void 0&&t.removeValue(r);return e}i(Ps,"updateMotionValuesFromProps");var Ot={current:null},ee={current:!1};var zc=typeof window<"u";function ao(){if(ee.current=!0,!!zc)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=i(()=>Ot.current=t.matches,"setReducedMotionPreferences");t.addEventListener("change",e),e()}else Ot.current=!1}i(ao,"initPrefersReducedMotion");var bs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fr={};function co(t){fr=t}i(co,"setFeatureDefinitions");function Ei(){return fr}i(Ei,"getFeatureDefinitions");var lo=class{static{i(this,"VisualElement")}scrapeMotionValuesFromProps(e,o,r){return{}}constructor({parent:e,props:o,presenceContext:r,reducedMotionConfig:n,skipAnimations:a,blockInitialAnimation:s,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Bt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let d=B.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,w.render(this.render,!1,!0))};let{latestValues:c,renderState:m}=l;this.latestValues=c,this.baseTarget={...c},this.initialValues=o.initial?{...c}:{},this.renderState=m,this.parent=e,this.props=o,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=a,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=Ft(o),this.isVariantNode=so(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:f,...p}=this.scrapeMotionValuesFromProps(o,{},this);for(let d in p){let h=p[d];c[d]!==void 0&&C(h)&&h.set(c[d])}}mount(e){if(this.hasBeenMounted)for(let o in this.initialValues)this.values.get(o)?.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];this.current=e,Ss.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ee.current||ao(),this.shouldReduceMotion=Ot.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Q(this.notifyUpdate),Q(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let o=this.features[e];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,o){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),o.accelerate&&$o.has(e)&&this.current instanceof HTMLElement){let{factory:s,keyframes:l,times:u,ease:c,duration:m}=o.accelerate,f=new ye({element:this.current,name:e,keyframes:l,times:u,ease:c,duration:j(m)}),p=s(f);this.valueSubscriptions.set(e,()=>{p(),f.cancel()});return}let r=it.has(e);r&&this.onBindTransform&&this.onBindTransform();let n=o.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&w.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,o)),this.valueSubscriptions.set(e,()=>{n(),a&&a()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in fr){let o=fr[e];if(!o)continue;let{isEnabled:r,Feature:n}=o;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){let a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,o){this.latestValues[e]=o}update(e,o){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<bs.length;r++){let n=bs[r];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let a="on"+n,s=e[a];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=Ps(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(e),()=>o.variantChildren.delete(e)}addValue(e,o){let r=this.values.get(e);o!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,o),this.values.set(e,o),this.latestValues[e]=o.get())}removeValue(e){this.values.delete(e);let o=this.valueSubscriptions.get(e);o&&(o(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,o){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&o!==void 0&&(r=ct(o===null?void 0:o,{owner:this}),this.addValue(e,r)),r}readValue(e,o){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(Be(r)||Fe(r))?r=parseFloat(r):!Vs(r)&&K.test(o)&&(r=or(e,o)),this.setBaseTarget(e,C(r)?r.get():r)),C(r)?r.get():r}setBaseTarget(e,o){this.baseTarget[e]=o}getBaseTarget(e){let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let a=qt(this.props,o,this.presenceContext?.custom);a&&(r=a[e])}if(o&&r!==void 0)return r;let n=this.getBaseTargetFromProps(this.props,e);return n!==void 0&&!C(n)?n:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,o){return this.events[e]||(this.events[e]=new Tt),this.events[e].add(o)}notify(e,...o){this.events[e]&&this.events[e].notify(...o)}scheduleRenderMicrotask(){Jt.render(this.render)}};var we=class extends lo{static{i(this,"DOMVisualElement")}constructor(){super(...arguments),this.KeyframeResolver=rr}sortInstanceNodePosition(e,o){return e.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(e,o){let r=e.style;return r?r[o]:void 0}removeValueFromRenderState(e,{vars:o,style:r}){delete o[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;C(e)&&(this.childSubscription=e.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};var z=class{static{i(this,"Feature")}constructor(e){this.isMounted=!1,this.node=e}update(){}};function uo({top:t,left:e,right:o,bottom:r}){return{x:{min:e,max:o},y:{min:t,max:r}}}i(uo,"convertBoundingBoxToBox");function Ri({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}i(Ri,"convertBoxToBoundingBox");function Li(t,e){if(!e)return t;let o=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}i(Li,"transformBoxPoints");function ki(t){return t===void 0||t===1}i(ki,"isIdentityScale");function pr({scale:t,scaleX:e,scaleY:o}){return!ki(t)||!ki(e)||!ki(o)}i(pr,"hasScale");function wt(t){return pr(t)||Bi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}i(wt,"hasTransform");function Bi(t){return ws(t.x)||ws(t.y)}i(Bi,"has2DTranslate");function ws(t){return t&&t!=="0%"}i(ws,"is2DTranslate");function mo(t,e,o){let r=t-o,n=e*r;return o+n}i(mo,"scalePoint");function As(t,e,o,r,n){return n!==void 0&&(t=mo(t,n,r)),mo(t,o,r)+e}i(As,"applyPointDelta");function Ii(t,e=0,o=1,r,n){t.min=As(t.min,e,o,r,n),t.max=As(t.max,e,o,r,n)}i(Ii,"applyAxisDelta");function Fi(t,{x:e,y:o}){Ii(t.x,e.translate,e.scale,e.originPoint),Ii(t.y,o.translate,o.scale,o.originPoint)}i(Fi,"applyBoxDelta");var Ms=.999999999999,Cs=1.0000000000001;function Rs(t,e,o,r=!1){let n=o.length;if(!n)return;e.x=e.y=1;let a,s;for(let l=0;l<n;l++){a=o[l],s=a.projectionDelta;let{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(st(t.x,-a.scroll.offset.x),st(t.y,-a.scroll.offset.y)),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Fi(t,s)),r&&wt(a.latestValues)&&fo(t,a.latestValues,a.layout?.layoutBox))}e.x<Cs&&e.x>Ms&&(e.x=1),e.y<Cs&&e.y>Ms&&(e.y=1)}i(Rs,"applyTreeDeltas");function st(t,e){t.min+=e,t.max+=e}i(st,"translateAxis");function Ds(t,e,o,r,n=.5){let a=A(t.min,t.max,n);Ii(t,e,o,a,r)}i(Ds,"transformAxis");function Es(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}i(Es,"resolveAxisTranslate");function fo(t,e,o){let r=o??t;Ds(t.x,Es(e.x,r.x),e.scaleX,e.scale,e.originX),Ds(t.y,Es(e.y,r.y),e.scaleY,e.scale,e.originY)}i(fo,"transformBox");function hr(t,e){return uo(Li(t.getBoundingClientRect(),e))}i(hr,"measureViewportBox");function Oi(t,e,o){let r=hr(t,o),{scroll:n}=e;return n&&(st(r.x,n.offset.x),st(r.y,n.offset.y)),r}i(Oi,"measurePageBox");var Hc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$c=dt.length;function Ls(t,e,o){let r="",n=!0;for(let s=0;s<$c;s++){let l=dt[s],u=t[l];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(l.startsWith("scale")?1:0);else{let m=parseFloat(u);c=l.startsWith("scale")?m===1:m===0}if(!c||o){let m=io(u,Zt[l]);if(!c){n=!1;let f=Hc[l]||l;r+=`${f}(${m}) `}o&&(e[l]=m)}}let a=t.pathRotation;return a&&(n=!1,r+=`rotate(${io(a,Zt.pathRotation)}) `),r=r.trim(),o?r=o(e,n?"":r):n&&(r="none"),r}i(Ls,"buildTransform");function oe(t,e,o){let{style:r,vars:n,transformOrigin:a}=t,s=!1,l=!1;for(let u in e){let c=e[u];if(it.has(u)){s=!0;continue}else if(Eo(u)){n[u]=c;continue}else{let m=io(c,Zt[u]);u.startsWith("origin")?(l=!0,a[u]=m):r[u]=m}}if(e.transform||(s||o?r.transform=Ls(e,t.transform,o):r.transform&&(r.transform="none")),l){let{originX:u="50%",originY:c="50%",originZ:m=0}=a;r.transformOrigin=`${u} ${c} ${m}`}}i(oe,"buildHTMLStyles");function dr(t,{style:e,vars:o},r,n){let a=t.style,s;for(s in e)a[s]=e[s];n?.applyProjectionStyles(a,r);for(s in o)a.setProperty(s,o[s])}i(dr,"renderHTML");function ks(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}i(ks,"pixelsToPercent");var Ae={correct:i((t,e)=>{if(!e.target)return t;if(typeof t=="string")if(v.test(t))t=parseFloat(t);else return t;let o=ks(t,e.target.x),r=ks(t,e.target.y);return`${o}% ${r}%`},"correct")};var Bs={correct:i((t,{treeScale:e,projectionDelta:o})=>{let r=t,n=K.parse(t);if(n.length>5)return r;let a=K.createTransformer(t),s=typeof n[0]!="number"?1:0,l=o.x.scale*e.x,u=o.y.scale*e.y;n[0+s]/=l,n[1+s]/=u;let c=A(l,u,.5);return typeof n[2+s]=="number"&&(n[2+s]/=c),typeof n[3+s]=="number"&&(n[3+s]/=c),a(n)},"correct")};var po={borderRadius:{...Ae,applyTo:[...ro]},borderTopLeftRadius:Ae,borderTopRightRadius:Ae,borderBottomLeftRadius:Ae,borderBottomRightRadius:Ae,boxShadow:Bs};function ho(t,{layout:e,layoutId:o}){return it.has(t)||t.startsWith("origin")||(e||o!==void 0)&&(!!po[t]||t==="opacity")}i(ho,"isForcedMotionValue");function re(t,e,o){let r=t.style,n=e?.style,a={};if(!r)return a;for(let s in r)(C(r[s])||n&&C(n[s])||ho(s,t)||o?.getValue(s)?.liveStyle!==void 0)&&(a[s]=r[s]);return a}i(re,"scrapeMotionValuesFromProps");function _c(t){return window.getComputedStyle(t)}i(_c,"getComputedStyle");var go=class extends we{static{i(this,"HTMLVisualElement")}constructor(){super(...arguments),this.type="html",this.renderInstance=dr}mount(e){J(!!e.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,o){if(it.has(o))return this.projection?.isProjecting?No(o):jn(e,o);{let r=_c(e),n=(Eo(o)?r.getPropertyValue(o):r[o])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:o}){return hr(e,o)}build(e,o,r){oe(e,o,r.transformTemplate)}scrapeMotionValuesFromProps(e,o,r){return re(e,o,r)}};var Yc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xc={offset:"strokeDashoffset",array:"strokeDasharray"};function Is(t,e,o=1,r=0,n=!0){t.pathLength=1;let a=n?Yc:Xc;t[a.offset]=`${-r}`,t[a.array]=`${e} ${o}`}i(Is,"buildSVGPath");var ji=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function xo(t,{attrX:e,attrY:o,attrScale:r,pathLength:n,pathSpacing:a=1,pathOffset:s=0,...l},u,c,m){if(oe(t,l,c),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:f,style:p}=t;for(let d of ji)f[d]!==void 0&&(p[d]=f[d],delete f[d]);(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=m?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),o!==void 0&&(f.y=o),r!==void 0&&(f.scale=r),n!==void 0&&Is(f,n,a,s,!1)}i(xo,"buildSVGAttrs");var gr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var yo=i(t=>typeof t=="string"&&t.toLowerCase()==="svg","isSVGTag");function Fs(t,e,o,r){dr(t,e,void 0,r);for(let n in e.attrs)t.setAttribute(gr.has(n)?n:Ve(n),e.attrs[n])}i(Fs,"renderSVG");function vo(t,e,o){let r=re(t,e,o);for(let n in t)if(C(t[n])||C(e[n])){let a=dt.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[a]=t[n]}return r}i(vo,"scrapeMotionValuesFromProps");var To=class extends we{static{i(this,"SVGVisualElement")}constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,o){return e[o]}readValueFromInstance(e,o){if(it.has(o)){let r=er(o);return r&&r.default||0}if(ji.includes(o)){let n=getComputedStyle(e)[o];if(typeof n=="string"&&n)return n.trim()}return o=gr.has(o)?o:Ve(o),e.getAttribute(o)}scrapeMotionValuesFromProps(e,o,r){return vo(e,o,r)}build(e,o,r){xo(e,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,o,r,n){Fs(e,o,r,n)}mount(e){this.isSVGTag=yo(e.tagName),super.mount(e)}};var qc=no.length;function Ni(t){if(!t)return;if(!t.isControllingVariants){let o=t.parent?Ni(t.parent)||{}:{};return t.props.initial!==void 0&&(o.initial=t.props.initial),o}let e={};for(let o=0;o<qc;o++){let r=no[o],n=t.props[r];(gt(n)||n===!1)&&(e[r]=n)}return e}i(Ni,"getVariantContext");function Gi(t,e){if(!Array.isArray(e))return!1;let o=e.length;if(o!==t.length)return!1;for(let r=0;r<o;r++)if(e[r]!==t[r])return!1;return!0}i(Gi,"shallowCompare");var Zc=[...mr].reverse(),Jc=mr.length;function Qc(t){return e=>Promise.all(e.map(({animation:o,options:r})=>as(t,o,r)))}i(Qc,"createAnimateFunction");function Wi(t){let e=Qc(t),o=Os(),r=!0,n=!1,a=i(c=>(m,f)=>{let p=tt(t,f,c==="exit"?t.presenceContext?.custom:void 0);if(p){let{transition:d,transitionEnd:h,...g}=p;m={...m,...g,...h}}return m},"buildResolvedTypeValues");function s(c){e=c(t)}i(s,"setAnimateFunction");function l(c){let{props:m}=t,f=Ni(t.parent)||{},p=[],d=new Set,h={},g=1/0;for(let y=0;y<Jc;y++){let V=Zc[y],T=o[V],S=m[V]!==void 0?m[V]:f[V],M=gt(S),E=V===c?T.isActive:null;E===!1&&(g=y);let D=S===f[V]&&S!==m[V]&&M;if(D&&(r||n)&&t.manuallyAnimateOnMount&&(D=!1),T.protectedKeys={...h},!T.isActive&&E===null||!S&&!T.prevProp||bt(S)||typeof S=="boolean")continue;if(V==="exit"&&T.isActive&&E!==!0){T.prevResolvedValues&&(h={...h,...T.prevResolvedValues});continue}let b=js(T.prevProp,S),$=b||V===c&&T.isActive&&!D&&M||y>g&&M,P=!1,N=Array.isArray(S)?S:[S],Z=N.reduce(a(V),{});E===!1&&(Z={});let{prevResolvedValues:Ut={}}=T,ut={...Ut,...Z},yt=i(_=>{$=!0,d.has(_)&&(P=!0,d.delete(_)),T.needsAnimating[_]=!0;let ot=t.getValue(_);ot&&(ot.liveStyle=!1)},"markToAnimate");for(let _ in ut){let ot=Z[_],Kt=Ut[_];if(h.hasOwnProperty(_))continue;let ue=!1;Qe(ot)&&Qe(Kt)?ue=!Gi(ot,Kt)||b:ue=ot!==Kt,ue?ot!=null?yt(_):d.add(_):ot!==void 0&&d.has(_)?yt(_):T.protectedKeys[_]=!0}T.prevProp=S,T.prevResolvedValues=Z,T.isActive&&(h={...h,...Z}),(r||n)&&t.blockInitialAnimation&&($=!1);let mt=D&&b;$&&(!mt||P)&&p.push(...N.map(_=>{let ot={type:V};if(typeof _=="string"&&(r||n)&&!mt&&t.manuallyAnimateOnMount&&t.parent){let{parent:Kt}=t,ue=tt(Kt,_);if(Kt.enteringChildren&&ue){let{delayChildren:vl}=ue.transition||{};ot.delay=Yo(Kt.enteringChildren,t,vl)}}return{animation:_,options:ot}}))}if(d.size){let y={};if(typeof m.initial!="boolean"){let V=tt(t,Array.isArray(m.initial)?m.initial[0]:m.initial);V&&V.transition&&(y.transition=V.transition)}d.forEach(V=>{let T=t.getBaseTarget(V),S=t.getValue(V);S&&(S.liveStyle=!0),y[V]=T??null}),p.push({animation:y})}let x=!!p.length;return r&&(m.initial===!1||m.initial===m.animate)&&!t.manuallyAnimateOnMount&&(x=!1),r=!1,n=!1,x?e(p):Promise.resolve()}i(l,"animateChanges");function u(c,m){if(o[c].isActive===m)return Promise.resolve();t.variantChildren?.forEach(p=>p.animationState?.setActive(c,m)),o[c].isActive=m;let f=l(c);for(let p in o)o[p].protectedKeys={};return f}return i(u,"setActive"),{animateChanges:l,setActive:u,setAnimateFunction:s,getState:i(()=>o,"getState"),reset:i(()=>{o=Os(),n=!0},"reset")}}i(Wi,"createAnimationState");function js(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Gi(e,t):!1}i(js,"checkVariantsDidChange");function ie(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}i(ie,"createTypeState");function Os(){return{animate:ie(!0),whileInView:ie(),whileHover:ie(),whileTap:ie(),whileDrag:ie(),whileFocus:ie(),exit:ie()}}i(Os,"createState");function xr(t,e){t.min=e.min,t.max=e.max}i(xr,"copyAxisInto");function at(t,e){xr(t.x,e.x),xr(t.y,e.y)}i(at,"copyBoxInto");function Ui(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}i(Ui,"copyAxisDeltaInto");var Ns=1e-4,tu=1-Ns,eu=1+Ns,Gs=.01,ou=0-Gs,ru=0+Gs;function W(t){return t.max-t.min}i(W,"calcLength");function $i(t,e,o){return Math.abs(t-e)<=o}i($i,"isNear");function Ki(t,e,o,r=.5){t.origin=r,t.originPoint=A(e.min,e.max,t.origin),t.scale=W(o)/W(e),t.translate=A(o.min,o.max,t.origin)-t.originPoint,(t.scale>=tu&&t.scale<=eu||isNaN(t.scale))&&(t.scale=1),(t.translate>=ou&&t.translate<=ru||isNaN(t.translate))&&(t.translate=0)}i(Ki,"calcAxisDelta");function ne(t,e,o,r){Ki(t.x,e.x,o.x,r?r.originX:void 0),Ki(t.y,e.y,o.y,r?r.originY:void 0)}i(ne,"calcBoxDelta");function zi(t,e,o,r=0){let n=r?A(o.min,o.max,r):o.min;t.min=n+e.min,t.max=t.min+W(e)}i(zi,"calcRelativeAxis");function _i(t,e,o,r){zi(t.x,e.x,o.x,r?.x),zi(t.y,e.y,o.y,r?.y)}i(_i,"calcRelativeBox");function Hi(t,e,o,r=0){let n=r?A(o.min,o.max,r):o.min;t.min=e.min-n,t.max=t.min+W(e)}i(Hi,"calcRelativeAxisPosition");function Me(t,e,o,r){Hi(t.x,e.x,o.x,r?.x),Hi(t.y,e.y,o.y,r?.y)}i(Me,"calcRelativePosition");function Ws(t,e,o,r,n){return t-=e,t=mo(t,1/o,r),n!==void 0&&(t=mo(t,1/n,r)),t}i(Ws,"removePointDelta");function iu(t,e=0,o=1,r=.5,n,a=t,s=t){if(Y.test(e)&&(e=parseFloat(e),e=A(s.min,s.max,e/100)-s.min),typeof e!="number")return;let l=A(a.min,a.max,r);t===a&&(l-=e),t.min=Ws(t.min,e,o,l,n),t.max=Ws(t.max,e,o,l,n)}i(iu,"removeAxisDelta");function Us(t,e,[o,r,n],a,s){iu(t,e[o],e[r],e[n],e.scale,a,s)}i(Us,"removeAxisTransforms");var nu=["x","scaleX","originX"],su=["y","scaleY","originY"];function Yi(t,e,o,r){Us(t.x,e,nu,o?o.x:void 0,r?r.x:void 0),Us(t.y,e,su,o?o.y:void 0,r?r.y:void 0)}i(Yi,"removeBoxTransforms");function Ks(t){return t.translate===0&&t.scale===1}i(Ks,"isAxisDeltaZero");function Xi(t){return Ks(t.x)&&Ks(t.y)}i(Xi,"isDeltaZero");function zs(t,e){return t.min===e.min&&t.max===e.max}i(zs,"axisEquals");function $s(t,e){return zs(t.x,e.x)&&zs(t.y,e.y)}i($s,"boxEquals");function Hs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}i(Hs,"axisEqualsRounded");function qi(t,e){return Hs(t.x,e.x)&&Hs(t.y,e.y)}i(qi,"boxEqualsRounded");function Zi(t){return W(t.x)/W(t.y)}i(Zi,"aspectRatio");function Ji(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}i(Ji,"axisDeltaEquals");function et(t){return[t("x"),t("y")]}i(et,"eachAxis");function _s(t,e,o){let r="",n=t.x.translate/e.x,a=t.y.translate/e.y,s=o?.z||0;if((n||a||s)&&(r=`translate3d(${n}px, ${a}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),o){let{transformPerspective:c,rotate:m,pathRotation:f,rotateX:p,rotateY:d,skewX:h,skewY:g}=o;c&&(r=`perspective(${c}px) ${r}`),m&&(r+=`rotate(${m}deg) `),f&&(r+=`rotate(${f}deg) `),p&&(r+=`rotateX(${p}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),g&&(r+=`skewY(${g}deg) `)}let l=t.x.scale*e.x,u=t.y.scale*e.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}i(_s,"buildProjectionTransform");var au=ro.length,Ys=i(t=>typeof t=="string"?parseFloat(t):t,"asNumber"),Xs=i(t=>typeof t=="number"||v.test(t),"isPx");function Zs(t,e,o,r,n,a){n?(t.opacity=A(0,o.opacity??1,lu(r)),t.opacityExit=A(e.opacity??1,0,cu(r))):a&&(t.opacity=A(e.opacity??1,o.opacity??1,r));for(let s=0;s<au;s++){let l=ro[s],u=qs(e,l),c=qs(o,l);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||Xs(u)===Xs(c)?(t[l]=Math.max(A(Ys(u),Ys(c),r),0),(Y.test(c)||Y.test(u))&&(t[l]+="%")):t[l]=c}(e.rotate||o.rotate)&&(t.rotate=A(e.rotate||0,o.rotate||0,r))}i(Zs,"mixValues");function qs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}i(qs,"getRadius");var lu=Js(0,.5,Ue),cu=Js(.5,.95,k);function Js(t,e,o){return r=>r<t?0:r>e?1:o(ft(t,e,r))}i(Js,"compress");function Qs(t,e,o){let r=C(t)?t:ct(t);return r.start(Xt("",r,e,o)),r.animation}i(Qs,"animateSingleValue");function xt(t,e,o,r={passive:!0}){return t.addEventListener(e,o,r),()=>t.removeEventListener(e,o,r)}i(xt,"addDomEvent");var ta=i((t,e)=>t.depth-e.depth,"compareByDepth");var yr=class{static{i(this,"FlatTree")}constructor(){this.children=[],this.isDirty=!1}add(e){zt(this.children,e),this.isDirty=!0}remove(e){Mt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ta),this.isDirty=!1,this.children.forEach(e)}};function ea(t,e){let o=B.now(),r=i(({timestamp:n})=>{let a=n-o;a>=e&&(Q(r),t(a-e))},"checkElapsed");return w.setup(r,!0),()=>Q(r)}i(ea,"delay");function se(t){return C(t)?t.get():t}i(se,"resolveMotionValue");var vr=class{static{i(this,"NodeStack")}constructor(){this.members=[]}add(e){zt(this.members,e);for(let o=this.members.length-1;o>=0;o--){let r=this.members[o];if(r===e||r===this.lead||r===this.prevLead)continue;let n=r.instance;(!n||n.isConnected===!1)&&!r.snapshot&&(Mt(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(Mt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(e){for(let o=this.members.indexOf(e)-1;o>=0;o--){let r=this.members[o];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(e,o){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();let{layoutDependency:n}=r.options,{layoutDependency:a}=e.options;(n===void 0||n!==a)&&(e.resumeFrom=r,o&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};var ae={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var le={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Qi=["","X","Y","Z"],uu=1e3,mu=0;function tn(t,e,o,r){let{latestValues:n}=e;n[t]&&(o[t]=n[t],e.setStaticValue(t,0),r&&(r[t]=0))}i(tn,"resetDistortingTransform");function ua(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let o=Zo(e);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:n,layoutId:a}=t.options;window.MotionCancelOptimisedAnimation(o,"transform",w,!(n||a))}let{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&ua(r)}i(ua,"cancelTreeOptimisedTransformAnimations");function Tr({attachResizeListener:t,defaultParent:e,measureScroll:o,checkIsScrollRoot:r,resetTransform:n}){return class{static{i(this,"ProjectionNode")}constructor(s={},l=e?.()){this.id=mu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,te.value&&(le.nodes=le.calculatedTargetDeltas=le.calculatedProjections=0),this.nodes.forEach(hu),this.nodes.forEach(Tu),this.nodes.forEach(Vu),this.nodes.forEach(du),te.addProjectionMetrics&&te.addProjectionMetrics(le)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new yr)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Tt),this.eventHandlers.get(s).add(l)}notifyListeners(s,...l){let u=this.eventHandlers.get(s);u&&u.notify(...l)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Pe(s)&&!Ts(s),this.instance=s;let{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),t){let m,f=0,p=i(()=>this.root.updateBlockedByResize=!1,"resizeUnblockUpdate");w.read(()=>{f=window.innerWidth}),t(s,()=>{let d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,m&&m(),m=ea(p,250),ae.hasAnimatedSinceResize&&(ae.hasAnimatedSinceResize=!1,this.nodes.forEach(ia)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||c.getDefaultTransition()||Au,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=c.getProps(),y=!this.targetLayout||!qi(this.targetLayout,d),V=!f&&p;if(this.options.layoutRoot||this.resumeFrom||V||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let T={...ve(h,"layout"),onPlay:g,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,V,T.path)}else f||ia(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Q(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Su),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ua(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){let f=this.path[m];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}let{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;let c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(xu),this.nodes.forEach(oa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ra);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yu),this.nodes.forEach(vu),this.nodes.forEach(fu),this.nodes.forEach(pu)):this.nodes.forEach(ra),this.clearAllSnapshots();let l=B.now();O.delta=U(0,1e3/60,l-O.timestamp),O.timestamp=l,O.isProcessing=!0,_e.update.process(O),_e.preRender.process(O),_e.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Jt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gu),this.sharedNodes.forEach(Pu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!W(this.snapshot.measuredBox.x)&&!W(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();let s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=L()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(l=!1),l&&this.instance){let u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:u,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!n)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Xi(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,m=c!==this.prevTransformTemplateValue;s&&this.instance&&(l||wt(this.latestValues)||m)&&(n(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let l=this.measurePageBox(),u=this.removeElementScroll(l);return s&&(u=this.removeTransform(u)),Mu(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:s}=this.options;if(!s)return L();let l=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Cu))){let{scroll:c}=this.root;c&&(st(l.x,c.offset.x),st(l.y,c.offset.y))}return l}removeElementScroll(s){let l=L();if(at(l,s),this.scroll?.wasRoot)return l;for(let u=0;u<this.path.length;u++){let c=this.path[u],{scroll:m,options:f}=c;c!==this.root&&m&&f.layoutScroll&&(m.wasRoot&&at(l,s),st(l.x,m.offset.x),st(l.y,m.offset.y))}return l}applyTransform(s,l=!1,u){let c=u||L();at(c,s);for(let m=0;m<this.path.length;m++){let f=this.path[m];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(st(c.x,-f.scroll.offset.x),st(c.y,-f.scroll.offset.y)),wt(f.latestValues)&&fo(c,f.latestValues,f.layout?.layoutBox)}return wt(this.latestValues)&&fo(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(s){let l=L();at(l,s);for(let u=0;u<this.path.length;u++){let c=this.path[u];if(!wt(c.latestValues))continue;let m;c.instance&&(pr(c.latestValues)&&c.updateSnapshot(),m=L(),at(m,c.measurePageBox())),Yi(l,c.latestValues,c.snapshot?.layoutBox,m)}return wt(this.latestValues)&&Yi(l,this.latestValues),l}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:m,layoutId:f}=this.options;if(!this.layout||!(m||f))return;this.resolvedRelativeTargetAt=O.timestamp;let p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_i(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):at(this.target,this.layout.layoutBox),Fi(this.target,this.targetDelta)):at(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0),te.value&&le.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||pr(this.parent.latestValues)||Bi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,l,u){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),Me(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),at(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let s=this.getLead(),l=!!this.resumingFrom||this!==s,u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===O.timestamp&&(u=!1),u)return;let{layout:c,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||m))return;at(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;Rs(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=L());let{target:d}=s;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ui(this.prevProjectionDelta.x,this.projectionDelta.x),Ui(this.prevProjectionDelta.y,this.projectionDelta.y)),ne(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),te.value&&le.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=It(),this.projectionDelta=It(),this.projectionDeltaWithTransform=It()}setAnimationOrigin(s,l=!1,u){let c=this.snapshot,m=c?c.latestValues:{},f={...this.latestValues},p=It();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;let d=L(),h=c?c.source:void 0,g=this.layout?this.layout.source:void 0,x=h!==g,y=this.getStack(),V=!y||y.members.length<=1,T=!!(x&&!V&&this.options.crossfade===!0&&!this.path.some(wu));this.animationProgress=0;let S,M=u?.interpolateProjection(s);this.mixTargetDelta=E=>{let D=E/1e3,b=M?.(D);b?(p.x.translate=b.x,p.x.scale=A(s.x.scale,1,D),p.x.origin=s.x.origin,p.x.originPoint=s.x.originPoint,p.y.translate=b.y,p.y.scale=A(s.y.scale,1,D),p.y.origin=s.y.origin,p.y.originPoint=s.y.originPoint):(na(p.x,s.x,D),na(p.y,s.y,D)),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Me(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),bu(this.relativeTarget,this.relativeTargetOrigin,d,D),S&&$s(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=L()),at(S,this.relativeTarget)),x&&(this.animationValues=f,Zs(f,m,this.latestValues,D,T,V)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{ae.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ct(0)),this.motionValue.jump(0,!1),this.currentAnimation=Qs(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:i(l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},"onUpdate"),onComplete:i(()=>{s.onComplete&&s.onComplete(),this.completeAnimation()},"onComplete")}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:l,target:u,layout:c,latestValues:m}=s;if(!(!l||!u||!c)){if(this!==s&&this.layout&&c&&ma(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||L();let f=W(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+f;let p=W(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+p}at(l,u),fo(l,m),ne(this.projectionDeltaWithTransform,this.layoutCorrected,l,m)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new vr),this.sharedNodes.get(s).add(l);let c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){let{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:u}={}){let c=this.getStack();c&&c.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let l=!1,{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;let c={};u.z&&tn("z",s,c,this.animationValues);for(let m=0;m<Qi.length;m++)tn(`rotate${Qi[m]}`,s,c,this.animationValues),tn(`skew${Qi[m]}`,s,c,this.animationValues);s.render();for(let m in c)s.setStaticValue(m,c[m]),this.animationValues&&(this.animationValues[m]=c[m]);s.scheduleRender()}applyProjectionStyles(s,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}let u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=se(l?.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none";return}let c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=se(l?.pointerEvents)||""),this.hasProjected&&!wt(this.latestValues)&&(s.transform=u?u({},""):"none",this.hasProjected=!1);return}s.visibility="";let m=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=_s(this.projectionDeltaWithTransform,this.treeScale,m);u&&(f=u(m,f)),s.transform=f;let{x:p,y:d}=this.projectionDelta;s.transformOrigin=`${p.origin*100}% ${d.origin*100}% 0`,c.animationValues?s.opacity=c===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:s.opacity=c===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(let h in po){if(m[h]===void 0)continue;let{correct:g,applyTo:x,isCSSVariable:y}=po[h],V=f==="none"?m[h]:g(m[h],c);if(x){let T=x.length;for(let S=0;S<T;S++)s[x[S]]=V}else y?this.options.visualElement.renderState.vars[h]=V:s[h]=V}this.options.layoutId&&(s.pointerEvents=c===this?se(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(oa),this.root.sharedNodes.clear()}}}i(Tr,"createProjectionNode");function fu(t){t.updateLayout()}i(fu,"updateLayout");function pu(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:r}=t.layout,{animationType:n}=t.options,a=e.source!==t.layout.source;if(n==="size")et(m=>{let f=a?e.measuredBox[m]:e.layoutBox[m],p=W(f);f.min=o[m].min,f.max=f.min+p});else if(n==="x"||n==="y"){let m=n==="x"?"y":"x";xr(a?e.measuredBox[m]:e.layoutBox[m],o[m])}else ma(n,e.layoutBox,o)&&et(m=>{let f=a?e.measuredBox[m]:e.layoutBox[m],p=W(o[m]);f.max=f.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[m].max=t.relativeTarget[m].min+p)});let s=It();ne(s,o,e.layoutBox);let l=It();a?ne(l,t.applyTransform(r,!0),e.measuredBox):ne(l,o,e.layoutBox);let u=!Xi(s),c=!1;if(!t.resumeFrom){let m=t.getClosestProjectingParent();if(m&&!m.resumeFrom){let{snapshot:f,layout:p}=m;if(f&&p){let d=t.options.layoutAnchor||void 0,h=L();Me(h,e.layoutBox,f.layoutBox,d);let g=L();Me(g,o,p.layoutBox,d),qi(h,g)||(c=!0),m.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=h,t.relativeParent=m)}}}t.notifyListeners("didUpdate",{layout:o,snapshot:e,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){let{onExitComplete:o}=t.options;o&&o()}t.options.transition=void 0}i(pu,"notifyLayoutUpdate");function hu(t){te.value&&le.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}i(hu,"propagateDirtyNodes");function du(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}i(du,"cleanDirtyNodes");function gu(t){t.clearSnapshot()}i(gu,"clearSnapshot");function oa(t){t.clearMeasurements()}i(oa,"clearMeasurements");function xu(t){t.isLayoutDirty=!0,t.updateLayout()}i(xu,"forceLayoutMeasure");function ra(t){t.isLayoutDirty=!1}i(ra,"clearIsLayoutDirty");function yu(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}i(yu,"ensureDraggedNodesSnapshotted");function vu(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}i(vu,"resetTransformStyle");function ia(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}i(ia,"finishAnimation");function Tu(t){t.resolveTargetDelta()}i(Tu,"resolveTargetDelta");function Vu(t){t.calcProjection()}i(Vu,"calcProjection");function Su(t){t.resetSkewAndRotation()}i(Su,"resetSkewAndRotation");function Pu(t){t.removeLeadSnapshot()}i(Pu,"removeLeadSnapshots");function na(t,e,o){t.translate=A(e.translate,0,o),t.scale=A(e.scale,1,o),t.origin=e.origin,t.originPoint=e.originPoint}i(na,"mixAxisDeltaLinear");function sa(t,e,o,r){t.min=A(e.min,o.min,r),t.max=A(e.max,o.max,r)}i(sa,"mixAxis");function bu(t,e,o,r){sa(t.x,e.x,o.x,r),sa(t.y,e.y,o.y,r)}i(bu,"mixBox");function wu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}i(wu,"hasOpacityCrossfade");var Au={duration:.45,ease:[.4,0,.1,1]},aa=i(t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),"userAgentContains"),la=aa("applewebkit/")&&!aa("chrome/")?Math.round:k;function ca(t){t.min=la(t.min),t.max=la(t.max)}i(ca,"roundAxis");function Mu(t){ca(t.x),ca(t.y)}i(Mu,"roundBox");function ma(t,e,o){return t==="position"||t==="preserve-aspect"&&!$i(Zi(e),Zi(o),.2)}i(ma,"shouldAnimatePositionOnly");function Cu(t){return t!==t.root&&t.scroll?.wasRoot}i(Cu,"checkNodeWasScrollRoot");var fa=Tr({attachResizeListener:i((t,e)=>xt(t,"resize",e),"attachResizeListener"),measureScroll:i(()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),"measureScroll"),checkIsScrollRoot:i(()=>!0,"checkIsScrollRoot")});var Vr={current:void 0},Vo=Tr({measureScroll:i(t=>({x:t.scrollLeft,y:t.scrollTop}),"measureScroll"),defaultParent:i(()=>{if(!Vr.current){let t=new fa({});t.mount(window),t.setOptions({layoutScroll:!0}),Vr.current=t}return Vr.current},"defaultParent"),resetTransform:i((t,e)=>{t.style.transform=e!==void 0?e:"none"},"resetTransform"),checkIsScrollRoot:i(t=>window.getComputedStyle(t).position==="fixed","checkIsScrollRoot")});var pa=F(G(),1);function Du(){!ee.current&&ao();let[t]=(0,pa.useState)(Ot.current);return t}i(Du,"useReducedMotion");var ha=F(G(),1),Sr=(0,ha.createContext)({});var da=F(G(),1);function ga(t){let e=(0,da.useRef)(null);return e.current===null&&(e.current=t()),e.current}i(ga,"useConstant");var Pr=F(G(),1);var xa=typeof window<"u";var ya=xa?Pr.useLayoutEffect:Pr.useEffect;var va=F(G(),1),Ce=(0,va.createContext)(null);var Ta=F(G(),1);var br=(0,Ta.createContext)({transformPagePoint:i(t=>t,"transformPagePoint"),isStatic:!1,reducedMotion:"never"});var jt=F(G(),1);function Va(t=!0){let e=(0,jt.useContext)(Ce);if(e===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:n}=e,a=(0,jt.useId)();(0,jt.useEffect)(()=>{if(t)return n(a)},[t]);let s=(0,jt.useCallback)(()=>t&&r&&r(a),[a,r,t]);return!o&&r?[!1,s]:[!0]}i(Va,"usePresence");var Sa=F(G(),1),wr=(0,Sa.createContext)({strict:!1});var Pa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ba=!1;function Eu(){if(ba)return;let t={};for(let e in Pa)t[e]={isEnabled:i(o=>Pa[e].some(r=>!!o[r]),"isEnabled")};co(t),ba=!0}i(Eu,"initFeatureDefinitions");function Ar(){return Eu(),Ei()}i(Ar,"getInitializedFeatureDefinitions");function wa(t){let e=Ar();for(let o in t)e[o]={...e[o],...t[o]};co(e)}i(wa,"loadFeatures");var Rr=F(mn(),1);var Le=F(G(),1);var Aa=F(G(),1),Nt=(0,Aa.createContext)({});var Mr=F(G(),1);function Ma(t,e){if(Ft(t)){let{initial:o,animate:r}=t;return{initial:o===!1||gt(o)?o:void 0,animate:gt(r)?r:void 0}}return t.inherit!==!1?e:{}}i(Ma,"getCurrentTreeVariants");function Da(t){let{initial:e,animate:o}=Ma(t,(0,Mr.useContext)(Nt));return(0,Mr.useMemo)(()=>({initial:e,animate:o}),[Ca(e),Ca(o)])}i(Da,"useCreateMotionContext");function Ca(t){return Array.isArray(t)?t.join(" "):t}i(Ca,"variantLabelsAsDependency");var Re=F(G(),1);var Ea=F(G(),1);var De=i(()=>({style:{},transform:{},transformOrigin:{},vars:{}}),"createHtmlRenderState");function en(t,e,o){for(let r in e)!C(e[r])&&!ho(r,o)&&(t[r]=e[r])}i(en,"copyRawValuesOnly");function Ru({transformTemplate:t},e){return(0,Ea.useMemo)(()=>{let o=De();return oe(o,e,t),Object.assign({},o.vars,o.style)},[e])}i(Ru,"useInitialMotionValues");function Lu(t,e){let o=t.style||{},r={};return en(r,o,t),Object.assign(r,Ru(t,e)),r}i(Lu,"useStyle");function Ra(t,e){let o={},r=Lu(t,e);return t.drag&&t.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=r,o}i(Ra,"useHTMLProps");var La=F(G(),1);var Cr=i(()=>({...De(),attrs:{}}),"createSvgRenderState");function ka(t,e,o,r){let n=(0,La.useMemo)(()=>{let a=Cr();return xo(a,e,yo(r),t.transformTemplate,t.style),{...a.attrs,style:{...a.style}}},[e]);if(t.style){let a={};en(a,t.style,t),n.style={...a,...n.style}}return n}i(ka,"useSVGProps");var ku=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function So(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ku.has(t)}i(So,"isValidMotionProp");function Bu(t,e){return t.startsWith("on")?!So(t):e?.(t)??!So(t)}i(Bu,"shouldForward");function Ba(t,e,o,r){let n={};for(let a in t)a==="values"&&typeof t.values=="object"||C(t[a])||(Bu(a,r)||o===!0&&So(a)||!e&&!So(a)||t.draggable&&a.startsWith("onDrag"))&&(n[a]=t[a]);return n}i(Ba,"filterProps");var Ia=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ee(t){return typeof t!="string"||t.includes("-")?!1:!!(Ia.indexOf(t)>-1||/[A-Z]/u.test(t))}i(Ee,"isSVGComponent");function Fa(t,e,o,{latestValues:r},n,a=!1,s,l){let c=(s??Ee(t)?ka:Ra)(e,r,n,t),m=Ba(e,typeof t=="string",a,l),f=t!==Re.Fragment?{...m,...c,ref:o}:{},{children:p}=e,d=(0,Re.useMemo)(()=>C(p)?p.get():p,[p]);return(0,Re.createElement)(t,{...f,children:d})}i(Fa,"useRender");var on=F(G(),1);function Iu({scrapeMotionValuesFromProps:t,createRenderState:e},o,r,n){return{latestValues:Fu(o,r,n,t),renderState:e()}}i(Iu,"makeState");function Fu(t,e,o,r){let n={},a=r(t,{});for(let p in a)n[p]=se(a[p]);let{initial:s,animate:l}=t,u=Ft(t),c=so(t);e&&c&&!u&&t.inherit!==!1&&(s===void 0&&(s=e.initial),l===void 0&&(l=e.animate));let m=o?o.initial===!1:!1;m=m||s===!1;let f=m?l:s;if(f&&typeof f!="boolean"&&!bt(f)){let p=Array.isArray(f)?f:[f];for(let d=0;d<p.length;d++){let h=qt(t,p[d]);if(h){let{transitionEnd:g,transition:x,...y}=h;for(let V in y){let T=y[V];if(Array.isArray(T)){let S=m?T.length-1:0;T=T[S]}T!==null&&(n[V]=T)}for(let V in g)n[V]=g[V]}}}return n}i(Fu,"makeLatestValues");var Dr=i(t=>(e,o)=>{let r=(0,on.useContext)(Nt),n=(0,on.useContext)(Ce),a=i(()=>Iu(t,e,r,n),"make");return o?a():ga(a)},"makeUseVisualState");var Oa=Dr({scrapeMotionValuesFromProps:re,createRenderState:De});var ja=Dr({scrapeMotionValuesFromProps:vo,createRenderState:Cr});var Na=Symbol.for("motionComponentSymbol");var ce=F(G(),1);function Ga(t,e,o){let r=(0,ce.useRef)(o);(0,ce.useInsertionEffect)(()=>{r.current=o});let n=(0,ce.useRef)(null);return(0,ce.useCallback)(a=>{a&&t.onMount?.(a),e&&(a?e.mount(a):e.unmount());let s=r.current;if(typeof s=="function")if(a){let l=s(a);typeof l=="function"&&(n.current=l)}else n.current?(n.current(),n.current=null):s(a);else s&&(s.current=a)},[e])}i(Ga,"useMotionRef");var q=F(G(),1);var Wa=F(G(),1),Er=(0,Wa.createContext)({});function Gt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}i(Gt,"isRefObject");function Ua(t,e,o,r,n,a){let{visualElement:s}=(0,q.useContext)(Nt),l=(0,q.useContext)(wr),u=(0,q.useContext)(Ce),c=(0,q.useContext)(br),m=c.reducedMotion,f=c.skipAnimations,p=(0,q.useRef)(null),d=(0,q.useRef)(!1);r=r||l.renderer,!p.current&&r&&(p.current=r(t,{visualState:e,parent:s,props:o,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:m,skipAnimations:f,isSVG:a}),d.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,g=(0,q.useContext)(Er);h&&!h.projection&&n&&(h.type==="html"||h.type==="svg")&&Ou(p.current,o,n,g);let x=(0,q.useRef)(!1);(0,q.useInsertionEffect)(()=>{h&&x.current&&h.update(o,u)});let y=o[to],V=(0,q.useRef)(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return ya(()=>{d.current=!0,h&&(x.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),V.current&&h.animationState&&h.animationState.animateChanges())}),(0,q.useEffect)(()=>{h&&(!V.current&&h.animationState&&h.animationState.animateChanges(),V.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),V.current=!1),h.enteringChildren=void 0)}),h}i(Ua,"useVisualElement");function Ou(t,e,o,r){let{layoutId:n,layout:a,drag:s,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:m,layoutCrossfade:f}=e;t.projection=new o(t.latestValues,e["data-framer-portal-id"]?void 0:Ka(t.parent)),t.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!s||l&&Gt(l),visualElement:t,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:u,layoutRoot:c,layoutAnchor:m})}i(Ou,"createProjectionNode");function Ka(t){if(t)return t.options.allowProjection!==!1?t.projection:Ka(t.parent)}i(Ka,"getClosestProjectingNode");function Lr(t,{forwardMotionProps:e=!1,type:o}={},r,n){r&&wa(r);let a=o?o==="svg":Ee(t),s=a?ja:Oa;function l(c,m){let f,p={...(0,Le.useContext)(br),...c,layoutId:ju(c)},{isStatic:d,isValidProp:h}=p,g=Da(c),x=s(c,d);if(!d&&typeof window<"u"){Nu(p,r);let y=Gu(p);f=y.MeasureLayout,g.visualElement=Ua(t,x,p,n,y.ProjectionNode,a)}return(0,Rr.jsxs)(Nt.Provider,{value:g,children:[f&&g.visualElement?(0,Rr.jsx)(f,{visualElement:g.visualElement,...p}):null,Fa(t,c,Ga(x,g.visualElement,m),x,d,e,a,h)]})}i(l,"MotionDOMComponent"),l.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;let u=(0,Le.forwardRef)(l);return u[Na]=t,u}i(Lr,"createMotionComponent");function ju({layoutId:t}){let e=(0,Le.useContext)(Sr).id;return e&&t!==void 0?e+"-"+t:t}i(ju,"useLayoutId");function Nu(t,e){let o=(0,Le.useContext)(wr).strict}i(Nu,"useStrictMode");function Gu(t){let e=Ar(),{drag:o,layout:r}=e;if(!o&&!r)return{};let n={...o,...r};return{MeasureLayout:o?.isEnabled(t)||r?.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}i(Gu,"getProjectionFunctionality");function za(t,e){if(typeof Proxy>"u")return Lr;let o=new Map,r=i((a,s)=>Lr(a,s,t,e),"factory"),n=i((a,s)=>r(a,s),"deprecatedFactoryFunction");return new Proxy(n,{get:i((a,s)=>s==="create"?r:(o.has(s)||o.set(s,Lr(s,void 0,t,e)),o.get(s)),"get")})}i(za,"createMotionProxy");var Ha=F(G(),1);var $a=i((t,e)=>e.isSVG??Ee(t)?new To(e):new go(e,{allowProjection:t!==Ha.Fragment}),"createDomVisualElement");var kr=class extends z{static{i(this,"AnimationFeature")}constructor(e){super(e),e.animationState||(e.animationState=Wi(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();bt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:o}=this.node.prevProps||{};e!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var Wu=0,Br=class extends z{static{i(this,"ExitAnimationFeature")}constructor(){super(...arguments),this.id=Wu++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!1){if(this.isExitComplete){let{initial:a,custom:s}=this.node.getProps();if(typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a)){let l=tt(this.node,a,s);if(l){let{transition:u,transitionEnd:c,...m}=l;for(let f in m)this.node.getValue(f)?.jump(m[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let n=this.node.animationState.setActive("exit",!e);o&&!e&&n.then(()=>{this.isExitComplete=!0,o(this.id)})}mount(){let{register:e,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),e&&(this.unmount=e(this.id))}unmount(){}};var _a={animation:{Feature:kr},exit:{Feature:Br}};function At(t){return{point:{x:t.pageX,y:t.pageY}}}i(At,"extractEventInfo");var Ya=i(t=>e=>Qt(e)&&t(e,At(e)),"addPointerInfo");function Wt(t,e,o,r){return xt(t,e,Ya(o),r)}i(Wt,"addPointerEvent");var Ir=i(({current:t})=>t?t.ownerDocument.defaultView:null,"getContextWindow");var Xa=i((t,e)=>Math.abs(t-e),"distance");function qa(t,e){let o=Xa(t.x,e.x),r=Xa(t.y,e.y);return Math.sqrt(o**2+r**2)}i(qa,"distance2D");var Za=new Set(["auto","scroll"]),ke=class{static{i(this,"PanSession")}constructor(e,o,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Fr(this.lastRawMoveEventInfo,this.transformPagePoint));let h=rn(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=qa(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;let{point:y}=h,{timestamp:V}=O;this.history.push({...y,timestamp:V});let{onStart:T,onMove:S}=this.handlers;g||(T&&T(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,h)},this.handlePointerMove=(h,g)=>{this.lastMoveEvent=h,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Fr(g,this.transformPagePoint),w.update(this.updatePoint,!0)},this.handlePointerUp=(h,g)=>{this.end();let{onEnd:x,onSessionEnd:y,resumeAnimation:V}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&V&&V(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let T=rn(h.type==="pointercancel"?this.lastMoveEventInfo:Fr(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(h,T),y&&y(h,T)},!Qt(e))return;this.dragSnapToOrigin=a,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=n||window;let u=At(e),c=Fr(u,this.transformPagePoint),{point:m}=c,{timestamp:f}=O;this.history=[{...m,timestamp:f}];let{onSessionStart:p}=o;p&&p(e,rn(c,this.history));let d={passive:!0,capture:!0};this.removeListeners=lt(Wt(this.contextWindow,"pointermove",this.handlePointerMove,d),Wt(this.contextWindow,"pointerup",this.handlePointerUp,d),Wt(this.contextWindow,"pointercancel",this.handlePointerUp,d)),l&&this.startScrollTracking(l)}startScrollTracking(e){let o=e.parentElement;for(;o;){let r=getComputedStyle(o);(Za.has(r.overflowX)||Za.has(r.overflowY))&&this.scrollPositions.set(o,{x:o.scrollLeft,y:o.scrollTop}),o=o.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let o=this.scrollPositions.get(e);if(!o)return;let r=e===window,n=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a={x:n.x-o.x,y:n.y-o.y};a.x===0&&a.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(e,n),w.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Q(this.updatePoint)}};function Fr(t,e){return e?{point:e(t.point)}:t}i(Fr,"transformPoint");function Ja(t,e){return{x:t.x-e.x,y:t.y-e.y}}i(Ja,"subtractPoint");function rn({point:t},e){return{point:t,delta:Ja(t,Qa(e)),offset:Ja(t,Uu(e)),velocity:Ku(e,.1)}}i(rn,"getPanInfo");function Uu(t){return t[0]}i(Uu,"startDevicePoint");function Qa(t){return t[t.length-1]}i(Qa,"lastDevicePoint");function Ku(t,e){if(t.length<2)return{x:0,y:0};let o=t.length-1,r=null,n=Qa(t);for(;o>=0&&(r=t[o],!(n.timestamp-r.timestamp>j(e)));)o--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&n.timestamp-r.timestamp>j(e)*2&&(r=t[1]);let a=H(n.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let s={x:(n.x-r.x)/a,y:(n.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}i(Ku,"getVelocity");function il(t,{min:e,max:o},r){return e!==void 0&&t<e?t=r?A(e,t,r.min):Math.max(t,e):o!==void 0&&t>o&&(t=r?A(o,t,r.max):Math.min(t,o)),t}i(il,"applyConstraints");function tl(t,e,o){return{min:e!==void 0?t.min+e:void 0,max:o!==void 0?t.max+o-(t.max-t.min):void 0}}i(tl,"calcRelativeAxisConstraints");function nl(t,{top:e,left:o,bottom:r,right:n}){return{x:tl(t.x,o,n),y:tl(t.y,e,r)}}i(nl,"calcRelativeConstraints");function el(t,e){let o=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([o,r]=[r,o]),{min:o,max:r}}i(el,"calcViewportAxisConstraints");function sl(t,e){return{x:el(t.x,e.x),y:el(t.y,e.y)}}i(sl,"calcViewportConstraints");function al(t,e){let o=.5,r=W(t),n=W(e);return n>r?o=ft(e.min,e.max-r,t.min):r>n&&(o=ft(t.min,t.max-n,e.min)),U(0,1,o)}i(al,"calcOrigin");function ll(t,e){let o={};return e.min!==void 0&&(o.min=e.min-t.min),e.max!==void 0&&(o.max=e.max-t.min),o}i(ll,"rebaseAxisConstraints");var Or=.35;function cl(t=Or){return t===!1?t=0:t===!0&&(t=Or),{x:ol(t,"left","right"),y:ol(t,"top","bottom")}}i(cl,"resolveDragElastic");function ol(t,e,o){return{min:rl(t,e),max:rl(t,o)}}i(ol,"resolveAxisElastic");function rl(t,e){return typeof t=="number"?t:t[e]||0}i(rl,"resolvePointElastic");var zu=new WeakMap,Nr=class{static{i(this,"VisualElementDragControls")}constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=L(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=i(f=>{o&&this.snapToCursor(At(f).point),this.stopAnimation()},"onSessionStart"),s=i((f,p)=>{let{drag:d,dragPropagation:h,onDragStart:g}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Vi(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(y=>{let V=this.getAxisMotionValue(y).get()||0;if(Y.test(V)){let{projection:T}=this.visualElement;if(T&&T.layout){let S=T.layout.layoutBox[y];S&&(V=W(S)*(parseFloat(V)/100))}}this.originPoint[y]=V}),g&&w.update(()=>g(f,p),!1,!0),Te(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},"onStart"),l=i((f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;let{dragPropagation:d,dragDirectionLock:h,onDirectionLock:g,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;let{offset:y}=p;if(h&&this.currentDirection===null){this.currentDirection=$u(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),x&&w.update(()=>x(f,p),!1,!0)},"onMove"),u=i((f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},"onSessionEnd"),c=i(()=>{let{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},"resumeAnimation"),{dragSnapToOrigin:m}=this.getProps();this.panSession=new ke(e,{onSessionStart:a,onStart:s,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:Ir(this.visualElement),element:this.visualElement.current})}stop(e,o){let r=e||this.latestPointerEvent,n=o||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!r)return;let{velocity:s}=n;this.startAnimation(s);let{onDragEnd:l}=this.getProps();l&&w.postRender(()=>l(r,n))}cancel(){this.isDragging=!1;let{projection:e,animationState:o}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,o,r){let{drag:n}=this.getProps();if(!r||!jr(e,n,this.currentDirection))return;let a=this.getAxisMotionValue(e),s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=il(s,this.constraints[e],this.elastic[e])),a.set(s)}resolveConstraints(){let{dragConstraints:e,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&Gt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=nl(r.layoutBox,e):this.constraints=!1,this.elastic=cl(o),n!==this.constraints&&!Gt(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&et(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=ll(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:o}=this.getProps();if(!e||!Gt(e))return!1;let r=e.current;J(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;n.root&&(n.root.scroll=void 0,n.root.updateScroll());let a=Oi(r,n.root,this.visualElement.getTransformPagePoint()),s=sl(n.layout.layoutBox,a);if(o){let l=o(Ri(s));this.hasMutatedConstraints=!!l,l&&(s=uo(l))}return s}startAnimation(e){let{drag:o,dragMomentum:r,dragElastic:n,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=et(m=>{if(!jr(m,o,this.currentDirection))return;let f=u&&u[m]||{};(s===!0||s===m)&&(f={min:0,max:0});let p=n?200:1e6,d=n?40:1e7,h={type:"inertia",velocity:r?e[m]:0,bounceStiffness:p,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(m,h)});return Promise.all(c).then(l)}startAxisValueAnimation(e,o){let r=this.getAxisMotionValue(e);return Te(this.visualElement,e),r.start(Xt(e,r,0,o,this.visualElement,!1))}stopAnimation(){et(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let o=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps()[o];return n||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){et(o=>{let{drag:r}=this.getProps();if(!jr(o,r,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(o);if(n&&n.layout){let{min:s,max:l}=n.layout.layoutBox[o],u=a.get()||0;a.set(e[o]-A(s,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Gt(o)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};et(s=>{let l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){let u=l.get();n[s]=al({min:u,max:u},this.constraints[s])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),et(s=>{if(!jr(s,e,null))return;let l=this.getAxisMotionValue(s),{min:u,max:c}=this.constraints[s];l.set(A(u,c,n[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;zu.set(this.visualElement,this);let e=this.visualElement.current,o=Wt(e,"pointerdown",c=>{let{drag:m,dragListener:f=!0}=this.getProps(),p=c.target,d=p!==e&&wi(p);m&&f&&!d&&this.start(c)}),r,n=i(()=>{let{dragConstraints:c}=this.getProps();Gt(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Hu(e,c.current,()=>this.scalePositionWithinConstraints())))},"measureDragConstraints"),{projection:a}=this.visualElement,s=a.addEventListener("measure",n);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),w.read(n);let l=xt(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:m})=>{this.isDragging&&m&&(et(f=>{let p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=c[f].translate,p.set(p.get()+c[f].translate))}),this.visualElement.render())}));return()=>{l(),o(),s(),u&&u(),r&&r()}}getProps(){let e=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:s=Or,dragMomentum:l=!0}=e;return{...e,drag:o,dragDirectionLock:r,dragPropagation:n,dragConstraints:a,dragElastic:s,dragMomentum:l}}};function ul(t){let e=!0;return()=>{if(e){e=!1;return}t()}}i(ul,"skipFirstCall");function Hu(t,e,o){let r=ur(t,ul(o)),n=ur(e,ul(o));return()=>{r(),n()}}i(Hu,"startResizeObservers");function jr(t,e,o){return(e===!0||e===t)&&(o===null||o===t)}i(jr,"shouldDrag");function $u(t,e=10){let o=null;return Math.abs(t.y)>e?o="y":Math.abs(t.x)>e&&(o="x"),o}i($u,"getCurrentDirection");var Gr=class extends z{static{i(this,"DragGesture")}constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new Nr(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}update(){let{dragControls:e}=this.node.getProps(),{dragControls:o}=this.node.prevProps||{};e!==o&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var nn=i(t=>(e,o)=>{t&&w.update(()=>t(e,o),!1,!0)},"asyncHandler"),Wr=class extends z{static{i(this,"PanGesture")}constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new ke(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ir(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:o,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:nn(e),onStart:nn(o),onMove:nn(r),onEnd:i((a,s)=>{delete this.session,n&&w.postRender(()=>n(a,s))},"onEnd")}}mount(){this.removePointerDownListener=Wt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var ml=F(mn(),1);var Po=F(G(),1);var sn=!1,an=class extends Po.Component{static{i(this,"MeasureLayoutWithContext")}componentDidMount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:r,layoutId:n}=this.props,{projection:a}=e;a&&(o.group&&o.group.add(a),r&&r.register&&n&&r.register(a),sn&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:i(()=>this.safeToRemove(),"onExitComplete")})),ae.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:o,visualElement:r,drag:n,isPresent:a}=this.props,{projection:s}=r;return s&&(s.isPresent=a,e.layoutDependency!==o&&s.setOptions({...s.options,layoutDependency:o}),sn=!0,n||e.layoutDependency!==o||o===void 0||e.isPresent!==a?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||w.postRender(()=>{let l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:o}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=o,r.root.didUpdate(),Jt.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:n}=e;sn=!0,n&&(n.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Ur(t){let[e,o]=Va(),r=(0,Po.useContext)(Sr);return(0,ml.jsx)(an,{...t,layoutGroup:r,switchLayoutGroup:(0,Po.useContext)(Er),isPresent:e,safeToRemove:o})}i(Ur,"MeasureLayout");var fl={pan:{Feature:Wr},drag:{Feature:Gr,ProjectionNode:Vo,MeasureLayout:Ur}};function pl(t,e,o){let{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",o==="Start");let n="onHover"+o,a=r[n];a&&w.postRender(()=>a(e,At(e)))}i(pl,"handleHoverEvent");var Kr=class extends z{static{i(this,"HoverGesture")}mount(){let{current:e}=this.node;e&&(this.unmount=Si(e,(o,r)=>(pl(this.node,r,"Start"),n=>pl(this.node,n,"End"))))}unmount(){}};var zr=class extends z{static{i(this,"FocusGesture")}constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lt(xt(this.node.current,"focus",()=>this.onFocus()),xt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function hl(t,e,o){let{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",o==="Start");let n="onTap"+(o==="End"?"":o),a=r[n];a&&w.postRender(()=>a(e,At(e)))}i(hl,"handlePressEvent");var Hr=class extends z{static{i(this,"PressGesture")}mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:o,propagate:r}=this.node.props;this.unmount=Mi(e,(n,a)=>(hl(this.node,a,"Start"),(s,{success:l})=>hl(this.node,s,l?"End":"Cancel")),{useGlobalTarget:o,stopPropagation:r?.tap===!1})}unmount(){}};var cn=new WeakMap,ln=new WeakMap,_u=i(t=>{let e=cn.get(t.target);e&&e(t)},"fireObserverCallback"),Yu=i(t=>{t.forEach(_u)},"fireAllObserverCallbacks");function Xu({root:t,...e}){let o=t||document;ln.has(o)||ln.set(o,{});let r=ln.get(o),n=JSON.stringify(e);return r[n]||(r[n]=new IntersectionObserver(Yu,{root:t,...e})),r[n]}i(Xu,"initIntersectionObserver");function dl(t,e,o){let r=Xu(e);return cn.set(t,o),r.observe(t),()=>{cn.delete(t),r.unobserve(t)}}i(dl,"observeIntersection");var qu={some:0,all:1},$r=class extends z{static{i(this,"InViewFeature")}constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:o,margin:r,amount:n="some",once:a}=e,s={root:o?o.current:void 0,rootMargin:r,threshold:typeof n=="number"?n:qu[n]},l=i(u=>{let{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:m,onViewportLeave:f}=this.node.getProps(),p=c?m:f;p&&p(u)},"onIntersectionUpdate");this.stopObserver=dl(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:o}=this.node;["amount","margin","root"].some(Zu(e,o))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Zu({viewport:t={}},{viewport:e={}}={}){return o=>t[o]!==e[o]}i(Zu,"hasViewportOptionChanged");var gl={inView:{Feature:$r},tap:{Feature:Hr},focus:{Feature:zr},hover:{Feature:Kr}};var xl={layout:{ProjectionNode:Vo,MeasureLayout:Ur}};var yl={..._a,...gl,...fl,...xl};var un=za(yl,$a);var MD=un;export{Du as a,MD as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ee}from"./chunk-5WJXVZMZ.js";import{b as Z}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{d as se,f as X}from"./chunk-JBIN7W2B.js";import"./chunk-FSRSK4LY.js";import{a as re}from"./chunk-FKVZRPV5.js";import{a as O}from"./chunk-WUWBZPUK.js";import{d as le,r as ne}from"./chunk-Y4Q25F6X.js";import"./chunk-T2IE5GKA.js";import{a as k,d as ae,f as ce,g as me,i as Y}from"./chunk-YKXDMIHQ.js";var te=ae(ce(),1);var a=ae(me(),1);var pe="/_lunora/health",he="/_lunora/health/ready",ue=k((r,e)=>(r.endsWith("/")?r.slice(0,-1):r)+e,"me"),fe=k(()=>{let r=X();return async e=>{let w=e==="ready"?he:pe,t=r.getAuthToken(),y=ue(r.url,w);try{let i=await fetch(y,{headers:t===null?{}:{authorization:`Bearer ${t}`}}),p=null;try{p=await i.json()}catch{p=null}return{body:p,ok:i.ok,status:i.status}}catch(i){return{body:null,error:i instanceof Error?i.message:String(i),ok:!1,status:0}}}},"pe"),ge={crit:"bg-destructive",ok:"bg-success",warn:"bg-warning"},ye=k(r=>r==="unhealthy"?"crit":r==="degraded"?"warn":"ok","fe"),ie=k(r=>{let e=(0,te.c)(13),{label:w,level:t,testId:y,value:i}=r,p=ge[t],d;e[0]!==p?(d=Y("size-1.5 shrink-0 rounded-full",p),e[0]=p,e[1]=d):d=e[1];let o;e[2]!==d?(o=(0,a.jsx)("span",{"aria-hidden":"true",className:d}),e[2]=d,e[3]=o):o=e[3];let c;e[4]!==w||e[5]!==o?(c=(0,a.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:[o,w]}),e[4]=w,e[5]=o,e[6]=c):c=e[6];let h;e[7]!==y||e[8]!==i?(h=(0,a.jsx)("span",{className:"text-lg font-semibold text-foreground","data-testid":y,children:i}),e[7]=y,e[8]=i,e[9]=h):h=e[9];let C;return e[10]!==c||e[11]!==h?(C=(0,a.jsx)(O,{className:"gap-0 py-0",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[c,h]})}),e[10]=c,e[11]=h,e[12]=C):C=e[12],C},"Z"),Pe=k(r=>{let e=(0,te.c)(107),{probe:w}=r,t=le(),y=X(),i=fe(),p=w??i,d;e[0]!==p?(d=k(async()=>{let[s,n]=await Promise.all([p("live"),p("ready")]);return{live:s,ready:n}},"o"),e[0]=p,e[1]=d):d=e[1];let o;e[2]!==y?(o=y.clientIdentifier(),e[2]=y,e[3]=o):o=e[3];let c;e[4]!==o?(c=["deployment-health",o],e[4]=o,e[5]=c):c=e[5];let h;e[6]!==d||e[7]!==c?(h={queryFn:d,queryKey:c},e[6]=d,e[7]=c,e[8]=h):h=e[8];let{data:C,isPending:de}=se(h),Q=C?.live??null,oe=C?.ready??null;if(de){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"deployment-health-loading",children:[(0,a.jsx)(ee,{className:"h-16 w-full"}),(0,a.jsx)(ee,{className:"h-40 w-full"})]}),e[9]=s):s=e[9],s}let l=Q?.body??null;if(l===null){let s=Q?.status===403,n;e[10]!==s||e[11]!==Q?.error||e[12]!==t?(n=s?t("The health endpoint is in the admin posture. Paste a valid admin token in the connect popover, or set its auth to public."):t("Couldn't reach the health endpoint: {message}",{message:Q?.error??t("no response")}),e[10]=s,e[11]=Q?.error,e[12]=t,e[13]=n):n=e[13];let m;e[14]!==t?(m=t("Health endpoint unavailable"),e[14]=t,e[15]=m):m=e[15];let f;return e[16]!==n||e[17]!==m?(f=(0,a.jsx)(re,{description:n,testId:"deployment-health-error",title:m}),e[16]=n,e[17]=m,e[18]=f):f=e[18],f}let J;e[19]!==l.status?(J=ye(l.status),e[19]=l.status,e[20]=J):J=e[20];let W=J,u;if(l.status==="unhealthy"){let s;e[21]!==t?(s=t("Unhealthy"),e[21]=t,e[22]=s):s=e[22],u=s}else if(l.status==="degraded"){let s;e[23]!==t?(s=t("Degraded"),e[23]=t,e[24]=s):s=e[24],u=s}else{let s;e[25]!==t?(s=t("Healthy"),e[25]=t,e[26]=s):s=e[26],u=s}let j=oe?.ok??!1,G=j?"ok":"crit",H,I,P,x,N,v,S,V,b,_;if(e[27]!==l.appName||e[28]!==l.appVersion||e[29]!==l.checks||e[30]!==l.timestamp||e[31]!==W||e[32]!==G||e[33]!==j||e[34]!==u||e[35]!==t){let s=[...l.checks].toSorted(xe);I="flex flex-col gap-6",P="deployment-health";let n;e[46]!==t?(n=t("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint \u2014 wire an uptime monitor or a Cloudflare Health Check at it."),e[46]=t,e[47]=n):n=e[47],e[48]!==n?(x=(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:n}),e[48]=n,e[49]=x):x=e[49];let m;e[50]!==u?(m=(0,a.jsx)("span",{className:"text-sm font-semibold text-foreground","data-testid":"dh-status",children:u}),e[50]=u,e[51]=m):m=e[51];let f;e[52]!==l.appName||e[53]!==l.appVersion?(f=(0,a.jsxs)("span",{className:"font-mono text-[13px] text-muted-foreground","data-testid":"dh-app",children:[l.appName," \xB7 ",l.appVersion]}),e[52]=l.appName,e[53]=l.appVersion,e[54]=f):f=e[54];let D;e[55]!==m||e[56]!==f?(D=(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsxs)("div",{className:"grid leading-tight",children:[m,f]})}),e[55]=m,e[56]=f,e[57]=D):D=e[57];let L;e[58]!==t?(L=t("Checked"),e[58]=t,e[59]=L):L=e[59];let T;e[60]!==L?(T=(0,a.jsx)("div",{className:"font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:L}),e[60]=L,e[61]=T):T=e[61];let $;e[62]!==l.timestamp?($=ne(l.timestamp),e[62]=l.timestamp,e[63]=$):$=e[63];let q;e[64]!==$?(q=(0,a.jsx)("time",{className:"text-[13px] text-muted-foreground","data-testid":"dh-timestamp",children:$}),e[64]=$,e[65]=q):q=e[65];let B;e[66]!==T||e[67]!==q?(B=(0,a.jsxs)("div",{className:"text-end",children:[T,q]}),e[66]=T,e[67]=q,e[68]=B):B=e[68],e[69]!==D||e[70]!==B?(N=(0,a.jsx)(O,{className:"gap-0 py-0",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4",children:[D,B]})}),e[69]=D,e[70]=B,e[71]=N):N=e[71];let E;e[72]!==t?(E=t("Liveness"),e[72]=t,e[73]=E):E=e[73];let R;e[74]!==W||e[75]!==u||e[76]!==E?(R=(0,a.jsx)(ie,{label:E,level:W,testId:"dh-liveness",value:u}),e[74]=W,e[75]=u,e[76]=E,e[77]=R):R=e[77];let U;e[78]!==t?(U=t("Readiness"),e[78]=t,e[79]=U):U=e[79];let A;e[80]!==j||e[81]!==t?(A=t(j?"Ready":"Not ready"),e[80]=j,e[81]=t,e[82]=A):A=e[82];let F;e[83]!==G||e[84]!==U||e[85]!==A?(F=(0,a.jsx)(ie,{label:U,level:G,testId:"dh-readiness",value:A}),e[83]=G,e[84]=U,e[85]=A,e[86]=F):F=e[86],e[87]!==R||e[88]!==F?(v=(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2","data-testid":"dh-probes",children:[R,F]}),e[87]=R,e[88]=F,e[89]=v):v=e[89],H=O,S="gap-0 py-0",V="dh-checks";let K;e[90]!==t?(K=t("Subsystem checks"),e[90]=t,e[91]=K):K=e[91],e[92]!==K?(b=(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:K})}),e[92]=K,e[93]=b):b=e[93],_=s.length===0?(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"dh-checks-empty",children:t("No checks reported.")}):(0,a.jsx)("ul",{className:"divide-y divide-border",children:s.map(g=>(0,a.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 px-4 py-2.5 text-xs","data-testid":`dh-check-${g.name}`,children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:Y("size-1.5 shrink-0 rounded-full",g.status==="up"?"bg-success":"bg-destructive")}),(0,a.jsx)("span",{className:"font-mono text-foreground",children:g.name}),g.critical&&(0,a.jsx)(Z,{variant:"outline",children:t("Critical")})]}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[g.message!==void 0&&(0,a.jsx)("span",{className:"text-muted-foreground",children:g.message}),(0,a.jsx)(Z,{"data-testid":`dh-check-status-${g.name}`,variant:g.status==="up"?"secondary":"destructive",children:g.status==="up"?t("Up"):t("Down")})]})]},g.name))}),e[27]=l.appName,e[28]=l.appVersion,e[29]=l.checks,e[30]=l.timestamp,e[31]=W,e[32]=G,e[33]=j,e[34]=u,e[35]=t,e[36]=H,e[37]=I,e[38]=P,e[39]=x,e[40]=N,e[41]=v,e[42]=S,e[43]=V,e[44]=b,e[45]=_}else H=e[36],I=e[37],P=e[38],x=e[39],N=e[40],v=e[41],S=e[42],V=e[43],b=e[44],_=e[45];let z;e[94]!==H||e[95]!==S||e[96]!==V||e[97]!==b||e[98]!==_?(z=(0,a.jsxs)(H,{className:S,"data-testid":V,children:[b,_]}),e[94]=H,e[95]=S,e[96]=V,e[97]=b,e[98]=_,e[99]=z):z=e[99];let M;return e[100]!==I||e[101]!==P||e[102]!==x||e[103]!==N||e[104]!==v||e[105]!==z?(M=(0,a.jsxs)("div",{className:I,"data-testid":P,children:[x,N,v,z]}),e[100]=I,e[101]=P,e[102]=x,e[103]=N,e[104]=v,e[105]=z,e[106]=M):M=e[106],M},"Pe");function xe(r,e){return r.name.localeCompare(e.name)}k(xe,"he");export{Pe as DeploymentHealthPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as p,c as l}from"./chunk-OKG3HWSJ.js";import{a as t,d as g,e as h}from"./chunk-YKXDMIHQ.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 @@
|
|
|
1
|
+
import{a as i,d as m,e as v,f as b}from"./chunk-YKXDMIHQ.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as G}from"./chunk-EA2JKR5D.js";import{a as x}from"./chunk-IMOHEGMV.js";import{a as U}from"./chunk-IFLTA2OD.js";import{b as M}from"./chunk-OGUKYRFM.js";import"./chunk-OKG3HWSJ.js";import{P as O}from"./chunk-46ZJ3TM4.js";import"./chunk-4L4WTGN5.js";import{a as h}from"./chunk-EBWXFG4H.js";import"./chunk-TGHH7ZFA.js";import"./chunk-5GFSKIB2.js";import{b as w}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as E}from"./chunk-CXNZVJ3S.js";import{f as D}from"./chunk-JBIN7W2B.js";import"./chunk-FSRSK4LY.js";import{d as K,e as _,f as z,h as B,o as P,r as q}from"./chunk-Y4Q25F6X.js";import"./chunk-T2IE5GKA.js";import{a as s,d as J,e as ie,g as oe}from"./chunk-YKXDMIHQ.js";var i=J(ie(),1);var e=J(oe(),1);var de=s(r=>r.kind==="id"?r.table===void 0?"id":`id<${r.table}>`:r.kind==="array"?r.element===void 0?"array":`${r.element}[]`:r.kind,"oe"),le=s(r=>r===void 0||r.length===0?"()":`(${r.map(o=>`${o.name}${o.optional?"?":""}: ${de(o)}`).join(", ")})`,"ie"),ce=s(r=>{switch(r){case"array":return[];case"bigint":case"number":return 0;case"boolean":return!1;case"object":case"record":return{};default:return""}},"de"),ue=s(r=>{let o={};for(let a of r??[])a.optional||(o[a.name]=ce(a.kind));return JSON.stringify(o,void 0,2)},"le"),me=z(E.runAs),fe=10,pe=s(r=>r===void 0?"undefined":JSON.stringify(r,null,2),"me"),Fe=s(({functions:r,runAsIdentity:o=!1}={})=>{let a=K(),u=D(),[H,Q]=(0,i.useState)(null),[k,V]=(0,i.useState)(null),g=r??H??[],[I,S]=(0,i.useState)(""),[m,b]=(0,i.useState)("{}"),[c,F]=(0,i.useState)(""),[f,W]=(0,i.useState)(""),[v,p]=(0,i.useState)("idle"),[X,y]=(0,i.useState)(void 0),[C,N]=(0,i.useState)(null),[$,Y]=(0,i.useState)([]);(0,i.useEffect)(()=>{if(r!==void 0)return;let t=!1;return u.listFunctions().then(d=>(t||Q(d),d)).catch(d=>{t||V(B(d))}),()=>{t=!0}},[u,r]);let A=I===""?g[0]?.path??"":I,n=g.find(t=>t.path===A),Z=s(async()=>{if(!n)return;let t;try{t=m.trim()===""?{}:JSON.parse(m)}catch(l){p("error"),y(void 0),N(a("Invalid JSON args: {message}",{message:l.message}));return}let d={__lunoraRef:n.path},R=c.trim()===""?{}:{shardKey:c.trim()},j=o?f.trim():"",L=s(l=>{Y(T=>[{argsText:m,at:Date.now(),id:(T[0]?.id??0)+1,kind:n.kind,path:n.path,shardKey:c,status:l},...T].slice(0,fe))},"$");p("running"),N(null);try{let l=j===""?await _(u,n.kind,d,t,R):await u.query(me,{args:t,functionPath:n.path,userId:j},R);M(c),y(l),p("success"),L("success")}catch(l){y(void 0),N(l.message),p("error"),L("error")}},"J"),ee=s(t=>{S(t.path),b(t.argsText),F(t.shardKey)},"M"),te=s(t=>{S(t.target.value)},"P"),re=s(t=>{b(t.target.value)},"z"),ae=s(t=>{W(t.target.value)},"q"),se=s(()=>{P(Z())},"H"),ne=s(()=>{b(ue(n?.args))},"V");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-runner",children:[k!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"function-discover-error",role:"alert",children:k}),(0,e.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsx)(x,{htmlFor:"function-select",children:a("Function")}),(0,e.jsx)("select",{"aria-label":a("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:te,value:A,children:g.map(t=>(0,e.jsxs)("option",{value:t.path,children:[t.path," (",t.kind,")"]},t.path))}),n!==void 0&&(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,e.jsx)("span",{className:"mr-1.5 font-medium",children:a("Signature")}),(0,e.jsx)("code",{className:"font-mono","data-testid":"function-signature",children:le(n.args)})]})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)(x,{htmlFor:"args-input",children:a("Arguments")}),(0,e.jsx)(h,{"data-testid":"prefill-button",disabled:n===void 0,onClick:ne,size:"xs",type:"button",variant:"ghost",children:a("Prefill")})]}),(0,e.jsx)(G,{"aria-label":a("Arguments"),className:"font-mono text-xs","data-testid":"args-input",id:"args-input",onChange:re,value:m})]}),(0,e.jsx)(U,{onChange:F,testId:"shard-input",value:c}),o&&(0,e.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"run-as-field",children:[(0,e.jsx)(x,{htmlFor:"run-as-input",children:a("Run as identity (userId)")}),(0,e.jsx)(O,{"aria-label":a("Run as identity (userId)"),className:"font-mono text-xs","data-testid":"run-as-input",id:"run-as-input",onChange:ae,placeholder:a("Leave empty to run as admin"),value:f}),(0,e.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a("Dev only: runs the function as this user so you can test auth and RLS. Forged over the admin gate.")})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(h,{"data-testid":"run-button",disabled:v==="running"||n===void 0,onClick:se,type:"button",children:a("Run")}),n!==void 0&&(0,e.jsx)(w,{variant:"outline",children:n.kind}),o&&f.trim()!==""&&(0,e.jsx)(w,{"data-testid":"run-as-badge",variant:"secondary",children:a("as {userId}",{userId:f.trim()})})]})]}),v==="error"&&C!==null&&(0,e.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:C}),v==="success"&&(0,e.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"result",children:pe(X)}),$.length>0&&(0,e.jsx)("ul",{className:"flex flex-col overflow-hidden rounded-xl border border-border","data-testid":"fn-history",children:$.map((t,d)=>(0,e.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,e.jsx)("span",{className:t.status==="success"?"text-success":"text-destructive","data-testid":`fn-history-status-${d.toString()}`,children:t.status==="success"?"\u2713":"\u2717"})," ",(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t.path," (",t.kind,")"]})," ",(0,e.jsx)("time",{className:"text-xs text-muted-foreground",children:q(t.at)})," ",(0,e.jsx)(h,{className:"ml-auto","data-testid":`fn-history-load-${d.toString()}`,onClick:s(()=>{ee(t)},"onClick"),size:"xs",type:"button",variant:"ghost",children:a("Load")})]},t.id))})]})},"Ae");export{Fe as FunctionRunner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as R}from"./chunk-LJC5BM3X.js";import"./chunk-JAZCU2PP.js";import"./chunk-ULIQFBZU.js";import"./chunk-OOESPRIZ.js";import"./chunk-35DM4JJG.js";import{a as p}from"./chunk-CXNZVJ3S.js";import{c as h}from"./chunk-ECQTVV2J.js";import"./chunk-JBIN7W2B.js";import"./chunk-FSRSK4LY.js";import"./chunk-HEAQVSNS.js";import"./chunk-WUWBZPUK.js";import{d as g}from"./chunk-Y4Q25F6X.js";import"./chunk-T2IE5GKA.js";import{a as i,d as m,f as S,g as _}from"./chunk-YKXDMIHQ.js";var f=m(S(),1);var k=m(_(),1);var A=i((e,s)=>({"admin-token-weak":e("Weak admin token"),"auth-secret-weak":e("Weak auth secret"),"cookies-insecure":e("Session cookies are not Secure"),"cors-wildcard-credentials":e("Wildcard CORS with credentials"),"csrf-disabled":e("CSRF/origin guard is off"),"dev-args-unredacted":e("Request log keeps un-redacted args"),"security-headers-disabled":e("Security headers are off"),"ws-gate-open":e("Live admin subscriptions are ungated")})[s.kind],"f"),w=i(e=>Array.isArray(e.findings)?e.findings:[],"k"),E=i(e=>({"admin-token-weak":"LUNORA_ADMIN_TOKEN","auth-secret-weak":"AUTH_SECRET","cookies-insecure":"BETTER_AUTH_URL","cors-wildcard-credentials":"LUNORA_ALLOWED_ORIGINS","csrf-disabled":"LUNORA_SECURITY_CSRF","dev-args-unredacted":"request log","security-headers-disabled":"LUNORA_SECURITY_HEADERS","ws-gate-open":"LUNORA_WS_BEARER"})[e.kind],"S"),T=i((e,s)=>({"admin-token-weak":e("Your admin token is {length} characters \u2014 use at least {min} for a brute-force-resistant secret.",{length:s.detail?.length,min:s.detail?.min}),"auth-secret-weak":e("Your auth secret is {length} characters \u2014 use at least {min} (e.g. `openssl rand -hex 32`) to sign sessions safely.",{length:s.detail?.length,min:s.detail?.min}),"cookies-insecure":e("BETTER_AUTH_URL is a plaintext http:// origin, so session cookies cannot be Secure and ride in cleartext. Serve auth over https:// in production."),"cors-wildcard-credentials":e("LUNORA_ALLOWED_ORIGINS includes a wildcard while credentials are allowed \u2014 browsers reject this and it defeats the allowlist. Name explicit origins instead of *."),"csrf-disabled":e("LUNORA_SECURITY_CSRF is off, so cross-origin state-changing cookie requests are not blocked. Re-enable it in production to keep mutations un-forgeable."),"dev-args-unredacted":e("This worker reports a development environment, so the request log stores raw args and identity. Confirm it isn't a mislabeled production deploy."),"security-headers-disabled":e("LUNORA_SECURITY_HEADERS is off, so HSTS, CSP, nosniff, and frame-options are not applied. Re-enable the baseline headers in production."),"ws-gate-open":e("LUNORA_WS_BEARER is unset, so the WebSocket upgrade gate is open: live admin subscriptions need no credential. Set it to gate them like the HTTP admin RPCs.")})[s.kind],"A"),L=i(()=>{let e=(0,f.c)(8),s=g(),t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={},e[0]=t):t=e[0];let{data:a,error:d,errorSource:c}=h(p.getSecurityAudit,t),n;if(e[1]!==a||e[2]!==s){let u=a===void 0?null:w(a);n=u===null?null:u.map(r=>({description:T(s,r),entity:E(r),issueType:A(s,r),key:r.kind,level:r.level})),e[1]=a,e[2]=s,e[3]=n}else n=e[3];let l=n,o;return e[4]!==d||e[5]!==c||e[6]!==l?(o=(0,k.jsx)(R,{error:d,errorSource:c,rows:l,testId:"lunora-security-advisor"}),e[4]=d,e[5]=c,e[6]=l,e[7]=o):o=e[7],o},"y");export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-YKXDMIHQ.js";var g=new Set(["contains","eq","gt","gte","lt","lte","ne"]),n=s(r=>{if(typeof r!="string")return;let e=r.trim();return e===""?void 0:e},"s"),v=s(r=>{if(r===null||typeof r!="object")return!1;let e=r;return typeof e.column=="string"&&typeof e.operator=="string"&&g.has(e.operator)},"p"),h=s(r=>{if(typeof r!="string"||r==="")return[];try{let e=JSON.parse(r);return Array.isArray(e)?e.filter(v):[]}catch{return[]}},"c"),f=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}},"f"),p=/^[\da-f]{16}$/u,u=s(r=>{let e={};if(typeof r.pins=="string"&&r.pins!==""){let l=r.pins.split(",").filter(c=>c!==""&&c.length<=64).slice(0,12);l.length>0&&(e.pins=l.join(","))}r.schema==="global"&&(e.schema="global");let o=n(r.table);o!==void 0&&(e.table=o);let i=n(r.shard);i!==void 0&&(e.shard=i);let d=n(r.search);d!==void 0&&(e.search=d);let a=n(r.order);a!==void 0&&f(a)!==void 0&&(e.order=a);let t=n(r.filters);return t!==void 0&&h(t).length>0&&(e.filters=t),e},"h"),y=s(r=>{let e=h(r.filters),o=f(r.order);return{filters:e.length>0?e:void 0,orderBy:o,search:typeof r.search=="string"&&r.search!==""?r.search:void 0,shard:typeof r.shard=="string"&&r.shard!==""?r.shard:void 0,table:typeof r.table=="string"&&r.table!==""?r.table:void 0,tier:r.schema==="global"?"global":"shard"}},"b"),b=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"),m=s(r=>{let{version:e}=r;return typeof e=="string"&&p.test(e)?{version:e}:{}},"y");export{u as a,y as b,b as c,m as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-YKXDMIHQ.js";var r=n(t=>{if(typeof t=="string")return t;try{return JSON.stringify(t)??String(t)}catch{return String(t)}},"i"),o=n(t=>typeof t!="object"||t===null||Array.isArray(t)?"":Object.entries(t).map(([e,i])=>`${e}=${r(i)}`).join(" "),"o");export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,d as y,e as d}from"./chunk-YKXDMIHQ.js";var t=y(d(),1);var S=u((r,a=400)=>{let e=(r??"").trim(),[o,c]=(0,t.useState)(e),[i,n]=(0,t.useState)(e),m=(0,t.useRef)(r);m.current!==r&&(m.current=r,c(e),n(e));let f=o.trim();return(0,t.useEffect)(()=>{let s=setTimeout(()=>{n(f)},a);return()=>{clearTimeout(s)}},[f,a]),{queryShardKey:i,setShardKey:u(s=>{c(s)},"setShardKey"),shardKey:o}},"f");export{S as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ve}from"./chunk-UDCVU3Z5.js";import"./chunk-I52I2DJG.js";import{a as He}from"./chunk-EA2JKR5D.js";import{a as Ke}from"./chunk-66UGPQVC.js";import"./chunk-D27D4UUI.js";import{a as Ge}from"./chunk-I5OKDKON.js";import{P as je}from"./chunk-46ZJ3TM4.js";import"./chunk-4L4WTGN5.js";import{a as le}from"./chunk-EBWXFG4H.js";import"./chunk-TGHH7ZFA.js";import"./chunk-5GFSKIB2.js";import{b as de}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as Pe}from"./chunk-JAZCU2PP.js";import{a as Ue}from"./chunk-ULIQFBZU.js";import"./chunk-OOESPRIZ.js";import"./chunk-35DM4JJG.js";import{a as F}from"./chunk-CXNZVJ3S.js";import{c as Me}from"./chunk-ECQTVV2J.js";import{f as We}from"./chunk-JBIN7W2B.js";import"./chunk-FSRSK4LY.js";import{a as ie}from"./chunk-FKVZRPV5.js";import{a as _e,b as Be,c as ke,d as G,e as C,f as w}from"./chunk-HEAQVSNS.js";import{a as Te,e as De}from"./chunk-WUWBZPUK.js";import{d as $,f as ue,g as ce,h as me,o as he,r as ze}from"./chunk-Y4Q25F6X.js";import"./chunk-T2IE5GKA.js";import{a as h,d as Ee,e as rt,f as nt,g as ot}from"./chunk-YKXDMIHQ.js";var W=Ee(nt(),1);var A=Ee(rt(),1);var t=Ee(ot(),1);var dt=h((n,e)=>{let a=new Set(n.map(s=>s.deadLetterQueue).filter(s=>typeof s=="string"&&s!=="")),l=n.filter(s=>(s.deadLetterQueue===void 0||s.deadLetterQueue==="")&&!a.has(s.name)),d=e.filter(s=>s.deadLettered).length;return{deadLetteredCount:d,queuesWithoutDlq:l,showReliabilityWarning:l.length>0||d>0}},"rt"),lt=200,it=ue(F.sendQueueMessage),ut=ue(F.replayQueueMessage),ct=ue(F.clearQueueMessages),Xe=96,mt=h(n=>{if(n===void 0)return"\u2014";try{return JSON.stringify(n)}catch{return"[unserializable]"}},"it"),ht=h(n=>n.length>Xe?`${n.slice(0,Xe)}\u2026`:n,"ct"),pt=h(n=>n==="error"?"destructive":n==="retry"?"outline":"secondary","ut"),gt=h((n,e)=>e(n==="messages"?"Messages":n==="send"?"Send":"Declared"),"mt"),ft=h(n=>{let e=(0,W.c)(11),{loaded:a,queues:l}=n,d=$(),s;e[0]!==d?(s=d("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker."),e[0]=d,e[1]=s):s=e[1];let o;e[2]!==s?(o=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:s}),e[2]=s,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==l||e[6]!==d?(r=a&&l.length===0?(0,t.jsx)(ie,{description:d("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),testId:"queues-empty",title:d("No queues defined")}):(0,t.jsx)(Te,{className:"overflow-hidden py-0",children:(0,t.jsx)(De,{className:"px-0",children:(0,t.jsxs)(_e,{"data-testid":"queues-table",children:[(0,t.jsx)(Be,{children:(0,t.jsxs)(G,{children:[(0,t.jsx)(C,{children:d("Export")}),(0,t.jsx)(C,{children:d("Queue")}),(0,t.jsx)(C,{children:d("Mode")}),(0,t.jsx)(C,{children:d("Binding")}),(0,t.jsx)(C,{children:d("Dead-letter")})]})}),(0,t.jsx)(ke,{children:l.map(bt)})]})})}),e[4]=a,e[5]=l,e[6]=d,e[7]=r):r=e[7];let p;return e[8]!==o||e[9]!==r?(p=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"queues-declared",children:[o,r]}),e[8]=o,e[9]=r,e[10]=p):p=e[10],p},"ft"),xt=h(n=>{let e=(0,W.c)(67),{message:a,onReplay:l,replayingId:d}=n,s=$(),o,r,p,c,x,N,y,i,m,f;if(e[0]!==a.attempts||e[1]!==a.body||e[2]!==a.deadLettered||e[3]!==a.exportName||e[4]!==a.id||e[5]!==a.messageId||e[6]!==a.outcome||e[7]!==a.queue||e[8]!==s){let j=mt(a.body);r=G,N=`queues-message-${a.id}`;let z=a.exportName??a.queue;e[19]!==z?(y=(0,t.jsx)(w,{className:"font-mono text-xs",children:z}),e[19]=z,e[20]=y):y=e[20],e[21]!==a.messageId?(i=(0,t.jsx)(w,{className:"max-w-[16ch] truncate font-mono text-xs text-muted-foreground",title:a.messageId,children:a.messageId}),e[21]=a.messageId,e[22]=i):i=e[22],e[23]!==a.attempts?(m=(0,t.jsx)(w,{className:"font-mono text-xs tabular-nums",children:a.attempts}),e[23]=a.attempts,e[24]=m):m=e[24];let T=`queues-outcome-${a.id}`,D;e[25]!==a.outcome?(D=pt(a.outcome),e[25]=a.outcome,e[26]=D):D=e[26];let I;e[27]!==a.outcome||e[28]!==T||e[29]!==D?(I=(0,t.jsx)(de,{"data-testid":T,variant:D,children:a.outcome}),e[27]=a.outcome,e[28]=T,e[29]=D,e[30]=I):I=e[30];let M;e[31]!==a.deadLettered||e[32]!==a.id||e[33]!==s?(M=a.deadLettered&&(0,t.jsx)(de,{"data-testid":`queues-dlq-${a.id}`,variant:"destructive",children:s("DLQ")}),e[31]=a.deadLettered,e[32]=a.id,e[33]=s,e[34]=M):M=e[34],e[35]!==I||e[36]!==M?(f=(0,t.jsx)(w,{children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[I,M]})}),e[35]=I,e[36]=M,e[37]=f):f=e[37],o=w,p="max-w-[32ch] truncate font-mono text-xs text-muted-foreground",c=j,x=ht(j),e[0]=a.attempts,e[1]=a.body,e[2]=a.deadLettered,e[3]=a.exportName,e[4]=a.id,e[5]=a.messageId,e[6]=a.outcome,e[7]=a.queue,e[8]=s,e[9]=o,e[10]=r,e[11]=p,e[12]=c,e[13]=x,e[14]=N,e[15]=y,e[16]=i,e[17]=m,e[18]=f}else o=e[9],r=e[10],p=e[11],c=e[12],x=e[13],N=e[14],y=e[15],i=e[16],m=e[17],f=e[18];let g;e[38]!==o||e[39]!==p||e[40]!==c||e[41]!==x?(g=(0,t.jsx)(o,{className:p,title:c,children:x}),e[38]=o,e[39]=p,e[40]=c,e[41]=x,e[42]=g):g=e[42];let q;e[43]!==a.capturedAt?(q=ze(a.capturedAt,"\u2014"),e[43]=a.capturedAt,e[44]=q):q=e[44];let b;e[45]!==q?(b=(0,t.jsx)(w,{className:"text-xs text-muted-foreground tabular-nums",children:q}),e[45]=q,e[46]=b):b=e[46];let S=`queues-replay-${a.id}`,E=d!==null,Q;e[47]!==a.id||e[48]!==d||e[49]!==s?(Q=d===a.id?s("Replaying\u2026"):s("Replay"),e[47]=a.id,e[48]=d,e[49]=s,e[50]=Q):Q=e[50];let L;e[51]!==a.id||e[52]!==l||e[53]!==S||e[54]!==E||e[55]!==Q?(L=(0,t.jsx)(w,{children:(0,t.jsx)(le,{"data-id":a.id,"data-testid":S,disabled:E,onClick:l,size:"xs",type:"button",variant:"outline",children:Q})}),e[51]=a.id,e[52]=l,e[53]=S,e[54]=E,e[55]=Q,e[56]=L):L=e[56];let _;return e[57]!==r||e[58]!==b||e[59]!==L||e[60]!==N||e[61]!==y||e[62]!==i||e[63]!==m||e[64]!==f||e[65]!==g?(_=(0,t.jsxs)(r,{"data-testid":N,children:[y,i,m,f,g,b,L]}),e[57]=r,e[58]=b,e[59]=L,e[60]=N,e[61]=y,e[62]=i,e[63]=m,e[64]=f,e[65]=g,e[66]=_):_=e[66],_},"ht"),yt=h(n=>{let e=(0,W.c)(30),{hasError:a,messages:l,onClear:d,onReplay:s,replayingId:o}=n,r=$(),p;e[0]!==r?(p=r("Cloudflare Queues have no peek API, so this is what push consumers actually processed \u2014 not pending depth."),e[0]=r,e[1]=p):p=e[1];let c;e[2]!==p?(c=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:p}),e[2]=p,e[3]=c):c=e[3];let x;e[4]!==l.length||e[5]!==r?(x=r("Clear {count} messages?",{count:l.length}),e[4]=l.length,e[5]=r,e[6]=x):x=e[6];let N=l.length===0,y;e[7]!==r?(y=r("Clear log"),e[7]=r,e[8]=y):y=e[8];let i;e[9]!==d||e[10]!==x||e[11]!==N||e[12]!==y?(i=(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(Ge,{confirmLabel:x,disabled:N,onConfirm:d,testId:"queues-clear",children:y})}),e[9]=d,e[10]=x,e[11]=N,e[12]=y,e[13]=i):i=e[13];let m;e[14]!==l.length||e[15]!==r?(m=l.length>0&&(0,t.jsx)(de,{"data-testid":"queues-count",variant:"secondary",children:r("{count} messages",{count:l.length})}),e[14]=l.length,e[15]=r,e[16]=m):m=e[16];let f;e[17]!==c||e[18]!==i||e[19]!==m?(f=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,i,m]}),e[17]=c,e[18]=i,e[19]=m,e[20]=f):f=e[20];let g;e[21]!==a||e[22]!==l||e[23]!==s||e[24]!==o||e[25]!==r?(g=!a&&l.length===0?(0,t.jsx)(ie,{description:r("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),testId:"queues-messages-empty",title:r("No consumed messages yet.")}):(0,t.jsx)(Te,{className:"overflow-hidden py-0",children:(0,t.jsx)(De,{className:"px-0",children:(0,t.jsx)(Ve,{className:"max-h-[32rem]","data-testid":"queues-messages-scroll",children:(0,t.jsxs)(_e,{"data-testid":"queues-messages-table",children:[(0,t.jsx)(Be,{children:(0,t.jsxs)(G,{children:[(0,t.jsx)(C,{children:r("Export")}),(0,t.jsx)(C,{children:r("Message")}),(0,t.jsx)(C,{children:r("Attempts")}),(0,t.jsx)(C,{children:r("Outcome")}),(0,t.jsx)(C,{children:r("Body")}),(0,t.jsx)(C,{children:r("Captured")}),(0,t.jsx)(C,{})]})}),(0,t.jsx)(ke,{children:l.map(b=>(0,t.jsx)(xt,{message:b,onReplay:s,replayingId:o},b.id))})]})})})}),e[21]=a,e[22]=l,e[23]=s,e[24]=o,e[25]=r,e[26]=g):g=e[26];let q;return e[27]!==f||e[28]!==g?(q=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"queues-messages",children:[f,g]}),e[27]=f,e[28]=g,e[29]=q):q=e[29],q},"pt"),Nt=h(n=>{let e=(0,W.c)(20),{batchMode:a,bodyText:l,delayText:d,onBatchModeChange:s,onBodyChange:o,onDelayChange:r,onSelectExport:p,onSend:c,queues:x,selectedExportName:N,sending:y}=n,i=$(),m;e[0]!==i?(m=i("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it."),e[0]=i,e[1]=m):m=e[1];let f;e[2]!==m?(f=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m}),e[2]=m,e[3]=f):f=e[3];let g;e[4]!==a||e[5]!==l||e[6]!==d||e[7]!==s||e[8]!==o||e[9]!==r||e[10]!==p||e[11]!==c||e[12]!==x||e[13]!==N||e[14]!==y||e[15]!==i?(g=x.length===0?(0,t.jsx)(ie,{description:i("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),testId:"queues-send-empty",title:i("No queues to send to")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("select",{"aria-label":i("Queue"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"queues-send-select",onChange:p,value:N,children:x.map(qt)}),(0,t.jsx)(je,{"aria-label":i("Delay (seconds)"),className:"max-w-36","data-testid":"queues-send-delay",min:0,onChange:r,placeholder:i("Delay (s)"),type:"number",value:d}),(0,t.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",htmlFor:"queues-send-batch",children:[(0,t.jsx)("input",{checked:a,"data-testid":"queues-send-batch",id:"queues-send-batch",onChange:s,type:"checkbox"}),i("Send as batch (JSON array)")]}),(0,t.jsx)(le,{className:"ml-auto","data-testid":"queues-send-button",disabled:y||N==="",onClick:c,type:"button",children:i(y?"Sending\u2026":"Send message")})]}),(0,t.jsx)(He,{"aria-label":i("Message body (JSON)"),className:"font-mono","data-testid":"queues-send-body",onChange:o,placeholder:a?'[ { "hello": "world" } ]':'{ "hello": "world" }',value:l})]}),e[4]=a,e[5]=l,e[6]=d,e[7]=s,e[8]=o,e[9]=r,e[10]=p,e[11]=c,e[12]=x,e[13]=N,e[14]=y,e[15]=i,e[16]=g):g=e[16];let q;return e[17]!==f||e[18]!==g?(q=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"queues-send",children:[f,g]}),e[17]=f,e[18]=g,e[19]=q):q=e[19],q},"gt"),Ft=h(n=>{let e=(0,W.c)(59),{limit:a}=n,l=a??lt,d=We(),s=$(),[o,r]=(0,A.useState)("declared"),[p,c]=(0,A.useState)(null),x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={},e[0]=x):x=e[0];let{data:N,error:y,errorSource:i}=Me(F.listQueues,x),m;e[1]!==l?(m={limit:l},e[1]=l,e[2]=m):m=e[2];let{data:f,error:g,errorSource:q,refetch:b}=Me(F.getQueueMessages,m),S=Array.isArray(N?.queues)?[...N.queues].toSorted(vt):[],E=f?.entries??[],{deadLetteredCount:Q,queuesWithoutDlq:L,showReliabilityWarning:_}=dt(S,E),[j,z]=(0,A.useState)(""),[T,D]=(0,A.useState)(""),[I,M]=(0,A.useState)(""),[U,Ye]=(0,A.useState)(!1),[pe,Oe]=(0,A.useState)(!1),[ge,Re]=(0,A.useState)(null),H=S.some(u=>u.exportName===j)?j:S[0]?.exportName??"",Je=o==="messages"?g:y,Ze=o==="messages"?q:i,fe=Je??p,xe=Je===null?p:Ze,K;e[3]!==b?(K=h(()=>{b()},"H"),e[3]=b,e[4]=K):K=e[4],Ke(K,o==="messages");let ye=h(async()=>{c(null);let u=H;if(u==="")return;let v=null,$e=T.trim();if($e!=="")try{v=JSON.parse($e)}catch{c(s("Body must be valid JSON."));return}let Ae,Fe=I.trim();if(Fe!==""){let P=Number(Fe);if(!Number.isFinite(P)||P<0){c(s("Delay must be a non-negative number of seconds."));return}Ae=P}if(U&&!Array.isArray(v)){c(s("Batch mode needs a JSON array body \u2014 each element is enqueued as one message."));return}Oe(!0);let st=U?{batch:v,delaySeconds:Ae,exportName:u}:{body:v,delaySeconds:Ae,exportName:u};try{await d.query(it,st,ce("")),b()}catch(P){c(me(P))}Oe(!1)},"ue"),V;e[5]!==d||e[6]!==b?(V=h(async u=>{c(null),Re(u);try{await d.query(ut,{id:u},ce("")),b()}catch(v){c(me(v))}Re(null)},"V"),e[5]=d,e[6]=b,e[7]=V):V=e[7];let Ne=V,X;e[8]!==d||e[9]!==b?(X=h(async()=>{c(null);try{await d.query(ct,{},ce("")),b()}catch(u){c(me(u))}},"Y"),e[8]=d,e[9]=b,e[10]=X):X=e[10];let be=X,Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=h(u=>{let v=u.currentTarget.dataset.tab;(v==="declared"||v==="messages"||v==="send")&&r(v)},"X"),e[11]=Y):Y=e[11];let et=Y,Z;e[12]===Symbol.for("react.memo_cache_sentinel")?(Z=h(u=>{z(u.currentTarget.value)},"K"),e[12]=Z):Z=e[12];let qe=Z,ee;e[13]===Symbol.for("react.memo_cache_sentinel")?(ee=h(u=>{D(u.currentTarget.value)},"Z"),e[13]=ee):ee=e[13];let ve=ee,te;e[14]===Symbol.for("react.memo_cache_sentinel")?(te=h(u=>{M(u.currentTarget.value)},"ee"),e[14]=te):te=e[14];let Se=te,ae;e[15]===Symbol.for("react.memo_cache_sentinel")?(ae=h(u=>{Ye(u.currentTarget.checked)},"te"),e[15]=ae):ae=e[15];let Ce=ae,se;e[16]!==ye?(se=h(()=>{he(ye())},"se"),e[16]=ye,e[17]=se):se=e[17];let we=se,re;e[18]!==Ne?(re=h(u=>{let{id:v}=u.currentTarget.dataset;v!==void 0&&he(Ne(v))},"ae"),e[18]=Ne,e[19]=re):re=e[19];let Ie=re,ne;e[20]!==be?(ne=h(()=>{he(be())},"re"),e[20]=be,e[21]=ne):ne=e[21];let Qe=ne,tt="flex flex-col gap-6",at="lunora-queues-panel",B;e[22]!==s||e[23]!==o?(B=(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"queues-tabs",role:"tablist",children:["declared","messages","send"].map(u=>(0,t.jsx)(le,{"aria-selected":o===u,"data-tab":u,"data-testid":`queues-tab-${u}`,onClick:et,role:"tab",size:"sm",type:"button",variant:o===u?"secondary":"ghost",children:gt(u,s)},u))}),e[22]=s,e[23]=o,e[24]=B):B=e[24];let k;e[25]!==fe||e[26]!==xe?(k=fe!==null&&(0,t.jsx)(Pe,{error:xe,testId:"queues-error"}),e[25]=fe,e[26]=xe,e[27]=k):k=e[27];let Le=_&&(0,t.jsx)(Ue,{icon:(0,t.jsx)("span",{"aria-hidden":"true",className:"text-base leading-none",children:"\u26A0"}),testId:"queues-dlq-warning",variant:"warning",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[L.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"font-medium",children:s("No dead-letter queue on {queues}.",{queues:L.map(St).join(", ")})}),(0,t.jsx)("p",{className:"text-muted-foreground",children:s("Exhausted messages are dropped after retries. Add a deadLetterQueue to capture them.")})]}),Q>0&&(0,t.jsx)("p",{className:L.length>0?"text-muted-foreground":"font-medium",children:Q===1?s("1 message was recently dead-lettered."):s("{count} messages were recently dead-lettered.",{count:Q})})]})}),O;e[28]!==S||e[29]!==N||e[30]!==o?(O=o==="declared"&&(0,t.jsx)(ft,{loaded:N!==void 0,queues:S}),e[28]=S,e[29]=N,e[30]=o,e[31]=O):O=e[31];let R;e[32]!==E||e[33]!==g||e[34]!==Qe||e[35]!==Ie||e[36]!==ge||e[37]!==o?(R=o==="messages"&&(0,t.jsx)(yt,{hasError:g!==null,messages:E,onClear:Qe,onReplay:Ie,replayingId:ge}),e[32]=E,e[33]=g,e[34]=Qe,e[35]=Ie,e[36]=ge,e[37]=o,e[38]=R):R=e[38];let J;e[39]!==U||e[40]!==T||e[41]!==I||e[42]!==Ce||e[43]!==ve||e[44]!==Se||e[45]!==qe||e[46]!==we||e[47]!==S||e[48]!==H||e[49]!==pe||e[50]!==o?(J=o==="send"&&(0,t.jsx)(Nt,{batchMode:U,bodyText:T,delayText:I,onBatchModeChange:Ce,onBodyChange:ve,onDelayChange:Se,onSelectExport:qe,onSend:we,queues:S,selectedExportName:H,sending:pe}),e[39]=U,e[40]=T,e[41]=I,e[42]=Ce,e[43]=ve,e[44]=Se,e[45]=qe,e[46]=we,e[47]=S,e[48]=H,e[49]=pe,e[50]=o,e[51]=J):J=e[51];let oe;return e[52]!==B||e[53]!==k||e[54]!==Le||e[55]!==O||e[56]!==R||e[57]!==J?(oe=(0,t.jsxs)("div",{className:tt,"data-testid":at,children:[B,k,Le,O,R,J]}),e[52]=B,e[53]=k,e[54]=Le,e[55]=O,e[56]=R,e[57]=J,e[58]=oe):oe=e[58],oe},"Ft");function bt(n){return(0,t.jsxs)(G,{"data-testid":`queues-row-${n.exportName}`,children:[(0,t.jsx)(w,{className:"font-mono text-xs",children:n.exportName}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.name}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.mode}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.binding}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.deadLetterQueue??"\u2014"})]},n.exportName)}h(bt,"xt");function qt(n){return(0,t.jsx)("option",{value:n.exportName,children:n.exportName},n.exportName)}h(qt,"yt");function vt(n,e){return n.exportName.localeCompare(e.exportName)}h(vt,"bt");function St(n){return n.name}h(St,"Nt");export{Ft as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n,c as a}from"./chunk-5GFSKIB2.js";import{a as i,d as l,e as d}from"./chunk-YKXDMIHQ.js";var r={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},p={...r,position:"fixed",top:0,left:0},u={...r,position:"absolute"};var s=l(d(),1);function b(e,c){let t=s.useRef(e),o=a(c);n(()=>{t.current!==e&&o(t.current),t.current=e},[e,o])}i(b,"useValueChanged");export{p as a,u as b,b as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"./chunk-RPQL45FL.js";import{b as h}from"./chunk-NCCAMFB6.js";import{r as v}from"./chunk-Y4Q25F6X.js";import{a as g,d as p,f as k,g as y}from"./chunk-YKXDMIHQ.js";var N=p(k(),1);var l=p(y(),1);var b={debug:"secondary",error:"destructive",fatal:"destructive",info:"outline",log:"outline",trace:"outline",warn:"secondary"},F=g(w=>{let e=(0,N.c)(21),{entry:t}=w,c;e[0]!==t.fields?(c=x(t.fields),e[0]=t.fields,e[1]=c):c=e[1];let m=c,s;e[2]!==t.timestamp?(s=v(t.timestamp),e[2]=t.timestamp,e[3]=s):s=e[3];let r;e[4]!==s?(r=(0,l.jsx)("span",{className:"w-44 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:s}),e[4]=s,e[5]=r):r=e[5];let u=b[t.level],a;e[6]!==t.level||e[7]!==u?(a=(0,l.jsx)("span",{className:"w-20 shrink-0",role:"gridcell",children:(0,l.jsx)(h,{variant:u,children:t.level})}),e[6]=t.level,e[7]=u,e[8]=a):a=e[8];let f=t.functionPath??"\u2014",n;e[9]!==f?(n=(0,l.jsx)("span",{className:"w-48 shrink-0 truncate text-muted-foreground",role:"gridcell",children:f}),e[9]=f,e[10]=n):n=e[10];let i;e[11]!==m?(i=m===""?null:(0,l.jsx)("span",{className:"ml-2 text-muted-foreground","data-testid":"lg-fields",children:m}),e[11]=m,e[12]=i):i=e[12];let o;e[13]!==t.message||e[14]!==i?(o=(0,l.jsxs)("span",{className:"flex-1 truncate",role:"gridcell",children:[t.message,i]}),e[13]=t.message,e[14]=i,e[15]=o):o=e[15];let d;return e[16]!==r||e[17]!==a||e[18]!==n||e[19]!==o?(d=(0,l.jsxs)(l.Fragment,{children:[r,a,n,o]}),e[16]=r,e[17]=a,e[18]=n,e[19]=o,e[20]=d):d=e[20],d},"B");export{b as a,F as b};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{a}from"./chunk-YKXDMIHQ.js";var r="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/",n="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/",_=/string or blob too big/iu,l={BAD_REQUEST:{status:400,title:"Bad request"},UNAUTHORIZED:{status:401,title:"Unauthorized"},FORBIDDEN:{status:403,title:"Forbidden"},NOT_FOUND:{status:404,title:"Not found"},CONFLICT:{hint:["Another write changed this row while your mutation was running (optimistic concurrency conflict).","","Re-read the row and retry the mutation with the fresh value. Lunora serializes a DO's mutations, so a persistent conflict usually means the handler conflicts **with itself** (e.g. a trigger or cascade touching the same row) \u2014 split that work rather than adding a retry loop."],status:409,title:"Conflict"},NOT_UNIQUE:{hint:["`.unique()` matched more than one document \u2014 it expects the query to identify at most one row.","","- If several matches are legitimate, use `.first()` (take one) or `.collect()` (take all) instead.","- Otherwise tighten the query (e.g. filter on a unique/indexed field) so it can only match one row."],status:400,title:"Query matched more than one document"},VALIDATION_ERROR:{status:400,title:"Validation failed"},TOO_MANY_REQUESTS:{status:429,title:"Too many requests"},UNPROCESSABLE:{status:422,title:"Unprocessable"},NOT_IMPLEMENTED:{status:501,title:"Not implemented"},FUNCTION_NOT_FOUND:{status:404,title:"Function not found"},METHOD_NOT_ALLOWED:{status:405,title:"Method not allowed"},PAYLOAD_TOO_LARGE:{status:413,title:"Payload too large"},INTERNAL:{internal:!0,status:500,title:"Internal error"},INTERNAL_SERVER_ERROR:{internal:!0,status:500,title:"Internal error"},RPC_FAILED:{internal:!0,status:500,title:"Internal error"},COUNT_RLS_UNSUPPORTED:{status:422,title:"count() is unsupported under an RLS policy"},MASK_UNSUPPORTED:{status:422,title:"Aggregation over a masked column is unsupported"},RELATION_PREDICATE_UNSUPPORTED:{status:422,title:"Relation predicate is unsupported in a write policy"},RLS_REQUIRED:{hint:["This table is secure-by-default: it has no `.public()` marker and no RLS policy resolved for the caller, so the read fails closed.","","Add a read policy with `.rls(...)`, or mark the table `.public()` if it is intentionally world-readable."],status:403,title:"RLS policy required"},RUN_DEPTH_EXCEEDED:{internal:!0,status:500,title:"Run depth exceeded"},TRANSACTION_LIMIT_EXCEEDED:{hint:["A single mutation may only read and write a bounded amount before it is stopped.","","Narrow the read with an index (`.withIndex(...)`) instead of scanning the table, or split the write across several mutations \u2014 for a large backfill use `defineMigration` + `lunora migrate up`, which batches and checkpoints for you.","","The ceilings are deliberately conservative \u2014 they exist to stop one request taking down the whole shard. A deployment that genuinely needs bigger transactions can raise them by overriding the `transactionLimits()` seam on its generated shard class."],status:413,title:"Transaction limit exceeded"},MIGRATION_NOT_FOUND:{status:404,title:"Data migration not found"},UNKNOWN_TABLE:{status:404,title:"Unknown table"},GLOBAL_TABLE_NOT_EDITABLE:{status:400,title:"Global table is not editable"},SHARD_ERROR:{status:503,title:"Shard error"},SHARD_UNAVAILABLE:{status:503,title:"Shard unavailable"},OFFLINE_IDENTITY_CHANGED:{status:409,title:"Offline identity changed"},CODEGEN_DIAGNOSTIC:{status:500,title:"Codegen diagnostic"},SCHEMA_SNAPSHOT_PARSE:{status:500,title:"Schema snapshot parse error"},ENV_INVALID:{internal:!0,status:500,title:"Invalid environment"},AUTH_HEADERS_MISSING:{internal:!0,status:500,title:"Auth headers missing"},EMAIL_DOMAIN_BLOCKED:{hint:["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).","","Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` to `emailGate(...)` (`@lunora/auth/email-guard`)."],status:400,title:"Email domain not allowed"},EMAIL_UNDELIVERABLE:{hint:["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.","","Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS \u2014 leave it off on the edge path if DNS is unavailable."],status:400,title:"Email domain cannot receive mail"},ANALYTICS_SQL_ERROR:{status:502,title:"Analytics Engine SQL API error"},R2_SQL_ERROR:{status:502,title:"R2 SQL API error"},WORKFLOWS_REST_ERROR:{status:502,title:"Cloudflare Workflows REST API error"},ADMIN_FORBIDDEN:{status:403,title:"Admin access forbidden"},ADMIN_TOKEN_NOT_CONFIGURED:{status:400,title:"Admin token not configured"},AUTH_NOT_CONFIGURED:{status:400,title:"Auth admin not configured"},AUTH_OP_NOT_SUPPORTED:{status:400,title:"Auth admin operation not supported"},BACKUP_NOT_CONFIGURED:{status:500,title:"Scheduled backup not configured"},BACKUP_RETENTION_NOT_CONFIGURED:{hint:["`lunora backup prune` removes snapshots past the retention window, and this worker has no window: set `backupRetain` (how many to keep) and `backupCron` (which decides whose snapshots retention owns) on `createWorker`.","","Nothing was deleted. A default is deliberately not invented here \u2014 retention deleting on its own is exactly what this command exists to replace."],status:400,title:"Backup retention window not configured"},BACKUP_TOO_LARGE:{hint:["The scheduled backup is assembled inside the Worker isolate, so it caps the snapshot it will build. Nothing was written.","","The cap is on the NDJSON, not on peak memory: the export fan-out resolves every shard's rows before the first row is encoded, so a snapshot under the cap can still exhaust the isolate. It is set well below the isolate's limit for that reason.","","Narrow the snapshot with `backupTables`, or take this backup off-platform with `lunora backup create --bucket`, which runs on a machine rather than in an isolate. Backing up more often does not help \u2014 every run is a full snapshot."],status:507,title:"Backup too large to assemble in a Worker"},CRON_JOBS_NOT_CONFIGURED:{status:400,title:"Cron jobs not configured"},CRON_JOB_NOT_FOUND:{status:404,title:"Cron job not found"},EXPORT_TAP_NOT_CONFIGURED:{status:400,title:"Export tap not configured"},FUNCTIONS_NOT_CONFIGURED:{status:400,title:"Functions registry not configured"},GLOBALS_NOT_CONFIGURED:{status:400,title:"Global-table introspector not configured"},KV_NOT_CONFIGURED:{status:400,title:"KV introspector not configured"},MIGRATION_ID_REQUIRED:{status:400,title:"Migration id required"},PITR_UNAVAILABLE:{status:409,title:"Point-in-time recovery unavailable"},SCHEDULER_NOT_CONFIGURED:{status:400,title:"Scheduler not configured"},STORAGE_CHECKSUM_MISMATCH:{hint:["The upload body did not match the declared `expectedSize` or `expectedSha256`, so nothing was written \u2014 this check fails closed.","","Re-read the bytes from the source export and retry the transfer. A persistent mismatch means the source blob is corrupt or truncated; fix the export rather than bypassing the check."],status:400,title:"Storage checksum mismatch"},STORAGE_DELETE_NOT_CONFIGURED:{status:400,title:"Storage delete not configured"},STORAGE_DOWNLOAD_NOT_CONFIGURED:{hint:["`GET /_lunora/admin/storage/object` needs a `storageDownload` function on the worker. The generated app worker wires it up; a hand-written `createWorker({ ... })` has to pass `(key, opts) => pick(opts?.bucket).download(key)` \u2014 forwarding `opts.bucket` to the right bucket, and wrapping rather than passing `createStorage(...).download` itself, whose second parameter is a byte range.","","Without it a bucket-backed `lunora backup restore --bucket` cannot read the snapshot. The object is still readable out of band with `wrangler r2 object get`."],status:400,title:"Storage download not configured"},STORAGE_NOT_CONFIGURED:{status:400,title:"Storage not configured"},STORAGE_OBJECT_NOT_FOUND:{status:404,title:"Storage object not found"},STORAGE_UPLOAD_NOT_CONFIGURED:{status:400,title:"Storage upload not configured"},STORAGE_URL_NOT_CONFIGURED:{status:400,title:"Storage signed URL not configured"},VECTORS_NOT_CONFIGURED:{status:400,title:"Vector index introspector not configured"},VECTOR_QUERY_UNSUPPORTED:{status:400,title:"Vector index querying not enabled"},WORKFLOWS_NOT_CONFIGURED:{status:501,title:"Workflows not configured"},AUTH_AUDIT_NOT_CONFIGURED:{status:400,title:"Auth audit reader not configured"},AUTH_AUDIT_READ_FAILED:{internal:!0,status:500,title:"Auth audit read failed"},CRON_EXPR_INVALID:{status:500,title:"Invalid cron expression"},CRON_EXPR_NOT_STATIC:{status:500,title:"Cron expression is not statically analyzable"},CRON_JOB_FAILED:{internal:!0,status:500,title:"Cron job failed"},CRON_NAME_NOT_STATIC:{status:500,title:"Cron job name is not statically analyzable"},CRON_NON_STATIC_FN:{status:500,title:"Cron function reference is not statically analyzable"},CRON_NON_STATIC_VALUE:{status:500,title:"Cron value is not statically analyzable"},CRON_SCHEDULE_INVALID:{status:500,title:"Invalid cron schedule"},CRON_SCHEDULE_NOT_STATIC:{status:500,title:"Cron schedule is not statically analyzable"},DUPLICATE_CRON_NAME:{status:500,title:"Duplicate cron job name"},DUPLICATE_AGENT_BINDING:{status:500,title:"Duplicate agent binding"},DUPLICATE_AGENT_CLASS:{status:500,title:"Duplicate agent generated class name"},DUPLICATE_AGENT_NAME:{status:500,title:"Duplicate agent name"},DUPLICATE_MIGRATION_ID:{status:500,title:"Duplicate migration id"},DUPLICATE_QUEUE_BINDING:{status:500,title:"Duplicate queue binding"},DUPLICATE_QUEUE_NAME:{status:500,title:"Duplicate queue name"},DUPLICATE_WORKFLOW_CLASS:{status:500,title:"Duplicate workflow generated class name"},MIGRATION_ID_NOT_STATIC:{status:500,title:"Migration id is not statically analyzable"},NAMESPACE_COLLISION:{status:500,title:"Function namespace collision"},BAD_ROW:{status:400,title:"Malformed import row"},BAD_SUBSCRIPTION_ARGS:{status:400,title:"Invalid subscription arguments"},BATCH_LIMIT_EXCEEDED:{status:400,title:"Batch limit exceeded"},CROSS_SHARD_RANK_UNSUPPORTED:{status:400,title:"Cross-shard rank() is unsupported"},FORBIDDEN_FANOUT:{status:403,title:"Fan-out forbidden"},GLOBAL_SEARCH_SCORES_UNSUPPORTED:{status:400,title:"collectWithScores() is unsupported on a global table"},FORBIDDEN_ORIGIN:{status:403,title:"Origin forbidden"},FORBIDDEN_SHARD:{status:403,title:"Shard access forbidden"},GLOBAL_NOT_CONFIGURED:{status:400,title:"Global table import not configured"},INVALID_INPUT:{status:400,title:"Invalid input"},RATE_LIMITED:{status:429,title:"Rate limited"},REPLICA_NOT_READY:{status:421,title:"Replica not caught up"},REPLICA_READ_ONLY:{status:421,title:"Replica is read-only"},SERVICE_UNAVAILABLE:{status:503,title:"Service unavailable"},SHAPE_CROSS_SHARD_JOIN:{status:400,title:"Shape cross-shard join is unsupported"},UNAUTHENTICATED:{status:401,title:"Unauthenticated"},UNKNOWN_COLUMN:{status:404,title:"Unknown column"},CDC_LOG_TRIMMED:{status:409,title:"CDC log trimmed"},CDC_PAYLOAD_COMPACTED:{status:409,title:"CDC payloads compacted"},EXPIRED:{status:404,title:"Session expired"},NESTED_TRANSACTION:{internal:!0,status:500,title:"Nested transaction"},OUT_OF_ORDER:{status:409,title:"Out-of-order mutation"},SHAPE_GLOBAL_TOO_LARGE:{status:413,title:"Global shape too large"},SHAPE_NOT_FOUND:{status:404,title:"Shape not found"},SHAPE_REQUIRES_CDC:{status:409,title:"Shape requires change-data-capture"},SQL_UNAVAILABLE:{internal:!0,status:500,title:"SQL storage unavailable"},STREAM_INTERRUPTED:{status:503,title:"Durable stream interrupted"},STREAM_TOO_LONG:{status:507,title:"Durable stream exceeded its chunk ceiling"},TOKEN_EXPIRED:{status:401,title:"Authentication token expired"},TOO_MANY_STREAMS:{status:429,title:"Too many streams"},UNKNOWN_ADMIN_OP:{status:404,title:"Unknown admin operation"},SOCKET_TAG_BUDGET_EXCEEDED:{status:400,title:"Socket tag budget exceeded"},RELAY_CANNOT_SEED:{status:500,title:"Relay cannot seed"},RELAY_MISCONFIGURED:{status:500,title:"Relay misconfigured"},RELAY_SEED_FAILED:{status:502,title:"Relay seed failed"},RELAY_SHAPE_UNROUTABLE:{status:500,title:"Relay shape unroutable"},MISCONFIGURED:{internal:!0,status:500,title:"Worker misconfigured"},LUNORA_RUNTIME_UNAVAILABLE:{status:500,title:"Lunora runtime unavailable"},INTERNAL_ERROR:{internal:!0,status:500,title:"Internal error"},BROWSER_TIMEOUT:{status:504,title:"Browser operation timed out"},CLIENT_CLOSED:{status:400,title:"Client is closed"},HTTP_STREAM_BAD_CHUNK:{status:502,title:"Malformed HTTP stream chunk"},HTTP_STREAM_INTERRUPTED:{status:502,title:"HTTP stream interrupted"},HTTP_STREAM_MISSING_PARAM:{status:400,title:"HTTP stream missing path parameter"},HTTP_STREAM_NO_BODY:{status:502,title:"HTTP stream response has no body"},HTTP_STREAM_STATUS:{status:502,title:"HTTP stream request failed"},HTTP_STREAM_TRANSPORT:{status:502,title:"HTTP stream transport error"},STREAM_BACKPRESSURE:{status:429,title:"Stream backpressure"},STREAM_DISCONNECTED:{status:503,title:"Stream disconnected"},STREAM_QUEUE_OVERFLOW:{status:429,title:"Stream queue overflow"},UNKNOWN_MUTATION_FN:{status:404,title:"Unknown mutation function"}},f=a(e=>Object.hasOwn(l,e)?l[e]:void 0,"h");var m=[{body:["A single row exceeded the storage engine's per-row ceiling \u2014 2 MB on a Durable Object's SQLite, and 2,000,000 bytes on D1.","","The limit is on the STORED bytes, which are UTF-8: a document of multi-byte text (CJK, emoji) costs up to 3x its character count. `v.bytes()` and `v.bigint()` columns cost more again on a shard-local table, where the row stores both a SQL-comparable projection and the original.","","Keep the large payload out of the row and store a reference to it:","","```ts","const key = `uploads/${crypto.randomUUID()}`;","await ctx.storage.uploads.put(key, bytes);",'await ctx.db.insert("documents", { storageKey: key, title });',"```","","R2 has no practical object-size ceiling, and the row stays small enough to read, index, and replicate."].join(`
|
|
2
|
+
`),header:"Row too large for the storage engine",id:"lunora-row-too-big",test:a(e=>_.test(e),"test")},{body:["Lunora codegen couldn't find a schema to generate from.","","Create `lunora/schema.ts` exporting a `defineSchema(...)` call:","","```ts",'import { defineSchema, defineTable, v } from "@lunora/server";',"","export default defineSchema({"," messages: defineTable({ body: v.string() }),","});","```","","Or run `lunora init` to scaffold Lunora (a sample `lunora/schema.ts` included) into your app."].join(`
|
|
3
|
+
`),header:"No Lunora schema found",id:"lunora-schema-missing",test:a(e=>e.includes("defineSchema() not found")||e.includes("schema.ts not found at"),"test")},{body:["`defineSchema(...)` must be called with an **inline object literal** mapping table names to `defineTable(...)`:","","```ts","export default defineSchema({"," todos: defineTable({ title: v.string(), done: v.boolean() }),","});","```","","Codegen reads the schema statically, so it can't follow a variable or a spread \u2014 pass the object literal directly."].join(`
|
|
4
|
+
`),header:"`defineSchema()` needs an inline object literal",id:"lunora-schema-not-object-literal",test:a(e=>e.includes("defineSchema() expects an object literal"),"test")},{body:["This table name collides with a built-in `ctx.db` member, so the generated client can't expose it.","","Rename the table to anything that isn't a reserved name (the error lists them) \u2014 e.g. `userAccounts` instead of `insert`."].join(`
|
|
5
|
+
`),header:"Table name is reserved",id:"lunora-table-reserved",test:a(e=>e.includes("is reserved")&&e.includes("ctx.db"),"test")},{body:["Two tables resolve to the same name \u2014 usually a base table and a schema **extension** both defining it.","","Rename one of them, or drop the duplicate from the extension. Each table name must be unique across `defineSchema(...)` and every `.extend(...)`."].join(`
|
|
6
|
+
`),header:"Duplicate table name",id:"lunora-table-duplicate",test:a(e=>e.includes("already exists")&&e.includes(".extend("),"test")},{body:['`.jurisdiction(...)` accepts only a **string literal** of `"eu"`, `"us"`, or `"fedramp"`:',"","```ts",'defineSchema({ /* \u2026 */ }).jurisdiction("eu");',"```"].join(`
|
|
7
|
+
`),header:"Invalid `.jurisdiction(...)` value",id:"lunora-jurisdiction",test:a(e=>e.includes("unknown jurisdiction")||e.includes("jurisdiction")&&e.includes('"eu", "us", or "fedramp"'),"test")},{body:["The `unique` flag on an index must be a **literal** `true` or `false`, not a computed value \u2014 codegen needs to read it statically:","","```ts",'defineTable({ email: v.string() }).index("by_email", ["email"], { unique: true });',"```"].join(`
|
|
8
|
+
`),header:"`unique` must be a literal",id:"lunora-unique-literal",test:a(e=>e.includes("must be a literal")&&e.includes("unique"),"test")},{body:["A declared container/workflow class isn't re-exported by your worker entry, so `wrangler deploy` would reject it.","","Add the generated re-export shown in the error to your worker entry (e.g. `src/index.ts`):","","```ts",'export * from "./lunora/_generated/containers";',"```"].join(`
|
|
9
|
+
`),header:"Binding not exported by your worker entry",id:"lunora-worker-entry-export-gap",test:a(e=>e.includes("not exported by your worker entry"),"test")},{body:["A row with the same value already exists in a `unique` index.","","- If you meant to upsert, use `ctx.db.<table>().upsert(...)` (or `.patch(...)` an existing row) instead of `.insert(...)`.",`- Otherwise pick a value that isn't already taken, and consider surfacing a friendly "already exists" message to the user.`].join(`
|
|
10
|
+
`),header:"Unique constraint violation",id:"lunora-runtime-unique",test:a(e=>e.includes("unique constraint violation on"),"test")},{body:l.CONFLICT.hint.join(`
|
|
11
|
+
`),header:"Optimistic concurrency conflict",id:"lunora-runtime-occ",test:a(e=>e.includes("optimistic concurrency conflict"),"test")}],u=[{causes:"the origin returned an empty, unknown, or malformed response Cloudflare couldn't interpret (often an origin crash or an oversized response header)",code:"520",docsUrl:r,family:"5xx",fix:"check your origin's logs for a crash, ensure it returns a valid HTTP response, and keep response headers under the size limit",summary:"Cloudflare got an unknown/empty response from your origin web server.",title:"Web server returns an unknown error"},{causes:"the origin refused the connection \u2014 the web server is down, or a firewall is blocking Cloudflare's IP ranges",code:"521",docsUrl:r,family:"5xx",fix:"confirm the origin process is running and allowlist Cloudflare's published IP ranges in your firewall/security groups",summary:"Cloudflare could not connect to your origin because it refused the connection.",title:"Web server is down"},{causes:"Cloudflare could not establish a TCP connection to the origin in time \u2014 the origin is overloaded, a firewall is dropping packets, or the origin IP is wrong",code:"522",docsUrl:r,family:"5xx",fix:"verify the origin is reachable and not overloaded, and that the DNS record points at the correct origin IP",summary:"The connection to your origin timed out before it was established.",title:"Connection timed out"},{causes:"Cloudflare cannot route to the origin at all \u2014 a bad DNS record, an origin IP that changed, or invalid routing",code:"523",docsUrl:r,family:"5xx",fix:"verify the DNS A/AAAA record points at a reachable origin IP and that no upstream network is blocking Cloudflare",summary:"Cloudflare could not reach your origin server.",title:"Origin is unreachable"},{causes:"Cloudflare made a TCP connection but the origin did not return an HTTP response within 100 seconds \u2014 a slow handler or long-running request",code:"524",docsUrl:r,family:"5xx",fix:"speed up the slow origin handler, or move long work off the request path into a background job (a Durable Object, Queue, or Workflow)",summary:"Cloudflare connected to your origin but it did not respond in time.",title:"A timeout occurred"},{causes:"the TLS handshake between Cloudflare and the origin failed \u2014 a missing/invalid origin certificate, or a cipher/SNI mismatch under Full (Strict) SSL",code:"525",docsUrl:r,family:"5xx",fix:"install a valid certificate on the origin and align your Cloudflare SSL/TLS mode with the origin's certificate setup",summary:"The SSL handshake with your origin failed.",title:"SSL handshake failed"},{causes:"Cloudflare could not validate the origin's certificate under Full (Strict) SSL \u2014 it is expired, self-signed, or issued for the wrong hostname",code:"526",docsUrl:r,family:"5xx",fix:"install a valid, publicly-trusted certificate on the origin (or use a Cloudflare Origin CA cert), matching the request hostname",summary:"Cloudflare could not validate your origin's SSL certificate.",title:"Invalid SSL certificate"},{causes:"a DNS record points at a Cloudflare IP or another prohibited address instead of your real origin",code:"1000",docsUrl:n,family:"1xxx",fix:"point the DNS record at your real origin IP, not a Cloudflare-owned or loopback address",summary:"DNS points to a prohibited IP.",title:"DNS points to prohibited IP"},{causes:"Cloudflare could not resolve the requested hostname \u2014 a Worker fetched an unresolvable host, or a DNS record is misconfigured",code:"1001",docsUrl:n,family:"1xxx",fix:"check the hostname you're requesting and the DNS records for the zone resolve to a valid origin",summary:"Cloudflare could not resolve the origin DNS.",title:"DNS resolution error"},{causes:"a Worker or DNS record targets a restricted IP (for example a Cloudflare-owned or loopback address)",code:"1002",docsUrl:n,family:"1xxx",fix:"change the Worker fetch target or DNS record to a valid, non-restricted origin address",summary:"DNS points to a prohibited IP (Worker/restricted).",title:"DNS points to a prohibited IP"},{causes:"the visitor's IP was blocked by an IP Access Rule, WAF rule, or security configuration on the zone",code:"1006",docsUrl:n,family:"1xxx",fix:"review the zone's Firewall/WAF and IP Access Rules to see why the address was banned, and adjust if it was blocked in error",summary:"Access denied: the visitor's IP has been banned.",title:"Access denied: your IP has been banned"},{causes:"your Worker threw an unhandled JavaScript exception during the request",code:"1101",docsUrl:n,family:"1xxx",fix:"reproduce with `wrangler tail` (or the Workers Logs / Studio Logs panel) to get the stack trace, then handle the throwing code path",summary:"A Worker threw a JavaScript exception.",title:"Worker threw a JavaScript exception"},{causes:"the Worker used more CPU time than a single invocation is allowed \u2014 usually a hot loop or heavy synchronous work",code:"1102",docsUrl:n,family:"1xxx",fix:"reduce per-request CPU (optimize hot loops, avoid heavy synchronous work) or offload the heavy work to a Durable Object, Queue, or Workflow",summary:"A Worker exceeded its CPU-time resource limit.",title:"Worker exceeded resource limits"}],d=a(e=>e!==void 0&&e>="0"&&e<="9","l"),T=a((e,t)=>{for(let i=e.indexOf(t);i!==-1;i=e.indexOf(t,i+t.length))if(!d(e[i-1])&&!d(e[i+t.length]))return!0;return!1},"_"),O=a((e,t)=>{for(let i of[`error ${t}`,`error: ${t}`])for(let o=e.indexOf(i);o!==-1;o=e.indexOf(i,o+i.length))if(!d(e[o+i.length]))return!0;return!1},"p"),g=/error|cloudflare/iu,h=a(e=>({body:[e.summary,"",`**Likely cause:** ${e.causes}.`,"",`**Fix:** ${e.fix}.`,"",`See [Cloudflare's ${e.family} error docs](${e.docsUrl}).`].join(`
|
|
12
|
+
`),header:`Cloudflare Error ${e.code}: ${e.title}`,id:`cloudflare-error-${e.code}`}),"c"),p=a(e=>{if(!g.test(e))return;let t=e.toLowerCase(),i=t.includes("error"),o=t.includes("cloudflare");if(i){for(let s of u)if(O(t,s.code))return h(s)}if(o){for(let s of u)if(T(t,s.code))return h(s)}},"T"),A=a(e=>(typeof e=="string"?e:e.join(`
|
|
13
|
+
`)).split(`
|
|
14
|
+
`).filter(t=>!t.startsWith("```")).join(`
|
|
15
|
+
`).replaceAll(/\*\*(.+?)\*\*/gu,"$1").replaceAll(/`([^`]+)`/gu,"$1"),"N"),E=a(e=>{for(let t of m)if(t.test(e))return{body:t.body,header:t.header,id:t.id}},"u"),N=a(e=>E(e)??p(e),"g");var c=class extends Error{static{a(this,"l")}type="VisulimaError";hint;title;loc;code;status;docsUrl;data;constructor(t,i,o={}){let s=f(t);super(i??t,o.cause===void 0?void 0:{cause:o.cause}),this.name=o.name??"LunoraError",this.hint=o.hint??s?.hint,this.title=o.title??s?.title,this.loc=o.location,this.code=t,this.status=o.status??s?.status??500,this.docsUrl=o.docsUrl??s?.docsUrl,this.data=o.data}};export{A as a,N as b,c};
|