@mavea/mavea 1.0.18 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +140 -1
- package/DISCLAIMER.md +2 -1
- package/PRIVACY.md +5 -4
- package/README.md +21 -11
- package/TERMS.md +3 -1
- package/dist/.vite/manifest.json +846 -611
- package/dist/assets/AnnotationLayer-qV6CIUZv.js +0 -0
- package/dist/assets/{AppCommandPalette-DKBglbNo.js → AppCommandPalette-BHaYBZ5e.js} +1 -1
- package/dist/assets/AreaChart-DZGCSEwt.js +1 -0
- package/dist/assets/CadenceCard-P4teI7Se.js +1 -0
- package/dist/assets/CanvasSkeleton-CRGWlafo.js +1 -0
- package/dist/assets/{CheckLogRail-Btg7Linv.js → CheckLogRail-DkHIHL0E.js} +1 -1
- package/dist/assets/{CommandPalette-DagPdSGZ.js → CommandPalette-Bs6tpdZl.js} +1 -1
- package/dist/assets/{ConversationVideoStudio-EPw6H4lE.js → ConversationVideoStudio-C1sd4k53.js} +1 -1
- package/dist/assets/CourseLessonReader-YCcNKEW7.js +2 -0
- package/dist/assets/{CourseRail-Dx9IIbTZ.js → CourseRail-DXt3bzjU.js} +1 -1
- package/dist/assets/{CoursesApp-CzUGaYWZ.js → CoursesApp-Dz6xjf4V.js} +2 -2
- package/dist/assets/{DashPresent-DXwesMIr.js → DashPresent-5SRScC2i.js} +1 -1
- package/dist/assets/DashboardDetail-8J8TsdQg.css +1 -0
- package/dist/assets/DashboardDetail-DOfm8UCQ.js +2 -0
- package/dist/assets/DashboardLoopGate-Cf0y_HQ7.js +2 -0
- package/dist/assets/DashboardLoopRuntime-CnN5VayH.js +1 -0
- package/dist/assets/DashboardSettings-CE0B2y2y.js +1 -0
- package/dist/assets/DashboardsApp-_gbfdbX6.js +2 -0
- package/dist/assets/{DeepZoomApp-CwqKpjo7.js → DeepZoomApp-BOLEl-kQ.js} +1 -1
- package/dist/assets/{DelegatePanel-Bi1qPgGG.js → DelegatePanel-CHEB-OZl.js} +1 -1
- package/dist/assets/DemoGallery-DBqnu8TR.js +1 -0
- package/dist/assets/{DropSelect-C3g0PjuN.js → DropSelect-DjbdVfIR.js} +1 -1
- package/dist/assets/ExportModal-CLobMv1F.js +2 -0
- package/dist/assets/ExtractionPreview-QZ2VHmsb.js +18 -0
- package/dist/assets/{FeatureUseNotice-BhljPjUv.js → FeatureUseNotice-Dc8joBGM.js} +1 -1
- package/dist/assets/{FlagshipCommandPalette-DyNsP8k3.js → FlagshipCommandPalette-DnWuBjYI.js} +1 -1
- package/dist/assets/{FlagshipShowcase-DHpGPlca.js → FlagshipShowcase-3qQDOK6g.js} +1 -1
- package/dist/assets/{FlashcardsApp-Cm50X3Hl.js → FlashcardsApp-BQGM-Tr1.js} +1 -1
- package/dist/assets/{GalleryApp-BFop9Eu7.js → GalleryApp-BWQ-J450.js} +1 -1
- package/dist/assets/{HonestByDesign-HeTTCiis.js → HonestByDesign-57LDf-gm.js} +1 -1
- package/dist/assets/{HowItWorks-gAuUl7VQ.js → HowItWorks-DMfPX3GK.js} +1 -1
- package/dist/assets/{LegalApp-jOlpLQSV.js → LegalApp-CcO5Qq6R.js} +1 -1
- package/dist/assets/{LegalMarkdownDocument-RSNiyAu0.js → LegalMarkdownDocument-Be_fQbZ_.js} +1 -1
- package/dist/assets/{LegalPageShell-Cr90l1I2.js → LegalPageShell-B-HY1WG7.js} +1 -1
- package/dist/assets/{LibraryOverlay-DEQ5GuIs.js → LibraryOverlay-BilW6q_z.js} +1 -1
- package/dist/assets/LiveApp-C-OPBybd.css +1 -0
- package/dist/assets/LiveApp-DH3OxJFV.js +79 -0
- package/dist/assets/{LiveSettings-jn26sH4v.js → LiveSettings-CuVMy7rZ.js} +3 -3
- package/dist/assets/{MindMapViewerDrawer-CDDzzpFi.js → MindMapViewerDrawer-DI_S7fRZ.js} +1 -1
- package/dist/assets/{MindShape-BeZFay7O.js → MindShape-C_Bo9hW9.js} +1 -1
- package/dist/assets/PinToDashboard-Cz5UJCmq.js +1 -0
- package/dist/assets/PlanReview-CmUxzNqL.js +1 -0
- package/dist/assets/{Presence-CKSoyuhE.js → Presence-UqXfH4Y-.js} +1 -1
- package/dist/assets/PresentationDeck-B_EI33Pp.js +1 -0
- package/dist/assets/PrismApp-DtLsPiQF.js +2 -0
- package/dist/assets/PrismAskController-Bt0k9hAA.js +37 -0
- package/dist/assets/{PrismBriefingPlayer-BoB_PCTT.js → PrismBriefingPlayer-DzdtnFj4.js} +2 -2
- package/dist/assets/PrismOverlay-D1cDZamt.js +105 -0
- package/dist/assets/{PrismWorkbench-f0rLNBxb.js → PrismWorkbench-BEIp4MiL.js} +1 -1
- package/dist/assets/{PrivacyApp-CFs0PM5C.js → PrivacyApp-B4DT2RUz.js} +6 -5
- package/dist/assets/{ReplayCard-BkJbY0-I.js → ReplayCard-Dx46HCBT.js} +2 -2
- package/dist/assets/{ReplayOverlay-Dm_k7FBA.js → ReplayOverlay-CnJAxf0u.js} +1 -1
- package/dist/assets/{RewindOverlay-BSDbLgcN.js → RewindOverlay-CousnxXo.js} +1 -1
- package/dist/assets/RippleApp-D5j2VCt2.js +2 -0
- package/dist/assets/{RippleAskController-CywVzqUA.js → RippleAskController-9SxpZnHX.js} +2 -2
- package/dist/assets/{RippleOverlay-DVxfWEQ8.js → RippleOverlay-zcXAHPuJ.js} +2 -2
- package/dist/assets/{SeeDontRead-Ct4PY63d.js → SeeDontRead-Dqfzha0V.js} +1 -1
- package/dist/assets/{ShareModal-BILPvqjZ.js → ShareModal-DWxlrJSz.js} +2 -2
- package/dist/assets/{ShipCourse-DGj9BbRM.js → ShipCourse-BavQppkt.js} +1 -1
- package/dist/assets/{SignatureLoop-CfM-rTXb.js → SignatureLoop-L8W2h62w.js} +1 -1
- package/dist/assets/SynthesisApp-C2O6pFeM.js +2 -0
- package/dist/assets/{SynthesisOverlay-Dunk_JWD.js → SynthesisOverlay-DLvwiSMv.js} +1 -1
- package/dist/assets/{TermsApp-BUQa48cB.js → TermsApp-CxY1yorm.js} +4 -2
- package/dist/assets/TopicCanvas-LMI0zC7R.js +2 -0
- package/dist/assets/{TourPrism-zt1LIaLd.js → TourPrism-CI-iJZil.js} +1 -1
- package/dist/assets/TrackerTile-oz6IoG8m.js +2 -0
- package/dist/assets/{TwoSurfaces-CLOIlVvY.js → TwoSurfaces-Rnf-_WgY.js} +1 -1
- package/dist/assets/WhyMachineOverlay-ks9-rRiL.js +1 -0
- package/dist/assets/WorldOverlay-BaQNNClA.js +2 -0
- package/dist/assets/WorldOverlay-D7ay5y4D.css +1 -0
- package/dist/assets/{WowFeatures-CNVwRlf0.js → WowFeatures-C4efSbNV.js} +1 -1
- package/dist/assets/{ZoomDeck-DNgyW7Nm.js → ZoomDeck-CBrr0yfy.js} +1 -1
- package/dist/assets/{annotationAuto-C9weSF2k.js → annotationAuto-CDv6Es44.js} +1 -1
- package/dist/assets/{annotationReel-va1i-lKs.js → annotationReel-K2FYv-3B.js} +1 -1
- package/dist/assets/{backup-D--1WRte.js → backup-ZrlVatXc.js} +1 -1
- package/dist/assets/{blockTypes-CgNGx27_.js → blockTypes-DUDdP3pB.js} +1 -1
- package/dist/assets/canvas-Bsx3eSaS.js +1 -0
- package/dist/assets/{capture-BBxyt5SN.js → capture-D8uPIcfj.js} +1 -1
- package/dist/assets/confirmAdd-DzMO9jKV.js +1 -0
- package/dist/assets/{coreIcons-BzqW7Qiz.js → coreIcons-DDTChE1H.js} +1 -1
- package/dist/assets/csv-DAqzYXUs.js +5 -0
- package/dist/assets/{dashboardEvents-BDKxoLch.js → dashboardEvents-DKl5rrTD.js} +1 -1
- package/dist/assets/dashboards-C1u2ks-d.css +1 -0
- package/dist/assets/dataPending-DGdCvY5Y.js +1 -0
- package/dist/assets/display-CAb_PiGv.js +1 -0
- package/dist/assets/emphasize-BqCIst-B.js +1 -0
- package/dist/assets/engine-BiM6INsW.js +1 -0
- package/dist/assets/engine-CTvOaA86.css +1 -0
- package/dist/assets/explode-BgZIWY9m.js +15 -0
- package/dist/assets/format-g3dP8OI3.js +1 -0
- package/dist/assets/{generate-CemSUZ8A.js → generate-Dl2EJ_SR.js} +3 -3
- package/dist/assets/generateBeats-DZHkvFvh.js +1 -0
- package/dist/assets/{generateCourse-BIBbw-ZJ.js → generateCourse-C9qvaJRo.js} +1 -1
- package/dist/assets/{generateLive-BsXn4Y_d.js → generateLive-B6purd69.js} +18 -18
- package/dist/assets/index-Dk0QapqQ.js +22 -0
- package/dist/assets/index-DmKgC_TJ.css +1 -0
- package/dist/assets/{kokoro-C6P0LV4L.js → kokoro-P_fkcX-A.js} +1 -1
- package/dist/assets/lens-ChFJD9il.js +1 -0
- package/dist/assets/{liveSchema-B8OByCPH.js → liveSchema-B4bQtO88.js} +22 -21
- package/dist/assets/loader-DKJEcbPm.js +2 -0
- package/dist/assets/{model-BsQ5ixwB.js → model-BFRTN9Eh.js} +1 -1
- package/dist/assets/nextFrame-12y0UrAd.js +1 -0
- package/dist/assets/notes-B0-EE0FK.js +1 -0
- package/dist/assets/number-zqlPMliA.js +1 -0
- package/dist/assets/officeDoc-GU6Cssjf.js +3 -0
- package/dist/assets/openWorld-BHTJM39n.js +1 -0
- package/dist/assets/{pen-D9UT-ioQ.js → pen-DNMslo3e.js} +1 -1
- package/dist/assets/{perfProbe-BxyiHsI2.js → perfProbe-B9zJpjo9.js} +1 -1
- package/dist/assets/{pin-qQrH_dBi.js → pin-CZAIlpXt.js} +1 -1
- package/dist/assets/{planTracker-CjnznF7v.js → planTracker-KKAtTBWs.js} +1 -1
- package/dist/assets/portal-Dogggsub.js +1 -0
- package/dist/assets/{prewarm-CAZcnT4x.js → prewarm-B4ELBOxf.js} +1 -1
- package/dist/assets/providers-BovElgRL.js +1 -0
- package/dist/assets/{quietHours-_i5Uqz7z.js → quietHours-CeBje_uU.js} +1 -1
- package/dist/assets/ready-Ba6nk9O1.js +1 -0
- package/dist/assets/{ready-4lPJes2S.js → ready-jtAUOb62.js} +1 -1
- package/dist/assets/receipts-D7zveV-I.js +1 -0
- package/dist/assets/registry-6DGRAB1m.js +1 -0
- package/dist/assets/{registry-BzH7mEl7.js → registry-6MOD-I7p.js} +1 -1
- package/dist/assets/registry-BFrgx1tE.js +1 -0
- package/dist/assets/{registry-COkvZrNA.css → registry-BZuT2Epw.css} +1 -1
- package/dist/assets/{registry-CtvKPLd7.js → registry-CD1s3eQ-.js} +1 -1
- package/dist/assets/{registry-NbNNn_ra.js → registry-CqhpLHM7.js} +1 -1
- package/dist/assets/registry-Cse2wF7x.css +1 -0
- package/dist/assets/registry-DGNSqTxE.js +1 -0
- package/dist/assets/{registry-CkScyZGa.js → registry-GeAC3ZD7.js} +1 -1
- package/dist/assets/{relate-DHPSGB7a.js → relate-BYdM5eiV.js} +1 -1
- package/dist/assets/{replay-zh4xVk5G.js → replay-TYXO0Brm.js} +1 -1
- package/dist/assets/{run-DiPX83_J.js → run-Df10YPyB.js} +1 -1
- package/dist/assets/{run-ByCJN-29.js → run-DlvA3l28.js} +1 -1
- package/dist/assets/{run-BdDyp6Xv.js → run-gmqUaxcL.js} +2 -2
- package/dist/assets/seed-D_P5jyog.js +1 -0
- package/dist/assets/shapes-Cx5SCKgj.js +39 -0
- package/dist/assets/{spokenText-D3iS8fuI.js → spokenText-C88IQJ0M.js} +1 -1
- package/dist/assets/store-CsjDEADX.js +1 -0
- package/dist/assets/theme-7IrMJ70_.js +1 -0
- package/dist/assets/tiles-D-s6v-mA.js +1 -0
- package/dist/assets/types-C42I77wh.js +1 -0
- package/dist/assets/types-DuEbJpIA.js +1 -0
- package/dist/assets/useDashboardLoop-DDqCFJKY.js +5 -0
- package/dist/assets/useDashboards-SRk8LqHe.js +1 -0
- package/dist/assets/useLiveConfig-Cpy0_E_-.js +1 -0
- package/dist/assets/useSpatialCanvas-CfmZOXXP.js +1 -0
- package/dist/assets/{useStudy-B5874Bcg.js → useStudy-GwNcQWtv.js} +1 -1
- package/dist/assets/validate-sGUCmPAs.js +4 -0
- package/dist/assets/value-Dx7DZob4.js +1 -0
- package/dist/assets/walkSync-CPsd-xu7.js +1 -0
- package/dist/index.html +14 -13
- package/dist/legal/DISCLAIMER.md +2 -1
- package/dist/legal/PRIVACY.md +5 -4
- package/dist/legal/TERMS.md +3 -1
- package/docs/media/course-lesson.jpg +0 -0
- package/docs/media/living-answer.jpg +0 -0
- package/package.json +4 -1
- package/dist/assets/AnnotationLayer-DHHGgh8x.js +0 -2
- package/dist/assets/CanvasSkeleton-Bx0s36b_.js +0 -2
- package/dist/assets/CourseLessonReader-DeAuL1tO.js +0 -2
- package/dist/assets/DashboardDetail-CJzB85NC.js +0 -2
- package/dist/assets/DashboardLoopRuntime-CEnUpS-I.js +0 -1
- package/dist/assets/DashboardSettings-CmZWG3US.js +0 -1
- package/dist/assets/DashboardsApp-wCgs98G0.js +0 -2
- package/dist/assets/DemoGallery-Cg0ykVpG.js +0 -1
- package/dist/assets/ExportModal-rxndDhoO.js +0 -2
- package/dist/assets/ExtractionPreview-ChRAimKr.js +0 -18
- package/dist/assets/LiveApp-Bl7WBgqJ.css +0 -1
- package/dist/assets/LiveApp-CUoQgVo1.js +0 -62
- package/dist/assets/PinToDashboard-CSqwDBLD.js +0 -1
- package/dist/assets/PlanReview-ChZeUHQO.js +0 -1
- package/dist/assets/PresentationDeck-Dj9MQVZC.js +0 -1
- package/dist/assets/PrismApp-Dfs6eAuR.js +0 -2
- package/dist/assets/PrismAskController-CSsCkRC8.js +0 -37
- package/dist/assets/PrismOverlay-CGtr7lBl.js +0 -109
- package/dist/assets/RippleApp-DW1rpKHe.js +0 -2
- package/dist/assets/SynthesisApp-C43ZO6Ew.js +0 -2
- package/dist/assets/TopicCanvas-DR26Swr_.js +0 -2
- package/dist/assets/TrackerTile-sYD2MM_4.js +0 -2
- package/dist/assets/WhyMachineOverlay-Nll4Wco-.js +0 -1
- package/dist/assets/canvas-DIs20T9l.js +0 -1
- package/dist/assets/confirmAdd-BDNV8RqF.js +0 -1
- package/dist/assets/dashboards-Dy4MTJQ5.css +0 -1
- package/dist/assets/dataPending-lZUzUEo6.js +0 -1
- package/dist/assets/explode-fgkkWz8o.js +0 -13
- package/dist/assets/format-rPI6ZwwH.js +0 -1
- package/dist/assets/generateBeats-aqKTlSN2.js +0 -1
- package/dist/assets/index-B69GkoTc.css +0 -1
- package/dist/assets/index-D1SPhBGd.js +0 -22
- package/dist/assets/notes-U6gRKVHk.js +0 -1
- package/dist/assets/number-DXgzss0v.js +0 -1
- package/dist/assets/officeDoc-Dn8jw1fG.js +0 -3
- package/dist/assets/portal-t0bsUEg2.js +0 -1
- package/dist/assets/providers-DdJWf_PE.js +0 -1
- package/dist/assets/ready-LSwk88I-.js +0 -1
- package/dist/assets/registry-9QjeHgKs.js +0 -1
- package/dist/assets/registry-CueC1vq1.js +0 -1
- package/dist/assets/registry-CxUmdwDk.js +0 -1
- package/dist/assets/registry-DScSjt8p.css +0 -1
- package/dist/assets/shapes-DI0LQC8n.js +0 -1
- package/dist/assets/store-DpmbKVs7.js +0 -1
- package/dist/assets/theme-f0mztBcq.js +0 -1
- package/dist/assets/tiles-pdNi6MGe.js +0 -1
- package/dist/assets/useDashboardLoop-DuckIfJX.js +0 -5
- package/dist/assets/useDashboards-BMcuCWoz.js +0 -1
- package/dist/assets/useLiveConfig-9eJ7EM3B.js +0 -1
- package/dist/assets/useSpatialCanvas-CtVsYmp8.js +0 -1
- /package/dist/assets/{registry-DLyrLfe-2.js → registry-DLyrLfe-.js} +0 -0
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-kNHRtoqd.js","assets/rolldown-runtime-DkW27tQK.js","assets/preload-helper-CiWYd9n-.js","assets/generateLive-BsXn4Y_d.js","assets/blockLabel-FogyzEQY.js","assets/layout-CEoNLr-w.js","assets/catalog-BHjl-1uH.js","assets/history-D2EH2X6D.js","assets/catalog-Db9GWM6N.js","assets/facts-BUGuVUIc.js","assets/blockTypes-CgNGx27_.js","assets/streamParse-B-Gjwa9T.js","assets/liveSchema-B8OByCPH.js","assets/icons-gLFQTv74.js","assets/jsx-runtime-DeHZSEgm.js","assets/spokenText-D3iS8fuI.js","assets/safeImageUrl-BINWXOTz.js","assets/sourceHost-BV3t2XDb.js","assets/annotations-CftUUB13.js","assets/screen-DFWKge3-.js","assets/attachments-BW-vki-E.js","assets/providers-DdJWf_PE.js","assets/http-Lar_UMKb.js","assets/info-CiqHR5cs.js","assets/shapes-DI0LQC8n.js","assets/store-BWLbFXiY.js","assets/contentVault-xfUwSJ3i.js","assets/keyVault-Aw5Y2PjT.js","assets/ready-4lPJes2S.js","assets/speed-K5_Ebj-8.js","assets/number-DXgzss0v.js","assets/now-C9-UAzTC.js","assets/search-ZN7v_P5B.js","assets/TopicCanvas-DR26Swr_.js","assets/react-BZJXY1be.js","assets/compiler-runtime-qQQXpJgv.js","assets/index-D1SPhBGd.js","assets/useInView-CXTOAEV3.js","assets/coreIcons-BzqW7Qiz.js","assets/preloadableLazy-MIX1ApBW.js","assets/cachedImport-DW0gP14h.js","assets/lazyRetry-D50B1UMY.js","assets/theme-f0mztBcq.js","assets/index-B69GkoTc.css","assets/CanvasSkeleton-Bx0s36b_.js","assets/CanvasSkeleton-iy6DBvde.css","assets/FallbackCard-ap_4wOfj.js","assets/FallbackCard-D_6ps1xA.css","assets/useFocusTrap-DBtkeyRy.js","assets/motion-BY_Egaxm.js","assets/useSpatialCanvas-CtVsYmp8.js","assets/richText-BkxJhl9N.js","assets/toast-BBNs2h3L.js","assets/format-q0LwBjID.js","assets/useValidatedImage-BQi2c66o.js","assets/lib-B7OE1ZQQ.js","assets/BlockEmpty-B82uCse8.js","assets/motion-DxHSlPN6.js","assets/lib-DMAxsZKm.css","assets/TopicCanvas-uRuHi99s.css","assets/HowItWorks-gAuUl7VQ.js","assets/generateBeats-aqKTlSN2.js","assets/canvas-DIs20T9l.js","assets/ReplayCard-BkJbY0-I.js","assets/annotationReel-va1i-lKs.js","assets/registry-Dd1lcXrO.js","assets/svgLabel-BQMDdcT2.js","assets/fit-CMu7prjb.js","assets/ReplayCard-Cs6mzTRa.css","assets/CommandPalette-DagPdSGZ.js","assets/registry-CueC1vq1.js","assets/CommandPalette-Bb-eErih.css","assets/Library-DmdzY2se.js","assets/neighborhoods-D7QjURnE.js","assets/chapters-Dqm4iLDa.js","assets/threads-Cu2t3070.js","assets/time-BHTmJR1s.js","assets/Library-DmrtHjUf.css","assets/LiveSettings-jn26sH4v.js","assets/kokoro-C6P0LV4L.js","assets/FeatureUseNotice-BhljPjUv.js","assets/FeatureUseNotice-CsCxxfOl.css","assets/useLiveConfig-9eJ7EM3B.js","assets/store-gohr8YVT.js","assets/friendlyAsk-BBdRZIar.js","assets/quietHours-_i5Uqz7z.js","assets/DropSelect-C3g0PjuN.js","assets/DropSelect-DilESAgA.css","assets/useStudy-B5874Bcg.js","assets/store-D2IJF4SA.js","assets/queue-Adae4IzW.js","assets/LiveSettings-CmgrMqvK.css","assets/DashboardDetail-CJzB85NC.js","assets/store-DpmbKVs7.js","assets/route-D4kd-D3B.js","assets/useDashboards-BMcuCWoz.js","assets/dataPending-lZUzUEo6.js","assets/ledger-Cv0LBflx.js","assets/format-rPI6ZwwH.js","assets/tiles-pdNi6MGe.js","assets/tiles-CBiVVjtT.css","assets/useDashboardLoop-DuckIfJX.js","assets/json-B0N3XRZU.js","assets/predictions-CkVKHq-5.js","assets/notify-Bz4wuE4T.js","assets/dashboardEvents-BDKxoLch.js","assets/confirmAdd-BDNV8RqF.js","assets/planTracker-CjnznF7v.js","assets/pin-qQrH_dBi.js","assets/pin-D-4Zjiik.css","assets/CheckLogRail-Btg7Linv.js","assets/useLedger-1WVXef68.js","assets/checkLogModel-BMtruriG.js","assets/CheckLogRail-BOaXnqWK.css","assets/dashboards-Dy4MTJQ5.css","assets/DashboardSettings-CmZWG3US.js","assets/UnderstoodPanel-DmJph4el.js","assets/UnderstoodPanel-Q6GX1TFq.css","assets/ZoomDeck-DNgyW7Nm.js","assets/portal-t0bsUEg2.js","assets/useZoomGesture-CN0p0lHL.js","assets/ZoomDeck-B2SjNwY7.css","assets/AtlasView-B82UfrEX.js","assets/store-D-f8ZuaK.js","assets/AtlasView-B5fkQhO6.css","assets/RippleOverlay-DVxfWEQ8.js","assets/buildShip-BgFg98tH.js","assets/parseDiff-D8uBQ9mQ.js","assets/incident-D3bmMmES.js","assets/githubToken-Bwa7V9YT.js","assets/cache-CvbSI-pr.js","assets/colors-D49Req-e.js","assets/courseStore-DfafnL-9.js","assets/RippleOverlay-_iiZsQVZ.css","assets/CardEditor-DABIhGdQ.js","assets/CardEditor-BY1bZiV6.css","assets/CourseRail-Dx9IIbTZ.js","assets/store-BfHRbVKz.js","assets/generateCourse-BIBbw-ZJ.js","assets/useSrsCards-C27o39fF.js","assets/deckLine-NBd3MyGT.js","assets/CourseRail-CUa7uIGG.css","assets/MindMapViewerDrawer-CDDzzpFi.js","assets/MindShape-BeZFay7O.js","assets/Presence-CKSoyuhE.js","assets/geometry-DXAbnb0J.js","assets/MindShape-CaPeUo-a.css","assets/Recap-T9DtFaEk.js","assets/Recap-DCiiWNiV.css","assets/LibraryOverlay-DEQ5GuIs.js","assets/LibraryOverlay-CnKWDMG_.css","assets/ReplayOverlay-Dm_k7FBA.js","assets/replay-zh4xVk5G.js","assets/AnnotationLayer-DHHGgh8x.js","assets/gesture-Bouqjr3g.js","assets/AnnotationLayer-ClU-e6qL.css","assets/ReplayOverlay-DzkcTnCA.css","assets/ShareModal-BILPvqjZ.js","assets/capture-BBxyt5SN.js","assets/share-kW3pZ027.js","assets/ReelJelly-D5e-jt-8.js","assets/ShareModal-D1QuQEko.css","assets/ExportModal-rxndDhoO.js","assets/notes-U6gRKVHk.js","assets/registry-CPiwQhAm.js","assets/scale-Bcgfo6Hp.js","assets/registry-types-D3q_LrlV.js","assets/fitText-DQ2omSN0.js","assets/registry-CNgybLQv.css","assets/registry-CxUmdwDk.js","assets/registry-COkvZrNA.css","assets/registry-CcOO8UZr.js","assets/registry-2GJZ46M8.css","assets/registry-CPImC7mO.js","assets/empty-BO1NC9qY.js","assets/registry-B1KQ1VPZ.css","assets/registry-B0GIHERt.js","assets/spreadLabels-CQ8hufvK.js","assets/registry-CuVk7MAI.css","assets/registry-D8O0apUT.js","assets/CodeOutput-DF892aIR.js","assets/useTimeout-Cm4yzted.js","assets/registry-BzNLfje1.css","assets/registry-Vp8VuMV0.js","assets/registry-twSIyxJQ.css","assets/registry-BFbfXK-W.js","assets/registry-UFIuwh3i.css","assets/registry-7poQfBaM.js","assets/registry-ZOWzhOHk.css","assets/registry-C28gYnVq.js","assets/registry-CRisz4Ca.css","assets/registry-Bv1f5UU4.js","assets/registry-CvylL2BN.css","assets/registry-Ci65uThi.js","assets/useSpotlightWalk-DxlxBezO.js","assets/registry-BAoRB8rd.css","assets/registry-CkScyZGa.js","assets/registry-T3i2Q9SI.css","assets/registry-9QjeHgKs.js","assets/registry-DScSjt8p.css","assets/registry-CtvKPLd7.js","assets/quizResult-DB8yeqDr.js","assets/stepDriver-DwjFet6U.js","assets/registry-B5S3brjM.css","assets/registry-w4R6c89s.js","assets/safeCssColor-di93BXgG.js","assets/registry-4mMEt1Xy.css","assets/registry-DO4hGO5e.js","assets/registry-CRM7y8QT.css","assets/registry-NbNNn_ra.js","assets/registry-Dye5m3qt.css","assets/registry-BSX3aFUw.js","assets/registry-C3ezxLR3.css","assets/registry-BzH7mEl7.js","assets/registry-tkd3UhWn.css","assets/registry-WHd1PwU3.js","assets/registry-DpMI23iE.css","assets/registry-Daypk4uR.js","assets/registry-GeSy4i7R.css","assets/registry-Xl8mAnKq.js","assets/registry-Dru0JcTa.css","assets/registry-DLyrLfe-2.js","assets/notes-A9t4jdfx.css","assets/ready-LSwk88I-.js","assets/ExportModal-D4WpAg2c.css","assets/ExtractionPreview-ChRAimKr.js","assets/store-DpObYU1u.js","assets/relate-DHPSGB7a.js","assets/PinToDashboard-CSqwDBLD.js","assets/PrismOverlay-CGtr7lBl.js","assets/penStrokes-DlHnO9xE.js","assets/types-CaO6xOn5.js","assets/verbatim-DBTj9sPD.js","assets/pen-D9UT-ioQ.js","assets/citation-BsSvaaer.js","assets/officeDoc-Dn8jw1fG.js","assets/PrismOverlay-BTfAicBt.css","assets/SynthesisOverlay-Dunk_JWD.js","assets/PresentationDeck-Dj9MQVZC.js","assets/pageVisibility-BxUVsw7Z.js","assets/DelegatePanel-Bi1qPgGG.js","assets/DelegatePanel-Cf85-0qE.css","assets/SrsReview-DhWNYYv7.js","assets/SrsReview-B1B2VekR.css","assets/TourPrism-zt1LIaLd.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./compiler-runtime-qQQXpJgv.js";import{t as r}from"./jsx-runtime-DeHZSEgm.js";import{n as i,t as a}from"./preload-helper-CiWYd9n-.js";import{r as o,t as s}from"./preloadableLazy-MIX1ApBW.js";import{$ as c,A as l,B as u,F as d,G as f,H as p,I as m,J as h,K as g,L as _,M as v,N as y,O as b,P as x,R as S,U as C,V as w,W as T,Z as E,a as D,d as O,f as k,j as A,k as j,l as M,q as ee,r as N,rt as P,t as F,w as I,z as te}from"./index-D1SPhBGd.js";import{n as L}from"./icons-gLFQTv74.js";import{n as ne,t as re}from"./spokenText-D3iS8fuI.js";import{c as R,d as ie,n as z,o as ae,t as oe,u as se}from"./CanvasSkeleton-Bx0s36b_.js";import{n as ce,r as le}from"./blockLabel-FogyzEQY.js";import{t as ue}from"./useFocusTrap-DBtkeyRy.js";import{t as de}from"./motion-BY_Egaxm.js";import{t as fe}from"./Presence-CKSoyuhE.js";import{t as pe}from"./MindShape-BeZFay7O.js";import{r as me,t as he}from"./sourceHost-BV3t2XDb.js";import{t as ge}from"./stepDriver-DwjFet6U.js";import{A as _e,C as B,D as ve,E as ye,O as be,T as xe,_ as Se,b as Ce,c as we,d as Te,h as Ee,j as De,l as Oe,o as ke,r as Ae,u as je,v as Me,w as Ne,y as Pe}from"./kokoro-C6P0LV4L.js";import{t as Fe}from"./portal-t0bsUEg2.js";import{a as Ie,i as V,o as Le,r as Re,s as ze}from"./threads-Cu2t3070.js";import{t as Be}from"./FeatureUseNotice-BhljPjUv.js";import{n as Ve,r as He}from"./history-D2EH2X6D.js";import{n as Ue,t as We}from"./generateBeats-aqKTlSN2.js";import{i as Ge,n as Ke,r as qe,t as Je}from"./AnnotationLayer-DHHGgh8x.js";import{a as Ye,s as Xe}from"./streamParse-B-Gjwa9T.js";import{n as Ze,t as Qe}from"./registry-DLyrLfe-2.js";import{n as $e,r as et,t as tt}from"./ready-LSwk88I-.js";import{t as nt}from"./registry-CueC1vq1.js";import{i as rt,r as it}from"./info-CiqHR5cs.js";import{t as at}from"./friendlyAsk-BBdRZIar.js";import{a as ot,c as st,i as ct,n as lt,r as ut,s as dt}from"./store-DpObYU1u.js";import{n as ft,r as pt}from"./chapters-Dqm4iLDa.js";/* empty css */import{g as mt,h as ht,l as gt,m as _t,p as vt,s as yt,t as bt,v as xt}from"./attachments-BW-vki-E.js";import{t as St}from"./types-CaO6xOn5.js";import{A as Ct,P as wt,a as Tt,d as Et,j as Dt,n as Ot,s as kt}from"./store-DpmbKVs7.js";import{t as At}from"./providers-DdJWf_PE.js";import{a as jt,c as Mt,l as Nt,n as Pt,o as Ft,r as It,s as Lt,u as Rt}from"./useLiveConfig-9eJ7EM3B.js";import{prewarmLive as zt}from"./prewarm-CAZcnT4x.js";import{_ as Bt,c as Vt,f as Ht,h as Ut,i as Wt,m as Gt,n as Kt,p as qt}from"./shapes-DI0LQC8n.js";import{t as Jt}from"./TopbarMenu-DQXxqSWY.js";import{a as Yt,o as Xt,r as Zt}from"./store-gohr8YVT.js";import{a as Qt,c as $t,d as en,f as tn,i as nn,l as rn,m as an,o as on,p as sn,s as cn,t as ln}from"./quietHours-_i5Uqz7z.js";import{a as un,c as dn,d as fn,i as pn,n as mn,t as hn,u as gn}from"./store-BWLbFXiY.js";import{a as _n,i as vn,r as yn,s as bn}from"./useStudy-B5874Bcg.js";import{t as xn}from"./ready-4lPJes2S.js";import{t as Sn}from"./DropSelect-C3g0PjuN.js";import{t as Cn}from"./route-D4kd-D3B.js";import{t as wn}from"./useDashboards-BMcuCWoz.js";import{a as Tn,d as En,g as Dn,l as On,n as kn,p as An,r as jn}from"./store-D2IJF4SA.js";import{t as Mn}from"./useZoomGesture-CN0p0lHL.js";import{a as Nn,o as Pn,t as Fn}from"./store-D-f8ZuaK.js";import{SEED_SHIP as In}from"./seed-b1xc0dj2.js";import{t as Ln}from"./buildShip-BgFg98tH.js";import{n as Rn}from"./parseDiff-D8uBQ9mQ.js";import{enrichShipModel as zn}from"./generate-CemSUZ8A.js";import{a as Bn,c as Vn,g as Hn,h as Un,l as Wn,o as Gn,p as Kn,r as qn,t as Jn}from"./store-BfHRbVKz.js";import{n as Yn}from"./speed-K5_Ebj-8.js";import{r as Xn}from"./courseSeed-CZdNBTTs.js";import{i as Zn,n as Qn,r as $n,t as er}from"./mastery-CUfDeuqO.js";var H=t(),tr=P(),nr=/\?\s*$|^\s*(what|why|how|when|where|who|which|can|could|should|would|is|are|do|does|tell me|show me|explain)\b/i;function rr(e){return nr.test(e.trim())}function ir(e,t){let n=e.key,r=t.trim();if(!r)return null;switch(e.kind){case`number`:{let t=r.replace(/,/g,``).match(/-?\d+(\.\d+)?/);if(!t)return null;let i=Number(t[0]);return Number.isFinite(i)?{kind:`number`,key:n,value:i,...e.unit?{unit:e.unit}:{}}:null}case`choice`:{let t=e.options?.find(e=>r.toLowerCase().includes(e.toLowerCase()));return t?{kind:`choice`,key:n,value:t}:null}case`card`:return null;case`date`:return{kind:`date`,key:n,value:r};default:return{kind:`text`,key:n,value:r}}}function ar(e,t){if(e.phase!==`awaiting_input`||!e.activeKey)return!1;let n=e.blanks.find(t=>t.key===e.activeKey);if(!n)return!1;let r=ir(n,t),i=rr(t);return r&&!i?(e.fill(r),!0):!r&&!i}function or(e){return e.alwaysOn&&e.sttOk&&!e.composerHasText}function sr(e,t){let n=(0,H.useRef)({...e,...t});n.current={...e,...t};let r=e.listening||or(e);(0,H.useEffect)(()=>{if(!r)return;let e=()=>{document.hidden?n.current.listening&&n.current.stop():or(n.current)&&!n.current.listening&&n.current.start()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[r])}var U=r(),cr=200;function lr(e){let t=e.trim().split(/\s+/).filter(Boolean).length;return Math.min(8e3,700+t*360)}function ur(e,t){let n=(0,H.useRef)(e);n.current=e;let[r,i]=(0,H.useState)(null),a=(0,H.useRef)(null),o=(0,H.useCallback)(e=>{a.current=e,i(e)},[]),s=(0,H.useRef)(void 0),c=(0,H.useRef)(void 0),l=(0,H.useCallback)(()=>{s.current!==void 0&&clearTimeout(s.current),c.current!==void 0&&clearTimeout(c.current),s.current=void 0,c.current=void 0},[]),u=(0,H.useCallback)(e=>{let t=n.current,r=e.id??null;if(t.takeWheel(),t.moveSpot(e),r&&r===a.current){t.hush(),l(),o(null);return}t.hush(),l();let i=r?t.lineFor(e):null;if(!i||!t.canSpeak()){o(null);return}o(r),s.current=setTimeout(()=>{s.current=void 0,n.current.speakLine(i),c.current=setTimeout(()=>{c.current=void 0,a.current===r&&o(null)},lr(i))},cr)},[l,o]);return(0,H.useEffect)(()=>()=>{l(),o(null)},[t,l,o]),{narrate:u,narratingId:r}}var dr=`mavea-view-mode`,fr=dr,pr=`everything`;function mr(e){return e===`focus`||e===`everything`||e===`canvas`}var hr=null;function gr(){try{if(typeof localStorage>`u`)return pr;let e=localStorage.getItem(dr);return mr(e)?e:pr}catch{return pr}}function _r(){return hr||(hr=gr(),hr)}function vr(e){if(mr(e)){hr=e;try{typeof localStorage<`u`&&e!==`canvas`&&localStorage.setItem(dr,e)}catch{}try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(fr))}catch{}}}function yr(){let[e,t]=(0,H.useState)(()=>_r());return(0,H.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>t(_r());return window.addEventListener(fr,e),()=>window.removeEventListener(fr,e)},[]),[e,(0,H.useCallback)(vr,[])]}function br({value:e,onChange:t,onSend:n,listening:r,onMic:i,micMode:a=`tap`,micArmed:o=!1,micPaused:s=!1,micProcessing:c=!1,micDisabled:l=!1,placeholder:u,disabled:d,heard:f,focusSignal:p,onFiles:m,attachTitle:h,attachPulse:g,onMicDown:_,onForceStop:v,onMicCancel:y,tools:b,micExtra:x}){let S=(0,H.useRef)(null),C=(0,H.useRef)(null),[w,T]=(0,H.useState)(!1);(0,H.useEffect)(()=>{if(!g)return;T(!0);let e=setTimeout(()=>T(!1),1100);return()=>clearTimeout(e)},[g]);let E=(0,H.useRef)(!1),D=(0,H.useRef)(null),O=(0,H.useRef)(!1),k=(0,H.useRef)(y);k.current=y,(0,H.useEffect)(()=>()=>{E.current&&k.current?.()},[]),(0,H.useEffect)(()=>{a!==`hold`&&(O.current=!1,E.current&&(E.current=!1,D.current=null,k.current?.()))},[a]),(0,H.useEffect)(()=>{!r&&S.current&&S.current.focus()},[r]),(0,H.useEffect)(()=>{p&&S.current&&S.current.focus()},[p]);let A=(0,H.useCallback)(e=>{a!==`hold`||l||c||r||E.current||(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),E.current=!0,D.current=e.pointerId,O.current=!0,_?.())},[l,c,r,a,_]),j=(0,H.useCallback)(()=>{E.current&&(E.current=!1,D.current=null,v?.())},[v]),M=(0,H.useCallback)(e=>{D.current===e.pointerId&&(e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),j())},[j]),ee=(0,H.useCallback)(e=>{E.current&&(e&&D.current===e.pointerId&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),E.current=!1,D.current=null,y?.())},[y]),N=(0,H.useCallback)(e=>{a!==`hold`||l||c||r||E.current||e.repeat||e.key!==` `&&e.key!==`Enter`||(e.preventDefault(),E.current=!0,O.current=!0,_?.())},[r,l,a,c,_]),P=(0,H.useCallback)(e=>{a!==`hold`||e.key!==` `&&e.key!==`Enter`||(e.preventDefault(),j())},[j,a]),F=(0,H.useCallback)(()=>{if(a===`hold`||O.current){O.current=!1;return}l||c&&a!==`always`||i()},[i,l,a,c]),I=l?`Microphone off`:c&&a!==`always`?`Finishing voice input`:r?`Finish and send`:s?`Resume always-on`:o?`Pause always-on`:a===`hold`?`Hold to talk`:`Talk to Mavéa`,te=(0,U.jsx)(`button`,{className:`mic-btn`+(r?` listening`:``)+(o?` armed`:``)+(s?` paused`:``)+(c?` processing`:``)+(l?` mic-off`:``),onClick:F,onPointerDown:A,onPointerUp:M,onPointerCancel:ee,onKeyDown:N,onKeyUp:P,title:I,"aria-label":I,"aria-busy":c,children:l?(0,U.jsx)(L.micOff,{}):(0,U.jsx)(L.mic,{})});return(0,U.jsxs)(`div`,{className:`composer`,children:[x?(0,U.jsxs)(`div`,{className:`mic-btn-wrap`,children:[te,x]}):te,f&&!e?(0,U.jsx)(`div`,{className:`live-listen heard`,children:(0,U.jsxs)(`span`,{style:{color:`var(--text-primary)`},children:[`"`,f,`"`]})}):r&&!e?(0,U.jsxs)(`div`,{className:`live-listen`,children:[(0,U.jsx)(`span`,{className:`wave`,children:[14,18,10,20,8,16,12].map((e,t)=>(0,U.jsx)(`i`,{style:{height:e}},t))}),`Listening…`]}):(0,U.jsx)(`input`,{ref:S,className:`composer-input`,name:`mavea-ask`,"aria-label":u||`Ask Mavéa anything`,autoComplete:`off`,value:e,disabled:d,placeholder:u||`Ask Mavéa anything — or just talk`,onChange:e=>t(e.target.value),onKeyDown:t=>{t.key===`Enter`&&e.trim()&&n(e)}}),m&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`input`,{ref:C,type:`file`,name:`mavea-attach`,accept:bt,multiple:!0,disabled:d,hidden:!0,"aria-hidden":`true`,onChange:e=>{let t=Array.from(e.target.files??[]);t.length&&m(t),e.target.value=``}}),(0,U.jsx)(`button`,{type:`button`,className:`composer-tool`+(w?` is-pulsing`:``),title:h||`Attach a file`,"aria-label":h||`Attach a file`,disabled:d,onClick:()=>C.current?.click(),children:(0,U.jsx)(L.paperclip,{})})]}),b,(0,U.jsx)(`button`,{className:`send-btn`,disabled:d||!e.trim(),onClick:()=>n(e),title:`Send`,"aria-label":`Send`,children:(0,U.jsx)(L.send,{})})]})}i();var xr=null;async function Sr(){return xr||(xr=(await a(()=>import(`./corpus.generated-oX9uU93S.js`),[])).default,xr)}function Cr(e){return xr?.conversations.find(t=>t.id===e)}function wr(e){return e.replace(/\b([\p{L}]+)-ish\b/gu,`roughly $1`).replace(/\s*[—–]\s*/g,`, `).replace(/(\p{L})-(?=\p{L})/gu,`$1 `).replace(/\s+-\s+/g,`, `).replace(/,\s*,+/g,`, `).replace(/\s{2,}/g,` `).trim()}function Tr(e){return{...e,question:wr(e.question),narration:wr(e.narration),spoken:e.spoken?wr(e.spoken):e.spoken,tour:e.tour.map(e=>({...e,say:e.say?wr(e.say):e.say,saySpoken:e.saySpoken?wr(e.saySpoken):e.saySpoken}))}}var Er=[{id:`talk`,title:`Speak naturally`,mode:`voice`,coach:`Start by speaking naturally or typing. I will understand either and respond out loud.`,spotlight:`.mic-btn`,action:{kind:`mic`},durationMs:6e3},{id:`connect`,title:`Bring your own model`,mode:`explain`,coach:`Choose Gemini, Claude, GPT, Grok, or OpenRouter, then paste your own API key. Start with a fast, lower cost model and move up only when a task needs it. The key stays in memory unless you choose Remember. Requests pass through this deployment, and your provider's usage charges, privacy, and retention terms apply.`,spotlight:`.settings-model-connect`,action:{kind:`connect`},durationMs:12e3},{id:`draws`,title:`See the answer`,mode:`explain`,coach:`Ask anything. I build a visual answer while I explain the important parts. Use the voice toggle labeled Mavéa's voice to turn speech off and reveal everything immediately. Your microphone stays unchanged.`,spotlight:`.voice-switch`,action:{kind:`answer`,convoId:`money`,ask:`How does $10,000 grow at 7% over 30 years?`},durationMs:9e3},{id:`mark`,title:`Follow the explanation`,mode:`explain`,coach:`Watch the Pen circle the result, then underline why it matters. Its marks stay with the answer.`,spotlight:`.pen-toggle-pill`,action:{kind:`penDemo`},durationMs:1e4,needsCanvas:!0},{id:`ask`,title:`Ask across the answer`,mode:`explain`,coach:`Choose Ask on two cards, then type a question. I will use both pieces of context together.`,spotlight:`.topic-wrap .block-ask, .ask-hint`,action:{kind:`askMulti`},durationMs:12e3,needsCanvas:!0},{id:`canvas`,title:`Explore the canvas`,mode:`explain`,coach:`Switch to Canvas when you want to explore the whole answer spatially.`,action:{kind:`canvas`,convoId:`travel`},durationMs:15e3},{id:`dashboards`,title:`Keep it current`,mode:`explain`,coach:`A living dashboard keeps an answer current. Choose when it refreshes, or refresh it whenever you want.`,action:{kind:`dashboard`},durationMs:12e3,needsCanvas:!0},{id:`prism`,title:`Check the evidence`,mode:`explain`,coach:`Prism checks a document claim by claim and ties every finding to its source.`,action:{kind:`prism`},durationMs:32e3},{id:`share`,title:`Present or publish`,mode:`explain`,coach:`Turn a useful answer into a polished presentation or document.`,action:{kind:`export`},durationMs:16e3,needsCanvas:!0},{id:`yours`,title:`Try it yourself`,mode:`voice`,coach:`That is the tour. Now ask your first question.`,spotlight:`.mic-btn`,action:{kind:`mic`},durationMs:6e3}],Dr=[{id:`bend`,title:`Make it yours`,mode:`explain`,coach:`These are starting assumptions. Drag the rent and watch the comparison update.`,spotlight:`.bend-strip`,action:{kind:`bend`,convoId:`mortgage`},durationMs:8e3,needsCanvas:!0,glyph:`🎚️`,hook:`Drag a number, watch it recompute`},{id:`chips`,title:`Go deeper`,mode:`explain`,coach:`When an answer offers ways to go deeper, tap one and I'll take it further.`,spotlight:`.footer-keepgoing`,action:{kind:`chip`,convoId:`monthly`,label:`What if I added $500 monthly?`},durationMs:9e3,needsCanvas:!0,glyph:`💬`,hook:`Tap a suggestion, go deeper`},{id:`rail`,title:`Session history`,mode:`explain`,coach:`Settled turns stay on the left for this session. Jump back anytime.`,spotlight:`.rail-chat`,action:{kind:`rail`},durationMs:8e3,needsCanvas:!0,glyph:`📜`,hook:`Settled turns, replayable on the left`},{id:`highlight`,title:`Highlight to ask`,mode:`explain`,coach:`Choose Highlight, draw around any part of an answer, then ask about exactly what you marked.`,spotlight:`.mark-toggle`,action:{kind:`mark`},durationMs:8e3,needsCanvas:!0,glyph:`✎`,hook:`Draw around the exact part you mean`},{id:`range`,title:`A fitting picture`,mode:`explain`,coach:`Answers can choose from diagrams, flows, charts, and interactive maps.`,action:{kind:`montage`,convoIds:[`space`,`krebs`,`travel`]},durationMs:9e3,glyph:`🎨`,hook:`See the visual range`},{id:`focus`,title:`One card at a time`,mode:`explain`,coach:`Feeling overwhelmed? Focus puts one card center stage, one at a time.`,spotlight:`.focus-toggle`,action:{kind:`focusWalk`,convoId:`money`},durationMs:11e3,glyph:`🎯`,hook:`One card at a time, center stage`},{id:`think`,title:`Think out loud`,mode:`explain`,coach:`Not sure what to ask yet? Think out loud, and I will map your thoughts live.`,action:{kind:`listen`},durationMs:16e3,glyph:`🧠`,hook:`Think out loud, I map it live`},{id:`atlas`,title:`Memory and Atlas`,mode:`explain`,coach:`When Memory is enabled, saved facts and kept topics can shape Atlas.`,action:{kind:`atlas`},durationMs:9e3,glyph:`🗺️`,hook:`Kept topics become a place`},{id:`export`,title:`Export the answer`,mode:`explain`,coach:`Need to share it? Export the current answer as a styled slide deck or document.`,action:{kind:`export`},durationMs:12e3,needsCanvas:!0,glyph:`📄`,hook:`Any answer becomes a deck or document`},{id:`flashcards`,title:`Make it stick`,mode:`explain`,coach:`Learning something? Any card becomes a flashcard, kept right here on your device.`,action:{kind:`flashcards`},durationMs:8e3,needsCanvas:!0,glyph:`🎴`,hook:`Turn any card into a flashcard`},{id:`course`,title:`Master a subject`,mode:`explain`,coach:`Want to truly master something? I'll build you a course and teach it, one lesson at a time.`,spotlight:`.course-rail`,action:{kind:`course`},durationMs:12e3,glyph:`🎓`,hook:`A full course, a lesson at a time`},{id:`present`,title:`Fill the room`,mode:`explain`,coach:`Present fills the room with the answer while the microphone stays live.`,action:{kind:`present`},durationMs:9e3,needsCanvas:!0,glyph:`🖥️`,hook:`Fill the room, chrome falls away`},{id:`palette`,title:`Feature index, one key away`,mode:`explain`,coach:`Browse the feature index with one keystroke. Just press Command K.`,spotlight:`.cmdk-panel`,action:{kind:`palette`},durationMs:9e3,glyph:`⌘`,hook:`Feature index, one keystroke away`},{id:`ripple`,title:`See a change ripple`,mode:`explain`,coach:`Here is a real code change. See what it touches, what could break, and the safest order to ship it.`,action:{kind:`showcase`,featureId:`ripple`},durationMs:12e3,glyph:`🌊`,hook:`A code change's whole blast radius`},{id:`deepzoom`,title:`Telescope any topic`,mode:`explain`,coach:`Telescope a topic from the big picture all the way down to the finest detail.`,action:{kind:`showcase`,featureId:`deepzoom`},durationMs:1e4,glyph:`🔭`,hook:`From big picture to finest detail`},{id:`synthesis`,title:`Fuse many documents`,mode:`explain`,coach:`Drop in several documents and I combine them into one map of agreements, contradictions, and gaps.`,action:{kind:`showcase`,featureId:`synthesis`},durationMs:1e4,glyph:`🧬`,hook:`Many documents into one map`},{id:`memory`,title:`What I remember`,mode:`explain`,coach:`Everything I remember about you lives here. Review it, edit it, or forget it. It stays on your device.`,action:{kind:`showcase`,featureId:`memory`},durationMs:9e3,glyph:`🔖`,hook:`See, edit, or forget what I know`},{id:`library`,title:`Past conversations`,mode:`explain`,coach:`Every canvas you build is kept. Reopen any past conversation where you left it.`,action:{kind:`showcase`,featureId:`library`},durationMs:9e3,glyph:`📚`,hook:`Reopen a canvas you built before`},{id:`review`,title:`Study your cards`,mode:`explain`,coach:`Open Study to go through your flashcards. Keep it a plain pile, or let Mavéa space them out so the ones you find hard come back sooner.`,action:{kind:`showcase`,featureId:`review`},durationMs:9e3,glyph:`🧠`,hook:`Go through your flashcards`},{id:`manage-flashcards`,title:`Manage your deck`,mode:`explain`,coach:`Open your flashcard library to organize decks, edit cards, and choose what to study.`,action:{kind:`showcase`,featureId:`flashcards`},durationMs:9e3,glyph:`🗂️`,hook:`Organize and edit every study card`},{id:`track`,title:`Build a living dashboard`,mode:`explain`,coach:`Choose the parts you want to keep live, set a refresh schedule, and create a dashboard from this answer.`,action:{kind:`showcase`,featureId:`track`},durationMs:12e3,needsCanvas:!0,glyph:`📈`,hook:`Choose what stays live and how often`},{id:`delegate`,title:`Rehearse it first`,mode:`explain`,coach:`Prepare a hard conversation before you have it. Take the seat and practice your own lines, or send me to argue your side and read the debrief.`,action:{kind:`showcase`,featureId:`delegate`},durationMs:9e3,glyph:`🤝`,hook:`Practice it, or send me to scout it`},{id:`just-listen`,title:`Just listen`,mode:`explain`,coach:`Think out loud and I save what you say without answering, so you can sort it later.`,action:{kind:`showcase`,featureId:`just-listen`},durationMs:9e3,glyph:`👂`,hook:`Bank everything you say, sort it later`},{id:`recap`,title:`Recap the session`,mode:`explain`,coach:`Lost the thread? I'll recap everything we've covered this session at a glance.`,action:{kind:`showcase`,featureId:`recap`},durationMs:9e3,glyph:`📋`,hook:`Everything we've covered, at a glance`},{id:`ghost`,title:`Ghost answers`,mode:`explain`,coach:`While you listen, I quietly draft a response, so it is ready when you want it.`,action:{kind:`showcase`,featureId:`ghost`},durationMs:9e3,glyph:`👻`,hook:`I draft what I would say, quietly`},{id:`whisper`,title:`Whisper mode`,mode:`explain`,coach:`Need to stay quiet? Whisper mode lowers my voice to a soft murmur.`,action:{kind:`showcase`,featureId:`whisper`},durationMs:9e3,glyph:`🤫`,hook:`A quiet voice when you need it`},{id:`morning-brief`,title:`Morning brief`,mode:`explain`,coach:`Start the day with a brief of what changed across the things you track. It stays off until you turn it on.`,action:{kind:`showcase`,featureId:`morning-brief`},durationMs:9e3,glyph:`☀️`,hook:`Open the day with what's changed`},{id:`settings`,title:`Bring your own model`,mode:`explain`,coach:`Bring your own model, connect a provider, and tune how I answer. You control the key and the terms.`,action:{kind:`showcase`,featureId:`settings`},durationMs:9e3,glyph:`⚙️`,hook:`Connect a provider, tune the answers`},{id:`zoom-deck`,title:`Chapter view`,mode:`explain`,coach:`Pull back from the cards to the whole session, with every topic shown as a chapter.`,action:{kind:`showcase`,featureId:`zoom-deck`},durationMs:1e4,glyph:`📖`,hook:`Pull back to the whole session`},{id:`blanks`,title:`Fill in your own`,mode:`explain`,coach:`Some numbers are only yours to give. I leave glowing spaces and finish the answer around what you add.`,spotlight:`.blank-slot`,action:{kind:`blanksDemo`},durationMs:1e4,glyph:`◌`,hook:`Holes for the numbers only you know`}],Or=[...Er,...Dr];function kr(e){return Or.find(t=>t.id===e)}var Ar={money:`How does $10,000 grow at 7% over 30 years?`,monthly:`What if I added $500 monthly?`,mortgage:`Should I buy or rent a $500,000 home?`,space:`How does a black hole bend light?`,travel:`Plan me 5 days in Japan.`,budget:`Where does the US federal budget actually go?`,krebs:`Explain the Krebs cycle.`,url:`What actually happens when I open a website?`,neural:`How does a neural network learn?`,fitness:`Design me a 3-day strength routine.`};function W(e,t){let n=Cr(e),r=n?.frames[0];if(!n||!r)return null;let i=wr(t??Ar[e]??n.question);return{frame:Tr({...r,question:i}),question:i}}var jr=[{key:`savings`,label:`Your savings`,prompt:`How much have you set aside for the break?`,kind:`number`,unit:`$`,placeholder:`e.g. 18,000`},{key:`spend`,label:`Monthly spend`,prompt:`Roughly what will you spend a month while travelling?`,kind:`number`,unit:`$/mo`,placeholder:`e.g. 2,400`}],Mr=[{type:`insight`,id:`blanks-lede`,col:12,props:{title:`The money side of a 6-month break`,summary:`I've mapped the typical costs and what to sort out before you leave. Two numbers, though, are yours to give — so I've left them as holes rather than guess.`}},{type:`blanks`,id:`blanks-holes`,col:12,props:{title:`The parts only you can answer`,icon:`spark`,iconColor:`var(--presence)`,intro:`I've weighed everything I can. Fill these in and I'll finish the runway math around them.`,slots:jr}}],Nr=[{type:`insight`,id:`blanks-verdict`,col:12,props:{title:`You can afford it — with a cushion`,summary:`$18,000 saved against $2,400 a month is about 7.5 months of runway — enough for a 6-month break with room to spare.`,stat:`7.5 months`,delta:`+1.5 vs. the plan`,deltaDir:`up`}},{type:`breakdown`,id:`blanks-runway`,col:12,props:{title:`Your runway`,rows:[{name:`Saved`,val:`$18,000`,pct:100},{name:`Spend / month`,val:`$2,400`,pct:32},{name:`6-month cost`,val:`$14,400`,pct:80},{name:`Left over`,val:`$3,600`,pct:20,tag:`cushion`,tagColor:`var(--presence)`}]}}];function G(e,t){return{question:`Can I afford a 6-month career break?`,narration:t,mode:`replace`,tour:[],spec:e,at:0}}function Pr(e){let t={...e,title:`Can I afford a 6-month career break?`,sub:`The money side`,bend:void 0,sources:void 0,track:void 0},n={...t,blocks:Mr,blanks:jr,awaiting:!0},r={...t,blocks:Nr,blanks:void 0,awaiting:!1};return{holes:G(n,``),filled:G(r,`With eighteen thousand saved and twenty-four hundred a month, that’s about seven and a half months of runway — enough for six, with a cushion.`)}}function K(){let e=!1,t=[];return{after(n,r){t.push(setTimeout(()=>!e&&r(),n))},cancel(){e=!0,t.forEach(clearTimeout)}}}function Fr(e,t){if(O()){t();return}let n=Date.now(),r=()=>{if(O()||Date.now()-n>=8e3){t();return}e(200,r)};e(200,r)}function Ir(e,t,n,r=0){for(let i=1;i<=n.length;i++)e(r+i*22,()=>t(n.slice(0,i)));return r+n.length*22}function Lr(e){let t=Date.now(),n=e.maxExtraMs??2e4,r=0,i=window.setInterval(()=>{let a=Date.now()-t;a<e.minHoldMs||(r=e.isQuiet()?r+1:0,(r>=7||a>=e.minHoldMs+n)&&(window.clearInterval(i),e.advance()))},250);return()=>window.clearInterval(i)}var Rr=450,zr=1600;function Br(e,t){if(e<=0)return[];let n=Math.max(zr,Math.floor((t-Rr-400)/e));return Array.from({length:e},(e,t)=>Rr+t*n)}var Vr=1500,Hr=900;function Ur(e,t){let n=1850;if(e<=0)return{focusAt:Vr,spotlightAt:[]};let r=Math.max(Hr,Math.floor((t-n)/e));return{focusAt:Vr,spotlightAt:Array.from({length:e},(e,t)=>n+t*r)}}var Wr=[`I keep thinking about moving to Austin.`,`My sister already lives there.`,`But I'm worried about starting over.`,`And my lease runs until March.`,`Is it even the right time?`];function Gr(e){return!!e&&Dr.some(t=>t.id===e)}function Kr(e){return!!e&&Er.some(t=>t.id===e)}function qr(e){let{active:t}=e,[n,r]=(0,H.useState)(()=>{let t=e.startChapter;return Gr(t)||Kr(t)&&e.solo?t??null:null}),[i,a]=(0,H.useState)(()=>{let t=e.startChapter;if(Gr(t)||Kr(t)&&e.solo)return 0;let n=t?Er.findIndex(e=>e.id===t):-1;return n>=0?n:0}),[o,s]=(0,H.useState)(!1),[l,u]=(0,H.useState)(!1),[d,f]=(0,H.useState)(!1),p=(0,H.useRef)(d);p.current=d;let[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)(0),v=(0,H.useRef)(e.ops);v.current=e.ops;let y=n?kr(n):void 0,b=y?[y]:Er,x=(0,H.useRef)(b);x.current=b;let S=b.length,C=t?b[i]??null:null,[w,T]=(0,H.useState)(!1),[E,D]=(0,H.useState)(!1),[k,A]=(0,H.useState)(0);(0,H.useEffect)(()=>{if(!t)return;let e=!0;return(async()=>{for(let t=0;e&&t<2;t++)try{await Sr(),e&&T(!0);return}catch{}e&&D(!0)})(),()=>{e=!1}},[t,k]);let j=(0,H.useCallback)(()=>{D(!1),A(e=>e+1)},[]),M=(0,H.useCallback)(()=>{let e=v.current;e.closeAllOverlays(),e.stopRevealWalk(),e.cancelSpeech()},[]);(0,H.useEffect)(()=>{if(!t||!o||m||!w)return;let e=x.current[i];if(!e)return;c(e.id,!!n);let r=v.current,a=K(),s=a.after,l=e=>Fr(s,e),u=e=>l(()=>r.speak(e)),d=e=>r.showFrame(e.frame,e.question,{silent:!0});if(M(),e.needsCanvas&&!r.hasCanvas()){let e=W(`money`);e&&d(e)}r.setMuted(p.current||e.mode===`silent`);let f=e.action;if(f.kind===`answer`){let e=W(f.convoId,f.ask);if(e){let t=e.question,n={...e.frame,narration:``,spoken:``,tour:e.frame.tour.slice(0,4).map(e=>({...e,say:``,saySpoken:``}))};s(Ir(s,r.typeInto,t)+360,()=>l(()=>r.showFrame(n,e.question)))}}else if(f.kind===`chip`){let e=W(`money`);e&&d(e),s(1400,()=>r.pressKeepGoing(f.label)),s(2e3,()=>{let e=W(f.convoId,f.label);e&&r.showFrame(e.frame,e.question)})}else if(f.kind===`montage`){let t=f.convoIds.map(e=>W(e)).filter(Boolean),n=Br(t.length,e.durationMs);t.forEach((e,t)=>s(n[t],()=>d(e)))}else if(f.kind===`ask`)s(1300,()=>r.pinFirstBlock()),Ir(s,r.typeInto,`Why does it grow faster after year 20?`,1700);else if(f.kind===`askMulti`){let e=W(`money`);e&&d(e),s(1300,()=>r.pinFirstBlocks(2)),Ir(s,r.typeInto,`How do these two parts explain the final total?`,2600)}else if(f.kind===`bend`){if(f.convoId){let e=W(f.convoId);e&&d(e)}s(1400,()=>r.bendIt())}else if(f.kind===`rail`)s(1300,()=>r.toggleRail()),s(2600,()=>r.toggleRail());else if(f.kind===`export`)s(500,()=>r.openExport());else if(f.kind===`mark`)s(400,()=>r.setInkArmed(!0)),s(900,()=>r.scriptedMark());else if(f.kind===`penDemo`){let e=W(`money`);e&&d(e),s(1200,()=>r.drawPenTourStep(`result`)),s(3900,()=>r.drawPenTourStep(`reason`)),s(7200,()=>r.setSpot(null))}else if(f.kind===`focus`)s(500,()=>r.setViewMode(`focus`));else if(f.kind===`canvas`){let e=W(f.convoId);e&&d(e),s(1500,()=>r.setViewMode(`canvas`));let t=(e?.frame.spec.blocks??[]).map(e=>e.id).filter(e=>!!e).slice(0,3);t.forEach((e,t)=>s(2700+t*1900,()=>r.setSpot(e))),s(2700+t.length*1900,()=>r.setSpot(null))}else if(f.kind===`focusWalk`){let t=W(f.convoId);t&&d(t);let n=(t?.frame.spec.blocks??[]).map(e=>e.id).filter(e=>!!e),{focusAt:i,spotlightAt:a}=Ur(n.length,e.durationMs);s(i,()=>r.setViewMode(`focus`)),n.forEach((e,t)=>s(a[t],()=>r.setSpot(e)))}else if(f.kind===`listen`){s(400,()=>r.startWatchThinking());let e=800;for(let t of Wr)e=Ir(s,r.typeInto,t,e)+300,s(e,()=>{r.typeInto(``),r.bankThought(t)}),e+=800}else if(f.kind===`flashcards`)s(700,()=>r.openFlashcards());else if(f.kind===`course`)s(500,()=>r.openTourCourse());else if(f.kind===`dashboard`)s(500,()=>r.openDashboards()),s(2600,()=>r.dashboardShowSettings());else if(f.kind===`connect`)s(400,()=>r.openModelSettings());else if(f.kind===`present`)s(500,()=>r.setPresenting(!0));else if(f.kind===`share`)s(500,()=>r.setShareOpen(!0)),s(3100,()=>r.shareRemix()),s(4900,()=>r.sharePalette(`Ember`));else if(f.kind===`palette`)s(500,()=>r.setPaletteOpen(!0));else if(f.kind===`atlas`)s(500,()=>r.openAtlas());else if(f.kind===`prism`)s(400,()=>r.openPrism(0));else if(f.kind===`memory`)s(700,()=>r.fireMemoryGlow());else if(f.kind===`showcase`)f.featureId===`recap`||f.featureId===`zoom-deck`?([`money`,`space`,`travel`].forEach((e,t)=>{let n=W(e);n&&s(t*200,()=>d(n))}),s(1400,()=>r.showcaseFeature(f.featureId))):s(500,()=>r.showcaseFeature(f.featureId));else if(f.kind===`blanksDemo`){let e=W(`money`)?.frame.spec;if(e){let{holes:t,filled:n}=Pr(e);d({frame:t,question:t.question}),s(5200,()=>r.showFrame(n,n.question))}}return e.mode!==`silent`&&!p.current&&s(160,()=>u(wr(e.coach))),a.cancel},[i,g,t,o,m,w,n,M]),(0,H.useEffect)(()=>{if(!t||!o||m||!l||!w)return;let e=x.current[i];if(!e)return;let n=v.current;return Lr({minHoldMs:e.durationMs,isQuiet:()=>!n.isSpeaking()&&!n.isBusy(),advance:()=>{i+1>=S?(M(),h(!0)):a(i+1)}})},[i,g,t,o,m,l,w,S,n,M]),(0,H.useEffect)(()=>()=>M(),[M]);let ee=(0,H.useCallback)(()=>{O(),s(!0),u(!0),h(!1)},[]),N=(0,H.useCallback)((e,t)=>{O(),h(!1),t?.keepPlaying||u(!1),a(Math.max(0,Math.min(x.current.length-1,e))),_(e=>e+1)},[]),P=(0,H.useCallback)(()=>{i+1>=S?(M(),h(!0)):N(i+1,{keepPlaying:!0})},[i,S,N,M]),F=(0,H.useCallback)(()=>N(i-1),[i,N]),I=(0,H.useCallback)(e=>N(e),[N]),te=(0,H.useCallback)(()=>{M(),r(null),s(!0),N(0),u(!0)},[N,M]),L=(0,H.useCallback)(e=>{Gr(e)&&(O(),r(e),s(!0),h(!1),u(!0),a(0),_(e=>e+1))},[]),ne=(0,H.useCallback)(()=>{if(O(),!o){ee();return}if(m){te();return}u(e=>!e)},[m,te,ee,o]),re=(0,H.useCallback)(()=>{O();let e=!p.current;p.current=e,f(e);let t=x.current[i],n=t?.mode===`silent`,r=v.current;r.setMuted(e||n),e?r.cancelSpeech():o&&!m&&t&&!n&&r.speak(wr(t.coach))},[m,i,o]),R=(0,H.useCallback)(()=>{M(),h(!0)},[M]);return{active:t,started:o,index:i,total:S,chapter:C,coach:wr(C?.coach??``),spotlight:C?.spotlight,playing:l,muted:d,done:m,corpusError:E,retryCorpus:j,solo:!!n,start:ee,next:P,prev:F,jumpTo:I,toggle:ne,toggleMute:re,replay:te,skip:R,playExtra:L}}var q=n();function Jr(e){let t=window.innerWidth,n=window.innerHeight,r=Math.min(e.right,t)-Math.max(e.left,0),i=Math.min(e.bottom,n)-Math.max(e.top,0);return r>e.width*.5&&i>e.height*.5}function Yr(e,t){let n=(0,q.c)(4),[r,i]=(0,H.useState)(null),a,o;return n[0]!==t||n[1]!==e?(a=()=>{if(!e||!t){i(null);return}let n=!0,r=0,a=null,o=e=>{e===a||e!==null&&a!==null&&Math.abs(e.top-a.top)<.5&&Math.abs(e.left-a.left)<.5&&Math.abs(e.width-a.width)<.5&&Math.abs(e.height-a.height)<.5||(a=e,i(e))},s=e.split(`,`).map(ei).filter(Boolean),c=()=>{if(!n)return;let e=null,t=null;for(let n of s){let r=Array.from(document.querySelectorAll(n)).filter($r).map(Qr).filter(Zr),i=r.find(Xr)??r[0];if(i){e=i.hit,t=i.rect;break}}if(!e||!t){o(null);return}let i=t;if(!Jr(i)){let t=Date.now();t-r>1200&&(r=t,e.scrollIntoView({block:`center`,behavior:`smooth`})),o(null);return}o(i)};c();let l=window.setInterval(c,250);return window.addEventListener(`resize`,c),window.addEventListener(`scroll`,c,!0),()=>{n=!1,window.clearInterval(l),window.removeEventListener(`resize`,c),window.removeEventListener(`scroll`,c,!0)}},o=[e,t],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,H.useEffect)(a,o),r}function Xr(e){let{rect:t}=e;return Jr(t)}function Zr(e){let{rect:t}=e;return t.width>0&&t.height>0}function Qr(e){return{hit:e,rect:e.getBoundingClientRect()}}function $r(e){return!e.checkVisibility||e.checkVisibility({checkOpacity:!0})}function ei(e){return e.trim()}function ti(e){let t=(0,q.c)(82),{driver:n}=e,r=Yr(n.spotlight,n.active&&n.started&&!n.done),i=(0,H.useRef)(null),a=n.active&&!n.done&&!n.started&&!n.corpusError,o;t[0]===a?o=t[1]:(o={active:a},t[0]=a,t[1]=o),ue(i,o);let s=n.active&&n.started&&!n.done?n.chapter?.id:void 0,c,l;if(t[2]===s?(c=t[3],l=t[4]):(c=()=>{if(s)return document.body.dataset.tourChapter=s,ri},l=[s],t[2]=s,t[3]=c,t[4]=l),(0,H.useEffect)(c,l),!n.active||n.done)return null;if(n.corpusError){let e,r,i;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`span`,{className:`tourx-welcome-kicker`,children:`Walkthrough`}),r=(0,U.jsx)(`h2`,{children:`This walkthrough couldn’t load`}),i=(0,U.jsx)(`p`,{children:`The recorded scenes did not come through. Check your connection and try again.`}),t[5]=e,t[6]=r,t[7]=i):(e=t[5],r=t[6],i=t[7]);let a;t[8]===n.retryCorpus?a=t[9]:(a=(0,U.jsx)(`button`,{type:`button`,className:`tourx-welcome-start`,onClick:n.retryCorpus,children:`Retry`}),t[8]=n.retryCorpus,t[9]=a);let o;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,U.jsx)(`button`,{type:`button`,className:`tourx-welcome-skip`,onClick:ni,children:`Back to home`}),t[10]=o):o=t[10];let s;return t[11]===a?s=t[12]:(s=(0,U.jsx)(`div`,{className:`tourx tourx-intro`,"aria-live":`polite`,children:(0,U.jsxs)(`div`,{className:`tourx-welcome`,role:`alert`,children:[e,r,i,(0,U.jsxs)(`div`,{className:`tourx-welcome-actions`,children:[a,o]})]})}),t[11]=a,t[12]=s),s}if(!n.started){let e,r;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`span`,{className:`tourx-welcome-kicker`,children:`Walkthrough`}),r=(0,U.jsx)(`h2`,{id:`tourx-welcome-title`,children:`See Mavéa in action`}),t[13]=e,t[14]=r):(e=t[13],r=t[14]);let a=n.total===1?`scene plays`:`scenes play`,o;t[15]!==n.total||t[16]!==a?(o=(0,U.jsxs)(`p`,{children:[n.total,` short `,a,` automatically. Pause, skip, or move at your own pace.`]}),t[15]=n.total,t[16]=a,t[17]=o):o=t[17];let s;t[18]===n.start?s=t[19]:(s=(0,U.jsx)(`button`,{type:`button`,className:`tourx-welcome-start`,onClick:n.start,children:`Start the tour`}),t[18]=n.start,t[19]=s);let c;t[20]===n.skip?c=t[21]:(c=(0,U.jsx)(`button`,{type:`button`,className:`tourx-welcome-skip`,onClick:n.skip,children:`Skip tour`}),t[20]=n.skip,t[21]=c);let l;t[22]!==c||t[23]!==s?(l=(0,U.jsxs)(`div`,{className:`tourx-welcome-actions`,children:[s,c]}),t[22]=c,t[23]=s,t[24]=l):l=t[24];let u;return t[25]!==l||t[26]!==o?(u=(0,U.jsx)(`div`,{className:`tourx tourx-intro`,"aria-live":`polite`,children:(0,U.jsxs)(`div`,{ref:i,className:`tourx-welcome`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tourx-welcome-title`,children:[e,r,o,l]})}),t[25]=l,t[26]=o,t[27]=u):u=t[27],u}let u=s===`ask`||!!r&&r.top+r.height/2>window.innerHeight*.58,d;t[28]===r?d=t[29]:(d=r&&(0,U.jsx)(`div`,{className:`tourx-ring`,style:{top:r.top-8,left:r.left-8,width:r.width+16,height:r.height+16}}),t[28]=r,t[29]=d);let f=`tourx-panel`+(n.solo?` is-solo`:``)+(u?` is-top`:``),p=n.solo?`Mini-demo controls`:`Walkthrough controls`,m=`head-`+n.index,h=n.solo?`Mini demo`:`${n.index+1} / ${n.total}`,g;t[30]===h?g=t[31]:(g=(0,U.jsx)(`span`,{className:`tourx-count`,children:h}),t[30]=h,t[31]=g);let _=n.chapter?.title,v;t[32]===_?v=t[33]:(v=(0,U.jsx)(`span`,{className:`tourx-title`,children:_}),t[32]=_,t[33]=v);let y;t[34]!==g||t[35]!==v||t[36]!==m?(y=(0,U.jsxs)(`div`,{className:`tourx-head`,children:[g,v]},m),t[34]=g,t[35]=v,t[36]=m,t[37]=y):y=t[37];let b=`coach-`+n.index,x;t[38]!==n.coach||t[39]!==b?(x=(0,U.jsx)(`p`,{className:`tourx-coach`,children:n.coach},b),t[38]=n.coach,t[39]=b,t[40]=x):x=t[40];let S;t[41]!==n.index||t[42]!==n.prev||t[43]!==n.solo?(S=!n.solo&&(0,U.jsx)(`button`,{type:`button`,className:`tourx-btn`,onClick:n.prev,disabled:n.index===0,"aria-label":`Previous chapter`,children:(0,U.jsx)(L.chevL,{className:`tourx-ic`})}),t[41]=n.index,t[42]=n.prev,t[43]=n.solo,t[44]=S):S=t[44];let C=n.playing?`Pause autoplay`:`Turn on autoplay`,w;t[45]===n.playing?w=t[46]:(w=n.playing?(0,U.jsx)(L.pause,{className:`tourx-ic`}):(0,U.jsx)(L.play,{className:`tourx-ic`}),t[45]=n.playing,t[46]=w);let T=n.playing?`Pause`:`Autoplay`,E;t[47]===T?E=t[48]:(E=(0,U.jsx)(`span`,{children:T}),t[47]=T,t[48]=E);let D;t[49]!==n.toggle||t[50]!==C||t[51]!==w||t[52]!==E?(D=(0,U.jsxs)(`button`,{type:`button`,className:`tourx-btn tourx-play tourx-auto`,onClick:n.toggle,"aria-label":C,children:[w,E]}),t[49]=n.toggle,t[50]=C,t[51]=w,t[52]=E,t[53]=D):D=t[53];let O=n.muted?`Turn narration on`:`Mute narration`,k=n.muted?`Turn narration on`:`Mute narration`,A;t[54]===n.muted?A=t[55]:(A=n.muted?(0,U.jsx)(L.speakerOff,{className:`tourx-ic`}):(0,U.jsx)(L.speaker,{className:`tourx-ic`}),t[54]=n.muted,t[55]=A);let j;t[56]!==n.muted||t[57]!==n.toggleMute||t[58]!==O||t[59]!==k||t[60]!==A?(j=(0,U.jsx)(`button`,{type:`button`,className:`tourx-btn tourx-mute`,onClick:n.toggleMute,"aria-label":O,"aria-pressed":n.muted,title:k,children:A}),t[56]=n.muted,t[57]=n.toggleMute,t[58]=O,t[59]=k,t[60]=A,t[61]=j):j=t[61];let M;t[62]===n?M=t[63]:(M=!n.solo&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{type:`button`,className:`tourx-btn`,onClick:n.next,"aria-label":`Next chapter`,children:(0,U.jsx)(L.chevR,{className:`tourx-ic`})}),(0,U.jsx)(`div`,{className:`tourx-dots`,role:`tablist`,"aria-label":`Chapters`,children:Array.from({length:n.total},(e,t)=>(0,U.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":t===n.index,"aria-label":`Chapter ${t+1}`,className:`tourx-dot`+(t===n.index?` is-active`:``),onClick:()=>n.jumpTo(t)},t))})]}),t[62]=n,t[63]=M);let ee=n.solo?`Back to demos`:`Skip`,N;t[64]!==n.skip||t[65]!==ee?(N=(0,U.jsx)(`button`,{type:`button`,className:`tourx-skip`,onClick:n.skip,children:ee}),t[64]=n.skip,t[65]=ee,t[66]=N):N=t[66];let P;t[67]!==S||t[68]!==D||t[69]!==j||t[70]!==M||t[71]!==N?(P=(0,U.jsxs)(`div`,{className:`tourx-controls`,children:[S,D,j,M,N]}),t[67]=S,t[68]=D,t[69]=j,t[70]=M,t[71]=N,t[72]=P):P=t[72];let F;t[73]!==y||t[74]!==x||t[75]!==P||t[76]!==f||t[77]!==p?(F=(0,U.jsxs)(`div`,{className:f,role:`group`,"aria-label":p,children:[y,x,P]}),t[73]=y,t[74]=x,t[75]=P,t[76]=f,t[77]=p,t[78]=F):F=t[78];let I;return t[79]!==F||t[80]!==d?(I=(0,U.jsxs)(`div`,{className:`tourx`,"aria-live":`polite`,children:[d,F]}),t[79]=F,t[80]=d,t[81]=I):I=t[81],I}function ni(){window.location.hash=`#/`}function ri(){delete document.body.dataset.tourChapter}function ii({onStart:e,onReplay:t,onPlayExtra:n,hasStoredSession:r=!1}){let i=(0,H.useRef)(null);return ue(i),(0,U.jsx)(`div`,{ref:i,className:`tour-end`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tour-end-title`,children:(0,U.jsxs)(`section`,{className:`tour-end-card`,children:[(0,U.jsxs)(`header`,{className:`tour-end-intro`,children:[(0,U.jsx)(`div`,{className:`tour-end-mascot`,"aria-hidden":`true`,children:(0,U.jsx)(fe,{state:`idle`,emotion:`neutral`,gaze:`center`})}),(0,U.jsx)(`h2`,{id:`tour-end-title`,className:`tour-end-title tour-end-line`,children:`That's Mavéa.`}),(0,U.jsx)(`p`,{className:`tour-end-tagline tour-end-line`,children:`Talk to AI. See what it means.`}),(0,U.jsx)(`p`,{className:`tour-end-copy tour-end-line`,children:`Try it now, or open any scripted mini-demo below to see that feature operate on the real interface.`}),(0,U.jsxs)(`div`,{className:`tour-end-actions tour-end-line`,children:[(0,U.jsx)(`button`,{type:`button`,className:`tour-end-start`,onClick:e,children:r?`Back to your session`:`Start Mavéa`}),(0,U.jsx)(`button`,{type:`button`,className:`tour-end-replay`,onClick:t,children:`Replay the tour`})]})]}),(0,U.jsxs)(`div`,{className:`tour-end-extras`,children:[(0,U.jsx)(`h3`,{children:`More to explore`}),(0,U.jsx)(`div`,{className:`tour-end-grid`,children:Dr.map(e=>(0,U.jsxs)(`button`,{type:`button`,className:`tour-end-extra`,onClick:()=>n(e.id),"aria-label":`Play scripted mini-demo: ${e.title}`,children:[(0,U.jsx)(`span`,{className:`tour-end-glyph`,"aria-hidden":`true`,children:e.glyph}),(0,U.jsxs)(`span`,{className:`tour-end-extra-copy`,children:[(0,U.jsx)(`strong`,{children:e.title}),(0,U.jsx)(`small`,{children:e.hook})]})]},e.id))})]})]})})}var ai=new Map([{persona:`cfo`,steps:[{ask:`Run my quarterly review: ARR grew from $12.4M to $15.1M, churn ticked up from 2.1% to 2.8%, and regions came in at NA $8.2M, EMEA $4.6M, APAC $2.3M.`,bakeAsk:`Run my quarterly review: ARR grew from $12.4M to $15.1M, churn ticked up from 2.1% to 2.8%, and regions came in at NA $8.2M, EMEA $4.6M, APAC $2.3M. Build the full picture, including growth, the churn drift, and how the regions stack up.`,expect:{minBlocks:4,suggests:!0}},{ask:`Walk me through the bridge: new business added $1.9M, expansion $1.3M, and churn gave back $0.5M.`,beats:[{kind:`pin`,atMs:900}],note:`Renata pins the bridge. The next question uses that context.`,expect:{minBlocks:2,suggests:!0}},{ask:`Forecast for next quarter`,bakeAsk:`Forecast for next quarter: if churn keeps drifting at this pace, where does ARR land? Model it from the numbers we established.`,viaChip:!0,expect:{minBlocks:2}},{beats:[{kind:`export`,atMs:500,format:`presentation`}],note:`One tap: the whole review becomes a board deck.`,holdMs:6500},{beats:[{kind:`dashboard`,atMs:500,settings:!0}],note:`A living dashboard keeps a board like this up to date.`,holdMs:6500},{beats:[{kind:`present`,atMs:500}],note:`…or presents itself, full screen.`,holdMs:6e3}]},{persona:`student`,steps:[{ask:`What does saving $200 a month at 5% become after 10 years?`,bakeAsk:`What does saving $200 a month at 5% interest become after 10 years? Chart it year by year, split what I put in from what the interest earned, and make the monthly amount adjustable.`,beats:[{kind:`bend`,atMs:1100}],note:`Grab the dial. The whole answer updates live.`,expect:{minBlocks:3,bend:!0,suggests:!0}},{ask:`Why does compound interest beat simple interest? It's on my econ exam.`,beats:[{kind:`pen`,atMs:1400}],note:`Mavéa’s Pen marks the exact part Maya is studying.`,expect:{minBlocks:2}},{beats:[{kind:`flashcards`,atMs:600}],note:`Any card can become a flashcard and join her study deck.`,holdMs:6e3}]},{persona:`dev`,steps:[{ask:`Explain how OAuth login works, step by step. I'm adding it to our app.`,beats:[{kind:`focus`,atMs:1200,walk:!0}],note:`Focus mode: one card at a time, everything else dims.`,expect:{minBlocks:3,suggests:!0}},{ask:`Compare session cookies and JWTs for keeping users signed in. Focus on tradeoffs, not dogma.`,bakeAsk:`Compare session cookies and JWTs for keeping users signed in. Show the real tradeoffs side by side, including revocation, statelessness, size, XSS and CSRF exposure, and when each wins.`,beats:[{kind:`pin`,atMs:1e3}],expect:{minBlocks:2}},{beats:[{kind:`palette`,atMs:600}],note:`Press Command K. Every feature is a keystroke away.`,holdMs:5e3},{beats:[{kind:`export`,atMs:500,format:`presentation`}],note:`The whole session becomes a polished presentation.`,holdMs:7500}]},{persona:`traveler`,steps:[{ask:`Plan a long weekend in Lisbon. Three days, first visit, and we love food and views.`,expect:{minBlocks:4,suggests:!0}},{ask:`How do we plan a great day trip to Sintra on Saturday?`,beats:[{kind:`canvas`,atMs:1e3}],note:`The spatial canvas: the whole trip on one board.`,expect:{minBlocks:2}},{beats:[{kind:`export`,atMs:500,format:`document`}],note:`The plan is ready to print for the plane.`,holdMs:7500}]}].map(e=>[e.persona,e]));function oi(e){return ai.get(e)}function si(e){return e.steps.filter(e=>!!e.ask)}var ci=1300,li=900;function ui(e,t){return(e?.spec.blocks??[]).map(e=>e.id).filter(e=>!!e).slice(0,t)}function di(e,t,n,r){switch(e.kind){case`pin`:r(e.atMs,()=>t.pinFirstBlock());break;case`bend`:n?.spec.bend&&r(e.atMs,()=>t.bendIt());break;case`mark`:r(e.atMs,()=>t.setInkArmed(!0)),r(e.atMs+500,()=>t.scriptedMark());break;case`pen`:r(e.atMs,()=>t.drawPenOnFirstBlock());break;case`focus`:r(e.atMs,()=>t.setViewMode(`focus`)),e.walk&&ui(n,4).forEach((n,i)=>r(e.atMs+li+i*ci,()=>t.setSpot(n)));break;case`canvas`:{r(e.atMs,()=>t.setViewMode(`canvas`));let i=ui(n,3);i.forEach((n,i)=>r(e.atMs+li+i*ci,()=>t.setSpot(n))),r(e.atMs+li+i.length*ci,()=>t.setSpot(null));break}case`export`:r(e.atMs,()=>t.openExport()),e.format===`document`&&r(e.atMs+1800,()=>t.exportSetFormat(`document`)),r(e.atMs+3e3,()=>t.exportPickTemplate(1));break;case`dashboard`:r(e.atMs,()=>t.openDashboards()),e.settings&&r(e.atMs+2600,()=>t.dashboardShowSettings());break;case`flashcards`:r(e.atMs,()=>t.openFlashcards());break;case`present`:r(e.atMs,()=>t.setPresenting(!0));break;case`share`:r(e.atMs,()=>t.setShareOpen(!0));break;case`palette`:r(e.atMs,()=>t.setPaletteOpen(!0))}}function J(e){switch(e.kind){case`canvas`:return 6400;case`focus`:return e.walk?7300:1600;case`export`:return e.format===`document`?4800:3800;case`dashboard`:return e.settings?4400:2600;case`mark`:return 2400;case`pen`:return 3200;default:return 1600}}function fi(e){return e?.length?Math.max(...e.map(e=>e.atMs+J(e))):0}i();var pi=Object.assign({"./cfo.generated.json":()=>a(()=>import(`./cfo.generated-j5CXp1Zz.js`),[]),"./dev.generated.json":()=>a(()=>import(`./dev.generated-DYgVxL_4.js`),[]),"./student.generated.json":()=>a(()=>import(`./student.generated-DS_acPaJ.js`),[]),"./traveler.generated.json":()=>a(()=>import(`./traveler.generated-Beun9X7y.js`),[])});async function mi(e){let t=pi[`./${e}.generated.json`];if(!t)return null;try{return(await t()).default??null}catch{return null}}var hi=4500,gi=1e3,_i=6e4;function vi(e,t,n){if(!e[t]?.ask)return null;let r=e.slice(0,t+1).filter(e=>!!e.ask).length-1;return n.frames[r]??null}function yi(e,t,n){let r=e.slice(0,t+1).filter(e=>!!e.ask).length;return n.frames[Math.max(0,r-1)]??null}function bi(e){let{active:t,personaId:n}=e,r=n?oi(n):void 0,i=r?.steps??[],a=i.length,[o,s]=(0,H.useState)(null),[c,l]=(0,H.useState)(`loading`),[u,d]=(0,H.useState)(()=>Math.max(0,Math.min(a-1,e.startStep??0))),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)(!1),v=(0,H.useRef)(g);v.current=g;let[y,b]=(0,H.useState)(!1),[x,S]=(0,H.useState)(0),[C,w]=(0,H.useState)(null),T=(0,H.useRef)(e.ops);T.current=e.ops;let E=(0,H.useRef)(null),D=(0,H.useRef)(0),k=(0,H.useCallback)(()=>{if(!t||!n)return;l(`loading`);let e=++D.current;mi(n).then(t=>{if(e!==D.current)return;let n=r?si(r).length:0,i=!!t&&!!r&&t.frames.length===n;s(i?t:null),l(i?`ready`:`error`)})},[t,n,r]);(0,H.useEffect)(k,[k]);let A=(0,H.useCallback)(()=>{let e=T.current;e.closeAllOverlays(),e.stopRevealWalk(),e.cancelSpeech()},[]);(0,H.useEffect)(()=>{if(!t||!f||y||c!==`ready`||!o||!r)return;let e=r.steps[u];if(!e)return;te(r.persona,u);let n=T.current,i=K(),a=i.after;w(null),E.current=null,A(),n.setMuted(v.current);let s=vi(r.steps,u,o),l=s??yi(r.steps,u,o),d=e.ask?wr(e.ask):null,p=s?Tr({...s,question:d??s.question}):null,m=l?Tr(l):null,h=()=>{let t=e.beats??[];for(let e of t)di(e,n,m,a);if(e.note){let n=t.length?Math.min(...t.map(e=>e.atMs)):0;a(n,()=>w(wr(e.note??``)))}E.current=Date.now()+fi(t)+(e.holdMs??hi)},g=e=>{let t=Date.now(),r=0,i=()=>{if(Date.now()-t>=_i){h();return}if(r=n.isSpeaking()||n.isBusy()?0:r+1,r>=7){h();return}a(250,i)};a(e,i)};if(e.ask&&p){let t=r.steps.slice(0,u+1).filter(e=>!!e.ask).length-1,i=t>0?o.frames[t-1]??null:null,s=!!e.viaChip&&!!i?.spec.suggests?.some(t=>t.label===e.ask),c=d??e.ask,l;s?(a(700,()=>n.pressKeepGoing(e.ask??c)),l=1600):l=Ir(a,n.typeInto,c,400)+360,a(l,()=>Fr(a,()=>n.showFrame(p,c))),g(l+gi)}else!n.hasCanvas()&&m&&n.showFrame(m,m.question,{silent:!0}),a(300,h);return i.cancel},[u,x,t,f,y,c,o,r,A]),(0,H.useEffect)(()=>{if(!t||!f||y||!m||c!==`ready`)return;let e=T.current,n=window.setInterval(()=>{let t=E.current;!t||Date.now()<t||e.isSpeaking()||e.isBusy()||(window.clearInterval(n),u+1>=a?(A(),b(!0)):d(u+1))},250);return()=>window.clearInterval(n)},[u,x,t,f,y,m,a,c,A]),(0,H.useEffect)(()=>()=>A(),[A]);let j=(0,H.useCallback)(()=>{O(),p(!0),h(!0),b(!1)},[]),M=(0,H.useCallback)((e,t)=>{O(),b(!1),t?.keepPlaying||h(!1),d(Math.max(0,Math.min(a-1,e))),S(e=>e+1)},[a]),ee=(0,H.useCallback)(()=>{u+1>=a?(A(),b(!0)):M(u+1,{keepPlaying:!0})},[u,a,M,A]),N=(0,H.useCallback)(()=>M(u-1),[u,M]),P=(0,H.useCallback)(e=>M(e),[M]),F=(0,H.useCallback)(()=>{A(),p(!0),M(0),h(!0)},[M,A]),I=(0,H.useCallback)(()=>{if(O(),!f){j();return}if(y){F();return}h(e=>!e)},[y,F,j,f]),L=(0,H.useCallback)(()=>{O();let e=!v.current;v.current=e,_(e),T.current.setMuted(e),e&&T.current.cancelSpeech()},[]),ne=(0,H.useCallback)(()=>{A(),b(!0)},[A]);return{active:t,started:f,loadState:c,model:o?.model??null,reload:k,index:u,total:a,step:t?i[u]??null:null,note:C,playing:m,muted:g,done:y,start:j,next:ee,prev:N,jumpTo:P,toggle:I,toggleMute:L,replay:F,skip:ne}}function xi(e){return/\p{Extended_Pictographic}/u.test(e)}function Si(){window.location.hash=`#/`}function Ci({driver:e,member:t,onExit:n}){let r=(0,H.useRef)(null),i=e.active&&e.loadState===`ready`&&(!e.started||e.done);if(ue(r,{active:i}),!e.active)return null;let a={"--accent":t.accent};if(e.loadState===`loading`)return(0,U.jsx)(`div`,{className:`demox`,"aria-live":`polite`,children:(0,U.jsxs)(`div`,{className:`demox-load`,style:a,children:[(0,U.jsx)(L.spinner,{className:`demox-spinner`}),`Loading curated replay…`]})});if(e.loadState===`error`)return(0,U.jsx)(`div`,{className:`demox`,"aria-live":`polite`,children:(0,U.jsxs)(`div`,{className:`demox-card`,style:a,role:`alert`,children:[(0,U.jsx)(`p`,{className:`demox-card-title`,children:`This demo couldn’t load`}),(0,U.jsx)(`p`,{className:`demox-card-body`,children:`The curated prerecorded example did not come through. Check your connection and try again.`}),(0,U.jsxs)(`div`,{className:`demox-card-actions`,children:[(0,U.jsx)(`button`,{type:`button`,className:`demox-primary`,onClick:e.reload,children:`Retry`}),(0,U.jsx)(`button`,{type:`button`,className:`demox-ghost`,onClick:Si,children:`Back to home`})]})]})});if(!e.started)return(0,U.jsx)(`div`,{className:`demox demox-intro`,"aria-live":`polite`,children:(0,U.jsxs)(`div`,{ref:r,className:`demox-card demox-start`,style:a,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`demox-start-title`,children:[(0,U.jsx)(`span`,{className:`demox-avatar`+(xi(t.avatar)?` emoji`:``),children:t.avatar}),(0,U.jsx)(`span`,{className:`demox-card-kicker`,children:`Curated prerecorded example`}),(0,U.jsxs)(`p`,{id:`demox-start-title`,className:`demox-card-title`,children:[`Watch: `,t.useCase]}),(0,U.jsx)(`p`,{className:`demox-card-body`,children:`This fictional scenario replays prerecorded, model-generated answers with curated feature choreography. Pause or move between steps at any time.`}),(0,U.jsxs)(`div`,{className:`demox-card-actions`,children:[(0,U.jsx)(`button`,{type:`button`,className:`demox-primary`,onClick:e.start,children:`Start demo`}),(0,U.jsx)(`button`,{type:`button`,className:`demox-ghost`,onClick:Si,children:`Back to home`})]})]})});if(e.done){let i=F.filter(e=>e.id!==t.id);return(0,U.jsx)(`div`,{className:`demox demox-intro`,"aria-live":`polite`,children:(0,U.jsxs)(`div`,{ref:r,className:`demox-card demox-end`,style:a,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`demox-end-title`,children:[(0,U.jsx)(`span`,{className:`demox-avatar`+(xi(t.avatar)?` emoji`:``),children:t.avatar}),(0,U.jsx)(`p`,{id:`demox-end-title`,className:`demox-card-title`,children:`End of curated replay`}),(0,U.jsx)(`p`,{className:`demox-card-body`,children:`These model-generated answers were prerecorded, then replayed with curated feature choreography. The scenario is illustrative, not a live result or customer testimonial. Try your own question with your selected provider.`}),(0,U.jsxs)(`div`,{className:`demox-card-actions`,children:[(0,U.jsx)(`button`,{type:`button`,className:`demox-primary`,onClick:n,children:`Try it yourself`}),(0,U.jsx)(`button`,{type:`button`,className:`demox-ghost`,onClick:e.replay,children:`Replay`})]}),(0,U.jsx)(`div`,{className:`demox-others`,role:`group`,"aria-label":`More curated replays`,children:i.map(e=>(0,U.jsxs)(`button`,{type:`button`,className:`demox-other`,style:{"--accent":e.accent},onClick:()=>m(e.id),title:`${e.name} · ${e.role}`,children:[(0,U.jsx)(`span`,{className:`demox-other-avatar`+(xi(e.avatar)?` emoji`:``),children:e.avatar}),e.useCase]},e.id))})]})})}return(0,U.jsxs)(`div`,{className:`demox`,"aria-live":`polite`,children:[(0,U.jsxs)(`div`,{className:`demox-banner`,style:a,children:[(0,U.jsx)(`span`,{className:`demox-avatar`+(xi(t.avatar)?` emoji`:``),children:t.avatar}),(0,U.jsxs)(`span`,{className:`demox-who`,children:[(0,U.jsx)(`span`,{className:`demox-name`,children:t.useCase}),(0,U.jsxs)(`span`,{className:`demox-role`,children:[t.name,` · `,t.role]})]}),(0,U.jsx)(`span`,{className:`demox-badge`,children:`Curated replay`})]}),e.note&&(0,U.jsx)(`div`,{className:`demox-note`,style:a,children:e.note},e.note),(0,U.jsxs)(`div`,{className:`demox-panel`,style:a,role:`group`,"aria-label":`Demo controls`,children:[(0,U.jsx)(`button`,{type:`button`,className:`demox-btn`,onClick:e.prev,disabled:e.index===0,"aria-label":`Previous step`,children:(0,U.jsx)(L.chevL,{className:`demox-ic`})}),(0,U.jsx)(`button`,{type:`button`,className:`demox-btn demox-play`,onClick:e.toggle,"aria-label":e.playing?`Pause autoplay`:`Turn on autoplay`,children:e.playing?(0,U.jsx)(L.pause,{className:`demox-ic`}):(0,U.jsx)(L.play,{className:`demox-ic`})}),(0,U.jsx)(`button`,{type:`button`,className:`demox-btn demox-mute`,onClick:e.toggleMute,"aria-label":e.muted?`Turn narration on`:`Mute narration`,"aria-pressed":e.muted,title:e.muted?`Turn narration on`:`Mute narration`,children:e.muted?(0,U.jsx)(L.speakerOff,{className:`demox-ic`}):(0,U.jsx)(L.speaker,{className:`demox-ic`})}),(0,U.jsx)(`button`,{type:`button`,className:`demox-btn`,onClick:e.next,"aria-label":`Next step`,children:(0,U.jsx)(L.chevR,{className:`demox-ic`})}),(0,U.jsx)(`div`,{className:`demox-dots`,role:`tablist`,"aria-label":`Steps`,children:Array.from({length:e.total},(t,n)=>(0,U.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===e.index,"aria-label":`Step ${n+1}`,className:`demox-dot`+(n===e.index?` is-active`:``),onClick:()=>e.jumpTo(n)},n))}),(0,U.jsxs)(`button`,{type:`button`,className:`demox-skip`,onClick:n,"aria-label":`Exit demo, try it yourself`,children:[(0,U.jsx)(`span`,{className:`demox-skip-full`,children:`Exit, try it yourself`}),(0,U.jsx)(`span`,{className:`demox-skip-short`,"aria-hidden":`true`,children:`Exit`})]})]})]})}i();var wi=[`nasa-cfd`,`fomc`,`weather`,`cars`,`react-readme`],Ti=null;async function Ei(){return Ti||(Ti=[...(await a(()=>import(`./prism.generated-BQkO5r6r.js`),[])).default.docs].sort((e,t)=>{let n=wi.indexOf(e.id),r=wi.indexOf(t.id);return(n<0?99:n)-(r<0?99:r)}).map(e=>({id:e.id,type:e.type,name:e.name,doc:{name:e.name,mime:e.mime,data:e.data,size:e.size},spec:{...e.spec,claims:e.spec.claims.map(e=>({...e,kind:St(e.kind)}))},proposed:e.proposed})),Ti)}var Di=`How does $10,000 grow at 7% over 30 years?`;function Oi(){let e=Cr(`money`)?.frames[0]?.spec.blocks??[],t=Cr(`monthly`)?.frames[0]?.spec.blocks??[],n=[],r=(e,t,r=1)=>{for(let i of t)for(let t of e)t.type===i&&t.id&&!n.includes(t)&&r-->0&&n.push(t)};return r(e,[`chart`]),r(e,[`stacked`,`stack`]),r(t,[`chart`]),r(t,[`kpi`,`stack`,`stacked`]),r(e,[`breakdown`]),n}function ki(){let e=Et().find(e=>e.question===Di);if(e)return e.id;let t=Oi();if(t.length===0)return null;let n=kt({title:`Investment growth · $10k at 7%`,question:Di,topic:`money`});return n.thesis={text:`Your initial $10,000 grows by more than 7.6× through the power of compounding interest.`,saidAt:n.createdAt},n.widgets=t.map(e=>Tt(e,`tour`)),n.cadence={data:`hourly`,ai:`daily`},n.nextDataAt=wt(n.createdAt,Dt[n.cadence.data]),n.nextAiAt=wt(n.createdAt,Ct[n.cadence.ai]),Ot(n),n.id}function Y(e,t){let n=e.length,r=new ArrayBuffer(44+n*2),i=new DataView(r);function a(e,t){for(let n=0;n<t.length;n++)i.setUint8(e+n,t.charCodeAt(n))}a(0,`RIFF`),i.setUint32(4,36+n*2,!0),a(8,`WAVE`),a(12,`fmt `),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,t,!0),i.setUint32(28,t*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),a(36,`data`),i.setUint32(40,n*2,!0);let o=44;for(let t=0;t<n;t++){let n=Math.max(-1,Math.min(1,e[t]));i.setInt16(o,n<0?n*32768:n*32767,!0),o+=2}return r}i();var Ai=12,ji=2813,Mi=3;function Ni(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Float32Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Pi(e){let t=e&&typeof e==`object`&&`name`in e?String(e.name):void 0;return t===`NotAllowedError`||t===`SecurityError`?`not-allowed`:`audio`}function Fi(e){return e?45e3:25e3}var Ii=class t{mode=`vad`;capabilities;vad=null;vadLoading=!1;vadFailed=!1;phase=`idle`;muted=!1;wantRunning=!1;continuous=!1;disposed=!1;sessionId=0;transcriptionAbort=null;transcriptionChain=Promise.resolve();queuedTranscriptions=0;preRollFrames=[];utteranceFrames=[];maveaSpeaking=!1;echoTailUntil=0;onBargeIn;utteranceIsEcho=!1;bargeInTimer=null;static ECHO_TAIL_MS=600;static WHISPER_RETRY_MS=1e4;whisperOk=null;whisperRetryAt=0;resultSubs=new Set;stateSubs=new Set;constructor(){let e=typeof navigator<`u`&&typeof navigator.mediaDevices?.getUserMedia==`function`;this.capabilities={stt:e,tts:!1,canUseRealVoice:e}}start(e){if(!this.muted){if(e?.continuous!==void 0&&(this.continuous=e.continuous),this.wantRunning||(this.sessionId+=1),this.wantRunning=!0,this.vadFailed){this.emitState({phase:`idle`,error:`unsupported`});return}this.vad?this.startVad():this.loadVad()}}stop(){this.wantRunning=!1,this.continuous=!1,this.sessionId+=1,this.transcriptionAbort?.abort(),this.transcriptionAbort=null,this.pauseVad(),this.clearBargeInTimer(),this.preRollFrames=[],this.utteranceFrames=[],this.phase!==`idle`&&this.emitState({phase:`idle`})}forceStop(){if(this.phase===`transcribing`){this.continuous=!1,this.wantRunning=!1,this.pauseVad();return}let e=this.continuous;this.wantRunning=e,this.pauseVad(),this.clearBargeInTimer();let t=Ni([...this.utteranceFrames,...this.preRollFrames]);this.preRollFrames=[],this.utteranceFrames=[],this.utteranceIsEcho=!1,t.length>0?(this.emitState({phase:`transcribing`}),this.enqueueTranscription(t,this.sessionId,e)):(this.emitState({phase:`idle`}),e&&this.startVad())}speak(e){return Promise.resolve()}cancel(){this.stop()}setMuted(e){this.muted=e,e&&this.stop()}setMaveaSpeaking(e){this.maveaSpeaking&&!e&&(this.echoTailUntil=Date.now()+t.ECHO_TAIL_MS),this.maveaSpeaking=e}setSoundEnabled(e){}onResult(e){return this.resultSubs.add(e),()=>this.resultSubs.delete(e)}onStateChange(e){return this.stateSubs.add(e),()=>this.stateSubs.delete(e)}dispose(){this.disposed=!0,this.wantRunning=!1,this.sessionId+=1,this.transcriptionAbort?.abort(),this.transcriptionAbort=null,this.clearBargeInTimer(),this.vad&&=(this.vad.destroy().catch(()=>{}),null),this.resultSubs.clear(),this.stateSubs.clear()}async loadVad(){if(!this.vadLoading){this.vadLoading=!0;try{let{MicVAD:t}=await a(async()=>{let{MicVAD:t}=await import(`./dist-kNHRtoqd.js`).then(t=>e(t.default,1));return{MicVAD:t}},__vite__mapDeps([0,1,2]));if(this.vad=await t.new({model:`v5`,startOnLoad:!1,baseAssetPath:`/`,onnxWASMBasePath:`/`,positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,minSpeechMs:280,preSpeechPadMs:500,redemptionMs:1600,onFrameProcessed:(e,t)=>this.captureFrame(t),onSpeechStart:()=>this.handleSpeechStart(),onSpeechRealStart:()=>this.handleSpeechRealStart(),onSpeechEnd:e=>void this.handleSpeechEnd(e),onVADMisfire:()=>this.handleMisfire()}),this.disposed){this.vad.destroy().catch(()=>{}),this.vad=null;return}this.vadLoading=!1,this.wantRunning&&this.startVad()}catch(e){console.warn(`[VadVoice] Local Silero VAD failed to load`,e),this.vadLoading=!1,this.vadFailed=!0,this.wantRunning&&this.emitState({phase:`idle`,error:`unsupported`})}}}clearBargeInTimer(){this.bargeInTimer!==null&&(clearTimeout(this.bargeInTimer),this.bargeInTimer=null)}startVad(){this.vad&&Promise.resolve(this.vad.start()).catch(e=>{!this.disposed&&this.wantRunning&&(this.wantRunning=!1,this.emitState({phase:`idle`,error:Pi(e)}))})}pauseVad(){this.vad&&Promise.resolve(this.vad.pause()).catch(()=>{})}captureFrame(e){let t=e.slice();if(this.phase===`listening`&&!this.utteranceIsEcho){this.utteranceFrames.length<ji&&this.utteranceFrames.push(t);return}this.preRollFrames.push(t),this.preRollFrames.length>Ai&&this.preRollFrames.shift()}handleSpeechStart(){this.muted||(this.utteranceIsEcho=Date.now()<this.echoTailUntil,this.utteranceFrames=this.preRollFrames,this.preRollFrames=[],!this.utteranceIsEcho&&this.emitState({phase:`listening`}))}handleSpeechRealStart(){this.muted||(this.utteranceIsEcho&&!this.maveaSpeaking&&(this.utteranceIsEcho=!1,this.utteranceFrames=[...this.utteranceFrames,...this.preRollFrames],this.preRollFrames=[],this.emitState({phase:`listening`})),!this.utteranceIsEcho&&this.maveaSpeaking&&this.onBargeIn?.())}handleMisfire(){this.clearBargeInTimer(),this.utteranceIsEcho=!1,this.utteranceFrames=[],this.continuous||(this.wantRunning=!1,this.pauseVad()),this.phase!==`idle`&&this.emitState({phase:`idle`})}handleSpeechEnd(e){if(this.clearBargeInTimer(),this.utteranceIsEcho){this.utteranceIsEcho=!1,this.utteranceFrames=[],this.emitState({phase:`idle`});return}this.utteranceFrames=[],this.continuous||(this.wantRunning=!1,this.pauseVad()),this.emitState({phase:`transcribing`}),this.enqueueTranscription(e,this.sessionId)}enqueueTranscription(e,t,n=!1){if(this.queuedTranscriptions>=Mi){this.emitState({phase:`idle`,error:`audio`}),n&&this.wantRunning&&this.startVad();return}this.queuedTranscriptions+=1,this.transcriptionChain=this.transcriptionChain.catch(()=>{}).then(async()=>{try{if(this.disposed||t!==this.sessionId)return;let r=new AbortController;this.transcriptionAbort=r;let i=await this.transcribeWhisper(e,r.signal);if(this.transcriptionAbort===r&&(this.transcriptionAbort=null),this.disposed||r.signal.aborted||t!==this.sessionId)return;let a=i.text.trim();if(a){let e=i.confidence!==void 0&&i.confidence<.7||(i.noSpeechProbability??0)>=.6;this.emitState({phase:`heard`,transcript:a}),this.emitResult({transcript:a,confidence:i.confidence,noSpeechProbability:i.noSpeechProbability,lowConfidence:e})}else{this.emitState({phase:`idle`,error:i.error??`no-speech`}),n&&this.wantRunning&&this.startVad();return}this.emitState({phase:`idle`}),n&&this.wantRunning&&this.startVad()}finally{--this.queuedTranscriptions}})}async transcribeWhisper(e,t){let n=await this.transcribeWhisperDetailed(e,t);return t?n:n.text}async transcribeWhisperDetailed(e,n){if(this.whisperOk===!1&&Date.now()<this.whisperRetryAt)return{text:``,error:`transcription`};try{let t=Y(e,16e3),r=new FormData;r.append(`file`,new Blob([t],{type:`audio/wav`}),`speech.wav`),r.append(`language`,`en`),r.append(`response_format`,`verbose_json`);let i=Fi(this.whisperOk===!0),a=AbortSignal.timeout(i),o=n?AbortSignal.any([n,a]):a,s=await fetch(`/stt/inference`,{method:`POST`,body:r,signal:o});if(s.ok){let e=await s.json(),t=e.text?.trim()??``;if(this.whisperOk=!0,this.whisperRetryAt=0,t){let n=[...e.words??[],...(e.segments??[]).flatMap(e=>e.words??[])].map(e=>e.probability).filter(e=>Number.isFinite(e)),r=(e.segments??[]).map(e=>e.avg_logprob).filter(e=>Number.isFinite(e)),i=n.length>0?n.reduce((e,t)=>e+t,0)/n.length:r.length>0?Math.exp(r.reduce((e,t)=>e+t,0)/r.length):void 0,a=(e.segments??[]).map(e=>e.no_speech_prob).filter(e=>Number.isFinite(e));return{text:t,confidence:i,noSpeechProbability:a.length>0?Math.max(...a):void 0}}return{text:``,error:`no-speech`}}}catch(e){if(e instanceof DOMException&&(e.name===`TimeoutError`||e.name===`AbortError`))return{text:``,error:`transcription`}}return this.whisperOk!==!0&&(this.whisperOk=!1,this.whisperRetryAt=Date.now()+t.WHISPER_RETRY_MS),{text:``,error:`transcription`}}emitResult(e){this.resultSubs.forEach(t=>t(e))}emitState(e){this.phase=e.phase,this.stateSubs.forEach(t=>t(e))}};function Li(){return new Ii}function Ri(e={}){let t=(0,H.useRef)(e.onResult),n=(0,H.useRef)(e.onStateChange),r=(0,H.useRef)(e.onBargeIn);t.current=e.onResult,n.current=e.onStateChange,r.current=e.onBargeIn;let i=(0,H.useMemo)(()=>Li(),[]);return(0,H.useEffect)(()=>{let e=i.onResult(e=>t.current?.(e)),a=i.onStateChange(e=>n.current?.(e));return`onBargeIn`in i&&(i.onBargeIn=()=>r.current?.()),()=>{e(),a(),i.dispose()}},[i]),(0,H.useMemo)(()=>({mode:i.mode,capabilities:i.capabilities,start:e=>i.start(e),stop:()=>i.stop(),speak:e=>i.speak(e),cancel:()=>i.cancel(),setMuted:e=>i.setMuted(e),setSoundEnabled:e=>i.setSoundEnabled(e),setMaveaSpeaking:e=>i.setMaveaSpeaking?.(e),forceStop:()=>i.forceStop?.()}),[i])}var zi=1100,Bi=15e3,Vi=1e4,Hi=12e3,Ui=8e3,Wi=3500,Gi=2500,Ki=3e3;function qi(e){return e*2+12e3}function Ji(e){return new Promise(t=>setTimeout(t,e))}async function Yi(e,t=Bi){return await $e(e.started,t)??!1}async function Xi(e,t,n=zi){await Promise.all([$e(e.finished,qi(t)),Ji(n)])}function Zi(e){let t=e.speaking??xe,n=e.subscribe??De;return new Promise(r=>{let i=!1,a=!1,o=()=>{a||(a=!0,c(),clearTimeout(l),r())},s=()=>{i&&!t()&&o()},c=n(s);setTimeout(()=>{i=!0,s()},e.floorMs);let l=setTimeout(o,e.capMs)})}async function Qi(e){try{await $e((async()=>{await et(),await et(),await $e(e.loadFams(),Ui),e.settle&&await e.settle(),e.wantVoice&&e.firstLine&&await $e(e.firstLine.started,Vi)})(),Hi)}catch{}}var $i=`mavea-always-on`;function ea(e,t,n=!1,r=`neutral`,i=!1){if(t)return{state:`listening`,emotion:`neutral`,gaze:`center`};if(n)return i?{state:`showing`,emotion:`surprised`,gaze:`center`}:{state:`speaking`,emotion:`surprised`,gaze:`center`};switch(e){case`thinking`:return{state:`loading`,emotion:`neutral`,gaze:`center`};case`speaking`:return i?{state:`showing`,emotion:r,gaze:`center`}:{state:`speaking`,emotion:r,gaze:`center`};case`showing`:return{state:`showing`,emotion:r,gaze:`right`};default:return{state:`idle`,emotion:r,gaze:`center`}}}var ta=new Set([`no`,`caution`,`avoid`,`risk`,`wait`]),na=new Set([`yes`,`go`,`recommended`,`good`]);function ra(e,t){let n=e.props[t];return typeof n==`string`?n.toLowerCase():void 0}function ia(e){let t=e?.blocks;if(!t?.length)return`neutral`;let n=!1,r=e?.awaiting===!0;for(let e of t){let t=ra(e,`tone`);(t===`warn`||t===`neg`)&&(n=!0),t===`pos`&&(r=!0);let i=ra(e,`stance`);i&&ta.has(i)&&(n=!0),i&&na.has(i)&&(r=!0),e.type===`insight`&&e.props.conf===`unverified`&&(n=!0)}return n?`concerned`:r?`warm`:`neutral`}function aa(e){switch(e){case`concerned`:return`concerned`;case`warm`:return`warm`;default:return`neutral`}}function oa(e){return aa(ia(e))}function sa(e){let t=e?.blocks;return!t?.length||ia(e)!==`warm`?!1:t.some(e=>{let t=ra(e,`stance`);return t!==void 0&&na.has(t)})}var ca={clipShared:[`Nice — that one's worth sharing.`,`Off it goes.`,`Clipped and ready to share.`]};Object.keys(ca);function la(e,t,n){let r=ca[e];if(r.length===0)return``;let i=Math.abs(Math.trunc(t))%r.length;return r.length>1&&r[i]===n&&(i=(i+1)%r.length),r[i]}function ua(){return{lastAt:0,lastTurn:-1/0}}function da(e,t){return!(e.lastAt!==0&&t.now-e.lastAt<9e4||t.turnCount-e.lastTurn<3)}function fa(e,t){return{lastAt:t.now,lastTurn:t.turnCount}}var pa=1100,ma=6e3,ha=150,ga=950,_a=350,va=8;function ya(e){let{muted:t,turnCount:n,gates:r}=e,i=(0,H.useRef)(e.speak),a=(0,H.useRef)(e.cancelSpeak),o=(0,H.useRef)(e.isSpeaking);i.current=e.speak,a.current=e.cancelSpeak,o.current=e.isSpeaking;let[s,c]=(0,H.useState)([]),[l,u]=(0,H.useState)(!1),[d,f]=(0,H.useState)(null),[p,m]=(0,H.useState)(0),h=(0,H.useRef)(ua()),g=(0,H.useRef)(void 0),_=(0,H.useRef)(null),v=(0,H.useRef)(null),y=(0,H.useCallback)(()=>{_.current&&=(clearTimeout(_.current),null),v.current&&=(clearTimeout(v.current),null)},[]),b=(0,H.useCallback)(e=>{c(t=>t.length>=va||t[t.length-1]===e?t:[...t,e])},[]),x=(0,H.useCallback)(()=>{y(),u(!1),v.current=setTimeout(()=>{v.current=null,f(null)},ga)},[y]),S=(0,H.useCallback)(e=>{let t=()=>{let n=Date.now()-e;n>=pa&&!o.current()||n>=ma?x():_.current=setTimeout(t,ha)};_.current=setTimeout(t,pa)},[x]),C=r.atRest&&!r.busy&&!r.listening&&!r.introHold&&r.hasCanvas&&!r.modalOpen;(0,H.useEffect)(()=>{if(l||d!==null||!C||s.length===0)return;if(o.current()){let e=setTimeout(()=>m(e=>e+1),_a);return()=>clearTimeout(e)}let e=s[0],r=Date.now();if(!da(h.current,{type:e,now:r,turnCount:n})){c(e=>e.slice(1));return}h.current=fa(h.current,{type:e,now:r,turnCount:n});let a=la(e,r,g.current);g.current=a,c(e=>e.slice(1)),f(a),u(!0),!t&&a&&i.current(a),S(r)},[l,d,C,s,n,t,S,p]),(0,H.useEffect)(()=>{if(!l)return;let e=r.busy||!r.atRest,t=r.listening||r.modalOpen;!e&&!t||(y(),u(!1),f(null),c([]),g.current=void 0,t&&!e&&a.current())},[l,r.busy,r.atRest,r.listening,r.modalOpen,y]);let w=(0,H.useCallback)(()=>{y(),c([]),u(!1),f(null),h.current=ua(),g.current=void 0},[y]);return(0,H.useEffect)(()=>()=>y(),[y]),{interjecting:l,line:d,enqueue:b,reset:w}}function ba(e){let t=(0,q.c)(36),{chapters:n,currentIndex:r,onJump:i,onClose:a}=e,o=(0,H.useRef)(null),s;if(t[0]===a?s=t[1]:(s={onEscape:a},t[0]=a,t[1]=s),ue(o,s),n.length===0)return null;let c;t[2]===n?c=t[3]:(c=ft(n),t[2]=n,t[3]=c);let l=c,u;t[4]!==n||t[5]!==r?(u=n.find(e=>e.moments.some(e=>e.frameIndex===r))?.color,t[4]=n,t[5]=r,t[6]=u):u=t[6];let d=u,f;t[7]===a?f=t[8]:(f=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a())},t[7]=a,t[8]=f);let p;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,U.jsx)(`h2`,{className:`ovw-title`,children:`Your conversation`}),t[9]=p):p=t[9];let m=n.length===1?`chapter`:`chapters`,h=l===1?`moment`:`moments`,g;t[10]!==n.length||t[11]!==m||t[12]!==h||t[13]!==l?(g=(0,U.jsxs)(`header`,{className:`ovw-head`,children:[p,(0,U.jsxs)(`p`,{className:`ovw-sub`,children:[n.length,` `,m,` · `,l,` `,h,` — tap anywhere to dive back in`]})]}),t[10]=n.length,t[11]=m,t[12]=h,t[13]=l,t[14]=g):g=t[14];let _;if(t[15]!==n||t[16]!==r||t[17]!==a||t[18]!==i){let e;t[20]!==r||t[21]!==a||t[22]!==i?(e=e=>(0,U.jsxs)(`section`,{className:`ovw-card`,style:{"--card-c":e.color},children:[(0,U.jsxs)(`div`,{className:`ovw-card-head`,children:[(0,U.jsx)(`span`,{className:`ovw-card-dot`}),(0,U.jsx)(`h3`,{className:`ovw-card-title`,children:e.title}),(0,U.jsx)(`span`,{className:`ovw-card-count`,children:e.moments.length})]}),(0,U.jsx)(`ul`,{className:`ovw-moments`,children:e.moments.map(e=>{let t=e.frameIndex===r,n=L[e.icon]||L.mic;return(0,U.jsxs)(`li`,{children:[(0,U.jsxs)(`button`,{type:`button`,className:`ovw-moment`+(t?` is-current`:``),onClick:()=>{i(e.frameIndex),a()},"aria-current":t?`true`:void 0,children:[(0,U.jsx)(n,{}),(0,U.jsx)(`span`,{className:`ovw-moment-q`,children:e.question||`Moment`})]}),e.elements.length>0&&(0,U.jsx)(`ul`,{className:`ovw-els`,children:e.elements.map(t=>{let n=t.icon&&L[t.icon]||L.spark;return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,className:`ovw-el`,onClick:()=>{i(e.frameIndex,t.id),a()},"aria-label":`Jump to "${t.label}" in "${e.question||`this moment`}"`,children:[(0,U.jsx)(n,{}),(0,U.jsx)(`span`,{className:`ovw-el-label`,children:t.label})]})},t.id)})})]},e.frameIndex)})})]},e.id),t[20]=r,t[21]=a,t[22]=i,t[23]=e):e=t[23],_=n.map(e),t[15]=n,t[16]=r,t[17]=a,t[18]=i,t[19]=_}else _=t[19];let v;t[24]===_?v=t[25]:(v=(0,U.jsx)(`div`,{className:`ovw-grid`,children:_}),t[24]=_,t[25]=v);let y;t[26]!==v||t[27]!==g?(y=(0,U.jsxs)(`div`,{className:`ovw-panel`,role:`dialog`,"aria-modal":`true`,"aria-label":`Conversation overview`,ref:o,onClick:xa,children:[g,v]}),t[26]=v,t[27]=g,t[28]=y):y=t[28];let b;t[29]!==a||t[30]!==y||t[31]!==f?(b=(0,U.jsx)(`div`,{className:`ovw-scrim`,onClick:a,role:`button`,tabIndex:0,"aria-label":`Close conversation overview`,onKeyDown:f,children:y}),t[29]=a,t[30]=y,t[31]=f,t[32]=b):b=t[32];let x;return t[33]!==d||t[34]!==b?(x=(0,U.jsx)(Fe,{accent:d,children:b}),t[33]=d,t[34]=b,t[35]=x):x=t[35],x}function xa(e){return e.stopPropagation()}function Sa(e){let t=new Map;for(let n of e)for(let e of n.spec?.sources??[])e?.url&&!t.has(e.url)&&t.set(e.url,e);return[...t.values()]}function Ca(e,t={}){if(e.length<2)return null;let n=e[e.length-1]?.spec;if(!n)return null;let r=t.cap??1/0,i=e.reduce((e,t)=>Ie(e,t.spec?.blocks??[],`augment`).blocks,[]),a=i.length>r,o=a?i.slice(0,r):i,s=e.length,c=a?`${s} moments in this thread · showing the first ${r} cards`:`${s} moments in this thread`,l=Sa(e);return{...n,id:t.id??n.id,title:t.title??n.title,sub:c,blocks:o,sources:l.length?l:n.sources,tint:t.tint??n.tint,suggests:[],bend:void 0,awaiting:void 0,blanks:void 0}}var wa=240;function Ta(e){let{stops:t,from:n=0,spokenWalk:r,withNotes:i,teach:a,marksById:o}=e,s=[],c=0;for(let e=n;e<t.length;e++){let n=t[e].spot;if(!n)continue;let l=t[e].line;if(r&&e>0&&i&&l){let e=qe(l);e&&s.push({spot:n,line:l,noteText:e})}let u=o.get(n);if(u?.length){let e=u.length>1;for(let t=0;t<u.length;t++){let r=t===u.length-1;s.push({spot:n,line:l,mark:u[t],generous:a,delayMs:c*wa,badgeMs:r?Ke+(u.length-1)*wa:void 0,stepNumber:e?t+1:void 0}),c++}}else a&&(s.push({spot:n,line:l,generous:!0,delayMs:c*wa}),c++)}return s}var Ea=1100,Da=1700;function Oa(e,t,n){let{controller:r,release:i}=e,a=!1,o=e=>{a||(a=!0,i(),n(e))},s=()=>t.isCancelled()?`cancelled`:t.isDismissed()?`dismissed`:null;(async()=>{for(let e=0;e<r.count;e++){let n=s();if(n){o(n);return}let i=r.spokenFor(e)??r.captionFor(e);if(i){let n=t.speakLine(i),a=await Yi(n),c=s();if(c){o(c);return}r.setIndex(e),a?await Xi(n,Da,Ea):await Ji(Da)}else r.setIndex(e),await Ji(Da)}let e=s();o(e??`complete`)})()}function ka(e,t,n){if(e.length===0)return e;let r=new Map;n.forEach((e,t)=>{let n=Re(e),i=r.get(n);i?i.push(t):r.set(n,[t])});let i=new Map;n.forEach((e,t)=>{let n=Re(e);i.has(n)||i.set(n,t)});let a=e=>{if(e.kind!==`connect`)return e;let n=t[e.onIndex??-1],r=n?i.get(Re(n)):void 0;return r===void 0?void 0:{...e,onIndex:r}},o=e=>{let t=(e.marks??(e.mark?[e.mark]:[])).map(a).filter(e=>!!e);return t.length?{mark:t[0],...t.length>1?{marks:t}:{}}:{}},s=[],c=new Set;for(let n of e){let e=t[n.index];if(!e)continue;let i=r.get(Re(e))?.shift();if(i===void 0||c.has(i))continue;c.add(i);let{mark:a,marks:l}=o(n),u={...n,index:i,mark:a,marks:l},d=i===n.index&&a===n.mark&&l===n.marks;s.push(d?n:u)}return s}function Aa(e,t,n,r,i){let a={question:n,narration:r.narration,title:r.spec.title,blockTypes:r.spec.blocks.map(e=>e.type)},o=Le(e,a,r.continuity,r.tier),s=!e||o===`replace`&&ze(e,a)<.15,c=i?.forceReplace?`replace`:o,l=Ie(t,r.spec.blocks,c);c!==`replace`&&l.overflow&&(c=`replace`,l=Ie(t,r.spec.blocks,`replace`));let u={...r.spec,blocks:l.blocks};c!==`replace`&&delete u.bend;let d=c===`replace`?l.blocks.find(e=>e.id)?.id??null:l.firstNewId,f=ka(r.tour??[],r.spec.blocks,l.blocks),p=Date.now();return{frame:{id:Ve(p),question:n,narration:r.narration,...r.spoken?{spoken:r.spoken}:{},mode:c,topicShift:s,tour:f,spec:u,at:p,...r.corrects?{corrects:r.corrects}:{}},mode:c,spot:d,snap:a}}var ja={like:`Likes`,love:`Loves`,prefer:`Prefers`,enjoy:`Enjoys`,hate:`Hates`,dislike:`Dislikes`,need:`Needs`,want:`Wants`,own:`Owns`,use:`Uses`,drive:`Drives`,play:`Plays`,speak:`Speaks`,work:`Works`,live:`Lives`,study:`Studies`,train:`Trains`,teach:`Teaches`,code:`Codes`,run:`Runs`,cook:`Cooks`,travel:`Travels`},Ma=3,Na=140;function Pa(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function Fa(e){let t=e.trim().replace(/\s+/g,` `);if(!t||t.length>Na||t.includes(`?`))return``;let n=t.toLowerCase(),r;if(r=t.match(/^i(?:'m| am)\s+(an?\s+.+)/i))return Ia(`Is ${r[1]}`);if(r=t.match(/^i(?:'m| am)\s+(.+)/i))return Ia(r[1]);if(r=t.match(/^i(?:'ve| have)\s+(?:got\s+)?(.+)/i))return Ia(`Has ${r[1]}`);if(r=t.match(/^my\s+(.+?)\s+(is|are)\s+(.+)/i))return Ia(`${r[1]} ${r[2]} ${r[3]}`);if(r=n.match(/^i\s+(\w+)\s+(.+)/)){let e=ja[r[1]];if(e)return Ia(`${e} ${t.slice(t.toLowerCase().indexOf(r[2]))}`)}return``}function Ia(e){let t=Pa(e.trim().replace(/\s+/g,` `));return t.length>=6&&t.length<=Na?t:``}function La(e){if(!e)return[];let t=e.split(/[.!?\n]+|,?\s+\band\b\s+/i),n=[];for(let e of t){let t=Fa(e);if(t&&!n.includes(t)&&n.push(t),n.length>=Ma)break}return n}var Ra=.6,za=.5;function Ba(e){return(e.match(/\d[\d,.]*\d|\d/g)??[]).map(e=>e.replace(/,/g,``).replace(/\.+$/,``))}function Va(e,t){let n=Ba(e);if(!n.length)return!1;let r=new Set(Ba(t));return n.some(e=>!r.has(e))}function Ha(e,t,n={}){if(!Va(e,t)){let n=fn(e),r=fn(t);if(n.size>0&&gn(n,r)>=Ra)return`user-stated`}return n.webGrounded?`web-grounded`:`model-inferred`}function Ua(e,t){let n=Ba(e),r=new Set(Ba(t));if(n.length)return n.every(e=>r.has(e))?`user-stated`:`model-inferred`;let i=fn(e);return i.size>0&&gn(i,fn(t))>=za?`user-stated`:`model-inferred`}var Wa=24;function Ga(e,t=`item`){let n=e.toLowerCase().match(/[a-z][a-z0-9]*/g);return(n&&n[0]?n[0]:t).slice(0,Wa)}function Ka(e,t={}){return{concept:`corrections.${Ga(e.what)}`,body:`On "${e.what}", an earlier answer said ${e.was}; the user corrected it to ${e.now}. Use the corrected value and double-check figures like this before stating them.`,kind:`procedural`,source:t.source??`user-stated`,verify:!0,outcome:`loss`,turnId:t.turnId,quote:e.now}}i();var qa=()=>a(()=>import(`./generateLive-BsXn4Y_d.js`),__vite__mapDeps([3,4,5,6,7,8,2,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),Ja=50,Ya=2;function Xa(e,t){let n=t?.searchMode??(t?.webSearch?`free`:`off`),r=t?.quality??``,i=t?.explainLevel??`standard`,a=+!!t?.generativeBlocks,o=+!!t?.memoryEnabled;return`${e.provider}::${e.model}::${n}::${r}::${i}::${a}::${o}`}var Za={history:[],spec:null,status:`idle`,turn:0,narration:``,understood:[],busy:!1,activity:null,spot:null,mode:`replace`,replaceEpoch:0,prior:null,tour:[],past:[],frames:[],viewIndex:null,viewOverride:null,error:null,pendingShape:null,reasoning:!1,liveSources:[],restored:!1,phase:`normal`,filled:{},activeBlank:null};function Qa(e,t){return e?.find(e=>!(e.key in t))?.key??null}function $a(e,t){switch(t.type){case`start`:return{...e,status:`thinking`,busy:!0,narration:``,understood:[],activity:null,spot:null,viewIndex:null,viewOverride:null,error:null,pendingShape:null,reasoning:!1,liveSources:[],restored:!1,...t.fresh?{spec:null,prior:null}:{},phase:`normal`,filled:{},activeBlank:null};case`speak`:return{...e,status:`speaking`,narration:t.narration};case`activity`:return{...e,activity:t.activity};case`stream`:return{...e,status:`showing`,spec:t.spec};case`show`:return{...e,status:`showing`,spec:t.spec,narration:t.narration||e.narration,understood:t.understood,history:t.history.slice(-40),turn:e.turn+1,busy:!1,mode:t.mode,prior:t.prior,tour:t.tour,past:t.freshTimeline?[]:t.mode===`replace`&&t.priorSpec?[...e.past,t.priorSpec].slice(-12):e.past,frames:t.freshTimeline?[t.frame]:[...e.frames,t.frame].slice(-40),activity:null,replaceEpoch:t.mode===`replace`&&!t.streamed?e.replaceEpoch+1:e.replaceEpoch,spot:t.spot,viewIndex:null,viewOverride:null,pendingShape:null,reasoning:!1,liveSources:[],phase:t.spec.awaiting&&t.spec.blanks?.length?`awaiting_input`:`normal`,filled:{},activeBlank:t.spec.awaiting&&t.spec.blanks?.length?Qa(t.spec.blanks,{}):null};case`idle`:return{...e,status:`idle`,busy:!1,activity:null,reasoning:!1};case`error`:return{...e,status:`idle`,busy:!1,activity:null,error:t.error,pendingShape:null,reasoning:!1,liveSources:[]};case`spot`:return{...e,spot:t.spot};case`pending`:return{...e,pendingShape:t.pending};case`thinking`:return{...e,reasoning:t.on};case`sources`:return{...e,liveSources:t.sources};case`jump`:return e.frames[t.index]?{...e,viewIndex:t.index,viewOverride:null,spot:null}:e;case`preview`:return{...e,viewOverride:t.spec,viewIndex:null,spot:null};case`restore`:{let n=t.spec.blocks.find(e=>e.id)?.id??null,r={id:Ve(t.at),question:t.question,narration:``,mode:`replace`,tour:[],spec:t.spec,at:t.at};return{...e,restored:!0,spec:t.spec,status:`showing`,turn:e.turn+1,narration:``,understood:[],busy:!1,activity:null,spot:n,viewIndex:null,viewOverride:null,mode:`replace`,replaceEpoch:e.replaceEpoch+1,tour:[],error:null,frames:[...e.frames,r].slice(-40),prior:{question:t.question,narration:``,title:t.spec.title,blockTypes:t.spec.blocks.map(e=>e.type)},history:[...e.history,{role:`user`,content:t.question},{role:`assistant`,content:t.spec.title}].slice(-40)}}case`fill`:{let n={...e.filled,[t.value.key]:t.value};return{...e,filled:n,activeBlank:Qa(e.spec?.blanks,n)}}case`unfill`:{let n={...e.filled};return delete n[t.key],{...e,filled:n,activeBlank:t.key}}case`setActiveBlank`:return{...e,activeBlank:t.key};case`reset`:return{...Za};default:return e}}function eo(e){let t=e.frames[e.frames.length-1];return{...Za,history:e.history,frames:e.frames,spec:t.spec,status:`idle`,mode:`replace`,restored:!0,prior:{question:t.question,narration:t.narration,title:t.spec.title,blockTypes:t.spec.blocks.map(e=>e.type)}}}function to(e){let{canRun:t,getConfig:n,getCaps:r,speak:i,cancelSpeak:a,getLibraryEnabled:o}=e,[s,c]=(0,H.useReducer)($a,e.initial??Za),l=(0,H.useRef)(!1);l.current=s.busy;let u=(0,H.useRef)(s.history);u.current=s.history;let d=(0,H.useRef)(null),f=(0,H.useRef)(null),p=(0,H.useRef)(s.spec);p.current=s.spec;let m=(0,H.useRef)(s.prior);m.current=s.prior;let h=(0,H.useRef)(s.filled);h.current=s.filled;let g=(0,H.useRef)(new Map),_=(0,H.useRef)(new Map),v=(0,H.useRef)([]),y=(0,H.useRef)(new Set),b=(0,H.useRef)(s.turn);b.current=s.turn;let x=(0,H.useCallback)(async(e,s,h,x,S,C,w,T)=>{if(t&&!t())return;let E=e.trim();if(!E&&!s?.length||l.current&&!T?.force)return;let D=E||`What can you tell me about the attached file?`,O=C?.trim()||D,k={question:O,retry:D,attachments:s,selectedBlocks:h,inkIntents:S};a?.();let A=T?.freshStart?null:p.current;d.current?.abort(),f.current?.(),f.current=null;let j=new AbortController;d.current=j;for(let e of v.current)e.abort();v.current=[];let M=!!(s?.length||h?.length||x&&Object.keys(x).length||S?.length),ee=Xa(n(),r?.()),N=M?null:g.current.get(`${D}::${ee}`)??null;g.current.clear(),c({type:`start`,fresh:T?.freshStart});let P=T?.freshStart?[]:u.current,F=T?.freshStart?null:m.current,I=!V(F,D),te=`${D}::${P.length}::${ee}`,L=M?null:_.current.get(te)??null,R,z=!1;if(N??L){let e=N??L;e.narration&&(c({type:`speak`,narration:e.narration}),i?.(e.spoken||e.narration)),R=e}else{let e=``,t=0,a=!1,o=Vt(Ht(D)),l=0,u;try{u=await qa()}catch{if(j.signal.aborted)return;c({type:`error`,error:{kind:`network`,message:`Mavéa couldn't finish loading. Check your connection and try again.`,...k}});return}let{generateLive:d}=u;if(R=await d(D,P,n(),n=>{if(j.signal.aborted)return;e+=n;let r=Ye(e);if(!r)return;let{chunk:s,consumed:u}=Xe(r.text,t,r.done);s&&(t=u,a=!0,c({type:`speak`,narration:re(ne(r.text.slice(0,u)))}),!(l>=o)&&(l+=s.length,i?.(s)))},{caps:r?.(),signal:j.signal,onActivity:e=>{j.signal.aborted||c({type:`activity`,activity:e})},recentTypes:[...y.current],rotation:b.current,attachments:s,selectedBlocks:h,filledBlanks:x,inkIntents:S,priorTopic:F?.title||void 0,lesson:T?.lesson,onPartial:I?e=>{j.signal.aborted||(z=!0,ie(e.spec.blocks),c({type:`stream`,spec:e.spec}))}:void 0,onSources:e=>{j.signal.aborted||c({type:`sources`,sources:e})},onPending:I?e=>{j.signal.aborted||c({type:`pending`,pending:e})}:void 0,onThinking:e=>{j.signal.aborted||c({type:`thinking`,on:e})}}),j.signal.aborted)return;if(!a&&R.narration&&(c({type:`speak`,narration:R.narration}),i?.(R.spoken||R.narration)),!R.error&&R.spec.blocks.length>0&&(_.current.set(te,R),_.current.size>Ja)){let e=_.current.keys().next().value;e!==void 0&&_.current.delete(e)}}if(R.error){c({type:`error`,error:{...R.error,...k}});return}let ae=h?.length?`${O} (about: ${h.map(ce).join(`, `)})`:O,oe=[...P,{role:`user`,content:ae},{role:`assistant`,content:R.narration||R.spec.title}],se,le,ue;try{let e=Aa(F,T?.freshStart?[]:p.current?.blocks??[],O,R,{forceReplace:I});se=e.mode,le=e.frame.spec;let t=e.snap;ue=w?{...e.frame,mind:w}:e.frame,ie(le.blocks),c({type:`show`,spec:le,narration:R.narration,history:oe,mode:se,spot:e.spot,prior:t,tour:ue.tour,priorSpec:A,streamed:z,frame:ue,understood:R.understood??[],freshTimeline:T?.freshStart});for(let e of t.blockTypes)y.current.add(e)}catch{c({type:`error`,error:{kind:`http`,message:`Something went wrong putting that answer together — let's try again.`,...k}});return}if(r?.().memoryEnabled&&Gt(D))try{let e=String(ue.at),t=O.slice(0,200),n=(le.sources?.length??0)>0,r=R.memory??[];if(r.length)dn(r.map(r=>({...r,source:Ha(r.body,O,{webGrounded:n}),turnId:e,quote:t})));else{let n=La(O);n.length&&dn([{concept:`profile`,body:n.join(`. `),source:`user-stated`,turnId:e,quote:t}])}if(R.corrects){let t=Ua(R.corrects.now,O);dn([Ka(R.corrects,{turnId:e,source:t})])}}catch{}se===`replace`&&o?.()&&Xt(le,O);let de=n(),fe=r?.();if(fe?.quality===`thorough`){let e=le.suggests??[],t=[...y.current],n=Xa(de,fe);e.slice(0,Ya).forEach((e,r)=>{let i=new AbortController;v.current.push(i),qa().then(({generateLive:n})=>n(e.label,oe,de,void 0,{caps:fe,signal:i.signal,repair:!1,recentTypes:t,rotation:b.current+1+r})).then(t=>{!i.signal.aborted&&!t.error&&g.current.set(`${e.label}::${n}`,t)}).catch(()=>{})})}},[t,n,r,i,a,o]),S=(0,H.useCallback)(()=>{d.current?.abort(),d.current=null,f.current?.(),f.current=null;for(let e of v.current)e.abort();v.current=[],g.current.clear(),_.current.clear(),y.current.clear(),c({type:`reset`})},[]),C=(0,H.useCallback)(e=>c({type:`spot`,spot:e}),[]),w=(0,H.useCallback)(e=>c({type:`jump`,index:e}),[]),T=(0,H.useCallback)(e=>{e&&ie(e.blocks),c({type:`preview`,spec:e})},[]),E=(0,H.useCallback)(e=>c({type:`fill`,value:e}),[]),D=(0,H.useCallback)(e=>c({type:`unfill`,key:e}),[]),O=(0,H.useCallback)(e=>c({type:`setActiveBlank`,key:e}),[]),k=(0,H.useCallback)(()=>{let e=p.current,t=h.current;return!e||!Object.keys(t).length||l.current?!1:(x(`Complete the answer you started above using the values I just filled into the blanks — keep everything you already showed and fill in only the parts that depended on those values. Do not start over.`,void 0,e.blocks,t),!0)},[x]),A=(0,H.useCallback)((e,t)=>{a?.(),ie(e.blocks),c({type:`restore`,spec:e,question:t,at:Date.now()})},[a]),j=(0,H.useCallback)((e,t,n)=>{let r=n?.silent===!0;ie(e.spec.blocks),n?.interrupt!==!1&&a?.();let o=xe();c({type:`start`,fresh:!1}),r||c({type:`speak`,narration:e.narration});let s=r?void 0:i?.(e.spoken??e.narration),l=[...u.current,{role:`user`,content:t},{role:`assistant`,content:e.narration||e.spec.title}],d={question:t,narration:e.narration,title:e.spec.title,blockTypes:e.spec.blocks.map(e=>e.type)},m=p.current,h=e.spec.blocks.find(e=>e.id)?.id??null;f.current?.();let g=!1;f.current=()=>{g=!0};let _=()=>{g||(f.current=null,c({type:`show`,spec:e.spec,narration:e.narration,understood:[],history:l,mode:e.mode,prior:d,tour:r?[]:e.tour,spot:h,frame:e,priorSpec:m,streamed:!1,freshTimeline:!1}))};n?.revealNow||r?_():o?window.setTimeout(_,480):$e(s?s.started:Promise.resolve(!1),Ki).then(_)},[a,i]),M=s.viewOverride?s.viewOverride:s.viewIndex==null?s.spec:s.frames[s.viewIndex]?.spec??s.spec;return(0,H.useEffect)(()=>()=>{d.current?.abort(),f.current?.();for(let e of v.current)e.abort()},[]),{...s,run:x,reset:S,setSpot:C,restore:A,jumpTo:w,previewSpec:T,fill:E,unfill:D,setActiveBlank:O,complete:k,showFrame:j,viewSpec:M}}function no(e){return e<12?`Good morning`:e<18?`Good afternoon`:`Good evening`}function ro(e){return`${no(e)}. What can I help you explore?`}var io=`mavea-live-setup-v1`;function ao(){try{return localStorage.getItem(io)===`1`}catch{return!1}}function oo(){try{localStorage.setItem(io,`1`)}catch{}}function so(){try{localStorage.removeItem(io)}catch{}}var co=[{id:`connect`,label:`Connect`,title:`Hi. Which mind should I think with?`,sub:`Your key, your model. Stored here only if you choose, then sent through this deployment.`},{id:`think`,label:`Think`,title:`How thorough should I be?`,sub:`All of this is optional, the defaults are good.`},{id:`remember`,label:`Remember`,title:`Should I remember you, and how should I sound?`,sub:`Memory lives on this device. You can hear me first.`},{id:`go`,label:`Go`,title:`What are we figuring out?`,sub:`Talk like you would to a friend, switch topics whenever you want.`}],lo=`I’m awake.`,uo=`Set and ready, start talking, or try one of these.`,fo=co.map(e=>e.id);function po(e){let t=fo.indexOf(e);return t>=0&&t<fo.length-1?fo[t+1]:null}function mo(e){return co.find(t=>t.id===e)??co[0]}function ho(e){let t=(0,q.c)(17),{current:n,done:r,onPick:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],t[0]=a):a=t[0];let o=(0,H.useRef)(a),s,c,l,u,d;if(t[1]!==n||t[2]!==r||t[3]!==i){let e=e=>t=>{if(t.key!==`ArrowRight`&&t.key!==`ArrowLeft`)return;t.preventDefault();let n=(e+(t.key===`ArrowRight`?1:-1)+co.length)%co.length;o.current[n]?.focus(),i(co[n].id)};u=`constellation`,d=`Setup steps`,s=`const-track`,c=`tablist`,l=co.map((t,a)=>{let s=t.id===n,c=r.has(t.id)&&!s;return(0,U.jsxs)(`li`,{className:`const-step `+(s?`is-current`:c?`is-done`:`is-future`),children:[(0,U.jsx)(`button`,{ref:e=>{o.current[a]=e},type:`button`,role:`tab`,"aria-selected":s,"aria-current":s?`step`:void 0,"aria-label":`${t.label}${c?`, done`:``}`,tabIndex:s?0:-1,className:`const-disc`,onClick:()=>i(t.id),onKeyDown:e(a),children:c?(0,U.jsx)(L.check,{}):s?null:(0,U.jsx)(`span`,{className:`const-num`,"aria-hidden":!0,children:a+1})}),(0,U.jsx)(`span`,{className:`const-label`,children:t.label})]},t.id)}),t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d}else s=t[4],c=t[5],l=t[6],u=t[7],d=t[8];let f;t[9]!==s||t[10]!==c||t[11]!==l?(f=(0,U.jsx)(`ol`,{className:s,role:c,children:l}),t[9]=s,t[10]=c,t[11]=l,t[12]=f):f=t[12];let p;return t[13]!==u||t[14]!==d||t[15]!==f?(p=(0,U.jsx)(`nav`,{className:u,"aria-label":d,children:f}),t[13]=u,t[14]=d,t[15]=f,t[16]=p):p=t[16],p}function go(e){let t=(0,q.c)(16),{label:n,on:r,onToggle:i,note:a}=e,o;t[0]===n?o=t[1]:(o=(0,U.jsx)(`span`,{className:`toggle-label`,children:n}),t[0]=n,t[1]=o);let s;t[2]===a?s=t[3]:(s=(0,U.jsx)(`span`,{className:`toggle-note`,children:a}),t[2]=a,t[3]=s);let c;t[4]!==o||t[5]!==s?(c=(0,U.jsxs)(`div`,{className:`toggle-text`,children:[o,s]}),t[4]=o,t[5]=s,t[6]=c):c=t[6];let l=`toggle-pill`+(r?` is-on`:``),u;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,U.jsx)(`span`,{className:`toggle-knob`}),t[7]=u):u=t[7];let d;t[8]!==n||t[9]!==r||t[10]!==i||t[11]!==l?(d=(0,U.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":r,"aria-label":n,onClick:i,className:l,children:u}),t[8]=n,t[9]=r,t[10]=i,t[11]=l,t[12]=d):d=t[12];let f;return t[13]!==c||t[14]!==d?(f=(0,U.jsxs)(`div`,{className:`toggle-row`,children:[c,d]}),t[13]=c,t[14]=d,t[15]=f):f=t[15],f}function _o(e){let t=(0,q.c)(10),{value:n,options:r,onPick:i,ariaLabel:a}=e,o;if(t[0]!==i||t[1]!==r||t[2]!==n){let e;t[4]!==i||t[5]!==n?(e=e=>{let t=e.value===n;return(0,U.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,onClick:()=>i(e.value),className:`seg-opt`+(t?` is-active`:``),children:[(0,U.jsx)(`span`,{className:`seg-title`,children:e.label}),e.sub&&(0,U.jsx)(`span`,{className:`seg-sub`,children:e.sub})]},e.value)},t[4]=i,t[5]=n,t[6]=e):e=t[6],o=r.map(e),t[0]=i,t[1]=r,t[2]=n,t[3]=o}else o=t[3];let s;return t[7]!==a||t[8]!==o?(s=(0,U.jsx)(`div`,{className:`seg`,role:`radiogroup`,"aria-label":a,children:o}),t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function vo(e){let t=(0,q.c)(20),{id:n,value:r,onChange:i,placeholder:a,ariaLabel:o}=e,[s,c]=(0,H.useState)(!1),l=(0,H.useId)(),u=n??l,d=s?`text`:`password`,f;t[0]===i?f=t[1]:(f=e=>i(e.target.value),t[0]=i,t[1]=f);let p;t[2]!==o||t[3]!==a||t[4]!==u||t[5]!==d||t[6]!==f||t[7]!==r?(p=(0,U.jsx)(`input`,{id:u,className:`setup-input`,type:d,value:r,onChange:f,placeholder:a,spellCheck:!1,autoComplete:`new-password`,"aria-label":o}),t[2]=o,t[3]=a,t[4]=u,t[5]=d,t[6]=f,t[7]=r,t[8]=p):p=t[8];let m;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>c(yo),t[9]=m):m=t[9];let h=s?`Hide key`:`Show key`,g=s?`Hide key`:`Show key`,_;t[10]===s?_=t[11]:(_=s?(0,U.jsx)(L.eyeOff,{}):(0,U.jsx)(L.eye,{}),t[10]=s,t[11]=_);let v;t[12]!==s||t[13]!==h||t[14]!==g||t[15]!==_?(v=(0,U.jsx)(`button`,{type:`button`,className:`input-eye`,onClick:m,"aria-label":h,"aria-pressed":s,title:g,children:_}),t[12]=s,t[13]=h,t[14]=g,t[15]=_,t[16]=v):v=t[16];let y;return t[17]!==p||t[18]!==v?(y=(0,U.jsxs)(`div`,{className:`input-wrap`,children:[p,v]}),t[17]=p,t[18]=v,t[19]=y):y=t[19],y}function yo(e){return!e}var bo={gemini:{badge:`G`,name:`Gemini`,sub:`Google`},anthropic:{badge:`A`,name:`Claude`,sub:`Anthropic`},openai:{badge:`O`,name:`GPT`,sub:`OpenAI`},grok:{badge:`X`,name:`Grok`,sub:`xAI`},openrouter:{badge:`R`,name:`OpenRouter`,sub:`Many models`}},xo={native:`Real-time web search built in (grounds server-side when a question needs it).`,app:`Web grounding via Wikipedia, or your own Brave/Tavily search key.`,local:`Web grounding via Wikipedia when you ask for it.`},So={anthropic:`sk-ant-…`,openai:`sk-…`,gemini:`AIza…`,grok:`xai-…`,openrouter:`sk-or-…`};function Co(e){return e.split(` · `)[1]??e}function wo(){let e=(0,q.c)(52),t=(0,H.useId)(),[n]=Rt(),r=rt(n.provider),i=n.models[n.provider]??``,a=i||r.defaultModel,o=n.keys[n.provider]??``,[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(!1),d=(0,H.useRef)(0),f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=async()=>{let e=d.current+=1;u(!0);let t=await xn(Nt(Pt()),{tts:!1});e===d.current&&(c({llm:t.llm,model:t.model,statusCode:t.statusCode}),u(!1))},e[0]=f):f=e[0];let p=f;(0,H.useEffect)(()=>{if(r.needsKey&&!o){c(null);return}let e=setTimeout(()=>void p(),400);return()=>clearTimeout(e)},[n.provider,a,o,p,r.needsKey]);let m=!!s?.llm&&!!s?.model&&!!a,h=l?`checking`:m?`ok`:`warn`,g=l?`Checking…`:r.needsKey&&!o?`Add your API key.`:a?m?`Looks good.`:s?.llm?`Reachable, but the model was not found.`:s?.statusCode===401?`Invalid API key.`:s?.statusCode===403?`Key lacks permission.`:s?.statusCode===404?`Model not found.`:s?.statusCode===void 0?`Not reachable.`:`Error ${s.statusCode}.`:`Choose a model.`,_=m?`Kept in memory unless you choose Remember; sent through this deployment to ${Co(r.label)} when used.`:``,v;e[1]===n.provider?v=e[2]:(v=it.map(e=>{let t=bo[e.id],r=e.id===n.provider;return(0,U.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,className:`provider-tile`+(r?` is-selected`:``),onClick:()=>Ft({provider:e.id}),children:[(0,U.jsx)(`span`,{className:`provider-badge`,children:t.badge}),(0,U.jsx)(`span`,{className:`provider-name`,children:t.name}),(0,U.jsx)(`span`,{className:`provider-sub`,children:t.sub})]},e.id)}),e[1]=n.provider,e[2]=v);let y;e[3]===v?y=e[4]:(y=(0,U.jsx)(`div`,{className:`provider-tiles`,role:`radiogroup`,"aria-label":`Provider`,children:v}),e[3]=v,e[4]=y);let b;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,U.jsx)(`p`,{className:`field-helper`,children:`When a default model is offered, start there for faster, lower-cost use and move up only when a task needs it. Requests pass through this deployment to the provider, whose usage charges, privacy, and retention terms apply.`}),e[5]=b):b=e[5];let x;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,U.jsx)(`span`,{className:`field-head`,children:(0,U.jsx)(`span`,{className:`card-eyebrow`,children:`Model`})}),e[6]=x):x=e[6];let S;e[7]===n.provider?S=e[8]:(S=e=>Lt(n.provider,`model`,e),e[7]=n.provider,e[8]=S);let C;e[9]!==n.provider||e[10]!==i||e[11]!==S?(C=(0,U.jsx)(sn,{provider:n.provider,value:i,onChange:S},n.provider),e[9]=n.provider,e[10]=i,e[11]=S,e[12]=C):C=e[12];let w;e[13]!==r.modelNotes||e[14]!==a?(w=r.modelNotes?.[a]&&(0,U.jsx)(`span`,{className:`field-helper`,children:r.modelNotes[a]}),e[13]=r.modelNotes,e[14]=a,e[15]=w):w=e[15];let T=xo[r.search],E;e[16]===T?E=e[17]:(E=(0,U.jsx)(`span`,{className:`field-helper`,children:T}),e[16]=T,e[17]=E);let D;e[18]!==C||e[19]!==w||e[20]!==E?(D=(0,U.jsxs)(`div`,{className:`field-col`,children:[x,C,w,E]}),e[18]=C,e[19]=w,e[20]=E,e[21]=D):D=e[21];let O;e[22]!==n.provider||e[23]!==r.keyUrl||e[24]!==r.needsKey||e[25]!==o||e[26]!==t?(O=r.needsKey&&(0,U.jsxs)(`label`,{className:`field-col`,htmlFor:t,children:[(0,U.jsx)(`span`,{className:`field-head`,children:(0,U.jsx)(`span`,{className:`card-eyebrow`,children:`API key`})}),(0,U.jsx)(vo,{id:t,value:o,onChange:e=>Lt(n.provider,`key`,e),placeholder:So[n.provider]??`paste your key`,ariaLabel:`API key`}),r.keyUrl&&(0,U.jsx)(`a`,{className:`field-helper field-helper-link`,href:r.keyUrl,target:`_blank`,rel:`noreferrer noopener`,children:`Get a key↗`}),(0,U.jsx)(`span`,{className:`field-helper`,children:`Tip: use a restricted, spend-capped key — if it's ever exposed, the cost and access stay bounded.`})]}),e[22]=n.provider,e[23]=r.keyUrl,e[24]=r.needsKey,e[25]=o,e[26]=t,e[27]=O):O=e[27];let k;e[28]!==D||e[29]!==O?(k=(0,U.jsxs)(`div`,{className:`field-grid`,children:[D,O]}),e[28]=D,e[29]=O,e[30]=k):k=e[30];let A=`status-strip `+h,j;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,U.jsx)(`span`,{className:`status-strip-dot`,"aria-hidden":!0}),e[31]=j):j=e[31];let M;e[32]===g?M=e[33]:(M=(0,U.jsx)(`strong`,{children:g}),e[32]=g,e[33]=M);let ee=_&&` `+_,N;e[34]!==M||e[35]!==ee?(N=(0,U.jsxs)(`span`,{className:`status-strip-text`,children:[M,ee]}),e[34]=M,e[35]=ee,e[36]=N):N=e[36];let P;e[37]===p?P=e[38]:(P=(0,U.jsx)(`button`,{type:`button`,className:`status-strip-test`,onClick:()=>void p(),title:`Re-check the connection`,children:`Test`}),e[37]=p,e[38]=P);let F;e[39]!==A||e[40]!==N||e[41]!==P?(F=(0,U.jsxs)(`div`,{className:A,children:[j,N,P]}),e[39]=A,e[40]=N,e[41]=P,e[42]=F):F=e[42];let I;e[43]!==n.rememberKey||e[44]!==r.needsKey?(I=r.needsKey&&(0,U.jsx)(go,{label:`Remember this key on this device`,on:n.rememberKey,onToggle:()=>Ft({rememberKey:!n.rememberKey}),note:n.rememberKey?`Saved encrypted in this browser; use only on a trusted device.`:`Kept in memory only, cleared when you reload.`}),e[43]=n.rememberKey,e[44]=r.needsKey,e[45]=I):I=e[45];let te;e[46]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,U.jsx)(tn,{}),e[46]=te):te=e[46];let L;return e[47]!==k||e[48]!==F||e[49]!==y||e[50]!==I?(L=(0,U.jsxs)(`div`,{className:`step-body`,children:[y,b,k,F,I,te]}),e[47]=k,e[48]=F,e[49]=y,e[50]=I,e[51]=L):L=e[51],L}function To(){let e=(0,q.c)(19),[t]=Rt(),n=At(t.provider).capabilities,r=t.searchMode===`off`?`Answers from the model's own knowledge — no web calls.`:n.nativeWebSearch?`Grounds fresh asks in live web results with citations, only when a question needs it.`:`This model has no built-in search, so Real-time won't ground anything right now. Works only if your model supports it — pick one that does (Gemini or OpenRouter), or leave this off.`,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,U.jsx)(`span`,{className:`card-eyebrow`,children:`Web search`}),e[0]=i):i=e[0];let a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=[{value:`off`,label:`Off`,sub:`model knowledge`},{value:`realtime`,label:`Real-time`,sub:`live sources`}],e[1]=a):a=e[1];let o;e[2]===t.searchMode?o=e[3]:(o=(0,U.jsx)(_o,{ariaLabel:`Web search`,value:t.searchMode,onPick:Do,options:a}),e[2]=t.searchMode,e[3]=o);let s;e[4]===r?s=e[5]:(s=(0,U.jsx)(`p`,{className:`field-helper`,children:r}),e[4]=r,e[5]=s);let c;e[6]!==o||e[7]!==s?(c=(0,U.jsxs)(`div`,{className:`field-block`,children:[i,o,s]}),e[6]=o,e[7]=s,e[8]=c):c=e[8];let l;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,U.jsx)(`span`,{className:`card-eyebrow`,children:`Answer quality`}),e[9]=l):l=e[9];let u;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=[{value:`fast`,label:`Fast`,sub:`quickest`},{value:`balanced`,label:`Balanced`,sub:`default`},{value:`thorough`,label:`Thorough`,sub:`thinks more`}],e[10]=u):u=e[10];let d;e[11]===t.quality?d=e[12]:(d=(0,U.jsx)(_o,{ariaLabel:`Answer quality`,value:t.quality,onPick:Eo,options:u}),e[11]=t.quality,e[12]=d);let f;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,U.jsx)(`p`,{className:`field-helper`,children:`Fast keeps replies snappy; Thorough lets the model think more on hard questions.`}),e[13]=f):f=e[13];let p;e[14]===d?p=e[15]:(p=(0,U.jsxs)(`div`,{className:`field-block`,children:[l,d,f]}),e[14]=d,e[15]=p);let m;return e[16]!==c||e[17]!==p?(m=(0,U.jsxs)(`div`,{className:`step-body`,children:[c,p]}),e[16]=c,e[17]=p,e[18]=m):m=e[18],m}function Eo(e){return Ft({quality:e})}function Do(e){return Ft({searchMode:e})}function Oo(e,t){try{return localStorage.getItem(e)||t}catch{return t}}function ko(e){let t=Te(e);if(t){ke(`mavea`,t.kokoro);try{localStorage.setItem(Oe,e)}catch{}}}function Ao(e){let t=(0,q.c)(20),{label:n,value:r,onChange:i}=e,a;t[0]===n?a=t[1]:(a=(0,U.jsx)(`span`,{className:`card-eyebrow`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=e=>{i(e),ko(e);let t=Te(e);t&&rn(t)},t[2]=i,t[3]=o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=je.map(jo),t[4]=s):s=t[4];let c;t[5]!==n||t[6]!==o||t[7]!==r?(c=(0,U.jsx)(Sn,{ariaLabel:n,value:r,onChange:o,options:s}),t[5]=n,t[6]=o,t[7]=r,t[8]=c):c=t[8];let l;t[9]===r?l=t[10]:(l=()=>{let e=Te(r);e&&rn(e)},t[9]=r,t[10]=l);let u;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,U.jsx)(L.play,{}),t[11]=u):u=t[11];let d;t[12]===l?d=t[13]:(d=(0,U.jsx)(`button`,{type:`button`,className:`voice-play`,onClick:l,"aria-label":`Preview Mavéa's voice`,title:`Preview voice`,children:u}),t[12]=l,t[13]=d);let f;t[14]!==c||t[15]!==d?(f=(0,U.jsxs)(`div`,{className:`voice-row`,children:[c,d]}),t[14]=c,t[15]=d,t[16]=f):f=t[16];let p;return t[17]!==a||t[18]!==f?(p=(0,U.jsxs)(`div`,{className:`voice-col`,children:[a,f]}),t[17]=a,t[18]=f,t[19]=p):p=t[19],p}function jo(e){return{value:e.id,label:e.label,note:e.tone}}function Mo(){let e=(0,q.c)(16),[t]=Rt(),n=en(),[r,i]=(0,H.useState)(Fo),a;e[0]===t.memoryEnabled?a=e[1]:(a=()=>Ft({memoryEnabled:!t.memoryEnabled}),e[0]=t.memoryEnabled,e[1]=a);let o;e[2]!==t.memoryEnabled||e[3]!==a?(o=(0,U.jsx)(go,{label:`Remember me`,on:t.memoryEnabled,onToggle:a,note:`Durable facts about you, kept on this device only, to personalize future chats.`}),e[2]=t.memoryEnabled,e[3]=a,e[4]=o):o=e[4];let s;e[5]!==t.memoryEnabled||e[6]!==n?(s=t.memoryEnabled&&(0,U.jsxs)(`div`,{className:`memory-panel`,children:[(0,U.jsxs)(`div`,{className:`memory-head`,children:[(0,U.jsxs)(`span`,{className:`card-eyebrow`,children:[`What Mavéa remembers (`,n.length,` `,n.length===1?`concept`:`concepts`,`)`]}),n.length>0&&(0,U.jsx)(`button`,{type:`button`,className:`ghost-btn`,onClick:Po,children:`Forget all`})]}),n.length===0?(0,U.jsx)(`p`,{className:`memory-empty`,children:`Nothing yet — Mavéa will note useful facts as you talk.`}):(0,U.jsx)(`ul`,{className:`memory-list`,children:n.map(No)})]}),e[5]=t.memoryEnabled,e[6]=n,e[7]=s):s=e[7];let c;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,U.jsx)(`hr`,{className:`setup-divider`}),e[8]=c):c=e[8];let l;e[9]===r?l=e[10]:(l=(0,U.jsx)(`div`,{className:`voice-grid`,children:(0,U.jsx)(Ao,{label:`Mavéa speaks as`,value:r,onChange:i})}),e[9]=r,e[10]=l);let u;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,U.jsx)(cn,{}),e[11]=u):u=e[11];let d;return e[12]!==o||e[13]!==s||e[14]!==l?(d=(0,U.jsxs)(`div`,{className:`step-body`,children:[o,s,c,l,u]}),e[12]=o,e[13]=s,e[14]=l,e[15]=d):d=e[15],d}function No(e){return(0,U.jsxs)(`li`,{className:`memory-fact`,children:[(0,U.jsx)(`span`,{className:`memory-fact-concept`,children:e.concept}),(0,U.jsx)(`span`,{className:`memory-fact-text`,children:e.body}),(0,U.jsx)(`button`,{type:`button`,className:`memory-x`,onClick:()=>mn(e.id),"aria-label":`Forget: ${e.concept}`,title:`Forget this`,children:(0,U.jsx)(L.x,{})})]},e.id)}function Po(){return pn()}function Fo(){return Oo(Oe,we)}var Io=[{kicker:`Build`,accent:`var(--presence)`,prompt:`Build me a budget for a $5,000 month`},{kicker:`Decide`,accent:`var(--insight)`,prompt:`Should I take the train or fly to Boston?`},{kicker:`Understand`,accent:`var(--warning)`,prompt:`How does refinancing actually work?`},{kicker:`Plan`,accent:`var(--danger)`,prompt:`Three days in Tokyo, food first`}];function Lo({onStart:e}){return(0,U.jsx)(`div`,{className:`starter-grid`,role:`list`,children:Io.map(t=>(0,U.jsxs)(`button`,{type:`button`,className:`starter-chip`,style:{"--starter-accent":t.accent},onClick:()=>e(t.prompt),children:[(0,U.jsxs)(`span`,{className:`starter-kicker`,children:[(0,U.jsx)(`span`,{"aria-hidden":!0,children:`✦`}),` `,t.kicker]}),(0,U.jsx)(`span`,{className:`starter-copy`,children:t.prompt})]},t.kicker))})}function Ro(e,t){try{return localStorage.getItem(e)||t}catch{return t}}function zo(e,t){return Te(Ro(e,t))?.label??`Voice`}var Bo={fast:`Fast — snappy & cheap`,balanced:`Balanced — the default`,thorough:`Thorough — deeper thinking`};function Vo(e){let t=(0,q.c)(54),{onJump:n,onStart:r,onStartTalking:i,onStartOver:a,onSeeHow:o,studySlot:s,librarySlot:c}=e,[l]=Rt(),u=en(),d=$t(),f,p;if(t[0]!==l.models||t[1]!==l.provider){let e=rt(l.provider);f=l.models[l.provider]||e.defaultModel,p=e.label.split(` · `)[1]??(e.needsKey?e.label:`Local`),t[0]=l.models,t[1]=l.provider,t[2]=f,t[3]=p}else f=t[2],p=t[3];let m=p,h;t[4]===l?h=t[5]:(h=It(l),t[4]=l,t[5]=h);let g=h,_=l.searchMode===`off`?`Off`:`Real-time`,v=l.memoryEnabled?`${u.length} ${u.length===1?`concept`:`concepts`} · this device only`:`Off`,y=`${f} · ${m}`,b;t[6]===y?b=t[7]:(b={key:`model`,label:`Model`,value:y,step:`connect`},t[6]=y,t[7]=b);let x;t[8]===_?x=t[9]:(x={key:`search`,label:`Web search`,value:_,step:`think`},t[8]=_,t[9]=x);let S=Bo[l.quality]??l.quality,C;t[10]===S?C=t[11]:(C={key:`quality`,label:`Quality`,value:S,step:`think`},t[10]=S,t[11]=C);let w;t[12]===v?w=t[13]:(w={key:`memory`,label:`Memory`,value:v,step:`remember`},t[12]=v,t[13]=w);let T;t[14]===d?T=t[15]:(T=d===!1?`Off — captions only (voice needs the local TTS service)`:zo(Oe,we),t[14]=d,t[15]=T);let E;t[16]===T?E=t[17]:(E={key:`voice`,label:`Voice`,value:T,step:`remember`},t[16]=T,t[17]=E);let D;t[18]!==E||t[19]!==b||t[20]!==x||t[21]!==C||t[22]!==w?(D=[b,x,C,w,E],t[18]=E,t[19]=b,t[20]=x,t[21]=C,t[22]=w,t[23]=D):D=t[23];let O=D,k;t[24]!==n||t[25]!==O?(k=(0,U.jsx)(`ul`,{className:`checklist`,children:O.map(e=>(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,className:`check-row`,onClick:()=>n(e.step),children:[(0,U.jsx)(`span`,{className:`check-mark`,"aria-hidden":!0,children:(0,U.jsx)(L.check,{})}),(0,U.jsx)(`span`,{className:`check-label`,children:e.label}),(0,U.jsx)(`span`,{className:`check-value`,children:e.value})]})},e.key))}),t[24]=n,t[25]=O,t[26]=k):k=t[26];let A;t[27]!==g||t[28]!==n||t[29]!==i?(A=g?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Be,{kind:`voice-data`,from:`live`,className:`go-voice-notice`}),(0,U.jsxs)(`button`,{type:`button`,className:`go-start`,onClick:i,children:[(0,U.jsx)(L.mic,{}),` Start talking`]})]}):(0,U.jsxs)(`button`,{type:`button`,className:`go-start go-start--gated`,onClick:()=>n(`connect`),title:`Add a model and a key on the Connect step first`,children:[(0,U.jsx)(L.mic,{}),` Connect a model to start`]}),t[27]=g,t[28]=n,t[29]=i,t[30]=A):A=t[30];let j;t[31]===a?j=t[32]:(j=(0,U.jsx)(`div`,{className:`go-ghosts`,children:(0,U.jsx)(`button`,{type:`button`,className:`ghost-btn`,onClick:a,children:`Start over`})}),t[31]=a,t[32]=j);let M;t[33]!==k||t[34]!==A||t[35]!==j?(M=(0,U.jsxs)(`div`,{className:`go-left`,children:[k,A,j]}),t[33]=k,t[34]=A,t[35]=j,t[36]=M):M=t[36];let ee;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,U.jsx)(`span`,{className:`card-eyebrow`,children:`Or start with one`}),t[37]=ee):ee=t[37];let N;t[38]===o?N=t[39]:(N=o&&(0,U.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:o,children:`See how it works`}),t[38]=o,t[39]=N);let P;t[40]===N?P=t[41]:(P=(0,U.jsxs)(`div`,{className:`try-head`,children:[ee,N]}),t[40]=N,t[41]=P);let F;t[42]===r?F=t[43]:(F=(0,U.jsx)(Lo,{onStart:r}),t[42]=r,t[43]=F);let I;t[44]!==P||t[45]!==F?(I=(0,U.jsxs)(`div`,{className:`go-right`,children:[P,F]}),t[44]=P,t[45]=F,t[46]=I):I=t[46];let te;t[47]===c?te=t[48]:(te=c&&(0,U.jsx)(`div`,{className:`go-library`,children:c}),t[47]=c,t[48]=te);let ne;return t[49]!==s||t[50]!==M||t[51]!==I||t[52]!==te?(ne=(0,U.jsxs)(`div`,{className:`step-body go-grid`,children:[M,I,s,te]}),t[49]=s,t[50]=M,t[51]=I,t[52]=te,t[53]=ne):ne=t[53],ne}function Ho({speak:e,goDemo:t,onStart:n,onStartTalking:r,onSeeHow:i,studySlot:a,librarySlot:o,seed:s}){let c=(0,H.useRef)(!ao()),l=(0,H.useRef)(!1),[u,d]=(0,H.useState)(c.current?`connect`:`go`),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(``),g=(0,H.useRef)(s??``),[_,v]=(0,H.useState)(!c.current),y=!c.current||_;(0,H.useEffect)(()=>{if(u!==`go`)return;v(!0),c.current&&oo();let t=g.current;if(t){g.current=``,n(t);return}l.current||(l.current=!0,e(c.current?`I’m awake.`:ro(new Date().getHours())))},[u,e,n]),(0,H.useEffect)(()=>{let e=document.documentElement;return e.dataset.wizardStep=u,()=>{delete e.dataset.wizardStep}},[u]);let b=(0,H.useRef)(null);(0,H.useEffect)(()=>{let e=b.current;if(!e)return;let t=document.documentElement,n=0,r=()=>{n=0,t.style.setProperty(`--wiz-scroll`,String(Math.min(1,e.scrollTop/130)))},i=()=>{n||=requestAnimationFrame(r)};return e.addEventListener(`scroll`,i,{passive:!0}),r(),()=>{e.removeEventListener(`scroll`,i),n&&cancelAnimationFrame(n),t.style.removeProperty(`--wiz-scroll`)}},[u]);let x=e=>{p(y&&e!==`go`),d(e),e!==`go`&&h(``)},S=()=>{x(f?`go`:po(u)??`go`)},C=()=>{(typeof window>`u`||window.confirm(`Start over? This clears your saved setup and replays the intro.`))&&(jt(),so(),lt(),c.current=!0,l.current=!1,v(!1),p(!1),d(`connect`))},w=co.findIndex(e=>e.id===u),T=new Set(co.filter((e,t)=>y?e.id!==u:t<w).map(e=>e.id)),E=mo(u),D=u===`go`,O=D&&c.current?lo:E.title,k=D&&c.current?uo:E.sub;return(0,U.jsxs)(`div`,{className:`setup stage`,"data-active":`1`,children:[(0,U.jsxs)(`header`,{className:`setup-nav`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`setup-back`,onClick:t,children:[(0,U.jsx)(`span`,{"aria-hidden":!0,children:`←`}),` Back to the demo`]}),(0,U.jsx)(ho,{current:u,done:T,onPick:x}),(0,U.jsx)(bn,{triggerClassName:`setup-icon-btn`})]}),(0,U.jsxs)(`div`,{className:`setup-stage`,ref:b,children:[(0,U.jsxs)(`div`,{className:`setup-head`,children:[(0,U.jsx)(`h1`,{className:`setup-q`,children:O}),(0,U.jsx)(`p`,{className:`setup-sub`,children:k})]}),(0,U.jsxs)(`section`,{className:`card reveal setup-card`+(D?` setup-card--wide`:``),"aria-label":E.label,children:[u===`connect`&&(0,U.jsx)(wo,{}),u===`think`&&(0,U.jsx)(To,{}),u===`remember`&&(0,U.jsx)(Mo,{}),D&&(0,U.jsx)(Vo,{onJump:x,onStart:n,onStartTalking:r,onStartOver:C,onSeeHow:i,studySlot:a,librarySlot:o}),!D&&(0,U.jsxs)(`footer`,{className:`setup-foot`,children:[(0,U.jsx)(`span`,{className:`setup-foot-note`,children:`Changes save as you make them.`}),(0,U.jsxs)(`button`,{type:`button`,className:`setup-done`,onClick:S,children:[`Done `,(0,U.jsx)(L.check,{})]})]})]},u)]}),D&&(0,U.jsx)(`div`,{className:`go-composer`,children:(0,U.jsxs)(`div`,{className:`go-composer-inner`,children:[(0,U.jsx)(`input`,{className:`go-composer-input`,type:`text`,placeholder:`Say it or type it. Try ‘plan a trip’ or ‘compare two options’…`,value:m,autoComplete:`off`,spellCheck:!1,onChange:e=>h(e.target.value),onKeyDown:e=>{e.key===`Enter`&&m.trim()&&n(m.trim())}}),m.trim()?(0,U.jsx)(`button`,{type:`button`,className:`go-composer-send`,"aria-label":`Send`,onClick:()=>n(m.trim()),children:(0,U.jsx)(L.send,{})}):(0,U.jsx)(`button`,{type:`button`,className:`go-composer-mic`,"aria-label":`Use microphone`,onClick:r,children:(0,U.jsx)(L.mic,{})})]})})]})}function Uo({mode:e,onChange:t,pttKey:n,pttSide:r}){let[i,a]=(0,H.useState)(!1),o=(0,H.useRef)(null),s=(0,H.useRef)(null),c=(0,H.useCallback)(()=>{a(!1),s.current?.focus()},[]);(0,H.useEffect)(()=>{if(!i)return;let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)},t=e=>{e.key===`Escape`&&c()};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[i,c]);let l=Qt(n||`Alt`,r),u=e=>{t(e),c()},d=[{key:`tap`,title:`Tap`,blurb:`Tap once, then tap again to send`,checked:e===`tap`,onClick:()=>u(`tap`)},{key:`always`,title:`Always on`,blurb:`Hands-free — listens for any speech`,checked:e===`always`,onClick:()=>u(`always`)},{key:`hold`,title:`Hold ${l}`,blurb:`Hold the mic or ${l} to talk`,checked:e===`hold`,onClick:()=>u(`hold`)}];return(0,U.jsxs)(`div`,{className:`mic-mode-pop-root`,ref:o,children:[(0,U.jsx)(`button`,{type:`button`,className:`mic-mode-chevron`,ref:s,onClick:()=>a(e=>!e),"aria-expanded":i,"aria-haspopup":`menu`,"aria-label":`Mic mode`,title:`Mic mode`,children:(0,U.jsx)(`svg`,{width:`8`,height:`8`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M6 9l6 6 6-6`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),i&&(0,U.jsx)(`div`,{className:`mic-mode-pop`,role:`menu`,"aria-label":`Mic mode`,children:d.map(e=>(0,U.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e.checked,className:`more-menu-row mic-mode-row`,onClick:e.onClick,children:[(0,U.jsx)(`span`,{className:`more-menu-name`,children:e.title}),(0,U.jsx)(`span`,{className:`more-menu-blurb`,children:e.blurb}),e.checked&&(0,U.jsx)(L.check,{className:`mic-mode-row-check`,"aria-hidden":`true`})]},e.key))})]})}function Wo(e,t){e.documentElement.dataset.presenceStyle=t}function Go(e){delete e.documentElement.dataset.presenceStyle}var Ko=/(photo|image|carousel|mood|palette|video|map|diagram|story|slide|verse)/,qo=/(chart|table|matrix|grid|stat|kpi|code|pipeline|timeline|kanban|roadmap|process|flow|tree|schema|heatmap|scatter|bars|donut|gauge|checks|network|sankey)/;function Jo(e,t){return!!(e?.blocks)?.some(e=>t.test(String(e.type).toLowerCase()))}function Yo({status:e,interjecting:t=!1,spec:n}){if(e===`thinking`)return`bead`;if(t)return`pip`;let r=ia(n);return r===`warm`?`pip`:r===`concerned`?`hybrid`:Jo(n,Ko)?`aura`:Jo(n,qo)?`bead`:`hybrid`}var Xo=6e3;function Zo({dashboardId:e,dashboardTitle:t,onDismiss:n}){let r=(0,H.useRef)(n);return r.current=n,(0,H.useEffect)(()=>{let e=setTimeout(()=>r.current(),Xo);return()=>clearTimeout(e)},[e]),(0,U.jsxs)(`div`,{className:`cards-pill dash-pill`,role:`status`,"aria-live":`polite`,children:[(0,U.jsx)(L.check,{}),(0,U.jsxs)(`span`,{className:`cards-pill-text dash-pill-text`,children:[`Added to `,(0,U.jsx)(`strong`,{children:t})]}),(0,U.jsxs)(`a`,{className:`cards-pill-btn cards-pill-primary`,href:Cn.detail(e),onClick:n,children:[`Open `,(0,U.jsx)(L.chevR,{})]})]})}var Qo={strong:`Strong evidence`,partial:`Partial evidence`,inferred:`Inferred`,unverified:`Unverified`},$o={strong:3,partial:2,inferred:1,unverified:1};function es(e){let t=(0,q.c)(3),{count:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,U.jsx)(`i`,{className:`prov-dot`,"aria-hidden":`true`}),t[0]=r):r=t[0];let i=n==null?`Inferred`:`${n} ${n===1?`claim`:`claims`} inferred`,a;return t[1]===i?a=t[2]:(a=(0,U.jsxs)(`span`,{className:`prov-inferred`,children:[r,i]}),t[1]=i,t[2]=a),a}function ts(e){let t=(0,q.c)(8),{level:n,title:r}=e,i=$o[n],a=`prov-pill `+n,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[0,1,2],t[0]=o):o=t[0];let s;t[1]===i?s=t[2]:(s=(0,U.jsx)(`span`,{className:`prov-bars`,"aria-hidden":`true`,children:o.map(e=>(0,U.jsx)(`i`,{className:e<i?`on`:``},e))}),t[1]=i,t[2]=s);let c=Qo[n],l;return t[3]!==a||t[4]!==s||t[5]!==c||t[6]!==r?(l=(0,U.jsxs)(`span`,{className:a,title:r,children:[s,c]}),t[3]=a,t[4]=s,t[5]=c,t[6]=r,t[7]=l):l=t[7],l}function ns({sources:e,hosts:t=!1,className:n}){return e.length?(0,U.jsxs)(`div`,{className:`grounded-in`+(n?` ${n}`:``),children:[(0,U.jsx)(`span`,{className:`grounded-in-label`,children:`Grounded in`}),(0,U.jsx)(`ul`,{children:e.map((e,n)=>{let r=me(e.url),i=t?he(e.url):null;return(0,U.jsxs)(`li`,{children:[r?(0,U.jsx)(`a`,{href:r,target:`_blank`,rel:`noopener noreferrer`,children:e.title}):(0,U.jsx)(`span`,{className:`grounded-in-name`,children:e.title}),i&&(0,U.jsx)(`span`,{className:`grounded-in-host`,children:i})]},n)})})]}):null}function rs({open:e,onClose:t,claim:n,conf:r,sources:i,hadFiles:a=!1}){let o=i.length?`How sure Mavéa is, based on these sources`:a?`How sure Mavéa is, based on your files`:z;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`scrim`+(e?` show`:``),role:`presentation`,onClick:t,style:{pointerEvents:e?`auto`:`none`}}),(0,U.jsxs)(`aside`,{className:`drawer`+(e?` show`:``),"aria-hidden":!e,inert:!e,children:[(0,U.jsx)(`button`,{className:`drawer-x`,onClick:t,"aria-label":`Close evidence`,children:(0,U.jsx)(L.x,{})}),(0,U.jsxs)(`div`,{className:`drawer-head`,children:[(0,U.jsxs)(`div`,{className:`drawer-eyebrow`,children:[(0,U.jsx)(L.shield,{style:{width:14,height:14}}),` Where this came from`]}),(0,U.jsx)(`div`,{className:`drawer-claim`,children:n})]}),(0,U.jsxs)(`div`,{className:`drawer-body`,children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`var(--text-secondary)`},children:[(0,U.jsx)(ts,{level:r||`inferred`,title:o}),i.length>0?(0,U.jsxs)(`span`,{children:[`· grounded in `,i.length,` live source`,i.length===1?``:`s`]}):a?(0,U.jsx)(`span`,{children:`· based on your attached files`}):(0,U.jsx)(`span`,{children:`· from the model's own knowledge`})]}),i.length>0&&(0,U.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0,display:`grid`,gap:8},"aria-label":`Sources`,children:i.map((e,t)=>{let n=me(e.url);return n?(0,U.jsx)(`li`,{children:(0,U.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`evidence-block evidence-src`,children:[(0,U.jsxs)(`div`,{className:`evidence-top`,children:[(0,U.jsxs)(`span`,{className:`evidence-file`,children:[(0,U.jsx)(L.globe,{style:{width:16,height:16}}),e.title]}),(0,U.jsx)(`span`,{className:`evidence-loc`,children:he(e.url)??e.url}),(0,U.jsx)(L.external,{style:{width:14,height:14,flex:`0 0 auto`}})]}),e.snippet&&(0,U.jsx)(`div`,{className:`evidence-quote`,children:e.snippet})]})},t):null})}),(0,U.jsxs)(`div`,{className:`assumption`,children:[(0,U.jsx)(L.alert,{}),i.length>0?(0,U.jsxs)(`div`,{children:[`Mavéa summarized these sources — open them to read the originals, and treat anything labeled `,(0,U.jsx)(`b`,{children:`inferred`}),` as a best estimate, not a verified fact.`]}):a?(0,U.jsxs)(`div`,{children:[`Mavéa answered from your attached files and its own knowledge — no live sources were checked. Treat anything labeled `,(0,U.jsx)(`b`,{children:`inferred`}),` as a best estimate, not a verified fact.`]}):(0,U.jsx)(`div`,{children:`This came from the model's own knowledge — nothing here was checked against live sources or your files. Treat it as a starting point, not verified fact.`})]})]})]})]})}var is=new Set([`inferred`,`unverified`]);function as(e){let{conf:t}=e.props;return t===`strong`||t===`partial`||t===`inferred`||t===`unverified`?t:void 0}function os(e){if(!e)return 0;let t=0,n=e=>{for(let r of e){let e=as(r);e&&is.has(e)&&t++,r.type===`composite`&&n(r.props.regions.map(e=>e.block))}};return n(e.blocks),t}function ss(e,t=3){if(!e?.length)return[];let n=new Set,r=[];for(let i of e){let e=he(i.url)??i.title,a=e.toLowerCase();if(!(!e||n.has(a))&&(n.add(a),r.push(e),r.length>=t))break}return r}function cs(e){let t=(0,q.c)(15),{question:n,narration:r,sources:i,inferred:a,tint:o}=e;if(!r)return null;let s;if(t[0]!==a||t[1]!==r||t[2]!==n||t[3]!==i||t[4]!==o){let e=ss(i),c;t[6]===o?c=t[7]:(c=o?{"--thread-tint":o}:void 0,t[6]=o,t[7]=c);let l;t[8]!==n||t[9]!==o?(l=n&&(0,U.jsxs)(`p`,{className:`hero-ask`,children:[o&&(0,U.jsx)(`span`,{className:`hero-thread-dot`,"aria-hidden":`true`}),`You asked, “`,n,`”`]}),t[8]=n,t[9]=o,t[10]=l):l=t[10];let u;t[11]===r?u=t[12]:(u=Ge(r),t[11]=r,t[12]=u);let d;t[13]===u?d=t[14]:(d=(0,U.jsx)(`p`,{className:`hero-line voice-text`,children:u}),t[13]=u,t[14]=d),s=(0,U.jsxs)(`section`,{className:`answer-hero`,"aria-label":`Mavéa's answer`,style:c,children:[l,d,(e.length>0||a>0)&&(0,U.jsxs)(`p`,{className:`hero-meta`,children:[e.length>0&&(0,U.jsxs)(`span`,{className:`hero-sources`,children:[`Sources: `,e.join(` · `)]}),a>0&&(0,U.jsx)(es,{count:a})]})]}),t[0]=a,t[1]=r,t[2]=n,t[3]=i,t[4]=o,t[5]=s}else s=t[5];return s}var ls=1300;function us(e){let t=(0,q.c)(9),{onDone:n,tint:r}=e,i,a;t[0]===n?(i=t[1],a=t[2]):(i=()=>{let e=window.setTimeout(n,ls);return()=>window.clearTimeout(e)},a=[n],t[0]=n,t[1]=i,t[2]=a),(0,H.useEffect)(i,a);let o;t[3]===r?o=t[4]:(o=r?{"--topic-sweep-ink":r}:void 0,t[3]=r,t[4]=o);let s,c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,U.jsx)(`span`,{className:`topic-sweep-line`}),c=(0,U.jsx)(`span`,{className:`topic-sweep-label`,children:`New topic`}),t[5]=s,t[6]=c):(s=t[5],c=t[6]);let l;return t[7]===o?l=t[8]:(l=(0,U.jsxs)(`aside`,{className:`topic-sweep`,"aria-hidden":`true`,style:o,children:[s,c]}),t[7]=o,t[8]=l),l}function ds(e){return e?.track!=null&&e.track.score>=95&&(e.sources?.length??0)>0}function fs(e,t){return qt(e)&&t.blocks.length>=4}function ps(e,t){if(!ae(e))return!1;if(!t)return!0;let n=Wt(t);return n.planning||n.comparison||n.whatIf||n.decision||n.troubleshoot}function ms(e){let t=(0,q.c)(58),{spec:n,followups:r,question:i,onAsk:a,onTrack:o,onDeepZoom:s,onCanvas:c,onSeeAll:l,threadCount:u,busy:d}=e,f;t[0]===n.sources?f=t[1]:(f=n.sources??[],t[0]=n.sources,t[1]=f);let p=f,m,h,g,_,v,y,b,x,S;if(t[2]!==d||t[3]!==r||t[4]!==a||t[5]!==c||t[6]!==s||t[7]!==l||t[8]!==o||t[9]!==i||t[10]!==p||t[11]!==n||t[12]!==u){let e=r.slice(0,12),f;t[22]!==o||t[23]!==n?(f=!!o&&ds(n),t[22]=o,t[23]=n,t[24]=f):f=t[24],v=f;let C;t[25]!==d||t[26]!==s||t[27]!==i||t[28]!==n?(C=!d&&!!s&&!!i&&fs(i,n),t[25]=d,t[26]=s,t[27]=i,t[28]=n,t[29]=C):C=t[29],g=C;let w;t[30]!==d||t[31]!==c||t[32]!==i||t[33]!==n?(w=!d&&!!c&&ps(n,i),t[30]=d,t[31]=c,t[32]=i,t[33]=n,t[34]=w):w=t[34],h=w,_=!!l&&(u??0)>=2,m=p.length>0||e.length>0||v||g||h||_,y=`answer-footer`+(p.length>0&&e.length>0?``:` single`),b=`Sources, follow-ups, and AI disclaimer`,t[35]===p?x=t[36]:(x=p.length>0&&(0,U.jsx)(ns,{sources:p,hosts:!0,className:`footer-grounded`}),t[35]=p,t[36]=x),S=e.length>0&&(0,U.jsxs)(`div`,{className:`footer-keepgoing`,children:[(0,U.jsx)(`span`,{className:`footer-label`,children:`Keep going`}),(0,U.jsx)(`ul`,{className:`footer-list`,children:e.map(e=>(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,className:`kg-row`,onClick:()=>a(e.route),disabled:d,children:[(0,U.jsx)(`span`,{className:`kg-q`,children:e.label}),(0,U.jsx)(`span`,{className:`kg-arrow`,"aria-hidden":`true`,children:`→`})]})},e.label))})]}),t[2]=d,t[3]=r,t[4]=a,t[5]=c,t[6]=s,t[7]=l,t[8]=o,t[9]=i,t[10]=p,t[11]=n,t[12]=u,t[13]=m,t[14]=h,t[15]=g,t[16]=_,t[17]=v,t[18]=y,t[19]=b,t[20]=x,t[21]=S}else m=t[13],h=t[14],g=t[15],_=t[16],v=t[17],y=t[18],b=t[19],x=t[20],S=t[21];let C;t[37]!==d||t[38]!==h||t[39]!==g||t[40]!==_||t[41]!==v||t[42]!==c||t[43]!==s||t[44]!==l||t[45]!==o||t[46]!==n.track?.reason||t[47]!==u?(C=(v||g||h||_)&&(0,U.jsxs)(`div`,{className:`footer-chips`,children:[_&&(0,U.jsxs)(`button`,{type:`button`,className:`footer-feature-chip is-thread`,onClick:l,title:`Bring all ${u} moments of this topic thread together onto one canvas`,children:[`See all ${u} moments`,(0,U.jsx)(`span`,{className:`footer-chip-arrow`,"aria-hidden":`true`,children:`→`})]}),h&&(0,U.jsxs)(`button`,{type:`button`,className:`footer-feature-chip`,onClick:c,title:`Spread this answer's cards on a board you can wander — the Mavéa threads them together`,children:[`See this answer as a canvas`,(0,U.jsx)(`span`,{className:`footer-chip-arrow`,"aria-hidden":`true`,children:`→`})]}),g&&(0,U.jsxs)(`button`,{type:`button`,className:`footer-feature-chip`,onClick:s,title:`Explore this topic level by level — from the broad field down to the mechanism`,children:[`Explore this step by step`,(0,U.jsx)(`span`,{className:`footer-chip-arrow`,"aria-hidden":`true`,children:`→`})]}),v&&(0,U.jsxs)(`button`,{type:`button`,className:`footer-track`,onClick:o,disabled:d,title:n.track?.reason,children:[`Track this live`,(0,U.jsx)(`span`,{className:`footer-track-arrow`,"aria-hidden":`true`,children:`→`})]})]}),t[37]=d,t[38]=h,t[39]=g,t[40]=_,t[41]=v,t[42]=c,t[43]=s,t[44]=l,t[45]=o,t[46]=n.track?.reason,t[47]=u,t[48]=C):C=t[48];let w=`footer-disclaimer`+(m?``:` only`),T;t[49]===w?T=t[50]:(T=(0,U.jsx)(`p`,{className:w,children:`AI-generated; may be inaccurate, incomplete, or outdated. Verify important information. Not medical, legal, financial, or other professional advice.`}),t[49]=w,t[50]=T);let E;return t[51]!==y||t[52]!==b||t[53]!==x||t[54]!==S||t[55]!==C||t[56]!==T?(E=(0,U.jsxs)(`section`,{className:y,"aria-label":b,children:[x,S,C,T]}),t[51]=y,t[52]=b,t[53]=x,t[54]=S,t[55]=C,t[56]=T,t[57]=E):E=t[57],E}var hs=[`Alt`,`Control`,`Shift`],gs=[{side:`any`,label:`Either`},{side:`left`,label:`Left`},{side:`right`,label:`Right`}],_s=typeof navigator<`u`&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),vs={Alt:_s?`Option (⌥)`:`Alt`,Control:_s?`Control (⌃)`:`Ctrl`,Shift:_s?`Shift (⇧)`:`Shift`};function ys({children:e,holdEnabled:t,showHint:n=!0,pttKey:r,pttSide:i=`any`,onHoldStart:a,onHoldEnd:o,onChangePttKey:s,onChangePttSide:c}){on({enabled:t,pttKey:r,pttSide:i,onStart:a,onStop:o});let l=(0,H.useRef)(null),u=(0,H.useRef)(null),[d,f]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{let e=l.current,t=e?.closest(`.mavea-app`);if(!e||!t)return;let n=()=>t.style.setProperty(`--dock-h`,`${e.offsetHeight}px`);n();let r=typeof ResizeObserver>`u`?null:new ResizeObserver(n);return r?.observe(e),()=>{r?.disconnect(),t.style.removeProperty(`--dock-h`)}},[]),(0,H.useEffect)(()=>{if(!d)return;let e=e=>{u.current&&!u.current.contains(e.target)&&f(!1)},t=e=>{e.key===`Escape`&&(f(!1),u.current?.querySelector(`.dock-hint-btn`)?.focus())};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t)}},[d]),(0,U.jsxs)(`div`,{className:`live-dock dock-bar`,ref:l,children:[(0,U.jsx)(`div`,{className:`dock-main`,children:e}),t&&n&&(0,U.jsxs)(`div`,{className:`dock-hint-wrap`,ref:u,children:[(0,U.jsxs)(`button`,{type:`button`,className:`dock-hint dock-hint-btn`,onClick:()=>f(e=>!e),title:`Click to change hold-to-talk key`,children:[`Hold `,Qt(r||`Alt`,i),` to talk`]}),d&&(0,U.jsxs)(`div`,{className:`dock-hint-picker`,role:`menu`,"aria-label":`Choose hold-to-talk key`,children:[(0,U.jsx)(`div`,{className:`dock-hint-row`,children:hs.map(e=>(0,U.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":(r||`Alt`)===e,className:`dock-hint-key${(r||`Alt`)===e?` active`:``}`,title:vs[e],onClick:()=>s?.(e),children:Qt(e)},e))}),(0,U.jsx)(`div`,{className:`dock-hint-row dock-hint-sides`,children:gs.map(({side:e,label:t})=>(0,U.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":i===e,className:`dock-hint-key${i===e?` active`:``}`,title:e===`any`?`Either side of the key`:`Only the ${t.toLowerCase()} key`,onClick:()=>c?.(e),children:t},e))})]})]})]})}var bs=e=>e.toLowerCase().replace(/\s+/g,` `).trim();function xs(e){return bs(`${e.question} ${e.spec.title??``} ${e.narration}`)}function Ss(e){let t=new Map;return e.forEach((n,r)=>{let i=n.corrects;if(!i)return;let a=bs(i.what);if(a){for(let n=r-1;n>=0;n--)if(xs(e[n]).includes(a)){t.set(n,{note:i,by:r});return}}}),t}function Cs(e){if(!e)return``;try{return new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).formatToParts(new Date(e)).filter(e=>e.type===`hour`||e.type===`minute`||e.type===`literal`).map(e=>e.value).join(``).trim()}catch{return``}}function ws({chapters:e,frames:t,currentIndex:n,onJump:r,onReplay:i,onOverview:a,resumed:o,chatOpen:s,onToggleChat:c,collapsed:l,onToggleCollapse:u,onOpenPast:d,onStudy:f,roomIndices:p,bookmarks:m,onToggleBookmark:h,onViewMindMap:g,onSeeTogether:_}){let v=yn(),y=e.length===0,b=(0,H.useMemo)(()=>Ss(t),[t]);return(0,U.jsxs)(`aside`,{className:`side-rail`+(s?` chat-open`:``)+(l?` is-collapsed`:``),children:[(0,U.jsxs)(`button`,{type:`button`,className:`rail-mobile-toggle`,"aria-expanded":s,onClick:c,children:[(0,U.jsx)(L.chat,{}),s?`Hide session`:`This session`]}),(0,U.jsxs)(`div`,{className:`rail-head`,children:[u&&(0,U.jsx)(`button`,{type:`button`,className:`rail-collapse`,onClick:u,"aria-expanded":!l,"aria-label":l?`Expand the session panel`:`Collapse the session panel`,title:l?`Show this session`:`Hide this session`,children:(0,U.jsx)(L.panelLeft,{})}),(0,U.jsx)(`span`,{className:`rail-title sess-title`,children:`This session`}),(i||a)&&(0,U.jsxs)(`div`,{className:`rail-head-actions`,children:[i&&(0,U.jsx)(`button`,{type:`button`,className:`rail-history rail-icon`,onClick:i,title:`Replay earlier answers`,"aria-label":`Replay earlier answers`,children:(0,U.jsx)(L.play,{})}),a&&(0,U.jsx)(`button`,{type:`button`,className:`rail-history rail-icon`,onClick:a,title:`Zoom out to the whole conversation`,"aria-label":`Conversation overview`,children:(0,U.jsx)(L.layers,{})})]})]}),u&&(0,U.jsx)(`div`,{className:`rail-collapsed-label`,"aria-hidden":`true`,children:`This session`}),(0,U.jsxs)(`div`,{className:`rail-chat sess-list`,children:[o&&(0,U.jsx)(`div`,{className:`sess-note`,role:`note`,children:`Resumed — picking back up where you left off.`}),y?(0,U.jsx)(`div`,{className:`sess-note`,children:`Topics can wander — cooking, markets, your fantasy lineup. Mavéa keeps the thread.`}):e.map(e=>(0,U.jsxs)(`div`,{className:`sess-chapter`,style:{"--ch-c":e.color},children:[(0,U.jsxs)(`div`,{className:`sess-chapter-head`,children:[(0,U.jsx)(`div`,{className:`sess-chapter-label`,title:e.title,children:e.title}),_&&e.moments.length>=2&&(0,U.jsx)(`button`,{type:`button`,className:`sess-together`,onClick:()=>_(e),title:`See all ${e.moments.length} moments of this thread together on one canvas`,"aria-label":`See all ${e.moments.length} moments of this thread together`,children:(0,U.jsx)(L.table,{})})]}),e.moments.map(e=>{let i=b.get(e.frameIndex),a=t[e.frameIndex],o=a?String(a.at):null,s=o?m?.has(o)??!1:!1;return(0,U.jsxs)(`div`,{className:`sess-row-wrap`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`sess-row`+(e.frameIndex===n?` is-current`:``)+(i?` is-corrected`:``)+(s?` is-bookmarked`:``),onClick:()=>r(e.frameIndex),"aria-current":e.frameIndex===n?`true`:void 0,title:i?`${e.question} · Corrected later — ${i.note.what}: was ${i.note.was}, now ${i.note.now}`:e.question,children:[(0,U.jsx)(`span`,{className:`sess-time`,children:Cs(a?.at)}),(0,U.jsx)(`span`,{className:`sess-q`,children:e.question}),i&&(0,U.jsx)(`span`,{className:`sess-corrected`,children:`corrected`}),p?.has(e.frameIndex)&&(0,U.jsx)(`span`,{className:`sess-room`,children:`from the room`})]}),g&&a?.mind&&(0,U.jsx)(`button`,{type:`button`,className:`sess-mapview`,onClick:t=>{t.stopPropagation(),g(e.frameIndex)},title:`See the thinking map this answer grew from`,"aria-label":`View the thinking map`,children:(0,U.jsx)(L.sparkle,{})}),h&&o&&(0,U.jsx)(`button`,{type:`button`,className:`sess-bookmark${s?` on`:``}`,onClick:e=>{e.stopPropagation(),h(o)},title:s?`Remove bookmark`:`Bookmark this moment`,"aria-pressed":s,"aria-label":s?`Remove bookmark`:`Bookmark this moment`,children:s?`★`:`☆`})]},e.frameIndex)})]},e.id))]}),(d||f&&v)&&(0,U.jsxs)(`div`,{className:`rail-foot`,children:[d&&(0,U.jsxs)(`button`,{type:`button`,className:`rail-past`,onClick:d,children:[(0,U.jsx)(L.clock,{}),(0,U.jsx)(`span`,{children:`Past conversations`})]}),f&&v&&(0,U.jsxs)(`button`,{type:`button`,className:`rail-past`,onClick:f,children:[(0,U.jsx)(L.layers,{}),(0,U.jsxs)(`span`,{children:[v.count,` card`,v.count===1?``:`s`,` ready`]})]})]})]})}function Ts(e){let{spec:t,frames:n,viewIndex:r,narration:i,lastAsk:a}=e;if(!t)return null;let o=n.length-1;if(r!=null&&r!==o){let e=n[r];if(e)return{question:at(e.question)||null,narration:e.narration||e.spec.title}}let s=o>=0?n[o]:void 0,c=i||s?.narration||t.title;if(!c)return null;let l=i?a??s?.question:s?.question??a;return{question:at(l)||null,narration:c}}function Es(e){let t=(0,q.c)(3),n=(0,H.useRef)(null),[r,i]=(0,H.useState)(null),a,o;return t[0]===e?(a=t[1],o=t[2]):(a=()=>{if(e===`thinking`){n.current=performance.now();return}(e===`speaking`||e===`showing`)&&n.current!==null&&(i(Math.round(performance.now()-n.current)),n.current=null)},o=[e],t[0]=e,t[1]=a,t[2]=o),(0,H.useEffect)(a,o),r}function Ds(e){return e===null||!Number.isFinite(e)||e<0?null:e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function Os(e){return e===`circle`?`○`:e===`point`?`→`:e===`underline`?`—`:e===`highlight`?`▬`:e===`rising`?`↗`:e===`falling`?`↘`:e===`bracket`?`⊓`:e===`note`?`✎`:e===`connect`?`⤳`:e===`strike`?`✕`:e===`question`?`?`:e===`star`?`★`:e===`check`?`✓`:e===`frame`?`▢`:e===`brace`?`{`:`✦`}function ks(e){return e===`circle`?`circles`:e===`point`?`arrow:`:e===`underline`?`underlines`:e===`highlight`?`highlights`:e===`rising`?`trend up:`:e===`falling`?`trend down:`:e===`bracket`?`brackets`:e===`note`?`notes`:e===`connect`?`connects:`:e===`strike`?`strikes out`:e===`question`?`questions`:e===`star`?`stars`:e===`check`?`checks off`:e===`frame`?`frames`:e===`brace`?`groups`:`drew on`}function As(e){let t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}function js(e){if(e.kind===`connect`&&e.at&&e.to)return`${e.at} → ${e.to}`;if(e.at)return e.at;if(e.line){let t=e.line.split(/\s+/).slice(0,4).join(` `);return t.length<e.line.length?`${t}…`:t}return e.spot}function Ms(e){let t=(0,q.c)(42),{entries:n,turnStartMs:r,annotationsEnabled:i,hiddenSpots:a,onToggle:o,onKeep:s,onClear:c,onClip:l,onJumpTo:u,onToggleSpot:d}=e,f;t[0]===o?f=t[1]:(f=e=>{e.stopPropagation(),o()},t[0]=o,t[1]=f);let p=f,m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,U.jsx)(`span`,{className:`gesture-track-eyebrow`,children:`Gesture track`}),t[2]=m):m=t[2];let h=`gesture-track-toggle ${i?`on`:`off`}`,g=i?`Turn off drawing`:`Turn on drawing`,_=i?`Drawing on — tap to turn off`:`Drawing off — tap to turn on`,v;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,U.jsx)(`span`,{className:`gesture-track-toggle-icon`,children:`✦`}),t[3]=v):v=t[3];let y=i?`Pen on`:`Pen off`,b;t[4]===y?b=t[5]:(b=(0,U.jsx)(`span`,{children:y}),t[4]=y,t[5]=b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,U.jsx)(`span`,{className:`gesture-track-toggle-switch`,"aria-hidden":`true`,children:(0,U.jsx)(`span`,{className:`gesture-track-toggle-knob`})}),t[6]=x):x=t[6];let S;t[7]!==i||t[8]!==p||t[9]!==h||t[10]!==g||t[11]!==_||t[12]!==b?(S=(0,U.jsxs)(`div`,{className:`gesture-track-header`,children:[m,(0,U.jsxs)(`button`,{type:`button`,className:h,onClick:p,title:g,"aria-label":_,"aria-pressed":i,children:[v,b,x]})]}),t[7]=i,t[8]=p,t[9]=h,t[10]=g,t[11]=_,t[12]=b,t[13]=S):S=t[13];let C;if(t[14]!==n||t[15]!==a||t[16]!==u||t[17]!==d||t[18]!==r){let e;t[20]!==a||t[21]!==u||t[22]!==d||t[23]!==r?(e=e=>{let t=a?.has(e.spot)??!1;return(0,U.jsxs)(`li`,{className:`gesture-track-entry${t?` is-hidden`:``}`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`gesture-track-entry-btn`,onClick:()=>u?.(e.spot,e.toSpot),title:`Jump to this annotation`,children:[(0,U.jsx)(`span`,{className:`gesture-track-time`,children:As(e.inkedAt-r)}),(0,U.jsx)(`span`,{className:`gesture-track-icon`,"aria-hidden":`true`,children:Os(e.kind)}),(0,U.jsxs)(`span`,{className:`gesture-track-desc`,children:[e.stepNumber&&(0,U.jsxs)(`span`,{className:`gesture-track-step`,children:[`Step `,e.stepNumber]}),(0,U.jsx)(`span`,{className:`gesture-track-verb`,children:ks(e.kind)}),` `,(0,U.jsx)(`span`,{className:`gesture-track-target`,title:js(e),children:js(e)})]})]}),d&&(0,U.jsx)(`button`,{type:`button`,className:`gesture-track-eye`,onClick:t=>{t.stopPropagation(),d(e.spot)},title:t?`Show annotation`:`Hide annotation`,"aria-pressed":t,"aria-label":t?`Show annotation`:`Hide annotation`,children:t?(0,U.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":`true`,children:[(0,U.jsx)(`path`,{d:`M1.5 1.5L10.5 10.5M5 5.3C5 5.3 5.4 5 6 5c.9 0 1.5.7 1.5 1.5 0 .5-.2.9-.5 1.2`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,U.jsx)(`path`,{d:`M2 3.5C1 4.4.5 5.2.5 6s1.5 3 5.5 3c.9 0 1.7-.1 2.4-.4M10 8.5c1-1 1.5-1.8 1.5-2.5s-1.5-3-5.5-3c-.5 0-1 0-1.4.1`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`})]}):(0,U.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":`true`,children:[(0,U.jsx)(`ellipse`,{cx:`6`,cy:`6`,rx:`5.5`,ry:`3`,stroke:`currentColor`,strokeWidth:`1.2`}),(0,U.jsx)(`circle`,{cx:`6`,cy:`6`,r:`1.5`,fill:`currentColor`})]})})]},`${e.spot}|${e.kind??``}|${e.at??``}`)},t[20]=a,t[21]=u,t[22]=d,t[23]=r,t[24]=e):e=t[24],C=n.map(e),t[14]=n,t[15]=a,t[16]=u,t[17]=d,t[18]=r,t[19]=C}else C=t[19];let w;t[25]===C?w=t[26]:(w=(0,U.jsx)(`ol`,{className:`gesture-track-list`,"aria-label":`Drawn gestures`,children:C}),t[25]=C,t[26]=w);let T;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,U.jsx)(`p`,{className:`gesture-track-hint`,children:`Your blue ink, Mavéa's orange. Tap an entry to jump to it.`}),t[27]=T):T=t[27];let E;t[28]===s?E=t[29]:(E=(0,U.jsx)(`button`,{type:`button`,className:`gesture-track-btn primary`,onClick:s,children:`Keep annotations`}),t[28]=s,t[29]=E);let D;t[30]===l?D=t[31]:(D=l&&(0,U.jsx)(`button`,{type:`button`,className:`gesture-track-btn`,onClick:l,children:`Clip this moment`}),t[30]=l,t[31]=D);let O;t[32]===c?O=t[33]:(O=(0,U.jsx)(`button`,{type:`button`,className:`gesture-track-btn ghost`,onClick:c,children:`Clear`}),t[32]=c,t[33]=O);let k;t[34]!==E||t[35]!==D||t[36]!==O?(k=(0,U.jsxs)(`div`,{className:`gesture-track-actions`,children:[E,D,O]}),t[34]=E,t[35]=D,t[36]=O,t[37]=k):k=t[37];let A;return t[38]!==S||t[39]!==w||t[40]!==k?(A=(0,U.jsxs)(`div`,{className:`gesture-track`,role:`complementary`,"aria-label":`Gesture track`,children:[S,w,T,k]}),t[38]=S,t[39]=w,t[40]=k,t[41]=A):A=t[41],A}function Ns(e){let t=(0,q.c)(13),{enabled:n,open:r,inkCount:i,onClick:a}=e,o=`pen-toggle-pill ${n?`on`:`off`}${r?` open`:``}`,s=r?`Close pen panel`:`Open pen panel`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,U.jsx)(`span`,{"aria-hidden":`true`,children:`✦`}),t[0]=c):c=t[0];let l=n?`Pen on`:`Pen off`,u;t[1]===l?u=t[2]:(u=(0,U.jsx)(`span`,{children:l}),t[1]=l,t[2]=u);let d;t[3]!==i||t[4]!==r?(d=!r&&i>0&&(0,U.jsx)(`span`,{className:`pen-ink-count`,"aria-label":`${i} marks drawn`,children:i}),t[3]=i,t[4]=r,t[5]=d):d=t[5];let f;return t[6]!==a||t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==u||t[11]!==d?(f=(0,U.jsxs)(`button`,{type:`button`,className:o,onClick:a,title:s,"aria-expanded":r,"aria-haspopup":`true`,children:[c,u,d]}),t[6]=a,t[7]=r,t[8]=o,t[9]=s,t[10]=u,t[11]=d,t[12]=f):f=t[12],f}var Ps=/\b(teach me|walk me through|tutor( me)?|step[- ]by[- ]step|like i'?m (five|5|a beginner|new))\b/i;function Fs(e){return!!e&&Ps.test(e)}function X(e){if(e.length===0)return``;let t=`M ${e[0].x} ${e[0].y}`;for(let n=1;n<e.length;n++)t+=` L ${e[n].x} ${e[n].y}`;return t}var Z=4,Is=2e3;function Ls(e,t=Z){if(e.length<=1)return e.slice();let n=0;for(let t=1;t<e.length;t++)n+=Math.hypot(e[t].x-e[t-1].x,e[t].y-e[t-1].y);let r=Math.max(t,n/Is),i=[e[0]];for(let t=1;t<e.length;t++){let n=e[t-1],a=e[t],o=Math.hypot(a.x-n.x,a.y-n.y),s=Math.floor(o/r);for(let e=1;e<=s;e++){let t=e*r/o;i.push({x:n.x+(a.x-n.x)*t,y:n.y+(a.y-n.y)*t})}let c=i[i.length-1];(c.x!==a.x||c.y!==a.y)&&i.push(a)}return i}function Rs(e){let t=0;for(let n=1;n<e.length;n++)t+=Math.hypot(e[n].x-e[n-1].x,e[n].y-e[n-1].y);return t}function zs(e){if(e.length<3)return 0;let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];t+=r.x*i.y-i.x*r.y}return Math.abs(t)/2}function Bs(e){let t=e[0].x,n=e[0].x,r=e[0].y,i=e[0].y;for(let a of e)a.x<t&&(t=a.x),a.x>n&&(n=a.x),a.y<r&&(r=a.y),a.y>i&&(i=a.y);return{minX:t,minY:r,maxX:n,maxY:i}}function Vs(e){if(e.length<4)return!1;let{minX:t,minY:n,maxX:r,maxY:i}=Bs(e),a=Math.hypot(r-t,i-n),o=Rs(e);if(a<10||o<10)return!1;let s=e[0],c=e[e.length-1],l=Math.hypot(c.x-s.x,c.y-s.y)<=Math.max(16,a*.35),u=zs(e)>o*o*.02;return l||u}function Hs(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r].x,o=t[r].y,s=t[i].x,c=t[i].y;o>e.y!=c>e.y&&e.x<(s-a)*(e.y-o)/(c-o)+a&&(n=!n)}return n}var Us=3e3;function Ws(e,t=Z,n=Us){let{minX:r,minY:i,maxX:a,maxY:o}=Bs(e),s=a-r,c=o-i;if(s<=0||c<=0)return[];let l=Math.max(1,Math.round(s/t))*Math.max(1,Math.round(c/t))>n?Math.sqrt(s*c/n):t,u=[];for(let t=i+l/2;t<o;t+=l)for(let i=r+l/2;i<a;i+=l){let r={x:i,y:t};if(Hs(r,e)&&(u.push(r),u.length>=n))return u}return u}var Gs=4,Ks=4e3,qs=`input, textarea, select, button, a, summary, [contenteditable], [role="slider"], [role="tab"], [role="switch"], [draggable="true"], .block-ask, .geo-map, [data-interactive]`;function Js({armed:e,rootRef:t,onStroke:n,onTap:r,strokes:i,highlights:a}){let o=(0,H.useRef)(null),s=(0,H.useRef)(null),c=(0,H.useRef)(null),l=(0,H.useRef)([]),u=(0,H.useRef)(null),d=(0,H.useRef)(!1),f=(0,H.useRef)(!1),p=(0,H.useRef)(null),m=(0,H.useRef)(0),h=(0,H.useRef)(e);h.current=e;let g=(0,H.useRef)(n);g.current=n;let _=(0,H.useRef)(r);return _.current=r,(0,H.useEffect)(()=>{let n=t.current;if(n)return n.classList.toggle(`ink-armed`,e),()=>n.classList.remove(`ink-armed`)},[e,t]),(0,H.useEffect)(()=>{let e=t.current,n=o.current;if(!e||!n)return;let r=e=>{let t=n.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},i=()=>({stage:e,svgRect:n.getBoundingClientRect()}),a=()=>{let e=X(l.current);s.current?.setAttribute(`d`,e),c.current?.setAttribute(`d`,e)},v=()=>{s.current?.setAttribute(`d`,``),c.current?.setAttribute(`d`,``)},y=()=>{l.current=[],u.current=null,d.current=!1,f.current=!1,p.current=null},b=t=>{try{e.setPointerCapture(t)}catch{}},x=t=>{try{e.hasPointerCapture?.(t)&&e.releasePointerCapture(t)}catch{}},S=()=>{p.current!=null&&x(p.current),e.classList.remove(`ink-capturing`),y(),v()},C=()=>{document.hidden&&S()},w=e=>{if(d.current||f.current){if(performance.now()-m.current>Ks)S();else return}if(!(h.current||e.pointerType===`pen`)||e.target?.closest?.(qs))return;m.current=performance.now(),d.current=!0,p.current=e.pointerId;let t=r(e);u.current=t,l.current=[t]},T=t=>{if(p.current!==t.pointerId||!d.current&&!f.current)return;let n=r(t);if(!f.current){if(Math.hypot(n.x-(u.current?.x??n.x),n.y-(u.current?.y??n.y))<Gs)return;f.current=!0,b(t.pointerId),e.classList.add(`ink-capturing`)}t.preventDefault(),l.current.push(n),a()},E=t=>{if(p.current!==t.pointerId)return;let n=f.current,r=d.current,a=l.current,o=u.current;x(t.pointerId),e.classList.remove(`ink-capturing`),y(),v(),n&&a.length>=2?g.current(a,i()):r&&!n&&o&&_.current?.(o,i())},D=e=>{p.current===e.pointerId&&S()};return e.addEventListener(`pointerdown`,w),window.addEventListener(`pointermove`,T),window.addEventListener(`pointerup`,E),window.addEventListener(`pointercancel`,D),window.addEventListener(`blur`,S),document.addEventListener(`visibilitychange`,C),()=>{e.removeEventListener(`pointerdown`,w),window.removeEventListener(`pointermove`,T),window.removeEventListener(`pointerup`,E),window.removeEventListener(`pointercancel`,D),window.removeEventListener(`blur`,S),document.removeEventListener(`visibilitychange`,C),p.current!=null&&x(p.current),e.classList.remove(`ink-capturing`,`ink-armed`)}},[t]),(0,U.jsxs)(`svg`,{ref:o,className:`ink-user-overlay`,"aria-hidden":`true`,children:[a?.map((e,t)=>e.w>0&&e.h>0?(0,U.jsx)(`rect`,{className:`ink-highlight`,x:e.x,y:e.y,width:e.w,height:e.h,rx:3,ry:3},`h`+t):null),i?.map((e,t)=>(0,U.jsx)(`path`,{className:`ink-user-stroke ink-user-settled`,d:e},t)),(0,U.jsx)(`path`,{ref:c,className:`ink-user-halo`,d:``}),(0,U.jsx)(`path`,{ref:s,className:`ink-user-stroke`,d:``})]})}var Ys=80,Xs=`.ink-user-overlay, .ink-layer, .block-ask, .card-eyebrow`,Zs=e=>{let t=e.replace(/\s+/g,` `).trim();return t.length>Ys?t.slice(0,79)+`…`:t};function Qs(e){return!e.data||!e.data.trim()?!1:!e.parentElement?.closest(Xs)}function $s(e){if(e.min!==e.max)return[e.min,e.max];let t=e.node.data,n=e.min,r=e.min;for(;n>0&&!/\s/.test(t[n-1]);)n--;for(;r<t.length&&!/\s/.test(t[r]);)r++;return n<r?[n,r]:[e.min,e.min+1]}function ec(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}function tc(e){let t=e.nodeType===Node.TEXT_NODE?e.parentElement:e;for(;t;t=t.parentElement){let e=t.getAttribute?.(`data-spot-id`);if(e)return e}return``}function nc(e,t,n){try{let r=document.createRange(),i=e.length;r.setStart(e,Math.max(0,Math.min(t,i))),r.setEnd(e,Math.max(0,Math.min(n,i)));let a=r.getClientRects(),o=[];for(let e=0;e<a.length;e++){let t=a[e];t&&t.width>0&&t.height>0&&o.push(t)}return o}catch{return[]}}function rc(e){let t=[...e.values()],n=e=>{let[t,n]=$s(e);return e.node.data.slice(t,n)},r=t[0];for(let e of t)(e.samples>r.samples||e.samples===r.samples&&n(e).length>n(r).length)&&(r=e);let i=[...t].sort((e,t)=>ec(e.node,t.node)),a=Zs(i.map(n).filter(e=>e.trim()).join(` `));if(!a)return null;let o=[];for(let e of i){let[t,n]=$s(e);o.push(...nc(e.node,t,n))}return{text:a,blockId:tc(r.node),rects:o}}function ic(e){let t=e.matches?.(`text, tspan`)?e:e.closest?.(`text, tspan`),n=e.closest?.(`[aria-label]`),r=[t?.textContent,n?.getAttribute(`aria-label`),e.getAttribute?.(`alt`),e.getAttribute?.(`title`)];for(let e of r)if(e?.trim())return e;return``}function ac(e,t){if(e.length===0)return null;let n=e[Math.floor(e.length/2)];for(let e of t.elementsAt(n.x,n.y)){if(e.closest?.(Xs))continue;let t=ic(e);if(t)return{text:Zs(t),blockId:tc(e),rects:[e.getBoundingClientRect()]}}return null}function oc(e,t){let n=new Map,r=[];for(let i of e){let e=t.caretAt(i.x,i.y);if(e&&Qs(e.node)){let t=n.get(e.node);t?(e.offset<t.min&&(t.min=e.offset),e.offset>t.max&&(t.max=e.offset),t.samples++):n.set(e.node,{node:e.node,min:e.offset,max:e.offset,samples:1})}else r.push(i)}return n.size>0?rc(n):ac(r,t)}function sc(e,t,n){if(e.length===0)return null;let r=e=>({x:e.x+t.left,y:e.y+t.top});if(Vs(e)){let t=Ws(e.map(r)),i=t.length>0?oc(t,n):null;if(i)return i}let i=Ls(e).map(r);return i.length===0?null:oc(i,n)}var cc=6,lc=14;function uc(e,t,n,r){try{if(e.length===0)return!1;let i=Math.min(t,e.length-1),a=document.createRange();a.setStart(e,i),a.setEnd(e,i+1);let o=a.getClientRects();if(o.length===0)return!0;for(let e=0;e<o.length;e++){let t=o[e];if(n>=t.left-cc&&n<=t.right+cc&&r>=t.top-lc&&r<=t.bottom+lc)return!0}return!1}catch{return!0}}function dc(e,t){let n=document,r=null,i=0;if(typeof n.caretRangeFromPoint==`function`){let a=n.caretRangeFromPoint(e,t);a&&a.startContainer.nodeType===Node.TEXT_NODE&&(r=a.startContainer,i=a.startOffset)}else if(typeof document.caretPositionFromPoint==`function`){let n=document.caretPositionFromPoint(e,t);n&&n.offsetNode.nodeType===Node.TEXT_NODE&&(r=n.offsetNode,i=n.offset)}return!r||!uc(r,i,e,t)?null:{node:r,offset:i}}var fc={caretAt:dc,elementsAt:(e,t)=>document.elementsFromPoint(e,t)};function pc(e,t,n=fc){let r=sc(e,t.svgRect,n);return!r||!r.text?null:{intent:{kind:`highlight`,blockIds:r.blockId?[r.blockId]:[],textAt:r.text},rects:r.rects}}function mc(e,t){return e.map(e=>({x:e.left-t.left,y:e.top-t.top,w:e.width,h:e.height}))}function hc(e){let{onCommit:t,resetKey:n,hitTester:r}=e,[i,a]=(0,H.useState)([]),[o,s]=(0,H.useState)(0),c=(0,H.useRef)(i);c.current=i;let l=(0,H.useRef)(t);l.current=t;let u=(0,H.useCallback)((e,t,n)=>{let i=pc(e,n,r);if(!i)return s(e=>e+1),!1;let o={intent:i.intent,stroke:t,rects:mc(i.rects,n.svgRect)};return a(e=>[...e,o]),!0},[r]),d=(0,H.useCallback)((e,t)=>{u(e,X(e),t)},[u]),f=(0,H.useCallback)((e,t)=>{u([e,{x:e.x+1,y:e.y+1}],``,t)},[u]),p=(0,H.useCallback)(e=>{a(t=>e==null?t.slice(0,-1):t.filter((t,n)=>n!==e))},[]),m=(0,H.useCallback)(()=>{let e=c.current;e.length&&l.current(e.map(e=>e.intent)),a([])},[]),h=(0,H.useCallback)(()=>a([]),[]);(0,H.useEffect)(()=>{a([])},[n]);let g=i.map(e=>e.intent),_=i.map(e=>e.stroke).filter(Boolean),v=i.flatMap(e=>e.rects);return{phase:i.length?`pinned`:`idle`,pins:i,intents:g,strokes:_,highlights:v,miss:o,onStroke:d,onTap:f,undo:p,send:m,clear:h}}var gc=e=>e.length>22?e.slice(0,21)+`…`:e;function _c(e){return e.textAt?`Marked “${gc(e.textAt)}”`:`Marked`}function vc(e){if(e.length===0)return``;let t=e[0]?.textAt?.trim(),n=t?`Tell me about “${gc(t)}”`:`Tell me about this`;return e.length===1?n:`${n} (and ${e.length-1} more)`}function yc(e){let t=new Set,n=[];for(let r of e)!r.id||t.has(r.id)||(t.add(r.id),n.push(r));return n}function bc(e,t){let n=new Map;for(let e of t)e.id&&n.set(e.id,e);let r=[],i=[],a=new Set;for(let t of e){let e=t.blockIds;if(!(e.length>0&&!e.every(e=>n.has(e)))){r.push(t);for(let t of e){if(a.has(t))continue;a.add(t);let e=n.get(t);e&&i.push(e)}}}return{intents:r,blocks:i}}function xc(e){let t=(0,q.c)(15),{pins:n,onUndo:r,onSend:i}=e;if(n.length===0)return null;let a=n.length,o=a>1?`s`:``,s;t[0]!==a||t[1]!==o?(s=(0,U.jsxs)(`span`,{className:`ink-sr`,role:`status`,children:[`Highlighted `,a,` part`,o]}),t[0]=a,t[1]=o,t[2]=s):s=t[2];let c;if(t[3]!==r||t[4]!==n){let e;t[6]===r?e=t[7]:(e=(e,t)=>(0,U.jsxs)(`span`,{className:`ink-chip`,children:[(0,U.jsx)(`span`,{className:`ink-chip-text`,children:_c(e.intent)}),(0,U.jsx)(`button`,{type:`button`,className:`ink-chip-x`,"aria-label":`Remove ${e.intent.textAt||`mark`}`,onClick:()=>r(t),children:(0,U.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`11`,height:`11`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M6 6l12 12M18 6L6 18`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`})})})]},t),t[6]=r,t[7]=e),c=n.map(e),t[3]=r,t[4]=n,t[5]=c}else c=t[5];let l=`Ask about the ${a} highlighted part${a>1?`s`:``}`,u;t[8]!==i||t[9]!==l?(u=(0,U.jsx)(`button`,{type:`button`,className:`ink-chip-act primary`,onClick:i,title:l,children:`Ask`}),t[8]=i,t[9]=l,t[10]=u):u=t[10];let d;return t[11]!==s||t[12]!==c||t[13]!==u?(d=(0,U.jsxs)(`div`,{className:`ink-dock`,role:`group`,"aria-label":`Highlighted parts to ask about`,children:[s,c,u]}),t[11]=s,t[12]=c,t[13]=u,t[14]=d):d=t[14],d}var Sc=`mavea-ink-hint-seen`;function Cc(){try{return localStorage.getItem(Sc)===`1`}catch{return!0}}function wc({armed:e,pins:t,miss:n=0,onUndo:r,onSend:i}){let[a,o]=(0,H.useState)(Cc),s=!a&&!e&&t.length===0,c=e&&t.length===0,[l,u]=(0,H.useState)(!1);(0,H.useEffect)(()=>{if(!n)return;u(!0);let e=setTimeout(()=>u(!1),2600);return()=>clearTimeout(e)},[n]),(0,H.useEffect)(()=>{if(!(a||!e&&t.length===0)){o(!0);try{localStorage.setItem(Sc,`1`)}catch{}}},[e,t.length,a]);let d=()=>{o(!0);try{localStorage.setItem(Sc,`1`)}catch{}},f=t.length>0;return!s&&!c&&!l&&!f?null:(0,U.jsxs)(`div`,{className:`ink-bar`+(s?` coaching`:``),children:[s&&(0,U.jsxs)(`div`,{className:`ink-coach`,role:`note`,children:[(0,U.jsx)(`span`,{className:`ink-coach-spark`,"aria-hidden":`true`,children:`✍️`}),(0,U.jsxs)(`span`,{className:`ink-coach-text`,children:[(0,U.jsx)(`strong`,{children:`Highlight to ask.`}),` Turn on `,(0,U.jsx)(`strong`,{children:`Highlight`}),`, then drag across any value, label, or card to grab it. Ask in your own words, and a pen draws straight away.`]}),(0,U.jsx)(`button`,{type:`button`,className:`ink-coach-x`,title:`Dismiss`,"aria-label":`Got it`,onClick:d,children:(0,U.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M6 6l12 12M18 6L6 18`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})})})]}),c&&!l&&(0,U.jsxs)(`span`,{className:`ink-howto`,role:`status`,children:[(0,U.jsx)(`span`,{className:`ink-howto-dot`,"aria-hidden":`true`}),`Drag across any value, label, or card on the answer to grab it. Then ask in your own words.`]}),l&&!s&&(0,U.jsx)(`span`,{className:`ink-miss`,role:`status`,children:`Nothing to grab there. Drag across a value, label, or card.`}),f&&(0,U.jsx)(xc,{pins:t,onUndo:r,onSend:i})]})}function Tc(e){let t=(0,q.c)(10),{armed:n,onToggle:r}=e,i=`mark-toggle`+(n?` on`:``),a=n?`Highlighter on — drag across the answer to ask about it`:`Highlight the answer to ask about it`,o;t[0]!==n||t[1]!==r?(o=()=>r(!n),t[0]=n,t[1]=r,t[2]=o):o=t[2];let s,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,U.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`15`,height:`15`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinejoin:`round`,strokeLinecap:`round`})}),c=(0,U.jsx)(`span`,{className:`mark-toggle-label`,children:`Highlight`}),t[3]=s,t[4]=c):(s=t[3],c=t[4]);let l;return t[5]!==n||t[6]!==i||t[7]!==a||t[8]!==o?(l=(0,U.jsxs)(`button`,{type:`button`,className:i,"aria-pressed":n,"aria-label":a,title:`Highlight to ask`,onClick:o,children:[s,c]}),t[5]=n,t[6]=i,t[7]=a,t[8]=o,t[9]=l):l=t[9],l}var Ec=`mavea-brief-date`,Dc=Ec,Oc=void 0;function kc(){return new Date().toISOString().slice(0,10)}function Ac(){try{return typeof localStorage>`u`?null:localStorage.getItem(Ec)}catch{return null}}function jc(){return Oc===void 0&&(Oc=Ac()),Oc}function Mc(e){Oc=e;try{typeof localStorage<`u`&&localStorage.setItem(Ec,e)}catch{}try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(Dc,{detail:e}))}catch{}}function Nc(e){return e?jc()!==kc():!1}function Pc(){Mc(kc())}function Fc(e){let t=[];return t.push(`You are Mavéa, an AI presence. Generate a concise morning brief (max 3 items). Use real, grounded information only — no invented data, no placeholder numbers.`),e.length>0&&(t.push(``),t.push(`They recently discussed: ${e.join(`, `)}.`)),t.push(``),t.push(`Produce exactly 3 blocks in a warm, alive morning format using only insight, text, or list block types. Start your response with a single short narration sentence — natural and calm, like "Here's your morning." or "Good morning. Here's a brief look at your day." — then emit the blocks. Do not explain what you are doing; just deliver the brief.`),t.join(`
|
|
3
|
-
`)}var Ic=99;function Lc(e){return e>Ic?`${Ic}+`:String(e)}function Rc(){for(let e of Vn()){let t=Wn(e.id),n=e.lessons.length;if(!n)continue;let r=e.lessons.filter(e=>t.lessons[e.id]?.status===`done`).length;if(!(r>=n)&&(r!==0||t.current!==0))return{title:e.title,sub:`Lesson ${Math.min(t.current+1,n)} of ${n}`}}return null}function zc(e){let t=(0,q.c)(16),{onStudy:n}=e,r=yn(),i;if(t[0]!==r||t[1]!==n){if(i=[],r){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(L.layers,{}),t[3]=e):e=t[3];let a;t[4]===r.count?a=t[5]:(a=Lc(r.count),t[4]=r.count,t[5]=a);let o=`${a} card${r.count===1?``:`s`}`,s;t[6]!==r.label||t[7]!==n||t[8]!==o?(s={key:`cards`,icon:e,title:o,sub:r.label,action:`Study`,onPick:n},t[6]=r.label,t[7]=n,t[8]=o,t[9]=s):s=t[9],i.push(s)}let e;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=Rc(),t[10]=e):e=t[10];let a=e;if(a){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(L.play,{}),t[11]=e):e=t[11];let n;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(n={key:`course`,icon:e,title:a.title,sub:a.sub,action:`Continue`,onPick:Vc},t[12]=n):n=t[12],i.push(n)}t[0]=r,t[1]=n,t[2]=i}else i=t[2];let a=i;if(!a.length)return null;let o;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,U.jsx)(`span`,{className:`card-eyebrow`,children:`Ready when you are`}),t[13]=o):o=t[13];let s;return t[14]===a?s=t[15]:(s=(0,U.jsxs)(`section`,{className:`ready-shelf go-study`,children:[o,(0,U.jsx)(`ul`,{className:`ready-list`,children:a.map(Bc)})]}),t[14]=a,t[15]=s),s}function Bc(e){return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,className:`ready-item`,onClick:e.onPick,children:[(0,U.jsx)(`span`,{className:`ready-icon`,"aria-hidden":!0,children:e.icon}),(0,U.jsxs)(`span`,{className:`ready-copy`,children:[(0,U.jsx)(`span`,{className:`ready-title`,children:e.title}),(0,U.jsx)(`span`,{className:`ready-sub`,children:e.sub})]}),(0,U.jsx)(`span`,{className:`ready-go`,children:e.action})]})},e.key)}function Vc(){window.location.hash=`#/courses`}function Hc(e){return e.type===`flashcard`&&Array.isArray(e.props?.cards)}function Uc(e){return e.replace(/<[^>]+>/g,``).trim()}function Wc(e){let t=[];for(let n of e){if(!Hc(n))continue;let e=n;for(let n of e.props.cards){let e=Uc(n.front??``),r=Uc(n.back??``);!e||!r||t.push({front:e,back:r,tag:n.tag?Uc(n.tag):void 0})}}return t}function Gc(e){return Uc(e??``).trim()}function Kc(e){let t=[],n=(e,n,r)=>{let i=Gc(e),a=Gc(n);i&&a&&t.push({front:i,back:a,tag:Gc(r)||void 0})};switch(e.type){case`flashcard`:for(let t of e.props.cards??[])n(t.front,t.back,t.tag);break;case`faq`:for(let t of e.props.items??[])n(t.q,t.a,t.tag);break;case`deflist`:for(let t of e.props.items??[])n(t.term,t.def,t.tag);break;case`quiz`:{let t=(e.props.options??[]).filter(e=>e.correct).map(e=>Gc(e.text)).filter(Boolean);if(t.length){let r=Gc(e.props.explanation),i=r?`${t.join(`; `)} — ${r}`:t.join(`; `);n(e.props.question,i)}break}}return t}var qc=[`title`,`label`,`heading`,`name`,`question`,`caption`,`eyebrow`],Jc=[`summary`,`narrative`,`detail`,`sub`,`body`,`text`,`prose`,`def`,`a`];function Yc(e){return e.props??{}}function Xc(e,t){for(let n of t){let t=e[n];if(typeof t==`string`){let e=Gc(t);if(e)return e}}return``}function Zc(e){return Xc(Yc(e),qc).slice(0,140)||ce(e)}function Qc(e){return Xc(Yc(e),Jc).slice(0,400)}function $c(e){return{front:Zc(e),back:Qc(e)}}function el(e){let t=[],n=Zc(e);n&&t.push(n);for(let[,r]of Object.entries(Yc(e)))if(typeof r==`string`){let e=Gc(r);e&&e!==n&&t.push(e)}else if(Array.isArray(r)){for(let e of r.slice(0,12))if(typeof e==`string`){let n=Gc(e);n&&t.push(n)}else if(e&&typeof e==`object`)for(let n of[`label`,`text`,`term`,`def`,`q`,`a`,`name`,`value`,`title`]){let r=e[n];if(typeof r==`string`){let e=Gc(r);e&&t.push(e)}}}return[...new Set(t)].join(`
|
|
4
|
-
`).slice(0,1400)}function tl(e){let t=Kc(e);return t.length?{cards:t,exact:!0}:{cards:[$c(e)],exact:!1}}var Q=`You write flashcards the way a strong student does: atomic (one idea per card), concise (no long prose), and focused on what is worth memorising — key facts, definitions and terms, formulas, cause→effect, and a single concrete example when it aids recall. The FRONT is a clear question or cue; the BACK is the shortest complete answer. Use ONLY information present in the source text — never add facts not stated there. Return 1–4 cards as JSON of the form {"cards":[{"front":"…","back":"…"}]}.`,nl={type:`object`,properties:{cards:{type:`array`,minItems:1,maxItems:4,items:{type:`object`,properties:{front:{type:`string`},back:{type:`string`}},required:[`front`,`back`]}}},required:[`cards`]};function rl(e){let t=e;if(typeof e==`string`){let n=e.trim();try{t=JSON.parse(n)}catch{let e=n.match(/\{[\s\S]*\}/);if(!e)return[];try{t=JSON.parse(e[0])}catch{return[]}}}let n=t?.cards;if(!Array.isArray(n))return[];let r=[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=Gc(String(e.front??``)).slice(0,300),n=Gc(String(e.back??``)).slice(0,600);t&&n&&r.push({front:t,back:n})}return r.slice(0,4)}async function il(e,t,n){let r=el(e);if(!r)return[];let i=Yn(t.model)===`slow`?480:640;try{let e=await At(t.provider).generate({system:Q,systemBase:Q,history:[],user:`Source (from the answer the user is studying):\n"""\n${r}\n"""\n\nWrite the flashcards now.`,maxTokens:i,temperature:0,thinkingLevel:`minimal`,format:nl,...n?{signal:n}:{}},t);return n?.aborted?[]:rl(e.raw)}catch{return[]}}var al=`tour-neural-networks`,ol=`neural`,sl=[{id:`loop`,title:`The learning loop`,minutes:8,goal:`See the guess-measure-adjust cycle every network repeats to learn.`,objectives:[`Name the three steps a network learns by`,`Read what a training curve is telling you`,`Explain what a "weight" is in one sentence`],concepts:[`training loop`,`loss`,`weights`],checkpoint:[{question:`What are the three repeating steps a network learns by?`,answer:`Make a guess (forward pass), measure the error (loss), then nudge the weights to shrink it.`},{question:`When a training curve slopes downward, what is falling?`,answer:`The loss — the network is getting the answer wrong by less on each pass.`}]},{id:`neuron`,title:`Inside a single neuron`,minutes:7,goal:`Open up one neuron and watch it turn inputs into a decision.`,objectives:[`Compute a weighted sum of inputs plus a bias`,`Explain why an activation is needed at all`],concepts:[`weighted sum`,`activation function`,`bias`]},{id:`backprop`,title:`How it assigns blame`,minutes:10,goal:`Follow the error backward so the network knows which weights to change.`,objectives:[`State gradient descent in one line`,`Describe what backpropagation actually updates`],concepts:[`gradient descent`,`backpropagation`]},{id:`data`,title:`Why data and depth matter`,minutes:8,goal:`Understand what more layers and more examples buy you — and where they hurt.`,objectives:[`Relate depth to the abstractions a network can form`,`Explain overfitting in a single sentence`],concepts:[`depth`,`generalization`,`overfitting`]},{id:`tuning`,title:`Making it learn well`,minutes:9,goal:`Meet the handful of dials that decide whether training works at all.`,objectives:[`Explain what the learning rate controls`,`Say why training happens in batches`],concepts:[`learning rate`,`batch size`,`epochs`]}];function cl(){let e=Gn(al);if(e)return e;let t=Cr(ol)?.frames[0];if(!t)return null;let n={id:al,topic:`how neural networks learn`,title:`How neural networks learn`,subtitle:`From one neuron to a trained model, in five short sittings.`,level:`beginner`,lessons:sl,createdAt:Date.now(),model:`tour`};return Un(n),qn(al,sl[0].id,t),n}var ll=24e3,ul=ll*180,dl=[],fl=null,pl=[],ml=0,hl=!1,gl=!1,_l=1,vl=0,yl=new Set;function bl(){vl+=1;for(let e of yl)e()}function xl(e){return yl.add(e),()=>yl.delete(e)}function Sl(){return vl}function Cl(){return ml/ll}function wl(){dl=[],fl=null,pl=[],ml=0,_l=Ee(),hl=!0,bl()}function Tl(){hl=!1,fl=null,bl()}function El(e){gl=e}function Dl(e){if(!hl||gl)return;let t=pl[pl.length-1];t&&t.blocks===e||pl.push({t:Cl(),blocks:e})}var Ol={begin(e){!hl||gl||(fl={text:e,chunks:[],samples:0})},push(e){!hl||gl||!fl||ml+e.length>ul||(fl.chunks.push(e),fl.samples+=e.length,ml+=e.length)},end(e){if(!(!hl||!fl)){if(gl){ml-=fl.samples,fl=null;return}e&&fl.samples>0?dl.push(fl):ml-=fl.samples,fl=null,bl()}}};function kl(){let e=dl.reduce((e,t)=>e+t.samples,0);if(e===0)return null;let t=new Float32Array(e),n=[],r=0;for(let e of dl){let i=r/ll;for(let n of e.chunks)t.set(n,r),r+=n.length;n.push({text:e.text,t0:i,t1:r/ll})}let i=e/ll;return{pcm:t,sampleRate:ll,duration:i,spans:n,marks:pl.map(e=>({t:Math.min(e.t,i),blocks:e.blocks})),speed:_l}}function Al(e,t){let n=0;for(let r of e.marks){if(r.t>t)break;n=r.blocks}return n}var jl=e=>e.saySpoken??e.say??``;function Ml(e){let t=new Map;for(let n of e){let e=B(be(jl(n)));e&&!t.has(e)&&t.set(e,n.index)}return t}function Nl(e,t,n,r){if(t>=e.duration-.05)return r;let i=Al(e,t),a=Ml(n);for(let r of e.spans){if(r.t0>t)break;let e=a.get(r.text)??n.find(e=>e.say===r.text||e.saySpoken===r.text)?.index;e!==void 0&&(i=Math.max(i,e+1))}return Math.max(1,Math.min(i,r))}var Pl=72e5,Fl=class{budget;map=new Map;constructor(e=Pl){this.budget=e}set(e,t){this.map.delete(e),this.map.set(e,t),this.evict(e)}get(e){return this.map.get(e)??null}get size(){return this.map.size}total(){let e=0;for(let t of this.map.values())e+=t.pcm.length;return e}evict(e){let t=[...this.map.keys()],n=0;for(;this.total()>this.budget&&this.map.size>1&&n<t.length;){let r=t[n++];r!==e&&this.map.delete(r)}}},Il=[1,1.25,1.5,2,.75];function Ll(e){return`${Number.isInteger(e)?e:e.toFixed(2).replace(/0+$/,``).replace(/\.$/,``)}×`}function Rl(e){return Math.min(2,Math.max(.75,e))}function zl(e){let t=Il.indexOf(Rl(e));return Il[(t<0?0:t+1)%Il.length]}function Bl(e,t){let n=e.length*2,r=new ArrayBuffer(44+n),i=new DataView(r),a=(e,t)=>{for(let n=0;n<t.length;n++)i.setUint8(e+n,t.charCodeAt(n))};a(0,`RIFF`),i.setUint32(4,36+n,!0),a(8,`WAVE`),a(12,`fmt `),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,t,!0),i.setUint32(28,t*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),a(36,`data`),i.setUint32(40,n,!0);for(let t=0;t<e.length;t++){let n=Math.max(-1,Math.min(1,e[t]));i.setInt16(44+t*2,Math.round(n*(n<0?32768:32767)),!0)}return r}function Vl(e,t){let n=new Blob([Bl(e,t)],{type:`audio/wav`});return URL.createObjectURL(n)}var Hl=160;function Ul(e){let t=Math.max(1,Math.floor(e.pcm.length/Hl)),n=[];for(let r=0;r<Hl;r++){let i=0,a=r*t,o=Math.min(e.pcm.length,a+t);for(let t=a;t<o;t++){let n=Math.abs(e.pcm[t]);n>i&&(i=n)}n.push(i)}return n}var Wl={recording:{title:`Preparing voice scrub`,hint:`It appears here as soon as Mavéa finishes speaking.`},muted:{title:`Voice was muted`,hint:`Unmute before the next answer to capture a scrub track.`},offline:{title:`Voice is off`,hint:`Start the local TTS service to hear and scrub future answers.`},past:{title:`Voice scrub lives on the latest answer`,hint:`Return to live to replay the current spoken track.`},missing:{title:`No voice track captured`,hint:`The answer is still here as captions, but there is no audio to scrub.`}};function Gl(e){let t=(0,q.c)(8),{reason:n}=e,r=Wl[n],i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,U.jsx)(`span`,{className:`voice-scrub-empty-dot`,"aria-hidden":`true`}),t[0]=i):i=t[0];let a;t[1]===r.title?a=t[2]:(a=(0,U.jsx)(`span`,{className:`voice-scrub-empty-title`,children:r.title}),t[1]=r.title,t[2]=a);let o;t[3]===r.hint?o=t[4]:(o=(0,U.jsx)(`span`,{className:`voice-scrub-empty-hint`,children:r.hint}),t[3]=r.hint,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,U.jsxs)(`div`,{className:`voice-scrub voice-scrub--empty`,role:`status`,"aria-label":`Voice scrub unavailable`,children:[i,(0,U.jsxs)(`span`,{className:`voice-scrub-empty-copy`,children:[a,o]})]}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Kl({audio:e,t,onSeek:n}){let r=(0,H.useRef)(null),i=(0,H.useRef)(null),a=(0,H.useMemo)(()=>Ul(e),[e]),o=(0,H.useRef)(!1),s=(0,H.useRef)(null),c=(0,H.useRef)(null),[l,u]=(0,H.useState)(!1),[d,f]=(0,H.useState)(null),p=d??t,[m,h]=Rt(),g=Rl(m.voiceSpeed),_=g/(e.speed||1),v=(0,H.useRef)(_);v.current=_;let y=(0,H.useCallback)(()=>{c.current?.stop(),c.current=null,u(!1)},[]),b=(0,H.useCallback)(t=>{if(y(),!M())return;n(t),f(t),s.current||=Vl(e.pcm,e.sampleRate);let r=new Audio(s.current);r.preservesPitch=!0,r.webkitPreservesPitch=!0,r.playbackRate=v.current,r.currentTime=t,t>0&&r.addEventListener(`loadedmetadata`,()=>{Math.abs(r.currentTime-t)>.05&&(r.currentTime=t)},{once:!0});let i=k(r);r.play().catch(()=>{});let a=0,o=()=>{if(r.ended||r.currentTime>=e.duration){l(),c.current=null,u(!1),f(null),n(null);return}f(r.currentTime),a=requestAnimationFrame(o)},l=()=>{cancelAnimationFrame(a);try{r.pause(),r.removeAttribute(`src`)}catch{}i()};c.current={stop:l,el:r},u(!0),a=requestAnimationFrame(o)},[e,n,y]),x=(0,H.useCallback)(()=>{if(c.current){let e=c.current.el.currentTime;y(),f(null),n(e)}else b(p??0)},[p,b,y,n]),S=(0,H.useCallback)(()=>{h({voiceSpeed:zl(g)})},[h,g]);(0,H.useEffect)(()=>{c.current&&(c.current.el.playbackRate=_)},[_]),(0,H.useEffect)(()=>()=>{y(),s.current&&=(URL.revokeObjectURL(s.current),null)},[e,y]),(0,H.useEffect)(()=>{let t=r.current;if(!t)return;let n=window.devicePixelRatio||1,i=t.clientWidth,o=t.clientHeight;if(!i||!o)return;t.width=i*n,t.height=o*n;let s=t.getContext(`2d`);if(!s)return;s.scale(n,n),s.clearRect(0,0,i,o);let c=getComputedStyle(t),l=c.getPropertyValue(`--scrub-played`).trim()||`#8a93f8`,u=c.getPropertyValue(`--scrub-rest`).trim()||`#5c647833`,d=p===null?1:Math.max(0,Math.min(1,p/e.duration)),f=i/Hl;for(let e=0;e<Hl;e++){let t=Math.max(.06,a[e])*(o-4);s.fillStyle=e/Hl<=d?l:u,s.fillRect(e*f+f*.2,(o-t)/2,f*.6,t)}},[e,a,p]),(0,H.useEffect)(()=>{f(null)},[e]);let C=t=>{let n=i.current.getBoundingClientRect();return n.width?Math.max(0,Math.min(1,(t-n.left)/n.width))*e.duration:0};return(0,U.jsxs)(`div`,{className:`voice-scrub`,children:[(0,U.jsx)(`button`,{type:`button`,className:`voice-scrub-play`,onPointerDown:e=>e.stopPropagation(),onClick:x,"aria-label":l?`Pause`:`Play the spoken answer`,title:l?`Pause`:`Play from here`,children:l?(0,U.jsxs)(`svg`,{viewBox:`0 0 12 12`,width:`13`,height:`13`,"aria-hidden":`true`,children:[(0,U.jsx)(`rect`,{x:`2.5`,y:`2`,width:`2.4`,height:`8`,rx:`0.6`,fill:`currentColor`}),(0,U.jsx)(`rect`,{x:`7.1`,y:`2`,width:`2.4`,height:`8`,rx:`0.6`,fill:`currentColor`})]}):(0,U.jsx)(`svg`,{viewBox:`0 0 12 12`,width:`13`,height:`13`,"aria-hidden":`true`,children:(0,U.jsx)(`path`,{d:`M3.2 2.2 L10 6 L3.2 9.8 Z`,fill:`currentColor`})})}),(0,U.jsx)(`button`,{type:`button`,className:`voice-scrub-rate`,onPointerDown:e=>e.stopPropagation(),onClick:S,"aria-label":`Speed, currently ${Ll(g)}. Tap to change.`,title:`Voice speed`,children:Ll(g)}),(0,U.jsxs)(`div`,{ref:i,className:`voice-scrub-body`,role:`slider`,"aria-label":`Scrub the spoken answer`,"aria-valuemin":0,"aria-valuemax":Math.round(e.duration),"aria-valuenow":Math.round(p??e.duration),tabIndex:0,onPointerDown:e=>{o.current=!0,y(),f(null);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}n(C(e.clientX),!0)},onPointerMove:e=>{o.current&&n(C(e.clientX),!0)},onPointerUp:e=>{o.current&&(o.current=!1,b(C(e.clientX)))},onKeyDown:t=>{let r=p??e.duration;t.key===`ArrowLeft`&&(y(),f(null),n(Math.max(0,r-2),!0)),t.key===`ArrowRight`&&(y(),f(null),n(Math.min(e.duration,r+2),!0)),(t.key===` `||t.key===`Enter`)&&(t.preventDefault(),x()),t.key===`Escape`&&(y(),f(null),n(null))},children:[(0,U.jsx)(`canvas`,{ref:r,className:`voice-scrub-wave`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`voice-scrub-hint`,children:l?`playing — tap pause or drag to scrub`:p===null?`play, or drag to rewind the voice`:`the canvas is rebuilt to this moment`})]})]})}function ql({audio:e,t,onSeek:n,unavailable:r=`missing`}){return e?(0,U.jsx)(Kl,{audio:e,t,onSeek:n}):(0,U.jsx)(Gl,{reason:r})}function Jl(){let e=(0,q.c)(16),[t,n]=Rt(),r;e[0]===t.voiceSpeed?r=e[1]:(r=Rl(t.voiceSpeed),e[0]=t.voiceSpeed,e[1]=r);let i=r,a,o;e[2]===i?(a=e[3],o=e[4]):(a=()=>{Ce(i)},o=[i],e[2]=i,e[3]=a,e[4]=o),(0,H.useEffect)(a,o);let s;e[5]!==n||e[6]!==i?(s=()=>n({voiceSpeed:zl(i)}),e[5]=n,e[6]=i,e[7]=s):s=e[7];let c=s,l;e[8]===i?l=e[9]:(l=Ll(i),e[8]=i,e[9]=l);let u=`Voice speed, currently ${l}. Tap to change.`,d;e[10]===i?d=e[11]:(d=Ll(i),e[10]=i,e[11]=d);let f;return e[12]!==c||e[13]!==u||e[14]!==d?(f=(0,U.jsx)(`button`,{type:`button`,className:`voice-speed`,onClick:c,"aria-label":u,title:`How fast Mavéa speaks`,children:d}),e[12]=c,e[13]=u,e[14]=d,e[15]=f):f=e[15],f}var Yl={standard:`deep`,deep:`simple`,simple:`standard`},Xl={simple:`Simple`,standard:`Standard`,deep:`In-depth`};function Zl(){let e=(0,q.c)(8),[t,n]=Rt(),r=t.explainLevel,i;e[0]!==r||e[1]!==n?(i=()=>n({explainLevel:Yl[r]}),e[0]=r,e[1]=n,e[2]=i):i=e[2];let a=i,o=`explain-chip`+(r===`simple`?` is-simple`:r===`deep`?` is-deep`:``),s=`Explanation level: ${Xl[r]}. Tap for ${Xl[Yl[r]]}.`,c=Xl[r],l;return e[3]!==a||e[4]!==o||e[5]!==s||e[6]!==c?(l=(0,U.jsx)(`button`,{type:`button`,className:o,onClick:a,"aria-label":s,title:`How plain or rigorous the words and visuals are — or just say 'explain it simpler' / 'go deeper'`,children:c}),e[3]=a,e[4]=o,e[5]=s,e[6]=c,e[7]=l):l=e[7],l}var Ql=[`You catch a HALF-SPOKEN question, still being said. Reply ONLY with JSON:`,`{"ghosts":[{"kind":"forming"|"maybe","title":"..."}]}`,`2-3 entries: the visual cards you would build if the sentence ended right now.`,`"forming" = clearly needed for what was said so far; "maybe" = a plausible direction the sentence is heading.`,`Each title ≤ 6 words, concrete (e.g. "Bloom forecast", "Late-April flights"). No prose, no other keys.`].join(`
|
|
5
|
-
`),$l=150;function eu(e){try{let t=(typeof e==`string`?JSON.parse(e.match(/\{[\s\S]*\}/)?.[0]??`{}`):e).ghosts;return Array.isArray(t)?t.map(e=>{let t=e,n=typeof t.title==`string`?t.title.trim().slice(0,48):``;return n?{kind:t.kind===`maybe`?`maybe`:`forming`,title:n}:null}).filter(e=>e!==null).slice(0,3):[]}catch{return[]}}async function tu(e,t,n){try{let r=await At(t.provider).generate({system:Ql,history:[],user:e,maxTokens:$l,signal:n},t);return n.aborted?[]:eu(r.raw)}catch{return[]}}var nu=80,ru=120;function iu(e,t){return e.length>t?`${e.slice(0,t-1)}…`:e}function au(e){if(!e)return``;if(/[\s.!?,;:]$/.test(e))return e.trim();let t=e.trimEnd();return/\s/.test(t)?t.replace(/\S+$/,``).trim():``}function ou(e){return e.replace(/([.!?])\s+/g,`$1\0`).replace(/\s+(?=\b(?:but |and i |and she |and he |and they |and dad|and mom|and my |so i |so she |so he |honestly |actually |i keep |i also |i've |i just |the thing is |i mean |i don't know)\b)/gi,`\0`).split(`\0`).map(e=>e.trim()).filter(e=>e.length>=8)}function su(e){return iu(e.trim(),ru)}function cu(e){let t=e.replace(/^(?:okay|so|like|i mean|well|um|uh|you know|honestly|actually|look|i just|and|but|i think|i guess|i suppose|you see)\s+/gi,``);return iu(t.charAt(0).toUpperCase()+t.slice(1),nu)}var lu=/\b(Dad|Mom|Mum|Papa|Mama|Grandpa|Grandma|Grandad|Nan|Nana|Uncle|Auntie)\b(?:'s)?/,uu=/\b(?:my|his|her|their|our)\s+(dad|father|mom|mother|sister|brother|son|daughter|wife|husband|partner|friend|boss|manager|co-?founder|colleague|mentor|coach|therapist|doctor|lawyer|ex)\b/i,du=/\b([A-Z][a-z]{2,12})(?:'s)?\s+(?:just|started|always|keeps?|is|was|has|have|said|told|wants?|needs?|feels?|thinks?|loves?|hates?|came|went|left|got|has|moved|called|texted)\b/,fu=new Set(`March.January.February.April.June.July.August.September.October.November.December.Monday.Tuesday.Wednesday.Thursday.Friday.Saturday.Sunday.Seattle.Austin.Portland.Chicago.Boston.Denver.Atlanta.New.York.Los.San.Las`.split(`.`)),pu=/\b(?:should i|whether to|thinking about|considering|one option|maybe i should|alternatively|or i could|or i might|could (?:also )?(?:go|stay|take|move|leave|try|do|join|accept|turn)|(?:an?|this|that|the)\s+offer|an? (?:opportunity|position|role|deal)|option (?:is|would be))\b/i,mu=/\b(?:scared|afraid|fear|worried about|anxious|terrified|dreading|dread|what if|might fail|not (?:going to )?work|won'?t work|going wrong|could go wrong|nervous|i'?m (?:just |really )?scared|i'?m worried)\b/i,hu=/\b(?:can'?t|cannot|have to|has to|must|deadline|budget|mortgage|my lease|loan|runway|no choice|tied (?:to|down)|stuck|limited|only (?:have|got) (?:\w+ )?\d|only \d+ months?|no time|no money|not (?:enough|possible)|running out)\b/i,gu=/(?:\?)|(?:\b(?:i don'?t know|not sure|can'?t decide|i keep going back and forth|i keep (?:asking|wondering|second.?guessing)|haven'?t decided|still figuring|up in the air|i wonder|no idea|is it even|is it the right|is this (?:the right|a|even)|what (?:do|should) i)\b)/i,_u=/\b(?:i (?:really )?want|i wish|i hope|would (?:really )?love|i'?ve always wanted|would like|i dream|my goal|i aspire|i'?m looking for|i need (?:to )?(?:feel|be|have|find|do)|i want to (?:feel|be|have|find|do))\b/i;function vu(e){let t=ou(e),n=[],r=new Set,i=0,a=0,o=0,s=0,c=0,l=0;function u(e,t,i,a){let o=typeof i==`string`?iu(i,nu):cu(a),s=`${t}:${o.toLowerCase().slice(0,20)}`;if(r.has(s))return;r.add(s);let c=su(a);c&&n.push({id:e,kind:t,label:o,quote:c,status:`forming`,confidence:`said`,weight:1})}for(let e of t){let t=e.match(uu);if(t){let n=t[1],r=n.charAt(0).toUpperCase()+n.slice(1);u(`per_${i++}`,`person`,r,e)}let n=e.match(lu);n&&!t&&u(`per_${i++}`,`person`,n[1],e);let r=e.match(du);if(r){let t=r[1];fu.has(t)||u(`per_${i++}`,`person`,t,e)}pu.test(e)&&u(`opt_${a++}`,`option`,cu(e),e),mu.test(e)&&u(`fea_${o++}`,`fear`,cu(e),e),hu.test(e)&&u(`con_${s++}`,`constraint`,cu(e),e),gu.test(e)&&u(`loo_${c++}`,`open_loop`,cu(e),e),_u.test(e)&&u(`wan_${l++}`,`want`,cu(e),e)}return n}function yu(e){let t=ou(e);return t.length>0?t.length:+!!e.trim()}var bu=700,xu=4,Su=3;function Cu(e,t,n,r){let i=(0,q.c)(19),a=r!==void 0&&r,o;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],i[0]=o):o=i[0];let[s,c]=(0,H.useState)(o),l=(0,H.useRef)(0),u=(0,H.useRef)(``),d=(0,H.useRef)(null),f,p;i[1]===e?(f=i[2],p=i[3]):(f=()=>{l.current=0,u.current=``,e||(d.current?.abort(),c([]))},p=[e],i[1]=e,i[2]=f,i[3]=p),(0,H.useEffect)(f,p);let m,h;i[4]===a?(m=i[5],h=i[6]):(m=()=>{a&&(d.current?.abort(),c([]))},h=[a],i[4]=a,i[5]=m,i[6]=h),(0,H.useEffect)(m,h);let g,_;i[7]!==n||i[8]!==e||i[9]!==t||i[10]!==a?(g=()=>{if(!e||!n||a)return;let r=au((t??``).trim());if(r.split(/\s+/).filter(Boolean).length<xu||r===u.current||l.current>=Su)return;let i=window.setTimeout(()=>{u.current=r,l.current+=1,d.current?.abort();let e=new AbortController;d.current=e,tu(r,n,e.signal).then(t=>{!e.signal.aborted&&t.length&&c(t)})},bu);return()=>window.clearTimeout(i)},_=[e,t,n,a],i[7]=n,i[8]=e,i[9]=t,i[10]=a,i[11]=g,i[12]=_):(g=i[11],_=i[12]),(0,H.useEffect)(g,_);let v,y;i[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>()=>d.current?.abort(),y=[],i[13]=v,i[14]=y):(v=i[13],y=i[14]),(0,H.useEffect)(v,y);let b;return i[15]!==s||i[16]!==e||i[17]!==a?(b=e&&!a?s:[],i[15]=s,i[16]=e,i[17]=a,i[18]=b):b=i[18],b}function wu({ghosts:e}){return e.length===0?null:(0,U.jsx)(`div`,{className:`ghost-row`,"aria-hidden":`true`,children:e.map((e,t)=>(0,U.jsxs)(`div`,{className:`ghost-card is-`+e.kind,style:{"--gi":t},children:[(0,U.jsxs)(`span`,{className:`ghost-kind`,children:[`◌ `,e.kind===`forming`?`Forming`:`Maybe`]}),(0,U.jsx)(`span`,{className:`ghost-title`,children:e.title}),(0,U.jsxs)(`span`,{className:`ghost-bones`,children:[(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{})]})]},e.title))})}var Tu=2e3,Eu=350,Du={type:`object`,properties:{id:{type:`string`},kind:{type:`string`,enum:[`person`,`option`,`want`,`fear`,`constraint`,`tradeoff`,`contradiction`,`open_loop`,`action`,`value`,`question`]},label:{type:`string`},quote:{type:`string`},status:{type:`string`},confidence:{type:`string`},weight:{type:`number`}},required:[`id`,`kind`,`label`,`quote`]},Ou={type:`object`,properties:{from:{type:`string`},to:{type:`string`},kind:{type:`string`,enum:[`supports`,`tensions`,`depends_on`,`same_thread`,`blocks`]},label:{type:`string`}},required:[`from`,`to`,`kind`]},ku={type:`object`,properties:{center:{type:`string`},title:{type:`string`},atoms:{type:`array`,minItems:1,items:Du},links:{type:`array`,items:Ou},clusters:{type:`array`,items:{type:`object`,properties:{id:{type:`string`},label:{type:`string`},atomIds:{type:`array`,items:{type:`string`}},weight:{type:`number`}},required:[`id`,`label`,`atomIds`]}},unsaid:{type:`object`,properties:{label:{type:`string`},why:{type:`string`},confidence:{type:`string`}}}},required:[`center`,`atoms`]},Au={type:`object`,properties:{add:{type:`array`,items:Du},addLinks:{type:`array`,items:Ou}}},ju=`You are Mavéa, a listening companion that mirrors the shape of thought. A person has been thinking aloud — sometimes weighing a personal decision (wants, fears, options), sometimes exploring a subject they're curious about (questions, threads, sub-topics). Extract the structure of their thinking into a "mindshape" — NOT to give advice, judge, or add ideas not present in their words.
|
|
6
|
-
|
|
7
|
-
Find WHAT IS ACTUALLY THERE and WHAT CONNECTS OR PULLS AGAINST WHAT. Choose the kind that genuinely fits each atom — never default everything to one kind.
|
|
8
|
-
|
|
9
|
-
ATOM KINDS:
|
|
10
|
-
- question: a subject, topic, or thing they are curious about or want to understand — the DEFAULT for exploratory/learning thinking ("how cars reshaped cities", "what came before the wheel")
|
|
11
|
-
- option: a concrete path, sub-area, or choice they are considering
|
|
12
|
-
- action: a concrete step they could take or are taking
|
|
13
|
-
- want: a genuine desire or goal, stated as wanting something — NOT a topic they are merely exploring
|
|
14
|
-
- fear: what worries or scares them
|
|
15
|
-
- constraint: a real limitation (time, money, geography, commitment, obligation)
|
|
16
|
-
- tradeoff: a genuine cost-benefit tension in a single choice
|
|
17
|
-
- open_loop: an unresolved question or loose thread they keep circling but haven't answered
|
|
18
|
-
- value: a principle that matters to them (only when explicitly stated)
|
|
19
|
-
- person: a real person mentioned by name or relationship — and what they want, said, or are affected by. A card reading only "Priya" tells the reader nothing; "Priya wants to batch the writes" is the thought. Never emit a bare name.
|
|
20
|
-
|
|
21
|
-
Pick deliberately: a subject of curiosity is a question, a sub-area or path is an option, an unknown they circle is an open_loop; reserve want for an actual stated desire. A map where every atom is the same kind is wrong — make the kinds reflect the real variety in what they said.
|
|
22
|
-
|
|
23
|
-
COVER EVERYTHING THEY SAID. Every distinct thought gets its own atom. Do not compress five spoken thoughts into two tidy ones, and do not drop the small concrete ones (a date, a budget, who wants what) because they seem minor — those are usually the constraints the whole decision turns on. If two sentences really are the same thought, merge them; otherwise keep both.
|
|
24
|
-
|
|
25
|
-
LINK KINDS:
|
|
26
|
-
- tensions: what genuinely conflicts or pulls against what — THE HERO LINK
|
|
27
|
-
- supports: one thing enables or justifies another
|
|
28
|
-
- depends_on: one thing requires another
|
|
29
|
-
- same_thread: two atoms about the same underlying issue
|
|
30
|
-
|
|
31
|
-
LABELS:
|
|
32
|
-
Each atom's label is a short, plain-language sentence that sums up the idea in the person's own framing — a reader skimming only the labels should grasp the whole shape of the thinking. Write "Cars gave us freedom but reshaped cities around them", NOT a bare noun ("cars") or a filler prefix ("information on cars") or a category. ≤80 chars.
|
|
33
|
-
|
|
34
|
-
CLUSTERS:
|
|
35
|
-
Group the atoms into 2–5 themes that EMERGED from what they actually said. Name each theme in THEIR words and specifics — "the move to Seattle", "Maya and her school", "Dad getting older", "is it the right time" — NEVER an abstract category like "People", "Options", "Worries", "Constraints", or "Trade-offs". A theme must contain at least one atom (list its atom ids). Do not invent a theme to fill a slot — only name what is genuinely there. The themes are how the map is organized, so they must read as this person's own thoughts, not a generic form.
|
|
36
|
-
|
|
37
|
-
HARD RULES:
|
|
38
|
-
1. Every atom MUST have a real quote — verbatim words from the transcript. No quote → no atom.
|
|
39
|
-
2. center = the inferred hidden question driving everything. Be SPECIFIC, not generic. ≤90 chars.
|
|
40
|
-
3. unsaid = ONE thing they kept circling but never said directly. Write its label as one complete plain-language sentence; confidence MUST be "maybe". label ≤120 chars, why ≤120 chars.
|
|
41
|
-
4. Find at least one tensions link if there is genuine conflict in the words.
|
|
42
|
-
5. NEVER use clinical/diagnostic language: trauma, PTSD, depression, anxiety disorder, attachment style, narcissism, codependency, dissociation, hypervigilance, personality disorder.
|
|
43
|
-
6. NEVER invent motives or interpretations beyond what the words contain.
|
|
44
|
-
7. label ≤80 chars (a short summarizing sentence, per LABELS above), quote ≤120 chars (verbatim from the transcript). cluster label ≤32 chars, content-specific.
|
|
45
|
-
|
|
46
|
-
Reply with ONLY compact JSON — no prose, no markdown fences. The exact fields are given with each request.`;function Mu(e){return`TRANSCRIPT:
|
|
47
|
-
${e.trim()}
|
|
48
|
-
|
|
49
|
-
Extract the full mindshape. Reply as compact JSON on ONE line (no whitespace, no markdown):
|
|
50
|
-
{"center":"...","title":"...","atoms":[{"id":"...","kind":"...","label":"...","quote":"...","status":"stable","confidence":"said","weight":1}],"links":[{"from":"...","to":"...","kind":"tensions","label":"..."}],"clusters":[{"id":"...","label":"...","atomIds":["..."],"weight":1}],"unsaid":{"label":"...","why":"...","confidence":"maybe"}}`}function Nu(e){return JSON.stringify({atoms:e.atoms.map(e=>({id:e.id,k:e.kind,l:e.label})),links:e.links.map(e=>[e.from,e.to,e.kind])})}function Pu(e,t){return`NEW SPEECH (since last update):
|
|
51
|
-
${e.trim()}
|
|
52
|
-
|
|
53
|
-
ALREADY ON THE MAP — reuse these ids, do NOT renumber or restate them:
|
|
54
|
-
${Nu(t)}
|
|
55
|
-
|
|
56
|
-
Return ONLY what the NEW speech ADDS, as compact JSON on ONE line (no whitespace, no markdown):
|
|
57
|
-
{"add":[{"id":"...","kind":"...","label":"...","quote":"...","status":"stable","confidence":"said","weight":1}],"addLinks":[{"from":"...","to":"...","kind":"tensions","label":"..."}]}
|
|
58
|
-
Only genuinely new atoms (each needs a verbatim quote from the NEW speech). Reuse an existing id only to update that exact atom. Omit "add" or "addLinks" when empty. Do NOT restate unchanged atoms, and do NOT include center, unsaid, clusters, or title — those come at settle.`}async function Fu(e,t,n,r,i){try{let a=await At(r.provider).generate({system:ju,history:[],user:e,maxTokens:t,thinkingLevel:`minimal`,format:n,signal:i},r);return i?.aborted?null:a.raw}catch{return null}}async function Iu(e,t,n){let r=await Fu(Mu(e),Tu,ku,t,n);return r===null?null:dt(r,e)}async function Lu(e,t,n,r,i){let a=await Fu(Pu(e,t),Eu,Au,r,i);return a===null?null:st(a,n)}function Ru(e){if(e.atoms.length===0)return`general`;let t=0,n=0,r=0,i=0,a=0,o=0,s=0;for(let c of e.atoms)c.kind===`option`?t++:c.kind===`open_loop`?n++:c.kind===`action`?r++:c.kind===`question`?i++:c.kind===`fear`?a++:c.kind===`want`?o++:c.kind===`person`&&s++;let c=e.atoms.length,l=e.links.some(e=>e.kind===`tensions`&&!e.provisional);return t>=2&&l?`decision`:n+r>=3?`planning`:i/c>=.4?`exploration`:(a+o+s)/c>=.5?`processing`:`general`}var zu=6e3,Bu=8,Vu=1,Hu=8,Uu=4;function Wu(e){return e.trim()?e.trim().split(/\s+/).length:0}var Gu=24;function Ku(e,t){let n=new Map(e.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);t?(e.status===`stable`||t.status===`forming`)&&n.set(e.id,{...t,...e}):n.set(e.id,e)}return Array.from(n.values())}function qu(e){return e.toLowerCase().replace(/['’]/g,``).replace(/[^a-z0-9]+/g,` `).trim()}function Ju(e){return e.status===`stable`?2:+(e.status===`forming`)}function Yu(e,t){if(t.atoms.length>=e.length)return t;let n=new Set(t.atoms.map(e=>qu(e.quote))),r=e.filter(e=>{let t=qu(e.quote);return!t||n.has(t)?!1:(n.add(t),!0)});return r.length?{...t,atoms:[...t.atoms,...r].slice(0,Gu)}:t}function Xu(e,t){let n=new Map(e.atoms.map(e=>[e.id,e])),r=new Map(e.atoms.map(e=>[qu(e.quote),e.id]));for(let e of t.add){let t=n.get(e.id);if(t){n.set(e.id,{...t,...e});continue}let i=r.get(qu(e.quote));if(i&&n.has(i)){n.set(i,{...n.get(i),...e,id:i});continue}n.set(e.id,e),r.set(qu(e.quote),e.id)}let i=Array.from(n.values());i.length>Gu&&(i=[...i].sort((e,t)=>(t.weight??1)-(e.weight??1)||Ju(t)-Ju(e)).slice(0,Gu));let a=new Set(i.map(e=>e.id)),o=e=>`${e.from}|${e.to}|${e.kind}`,s=new Map(e.links.map(e=>[o(e),e]));for(let e of t.addLinks)s.set(o(e),e);let c=Array.from(s.values()).filter(e=>a.has(e.from)&&a.has(e.to));return{...e,atoms:i,links:c}}var Zu={center:``,atoms:[],links:[]};function Qu(e){let[t,n]=(0,H.useState)(`idle`),[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(null),s=(0,H.useRef)(`idle`),c=(0,H.useRef)(null),l=(0,H.useRef)(``),u=(0,H.useRef)(0),d=(0,H.useRef)(0),f=(0,H.useRef)(null),p=(0,H.useRef)(!1),m=(0,H.useRef)(new Set),h=(0,H.useRef)(e);(0,H.useEffect)(()=>{h.current=e},[e]);let g=e=>[`id:${e.id}`,`q:${qu(e.quote)}`];function _(e){return g(e).some(e=>m.current.has(e))}function v(e){if(m.current.size===0)return e;let t=e.atoms.filter(e=>!_(e));if(t.length===e.atoms.length)return e;let n=new Set(t.map(e=>e.id));return{...e,atoms:t,links:e.links.filter(e=>n.has(e.from)&&n.has(e.to)),clusters:e.clusters?.map(e=>({...e,atomIds:e.atomIds.filter(e=>n.has(e))})).filter(e=>e.atomIds.length>0)}}function y(e){s.current=e,n(e)}function b(e){c.current=e,o(e)}let x=(0,H.useCallback)(e=>{let t=e.filter(e=>!_(e));if(t.length===0)return;let n=c.current??Zu,r=Ku(n.atoms,t);b({...n,atoms:r})},[]),S=(0,H.useCallback)(async e=>{let t=h.current;if(!t)return;let n=c.current;if(!n||n.atoms.length===0)return;f.current?.abort();let r=new AbortController;f.current=r;let i=e.slice(l.current.length).trim();l.current=e,u.current=Date.now(),d.current+=1,p.current=!0;try{let a=await Lu(i,n,e,t,r.signal);if(r.signal.aborted||!a)return;b(v(Xu(c.current??n,a)))}finally{r.signal.aborted||(p.current=!1)}},[]),C=(0,H.useCallback)(async e=>{let t=h.current;if(!t)return;f.current?.abort();let n=new AbortController;f.current=n,l.current=e,u.current=Date.now(),d.current+=1,p.current=!0;try{let r=await Iu(e,t,n.signal);if(n.signal.aborted||!r)return;let i=Xu(c.current??Zu,{add:r.atoms,addLinks:r.links});b(v({...i,center:r.center||i.center,clusters:r.clusters,unsaid:r.unsaid,title:r.title??i.title}))}finally{n.signal.aborted||(p.current=!1)}},[]),w=(0,H.useCallback)(async e=>{let t=h.current;if(!t)return;f.current?.abort();let n=new AbortController;f.current=n,l.current=e,u.current=Date.now(),d.current+=1,p.current=!0;try{let r=await Iu(e,t,n.signal);if(n.signal.aborted)return;if(!r){i(!0);return}i(!1),b(Yu(c.current?.atoms??[],r))}finally{n.signal.aborted||(p.current=!1)}},[]),T=(0,H.useCallback)(e=>{s.current===`idle`&&y(`listening`);let t=vu(e);x(t);let n=Wu(e),r=d.current>=Hu,i=Date.now()-u.current<zu,a=!r&&!i&&!p.current;if((c.current?.atoms.length??0)===0){a&&n>=Uu&&C(e);return}let o=n-Wu(l.current),f=t.filter(e=>!c.current?.atoms.some(t=>t.id===e.id)).length;a&&!(n<Uu||o<Bu&&f<Vu)&&S(e)},[x,C,S]),E=(0,H.useCallback)(()=>{f.current?.abort(),f.current=null,p.current=!1,m.current.clear(),l.current=``,u.current=0,d.current=0,y(`idle`),b(null)},[]),D=(0,H.useCallback)((e=!0)=>{f.current?.abort(),f.current=null,p.current=!1,l.current=``,u.current=0,d.current=0,e||(m.current.clear(),b(null)),y(`listening`)},[]),O=(0,H.useCallback)(e=>{let t=c.current;if(!t)return;let n=t.atoms.find(t=>t.id===e);if(!n)return;g(n).forEach(e=>m.current.add(e));let r=t.atoms.filter(t=>t.id!==e),i=t.links.filter(t=>t.from!==e&&t.to!==e),a=t.clusters?.map(t=>({...t,atomIds:t.atomIds.filter(t=>t!==e)})).filter(e=>e.atomIds.length>0);b({...t,atoms:r,links:i,clusters:a})},[]),k=(0,H.useCallback)(()=>{let e=c.current;if(!e?.unsaid)return;let{unsaid:t}=e,n={id:`unsaid-confirmed`,kind:`open_loop`,status:`stable`,confidence:`inferred`,label:t.label,quote:t.why,weight:2},r=Ku(e.atoms,[n]);b({...e,atoms:r,unsaid:void 0})},[]),A=(0,H.useCallback)(()=>{let e=c.current;if(!e?.unsaid)return;let{unsaid:t}=e;m.current.add(`q:${qu(t.label)}`),b({...e,unsaid:void 0})},[]),j=(0,H.useCallback)(e=>{if(!e.trim()){E();return}y(`pausing`),w(e).then(()=>{s.current===`pausing`&&y(`settled`)})},[w,E]);return(0,H.useEffect)(()=>()=>{f.current?.abort()},[]),{phase:t,spec:a,intent:(0,H.useMemo)(()=>a?Ru(a):`general`,[a]),modelUnavailable:r,onTranscript:T,onSpeechEnd:j,removeAtom:O,confirmUnsaid:k,dismissUnsaid:A,reset:E,resume:D}}var $u=5e3,ed=0;function td(e,t){let[n,r]=(0,H.useState)([]),i=(0,H.useRef)(new Set),a=(0,H.useCallback)((e,t)=>{let n=`sig-${++ed}`;r([{id:n,content:t,kind:e,expiresAt:Date.now()+$u}])},[]);return(0,H.useEffect)(()=>{let e=n[0];if(!e)return;let t=Math.max(0,e.expiresAt-Date.now()),i=window.setTimeout(()=>{r(e=>e.filter(e=>e.expiresAt>Date.now()))},t);return()=>window.clearTimeout(i)},[n]),(0,H.useEffect)(()=>{t===`idle`&&(i.current.clear(),r([]))},[t]),(0,H.useEffect)(()=>{if(!e||t===`settled`||t===`idle`)return;let n=e.atoms.length,r=i.current;n>=4&&!r.has(`pattern`)&&(r.add(`pattern`),a(`pattern`,`A shape is forming…`)),e.links.some(e=>e.kind===`tensions`&&!e.provisional)&&!r.has(`tension`)&&(r.add(`tension`),a(`tension`,`I see a pull here…`)),e.unsaid&&!r.has(`unsaid`)&&(r.add(`unsaid`),a(`unsaid`,`There's something unsaid circling…`)),n>=8&&!r.has(`depth`)&&(r.add(`depth`),a(`depth`,`This runs deeper than one answer…`))},[e,t,a]),{currentSignal:n[0]??null}}function nd(e){let t=(0,q.c)(30),{mindShape:n,onSettled:r,onAction:i,liveTranscript:a,thoughtCount:o,onConfirmUnsaid:s,onDismissUnsaid:c}=e,{phase:l,spec:u,intent:d}=n,f=(0,H.useRef)(!1),[p,m]=(0,H.useState)(!1),h=(0,H.useRef)(null),g,_;t[0]!==r||t[1]!==l?(g=()=>{l===`settled`&&!f.current&&(f.current=!0,r?.(),m(!0),h.current=setTimeout(()=>m(!1),1800))},_=[l,r],t[0]=r,t[1]=l,t[2]=g,t[3]=_):(g=t[2],_=t[3]),(0,H.useEffect)(g,_);let v,y;t[4]===l?(v=t[5],y=t[6]):(v=()=>{l===`idle`&&(f.current=!1,m(!1),h.current&&=(clearTimeout(h.current),null))},y=[l],t[4]=l,t[5]=v,t[6]=y),(0,H.useEffect)(v,y);let b,x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>()=>{h.current&&clearTimeout(h.current)},x=[],t[7]=b,t[8]=x):(b=t[7],x=t[8]),(0,H.useEffect)(b,x);let{currentSignal:S}=td(u,l),C=u?.center??``,w;t[9]===u?.atoms?w=t[10]:(w=u?.atoms??[],t[9]=u?.atoms,t[10]=w);let T;t[11]===u?.links?T=t[12]:(T=u?.links??[],t[11]=u?.links,t[12]=T);let E=u?.clusters,D=u?.unsaid,O=l===`settled`?void 0:a,k=l===`settled`?void 0:o,A;return t[13]!==S||t[14]!==d||t[15]!==p||t[16]!==n.modelUnavailable||t[17]!==n.removeAtom||t[18]!==i||t[19]!==s||t[20]!==c||t[21]!==l||t[22]!==E||t[23]!==D||t[24]!==O||t[25]!==k||t[26]!==C||t[27]!==w||t[28]!==T?(A=(0,U.jsx)(pe,{asBlock:!1,phase:l,center:C,atoms:w,links:T,modelUnavailable:n.modelUnavailable,clusters:E,unsaid:D,intent:d,isRevealing:p,currentSignal:S,onAction:i,onRemoveAtom:n.removeAtom,onConfirmUnsaid:s,onDismissUnsaid:c,liveTranscript:O,thoughtCount:k}),t[13]=S,t[14]=d,t[15]=p,t[16]=n.modelUnavailable,t[17]=n.removeAtom,t[18]=i,t[19]=s,t[20]=c,t[21]=l,t[22]=E,t[23]=D,t[24]=O,t[25]=k,t[26]=C,t[27]=w,t[28]=T,t[29]=A):A=t[29],A}var rd=[{heading:`Options on the table`,kinds:[`option`]},{heading:`What I want`,kinds:[`want`,`value`]},{heading:`What worries me`,kinds:[`fear`,`contradiction`]},{heading:`Trade-offs`,kinds:[`tradeoff`]},{heading:`Constraints`,kinds:[`constraint`]},{heading:`People involved`,kinds:[`person`]},{heading:`Still open`,kinds:[`open_loop`,`question`]},{heading:`Things I could do`,kinds:[`action`]}];function id(e){let t=e.quote&&e.quote.trim()&&e.quote.trim()!==e.label?` ("${e.quote.trim()}")`:``;return`- ${e.label}${t}`}function ad(e){let t=[];if(e.clusters&&e.clusters.length){let n=new Map(e.atoms.map(e=>[e.id,e])),r=new Set;for(let i of e.clusters){let e=i.atomIds.map(e=>n.get(e)).filter(e=>!!e);if(e.length){t.push(`${i.label}:`);for(let n of e)t.push(id(n)),r.add(n.id);t.push(``)}}let i=e.atoms.filter(e=>!r.has(e.id));if(i.length){t.push(`Also on my mind:`);for(let e of i)t.push(id(e));t.push(``)}}else for(let n of rd){let r=e.atoms.filter(e=>n.kinds.includes(e.kind));if(r.length){t.push(`${n.heading}:`);for(let e of r)t.push(id(e));t.push(``)}}let n=e.links.filter(e=>e.kind===`tensions`);if(n.length){t.push(`Tensions I feel:`);for(let r of n){let n=e.atoms.find(e=>e.id===r.from)?.label??``,i=e.atoms.find(e=>e.id===r.to)?.label??``;n&&i&&t.push(`- "${n}" ${r.label||`pulls against`} "${i}"`)}t.push(``)}return t.join(`
|
|
59
|
-
`).trim()}function od(e,t){let n=e.center?.trim(),r=ad(e);return[n?`I've been thinking out loud and here's what it comes down to: ${n}`:`I've been thinking out loud. Here's the shape of it.`,``,r,``,t===`plan`?`Pull this together and give me a concrete plan — the clear next steps, in order, that move me forward given everything above.`:`Pull this together and help me with it — weigh what matters most, address the tensions head-on, and give me a clear, useful answer.`].filter(e=>e!==void 0).join(`
|
|
60
|
-
`).trim()}function sd(e){return/^(ok(ay)?[,.\s]+)?(any |your |so[,.\s]+)?thoughts\s*[?.!]*$/i.test(e.trim())}function cd(e,t){return e?t>0?`Discard ${t} banked — or tap Thoughts? to sort them`:`Stop banking and go back to answering`:`Bank everything you say without answering — say "thoughts?" when you want the sort`}function ld(e){let t=e.trim();return t.length>0&&!sd(t)}function ud(e,t){let n=e.map((e,t)=>`(${t+1}) ${e.trim()}`).join(`
|
|
61
|
-
`);return[`I just thought out loud for about ${Math.max(1,t)} minute${t>=2?`s`:``}. Sort what I actually said — do NOT add ideas of your own:`,`- the DECISIONS I made (even tentative ones),`,`- the TODOS I gave myself,`,`- any CONTRADICTIONS (quote both moments and ask me which one I mean).`,`My words, in order:`,n].join(`
|
|
62
|
-
`)}var dd=/https?:\/\/[^\s<>"')\]]+/i;function fd(e){let t=e.match(dd);return t?t[0].replace(/[.,;:!?]+$/,``):null}function pd(e){let t=fd(e);return t?e.replace(t,``).trim().split(/\s+/).filter(Boolean).length<=12:!1}function md(e){return`Check this for me: ${e} — what's actually true, what's shaky, and what's missing context? Ground every verdict in real sources.`}var hd=`Check the claim in this screenshot — what's actually true, what's shaky, and what's missing context? Ground every verdict in real sources.`;function gd(e){return e instanceof HTMLElement?e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e.isContentEditable:!1}var _d=Ze.map(e=>{let t=Qe[e];return{id:e,label:t.label,description:`${t.archetype} — ${t.blurb}`,accent:t.tokens.accent}}),vd=`mavea-preso-style`;function yd(e){return _d.some(t=>t.id===e)}function bd(){try{let e=localStorage.getItem(vd);return yd(e)?e:`folio`}catch{return`folio`}}function xd(e){try{localStorage.setItem(vd,e)}catch{}}function Sd(e){return e<5?`Late night`:e<12?`This morning`:e<17?`This afternoon`:`Tonight`}function Cd(e){let t=Math.max(1,Math.round(e/6e4));return t<60?`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}function wd(e,t){if(e.length===0||t.length===0)return null;let n=e[0],r=e[e.length-1],i=`${Sd(new Date(n.at).getHours())}, so far.`,a=[`${Cs(n.at)} – ${Cs(r.at)}`,Cd(r.at-n.at),`${t.length} ${t.length===1?`topic`:`topics`}`,`${e.length} ${e.length===1?`moment`:`moments`}`].join(` · `),o=Ss(e),s=[];for(let n of t){let t=n.moments[0],r=n.moments[n.moments.length-1],i=e[r.frameIndex],a=i?.narration||i?.question||``;if(!a)continue;let c=n.moments.map(e=>o.get(e.frameIndex)).find(Boolean);s.push({title:n.title,clock:Cs(e[t.frameIndex]?.at),line:a,frameIndex:r.frameIndex,...c?{corrected:`Corrected — ${c.note.what}: was ${c.note.was}, now ${c.note.now}`}:{}})}return s.length?{heading:i,meta:a,rows:s}:null}function Td(e){let t=(0,q.c)(10),{transcript:n,mode:r,note:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,U.jsxs)(`span`,{className:`listen-eq`,"aria-hidden":`true`,children:[(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{})]}),t[0]=a):a=t[0];let o=n?`“${n}`:`Listening`,s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,U.jsx)(`span`,{className:`listen-caret`,"aria-hidden":`true`}),t[1]=s):s=t[1];let c=n?`”`:``,l;t[2]!==o||t[3]!==c?(l=(0,U.jsxs)(`div`,{className:`listen-line`,children:[o,s,c]}),t[2]=o,t[3]=c,t[4]=l):l=t[4];let u=i??(r===`always`?`Always on — Mavéa answers when you finish a thought.`:r===`hold`?`Release the mic or shortcut to send.`:`It sends when you pause — or tap the mic to send now.`),d;t[5]===u?d=t[6]:(d=(0,U.jsx)(`div`,{className:`listen-note`,role:`status`,"aria-live":`polite`,children:u}),t[5]=u,t[6]=d);let f;return t[7]!==l||t[8]!==d?(f=(0,U.jsx)(`div`,{className:`listen-stage`,children:(0,U.jsxs)(`div`,{className:`listen-card`,children:[a,(0,U.jsxs)(`div`,{className:`listen-body`,children:[l,d]})]})}),t[7]=l,t[8]=d,t[9]=f):f=t[9],f}var Ed=250;function Dd(e){let t=(0,q.c)(6),{cards:n}=e,[r,i]=(0,H.useState)(!1),a,o;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{let e=window.setTimeout(()=>i(!0),Ed);return()=>window.clearTimeout(e)},o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,H.useEffect)(a,o),!r||n.length===0)return null;let s;t[2]===n?s=t[3]:(s=n.map(Od),t[2]=n,t[3]=s);let c;return t[4]===s?c=t[5]:(c=(0,U.jsx)(`div`,{className:`skel-grid`,role:`status`,"aria-label":`Building the answer`,children:s}),t[4]=s,t[5]=c),c}function Od(e,t){return(0,U.jsxs)(`div`,{className:`skel-card`,children:[(0,U.jsxs)(`span`,{className:`skel-eyebrow`,children:[`✦ `,e.label,`…`]}),e.lines.map(kd)]},t)}function kd(e,t){return(0,U.jsx)(`span`,{className:`skel-line`,style:{width:`${e}%`}},t)}function Ad({thinking:e=!1}){return(0,U.jsxs)(`div`,{className:`composing-status`,role:`status`,"aria-live":`polite`,children:[(0,U.jsx)(`span`,{className:`composing-orb`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{children:e?`Thinking it through`:`Composing your answer`}),(0,U.jsxs)(`span`,{className:`composing-dots`,"aria-hidden":`true`,children:[(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{})]})]})}function jd(e){let t=(0,q.c)(14),{activity:n,sources:r}=e,i,a,o,s,c,l;if(t[0]!==n||t[1]!==r){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=r.slice(0,3),t=n===`searching`;if(!t&&e.length===0){l=null;break bb0}i=`turn-chips`,a=`status`,o=`polite`,s=t&&e.length===0&&(0,U.jsxs)(`span`,{className:`turn-chip`,children:[(0,U.jsx)(L.globe,{}),` Searching the web…`]}),c=e.map(Md)}t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l}else i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7];if(l!==Symbol.for(`react.early_return_sentinel`))return l;let u;return t[8]!==i||t[9]!==a||t[10]!==o||t[11]!==s||t[12]!==c?(u=(0,U.jsxs)(`div`,{className:i,role:a,"aria-live":o,children:[s,c]}),t[8]=i,t[9]=a,t[10]=o,t[11]=s,t[12]=c,t[13]=u):u=t[13],u}function Md(e,t){return(0,U.jsxs)(`span`,{className:`turn-chip src`,children:[(0,U.jsx)(`i`,{className:`turn-chip-dot`,"aria-hidden":`true`}),he(e.url)??e.title]},t)}function Nd(){return(0,H.useSyncExternalStore)(De,xe,Pd)}function Pd(){return!1}var Fd=600,Id=!1,Ld=null,Rd=null,zd=new Set;function Bd(){if(ye()){Ld===null&&!Id&&(Ld=window.setTimeout(()=>{Ld=null,Id=!0;for(let e of zd)e()},Fd));return}if(Ld!==null&&(window.clearTimeout(Ld),Ld=null),Id){Id=!1;for(let e of zd)e()}}function Vd(e){return zd.add(e),Rd??=De(Bd),()=>{zd.delete(e),zd.size===0&&(Rd?.(),Rd=null,Ld!==null&&(window.clearTimeout(Ld),Ld=null),Id=!1)}}function Hd(){return(0,H.useSyncExternalStore)(Vd,Wd,Ud)}function Ud(){return!1}function Wd(){return Id}var Gd={scalar:`Key figure`,series:`Trend`,composition:`Breakdown`,comparison:`Comparison`,ranking:`Ranking`,distribution:`Distribution`,relationship:`Relationship`,hierarchy:`Structure`,flow:`Process`,sequence:`Timeline`,keyvalue:`Readouts`,list:`Checklist`,geo:`Map`,code:`Code`,tabular:`Table`,status:`Status`},Kd=/^(please|hey|ok(ay)?|so|now|can|could|would|will|you|how|what|why|when|where|which|who|should|is|are|do|does|did|tell|show|give|make|build|plan|help|i|me|us|my|about|the|a|an)\b[\s,'’]*/i;function qd(e,t=4){let n=e.trim().replace(/\s+/g,` `);for(let e=0;e<8;e++){let e=n.replace(Kd,``);if(e===n)break;n=e}return n.replace(/[?!.]+$/,``).split(` `).slice(0,t).join(` `).trim()}var Jd=[[78,52],[64,88],[82,40]];function Yd(e,t){let n=qd(e),r=Kt(e,t),i=Object.entries(r).filter(([e,t])=>t>0&&Gd[e]).sort((e,t)=>t[1]-e[1]).map(([e])=>Gd[e]),a=Ht(e)===`rich`?3:2,o=[`Finding`];for(let e of i){if(o.length>=a)break;o.includes(e)||o.push(e)}for(;o.length<a;)o.push(o.length===1?`Readouts`:`Details`);return o.map((e,t)=>({label:n?`${e} — ${n}`:e,lines:Jd[t%Jd.length]}))}function Xd(e){let t=e&&Gd[e]||(e===`text`?`Finding`:null);return{label:t?`Building — ${t.toLowerCase()}`:`Building`,lines:Jd[0]}}function Zd(e){return e.paletteOpen||e.shareOpen||e.exportOpen||e.dashOpen||e.showSettings||e.proofOpen||e.showHow||e.replayAt!==null||e.recapOpen||e.atlasOpen||e.delegateOpen||e.srsOpen||e.zoomLevel!==null||e.mindViewOpen}function Qd(e,t){let n=e.left-t.left+e.width/2,r=e.top-t.top+e.height/2,i=Math.min(e.width/2+14,t.width*.45),a=e.height/2+10,o=Math.PI*2*1.12,s=[];for(let e=0;e<=32;e++){let t=-Math.PI/2+o*e/32;s.push({x:n+Math.cos(t)*i,y:r+Math.sin(t)*a})}return s}var $d=`Local voice input isn’t available here — check browser microphone support, or type instead.`,ef=`Microphone access is blocked — allow mic access for this site to talk to Mavéa.`,tf=`Couldn’t reach your microphone — check it’s connected and not in use by another app.`,nf=`Local transcription is still starting or unavailable — try again in a moment, or type instead.`;function rf(){let e=(0,q.c)(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let[n,r]=(0,H.useState)(t),[i,a]=(0,H.useState)(null),[o,s]=(0,H.useState)(!1),c;e[1]===n.length?c=e[2]:(c=async e=>{a(null);let t=6-n.length;if(t<=0){a(`You can attach up to 6 files.`);return}let i=[],o=null;for(let n of e.slice(0,t)){let e=await gt(n);if(e.ok&&e.attachment)i.push(e.attachment);else if(!o){let t=/\.(pdf|docx|pptx|xlsx)$/i.test(n.name);o=e.error===`too-large`?`"${n.name}" is too large (max ${t?40:10} MB).`:`"${n.name}" isn't a supported type (images, PDF, Office docs, or text/data files like CSV, TXT, Markdown, JSON).`}}e.length>t&&(o=`Only the first ${t} file(s) were added.`),i.length&&r(e=>[...e,...i]),o&&a(o)},e[1]=n.length,e[2]=c);let l=c,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{r(t=>t.filter((t,n)=>n!==e))},e[3]=u):u=e[3];let d=u,f;return e[4]!==i||e[5]!==n||e[6]!==l||e[7]!==o?(f={attached:n,setAttached:r,attachError:i,setAttachError:a,turnHadFiles:o,setTurnHadFiles:s,onFiles:l,removeAttachment:d},e[4]=i,e[5]=n,e[6]=l,e[7]=o,e[8]=f):f=e[8],f}var af=`mavea-live-bookmarks`;function of(){let[e,t]=(0,H.useState)(()=>{try{let e=localStorage.getItem(af);return e?new Set(JSON.parse(e)):new Set}catch{return new Set}});return{bookmarks:e,toggleBookmark:(0,H.useCallback)(e=>{t(t=>{let n=new Set(t);n.has(e)?n.delete(e):n.add(e);try{localStorage.setItem(af,JSON.stringify([...n]))}catch{}return n})},[])}}var sf=`mavea-live-ask-hint`;function cf(){let e=(0,q.c)(3),[t,n]=(0,H.useState)(lf),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{n(!0);try{localStorage.setItem(sf,`1`)}catch{}},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a={askHintSeen:t,dismissAskHint:i},e[1]=t,e[2]=a),a}function lf(){try{return localStorage.getItem(sf)===`1`}catch{return!1}}i();var uf=(0,H.lazy)(()=>a(()=>import(`./TopicCanvas-DR26Swr_.js`).then(e=>e.n).then(e=>({default:e.TopicCanvas})),__vite__mapDeps([33,1,34,35,14,2,36,37,38,39,40,41,42,43,13,44,45,46,4,47,48,49,50,51,52,53,16,54,5,6,22,55,56,57,58,59]))),df=[{col:6},{col:6},{col:12}],ff=`mavea-live-rail-collapsed-v1`,pf=`mavea-mic-hold-preferred`,mf=`I may have misheard that. Review the draft, then send it.`,hf=6400,gf=Da+zi;function _f(e){return gd(e.target)?!0:(e.key===` `||e.key===`Spacebar`)&&e.target instanceof HTMLElement&&!!e.target.closest(`button`)}var vf=s(()=>a(()=>import(`./HowItWorks-gAuUl7VQ.js`).then(e=>({default:e.HowItWorks})),__vite__mapDeps([60,34,1,14,13,33,35,2,36,37,38,39,40,41,42,43,44,45,46,4,47,48,49,50,51,52,53,16,54,5,6,22,55,56,57,58,59,61,62,63,64,65,66,67,15,68,19]))),yf=vf.Component,bf=s(()=>a(()=>import(`./CommandPalette-DagPdSGZ.js`).then(e=>({default:e.CommandPalette})),__vite__mapDeps([69,34,1,14,39,40,41,13,70,71]))),xf=bf.Component,Sf=s(()=>a(()=>import(`./Library-DmdzY2se.js`).then(e=>({default:e.Library})),__vite__mapDeps([72,34,1,35,14,13,4,73,74,75,76,77]))).Component,Cf=s(()=>a(()=>import(`./LiveSettings-jn26sH4v.js`).then(e=>({default:e.LiveSettings})),__vite__mapDeps([78,34,1,35,14,2,36,37,38,39,40,41,42,43,13,48,79,15,80,81,23,76,21,22,10,20,82,27,83,84,26,85,25,86,87,88,89,90,91]))),wf=Cf.Component,Tf=s(()=>a(()=>import(`./DashboardDetail-CJzB85NC.js`).then(e=>({default:e.DashboardDetail})),__vite__mapDeps([92,34,1,35,14,2,13,33,36,37,38,39,40,41,42,43,44,45,46,4,47,48,49,50,51,52,53,16,54,5,6,22,55,56,57,58,59,17,62,63,64,65,66,67,15,68,93,84,26,27,82,23,21,10,20,94,95,96,97,98,99,100,101,30,102,31,103,104,105,79,106,107,108,109,110,111,112,113,114]))).Component,Ef=s(()=>a(()=>import(`./DashboardSettings-CmZWG3US.js`).then(e=>({default:e.DashboardSettings})),__vite__mapDeps([115,34,1,35,14,93,84,26,27,94,95,98,104]))).Component,Df=s(()=>a(()=>import(`./UnderstoodPanel-DmJph4el.js`).then(e=>({default:e.UnderstoodPanel})),__vite__mapDeps([116,34,1,35,14,117]))).Component,Of=s(()=>a(()=>import(`./ZoomDeck-DNgyW7Nm.js`).then(e=>({default:e.ZoomDeck})),__vite__mapDeps([118,34,1,35,14,13,48,119,36,37,38,2,39,40,41,42,43,120,121]))),kf=Of.Component,Af=s(()=>a(()=>import(`./AtlasView-B82UfrEX.js`).then(e=>({default:e.AtlasView})),__vite__mapDeps([122,34,1,14,73,74,4,75,76,123,84,26,27,124]))),jf=Af.Component,Mf=s(()=>a(()=>import(`./RippleOverlay-DVxfWEQ8.js`).then(e=>({default:e.RippleOverlay})),__vite__mapDeps([125,34,1,35,14,2,40,39,41,36,37,38,42,43,48,50,80,81,126,127,128,129,27,130,131,132,133]))),Nf=Mf.Component,Pf=s(()=>a(()=>import(`./CardEditor-DABIhGdQ.js`).then(e=>({default:e.CardEditor})),__vite__mapDeps([134,34,1,14,48,89,135]))).Component,Ff=s(()=>a(()=>import(`./CourseRail-Dx9IIbTZ.js`).then(e=>({default:e.CourseRail})),__vite__mapDeps([136,34,1,35,14,13,82,23,27,21,22,10,20,89,137,138,139,140,141]))).Component,If=s(()=>a(()=>import(`./MindMapViewerDrawer-CDDzzpFi.js`).then(e=>({default:e.MindMapViewerDrawer})),__vite__mapDeps([142,35,1,34,14,13,143,50,144,38,145,146]))).Component,Lf=s(()=>a(()=>import(`./Recap-T9DtFaEk.js`).then(e=>({default:e.Recap})),__vite__mapDeps([147,34,1,35,14,48,148]))),Rf=Lf.Component,zf=s(()=>a(()=>import(`./LibraryOverlay-DEQ5GuIs.js`).then(e=>({default:e.LibraryOverlay})),__vite__mapDeps([149,34,1,35,14,13,48,119,36,37,38,2,39,40,41,42,43,72,4,73,74,75,76,77,150]))),Bf=zf.Component,Vf=s(()=>a(()=>import(`./ReplayOverlay-Dm_k7FBA.js`).then(e=>({default:e.ReplayOverlay})),__vite__mapDeps([151,34,1,14,33,35,2,36,37,38,39,40,41,42,43,13,44,45,46,4,47,48,49,50,51,52,53,16,54,5,6,22,55,56,57,58,59,152,61,62,63,64,65,66,67,15,68,153,154,155,156]))).Component,Hf=s(()=>a(()=>import(`./ShareModal-BILPvqjZ.js`).then(e=>({default:e.ShareModal})),__vite__mapDeps([157,34,1,35,14,2,39,40,41,13,65,66,67,15,48,52,158,36,37,38,42,43,79,159,160,145,75,80,81,161]))),Uf=Hf.Component,Wf=s(()=>a(()=>import(`./ExportModal-rxndDhoO.js`).then(e=>({default:e.ExportModal})),__vite__mapDeps([162,34,1,35,14,2,36,37,38,39,40,41,42,43,67,4,48,17,159,80,81,163,46,13,47,16,164,51,53,165,56,55,57,58,166,167,168,169,143,50,144,145,146,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,49,195,196,197,198,199,200,201,202,79,15,203,204,54,205,206,207,208,209,119,210,211,212,213,214,215,216,217,218,219,18,220,9,221,222,223,224]))),Gf=Wf.Component,Kf=s(()=>a(()=>import(`./ExtractionPreview-ChRAimKr.js`).then(e=>({default:e.ExtractionPreview})),__vite__mapDeps([225,34,1,35,14,48,226,7,84,26,27,93,21,22,10,23,20,82,83,94,102,101,2,97,96,98,30,31,103,104,105,15,79,36,37,38,39,40,41,42,43,106,227,114]))),qf=Kf.Component,Jf=s(()=>a(()=>import(`./PinToDashboard-CSqwDBLD.js`).then(e=>({default:e.PinToDashboard})),__vite__mapDeps([228,34,1,35,14,13,4,48,93,84,26,27,82,23,21,22,10,20,98,108,101,2,97,96,30,102,31,103,104,105,15,79,36,37,38,39,40,41,42,43,109]))).Component,Yf=s(()=>a(()=>import(`./PrismOverlay-CGtr7lBl.js`).then(e=>e.n).then(e=>({default:e.PrismOverlay})),__vite__mapDeps([229,1,34,35,14,2,40,39,41,36,37,38,42,43,48,52,17,230,154,20,231,21,22,10,23,232,233,11,32,234,235,236]))),Xf=Yf.Component,Zf=s(()=>a(()=>import(`./SynthesisOverlay-Dunk_JWD.js`).then(e=>({default:e.SynthesisOverlay})),__vite__mapDeps([237,34,1,35,14,20,21,22,10,23,232,229,2,40,39,41,36,37,38,42,43,48,52,17,230,154,231,233,11,32,234,235,236]))),Qf=Zf.Component,$f=s(()=>a(()=>import(`./PresentationDeck-Dj9MQVZC.js`).then(e=>({default:e.PresentationDeck})),__vite__mapDeps([238,34,1,35,14,163,67,46,13,4,47,16,164,51,53,165,56,55,57,58,166,167,168,169,143,50,144,38,145,146,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,2,188,189,17,190,191,192,193,194,49,195,196,36,37,39,40,41,42,43,197,198,199,200,201,202,79,15,203,204,54,205,206,207,208,209,48,119,210,211,212,213,214,215,216,217,218,219,18,220,9,221,222,239]))),ep=$f.Component,tp=s(()=>a(()=>import(`./DelegatePanel-Bi1qPgGG.js`).then(e=>({default:e.DelegatePanel})),__vite__mapDeps([240,34,1,35,14,15,48,144,38,145,79,36,37,2,39,40,41,42,43,80,81,21,22,10,23,20,239,241]))),np=tp.Component,rp=s(()=>a(()=>import(`./SrsReview-DhWNYYv7.js`).then(e=>({default:e.SrsReview})),__vite__mapDeps([242,34,1,14,48,89,90,243]))),ip=rp.Component,ap=s(()=>a(()=>import(`./TourPrism-zt1LIaLd.js`).then(e=>({default:e.TourPrism})),__vite__mapDeps([244,34,1,35,14,229,2,40,39,41,36,37,38,42,43,48,52,17,230,154,20,231,21,22,10,23,232,233,11,32,234,235,236]))),op=ap.Component;function $({children:e,label:t=`Feature`}){return(0,U.jsx)(b,{label:t,overlay:!0,children:e})}function sp(){try{window.location.hash=``}catch{}}function cp(e){return l(e)??Promise.resolve()}function lp(e){let t=e.toLowerCase().trim().replace(/[.,!?]+$/,``);return t.split(/\s+/).filter(Boolean).length<=3&&/^(yeah|yep|yes|ok|okay|sure|right|uh huh|uh-huh|mhm|mm|hmm|hm|go on|go ahead|carry on|continue|keep going|please continue|please go on|go ahead|keep it up|got it|alright)$/.test(t)?!0:/\b(keep going|go on|continue|carry on|go ahead|please continue|please go on)\b/.test(t)}function up(){let[e]=Rt(),t=rt(e.provider),n=e.models[e.provider]||t.defaultModel;(0,H.useLayoutEffect)(()=>I(document),[]),(0,H.useEffect)(()=>{let t=document.documentElement;return e.fontScale===`normal`?delete t.dataset.fontScale:t.dataset.fontScale=e.fontScale,()=>{delete t.dataset.fontScale}},[e.fontScale]);let r=(0,H.useRef)(x()),i=(0,H.useRef)(Xn()),a=(0,H.useRef)(ee()),s=(0,H.useRef)(a.current?g():null),c=(0,H.useRef)(a.current?h():!1),l=(0,H.useRef)((()=>{if(a.current)return null;let e=_();return e&&N(e)?e:null})()),m=(0,H.useRef)(l.current?S():null);(0,H.useEffect)(()=>{a.current&&p(),s.current&&w(),c.current&&C(),l.current&&d()},[]);let[b,O]=(0,H.useState)(``),{attached:k,setAttached:M,attachError:P,setAttachError:F,turnHadFiles:te,setTurnHadFiles:ne,onFiles:re,removeAttachment:ie}=rf(),[z,ae]=(0,H.useState)([]),[ue,pe]=(0,H.useState)(!1),{askHintSeen:me,dismissAskHint:he}=cf(),[B,ye]=(0,H.useState)(!1),[be,Ce]=(0,H.useState)(`idle`),[we,Ee]=(0,H.useState)(null),[Oe,je]=(0,H.useState)(null),[Fe,Ie]=(0,H.useState)(null),[V,Le]=(0,H.useState)(!1),[Re,ze]=(0,H.useState)(!1),[Ve,Ge]=(0,H.useState)(!1),[qe,Ye]=(0,H.useState)(!1),[Xe,Ze]=(0,H.useState)(null),[Qe,$e]=(0,H.useState)(!1),[et,it]=(0,H.useState)(null),[at,st]=(0,H.useState)(null),[dt,ft]=(0,H.useState)(()=>new Set),[gt,bt]=(0,H.useState)(null),[St,Ct]=(0,H.useState)(null),wt=(0,H.useRef)(void 0),[Tt,Et]=(0,H.useState)(null),Dt=(0,H.useRef)(void 0),[Ot,kt]=(0,H.useState)(!1),[jt,It]=(0,H.useState)(!1),[Lt,Vt]=(0,H.useState)(!1),[Ht,Wt]=(0,H.useState)(!1),[Gt,Kt]=(0,H.useState)(!1),[qt,Qt]=(0,H.useState)(()=>Fn().length),$t=wn().length;(0,H.useEffect)(()=>{let e=()=>void Bt(),t={once:!0,passive:!0};return window.addEventListener(`keydown`,e,t),window.addEventListener(`pointerdown`,e,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,e)}},[]),(0,H.useEffect)(()=>Qn(),[]);let[en,tn]=(0,H.useState)(null),[rn,on]=(0,H.useState)(null),[sn,cn]=(0,H.useState)(null),dn=(0,H.useCallback)(e=>{e.length>=4?cn(e):e.length>0&&tn(e)},[]),[fn,pn]=(0,H.useState)(null);(0,H.useEffect)(()=>{f()&&(u(),pn(In))},[]);let[mn,gn]=(0,H.useState)({open:!1,spec:null}),[yn,xn]=(0,H.useState)(!1),Sn=(0,H.useRef)(!1);Sn.current=yn;let[Cn,Vn]=(0,H.useState)(()=>bd()),[Un,Yn]=(0,H.useState)(!1),[nr,rr]=(0,H.useState)(new Set),[ir,cr]=(0,H.useState)(null),[lr,dr]=(0,H.useState)(null),[fr,pr]=(0,H.useState)(null),[mr,hr]=(0,H.useState)(!1),gr=(0,H.useCallback)((e,t=!1)=>{pr(e),hr(e!==null&&t)},[]),_r=(0,H.useCallback)(()=>{pr(null),hr(!1)},[]),vr=(0,H.useRef)(new Fl).current,xr=(0,H.useMemo)(()=>e.quality===`fast`?null:Nt(e),[e]),[Sr,wr]=(0,H.useState)(!1),Tr=(0,H.useRef)(!1);Tr.current=Sr;let Er=(0,H.useRef)([]),[Dr,Or]=(0,H.useState)(0),kr=(0,H.useRef)(0),Ar=cd(Sr,Dr),[W,jr]=(0,H.useState)(!1),Mr=(0,H.useRef)(!1);Mr.current=W;let Nr=(0,H.useRef)([]),G=Qu((0,H.useMemo)(()=>Nt(e),[e])),Pr=(0,H.useRef)(G);Pr.current=G;let K=(0,H.useRef)(null),Fr=(0,H.useRef)(!1),Ir=(0,H.useRef)(`idle`),Lr=(0,H.useCallback)(()=>{let e=Nr.current.join(` `).trim();e&&Pr.current.phase===`listening`&&Pr.current.onSpeechEnd(e)},[]),Rr=nn(),[zr,Br]=(0,H.useState)(!1),[Vr,Hr]=(0,H.useState)(()=>{try{return localStorage.getItem(ff)===`true`}catch{return!1}});(0,H.useEffect)(()=>{try{localStorage.setItem(ff,String(Vr))}catch{}},[Vr]);let[Ur,Wr]=(0,H.useState)(!1),[Gr,Kr]=(0,H.useState)(!1),[q,Jr]=(0,H.useState)(!1),[Yr,Xr]=(0,H.useState)(),[Zr,Qr]=(0,H.useState)(!1);(0,H.useEffect)(()=>{q||Qr(!1)},[q]);let{open:$r,openPalette:ei,closePalette:ni}=y(),[ri,ai]=(0,H.useState)(!1),[oi,si]=(0,H.useState)(0),[ci,li]=(0,H.useState)(0),[ui,di]=(0,H.useState)(!1),[J,fi]=(0,H.useState)(()=>{try{return localStorage.getItem($i)===`true`}catch{return!1}}),[pi,mi]=(0,H.useState)(!1),hi=(0,H.useRef)(null),[gi,_i]=(0,H.useState)(()=>{try{return localStorage.getItem(pf)===`true`}catch{return!1}}),vi=J?`always`:gi?`hold`:`tap`;(0,H.useEffect)(()=>{try{let e=Te(localStorage.getItem(`mavea-voice-mavea`)||`heart`);e&&ke(`mavea`,e.kokoro)}catch{}},[]),(0,H.useEffect)(()=>{if(typeof window>`u`)return;let e,t=t=>{let n=t.detail?.changed;Array.isArray(n)&&n.length>0&&(Kr(!0),e&&clearTimeout(e),e=setTimeout(()=>Kr(!1),2600))};return window.addEventListener(hn,t),()=>{window.removeEventListener(hn,t),e&&clearTimeout(e)}},[]);let yi=(0,H.useCallback)(e=>{try{localStorage.setItem($i,String(e))}catch{}},[]);(0,H.useEffect)(()=>{let e=hi.current;yi(e?e.enabled:J)},[J,yi]),(0,H.useEffect)(()=>{try{localStorage.setItem(pf,String(gi))}catch{}},[gi]);let xi=(0,H.useRef)(null),Si=(0,H.useRef)(V);Si.current=V;let wi=(0,H.useRef)(null),Ti=(0,H.useCallback)(e=>{Si.current||xi.current?.setMaveaSpeaking(!0);let t=!xe(),n=_e(e,`mavea`);return t&&(wi.current=n),n},[]);(0,H.useEffect)(()=>{Se(V),V?xi.current?.setMaveaSpeaking(!1):xe()&&xi.current?.setMaveaSpeaking(!0)},[V]);let[Di]=(0,H.useState)(()=>r.current||i.current?(lt(),null):a.current||l.current?null:ct()),Oi=(0,H.useRef)(ut()).current,Y=to({canRun:D,getConfig:()=>Nt(Pt()),getCaps:()=>Mt(Pt()),speak:Ti,cancelSpeak:Ne,getLibraryEnabled:()=>Pt().libraryEnabled,initial:Di?eo(Di):void 0}),Ai=Cu(B,we,xr,Y.busy),ji=(0,H.useCallback)(()=>{window.location.hash=`#/live`,window.location.reload()},[]),Mi=(0,H.useCallback)(()=>{E(),window.location.hash=`#/live`,window.location.reload()},[]),Ni=(0,H.useRef)(`normal`);Ni.current=Y.phase;let Pi=(0,H.useRef)(null);Pi.current=Y.activeBlank;let Fi=(0,H.useRef)([]);Fi.current=Y.spec?.blanks??[],(0,H.useEffect)(()=>{zt()},[]),(0,H.useEffect)(()=>{a.current||l.current||Y.frames.length>0&&ot(Y.history,Y.frames)},[Y.frames,Y.history]),(0,H.useEffect)(()=>{if(!(Y.frames.length===0||Y.busy))return o(Hf.preload)},[Y.frames.length,Y.busy]),(0,H.useEffect)(()=>{if(!a.current)return;let e=c.current&&s.current===`prism`;if(!(c.current&&!e))return o(()=>Promise.all([ap.preload(),Ei()]).then(()=>void 0),e?300:2500)},[]);let Ii=(0,H.useMemo)(()=>Y.frames.map((e,t)=>({index:t,label:e.question||`Answer ${t+1}`,spec:e.spec})),[Y.frames]),Li=(0,H.useCallback)(e=>{if(e.length){if(!Tn().styleAsked&&jn().length===e.length){Et({count:e.length,deck:e[0].deck}),Dt.current&&clearTimeout(Dt.current),Dt.current=setTimeout(()=>{En(),Et(null)},12e3);return}Ct({count:e.length,ids:e.map(e=>e.id)}),wt.current&&clearTimeout(wt.current),wt.current=setTimeout(()=>Ct(null),6e3)}},[]),Bi=(0,H.useCallback)(e=>{Dt.current&&clearTimeout(Dt.current),e?Dn(e):En(),Et(null)},[]);(0,H.useEffect)(()=>()=>{wt.current&&clearTimeout(wt.current),Dt.current&&clearTimeout(Dt.current)},[]),(0,H.useEffect)(()=>{if(!e.autoSaveFlashcards)return;let t=Y.frames[Y.frames.length-1];if(!t)return;let n=Wc(t.spec.blocks);if(n.length>0){let e=kn(n,{deck:t.spec.topic||t.spec.title||`General`,origin:`auto`});Li(e)}},[Y.frames,e.autoSaveFlashcards,Li]);let Vi=(0,H.useCallback)(t=>{let n=Y.viewSpec??Y.spec,r=n?.topic||n?.title||`General`,{cards:i,exact:a}=tl(t),o={ts:Date.now(),...t.id?{blockId:t.id}:{},...Oe?{question:Oe}:{},...n?.topic?{topic:n.topic}:{}},s=Nt(e),c=!!s.apiKey;bt({block:t,initial:i,deck:r,source:o,enrich:!a&&c?()=>il(t,s):void 0})},[Y.viewSpec,Y.spec,Oe,e]),Hi=(0,H.useRef)(null),Ui=(0,H.useRef)(null),Ki=(0,H.useRef)(()=>{}),ta=(0,H.useRef)([]),na=(0,H.useRef)(()=>{}),ra=(0,H.useRef)(()=>{});na.current=()=>{let e=document.querySelector(`.bend-slider`);if(!e)return;e.scrollIntoView({block:`center`,behavior:`smooth`});let t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set;if(!t)return;ta.current.forEach(e=>window.clearTimeout(e)),ta.current.length=0;let n=Number(e.min||0),r=Number(e.max||100),i=Number(e.step||1)||1,a=Number(e.value),o=Math.min(r,n+(r-n)*.78);for(let n=1;n<=26;n++)ta.current.push(window.setTimeout(()=>{let r=a+(o-a)*n/26,s=Math.round(r/i)*i;t.call(e,String(s)),e.dispatchEvent(new Event(`input`,{bubbles:!0}))},500+n*90))},(0,H.useEffect)(()=>{let e=ta.current;return()=>e.forEach(e=>window.clearTimeout(e))},[]);let ia=(0,H.useRef)(()=>{}),aa=(0,H.useRef)(null),ca=(0,H.useRef)(null),la=(0,H.useRef)(null),ua=(0,H.useRef)(!1),da=(0,H.useRef)(null),fa=(0,H.useRef)(!1),pa=(0,H.useRef)(null),[ma,ha]=(0,H.useState)(!1),[ga,_a]=(0,H.useState)(!1),va=(0,H.useMemo)(()=>{let e=new Map,t=Y.spec?.blocks??[];for(let n of Y.tour){let r=t[n.index]?.id,i=n.saySpoken??n.say;r&&i&&e.set(r,i)}return e},[Y.tour,Y.spec]),xa=(0,H.useMemo)(()=>{let e=new Map,t=Y.spec?.blocks??[];for(let n of Y.tour){let r=t[n.index]?.id;r&&n.mark&&e.set(r,n.mark)}return e},[Y.tour,Y.spec]),Sa=(0,H.useMemo)(()=>{let e=new Map,t=Y.spec?.blocks??[];for(let n of Y.tour){let r=t[n.index]?.id,i=n.marks??(n.mark?[n.mark]:[]);r&&i.length&&e.set(r,i)}return e},[Y.tour,Y.spec]),[wa,Ea]=(0,H.useState)([]),[Da,ka]=(0,H.useState)(()=>new Set),Aa=(0,H.useCallback)(e=>{ka(t=>t.has(e)?t:new Set(t).add(e))},[]),ja=(0,H.useMemo)(()=>wa.filter(e=>e.noteText!==void 0||Da.has(e)),[wa,Da]),Ma=(0,H.useRef)(Date.now()),Na=(0,H.useRef)(null),Pa=(0,H.useRef)(null),Fa=(0,H.useCallback)(e=>{Pa.current=e,Na.current??=requestAnimationFrame(()=>{Na.current=null,Pa.current!=null&&Ee(Pa.current)})},[]);(0,H.useEffect)(()=>()=>{Na.current!=null&&cancelAnimationFrame(Na.current)},[]),(0,H.useEffect)(()=>{Ea([]),ka(new Set),Ma.current=Date.now()},[Y.turn]);let[Ia,La]=(0,H.useState)(!1);(0,H.useEffect)(()=>La(!1),[Y.turn]);let[Ra,za]=(0,H.useState)(()=>new Set);(0,H.useEffect)(()=>za(new Set),[Y.turn]);let Ba=(0,H.useRef)(!1);(0,H.useEffect)(()=>{let e=!!Y.error;e&&!Ba.current&&Hi.current?.scrollTo({top:0,behavior:`smooth`}),Ba.current=e},[Y.error]);let[Va,Ha]=(0,H.useState)(!1);(0,H.useEffect)(()=>{let e=Hi.current;if(!e||typeof ResizeObserver>`u`)return;let t=()=>Ha(e.clientWidth>=1280),n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[Y.turn]);let Ua=(0,H.useMemo)(()=>wa.filter(e=>e.noteText&&!Ra.has(e.spot)).map(e=>({spot:e.spot,text:e.noteText})),[wa,Ra]),{bookmarks:Wa,toggleBookmark:Ga}=of(),Ka=(0,H.useRef)(null);(0,H.useEffect)(()=>{if(!Ia)return;function e(e){Ka.current&&!Ka.current.contains(e.target)&&La(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[Ia]);let qa=(0,H.useRef)(Y.spec);qa.current=Y.spec;let Ja=(0,H.useCallback)((e,t,n,r,i,a,o,s)=>{e&&Ea(c=>{if(s?c.some(t=>t.spot===e&&t.noteText!==void 0):c.some(t=>t.spot===e&&t.kind===n?.kind&&t.at===n?.at&&t.noteText===void 0))return c;let l=!t&&!n?.at?qa.current?.blocks.find(t=>t.id===e)??null:null,u=n?.kind===`connect`&&typeof n.onIndex==`number`?qa.current?.blocks[n.onIndex]?.id:void 0,d={spot:e,line:t??(l?ce(l):void 0),mark:n,generous:r,kind:n?.kind??(s?`note`:void 0),at:n?.at,...n?.kind===`connect`&&n.to?{to:n.to}:{},color:n?.color,inkedAt:Date.now(),...i?{delayMs:i}:{},...a?{badgeMs:a}:{},...o?{stepNumber:o}:{},...u?{toSpot:u}:{},...s?{noteText:s}:{}};return[...c,d]})},[]),Ya=e.teachMode||Fs(Oe),Xa=(0,H.useRef)(e.annotationsEnabled);Xa.current=e.annotationsEnabled;let Za=(0,H.useRef)(J);Za.current=J;let Qa=(0,H.useRef)(null);Qa.current=Y.narration??null;let $a=(0,H.useRef)(!1),no=(0,H.useRef)(!1);no.current=Y.busy;let ro=(0,H.useRef)(null),io=(0,H.useRef)(Y.frames);io.current=Y.frames;let oo=(0,H.useRef)([]),so=(0,H.useCallback)(()=>{let e=!Xa.current;ro.current=null,Ft({annotationsEnabled:e,teachMode:e}),e?(Ea(oo.current),oo.current=[]):Ea(e=>(oo.current=e,[]))},[]),co=(0,H.useRef)(null),lo=(0,H.useCallback)((e,t)=>{let n=Ui.current,r=n?.querySelector(`[data-spot-id="${CSS.escape(e)}"]`);if(!r)return;let i=t?n?.querySelector(`[data-spot-id="${CSS.escape(t)}"]`):null,a=Hi.current;if(i&&a){let e=a.getBoundingClientRect(),t=r.getBoundingClientRect(),n=i.getBoundingClientRect(),o=(Math.min(t.top,n.top)+Math.max(t.top+t.height,n.top+n.height))/2-e.top-a.clientHeight/2;a.scrollTo({top:Math.max(0,a.scrollTop+o),behavior:`smooth`})}else r.scrollIntoView({behavior:`smooth`,block:`center`});let o=[r,i].filter(e=>!!e);o.forEach(e=>e.classList.add(`ink-jump-glow`)),co.current!=null&&window.clearTimeout(co.current),co.current=window.setTimeout(()=>{o.forEach(e=>e.classList.remove(`ink-jump-glow`)),co.current=null},800)},[]);(0,H.useEffect)(()=>()=>{co.current!=null&&window.clearTimeout(co.current)},[]);let uo=(0,H.useRef)(null),fo=(0,H.useCallback)((e,t)=>{Y.jumpTo(e),t&&(uo.current!=null&&cancelAnimationFrame(uo.current),uo.current=requestAnimationFrame(()=>{uo.current=null,lo(t)}))},[Y,lo]);(0,H.useEffect)(()=>()=>{uo.current!=null&&cancelAnimationFrame(uo.current)},[]);let po=(0,H.useCallback)(e=>{za(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),[mo,ho]=yr(),[go,_o]=(0,H.useState)(0),vo=(0,H.useRef)(mo);vo.current!==mo&&(vo.current=mo,_o(e=>e+1));let yo=(0,H.useCallback)(()=>{let e=ro.current;e&&(ro.current=null,Xa.current=e.annotationsEnabled,Ft(e))},[]),bo=(0,H.useCallback)(()=>{if(Xa.current)return;let{annotationsEnabled:e,teachMode:t}=Pt();ro.current??={annotationsEnabled:e,teachMode:t},Xa.current=!0,Ft({annotationsEnabled:!0,teachMode:!0})},[]),xo={isBusy:()=>Y.busy||fa.current,isSpeaking:()=>xe(),hasCanvas:()=>!!Y.spec,showFrame:(e,t,n)=>{je(t),O(``),Y.showFrame(e,t,{interrupt:!1,revealNow:Si.current,silent:n?.silent})},typeInto:O,speak:e=>(Uc(e),Ti(e)),cancelSpeech:Ne,setMuted:Le,setViewMode:ho,setInkArmed:pe,setPresenting:xn,setShareOpen:ze,setPaletteOpen:e=>e?ei():ni(),pressKeepGoing:e=>{let t=document.querySelectorAll(`.footer-keepgoing .kg-row`),n=Array.from(t).find(t=>t.textContent?.includes(e))??t[0];n&&(n.classList.add(`kg-tour-press`),window.setTimeout(()=>n.classList.remove(`kg-tour-press`),620))},pinFirstBlock:()=>{let e=qa.current?.blocks.find(e=>!!e.id);e&&Os(e)},pinFirstBlocks:e=>{let t=(qa.current?.blocks??[]).filter(e=>!!e.id).slice(0,e);ae(t)},startWatchThinking:()=>{jr(!0),Mr.current=!0},bankThought:e=>{Nr.current=[...Nr.current,e],G.onTranscript(Nr.current.join(` `))},openAtlas:()=>{if(Fn().length<3){for(let e of[`money`,`space`,`travel`,`budget`]){let t=Cr(e),n=t?.frames[0]?.spec;t&&n&&Xt(n,t.question)}Qt(Pn(Zt()))}Kt(!0)},openPrism:e=>{Ei().then(t=>{To.current.chapter?.action.kind===`prism`&&on(t[e]??null)})},showcaseFeature:e=>{if(e===`library`&&Zt().length<3)for(let e of[`money`,`space`,`travel`]){let t=Cr(e),n=t?.frames[0]?.spec;t&&n&&Xt(n,t.question)}if(e===`deepzoom`){window.location.hash=`#/deepzoom?demo=1`;return}if(e===`synthesis`){window.location.hash=`#/synthesis?demo=1`;return}So.current[e]?.run()},setSpot:e=>Y.setSpot(e),scriptedMark:()=>Ki.current(),drawPenTourStep:e=>{bo(),e===`result`?(Hi.current?.scrollTo({top:0,behavior:`smooth`}),Ja(`live-1`,`After thirty years, the investment reaches seventy-six thousand one hundred twenty-three dollars.`,{kind:`circle`,at:`$76,123`,color:`key`},!1,void 0,5600,1)):Ja(`live-1`,`Compounding grows the original investment by more than seven point six times.`,{kind:`underline`,at:`7.6x`,color:`warm`},!1,void 0,3e3,2)},drawPenOnFirstBlock:()=>{let e=Y.spec?.blocks.find(e=>!!e.id);e?.id&&(bo(),Hi.current?.scrollTo({top:0,behavior:`smooth`}),Ja(e.id,e.note,void 0,!0,void 0,3200))},openDashboards:()=>{let e=ki();e?Ze(e):Ye(!0)},dashboardShowSettings:()=>$e(!0),openModelSettings:()=>{Xr(`model`),Jr(!0)},openExport:()=>Ge(!0),shareRemix:()=>{document.querySelector(`.shm-remix`)?.click()},sharePalette:e=>{Array.from(document.querySelectorAll(`.shm-chip`)).find(t=>t.textContent?.trim().toLowerCase()===e.toLowerCase())?.click()},exportSetFormat:e=>{document.querySelector(`[data-export-format="${e}"]`)?.click()},exportPickTemplate:e=>{document.querySelectorAll(`[data-export-template]`)[e]?.click()},toggleRail:()=>Hr(e=>!e),bendIt:()=>na.current(),openFlashcards:()=>{let e=Y.spec?.blocks.find(e=>!!e.id);e&&Vi(e)},openTourCourse:()=>ra.current(),fireMemoryGlow:()=>{Kr(!0),window.setTimeout(()=>Kr(!1),2600)},stopRevealWalk:()=>{ua.current=!0},closeAllOverlays:()=>{Y.setSpot(null),ae([]),O(``),ho(`everything`),pe(!1),ia.current(),Ea([]),ka(new Set),za(new Set),La(!1),xn(!1),ze(!1),ni(),pn(null),Kt(!1),tn(null),on(null),cn(null),bt(null),Wt(!1),Ge(!1),Ye(!1),Ze(null),$e(!1),Hr(!1),It(!1),Vt(!1),Jr(!1),jr(!1),wr(!1),as(null),ls(0),fs(null)}},So=(0,H.useRef)({}),Co=qr({active:a.current,startChapter:s.current,solo:c.current,ops:xo}),wo=bi({active:!!l.current,personaId:l.current,startStep:m.current,ops:xo}),To=(0,H.useRef)(Co);To.current=Co,(0,H.useEffect)(()=>{if(!a.current)return;let e=e=>{let t=To.current;if(e.key===`Escape`)t.skip();else if(_f(e))return;else e.key===`ArrowRight`?(e.preventDefault(),t.next()):e.key===`ArrowLeft`?(e.preventDefault(),t.prev()):(e.key===` `||e.key===`Spacebar`)&&(e.preventDefault(),t.toggle())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let Eo=(0,H.useRef)(wo);Eo.current=wo,(0,H.useEffect)(()=>{if(!l.current)return;let e=e=>{let t=Eo.current;if(e.key===`Escape`)t.skip();else if(_f(e))return;else e.key===`ArrowRight`?(e.preventDefault(),t.next()):e.key===`ArrowLeft`?(e.preventDefault(),t.prev()):(e.key===` `||e.key===`Spacebar`)&&(e.preventDefault(),t.toggle())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,H.useEffect)(()=>{(Co.done||wo.done)&&yo()},[Co.done,wo.done,yo]),(0,H.useEffect)(()=>()=>yo(),[yo]);let{narrate:Do,narratingId:Oo}=ur({takeWheel:()=>{ua.current=!0},hush:Ne,moveSpot:e=>{Y.setSpot(e.id??null),Xa.current&&Ja(e.id,e.note??(e.id?va.get(e.id):void 0)??void 0,e.id?xa.get(e.id):void 0,!0)},canSpeak:()=>!Si.current,lineFor:e=>e.noteSpoken??e.note??(e.id?va.get(e.id):void 0)??le(e),speakLine:Ti},Y.turn),[ko,Ao]=(0,H.useState)(!1),[jo,Mo]=(0,H.useState)(!!Di||!!r.current&&ao()||!!i.current&&ao()||a.current||!!l.current),No=an();(0,H.useEffect)(()=>{Qt(Pn(No))},[No]),(0,H.useEffect)(()=>{let e=Y.spec;if(!e||da.current===Y.turn)return;if(da.current=Y.turn,Di&&Y.turn===0){Y.spot&&Y.setSpot(null);return}if(a.current&&!Y.narration&&Y.tour.length===0){Y.spot&&Y.setSpot(null);return}let t=[];for(let n of Y.tour){let r=e.blocks[n.index]?.id;r&&t.push(n.say?{spot:r,say:n.say}:{spot:r})}let n=[];if(t.length?n=We(e.blocks,{opener:Y.narration,tour:t,maxStops:5}):Ue({blockCount:e.blocks.length,mode:Y.mode,hasModelTour:!1,teach:Ya})&&(n=We(e.blocks,{opener:Y.narration,maxStops:Ya?e.blocks.length:3,startId:Y.spot??void 0})),!n.length){Y.spot&&Y.setSpot(null);return}let r=t.length>0,i=Si.current&&r&&Xa.current;ha(i);let o=n.map(e=>({spot:e.set&&`spot`in e.set?e.set.spot??void 0:void 0,line:e.set&&`caption`in e.set?e.set.caption:void 0}));if(Si.current){if(Xa.current){let e=Ta({stops:o,spokenWalk:r,withNotes:i,teach:Ya,marksById:Sa});for(let t of e)Ja(t.spot,t.line,t.mark,t.generous,t.delayMs,t.badgeMs,t.stepNumber,t.noteText)}Y.setSpot(null);return}ua.current=!1,fa.current=!0;let s=!1,c,l,u=0,d=null,f=()=>{d&&=(d(),null)},p=()=>{fa.current=!1,pa.current=null,l&&clearTimeout(l),_a(!1),Uc(null)},m=()=>s?!0:ua.current?(p(),Y.setSpot(null),!0):!1,h=(e,t)=>{if(e!==void 0&&Y.setSpot(e??null),r&&t&&Uc(t),e&&Xa.current){let n=Sa.get(e);if(n?.length){let r=Ke+(n.length-1)*900,i=n.length>1;for(let a=0;a<n.length;a++){let o=a*900,s=a===n.length-1?r:void 0;Ja(e,t,n[a],Ya,o,s,i?a+1:void 0)}}else Ya&&Ja(e,t,void 0,Ya)}},g=e=>{let t=e&&!Si.current&&!de()?ge(e):null;if(!t){b();return}d=t.release,Oa(t,{speakLine:Ti,isCancelled:()=>s,isDismissed:()=>ua.current},e=>{if(d=null,e===`dismissed`){p(),Y.setSpot(null);return}e!==`cancelled`&&b()})},_=e=>{let t=e.set&&`spot`in e.set?e.set.spot:void 0,n=e.set&&`caption`in e.set?e.set.caption:void 0;return(t?va.get(t):void 0)??n},v=e=>{for(let t=e+1;t<n.length;t++){let e=_(n[t]);if(e){ve(e,`mavea`);return}}},y=async(e,t,n,r,i)=>{let a=e.ms??1700;if(t===0||!i){if(h(n,r),v(t),await Zi({floorMs:zi,capMs:qi(a)}),m())return;g(n);return}let o=Ti(i),s=await Yi(o);m()||(h(n,r),v(t),s?await Xi(o,a):await Ji(a),!m()&&g(n))},b=()=>{if(s||u>=n.length){p();return}if(ua.current){p(),Y.setSpot(null);return}let e=u,t=n[u++],i=t.set&&`caption`in t.set?t.set.caption:void 0,a=t.set&&`spot`in t.set?t.set.spot:void 0,o=_(t);r?y(t,e,a,i,o):(h(a,i),c=setTimeout(b,t.ms??0))};return pa.current=()=>{if(s=!0,c&&clearTimeout(c),f(),Ne(),Xa.current){let e=Ta({stops:o,from:u,spokenWalk:r,withNotes:!1,teach:Ya,marksById:Sa});for(let t of e)Ja(t.spot,t.line,t.mark,t.generous,t.delayMs,t.badgeMs,t.stepNumber,t.noteText)}p(),Y.setSpot(null)},(async()=>{l=setTimeout(()=>{s||_a(!0)},600);let t=Hi.current;await Qi({loadFams:()=>se(R(e.blocks)),settle:t?()=>tt(t,{timeoutMs:Wi,perImageMs:Gi}):void 0,firstLine:wi.current,wantVoice:!Si.current&&Ae()!==!1}),l&&clearTimeout(l),_a(!1),!m()&&b()})(),()=>{s=!0,pa.current=null,fa.current=!1,c&&clearTimeout(c),l&&clearTimeout(l),_a(!1),f()}},[Y.turn]),(0,H.useEffect)(()=>{let e=Y.spot,t=Y.spec;if(!t||!e)return;let n=0,r=0,i=()=>{let a=Hi.current;if(!a)return;let o=a.querySelector(`.spotlit`);if(!o){++n<12&&(r=window.setTimeout(i,90));return}let s=a.getBoundingClientRect(),c=o.getBoundingClientRect(),l=c.top-s.top-(a.clientHeight-c.height)/2,u=Sa.get(e)?.find(e=>e.kind===`connect`),d=u&&typeof u.onIndex==`number`?t.blocks[u.onIndex]?.id:void 0,f=d?a.querySelector(`[data-spot-id="${CSS.escape(d)}"]`):null;if(f){let e=f.getBoundingClientRect(),t=(Math.min(c.top,e.top)+Math.max(c.top+c.height,e.top+e.height))/2-s.top-a.clientHeight/2,n=a.clientHeight*.35;l=Math.max(l-n,Math.min(l+n,t))}a.scrollTo({top:Math.max(0,a.scrollTop+l),behavior:`smooth`})};return r=window.setTimeout(i,90),()=>window.clearTimeout(r)},[Y.spot,Y.spec,Sa]);let Po=(0,H.useCallback)(()=>{Y.spot&&(ua.current=!0,Y.setSpot(null))},[Y]),Fo=(0,H.useCallback)(()=>{let e=pa.current;e?e():(Ne(),Po())},[Po]),[Io,Lo]=(0,H.useState)(!1),[Ro,zo]=(0,H.useState)(!1),Bo=(0,H.useCallback)(async(...e)=>{(0,tr.flushSync)(()=>Lo(!0)),zo(!0);try{await se(R(e[0].blocks))}catch{}finally{zo(!1)}Y.restore(...e)},[Y]);(0,H.useEffect)(()=>{Lo(!1)},[Y.turn]),(0,H.useEffect)(()=>{if(!Y.spot)return;let e=e=>{e.key===`Escape`&&Fo()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[Y.spot,Fo]);let[Vo,Ko]=(0,H.useState)(null);(0,H.useEffect)(()=>Ko(null),[Y.turn]),(0,H.useEffect)(()=>ai(!1),[Y.turn]),(0,H.useEffect)(()=>ae([]),[Y.turn]),(0,H.useEffect)(()=>Br(!1),[Y.turn]);let[qo,Jo]=(0,H.useState)(null),Xo=(0,H.useRef)(!1),Qo=(0,H.useCallback)(e=>{Xo.current=!0,Jo(e)},[]);(0,H.useEffect)(()=>{if(Xo.current){Xo.current=!1;return}Jo(null)},[Y.turn]);let $o=(()=>{let e=Y.spec?.blocks.find(e=>e.type===`insight`);return e&&e.type===`insight`?e.props.conf:void 0})(),es=hc({resetKey:Y.turn,onCommit:e=>{let{intents:t,blocks:n}=bc(e,(Y.viewSpec??Y.spec)?.blocks??[]);if(!t.length)return;let r=yc([...z,...n]);ae([]),Y.run(vc(t),void 0,r.length?r:void 0,void 0,t)}});Ki.current=()=>{let e=Ui.current,t=e?.querySelector(`[data-spot-id]`);!e||!t||(t.scrollIntoView({block:`center`,behavior:`smooth`}),window.setTimeout(()=>ts(e,t),560))};let ts=(e,t)=>{let n=e.querySelector(`.ink-user-overlay`);if(!n)return;let r=(Array.from(t.querySelectorAll(`*`)).filter(e=>e.children.length===0&&e.offsetHeight>0&&/\d/.test(e.textContent??``)).sort((e,t)=>parseFloat(getComputedStyle(t).fontSize)-parseFloat(getComputedStyle(e).fontSize))[0]??t).getBoundingClientRect(),i=n.getBoundingClientRect(),a=Qd(r,i);es.onStroke(a,{stage:e,svgRect:i});let o=t.getAttribute(`data-spot-id`);o&&Y.setSpot(o)};ia.current=()=>es.clear();let ns=(0,H.useCallback)((t,n=!1)=>{let r=t.trim();if(Mr.current&&r){O(``),K.current!==null&&(window.clearTimeout(K.current),K.current=null),Nr.current=[...Nr.current,r],G.onTranscript(Nr.current.join(` `));return}if(r&&(/^diff --git /m.test(r)||/^@@ .* @@/m.test(r))){let t=Ln(Rn(r));if(t.changes.length>0){O(``),pn(t);let n=Nt(e);n&&zn(t,r,n).then(e=>pn(t=>t&&e));return}}if(!r&&k.length===0&&es.intents.length===0)return;Ee(null),je(r||null),O(``);let i=k;ne(i.length>0),M([]),F(null);let a=Y.viewSpec??Y.spec,{intents:o,blocks:s}=bc(es.intents,a?.blocks??[]),c=yc([...z,...s]);ae([]),es.clear(),Y.run(r||vc(o),i.length?i:void 0,c.length?c:void 0,void 0,o.length?o:void 0,void 0,void 0,n?{force:!0}:void 0)},[Y,k,z,es,G,e,Ee,M,F,ne]);(0,H.useEffect)(()=>{if(r.current&&ao()){let e=r.current;r.current=``,ns(e)}},[]);let[is,as]=(0,H.useState)(null),[ss,ls]=(0,H.useState)(0),[ds,fs]=(0,H.useState)(null),ps=(0,H.useRef)(null),hs=(0,H.useCallback)((e,t)=>{let n=e.lessons[t];if(!n)return;let r=Wn(e.id);as(e),ls(t),fs(r),Hn(e.id,t),Mo(!0);let i=`Lesson ${t+1}: ${n.title}`,a=Bn(e.id,n.id);if(a){je(i),Y.showFrame(a,i);return}let o=Zn(e,t,r,$n(e.topic));ps.current={courseId:e.id,lessonId:n.id,framesBefore:Y.frames.length},je(i),Y.run(`Teach this lesson: "${n.title}" — ${n.goal}`,void 0,void 0,void 0,void 0,i,void 0,{lesson:o})},[Y]);ra.current=()=>{let e=cl();if(!e)return;let t=e.lessons[0];as(e),ls(0),fs(Wn(e.id)),Hn(e.id,0),Mo(!0);let n=Bn(e.id,t.id);if(n){let e=`Lesson 1: ${t.title}`;je(e),Y.showFrame({...n,narration:``,tour:[]},e,{interrupt:!1})}},(0,H.useEffect)(()=>{let e=i.current;if(!e||(i.current=void 0,!ao()))return;let t=Gn(e.courseId);if(!t)return;let n=Math.min(Math.max(e.lessonIdx,0),t.lessons.length-1);hs(t,n)},[]),(0,H.useEffect)(()=>{let e=ps.current;!e||Y.busy||(ps.current=null,!(Y.frames.length<=e.framesBefore)&&qn(e.courseId,e.lessonId,Y.frames[Y.frames.length-1]))},[Y.frames,Y.busy]);let gs=(0,H.useCallback)(e=>{if(!is)return;let t=is.lessons[ss];t&&(Kn(is.id,t.id,e),fs(Wn(is.id)))},[is,ss]);(0,H.useEffect)(()=>{if(typeof window>`u`||!is)return;let e=()=>fs(Wn(is.id));return window.addEventListener(Jn,e),()=>window.removeEventListener(Jn,e)},[is]);let[_s,vs]=(0,H.useState)(null);(0,H.useEffect)(()=>{if(typeof window>`u`)return;let e=e=>{let t=e.detail;t?.missedCards.length&&vs(t)};return window.addEventListener(er,e),()=>window.removeEventListener(er,e)},[]);let bs=(0,H.useCallback)(e=>{let t=e.missedCards.flatMap(t=>kn([t],{deck:e.courseTitle,tags:[e.lessonTitle,`checkpoint`],source:{question:t.front,topic:e.topic,ts:e.at},origin:`auto`}));vs(null),Li(t)},[Li]),xs=(0,H.useMemo)(()=>new Set(z.map(e=>e.id)),[z]),Ss=(0,H.useCallback)((e,t)=>{je(`Correction: ${t}`),Y.run(`Correction — you understood "${e}", but it's actually "${t}". Keep the rest of your understanding and update the answer wherever this changes it.`,void 0,void 0,void 0,void 0,`Correction: ${t}`)},[Y]),Cs=(0,H.useCallback)(e=>{let t=e.map(ce),n=e.length===2?`Fuse these two: what is the real relationship between "${t[0]}" and "${t[1]}"? Lead with the single most useful connection, and be explicit about correlation versus cause.`:`Fuse these ${e.length}: what are the most important connections and patterns across ${t.map(e=>`"${e}"`).join(`, `)}? Lead with the strongest insight, then note any correlations, trade-offs, or cause-and-effect you can support from the data.`;je(`Fuse: ${t.join(` × `)}`),ae([]),Y.run(n,void 0,e,void 0,void 0,`Fuse: ${t.join(` × `)}`)},[Y]),Os=(0,H.useCallback)(e=>{e.id&&(ae(t=>t.some(t=>t.id===e.id)?t.filter(t=>t.id!==e.id):[...t,e]),si(e=>e+1),he())},[he]),ks=z.length>1?[`How do these relate?`,`Compare them`,`Summarize these`]:[`Explain this`,`Why it matters`,`Go deeper`],As=At(e.provider).capabilities.vision;(0,H.useEffect)(()=>{let e=e=>{if(gd(e.target))return;let t=e.clipboardData;if(!t)return;let n=[...t.files].filter(e=>e.type.startsWith(`image/`));if(n.length){e.preventDefault(),re(n),O(hd),si(e=>e+1);return}let r=t.getData(`text/plain`);r&&pd(r)&&(e.preventDefault(),O(md(fd(r))),si(e=>e+1))},t=null,n=e=>{e.dataTransfer?.types.some(e=>e===`Files`||e===`text/uri-list`)&&(e.preventDefault(),di(!0),t&&clearTimeout(t),t=setTimeout(()=>di(!1),200))},r=e=>{di(!1);let t=e.dataTransfer;if(!t)return;if(gd(e.target)){t.files.length&&e.preventDefault();return}let n=[...t.files],r=n.filter(e=>e.type.startsWith(`image/`)),i=n.filter(e=>!e.type.startsWith(`image/`)),a=n.length?null:fd(t.getData(`text/uri-list`)||t.getData(`text/plain`)||``);!n.length&&!a||(e.preventDefault(),r.length?(re(r),O(hd)):i.length?re(i):a&&O(md(a)),si(e=>e+1))};return window.addEventListener(`paste`,e),window.addEventListener(`dragover`,n),window.addEventListener(`drop`,r),()=>{window.removeEventListener(`paste`,e),window.removeEventListener(`dragover`,n),window.removeEventListener(`drop`,r),t&&clearTimeout(t)}},[re]);let js=(0,H.useRef)(mo);js.current=mo,(0,H.useEffect)(()=>{if(!yn)return;let e=js.current;ho(`focus`),document.documentElement.requestFullscreen?.().catch(()=>{});let t=e=>{e.key===`Escape`&&xn(!1)};return window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`keydown`,t),ho(e),document.fullscreenElement&&document.exitFullscreen().catch(()=>{})}},[yn,ho]);let Ps=(0,H.useRef)(0);(0,H.useEffect)(()=>{let e=Y.frames.length;if(e>Ps.current&&Sn.current){let t=e-1;rr(e=>new Set(e).add(t))}Ps.current=e},[Y.frames.length]);let X=Ri({mode:`vad`,onBargeIn:()=>{Fo(),$a.current=!0},onResult:e=>{let t=e.transcript.trim(),n=$a.current;if(e.lowConfidence&&t){$a.current=!1,Ee(null),O(t),Ie(mf),si(e=>e+1),Fr.current&&Mr.current&&(Fr.current=!1,xi.current?.stop(),Nr.current.length>0?Lr():(Mr.current=!1,jr(!1)));return}if($a.current){$a.current=!1;let e=Qa.current;if(!t||lp(t)){e&&Ti(e);return}}if(t){if(Ee(t),Mr.current){Nr.current=[...Nr.current,t],Ee(null);let e=Nr.current.join(` `);G.onTranscript(e),Fr.current&&(Fr.current=!1,Lr());return}if(Tr.current){if(Ee(null),sd(t)){wr(!1);let e=Er.current;if(Er.current=[],Or(0),e.length){let t=Math.round((Date.now()-kr.current)/6e4);je(`Your thinking, sorted`),Y.run(ud(e,t),void 0,void 0,void 0,void 0,`Your thinking, sorted`)}}else ld(t)&&(Er.current=[...Er.current,t],Or(e=>e+1));return}if(ar({phase:Ni.current,activeKey:Pi.current,blanks:Fi.current,fill:Y.fill},t)){Ee(null);return}ns(t,n||no.current)}},onStateChange:e=>{if(Ir.current=e.phase,Ce(e.phase),ye(e.phase===`listening`),e.phase===`idle`&&($a.current=!1),e.phase===`listening`)Ie(null),e.transcript&&Fa(e.transcript),K.current!==null&&(window.clearTimeout(K.current),K.current=null);else if(e.phase===`idle`&&Mr.current&&Pr.current.phase===`listening`){if(Fr.current){Fr.current=!1,Lr();return}K.current!==null&&window.clearTimeout(K.current),K.current=window.setTimeout(()=>{K.current=null,xi.current?.stop(),Lr()},hf)}e.error===`not-allowed`?Ie(ef):e.error===`unsupported`?Ie($d):e.error===`audio`?Ie(tf):e.error===`transcription`&&Ie(nf)}}),Z=X.capabilities.stt;xi.current=X;let Is=(0,H.useCallback)(()=>{if(Mr.current){if(K.current!==null&&(window.clearTimeout(K.current),K.current=null),B||Ir.current===`transcribing`){Fr.current=!0,B&&X.start({inCanvas:!!Y.spec,continuous:!1}),X.forceStop();return}if(X.stop(),Nr.current.length===0){Mr.current=!1,jr(!1);return}Lr()}},[B,Lr,X,Y.spec]),Ls=(0,H.useCallback)(()=>{B&&X.stop(),K.current!==null&&(window.clearTimeout(K.current),K.current=null),Ee(null),Fr.current=!1,jr(!1)},[B,X]),Rs=yn||Zd({paletteOpen:$r,shareOpen:Re,exportOpen:Ve,dashOpen:qe,showSettings:q,proofOpen:ri,showHow:ko,replayAt:Vo,recapOpen:Lt,atlasOpen:Gt,delegateOpen:Ht,srsOpen:jt,zoomLevel:ir,mindViewOpen:mn.open});(0,H.useEffect)(()=>{if(!W||G.phase===`idle`||Rs)return;let e=e=>{e.key===`Escape`&&Ls()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[W,G.phase,Rs,Ls]),(0,H.useEffect)(()=>{let e=document.documentElement;return Rr?e.dataset.whisper=``:delete e.dataset.whisper,Pe(Rr?ln:1),()=>{delete e.dataset.whisper,Pe(1)}},[Rr]),(0,H.useEffect)(()=>{Sr?kr.current=Date.now():(Er.current=[],Or(0))},[Sr]),(0,H.useEffect)(()=>{if(W&&B&&we){let e=au(we),t=Nr.current.length>0?[...Nr.current,e].join(` `).trim():e;t&&G.onTranscript(t)}},[we,B,W]),(0,H.useEffect)(()=>{W||(Nr.current=[],G.reset(),K.current!==null&&(window.clearTimeout(K.current),K.current=null))},[W]),(0,H.useEffect)(()=>()=>{K.current!==null&&window.clearTimeout(K.current)},[]),(0,H.useEffect)(()=>{let e=()=>X.setMaveaSpeaking(xe()&&!Si.current);return e(),De(e)},[X]);let zs=b.trim().length>0;(0,H.useEffect)(()=>{if(!or({alwaysOn:J&&!pi,sttOk:Z,composerHasText:zs}))return;let e=!1,t=setTimeout(()=>{e||X.start({inCanvas:!!Y.spec,continuous:!0})},100);return()=>{e=!0,clearTimeout(t),X.stop()}},[J,pi,Z,X,zs]),sr({alwaysOn:J&&!pi,sttOk:Z,composerHasText:zs,listening:B},{start:()=>X.start({inCanvas:!!Y.spec,continuous:!0}),stop:X.stop});let Bs=(0,H.useCallback)(()=>{if(!Z){Ie($d),si(e=>e+1);return}J?B?X.forceStop():pi?(mi(!1),Fo(),X.start({inCanvas:!!Y.spec,continuous:!0})):Ir.current===`transcribing`?(mi(!0),X.forceStop()):(mi(!0),X.stop()):B?X.forceStop():(Fo(),X.start({inCanvas:!!Y.spec}))},[Z,J,pi,B,X,Y.spec,Fo]),[Vs,Hs]=(0,H.useState)(!1),Us=(0,H.useRef)(null);(0,H.useEffect)(()=>{let e=()=>{Us.current!==null&&(window.clearTimeout(Us.current),Us.current=null)};if(Y.status===`thinking`){Hs(!0),e();return}if(Y.status===`idle`){Hs(!1),e();return}if(Vs&&Y.spec){Hs(!1),e();return}Vs&&Us.current===null&&(Us.current=window.setTimeout(()=>{Hs(!1),Us.current=null},1100))},[Y.status,Y.spec,Vs]),(0,H.useEffect)(()=>()=>{Us.current!==null&&window.clearTimeout(Us.current)},[]);let Ws=ya({speak:Ti,cancelSpeak:Ne,isSpeaking:xe,muted:V,turnCount:Y.frames.length,gates:{atRest:Y.status===`showing`||Y.status===`idle`,busy:Y.busy,listening:B,introHold:Vs,hasCanvas:!!Y.spec,modalOpen:$r||Re||Ve||qe||q||ri||ko||Vo!==null||Lt||Ht||jt||Gt||en!==null||sn!==null||mn.open||ir!==null}}),Gs=Ws.interjecting,Ks=(0,H.useRef)(null),qs=(0,H.useMemo)(()=>{let e=oa(Y.spec);return e===`warm`&&sa(Y.spec)&&(Ks.current===null||Ks.current===Y.spec)&&(Ks.current=Y.spec,e=`celebrate`),ea(Y.status,B,Gs,e,V)},[Y.status,B,Gs,Y.spec,V]),Ys=(0,H.useMemo)(()=>Yo({status:Y.status,listening:B,interjecting:Gs,spec:Y.viewSpec??Y.spec}),[Y.status,B,Gs,Y.viewSpec,Y.spec]);(0,H.useEffect)(()=>(Wo(document,Ys),()=>Go(document)),[Ys]);let Xs=(0,H.useCallback)(()=>{let e=aa.current,t=ca.current,n=la.current;if(!e||!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();!r.width||!i.width||(e.style.setProperty(`--home-x`,`${Math.round(r.left+r.width/2-(i.left+i.width/2))}px`),e.style.setProperty(`--home-y`,`${Math.round(r.top+r.height/2-(i.top+i.height/2))}px`),e.style.setProperty(`--home-scale`,(Math.max(r.width,12)*1.3/150).toFixed(3)))},[]);(0,H.useLayoutEffect)(()=>(Xs(),window.addEventListener(`resize`,Xs),()=>window.removeEventListener(`resize`,Xs)),[Xs]),(0,H.useLayoutEffect)(()=>{Xs()},[Vr,Xs]);let Zs=!!Y.spec&&!(Vs||Gs),Qs=jo,$s=jo&&(!Y.spec||Vs||Gs),ec=!Y.spec&&!jo;(0,H.useEffect)(()=>{if(!e.morningBrief||Ot||ec||Y.busy||Y.restored||!Nc(ut()))return;Pc(),kt(!0);let t=Y.frames.slice(-3).map(e=>e.question).filter(Boolean);Y.run(Fc(t),void 0,void 0,void 0,void 0,`Morning brief`)},[e.morningBrief,ec,Ot,Y.busy,Y.restored]),(0,H.useEffect)(()=>{Zs&&aa.current&&(aa.current.style.setProperty(`--scroll-dock`,`0`),Xs())},[Zs,Xs]);let tc=Gs?Ws.line:Y.narration,nc=!Zs&&!!tc&&(Gs||Y.status===`speaking`||Y.status===`showing`),rc=$s&&Y.status===`speaking`,ic=(0,H.useRef)(new Map),[ac,oc]=(0,H.useState)(0);(0,H.useEffect)(()=>{let e=ic.current,t=new Set(Y.frames.map(e=>e.at)),n=!1;for(let r of[...e.keys()])t.has(r)||(e.delete(r),n=!0);let r=Y.frames.filter(t=>!e.has(t.at)),i=!1;return(async()=>{for(let t of r){let r=await Ut(`${t.question} ${t.narration} ${t.spec?.title??``}`.trim());if(i)return;r&&(e.set(t.at,r),n=!0)}n&&oc(e=>e+1)})(),()=>{i=!0}},[Y.frames]);let sc=(0,H.useMemo)(()=>pt(Y.frames,Y.frames.map(e=>ic.current.get(e.at)??null)),[Y.frames,ac]),cc=Y.frames.length-1,lc=Y.viewIndex??cc,uc=Y.viewOverride!=null,dc=!uc&&(Y.viewIndex==null||Y.viewIndex===cc),fc=Y.viewOverride?sc.find(e=>Y.viewOverride?.id===`thread-`+e.id):void 0,pc=sc.find(e=>e.moments.some(e=>e.frameIndex===lc)),mc=sc.length>=2?pc?.color:void 0,gc=Y.frames[cc],_c=sc[sc.length-1],xc=sc.length>=2&&_c?.moments.length===1&&_c.moments[0].frameIndex===cc,Sc=dc&&!Y.busy&&xc&&gc?.mode===`replace`&&!!gc&&ic.current.has(gc.at),[Cc,Ec]=(0,H.useState)(null),Dc=(0,H.useRef)(-1);(0,H.useEffect)(()=>{Sc&&Dc.current!==cc&&(Dc.current=cc,Ec(cc))},[Sc,cc]);let Oc=(0,H.useCallback)(e=>{let t=Ca(e.moments.map(e=>Y.frames[e.frameIndex]).filter(e=>!!e),{title:e.title,tint:e.color,id:`thread-`+e.id});t&&(Y.previewSpec(t),Hi.current?.scrollTo({top:0}))},[Y]),kc=dc&&z.length===0?(Y.viewSpec??Y.spec)?.suggests??[]:[],Ac=Y.viewSpec??Y.spec,jc=uc?Ac?{question:null,narration:Ac.title||`This thread`}:null:Ts({spec:Ac,frames:Y.frames,viewIndex:Y.viewIndex,narration:Y.narration,lastAsk:Oe}),Mc=(0,H.useMemo)(()=>os(Ac),[Ac]),Ic=Ds(Es(Y.status)),Lc=(0,H.useMemo)(()=>Y.busy?Y.status===`showing`?[Xd(Y.pendingShape)]:Yd(Oe??``,Y.history):[],[Y.busy,Y.status,Y.pendingShape,Oe,Y.history]),Rc=Nd(),Bc=Hd(),Vc=(0,H.useSyncExternalStore)(xl,Sl,Sl),[Hc,Uc]=(0,H.useState)(null);(0,H.useEffect)(()=>Uc(null),[Y.turn]),(0,H.useEffect)(()=>ha(!1),[Y.turn]);let Gc=Rc&&!V,[Kc,qc]=(0,H.useState)(!1);(0,H.useEffect)(()=>{if(Gc){qc(!0);return}let e=window.setTimeout(()=>qc(!1),600);return()=>window.clearTimeout(e)},[Gc]),(0,H.useEffect)(()=>{V&&pa.current?.()},[V]);let[Jc,Yc]=(0,H.useState)(!1);(0,H.useEffect)(()=>Yc(!1),[Y.turn]),(0,H.useEffect)(()=>Vt(!1),[Y.turn]);let Xc=(0,H.useMemo)(()=>wd(Y.frames,sc),[Y.frames,sc]),Zc=_n(),Qc=vn(),$c=(0,H.useCallback)(e=>{if(a.current){To.current.playExtra(e);return}Y.busy||T(e)},[Y.busy]),el=(0,H.useCallback)(e=>{if(!Z){Ie($d);return}Fo(),hi.current===null&&(hi.current={enabled:J,paused:pi}),mi(!1),fi(!0),e===`think`?(wr(!1),Tr.current=!1,jr(!0),Mr.current=!0):(jr(!1),Mr.current=!1,wr(!0),Tr.current=!0)},[Z,J,pi,Fo]);(0,H.useEffect)(()=>{if(W||Sr)return;let e=hi.current;e!==null&&(hi.current=null,mi(e.paused),fi(e.enabled),e.enabled&&!e.paused&&Z&&!b.trim()?X.start({inCanvas:!!Y.spec,continuous:!0}):X.stop())},[W,Sr,Z,b,X,Y.spec]);let Q={atlas:{available:qt>0,reason:`Fills in as you discuss things`,run:()=>Kt(!0),preload:Af.preload},"pdf-world":{available:k.some(vt),reason:`Attach a PDF, Office doc, or data file (CSV, text, JSON) to split it into a map`,run:()=>{let e=k.filter(vt);if(e.length>0){dn(e);return}si(e=>e+1),li(e=>e+1),F(`Attach a PDF, Office doc, or data file (CSV, text, JSON) to split it into a map of claims.`)},preload:Yf.preload},synthesis:{available:!0,run:()=>{let e=k.filter(vt);e.length>=2?cn(e):window.location.hash=`#/synthesis`},preload:()=>k.filter(vt).length>=2?Zf.preload():cp(`#/synthesis`)},ripple:{available:!0,run:()=>pn(In),preload:Mf.preload},review:{available:!0,run:()=>It(!0),preload:rp.preload},flashcards:{available:!0,run:()=>{window.location.hash=`#/flashcards`},preload:()=>cp(`#/flashcards`)},courses:{available:!0,run:()=>{window.location.hash=`#/courses`},preload:()=>cp(`#/courses`)},dashboards:{available:!0,run:()=>{window.location.hash=`#/dashboards`},preload:()=>cp(`#/dashboards`)},gallery:{available:!0,run:()=>{window.location.hash=`#/gallery`},preload:()=>cp(`#/gallery`)},recap:{available:!!Xc,reason:`Once we've covered something`,run:()=>Vt(!0),preload:Lf.preload},present:{available:!!Y.spec,reason:`Once there is an answer`,run:()=>xn(!0),preload:$f.preload},track:{available:!!Y.spec,reason:`Once there is a conversation to track`,run:()=>Ye(!0),preload:Kf.preload},share:{available:Y.frames.length>0,reason:`Once there is something to share`,run:()=>ze(!0),preload:Hf.preload},export:{available:Y.frames.length>0,reason:`Once there is an answer to export`,run:()=>Ge(!0),preload:Wf.preload},focus:{available:!!Y.spec,reason:`Once there is an answer`,run:()=>ho(`focus`)},board:{available:!!Y.spec,reason:`Once there is an answer`,run:()=>ho(`canvas`)},ink:{available:!!Y.spec,reason:`Once there is an answer to mark`,run:()=>pe(!0)},blanks:{available:!0,run:()=>Ie(`When a number in an answer is truly yours to give, Mavéa leaves a glowing hole for it — type, say, or drop a card in, and it finishes the answer around your value.`)},"watch-me-think":{available:Z,reason:Z?void 0:$d,run:()=>el(`think`)},"just-listen":{available:Z,reason:Z?void 0:$d,run:()=>el(`listen`)},whisper:{available:!0,run:()=>{Xr(`you`),Qr(!0),Jr(!0)},preload:Cf.preload},ghost:{available:Z&&e.quality!==`fast`,reason:Z?e.quality===`fast`?`Needs Balanced quality or higher — you're on Fast`:void 0:$d,run:()=>el(`listen`)},delegate:{available:!0,run:()=>Wt(!0),preload:tp.preload},memory:{available:!0,run:()=>{Xr(`you`),Jr(!0)},preload:Cf.preload},library:{available:No.length>0,reason:`Fills in as you save conversations`,run:()=>Wr(!0),preload:zf.preload},deepzoom:{available:!0,run:()=>{let e=Oe??``;window.location.hash=e?`#/deepzoom?seed=${encodeURIComponent(e)}`:`#/deepzoom`},preload:()=>cp(`#/deepzoom`)},"zoom-deck":{available:!!Xc,reason:`Opens once there are a few answers to pull back from`,run:()=>cr(`chapters`),preload:Of.preload},"morning-brief":{available:!0,run:()=>{Xr(`you`),Qr(!0),Jr(!0)},preload:Cf.preload},settings:{available:!0,run:()=>{Xr(void 0),Jr(!0)},preload:Cf.preload},how:{available:!0,run:()=>Ao(!0),preload:vf.preload}};So.current=Q;let nl=nt.filter(e=>e.surface!==`demo`).map(e=>{let t=Q[e.id]??{available:!0,run:()=>void 0},n=e.id===`how`?Mi:e.tourChapter?()=>$c(e.tourChapter):void 0;return{feature:e,available:t.available,reason:t.reason,run:t.run,preload:t.preload,watch:n}}),rl=[{label:`New`,blurb:`Start a fresh session`,onClick:()=>{Y.reset(),Ws.reset(),Mo(!1),ne(!1),lt()},show:!!Y.spec},{label:`Dashboard`,blurb:`Open your living dashboards`,onClick:Q.dashboards.run,preload:Q.dashboards.preload,show:!!Y.spec}],al=[{label:`Rehearse`,blurb:`Practice a hard conversation — take the seat, or send your Mavéa`,onClick:Q.delegate.run,preload:Q.delegate.preload,show:!0},{label:`Study`,blurb:Zc>0?`${Zc} card${Zc===1?``:`s`} ready`:Qc===`spaced`?`Go through what you have saved`:`Flip through your cards`,onClick:Q.review.run,preload:Q.review.preload,show:!0},{label:`Manage flashcards`,blurb:`See, organize, and edit your study deck`,onClick:Q.flashcards.run,preload:Q.flashcards.preload,show:!0},{label:`Courses`,blurb:`Turn a topic into a structured syllabus — a lesson at a time, at your pace`,onClick:Q.courses.run,preload:Q.courses.preload,show:!0},{label:`Recap`,blurb:`What we covered — the session so far`,onClick:Q.recap.run,preload:Q.recap.preload,show:!!Xc}],ol=[{label:`Present`,blurb:`Fill the room — the chrome falls away, the mic stays live`,onClick:Q.present.run,preload:Q.present.preload,show:!!Y.spec},{label:`Export`,blurb:`Choose a template and export a polished PDF`,onClick:Q.export.run,preload:Q.export.preload,show:Y.frames.length>0},{label:`Video`,blurb:`Share a moment, a topic, or the whole conversation`,onClick:Q.share.run,preload:Q.share.preload,show:Y.frames.length>0}],sl=[{label:`Search all features`,blurb:`Browse Mavéa’s feature index · ${v}`,onClick:ei,preload:bf.preload,show:!0},{label:`Atlas`,blurb:`Kept conversations and topics, as a place`,onClick:Q.atlas.run,preload:Q.atlas.preload,show:qt>0},{label:`Watch me think`,blurb:`A live map of your thinking`,onClick:Q[`watch-me-think`].run,show:Q[`watch-me-think`].available},{label:`Prism`,blurb:Q[`pdf-world`].available?`Split your document into a map of its claims`:`Attach a PDF, Office doc, or data file — then split it into claims`,onClick:Q[`pdf-world`].run,preload:Q[`pdf-world`].preload,show:!0},{label:`Ripple`,blurb:`Model a code change’s impact, risks, and a proposed ship order`,onClick:Q.ripple.run,preload:Q.ripple.preload,show:!0},{label:`Dashboards`,blurb:$t>0?`${$t} dashboard${$t===1?``:`s`} set to refresh while Mavéa is open`:`Create a dashboard that refreshes on schedule while Mavéa is open`,onClick:Q.dashboards.run,preload:Q.dashboards.preload,show:!0},{label:`Deep Zoom`,blurb:Oe?`Zoom from field to mechanism — "${Oe.slice(0,50)}${Oe.length>50?`…`:``}"`:`Telescope any topic from big picture to finest detail`,onClick:()=>{let e=Oe??``;window.location.hash=e?`#/deepzoom?seed=${encodeURIComponent(e)}`:`#/deepzoom`},show:!0}],ll=(0,H.useCallback)(e=>{e===`out`&&Xc&&cr(`chapters`)},[Xc]);Mn(Hi,ll),(0,H.useEffect)(()=>(Me(Ol),()=>Me(null)),[]);let ul=(0,H.useRef)(!0);(0,H.useEffect)(()=>{Y.busy&&(wl(),ul.current=!1,dr(null),_r())},[Y.busy,Y.turn,_r]),(0,H.useEffect)(()=>(El(Vo!==null),()=>El(!1)),[Vo]),(0,H.useEffect)(()=>_r(),[Y.viewIndex,_r]);let dl=Y.spec?.blocks.length??0;(0,H.useEffect)(()=>{dl>0&&Dl(dl)},[dl]),(0,H.useEffect)(()=>{if(Y.busy)return;if(Y.spec){let e=kl();if(e){dr(e);let t=Y.frames.length-1,n=Y.frames[t];n&&vr.set(He(n),e)}}if(Rc||ul.current)return;let e=window.setTimeout(()=>{ul.current=!0,Tl()},gf);return()=>window.clearTimeout(e)},[Rc,Y.busy,Y.spec,Vc,Y.frames,vr]);let fl=(0,H.useMemo)(()=>dc?lr:Y.viewIndex!=null&&Y.frames[Y.viewIndex]?vr.get(He(Y.frames[Y.viewIndex])):null,[dc,lr,Y.viewIndex,Y.frames,vr]),pl=(0,H.useMemo)(()=>{if(!mr||fr===null||!fl)return null;let e=dc?Y.spec:Y.viewSpec;if(!e)return null;let t=dc?Y.tour:Y.viewIndex==null?[]:Y.frames[Y.viewIndex]?.tour??[],n=Nl(fl,fr,t,e.blocks.length);return{...e,blocks:e.blocks.slice(0,n)}},[mr,fr,fl,dc,Y.spec,Y.viewSpec,Y.tour,Y.viewIndex,Y.frames]),ml=Y.error?(0,U.jsxs)(`div`,{className:`live-error`,role:`alert`,children:[(0,U.jsxs)(`div`,{className:`live-error-head`,children:[(0,U.jsx)(L.alert,{}),(0,U.jsx)(`span`,{children:`Couldn’t answer`})]}),(0,U.jsx)(`p`,{className:`live-error-msg`,children:Y.error.message}),(0,U.jsxs)(`div`,{className:`live-error-actions`,children:[(0,U.jsx)(`button`,{type:`button`,className:`live-error-btn primary`,onClick:()=>{let e=Y.error;e&&Y.run(e.retry,e.attachments,e.selectedBlocks,void 0,e.inkIntents,e.question)},disabled:Y.busy,children:`Retry`}),(0,U.jsx)(`button`,{type:`button`,className:`live-error-btn`,onClick:()=>Jr(!0),children:`Open settings`})]})]}):null,hl=W,[gl,_l]=(0,H.useState)(160);(0,H.useEffect)(()=>{if(!hl)return;let e=document.querySelector(`.live-dock`);if(!e)return;let t=()=>_l(Math.round(e.getBoundingClientRect().height)+8);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[hl]);let vl=hl?(0,U.jsxs)(`div`,{className:`ms-stage-fill`,"data-phase":G.phase,style:{"--ms-bottom-reserve":`${gl}px`},children:[(0,U.jsxs)(`button`,{type:`button`,className:`ms-exit`,onClick:Ls,title:`Back to the conversation (Esc)`,children:[(0,U.jsx)(L.chevL,{}),`Back to conversation`]}),(0,U.jsx)(nd,{mindShape:G,onSettled:()=>{Ti(`I think this is the shape of it.`)},onConfirmUnsaid:()=>G.confirmUnsaid(),onDismissUnsaid:()=>G.dismissUnsaid(),onAction:(e,t)=>{if(e===`add-more`)Ee(null),G.resume(),!B&&Z&&X.start({inCanvas:!!Y.spec,continuous:J&&!pi});else if(e===`not-quite`)Nr.current=[],G.resume(!1),Ee(null),!B&&Z&&X.start({inCanvas:!!Y.spec,continuous:J&&!pi});else if(e===`share`)ze(!0);else if(e===`present`)xn(!0);else if(e===`answer`||e===`plan`||e===`commit-plan`||e===`tell-apart`){let n=G.spec,r=e===`commit-plan`||e===`plan`?`plan`:`answer`,i=n?od(n,r):we??``;e===`tell-apart`&&t?.tension&&(i=`I keep coming back to “${t.tension.a}” but I also said “${t.tension.b}.” Help me tell these two reasons apart — are they the same thing or not?\n\n`+i);let a=Y.restored;if(B&&!J&&X.stop(),Ee(null),G.reset(),jr(!1),i){let t=e===`tell-apart`?`Telling them apart`:n?.center||(r===`plan`?`A plan`:`An answer`);je(t),Y.run(i,void 0,void 0,void 0,void 0,t,n??void 0,a?{freshStart:!0}:void 0)}}},liveTranscript:we||void 0,thoughtCount:yu([Nr.current.join(` `),we??``].join(` `))})]}):null,yl=W?G.phase===`settled`||G.phase===`pausing`?`Add thought`:`Done thinking`:`Watch me think`;return(0,U.jsxs)(`div`,{className:`mavea-app with-rail live-voice canvas-flat`+(Zs?` face-homed`:``)+(ec?` in-wizard`:``)+(yn?` presenting`:``)+(Vr?` rail-collapsed`:``)+(hl?` watch-thinking`:``),"data-title":Y.spec?.title??``,...yn?{"data-preso":Cn}:{},ref:aa,children:[a.current&&(0,U.jsx)(ti,{driver:Co}),a.current&&Co.done&&(0,U.jsx)(ii,{onStart:ji,onReplay:Mi,onPlayExtra:Co.playExtra,hasStoredSession:Oi}),l.current&&(()=>{let e=N(l.current);return e?(0,U.jsx)(Ci,{driver:wo,member:e,onExit:ji}):null})(),yn&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`preso-style-picker`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||Yn(!1)},children:[(0,U.jsxs)(`button`,{type:`button`,className:`preso-style-btn`+(Un?` is-open`:``),onClick:()=>Yn(e=>!e),"aria-expanded":Un,"aria-haspopup":`listbox`,children:[(0,U.jsx)(`span`,{className:`preso-swatch-sm`,style:{background:_d.find(e=>e.id===Cn)?.accent??`var(--presence)`}}),`Style`]}),Un&&(0,U.jsx)(`div`,{className:`preso-menu`,role:`listbox`,"aria-label":`Presentation style`,children:_d.map(e=>(0,U.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":Cn===e.id,className:`preso-row`+(Cn===e.id?` is-active`:``),onClick:()=>{Vn(e.id),xd(e.id),Yn(!1)},children:[(0,U.jsx)(`span`,{className:`preso-swatch`,style:{background:e.accent}}),(0,U.jsx)(`span`,{className:`preso-name`,children:e.label}),(0,U.jsx)(`span`,{className:`preso-desc`,children:e.description})]},e.id))})]}),(0,U.jsx)(`button`,{type:`button`,className:`present-exit`,onClick:()=>xn(!1),title:`End the presentation (Esc)`,children:`End show · Esc`}),(0,U.jsx)($,{children:(0,U.jsx)(ep,{spec:Y.viewSpec??Y.spec,question:jc?.question??null,narration:jc?.narration??Y.narration,skinId:Cn,autoAdvanceMs:a.current||l.current?2600:void 0,onExit:()=>xn(!1)})})]}),(0,U.jsx)(`div`,{className:`presence-layer`+(Zs?` corner`:$s?``:` idlehome`)+(nc?` has-caption`:``)+(Gr?` is-mem-save`:``),ref:la,children:(0,U.jsxs)(`div`,{className:`presence-positioner`,children:[jo&&(0,U.jsx)(`div`,{className:`presence-seed`,"aria-hidden":`true`},Y.turn),(0,U.jsx)(fe,{state:qs.state,emotion:qs.emotion,gaze:qs.gaze,muted:V})]})}),(0,U.jsx)(`div`,{className:`presence-scrim`+(rc?` show`:``)}),nc&&(0,U.jsx)(`div`,{className:`center-caption`,role:`status`,"aria-live":`polite`,children:tc}),(0,U.jsx)(jd,{activity:Y.activity,sources:Y.busy?Y.liveSources:[]}),(0,U.jsxs)(`div`,{className:`topbar`,children:[(0,U.jsxs)(`button`,{className:`brand brand-link`,type:`button`,onClick:sp,title:`Back to the demo`,"aria-label":`Back to the demo`,children:[(0,U.jsx)(`span`,{className:`brand-dot jelly-mark`,ref:ca}),(0,U.jsx)(`span`,{className:`brand-name`,children:`Mavéa`}),Y.spec&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`brand-sep`}),(0,U.jsx)(`span`,{className:`workspace-name`,children:Y.error?`Couldn’t answer`:Y.spec.title})]})]}),(0,U.jsxs)(`span`,{className:`live-badge`,title:`Live · ${t.label}`,"aria-label":`Live mode`,children:[(0,U.jsx)(`span`,{className:`live-dot`}),`Live`]}),(0,U.jsx)(`div`,{className:`topbar-spacer`}),(0,U.jsx)(Jt,{label:`Create`,items:rl}),(0,U.jsx)(Jt,{label:`Practice`,items:al,badge:Zc}),(0,U.jsx)(Jt,{label:`Share`,items:ol}),(0,U.jsx)(Jt,{label:`Explore`,items:sl}),(0,U.jsx)(A,{onOpen:ei,preload:bf.preload}),(0,U.jsx)(`span`,{className:`topbar-divider`,"aria-hidden":`true`}),(0,U.jsx)(bn,{})]}),(0,U.jsx)(ws,{chapters:sc,frames:Y.frames,currentIndex:lc,onJump:Y.jumpTo,onReplay:Y.frames.length>0?()=>Ko(Y.frames.length-1):void 0,onOverview:Y.frames.length>0?()=>Yc(!0):void 0,resumed:Y.restored,chatOpen:zr,onToggleChat:()=>Br(e=>!e),collapsed:Vr,onToggleCollapse:()=>Hr(e=>!e),onOpenPast:No.length>0?()=>Wr(!0):void 0,onStudy:()=>It(!0),roomIndices:nr,bookmarks:Wa,onToggleBookmark:Ga,onViewMindMap:e=>{let t=Y.frames[e];t?.mind&&gn({open:!0,spec:t.mind})},onSeeTogether:Oc}),(0,U.jsxs)(ys,{holdEnabled:Z&&vi===`hold`,showHint:!1,pttKey:e.pttKey,pttSide:e.pttSide,onHoldStart:()=>{Fo(),X.start({inCanvas:!!Y.spec})},onHoldEnd:()=>X.forceStop(),onChangePttKey:e=>Ft({pttKey:e}),onChangePttSide:e=>Ft({pttSide:e}),children:[(Rr||J&&Z)&&(0,U.jsxs)(`div`,{className:`dock-modes`,role:`group`,"aria-label":`Listening modes`,children:[Rr&&(0,U.jsx)(`span`,{className:`whisper-badge`,children:`won't wake anyone`}),J&&Z&&(0,U.jsx)(`button`,{type:`button`,className:`listen-mode-chip`+(Sr?` on`:``),"aria-pressed":Sr,onClick:()=>{wr(e=>!e),W&&(Mr.current=!1,jr(!1))},title:Ar,"aria-label":Ar,children:Sr?`Just listening · ${Dr} banked`:`Just listen`}),Sr&&Dr>0&&(0,U.jsx)(`button`,{type:`button`,className:`listen-mode-chip`,onClick:()=>{wr(!1);let e=Er.current;if(Er.current=[],Or(0),e.length){let t=Math.round((Date.now()-kr.current)/6e4);je(`Your thinking, sorted`),Y.run(ud(e,t),void 0,void 0,void 0,void 0,`Your thinking, sorted`)}},children:`Thoughts?`})]}),Z&&(0,U.jsx)(Be,{kind:`voice-data`,from:`live`}),Fe&&(0,U.jsxs)(`div`,{className:`voice-notice`,role:`status`,children:[Fe===mf?(0,U.jsx)(L.spark,{}):(0,U.jsx)(L.micOff,{}),(0,U.jsx)(`span`,{children:Fe}),(0,U.jsx)(`button`,{type:`button`,className:`voice-notice-x`,"aria-label":`Dismiss voice notice`,onClick:()=>Ie(null),children:(0,U.jsx)(L.x,{})})]}),(k.length>0||P)&&(0,U.jsxs)(`div`,{className:`attach-strip`,role:`list`,"aria-label":`Attached files`,children:[k.map((e,t)=>(0,U.jsxs)(`span`,{className:`attach-chip`,role:`listitem`,children:[_t(e)?(0,U.jsx)(`img`,{className:`attach-thumb`,src:`data:${e.mime};base64,${e.data}`,alt:``}):(0,U.jsx)(L.paperclip,{}),(0,U.jsx)(`span`,{className:`attach-name`,children:yt(e)}),(mt(e)&&As||ht(e)||xt(e))&&(0,U.jsx)(`button`,{type:`button`,className:`attach-explode`,"aria-label":`Explode ${e.name} into a map of its claims`,title:`Explode into a map of grounded claims`,onClick:()=>tn([e]),children:`⊹ Explode`}),(0,U.jsx)(`button`,{type:`button`,className:`attach-remove`,"aria-label":`Remove ${e.name}`,onClick:()=>ie(t),children:(0,U.jsx)(L.x,{})})]},t)),(()=>{let e=k.filter(e=>ht(e)||xt(e)||mt(e)&&As);if(e.length<=1)return null;let t=(0,U.jsxs)(`button`,{type:`button`,className:`attach-explode attach-compare`,"aria-label":`Compare ${e.length} documents — map their claims and find where they agree and contradict`,title:`Explode all documents together and compare them`,onClick:()=>tn(e),children:[`⊹ Compare `,e.length,` documents`]},`compare`),n=(0,U.jsxs)(`button`,{type:`button`,className:`attach-explode attach-compare`,"aria-label":`Synthesize ${e.length} sources — fuse them into one map of themes, contradictions, and gaps`,title:`Fuse all sources into one navigable Synthesis World`,onClick:()=>cn(e),children:[`⊹ Synthesize `,e.length,` sources`]},`synth`);return e.length>=4?n:e.length>=3?(0,U.jsxs)(U.Fragment,{children:[t,n]}):t})(),P&&(0,U.jsx)(`span`,{className:`attach-error`,role:`status`,children:P})]}),k.length>0&&(0,U.jsx)(Be,{kind:`upload`,from:`live`}),Y.spec&&(0,U.jsx)(wc,{armed:ue,pins:es.pins,miss:es.miss,onUndo:es.undo,onSend:es.send}),z.length>0&&(0,U.jsxs)(`div`,{className:`pin-dock`,children:[(0,U.jsx)(`div`,{className:`pin-strip`,role:`list`,"aria-label":`Elements you're asking about`,children:z.map(e=>(0,U.jsxs)(`span`,{className:`pin-chip`,role:`listitem`,children:[(0,U.jsx)(L.chat,{}),(0,U.jsx)(`span`,{className:`pin-name`,children:ce(e)}),(0,U.jsx)(`button`,{type:`button`,className:`pin-remove`,"aria-label":`Unpin ${ce(e)}`,onClick:()=>Os(e),children:(0,U.jsx)(L.x,{})})]},e.id))}),(0,U.jsxs)(`div`,{className:`pin-suggests`,role:`list`,"aria-label":`Quick follow-ups`,children:[z.length>=2&&(0,U.jsxs)(`button`,{type:`button`,className:`live-chip pin-fuse-chip`,disabled:Y.busy,title:`Combine these ${z.length} cards into a single new answer — useful when you want Mavéa to find the pattern, trade-off, or story that runs across all of them at once`,onClick:()=>Cs(z),children:[`Fuse `,z.length,` into one`]}),ks.map(e=>(0,U.jsx)(`button`,{type:`button`,className:`live-chip`,onClick:()=>ns(e),disabled:Y.busy,children:e},e))]})]}),(0,U.jsxs)(`div`,{className:Qs?`voice-capsule`:`composer-passthrough`,children:[Qs&&(0,U.jsxs)(`div`,{className:`voice-strip`,children:[Kc&&!Bc?(0,U.jsxs)(`button`,{type:`button`,className:`vc-status`,onClick:Fo,title:`Tap to stop and show the whole answer at once`,"aria-label":`Stop speaking and show the whole answer`,children:[(0,U.jsxs)(`span`,{className:`vc-orb`,"aria-hidden":`true`,children:[(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{})]}),(0,U.jsx)(`span`,{className:`vc-status-label`,children:`Speaking`})]}):ga&&!V?(0,U.jsxs)(`div`,{className:`vc-status vc-preparing`,role:`status`,"aria-busy":`true`,children:[(0,U.jsxs)(`span`,{className:`vc-orb`,"aria-hidden":`true`,children:[(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{})]}),(0,U.jsx)(`span`,{className:`vc-status-label`,children:`Preparing voice…`})]}):Bc&&!V?(0,U.jsx)(`div`,{className:`vc-status vc-preparing vc-quiet`,role:`status`,"aria-busy":`true`,"aria-label":`Preparing voice`,children:(0,U.jsxs)(`span`,{className:`vc-orb`,"aria-hidden":`true`,children:[(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{}),(0,U.jsx)(`i`,{})]})}):null,(0,U.jsx)(`div`,{className:`vc-transcript`,"aria-hidden":`true`,children:Hc??Y.narration??``}),(0,U.jsxs)(`button`,{type:`button`,onClick:()=>Le(e=>!e),title:V?`Unmute Mavéa's voice — your microphone is unaffected`:`Mute Mavéa's voice — muted answers land written out at once, with notes and pen marks standing in for the walk. Your microphone is unaffected.`,"aria-pressed":!V,className:`voice-switch`+(V?` is-muted`:``),children:[V?(0,U.jsx)(L.speakerOff,{}):(0,U.jsx)(L.speaker,{}),(0,U.jsx)(`span`,{className:`voice-switch-label`,children:`Mavéa's voice`}),(0,U.jsx)(`span`,{className:`voice-switch-track`,"aria-hidden":`true`,children:(0,U.jsx)(`span`,{className:`voice-switch-thumb`})})]}),(0,U.jsx)(Jl,{}),(0,U.jsx)(Zl,{}),(0,U.jsxs)(`button`,{className:`live-model-chip`,onClick:()=>Jr(e=>!e),title:l.current?`The model that generated this curated prerecorded example`:Ic?`Model settings · last reply ${Ic}`:`Model settings`,children:[(0,U.jsx)(`span`,{className:`chip-dot`,"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:`chip-model`,children:l.current?wo.model??`—`:n}),(0,U.jsx)(`span`,{className:`chip-caret`,"aria-hidden":`true`})]})]}),(0,U.jsx)(br,{value:b,onChange:e=>{O(e)},onSend:ns,listening:B,heard:we,onMic:Bs,micMode:vi,micArmed:J&&!pi,micPaused:J&&pi,micProcessing:be===`transcribing`,placeholder:W?`Talk, or type a thought — it lands on the map…`:z.length?z.length>1?`Ask about the selected elements…`:`Ask about the selected element…`:`Talk, or type — anything.`,focusSignal:oi,disabled:Y.busy,onFiles:re,attachPulse:ci,attachTitle:As?`Attach an image or PDF`:`Attach a doc or data file to explode — ${n} can't read images/PDFs directly`,onMicDown:()=>{Z&&(Fo(),X.start({inCanvas:!!Y.spec}))},onForceStop:()=>X.forceStop(),onMicCancel:()=>X.stop(),tools:(0,U.jsxs)(U.Fragment,{children:[Y.spec&&(0,U.jsx)(Tc,{armed:ue,onToggle:pe}),(0,U.jsxs)(`button`,{type:`button`,className:`composer-watch`+(W?` on`:``),"aria-pressed":W,"aria-label":yl,onClick:()=>{W?G.phase===`settled`||G.phase===`pausing`?(Ee(null),G.resume(),!B&&Z&&X.start({inCanvas:!!Y.spec,continuous:!0})):Is():el(`think`)},title:W?G.phase===`settled`||G.phase===`pausing`?`Add another thought`:`Finish now without waiting for silence`:`Build a live map while you think aloud`,children:[(0,U.jsx)(L.spark,{}),(0,U.jsx)(`span`,{children:yl})]})]}),micExtra:Z?(0,U.jsx)(Uo,{mode:vi,pttKey:e.pttKey,pttSide:e.pttSide,onChange:e=>{hi.current=null,mi(!1),fi(e===`always`),yi(e===`always`),_i(e===`hold`),e===`always`&&J&&!B&&!b.trim()?X.start({inCanvas:!!Y.spec,continuous:!0}):e!==`always`&&B&&X.stop()}}):void 0})]})]}),B&&!W&&(0,U.jsx)(Td,{transcript:we,mode:vi,note:Sr?`Just listening · ${Math.max(1,Math.round((Date.now()-kr.current)/6e4))}m — say "thoughts?" when you want me`:void 0}),B&&!W&&(0,U.jsx)(wu,{ghosts:Ai}),Y.spec?(0,U.jsxs)(`div`,{className:`canvas-stage stage`,"data-active":`1`,ref:Ui,children:[Cc!=null&&(0,U.jsx)(us,{tint:_c?.color,onDone:()=>Ec(null)},Cc),(0,U.jsx)(`div`,{className:`canvas-scroll`,ref:Hi,onClick:Y.spot?e=>{e.target.closest(`.spotlit`)||Po()}:void 0,children:(0,U.jsxs)(`div`,{className:`topic-wrap`,children:[(0,U.jsx)(Js,{armed:ue,rootRef:Ui,onStroke:es.onStroke,onTap:es.onTap,strokes:es.strokes,highlights:es.highlights}),ml,!dc&&(0,U.jsxs)(`div`,{className:`viewing-past`,role:`status`,children:[uc?(0,U.jsx)(L.table,{}):(0,U.jsx)(L.clock,{}),(0,U.jsx)(`span`,{children:uc?`Viewing this thread together`:`Viewing an earlier moment`}),(0,U.jsx)(`button`,{type:`button`,className:`viewing-past-back`,onClick:()=>uc?Y.previewSpec(null):Y.jumpTo(cc),children:`Return to live`})]}),!me&&z.length===0&&(0,U.jsxs)(`div`,{className:`ask-hint`,role:`note`,children:[(0,U.jsx)(L.chat,{}),(0,U.jsxs)(`span`,{children:[`Tap `,(0,U.jsx)(`strong`,{children:`Ask`}),` on any element to ask Mavéa about it.`]}),(0,U.jsx)(`button`,{type:`button`,className:`ask-hint-x`,"aria-label":`Dismiss tip`,onClick:he,children:(0,U.jsx)(L.x,{})})]}),is&&(0,U.jsx)($,{children:(0,U.jsx)(Ff,{course:is,lessonIdx:ss,progress:ds??Wn(is.id),onPrev:()=>hs(is,ss-1),onNext:()=>hs(is,ss+1),onCheckpoint:gs,busy:Y.busy},`${is.id}:${ss}`)}),jc&&!is&&(0,U.jsx)(cs,{question:jc.question,narration:jc.narration,sources:Ac?.sources,inferred:Mc,tint:mc}),Ro&&(0,U.jsx)(j,{label:`Opening saved answer…`,overlay:!0}),(0,U.jsx)(H.Suspense,{fallback:(0,U.jsx)(`div`,{className:`canvas-loading`,role:`status`,"aria-busy":`true`,"aria-label":`Loading canvas`,children:(0,U.jsx)(`div`,{className:`skel-grid`,children:(0,U.jsx)(oe,{blocks:df})})}),children:(0,U.jsx)(uf,{data:pl??Y.viewSpec??Y.spec,spot:dc?Y.spot:null,built:{},onProve:()=>ai(!0),onAskBlock:Os,onAddToDashboard:e=>it({block:e,question:jc?.question??void 0}),selectedBlockIds:xs,onNarrate:Do,narratingId:Oo,muted:V,viewMode:mo,onViewMode:ho,presenting:yn,noteGutter:dc&&e.annotationsEnabled&&Va&&ma,walkNotes:dc?Ua:void 0,blankFill:dc?{values:Y.filled,activeKey:Y.activeBlank,fill:Y.fill,unfill:Y.unfill,activate:Y.setActiveBlank,complete:Y.complete,busy:Y.busy}:void 0,bend:dc&&fr===null?Y.spec?.bend:void 0,onAddToFlashcard:Vi,flashedIds:dt,belowHeaderSlot:jc&&fl?(0,U.jsx)(ql,{audio:fl,t:fr,onSeek:gr}):void 0,headerSlot:dc?(0,U.jsxs)(`div`,{className:`pen-anchor`,ref:Ka,children:[(0,U.jsx)(Ns,{enabled:e.annotationsEnabled,open:Ia,inkCount:ja.length,onClick:()=>La(e=>!e)}),Ia&&(0,U.jsx)(`div`,{className:`pen-popover`,children:(0,U.jsx)(Ms,{entries:ja,turnStartMs:Ma.current,annotationsEnabled:e.annotationsEnabled,hiddenSpots:Ra,onToggle:so,onKeep:()=>La(!1),onClear:()=>{Ea([]),ka(new Set),za(new Set),La(!1)},onClip:()=>ze(!0),onJumpTo:lo,onToggleSpot:po})})]}):void 0},uc?`thread-`+(Y.viewOverride?.id??``):dc?`live-`+Y.replaceEpoch:`view-`+Y.viewIndex)}),dc&&!hl&&!Io&&(0,U.jsx)(Je,{spots:Ra.size>0?wa.filter(e=>!Ra.has(e.spot)):wa,revision:go,onPlaced:Aa}),Y.busy&&dc&&(0,U.jsxs)(`div`,{className:`working-col`,children:[(0,U.jsx)(Dd,{cards:Lc}),(0,U.jsx)(Ad,{thinking:Y.reasoning})]}),dc&&!Y.busy&&(0,U.jsx)($,{children:(0,U.jsx)(Df,{chips:Y.understood,onFix:Ss})}),(0,U.jsx)(ms,{spec:Y.viewSpec??Y.spec,followups:kc,question:Oe??void 0,onAsk:ns,onTrack:()=>Ye(!0),onDeepZoom:Oe?()=>{window.location.hash=`#/deepzoom?seed=${encodeURIComponent(Oe)}`}:void 0,onCanvas:()=>ho(`canvas`),onSeeAll:!uc&&pc&&pc.moments.length>=2?()=>Oc(pc):void 0,threadCount:pc?.moments.length,busy:Y.busy})]})})]}):ec?(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(Ho,{seed:r.current||void 0,speak:Ti,goDemo:sp,onStart:e=>{Mo(!0),ns(e)},onStartTalking:()=>{if(Mo(!0),!Z){Ie($d),si(e=>e+1);return}X.start({inCanvas:!1})},onSeeHow:()=>Ao(!0),studySlot:(0,U.jsx)(zc,{onStudy:()=>It(!0)}),librarySlot:No.length>0?(0,U.jsx)($,{children:(0,U.jsx)(Sf,{entries:No,onResume:e=>{Mo(!0),ne(!1),je(e.question??null),Qo(e.id),Bo(e.spec,e.question)},onRemove:Yt,heading:`Pick up where you left off`,sub:`Your conversations stay on this device — tap one to step back in.`})}):void 0})}):(0,U.jsxs)(`div`,{className:`presence-stage stage`,"data-active":`1`,children:[ml&&(0,U.jsx)(`div`,{className:`live-error-stage`,children:ml}),Y.busy&&(0,U.jsx)(`div`,{className:`skel-stage`,children:(0,U.jsx)(Dd,{cards:Lc})})]}),vl,ui&&(0,U.jsxs)(`div`,{className:`drop-hint`,role:`status`,"aria-live":`polite`,children:[(0,U.jsx)(L.paperclip,{}),(0,U.jsx)(`span`,{children:`Drop to attach — Mavéa reads PDFs, Office docs, and data files`})]}),ko&&(0,U.jsx)($,{children:(0,U.jsx)(yf,{onClose:()=>Ao(!1),speak:Ti,onFullTour:Mi})}),$r&&(0,U.jsx)($,{children:(0,U.jsx)(xf,{items:nl,surface:`live`,onClose:ni,pinned:a.current&&Co.chapter?.id===`palette`})}),q&&(0,U.jsx)(`div`,{role:`presentation`,onClick:e=>e.target===e.currentTarget&&Jr(!1),style:{position:`fixed`,inset:0,background:`rgba(0,0,0,0.45)`,display:`flex`,alignItems:`flex-start`,justifyContent:`center`,paddingTop:80,zIndex:50},children:(0,U.jsx)($,{children:(0,U.jsx)(wf,{onClose:()=>Jr(!1),initialTab:Yr,initialAdvancedYouOpen:Zr})})}),Vo!==null&&(0,U.jsx)($,{children:(0,U.jsx)(Vf,{frames:Y.frames,initialIndex:Vo,speak:Ti,cancelSpeak:Ne,onClose:()=>Ko(null)})}),Re&&(0,U.jsx)($,{children:(0,U.jsx)(Uf,{frames:Y.frames,retainedAudio:e=>vr.get(He(e)),onClose:()=>ze(!1),onShared:()=>Ws.enqueue(`clipShared`)})}),Ve&&Ii.length>0&&(0,U.jsx)($,{children:(0,U.jsx)(Gf,{answers:Ii,defaultIndex:fc?fc.moments[fc.moments.length-1].frameIndex:Ii.length-1,defaultIndices:fc?.moments.map(e=>e.frameIndex),onClose:()=>Ge(!1),guided:a.current&&Co.chapter?.action.kind===`export`})}),qe&&(0,U.jsx)($,{children:(0,U.jsx)(qf,{onClose:()=>Ye(!1),initialSourceId:qo?`lib-`+qo:void 0})}),Xe&&(0,U.jsxs)(`div`,{className:`cv-takeover`,role:`dialog`,"aria-modal":`true`,"aria-label":`Living dashboard`,children:[(0,U.jsxs)(`header`,{className:`cv-takeover-head`,children:[(0,U.jsxs)(`div`,{className:`cv-takeover-id`,children:[(0,U.jsx)(`span`,{className:`cv-takeover-glyph`,"aria-hidden":`true`,children:`◎`}),(0,U.jsxs)(`div`,{className:`cv-takeover-titles`,children:[(0,U.jsx)(`span`,{className:`cv-takeover-eyebrow`,children:`Living dashboard`}),(0,U.jsx)(`span`,{className:`cv-takeover-title`,children:`Investment growth · $10k at 7%`})]})]}),(0,U.jsxs)(`button`,{type:`button`,className:`cv-takeover-close`,onClick:()=>Ze(null),children:[(0,U.jsx)(`span`,{"aria-hidden":`true`,children:`←`}),` Back to answer`]})]}),(0,U.jsx)(`div`,{className:`tour-dash-body`,children:(0,U.jsx)($,{children:Qe?(0,U.jsx)(Ef,{id:Xe}):(0,U.jsx)(Tf,{id:Xe})})})]}),et&&(0,U.jsx)($,{children:(0,U.jsx)(Jf,{block:et.block,question:et.question,conversationTitle:Y.spec?.title,onClose:()=>it(null),onAdded:(e,t)=>st({id:e,title:t})})}),at&&(0,U.jsx)(Zo,{dashboardId:at.id,dashboardTitle:at.title,onDismiss:()=>st(null)}),Y.spec&&(0,U.jsx)(rs,{open:ri,onClose:()=>ai(!1),claim:Y.spec.title,conf:$o,sources:Y.spec.sources??[],hadFiles:te}),mn.open&&(0,U.jsx)($,{children:(0,U.jsx)(If,{open:!0,spec:mn.spec,onClose:()=>gn(e=>({...e,open:!1}))})}),Ur&&(0,U.jsx)($,{children:(0,U.jsx)(Bf,{entries:No,onResume:e=>{Mo(!0),ne(!1),je(e.question??null),Qo(e.id),Bo(e.spec,e.question),Wr(!1)},onRemove:Yt,onClose:()=>Wr(!1)})}),Jc&&(0,U.jsx)(ba,{chapters:sc,currentIndex:lc,onJump:fo,onClose:()=>Yc(!1)}),ir&&Xc&&(0,U.jsx)($,{children:(0,U.jsx)(kf,{model:Xc,level:ir,onLevel:cr,onJump:e=>{Y.jumpTo(e),cr(null)},onClose:()=>cr(null)})}),Ht&&(0,U.jsx)($,{children:(0,U.jsx)(np,{cfg:Nt(e),memoryNodes:un(),speak:Ti,onDebrief:e=>{Wt(!1),O(e)},onClose:()=>Wt(!1),onPrepTurn:(e,t)=>{Wt(!1),je(t),Y.run(e,void 0,void 0,void 0,void 0,t)}})}),Lt&&Xc&&(0,U.jsx)($,{children:(0,U.jsx)(Rf,{model:Xc,onJump:e=>{Y.jumpTo(e),Vt(!1)},onShare:Y.frames.length>0?()=>{Vt(!1),ze(!0)}:void 0,onClose:()=>Vt(!1)})}),Gt&&(0,U.jsx)($,{children:(0,U.jsx)(jf,{records:Fn(),chapters:sc,onLand:e=>{Kt(!1);let t=Nn(e,No);Mo(!0),ne(!1),t?(je(t.question??null),Qo(t.id),Bo(t.spec,t.question)):(je(e.question),Y.run(e.question))},onGoDeeper:e=>{Kt(!1),Mo(!0),ne(!1),je(e),Y.run(e)},autoTour:a.current,onClose:()=>Kt(!1)})}),en&&(0,U.jsx)($,{children:(0,U.jsx)(Xf,{pdf:en,cfg:Nt(e),search:{enabled:e.searchMode!==`off`,providerId:e.searchProvider,apiKey:e.searchKeys[e.searchProvider]},onClose:()=>tn(null)})}),rn&&(0,U.jsx)($,{children:(0,U.jsx)(op,{doc:rn,cfg:Nt(e),onClose:()=>on(null)},rn.id)}),sn&&(0,U.jsx)($,{children:(0,U.jsx)(Qf,{sources:sn,cfg:Nt(e),search:{enabled:e.searchMode!==`off`,providerId:e.searchProvider,apiKey:e.searchKeys[e.searchProvider]},onClose:()=>cn(null)})}),fn&&(0,U.jsx)($,{children:(0,U.jsx)(Nf,{model:fn,cfg:Nt(e),speak:Ti,showcase:a.current,onClose:()=>pn(null)})}),jt&&(0,U.jsx)($,{children:(0,U.jsx)(ip,{onClose:()=>It(!1)})}),gt&&(0,U.jsx)($,{children:(0,U.jsx)(Pf,{mode:`add`,initial:gt.initial,deck:gt.deck,origin:`block`,source:gt.source,heading:`Flashcards from ${ce(gt.block)}`,enrich:gt.enrich,decks:On(),onSaved:e=>{if(e.length&>.block.id){let e=gt.block.id;ft(t=>new Set(t).add(e))}Li(e)},onClose:()=>bt(null)})}),_s&&(0,U.jsxs)(`div`,{className:`cards-pill`,role:`status`,"aria-live":`polite`,children:[(0,U.jsx)(L.layers,{}),(0,U.jsxs)(`span`,{className:`cards-pill-text`,children:[_s.missedCards.length,` card`,_s.missedCards.length===1?``:`s`,` from this checkpoint`]}),(0,U.jsx)(`button`,{type:`button`,className:`cards-pill-btn`,onClick:()=>vs(null),children:`Dismiss`}),(0,U.jsx)(`button`,{type:`button`,className:`cards-pill-btn cards-pill-primary`,onClick:()=>bs(_s),children:`Add`})]}),!_s&&Tt&&(0,U.jsxs)(`div`,{className:`cards-pill is-ask`,role:`status`,"aria-live":`polite`,children:[(0,U.jsxs)(`div`,{className:`cards-pill-head`,children:[(0,U.jsx)(L.layers,{}),(0,U.jsxs)(`span`,{className:`cards-pill-text`,children:[Tt.count,` card`,Tt.count===1?``:`s`,` saved to “`,Tt.deck,`”`]})]}),(0,U.jsxs)(`div`,{className:`cards-pill-ask`,children:[(0,U.jsx)(`span`,{className:`cards-pill-q`,children:`Want Mavéa to help you remember these?`}),(0,U.jsx)(`span`,{className:`cards-pill-sub`,children:`They’ll come back for a quick practice every so often.`}),(0,U.jsxs)(`div`,{className:`cards-pill-choices`,children:[(0,U.jsx)(`button`,{type:`button`,className:`cards-pill-btn`,onClick:()=>Bi(`collection`),children:`No thanks`}),(0,U.jsx)(`button`,{type:`button`,className:`cards-pill-btn cards-pill-primary`,onClick:()=>Bi(`spaced`),children:`Yes`})]})]})]}),!_s&&!Tt&&St&&(0,U.jsxs)(`div`,{className:`cards-pill`,role:`status`,"aria-live":`polite`,children:[(0,U.jsx)(L.layers,{}),(0,U.jsxs)(`span`,{className:`cards-pill-text`,children:[St.count,` card`,St.count===1?``:`s`,` added`]}),(0,U.jsx)(`button`,{type:`button`,className:`cards-pill-btn`,onClick:()=>{An(St.ids),Ct(null)},children:`Undo`}),(0,U.jsx)(`button`,{type:`button`,className:`cards-pill-btn cards-pill-primary`,onClick:()=>{window.location.hash=`#/flashcards`,Ct(null)},children:`View`})]})]})}export{up as LiveApp};
|