@mavea/mavea 1.0.7 → 1.0.9
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/README.md +5 -3
- package/bin/mavea.mjs +42 -17
- package/dist/.vite/manifest.json +675 -670
- package/dist/assets/{AppCommandPalette-DUMSp3rd.js → AppCommandPalette-D5E8xhEf.js} +1 -1
- package/dist/assets/{AtlasView-Dl2fssaG.js → AtlasView-Q4dqhS4v.js} +1 -1
- package/dist/assets/{BlockEmpty-CLtVQf6c.js → BlockEmpty-JoKwTRb0.js} +1 -1
- package/dist/assets/{BriefingPlayer-DO205Qkh.js → BriefingPlayer-BaC5XjsP.js} +1 -1
- package/dist/assets/{CanvasSkeleton-BZZPCuRZ.js → CanvasSkeleton-DgF1b-bW.js} +2 -2
- package/dist/assets/{CheckLogRail-wUfby67Z.js → CheckLogRail-DldWYeVr.js} +1 -1
- package/dist/assets/{CodeOutput-Kh6ldxQz.js → CodeOutput-B9_a0vjD.js} +1 -1
- package/dist/assets/{CommandPalette-Kl00mMZm.js → CommandPalette-C1eiRrMP.js} +1 -1
- package/dist/assets/{CourseLessonReader-MBHoknUz.js → CourseLessonReader-DA3t9SUe.js} +2 -2
- package/dist/assets/{CourseRail-q6x5cCpW.js → CourseRail-BaP1uB0B.js} +1 -1
- package/dist/assets/{CoursesApp-v89OVJvg.js → CoursesApp-MSK1JzqU.js} +2 -2
- package/dist/assets/{CrossExamPanel-DH04p6VS.js → CrossExamPanel-jJu-Mqvs.js} +1 -1
- package/dist/assets/{DashPresent-BYXbPuGj.js → DashPresent-Coj1b9Bp.js} +1 -1
- package/dist/assets/{DashboardDetail-B50ZkeVK.js → DashboardDetail-CHw4HfHp.js} +2 -2
- package/dist/assets/DashboardLoopRuntime-bSH-LDQM.js +1 -0
- package/dist/assets/{DashboardOverview-C-FdGWM5.js → DashboardOverview-CfsSZAgN.js} +1 -1
- package/dist/assets/{DashboardSettings-Dmw6JTbI.js → DashboardSettings-BkSQvDt6.js} +1 -1
- package/dist/assets/{DashboardsApp-JSY_bVfi.js → DashboardsApp-BmcjQZqP.js} +2 -2
- package/dist/assets/{DeepZoomApp-BFNwli7l.js → DeepZoomApp-BKhVz2w1.js} +1 -1
- package/dist/assets/{DelegatePanel-BK7rEhIc.js → DelegatePanel-BFKvKzB-.js} +1 -1
- package/dist/assets/{DemoGallery-BPtVG7_y.js → DemoGallery-0cgMcGir.js} +1 -1
- package/dist/assets/{DropSelect-DUhdQSta.js → DropSelect-CJnpoHtR.js} +1 -1
- package/dist/assets/{ExportModal-D65cGyj_.js → ExportModal-DbWt9b6v.js} +2 -2
- package/dist/assets/{ExtractionPreview-Iwfg2Ogl.js → ExtractionPreview-DTAyeKIx.js} +1 -1
- package/dist/assets/{FeatureUseNotice-DPtQ0OGb.js → FeatureUseNotice-CoK5HkbR.js} +1 -1
- package/dist/assets/FeatureUseNotice-CsCxxfOl.css +1 -0
- package/dist/assets/{FlagshipCTA-BXntKhxb.js → FlagshipCTA-EfqXfhO2.js} +1 -1
- package/dist/assets/{FlagshipCommandPalette-BDJfasI-.js → FlagshipCommandPalette-CUgzggi1.js} +1 -1
- package/dist/assets/{FlagshipShowcase-DJ8Gxk_G.js → FlagshipShowcase-BHe-31yE.js} +1 -1
- package/dist/assets/{FlashcardsApp-CLNo4WX7.js → FlashcardsApp-Cs7PORkH.js} +1 -1
- package/dist/assets/{ForecastPanel-PBO2-dgS.js → ForecastPanel-BrfHS_Dm.js} +1 -1
- package/dist/assets/{GalleryApp-DM03CMRy.js → GalleryApp-VEc5loz4.js} +1 -1
- package/dist/assets/{HonestByDesign-Dqyth6nW.js → HonestByDesign-DsAzveYU.js} +1 -1
- package/dist/assets/{HowItWorks-C0zosIvq.js → HowItWorks-_ek4B7ia.js} +1 -1
- package/dist/assets/{LegalApp-DZBdExTy.js → LegalApp-jexr9Ljt.js} +1 -1
- package/dist/assets/{LegalMarkdownDocument-CSZhRG5r.js → LegalMarkdownDocument-01Tz7Pp4.js} +1 -1
- package/dist/assets/{LegalPageShell-DTeXqWyc.js → LegalPageShell-DsgBihfP.js} +1 -1
- package/dist/assets/{LeverPanel-aZfhtVJX.js → LeverPanel-IONjaat2.js} +1 -1
- package/dist/assets/{Library-D2XGNXz7.js → Library-gY4a_JKb.js} +1 -1
- package/dist/assets/{LibraryOverlay-B2WQSgwr.js → LibraryOverlay-DdOW7ypW.js} +1 -1
- package/dist/assets/LiveApp-CvgisDd0.js +61 -0
- package/dist/assets/{LiveApp-BVZGpJ1S.css → LiveApp-D2QFBykD.css} +1 -1
- package/dist/assets/LiveSettings-sWIu-zl5.js +6 -0
- package/dist/assets/{MindMapViewerDrawer-YYyZqmAd.js → MindMapViewerDrawer--AOShADD.js} +1 -1
- package/dist/assets/{MindShape-mTlN5mPZ.js → MindShape-DDL4X-e5.js} +1 -1
- package/dist/assets/{PinToDashboard-_kIOHs0k.js → PinToDashboard-DBZjKpiA.js} +1 -1
- package/dist/assets/{PlanReview-33V8GTNB.js → PlanReview-D0KjJqji.js} +1 -1
- package/dist/assets/{Presence-CzLJIeSD.js → Presence-DZC81_y4.js} +1 -1
- package/dist/assets/{PresentationDeck-BDoGecxr.js → PresentationDeck-DHtbOg0G.js} +1 -1
- package/dist/assets/{PrismApp-PfBTFhMF.js → PrismApp-DQ5p9pDb.js} +2 -2
- package/dist/assets/{PrismAskController-DbQDrlU9.js → PrismAskController-KVoYxV_d.js} +1 -1
- package/dist/assets/{PrismBriefingPlayer-1fvlfLR8.js → PrismBriefingPlayer-X4nTg2tZ.js} +2 -2
- package/dist/assets/{PrismOverlay-B7lEspdu.js → PrismOverlay-DJ-JBI6j.js} +4 -4
- package/dist/assets/{PrivacyApp-CR4lRs0L.js → PrivacyApp-Df8FcjKa.js} +1 -1
- package/dist/assets/{Recap-H5fhj5Tc.js → Recap-D3nAqmLK.js} +1 -1
- package/dist/assets/{ReelJelly-3jSVsJsy.js → ReelJelly-BCMS6a1u.js} +1 -1
- package/dist/assets/{RehearsalPanel-BVgjrOPg.js → RehearsalPanel-CThmKYOO.js} +1 -1
- package/dist/assets/ReplayCard-B5njgafT.js +2 -0
- package/dist/assets/{ReplayOverlay-DXmVdeIr.js → ReplayOverlay-CKTMSGuA.js} +1 -1
- package/dist/assets/{RewindOverlay-BusfWeFq.js → RewindOverlay-D6TQvplO.js} +1 -1
- package/dist/assets/{RippleApp-9KrJPYgN.js → RippleApp-DCAveryn.js} +2 -2
- package/dist/assets/{RippleAskController-CO9wE7hU.js → RippleAskController-DQVRFV30.js} +1 -1
- package/dist/assets/{RippleOverlay-DMHLbfh8.js → RippleOverlay-DmC4C72P.js} +2 -2
- package/dist/assets/{SeeDontRead-C389viue.js → SeeDontRead-CzIEW_Y7.js} +1 -1
- package/dist/assets/ShareModal-DtXKAwWu.js +32 -0
- package/dist/assets/{ShipCascade-BUtwvQoW.js → ShipCascade-B71VnE85.js} +1 -1
- package/dist/assets/{ShipCourse-B7lG6DYW.js → ShipCourse-BS4lT6xe.js} +1 -1
- package/dist/assets/{ShipHotspots-Bj2CovtT.js → ShipHotspots-CGQN_uoM.js} +1 -1
- package/dist/assets/{ShipIncident-DcmindmE.js → ShipIncident-C--FrQ1N.js} +1 -1
- package/dist/assets/{ShipMigration-s0hVjDQl.js → ShipMigration-C4fE3pL7.js} +1 -1
- package/dist/assets/{ShipOnboarding-ekbHL7OH.js → ShipOnboarding-BR3iwj8v.js} +1 -1
- package/dist/assets/{ShipRead-BVNgQT6L.js → ShipRead-DYHgvWuI.js} +1 -1
- package/dist/assets/{ShipRollout-BdUQzMyP.js → ShipRollout-D-vQsNmF.js} +1 -1
- package/dist/assets/{ShipSuggestions-B6fKYh8L.js → ShipSuggestions-BICGN1lD.js} +1 -1
- package/dist/assets/{ShipWorkspace-3D3Rrs1p.js → ShipWorkspace-CVkhvrlm.js} +1 -1
- package/dist/assets/{SignatureLoop-C60r8Wm5.js → SignatureLoop-BwCgKOcz.js} +1 -1
- package/dist/assets/{SynthesisApp-vJ2Jq0Qe.js → SynthesisApp-DHKlVoSg.js} +2 -2
- package/dist/assets/{SynthesisOverlay-CkERphvG.js → SynthesisOverlay-ezT4gd3q.js} +1 -1
- package/dist/assets/{TermsApp-C70tW6m6.js → TermsApp-uGgQFz8d.js} +1 -1
- package/dist/assets/{TopicCanvas-CT0eSj2M.js → TopicCanvas-CTTBp5sg.js} +2 -2
- package/dist/assets/{TourPrism-BvucSkcs.js → TourPrism-dXsE-USz.js} +1 -1
- package/dist/assets/{TrackerTile-CasZNmt4.js → TrackerTile-bEni07HA.js} +2 -2
- package/dist/assets/{TwoSurfaces-C90X7Aj5.js → TwoSurfaces-CjFg-pUQ.js} +1 -1
- package/dist/assets/{UnderstoodPanel-CHPD2Ttj.js → UnderstoodPanel-DFKf9Y3r.js} +1 -1
- package/dist/assets/{WhyMachineOverlay-CB0_n6Sy.js → WhyMachineOverlay-DYG-WIjA.js} +1 -1
- package/dist/assets/{WowFeatures-Ci_H5QYX.js → WowFeatures-lLtU2gPc.js} +1 -1
- package/dist/assets/{ZoomDeck-BQHO79ZU.js → ZoomDeck-D_PnwGAY.js} +1 -1
- package/dist/assets/{alternateFinishes-DZ-rkpkX.js → alternateFinishes-CPbjDTTL.js} +1 -1
- package/dist/assets/{annotationAuto-B0nihA4F.js → annotationAuto-Dq2Ae6Co.js} +1 -1
- package/dist/assets/{annotationReel-BcU9Q0Sw.js → annotationReel-5OHglRgk.js} +1 -1
- package/dist/assets/backup-DnPfX6cD.js +1 -0
- package/dist/assets/canvas-DBaJcTKZ.js +1 -0
- package/dist/assets/{catalog-Dqaq2YFd.js → catalog-C_g3qPPQ.js} +1 -1
- package/dist/assets/chapters-BX_F_H3C.js +1 -0
- package/dist/assets/{dashboardEvents-DR9d_c74.js → dashboardEvents-DCQLIdy6.js} +2 -2
- package/dist/assets/{dist-BFx3nZg4.js → dist-DrPlQeYR.js} +1 -1
- package/dist/assets/{fit-0HxU-rtB.js → fit-DqcemO7k.js} +1 -1
- package/dist/assets/{generateLive-D4B30fnF.js → generateLive-CflgZ7Wt.js} +18 -18
- package/dist/assets/homeTarget-BcZYH3DY.js +1 -0
- package/dist/assets/{index-y8GL67bB.js → index-BlCH2LG4.js} +3 -3
- package/dist/assets/{jspdf.es.min-C-Pf79px.js → jspdf.es.min-C9encxHf.js} +1 -1
- package/dist/assets/kokoro-BCXTWbLb.js +1 -0
- package/dist/assets/{lib-VFqp6Y3w.js → lib-3J_9keOc.js} +1 -1
- package/dist/assets/{liveSchema-CJ49PX5R.js → liveSchema-DNg9x7Wk.js} +3 -2
- package/dist/assets/{mastery-BPjxP0fN.js → mastery-D7xYf5D7.js} +1 -1
- package/dist/assets/{motion-S0NRruNj.js → motion-BYK1NIl0.js} +1 -1
- package/dist/assets/{neighborhoods-C-1Tjr1r.js → neighborhoods-B0woY8Ah.js} +1 -1
- package/dist/assets/{notes-lROPCorS.js → notes-0ZgJ597y.js} +1 -1
- package/dist/assets/{pdf-Df7PCH7q.js → pdf-DuD2LFXS.js} +1 -1
- package/dist/assets/{perfProbe-COAp9PAa.js → perfProbe-CTSVS7u0.js} +1 -1
- package/dist/assets/{pin-CXSuPJYL.js → pin-zUYIWzGr.js} +1 -1
- package/dist/assets/{portal-DMw7C32j.js → portal-deBu1VaC.js} +1 -1
- package/dist/assets/{pptxgen.es-CvTILmV9.js → pptxgen.es-JvVtQi0_.js} +1 -1
- package/dist/assets/{prewarm--whjQhWJ.js → prewarm-DSFwU9lQ.js} +1 -1
- package/dist/assets/{quietHours-BvcsBKKK.js → quietHours-BJAGhffA.js} +1 -1
- package/dist/assets/{registry-BPvIPLke.js → registry-45IskpHI.js} +1 -1
- package/dist/assets/{registry-2v0jlh5Q.js → registry-BGptAE_J.js} +2 -2
- package/dist/assets/{registry-D_URPoL4.js → registry-BJ_F0mH5.js} +1 -1
- package/dist/assets/{registry-B8DStMJk.js → registry-BSewKzG5.js} +1 -1
- package/dist/assets/{registry-DUvXX_d0.js → registry-Bo9A1rtO.js} +1 -1
- package/dist/assets/{registry-CKjKq6ct.js → registry-BpXS6B5V.js} +1 -1
- package/dist/assets/{registry-aazwkBJp.js → registry-BvJYizNq.js} +1 -1
- package/dist/assets/{registry-DCI_BeFJ.js → registry-C1y9zCwl.js} +1 -1
- package/dist/assets/{registry-Buq5uuCv.js → registry-CS0QdcT2.js} +1 -1
- package/dist/assets/{registry-B940W2j5.js → registry-Caz06xkK.js} +1 -1
- package/dist/assets/{registry-Cg7qUZPS.js → registry-CmEE2X59.js} +1 -1
- package/dist/assets/{registry-DujBAgn_.js → registry-D5sMUiCn.js} +1 -1
- package/dist/assets/{registry-Cix-yqch.js → registry-DLnp7IOd.js} +1 -1
- package/dist/assets/{registry-DDLSYDVA.js → registry-DOsi_pfu.js} +1 -1
- package/dist/assets/{registry-BgGeRiDA.js → registry-DWpOzObR.js} +1 -1
- package/dist/assets/{registry-Dpb8EXHn.js → registry-DilxWEq7.js} +1 -1
- package/dist/assets/{registry-DJinB5ye.js → registry-Dn10bL9p.js} +1 -1
- package/dist/assets/{registry-zRPjWNl5.js → registry-DtJTiMeL.js} +1 -1
- package/dist/assets/{registry-CEVrY72Z.js → registry-FPqHPyMt.js} +1 -1
- package/dist/assets/{registry-DI1wSG1Y.js → registry-PAcF90vq.js} +1 -1
- package/dist/assets/{registry-CAusoyBh.js → registry-eoPQWB7M.js} +1 -1
- package/dist/assets/{registry-1GuPBfQK.js → registry-k5Lqb0OP.js} +1 -1
- package/dist/assets/{registry-QcULZpdE.js → registry-yQqBxBwc.js} +2 -2
- package/dist/assets/{relate-A9ZeaaAI.js → relate-B23jli7z.js} +1 -1
- package/dist/assets/{run-C_0B_41W.js → run-Dc2ZJz6n.js} +1 -1
- package/dist/assets/search-Be63DJkp.js +1 -0
- package/dist/assets/shapes-Cw7tCHIp.js +1 -0
- package/dist/assets/{shikiHighlight-DUCYbsJ2.js → shikiHighlight-ZFDUBGQi.js} +1 -1
- package/dist/assets/{store-DgG0C1Qx.js → store-BMRQiV1z.js} +1 -1
- package/dist/assets/{store-BFC7DZcg.js → store-Dn23_Ymr.js} +1 -1
- package/dist/assets/{store-BFrJaSxJ.js → store-DoJn3lBF.js} +1 -1
- package/dist/assets/{store-4JNNn732.js → store-DrBDvqXF.js} +1 -1
- package/dist/assets/threads-DxSb3F0U.js +1 -0
- package/dist/assets/{useDashboardLoop-B6ByHWoE.js → useDashboardLoop-8emjL6b-.js} +3 -3
- package/dist/assets/useLiveConfig-BhFHwoy3.js +1 -0
- package/dist/assets/{useSpatialCanvas-DogK9457.js → useSpatialCanvas-DZhSpnC6.js} +1 -1
- package/dist/assets/{useSpotlightWalk-rMbmNBKK.js → useSpotlightWalk-sP3ePKv0.js} +1 -1
- package/dist/assets/{useSrsCards-CagZefwX.js → useSrsCards-BHQHQ7hm.js} +1 -1
- package/dist/assets/{useStudy-Bflreq2a.js → useStudy-Dh598Dw8.js} +1 -1
- package/dist/assets/{useZoomGesture-CYc3tf2z.js → useZoomGesture-CQdTOGD2.js} +1 -1
- package/dist/index.html +1 -1
- package/docs/media/mascot-dark.svg +53 -0
- package/docs/media/mascot-light.svg +53 -0
- package/package.json +2 -1
- package/dist/assets/DashboardLoopRuntime-CFXPx3v_.js +0 -1
- package/dist/assets/FeatureUseNotice-CWt7gOwS.css +0 -1
- package/dist/assets/LiveApp-B9zwXlGC.js +0 -61
- package/dist/assets/LiveSettings-D9OcWlm6.js +0 -6
- package/dist/assets/ReplayCard-BpYO5vX-.js +0 -2
- package/dist/assets/ShareModal-ClnEkudw.js +0 -32
- package/dist/assets/backup-c-Btapzp.js +0 -1
- package/dist/assets/canvas-QTEIiK23.js +0 -1
- package/dist/assets/chapters-BiUsDClQ.js +0 -1
- package/dist/assets/homeTarget-BgWKI_E1.js +0 -1
- package/dist/assets/kokoro-D4GKpSL0.js +0 -1
- package/dist/assets/search-DnjHupRf.js +0 -1
- package/dist/assets/shapes-RqjqC0ay.js +0 -1
- package/dist/assets/useLiveConfig-X9Wxh90k.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-BlCH2LG4.js";var r=e(),i=n(),a=t(),o=`Mavéa lists the assumptions it used for this answer. If one is wrong, tap that chip and correct it.`;function s(e){let t=(0,i.c)(28),{chips:n,onFix:s}=e,[c,l]=(0,r.useState)(null),[u,d]=(0,r.useState)(``),f=(0,r.useRef)(null),p=(0,r.useId)(),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>{l(null)},t[0]=m):m=t[0];let h;t[1]===n?h=t[2]:(h=[n],t[1]=n,t[2]=h),(0,r.useEffect)(m,h);let g,_;if(t[3]===c?(g=t[4],_=t[5]):(g=()=>{c!==null&&f.current?.select()},_=[c],t[3]=c,t[4]=g,t[5]=_),(0,r.useEffect)(g,_),n.length===0)return null;let v;t[6]===n?v=t[7]:(v=e=>{d(n[e]),l(e)},t[6]=n,t[7]=v);let y=v,b;t[8]!==n||t[9]!==u||t[10]!==c||t[11]!==s?(b=()=>{let e=u.replace(/\s+/g,` `).trim();c!==null&&(e&&e!==n[c]&&s(n[c],e),l(null))},t[8]=n,t[9]=u,t[10]=c,t[11]=s,t[12]=b):b=t[12];let x=b,S;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,a.jsx)(`span`,{className:`understood-label`,children:`What I understood — tap anything to fix it`}),t[13]=S):S=t[13];let C;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,a.jsx)(`span`,{"aria-hidden":`true`,children:`i`}),t[14]=C):C=t[14];let w;t[15]===p?w=t[16]:(w=(0,a.jsxs)(`div`,{className:`understood-head`,children:[S,(0,a.jsxs)(`span`,{className:`understood-help`,children:[(0,a.jsx)(`button`,{type:`button`,className:`understood-help-btn`,"aria-label":`What this section means`,"aria-describedby":p,title:o,children:C}),(0,a.jsx)(`span`,{id:p,className:`understood-tooltip`,role:`tooltip`,children:o})]})]}),t[15]=p,t[16]=w);let T;t[17]!==n||t[18]!==x||t[19]!==u||t[20]!==c||t[21]!==y?(T=n.map((e,t)=>c===t?(0,a.jsx)(`input`,{ref:f,className:`understood-edit`,value:u,size:Math.max(u.length,6),onChange:e=>d(e.target.value),onBlur:()=>l(null),onKeyDown:e=>{e.key===`Enter`&&x(),e.key===`Escape`&&l(null)},"aria-label":`Correct "${e}"`},e):(0,a.jsx)(`button`,{type:`button`,className:`understood-chip`,onClick:()=>y(t),title:`Not right? Tap to fix it`,children:e},e)),t[17]=n,t[18]=x,t[19]=u,t[20]=c,t[21]=y,t[22]=T):T=t[22];let E;t[23]===T?E=t[24]:(E=(0,a.jsx)(`div`,{className:`understood-chips`,children:T}),t[23]=T,t[24]=E);let D;return t[25]!==E||t[26]!==w?(D=(0,a.jsxs)(`section`,{className:`understood`,"aria-label":`What Mavéa understood`,children:[w,E]}),t[25]=E,t[26]=w,t[27]=D):D=t[27],D}export{s as UnderstoodPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-y8GL67bB.js";import{t as r}from"./useSpatialCanvas-DogK9457.js";import{r as i}from"./sourceHost-BV3t2XDb.js";var a=e(),o=n();function s(e){return e===`T1`||e===`T2`}var c=e=>e<0?0:e>1?1:e;function l(e){let t=new Set(e.nodes.map(e=>e.id)),n=new Map,r=new Map;for(let t of e.nodes)n.set(t.id,0),r.set(t.id,[]);for(let i of e.edges)!t.has(i.from)||!t.has(i.to)||i.from===i.to||(n.set(i.to,(n.get(i.to)??0)+1),r.get(i.from).push(i.to));let i=e.nodes.filter(e=>(n.get(e.id)??0)===0).map(e=>e.id),a=[];for(;i.length;){let e=i.shift();a.push(e);for(let t of r.get(e)??[])n.set(t,(n.get(t)??0)-1),n.get(t)===0&&i.push(t)}return a.length===e.nodes.length?a:null}function u(e){let t=e.nodes.find(t=>t.id===e.outcomeId);return!t||typeof t.value!=`number`||!Number.isFinite(t.value)||!s(t.tier)?!1:e.edges.length>0&&e.edges.every(e=>typeof e.weight==`number`&&Number.isFinite(e.weight)&&s(e.tier))}function d(e,t=[]){let n=l(e),r={byNode:new Map(e.nodes.map(e=>[e.id,null])),outcomeDelta:null,explainedPct:null,fullyGrounded:!1,relativeByNode:new Map(e.nodes.map(e=>[e.id,0])),relativeOutcome:null};if(!n)return r;let i=new Map;for(let e of t)e.nodeId&&i.set(e.nodeId,c(e.pct));let a=new Map;for(let t of e.edges)a.has(t.to)||a.set(t.to,[]),a.get(t.to).push(t);let o=e=>{let t=new Map;for(let r of n){let n=a.get(r)??[];if(n.length===0){t.set(r,e.get(r)??1);continue}let i=0,o=!0;for(let e of n){let n=t.get(e.from);if(n==null||typeof e.weight!=`number`){o=!1;break}i+=e.sign*e.weight*n}t.set(r,o?i:null)}return t},s=o(i),d=new Map(e.nodes.map(e=>[e.id,s.get(e.id)??null])),f=new Map;for(let e of n){let t=a.get(e)??[];if(t.length===0){f.set(e,c(i.get(e)??1));continue}let n=0;for(let e of t)n+=e.sign*(f.get(e.from)??0);f.set(e,c(n/t.length))}let p=new Map(e.nodes.map(e=>[e.id,f.get(e.id)??0])),m=f.has(e.outcomeId)?f.get(e.outcomeId):null;if(!u(e))return{byNode:d,outcomeDelta:null,explainedPct:null,fullyGrounded:!1,relativeByNode:p,relativeOutcome:m};let h=o(new Map),g=e.nodes.find(t=>t.id===e.outcomeId).value,_=s.get(e.outcomeId),v=h.get(e.outcomeId);return{byNode:d,outcomeDelta:_!=null&&v!=null?(_-v)*g:null,explainedPct:_??null,fullyGrounded:!0,relativeByNode:p,relativeOutcome:m}}var f=268,p=112,m=90;function h(e){let t=new Map(e.nodes.map(e=>[e.id,e])),n=e=>Number.isFinite(e.depth)?e.depth:e.role===`root`?0:e.role===`mechanism`?1:2,r=[...new Set(e.nodes.map(n))].sort((e,t)=>e-t),i=new Map;for(let n of e.edges)!t.has(n.from)||!t.has(n.to)||(i.has(n.to)||i.set(n.to,[]),i.get(n.to).push(n.from));let a=new Map,o=[];r.forEach((t,r)=>{let s=e.nodes.filter(e=>n(e)===t).map((e,t)=>{let n=(i.get(e.id)??[]).map(e=>a.get(e)).filter(e=>e!==void 0);return{n:e,bary:n.length?n.reduce((e,t)=>e+t,0)/n.length:t*p,i:t}});s.sort((e,t)=>e.bary-t.bary||e.n.id.localeCompare(t.n.id));let c=s.length;s.forEach((e,t)=>{let n=(t-(c-1)/2)*p;a.set(e.n.id,n),o.push({node:e.n,x:r*f,y:n})})});let s=1/0,c=1/0,l=-1/0,u=-1/0;for(let e of o)s=Math.min(s,e.x-184/2),c=Math.min(c,e.y-76/2),l=Math.max(l,e.x+184/2),u=Math.max(u,e.y+76/2);let d=m-s,h=m-c;for(let e of o)e.x+=d,e.y+=h;let g=l-s+m*2,_=u-c+m*2;return{placed:o,w:g,h:_,bbox:{x:0,y:0,w:g,h:_}}}var g=t(),_=e=>e===`T1`||e===`T2`,v=e=>Number.isInteger(e)?String(e):e.toFixed(1),y=e=>e>=.66?`Strong relative support`:e>=.33?`Moderate relative support`:e>0?`Weak relative support`:`No active support`;function b({dag:e,onClose:t}){let n=(0,a.useMemo)(()=>h(e),[e]),[i,o]=(0,a.useState)(new Map),[s,c]=(0,a.useState)(null),l=(0,a.useMemo)(()=>[...i.entries()].map(([e,t])=>({nodeId:e,pct:t})),[i]),u=(0,a.useMemo)(()=>d(e,l),[e,l]),f=r({clamp:{min:.35,max:1.7},margin:64});(0,a.useMemo)(()=>(f.fitTo(n.bbox),e),[e,n]);let p=(0,a.useMemo)(()=>{let e=new Map;for(let t of n.placed)e.set(t.node.id,{x:t.x,y:t.y});return e},[n]),m=e.nodes.find(t=>t.id===e.outcomeId),b=(e,t)=>o(n=>new Map(n).set(e,t)),S=()=>o(new Map),C=u.fullyGrounded,w=m?.value,T=C&&w!==void 0&&u.outcomeDelta!==null?w+u.outcomeDelta:null,E=C&&u.explainedPct!==null?`${Math.round(u.explainedPct*100)}% explained`:`—`,D=u.relativeOutcome;return(0,g.jsx)(`div`,{className:`wm-scrim`,role:`dialog`,"aria-label":`Why machine`,"aria-modal":`true`,children:(0,g.jsxs)(`div`,{className:`wm-panel`,role:`presentation`,onClick:e=>e.stopPropagation(),children:[(0,g.jsxs)(`header`,{className:`wm-head`,children:[(0,g.jsxs)(`div`,{className:`wm-title`,children:[(0,g.jsx)(`span`,{className:`wm-kicker`,children:`THE WHY MACHINE`}),(0,g.jsx)(`h2`,{children:e.center})]}),(0,g.jsxs)(`div`,{className:`wm-head-actions`,children:[(0,g.jsx)(`button`,{type:`button`,className:`wm-btn`,onClick:S,disabled:i.size===0,children:`Reset`}),t&&(0,g.jsx)(`button`,{type:`button`,className:`wm-btn wm-btn-close`,onClick:t,"aria-label":`Close`,children:`✕`})]})]}),e.provenance.illustrative&&(0,g.jsx)(`div`,{className:`wm-banner wm-banner-illustrative`,children:`Illustrative model — shows the shape, not your numbers.`}),!e.provenance.illustrative&&!C&&(0,g.jsx)(`div`,{className:`wm-banner wm-banner-qual`,children:`Structure only — no grounded figures, so causes are shown as relative strength, not exact contributions. Attach data or turn on search for weighted deltas.`}),(0,g.jsxs)(`div`,{className:`wm-body`,children:[(0,g.jsx)(`div`,{className:`wm-viewport`,ref:f.viewportRef,children:(0,g.jsxs)(`div`,{className:`wm-world`,style:{transform:f.transform,width:n.w,height:n.h},children:[(0,g.jsx)(`svg`,{className:`wm-edges`,width:n.w,height:n.h,"aria-hidden":`true`,children:e.edges.map((e,t)=>{let n=p.get(e.from),r=p.get(e.to);if(!n||!r)return null;let i=n.x+184/2,a=r.x-184/2,o=(i+a)/2,s=_(e.tier)&&typeof e.weight==`number`?2.5+e.weight*12:2.25,l=_(e.tier)&&typeof e.weight==`number`?.5+e.weight*.45:.6,u=e.sign===-1?`var(--warning)`:`var(--insight)`;return(0,g.jsx)(`path`,{d:`M ${i} ${n.y} C ${o} ${n.y} ${o} ${r.y} ${a} ${r.y}`,fill:`none`,stroke:u,strokeWidth:s,strokeOpacity:l,strokeDasharray:e.provisional?`4 5`:void 0,className:`wm-edge`,onClick:()=>c({kind:`edge`,edge:e})},e.id??`${e.from}-${e.to}-${t}`)})}),n.placed.map(({node:e,x:t,y:n})=>{let r=u.byNode.get(e.id),a=i.get(e.id)??1,o={left:t-184/2,top:n-76/2,width:184},s=e.role===`root`&&a===0;return(0,g.jsxs)(`div`,{className:`wm-node wm-role-${e.role} ${_(e.tier)?`wm-real`:`wm-t0`} ${s?`wm-pruned`:``}`,style:o,onClick:()=>c({kind:`node`,node:e}),role:`button`,tabIndex:0,onKeyDown:t=>t.key===`Enter`&&c({kind:`node`,node:e}),children:[(0,g.jsx)(`div`,{className:`wm-node-label`,children:e.label}),(0,g.jsxs)(`div`,{className:`wm-node-foot`,children:[(0,g.jsx)(`span`,{className:`wm-tier wm-tier-${e.tier}`,children:e.tier===`T1`?`your data`:e.tier===`T2`?e.receipt?.host||`web`:e.tier===`T3`?`illustrative`:`unverified`}),e.role===`outcome`&&T!==null&&(0,g.jsxs)(`span`,{className:`wm-node-val`,children:[w!==void 0&&T!==w?`${v(w)}→${v(T)}`:v(T),e.unit??``]}),e.role!==`outcome`&&e.value!==void 0&&(0,g.jsxs)(`span`,{className:`wm-node-val`,children:[v(e.value),e.unit??``]})]}),e.role===`root`&&(0,g.jsxs)(`div`,{className:`wm-lever`,role:`button`,tabIndex:0,onClick:e=>e.stopPropagation(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),e.stopPropagation())},children:[(0,g.jsx)(`button`,{type:`button`,className:`wm-prune ${s?`wm-prune-on`:``}`,onClick:()=>b(e.id,+!!s),title:s?`Restore this cause`:`Remove this cause`,children:s?`restore`:`remove`}),(0,g.jsx)(`input`,{type:`range`,min:0,max:100,value:Math.round(a*100),onChange:t=>b(e.id,Number(t.target.value)/100),"aria-label":`${e.label} strength`})]}),e.role!==`outcome`&&(C&&typeof r==`number`?(0,g.jsxs)(`div`,{className:`wm-contrib`,title:`share of the outcome this carries`,children:[Math.round(Math.abs(r)*100),`%`]}):(0,g.jsxs)(`div`,{className:`wm-contrib wm-contrib-rel`,title:`relative strength (structure only — not a measured contribution)`,children:[Math.round((u.relativeByNode.get(e.id)??0)*100),`%`]}))]},e.id)})]})}),(0,g.jsxs)(`aside`,{className:`wm-rail`,children:[(0,g.jsxs)(`div`,{className:`wm-conclusion`,children:[(0,g.jsx)(`span`,{className:`wm-rail-kicker`,children:`THE CONCLUSION, LIVE`}),(0,g.jsx)(`div`,{className:`wm-conclusion-val`,children:C&&T!==null?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`strong`,{children:[v(T),m?.unit??``]}),(0,g.jsx)(`span`,{className:`wm-conclusion-label`,children:m?.label})]}):D===null?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`strong`,{className:`wm-dash`,children:`—`}),(0,g.jsx)(`span`,{className:`wm-conclusion-label`,children:m?.label})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`strong`,{className:`wm-rel-pct`,children:[Math.round(D*100),(0,g.jsx)(`span`,{className:`wm-rel-pct-unit`,children:`%`})]}),(0,g.jsx)(`span`,{className:`wm-conclusion-label`,children:m?.label})]})}),C?(0,g.jsx)(`div`,{className:`wm-explained`,children:E}):D===null?(0,g.jsx)(`div`,{className:`wm-explained`,children:`—`}):(0,g.jsxs)(`div`,{className:`wm-rel`,children:[(0,g.jsx)(`div`,{className:`wm-rel-track`,"aria-hidden":`true`,children:(0,g.jsx)(`i`,{style:{width:`${Math.round(D*100)}%`}})}),(0,g.jsxs)(`span`,{className:`wm-rel-note`,children:[y(D),` · relative, not measured`]})]}),C&&(0,g.jsx)(`p`,{className:`wm-caveat`,children:`Isolated estimate — assumes the causes are independent.`})]}),(0,g.jsxs)(`div`,{className:`wm-evidence`,children:[(0,g.jsx)(`span`,{className:`wm-rail-kicker`,children:`EVIDENCE`}),!s&&(0,g.jsx)(`p`,{className:`wm-hint`,children:`Tap a cause or a link to see its receipt.`}),s?.kind===`node`&&(0,g.jsx)(x,{tier:s.node.tier,label:s.node.label,receipt:s.node.receipt}),s?.kind===`edge`&&(0,g.jsx)(x,{tier:s.edge.tier,label:s.edge.verb?`“${s.edge.verb}”`:`this link`,receipt:s.edge.receipt})]})]})]})]})})}function x(e){let t=(0,o.c)(20),{tier:n,label:r,receipt:a}=e;if(!_(n)||!a){let e;t[0]===r?e=t[1]:(e=(0,g.jsx)(`p`,{className:`wm-ev-label`,children:r}),t[0]=r,t[1]=e);let i=n===`T3`?`Illustrative — shows the shape, not a measured fact.`:`Mavéa's reading — no source, unverified.`,a;t[2]===i?a=t[3]:(a=(0,g.jsx)(`p`,{className:`wm-ev-unverified`,children:i}),t[2]=i,t[3]=a);let o;return t[4]!==e||t[5]!==a?(o=(0,g.jsxs)(`div`,{className:`wm-ev`,children:[e,a]}),t[4]=e,t[5]=a,t[6]=o):o=t[6],o}let s;t[7]===a.url?s=t[8]:(s=a.url?i(a.url):null,t[7]=a.url,t[8]=s);let c=s,l;t[9]===r?l=t[10]:(l=(0,g.jsx)(`p`,{className:`wm-ev-label`,children:r}),t[9]=r,t[10]=l);let u;t[11]===a.quote?u=t[12]:(u=(0,g.jsxs)(`blockquote`,{className:`wm-ev-quote`,children:[`“`,a.quote,`”`]}),t[11]=a.quote,t[12]=u);let d;t[13]!==a.host||t[14]!==c?(d=a.host&&(0,g.jsx)(`p`,{className:`wm-ev-src`,children:c?(0,g.jsx)(`a`,{href:c,target:`_blank`,rel:`noreferrer noopener`,children:a.host}):a.host}),t[13]=a.host,t[14]=c,t[15]=d):d=t[15];let f;return t[16]!==l||t[17]!==u||t[18]!==d?(f=(0,g.jsxs)(`div`,{className:`wm-ev`,children:[l,u,d]}),t[16]=l,t[17]=u,t[18]=d,t[19]=f):f=t[19],f}export{b as WhyMachineOverlay};
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-BlCH2LG4.js";import{t as r}from"./useSpatialCanvas-DZhSpnC6.js";import{r as i}from"./sourceHost-BV3t2XDb.js";var a=e(),o=n();function s(e){return e===`T1`||e===`T2`}var c=e=>e<0?0:e>1?1:e;function l(e){let t=new Set(e.nodes.map(e=>e.id)),n=new Map,r=new Map;for(let t of e.nodes)n.set(t.id,0),r.set(t.id,[]);for(let i of e.edges)!t.has(i.from)||!t.has(i.to)||i.from===i.to||(n.set(i.to,(n.get(i.to)??0)+1),r.get(i.from).push(i.to));let i=e.nodes.filter(e=>(n.get(e.id)??0)===0).map(e=>e.id),a=[];for(;i.length;){let e=i.shift();a.push(e);for(let t of r.get(e)??[])n.set(t,(n.get(t)??0)-1),n.get(t)===0&&i.push(t)}return a.length===e.nodes.length?a:null}function u(e){let t=e.nodes.find(t=>t.id===e.outcomeId);return!t||typeof t.value!=`number`||!Number.isFinite(t.value)||!s(t.tier)?!1:e.edges.length>0&&e.edges.every(e=>typeof e.weight==`number`&&Number.isFinite(e.weight)&&s(e.tier))}function d(e,t=[]){let n=l(e),r={byNode:new Map(e.nodes.map(e=>[e.id,null])),outcomeDelta:null,explainedPct:null,fullyGrounded:!1,relativeByNode:new Map(e.nodes.map(e=>[e.id,0])),relativeOutcome:null};if(!n)return r;let i=new Map;for(let e of t)e.nodeId&&i.set(e.nodeId,c(e.pct));let a=new Map;for(let t of e.edges)a.has(t.to)||a.set(t.to,[]),a.get(t.to).push(t);let o=e=>{let t=new Map;for(let r of n){let n=a.get(r)??[];if(n.length===0){t.set(r,e.get(r)??1);continue}let i=0,o=!0;for(let e of n){let n=t.get(e.from);if(n==null||typeof e.weight!=`number`){o=!1;break}i+=e.sign*e.weight*n}t.set(r,o?i:null)}return t},s=o(i),d=new Map(e.nodes.map(e=>[e.id,s.get(e.id)??null])),f=new Map;for(let e of n){let t=a.get(e)??[];if(t.length===0){f.set(e,c(i.get(e)??1));continue}let n=0;for(let e of t)n+=e.sign*(f.get(e.from)??0);f.set(e,c(n/t.length))}let p=new Map(e.nodes.map(e=>[e.id,f.get(e.id)??0])),m=f.has(e.outcomeId)?f.get(e.outcomeId):null;if(!u(e))return{byNode:d,outcomeDelta:null,explainedPct:null,fullyGrounded:!1,relativeByNode:p,relativeOutcome:m};let h=o(new Map),g=e.nodes.find(t=>t.id===e.outcomeId).value,_=s.get(e.outcomeId),v=h.get(e.outcomeId);return{byNode:d,outcomeDelta:_!=null&&v!=null?(_-v)*g:null,explainedPct:_??null,fullyGrounded:!0,relativeByNode:p,relativeOutcome:m}}var f=268,p=112,m=90;function h(e){let t=new Map(e.nodes.map(e=>[e.id,e])),n=e=>Number.isFinite(e.depth)?e.depth:e.role===`root`?0:e.role===`mechanism`?1:2,r=[...new Set(e.nodes.map(n))].sort((e,t)=>e-t),i=new Map;for(let n of e.edges)!t.has(n.from)||!t.has(n.to)||(i.has(n.to)||i.set(n.to,[]),i.get(n.to).push(n.from));let a=new Map,o=[];r.forEach((t,r)=>{let s=e.nodes.filter(e=>n(e)===t).map((e,t)=>{let n=(i.get(e.id)??[]).map(e=>a.get(e)).filter(e=>e!==void 0);return{n:e,bary:n.length?n.reduce((e,t)=>e+t,0)/n.length:t*p,i:t}});s.sort((e,t)=>e.bary-t.bary||e.n.id.localeCompare(t.n.id));let c=s.length;s.forEach((e,t)=>{let n=(t-(c-1)/2)*p;a.set(e.n.id,n),o.push({node:e.n,x:r*f,y:n})})});let s=1/0,c=1/0,l=-1/0,u=-1/0;for(let e of o)s=Math.min(s,e.x-184/2),c=Math.min(c,e.y-76/2),l=Math.max(l,e.x+184/2),u=Math.max(u,e.y+76/2);let d=m-s,h=m-c;for(let e of o)e.x+=d,e.y+=h;let g=l-s+m*2,_=u-c+m*2;return{placed:o,w:g,h:_,bbox:{x:0,y:0,w:g,h:_}}}var g=t(),_=e=>e===`T1`||e===`T2`,v=e=>Number.isInteger(e)?String(e):e.toFixed(1),y=e=>e>=.66?`Strong relative support`:e>=.33?`Moderate relative support`:e>0?`Weak relative support`:`No active support`;function b({dag:e,onClose:t}){let n=(0,a.useMemo)(()=>h(e),[e]),[i,o]=(0,a.useState)(new Map),[s,c]=(0,a.useState)(null),l=(0,a.useMemo)(()=>[...i.entries()].map(([e,t])=>({nodeId:e,pct:t})),[i]),u=(0,a.useMemo)(()=>d(e,l),[e,l]),f=r({clamp:{min:.35,max:1.7},margin:64});(0,a.useMemo)(()=>(f.fitTo(n.bbox),e),[e,n]);let p=(0,a.useMemo)(()=>{let e=new Map;for(let t of n.placed)e.set(t.node.id,{x:t.x,y:t.y});return e},[n]),m=e.nodes.find(t=>t.id===e.outcomeId),b=(e,t)=>o(n=>new Map(n).set(e,t)),S=()=>o(new Map),C=u.fullyGrounded,w=m?.value,T=C&&w!==void 0&&u.outcomeDelta!==null?w+u.outcomeDelta:null,E=C&&u.explainedPct!==null?`${Math.round(u.explainedPct*100)}% explained`:`—`,D=u.relativeOutcome;return(0,g.jsx)(`div`,{className:`wm-scrim`,role:`dialog`,"aria-label":`Why machine`,"aria-modal":`true`,children:(0,g.jsxs)(`div`,{className:`wm-panel`,role:`presentation`,onClick:e=>e.stopPropagation(),children:[(0,g.jsxs)(`header`,{className:`wm-head`,children:[(0,g.jsxs)(`div`,{className:`wm-title`,children:[(0,g.jsx)(`span`,{className:`wm-kicker`,children:`THE WHY MACHINE`}),(0,g.jsx)(`h2`,{children:e.center})]}),(0,g.jsxs)(`div`,{className:`wm-head-actions`,children:[(0,g.jsx)(`button`,{type:`button`,className:`wm-btn`,onClick:S,disabled:i.size===0,children:`Reset`}),t&&(0,g.jsx)(`button`,{type:`button`,className:`wm-btn wm-btn-close`,onClick:t,"aria-label":`Close`,children:`✕`})]})]}),e.provenance.illustrative&&(0,g.jsx)(`div`,{className:`wm-banner wm-banner-illustrative`,children:`Illustrative model — shows the shape, not your numbers.`}),!e.provenance.illustrative&&!C&&(0,g.jsx)(`div`,{className:`wm-banner wm-banner-qual`,children:`Structure only — no grounded figures, so causes are shown as relative strength, not exact contributions. Attach data or turn on search for weighted deltas.`}),(0,g.jsxs)(`div`,{className:`wm-body`,children:[(0,g.jsx)(`div`,{className:`wm-viewport`,ref:f.viewportRef,children:(0,g.jsxs)(`div`,{className:`wm-world`,style:{transform:f.transform,width:n.w,height:n.h},children:[(0,g.jsx)(`svg`,{className:`wm-edges`,width:n.w,height:n.h,"aria-hidden":`true`,children:e.edges.map((e,t)=>{let n=p.get(e.from),r=p.get(e.to);if(!n||!r)return null;let i=n.x+184/2,a=r.x-184/2,o=(i+a)/2,s=_(e.tier)&&typeof e.weight==`number`?2.5+e.weight*12:2.25,l=_(e.tier)&&typeof e.weight==`number`?.5+e.weight*.45:.6,u=e.sign===-1?`var(--warning)`:`var(--insight)`;return(0,g.jsx)(`path`,{d:`M ${i} ${n.y} C ${o} ${n.y} ${o} ${r.y} ${a} ${r.y}`,fill:`none`,stroke:u,strokeWidth:s,strokeOpacity:l,strokeDasharray:e.provisional?`4 5`:void 0,className:`wm-edge`,onClick:()=>c({kind:`edge`,edge:e})},e.id??`${e.from}-${e.to}-${t}`)})}),n.placed.map(({node:e,x:t,y:n})=>{let r=u.byNode.get(e.id),a=i.get(e.id)??1,o={left:t-184/2,top:n-76/2,width:184},s=e.role===`root`&&a===0;return(0,g.jsxs)(`div`,{className:`wm-node wm-role-${e.role} ${_(e.tier)?`wm-real`:`wm-t0`} ${s?`wm-pruned`:``}`,style:o,onClick:()=>c({kind:`node`,node:e}),role:`button`,tabIndex:0,onKeyDown:t=>t.key===`Enter`&&c({kind:`node`,node:e}),children:[(0,g.jsx)(`div`,{className:`wm-node-label`,children:e.label}),(0,g.jsxs)(`div`,{className:`wm-node-foot`,children:[(0,g.jsx)(`span`,{className:`wm-tier wm-tier-${e.tier}`,children:e.tier===`T1`?`your data`:e.tier===`T2`?e.receipt?.host||`web`:e.tier===`T3`?`illustrative`:`unverified`}),e.role===`outcome`&&T!==null&&(0,g.jsxs)(`span`,{className:`wm-node-val`,children:[w!==void 0&&T!==w?`${v(w)}→${v(T)}`:v(T),e.unit??``]}),e.role!==`outcome`&&e.value!==void 0&&(0,g.jsxs)(`span`,{className:`wm-node-val`,children:[v(e.value),e.unit??``]})]}),e.role===`root`&&(0,g.jsxs)(`div`,{className:`wm-lever`,role:`button`,tabIndex:0,onClick:e=>e.stopPropagation(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),e.stopPropagation())},children:[(0,g.jsx)(`button`,{type:`button`,className:`wm-prune ${s?`wm-prune-on`:``}`,onClick:()=>b(e.id,+!!s),title:s?`Restore this cause`:`Remove this cause`,children:s?`restore`:`remove`}),(0,g.jsx)(`input`,{type:`range`,min:0,max:100,value:Math.round(a*100),onChange:t=>b(e.id,Number(t.target.value)/100),"aria-label":`${e.label} strength`})]}),e.role!==`outcome`&&(C&&typeof r==`number`?(0,g.jsxs)(`div`,{className:`wm-contrib`,title:`share of the outcome this carries`,children:[Math.round(Math.abs(r)*100),`%`]}):(0,g.jsxs)(`div`,{className:`wm-contrib wm-contrib-rel`,title:`relative strength (structure only — not a measured contribution)`,children:[Math.round((u.relativeByNode.get(e.id)??0)*100),`%`]}))]},e.id)})]})}),(0,g.jsxs)(`aside`,{className:`wm-rail`,children:[(0,g.jsxs)(`div`,{className:`wm-conclusion`,children:[(0,g.jsx)(`span`,{className:`wm-rail-kicker`,children:`THE CONCLUSION, LIVE`}),(0,g.jsx)(`div`,{className:`wm-conclusion-val`,children:C&&T!==null?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`strong`,{children:[v(T),m?.unit??``]}),(0,g.jsx)(`span`,{className:`wm-conclusion-label`,children:m?.label})]}):D===null?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`strong`,{className:`wm-dash`,children:`—`}),(0,g.jsx)(`span`,{className:`wm-conclusion-label`,children:m?.label})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`strong`,{className:`wm-rel-pct`,children:[Math.round(D*100),(0,g.jsx)(`span`,{className:`wm-rel-pct-unit`,children:`%`})]}),(0,g.jsx)(`span`,{className:`wm-conclusion-label`,children:m?.label})]})}),C?(0,g.jsx)(`div`,{className:`wm-explained`,children:E}):D===null?(0,g.jsx)(`div`,{className:`wm-explained`,children:`—`}):(0,g.jsxs)(`div`,{className:`wm-rel`,children:[(0,g.jsx)(`div`,{className:`wm-rel-track`,"aria-hidden":`true`,children:(0,g.jsx)(`i`,{style:{width:`${Math.round(D*100)}%`}})}),(0,g.jsxs)(`span`,{className:`wm-rel-note`,children:[y(D),` · relative, not measured`]})]}),C&&(0,g.jsx)(`p`,{className:`wm-caveat`,children:`Isolated estimate — assumes the causes are independent.`})]}),(0,g.jsxs)(`div`,{className:`wm-evidence`,children:[(0,g.jsx)(`span`,{className:`wm-rail-kicker`,children:`EVIDENCE`}),!s&&(0,g.jsx)(`p`,{className:`wm-hint`,children:`Tap a cause or a link to see its receipt.`}),s?.kind===`node`&&(0,g.jsx)(x,{tier:s.node.tier,label:s.node.label,receipt:s.node.receipt}),s?.kind===`edge`&&(0,g.jsx)(x,{tier:s.edge.tier,label:s.edge.verb?`“${s.edge.verb}”`:`this link`,receipt:s.edge.receipt})]})]})]})]})})}function x(e){let t=(0,o.c)(20),{tier:n,label:r,receipt:a}=e;if(!_(n)||!a){let e;t[0]===r?e=t[1]:(e=(0,g.jsx)(`p`,{className:`wm-ev-label`,children:r}),t[0]=r,t[1]=e);let i=n===`T3`?`Illustrative — shows the shape, not a measured fact.`:`Mavéa's reading — no source, unverified.`,a;t[2]===i?a=t[3]:(a=(0,g.jsx)(`p`,{className:`wm-ev-unverified`,children:i}),t[2]=i,t[3]=a);let o;return t[4]!==e||t[5]!==a?(o=(0,g.jsxs)(`div`,{className:`wm-ev`,children:[e,a]}),t[4]=e,t[5]=a,t[6]=o):o=t[6],o}let s;t[7]===a.url?s=t[8]:(s=a.url?i(a.url):null,t[7]=a.url,t[8]=s);let c=s,l;t[9]===r?l=t[10]:(l=(0,g.jsx)(`p`,{className:`wm-ev-label`,children:r}),t[9]=r,t[10]=l);let u;t[11]===a.quote?u=t[12]:(u=(0,g.jsxs)(`blockquote`,{className:`wm-ev-quote`,children:[`“`,a.quote,`”`]}),t[11]=a.quote,t[12]=u);let d;t[13]!==a.host||t[14]!==c?(d=a.host&&(0,g.jsx)(`p`,{className:`wm-ev-src`,children:c?(0,g.jsx)(`a`,{href:c,target:`_blank`,rel:`noreferrer noopener`,children:a.host}):a.host}),t[13]=a.host,t[14]=c,t[15]=d):d=t[15];let f;return t[16]!==l||t[17]!==u||t[18]!==d?(f=(0,g.jsxs)(`div`,{className:`wm-ev`,children:[l,u,d]}),t[16]=l,t[17]=u,t[18]=d,t[19]=f):f=t[19],f}export{b as WhyMachineOverlay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t,ut as n}from"./index-y8GL67bB.js";import{t as r}from"./Orb-B0NEVfqL.js";var i=t(),a=e();function o(e){let t=(0,i.c)(17),{reverse:n,eyebrow:r,eyebrowTone:o,title:s,body:c,visual:l}=e,u=`fl-panel`+(n?` reverse`:``),d=`fl-panel-eyebrow tone-`+o,f;t[0]!==r||t[1]!==d?(f=(0,a.jsx)(`div`,{className:d,children:r}),t[0]=r,t[1]=d,t[2]=f):f=t[2];let p;t[3]===s?p=t[4]:(p=(0,a.jsx)(`h3`,{className:`fl-panel-title`,children:s}),t[3]=s,t[4]=p);let m;t[5]===c?m=t[6]:(m=(0,a.jsx)(`p`,{className:`fl-panel-body`,children:c}),t[5]=c,t[6]=m);let h;t[7]!==f||t[8]!==p||t[9]!==m?(h=(0,a.jsxs)(`div`,{className:`fl-panel-copy`,children:[f,p,m]}),t[7]=f,t[8]=p,t[9]=m,t[10]=h):h=t[10];let g;t[11]===l?g=t[12]:(g=(0,a.jsx)(`div`,{className:`fl-panel-visual`,children:l}),t[11]=l,t[12]=g);let _;return t[13]!==u||t[14]!==h||t[15]!==g?(_=(0,a.jsxs)(`div`,{className:u,children:[h,g]}),t[13]=u,t[14]=h,t[15]=g,t[16]=_):_=t[16],_}var s=[`46%`,`52%`,`50%`,`58%`,`74%`,`100%`],c=[[24,72],[98,98],[173,116],[247,98],[322,66],[396,36]],l=[`Q1`,`Q2`,`Q3`,`Q4`,`Q5`,`Q6`];function u(){let e=(0,i.c)(12),t,n,r,o,s,u,m,h,g;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)){let i=c.map(p).join(` `);u=`fl-card fl-pen`,m=(0,a.jsxs)(`div`,{className:`fl-pen-head`,children:[(0,a.jsx)(`span`,{className:`fl-ink-label`,children:`Revenue · the road back`}),(0,a.jsxs)(`span`,{className:`fl-pen-value`,children:[`$4.2M`,(0,a.jsx)(`i`,{className:`fl-pen-delta`,children:`▲ recovering`})]})]}),t=`fl-pen-plot`,n=`0 0 420 184`,r=`true`,o=(0,a.jsx)(`defs`,{children:(0,a.jsxs)(`linearGradient`,{id:`fl-pen-fill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,a.jsx)(`stop`,{offset:`0`,className:`fl-pen-fill-top`}),(0,a.jsx)(`stop`,{offset:`1`,className:`fl-pen-fill-bot`})]})}),s=(0,a.jsxs)(`g`,{className:`fl-pen-grid`,children:[(0,a.jsx)(`line`,{x1:`24`,y1:`48`,x2:`396`,y2:`48`}),(0,a.jsx)(`line`,{x1:`24`,y1:`84`,x2:`396`,y2:`84`}),(0,a.jsx)(`line`,{x1:`24`,y1:`120`,x2:`396`,y2:`120`}),(0,a.jsx)(`line`,{x1:`24`,y1:`150`,x2:`396`,y2:`150`,className:`base`})]}),h=(0,a.jsx)(`path`,{className:`fl-pen-area`,d:`M${i.replace(/ /g,` L`)} L396,150 L24,150 Z`}),g=(0,a.jsx)(`polyline`,{className:`fl-pen-line`,points:i}),e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=u,e[6]=m,e[7]=h,e[8]=g}else t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],u=e[5],m=e[6],h=e[7],g=e[8];let _;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,a.jsx)(`g`,{className:`fl-pen-dots`,children:c.map(f)}),e[9]=_):_=e[9];let v;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,a.jsxs)(`svg`,{className:t,viewBox:n,"aria-hidden":r,children:[o,s,h,g,_,(0,a.jsx)(`g`,{className:`fl-pen-axis`,children:l.map(d)}),(0,a.jsx)(`path`,{className:`fl-pen-trend`,pathLength:1,d:`M166,126 C232,122 300,86 384,44 M384,44 l-13,1 m13,-1 l-3,12`}),(0,a.jsx)(`path`,{className:`fl-pen-star`,pathLength:1,d:`M396,18 L399,26 L407,26 L401,32 L403,40 L396,35 L389,40 L391,32 L385,26 L393,26 Z`})]}),e[10]=v):v=e[10];let y;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,a.jsxs)(`div`,{className:u,children:[m,v,(0,a.jsxs)(`div`,{className:`fl-pen-options`,children:[(0,a.jsxs)(`span`,{className:`fl-pen-chip`,children:[`Cut marketing`,(0,a.jsx)(`svg`,{viewBox:`0 0 120 26`,preserveAspectRatio:`none`,"aria-hidden":`true`,className:`fl-pen-strike`,children:(0,a.jsx)(`path`,{pathLength:1,d:`M5,15 C34,10 74,18 115,10`})})]}),(0,a.jsx)(`span`,{className:`fl-pen-chip kept`,children:`Raise prices ✓`})]})]}),e[11]=y):y=e[11],y}function d(e,t){return(0,a.jsx)(`text`,{x:c[t][0],y:`172`,children:e},e)}function f(e,t){let[n,r]=e;return(0,a.jsx)(`circle`,{cx:n,cy:r,r:`3.2`},t)}function p(e){let[t,n]=e;return`${t},${n}`}var m=[{id:`bars`,d:`M6,26 V14 M14,26 V6 M22,26 V18`,label:`chart`},{id:`line`,d:`M4,24 L11,14 L18,18 L26,6`,label:`trend`},{id:`donut`,d:`M14,4 A10,10 0 1 1 4,14`,label:`share`},{id:`pin`,d:`M14,4 a8,8 0 0 1 8,8 c0,6 -8,14 -8,14 s-8,-8 -8,-14 a8,8 0 0 1 8,-8`,label:`map`},{id:`steps`,d:`M4,24 H12 V16 H20 V8 H26`,label:`timeline`},{id:`net`,d:`M6,22 L14,8 L24,20 M6,22 L24,20`,label:`network`},{id:`gauge`,d:`M4,22 A11,11 0 0 1 26,22 M15,22 L21,12`,label:`gauge`},{id:`rows`,d:`M5,8 H25 M5,15 H25 M5,22 H17`,label:`table`}];function h(){return(0,a.jsx)(`div`,{className:`fl-card fl-instruments`,children:m.map((e,t)=>(0,a.jsxs)(`span`,{className:`fl-instrument`,style:{"--in-i":String(t)},children:[(0,a.jsx)(`svg`,{viewBox:`0 0 30 30`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:e.d})}),e.label]},e.id))})}function g(){let e=(0,i.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`div`,{className:`fl-ink-label`,children:`Revenue · last 6 quarters`}),e[0]=t):t=e[0];let n,r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsx)(`div`,{className:`fl-ink-bars`,children:s.map(_)}),r=(0,a.jsx)(`span`,{className:`fl-hl-sweep`}),e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,a.jsxs)(`div`,{className:`fl-card fl-ink`,children:[t,(0,a.jsxs)(`div`,{className:`fl-ink-plot`,children:[n,r,(0,a.jsxs)(`span`,{className:`fl-hl-chip`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`})}),`Ask about this`]})]})]}),e[3]=o):o=e[3],o}function _(e,t){return(0,a.jsx)(`div`,{className:`fl-ink-barcol`,children:(0,a.jsx)(`div`,{className:`fl-ink-bar`+(e===`100%`?` peak`:``),style:{height:e}})},t)}function v(){return(0,a.jsxs)(`div`,{className:`fl-card fl-ghostwrap`,children:[(0,a.jsxs)(`div`,{className:`fl-ghost-said`,children:[(0,a.jsx)(`span`,{className:`fl-wave`,"aria-hidden":`true`,children:Array.from({length:12},(e,t)=>(0,a.jsx)(`i`,{style:{"--i":String(t)}},t))}),(0,a.jsxs)(`span`,{className:`fl-ghost-words`,children:[`“…and how does that compare to last year, and`,(0,a.jsx)(`span`,{className:`fl-caret`}),`”`]})]}),(0,a.jsxs)(`div`,{className:`fl-ghost-cards`,children:[(0,a.jsxs)(`div`,{className:`fl-ghost`,children:[(0,a.jsx)(`div`,{className:`fl-ghost-tag`,children:`Forming…`}),(0,a.jsxs)(`div`,{className:`fl-ghost-bars`,children:[(0,a.jsx)(`i`,{style:{height:`50%`}}),(0,a.jsx)(`i`,{style:{height:`80%`}}),(0,a.jsx)(`i`,{style:{height:`65%`}})]})]}),(0,a.jsxs)(`div`,{className:`fl-ghost delay`,children:[(0,a.jsx)(`div`,{className:`fl-ghost-tag`,children:`Forming…`}),(0,a.jsx)(`svg`,{viewBox:`0 0 120 50`,"aria-hidden":`true`,children:(0,a.jsx)(`polyline`,{points:`0,42 24,30 48,34 72,18 96,22 120,8`})})]})]})]})}var y=[{label:`Runway: 14mo`,meta:`4×`,x:92,y:52,tone:`blue`},{label:`Hiring freeze`,meta:`a worry`,x:86,y:200,tone:`amber`},{label:`Ship velocity`,meta:`slowing`,x:300,y:204,tone:`amber`},{label:`Churn signal`,meta:`watch`,x:300,y:50,tone:`pink`},{label:`Pricing`,meta:`your idea`,x:206,y:226,tone:`green`}],b=[[0,3],[3,2],[1,4],[4,2],[0,1]];function x(){let e=(0,i.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`svg`,{className:`fl-mindmap-links`,viewBox:`0 0 420 264`,"aria-hidden":`true`,children:b.map(C)}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsxs)(`div`,{className:`fl-card fl-mindmap`,children:[t,(0,a.jsx)(`div`,{className:`fl-mindmap-hub`,children:(0,a.jsx)(r,{size:46})}),y.map(S)]}),e[1]=n):n=e[1],n}function S(e){return(0,a.jsxs)(`div`,{className:`fl-node tone-`+e.tone,style:{left:`${e.x/420*100}%`,top:`${e.y/264*100}%`},children:[(0,a.jsx)(`div`,{className:`fl-node-label`,children:e.label}),(0,a.jsx)(`div`,{className:`fl-node-meta`,children:e.meta})]},e.label)}function C(e,t){let[n,r]=e,i=y[n],o=y[r],s=(i.x+o.x)/2,c=(i.y+o.y)/2-20;return(0,a.jsx)(`path`,{d:`M${i.x},${i.y} Q${s},${c} ${o.x},${o.y}`},t)}var w=[{icon:`⌨`,label:`Type it`},{icon:`🎙`,label:`Say it`},{icon:`▦`,label:`Drag a card`}];function T(){let e=(0,i.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`span`,{className:`fl-blank-num good`,children:`$2.1M`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsxs)(`span`,{className:`fl-blank-hole`,children:[`your burn / mo`,(0,a.jsx)(`span`,{className:`fl-caret`})]}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsxs)(`div`,{className:`fl-blank-sentence`,children:[`With `,t,` in the bank and a burn of`,` `,n,`, your runway is `,(0,a.jsx)(`span`,{className:`fl-blank-pending`,children:`— months`}),`.`]}),e[2]=r):r=e[2];let o;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,a.jsxs)(`div`,{className:`fl-card fl-blank`,children:[r,(0,a.jsx)(`div`,{className:`fl-blank-options`,"aria-hidden":`true`,children:w.map(E)})]}),e[3]=o):o=e[3],o}function E(e){return(0,a.jsxs)(`span`,{className:`fl-blank-btn`,children:[(0,a.jsx)(`span`,{className:`fl-blank-icon`,children:e.icon}),e.label]},e.label)}var D=[`“ARR climbed to $15.1M — up 21%.”`,`“The trend held steady all quarter.”`,`“North America still leads, at 54%.”`];function O(){return(0,a.jsxs)(`div`,{className:`fl-card fl-walk`,children:[(0,a.jsx)(`div`,{className:`fl-ink-label`,children:`Q3 revenue · read to you`}),(0,a.jsxs)(`div`,{className:`fl-walk-stage`,children:[(0,a.jsxs)(`div`,{className:`fl-walk-presenter`,children:[(0,a.jsx)(r,{size:44,className:`fl-walk-orb`}),(0,a.jsxs)(`div`,{className:`fl-walk-say`,children:[(0,a.jsx)(`span`,{className:`fl-wave`,"aria-hidden":`true`,children:Array.from({length:8},(e,t)=>(0,a.jsx)(`i`,{style:{"--i":String(t)}},t))}),(0,a.jsx)(`span`,{className:`fl-walk-caps`,children:D.map((e,t)=>(0,a.jsx)(`span`,{className:`fl-walk-line l${t+1}`,children:e},e))})]})]}),(0,a.jsxs)(`div`,{className:`fl-walk-items`,children:[(0,a.jsxs)(`div`,{className:`fl-walk-item`,children:[(0,a.jsx)(`span`,{className:`fl-walk-k`,children:`ARR`}),(0,a.jsx)(`span`,{className:`fl-walk-v`,children:`$15.1M`}),(0,a.jsx)(`span`,{className:`fl-walk-up`,children:`▲ 21%`})]}),(0,a.jsx)(`div`,{className:`fl-walk-item`,children:(0,a.jsx)(`svg`,{className:`fl-walk-spark`,viewBox:`0 0 120 26`,"aria-hidden":`true`,children:(0,a.jsx)(`polyline`,{points:`2,20 22,17 42,19 62,11 82,13 100,6 118,3`})})}),(0,a.jsxs)(`div`,{className:`fl-walk-item`,children:[(0,a.jsx)(`span`,{className:`fl-walk-k`,children:`N. America`}),(0,a.jsx)(`span`,{className:`fl-walk-v`,children:`54%`})]}),(0,a.jsx)(`span`,{className:`fl-walk-spot`,"aria-hidden":`true`})]})]})]})}function k(){let e=(0,i.c)(8),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsxs)(n,{eyebrow:`Things a chat window can’t do`,children:[`It’s a `,(0,a.jsx)(`em`,{children:`friend at the whiteboard.`})]}),e[0]=t):t=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsx)(o,{eyebrow:`Highlight is the interface`,eyebrowTone:`presence`,title:`Highlight the answer to ask.`,body:`Drag across a bar, a row, a figure — the highlight grabs exactly what’s under it, and your next question is grounded on that piece, not the whole answer.`,visual:(0,a.jsx)(g,{})}),e[1]=r):r=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,a.jsx)(o,{reverse:!0,eyebrow:`And the pen is in its hand`,eyebrowTone:`amber`,title:`It draws on its own answers.`,body:`A trend arrow along the recovery, a star on the number that matters, a strike through the option it rules out — the whiteboard marks a good teacher leaves.`,visual:(0,a.jsx)(u,{})}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,a.jsx)(o,{eyebrow:`It answers while you talk`,eyebrowTone:`blue`,title:`The answer forms mid-sentence.`,body:`Dashed “ghost” cards sketch the answer taking shape behind your words — and reshape live as your question turns. You see it thinking with you, not after you.`,visual:(0,a.jsx)(v,{})}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,a.jsx)(o,{reverse:!0,eyebrow:`Watch it map your thinking`,eyebrowTone:`green`,title:`Ramble. Get a map of your mind.`,body:`Themes emerge from what you actually said — never fixed buckets — with the tensions between them drawn in. A minute of talking becomes a structure you can see.`,visual:(0,a.jsx)(x,{})}),e[4]=l):l=e[4];let d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,a.jsx)(o,{eyebrow:`The Blank Space`,eyebrowTone:`pink`,title:`It won’t guess. It leaves a space.`,body:`When an answer needs a number only you have, Mavéa leaves a glowing hole to fill — type it, say it, or drag a card in. Uncertainty, made honest and interactive.`,visual:(0,a.jsx)(T,{})}),e[5]=d):d=e[5];let f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,a.jsx)(o,{reverse:!0,eyebrow:`One canvas, many instruments`,eyebrowTone:`presence`,title:`The answer picks its shape.`,body:`Charts, maps, timelines, networks, tables — hundreds of visual instruments on one canvas, and each answer reaches for the ones that fit.`,visual:(0,a.jsx)(h,{})}),e[6]=f):f=e[6];let p;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,a.jsxs)(a.Fragment,{children:[t,(0,a.jsxs)(`div`,{className:`fl-panels`,children:[r,s,c,l,d,f,(0,a.jsx)(o,{eyebrow:`It reads the answer to you`,eyebrowTone:`presence`,title:`It points, and talks you through.`,body:`Mavéa doesn’t drop a wall of cards and leave. It spotlights each part and speaks to it — walking you through the answer a piece at a time, the way a friend at the whiteboard would.`,visual:(0,a.jsx)(O,{})})]})]}),e[7]=p):p=e[7],p}export{k as WowFeatures};
|
|
1
|
+
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t,ut as n}from"./index-BlCH2LG4.js";import{t as r}from"./Orb-B0NEVfqL.js";var i=t(),a=e();function o(e){let t=(0,i.c)(17),{reverse:n,eyebrow:r,eyebrowTone:o,title:s,body:c,visual:l}=e,u=`fl-panel`+(n?` reverse`:``),d=`fl-panel-eyebrow tone-`+o,f;t[0]!==r||t[1]!==d?(f=(0,a.jsx)(`div`,{className:d,children:r}),t[0]=r,t[1]=d,t[2]=f):f=t[2];let p;t[3]===s?p=t[4]:(p=(0,a.jsx)(`h3`,{className:`fl-panel-title`,children:s}),t[3]=s,t[4]=p);let m;t[5]===c?m=t[6]:(m=(0,a.jsx)(`p`,{className:`fl-panel-body`,children:c}),t[5]=c,t[6]=m);let h;t[7]!==f||t[8]!==p||t[9]!==m?(h=(0,a.jsxs)(`div`,{className:`fl-panel-copy`,children:[f,p,m]}),t[7]=f,t[8]=p,t[9]=m,t[10]=h):h=t[10];let g;t[11]===l?g=t[12]:(g=(0,a.jsx)(`div`,{className:`fl-panel-visual`,children:l}),t[11]=l,t[12]=g);let _;return t[13]!==u||t[14]!==h||t[15]!==g?(_=(0,a.jsxs)(`div`,{className:u,children:[h,g]}),t[13]=u,t[14]=h,t[15]=g,t[16]=_):_=t[16],_}var s=[`46%`,`52%`,`50%`,`58%`,`74%`,`100%`],c=[[24,72],[98,98],[173,116],[247,98],[322,66],[396,36]],l=[`Q1`,`Q2`,`Q3`,`Q4`,`Q5`,`Q6`];function u(){let e=(0,i.c)(12),t,n,r,o,s,u,m,h,g;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)){let i=c.map(p).join(` `);u=`fl-card fl-pen`,m=(0,a.jsxs)(`div`,{className:`fl-pen-head`,children:[(0,a.jsx)(`span`,{className:`fl-ink-label`,children:`Revenue · the road back`}),(0,a.jsxs)(`span`,{className:`fl-pen-value`,children:[`$4.2M`,(0,a.jsx)(`i`,{className:`fl-pen-delta`,children:`▲ recovering`})]})]}),t=`fl-pen-plot`,n=`0 0 420 184`,r=`true`,o=(0,a.jsx)(`defs`,{children:(0,a.jsxs)(`linearGradient`,{id:`fl-pen-fill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,a.jsx)(`stop`,{offset:`0`,className:`fl-pen-fill-top`}),(0,a.jsx)(`stop`,{offset:`1`,className:`fl-pen-fill-bot`})]})}),s=(0,a.jsxs)(`g`,{className:`fl-pen-grid`,children:[(0,a.jsx)(`line`,{x1:`24`,y1:`48`,x2:`396`,y2:`48`}),(0,a.jsx)(`line`,{x1:`24`,y1:`84`,x2:`396`,y2:`84`}),(0,a.jsx)(`line`,{x1:`24`,y1:`120`,x2:`396`,y2:`120`}),(0,a.jsx)(`line`,{x1:`24`,y1:`150`,x2:`396`,y2:`150`,className:`base`})]}),h=(0,a.jsx)(`path`,{className:`fl-pen-area`,d:`M${i.replace(/ /g,` L`)} L396,150 L24,150 Z`}),g=(0,a.jsx)(`polyline`,{className:`fl-pen-line`,points:i}),e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=s,e[5]=u,e[6]=m,e[7]=h,e[8]=g}else t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],u=e[5],m=e[6],h=e[7],g=e[8];let _;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,a.jsx)(`g`,{className:`fl-pen-dots`,children:c.map(f)}),e[9]=_):_=e[9];let v;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,a.jsxs)(`svg`,{className:t,viewBox:n,"aria-hidden":r,children:[o,s,h,g,_,(0,a.jsx)(`g`,{className:`fl-pen-axis`,children:l.map(d)}),(0,a.jsx)(`path`,{className:`fl-pen-trend`,pathLength:1,d:`M166,126 C232,122 300,86 384,44 M384,44 l-13,1 m13,-1 l-3,12`}),(0,a.jsx)(`path`,{className:`fl-pen-star`,pathLength:1,d:`M396,18 L399,26 L407,26 L401,32 L403,40 L396,35 L389,40 L391,32 L385,26 L393,26 Z`})]}),e[10]=v):v=e[10];let y;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,a.jsxs)(`div`,{className:u,children:[m,v,(0,a.jsxs)(`div`,{className:`fl-pen-options`,children:[(0,a.jsxs)(`span`,{className:`fl-pen-chip`,children:[`Cut marketing`,(0,a.jsx)(`svg`,{viewBox:`0 0 120 26`,preserveAspectRatio:`none`,"aria-hidden":`true`,className:`fl-pen-strike`,children:(0,a.jsx)(`path`,{pathLength:1,d:`M5,15 C34,10 74,18 115,10`})})]}),(0,a.jsx)(`span`,{className:`fl-pen-chip kept`,children:`Raise prices ✓`})]})]}),e[11]=y):y=e[11],y}function d(e,t){return(0,a.jsx)(`text`,{x:c[t][0],y:`172`,children:e},e)}function f(e,t){let[n,r]=e;return(0,a.jsx)(`circle`,{cx:n,cy:r,r:`3.2`},t)}function p(e){let[t,n]=e;return`${t},${n}`}var m=[{id:`bars`,d:`M6,26 V14 M14,26 V6 M22,26 V18`,label:`chart`},{id:`line`,d:`M4,24 L11,14 L18,18 L26,6`,label:`trend`},{id:`donut`,d:`M14,4 A10,10 0 1 1 4,14`,label:`share`},{id:`pin`,d:`M14,4 a8,8 0 0 1 8,8 c0,6 -8,14 -8,14 s-8,-8 -8,-14 a8,8 0 0 1 8,-8`,label:`map`},{id:`steps`,d:`M4,24 H12 V16 H20 V8 H26`,label:`timeline`},{id:`net`,d:`M6,22 L14,8 L24,20 M6,22 L24,20`,label:`network`},{id:`gauge`,d:`M4,22 A11,11 0 0 1 26,22 M15,22 L21,12`,label:`gauge`},{id:`rows`,d:`M5,8 H25 M5,15 H25 M5,22 H17`,label:`table`}];function h(){return(0,a.jsx)(`div`,{className:`fl-card fl-instruments`,children:m.map((e,t)=>(0,a.jsxs)(`span`,{className:`fl-instrument`,style:{"--in-i":String(t)},children:[(0,a.jsx)(`svg`,{viewBox:`0 0 30 30`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:e.d})}),e.label]},e.id))})}function g(){let e=(0,i.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`div`,{className:`fl-ink-label`,children:`Revenue · last 6 quarters`}),e[0]=t):t=e[0];let n,r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsx)(`div`,{className:`fl-ink-bars`,children:s.map(_)}),r=(0,a.jsx)(`span`,{className:`fl-hl-sweep`}),e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,a.jsxs)(`div`,{className:`fl-card fl-ink`,children:[t,(0,a.jsxs)(`div`,{className:`fl-ink-plot`,children:[n,r,(0,a.jsxs)(`span`,{className:`fl-hl-chip`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`})}),`Ask about this`]})]})]}),e[3]=o):o=e[3],o}function _(e,t){return(0,a.jsx)(`div`,{className:`fl-ink-barcol`,children:(0,a.jsx)(`div`,{className:`fl-ink-bar`+(e===`100%`?` peak`:``),style:{height:e}})},t)}function v(){return(0,a.jsxs)(`div`,{className:`fl-card fl-ghostwrap`,children:[(0,a.jsxs)(`div`,{className:`fl-ghost-said`,children:[(0,a.jsx)(`span`,{className:`fl-wave`,"aria-hidden":`true`,children:Array.from({length:12},(e,t)=>(0,a.jsx)(`i`,{style:{"--i":String(t)}},t))}),(0,a.jsxs)(`span`,{className:`fl-ghost-words`,children:[`“…and how does that compare to last year, and`,(0,a.jsx)(`span`,{className:`fl-caret`}),`”`]})]}),(0,a.jsxs)(`div`,{className:`fl-ghost-cards`,children:[(0,a.jsxs)(`div`,{className:`fl-ghost`,children:[(0,a.jsx)(`div`,{className:`fl-ghost-tag`,children:`Forming…`}),(0,a.jsxs)(`div`,{className:`fl-ghost-bars`,children:[(0,a.jsx)(`i`,{style:{height:`50%`}}),(0,a.jsx)(`i`,{style:{height:`80%`}}),(0,a.jsx)(`i`,{style:{height:`65%`}})]})]}),(0,a.jsxs)(`div`,{className:`fl-ghost delay`,children:[(0,a.jsx)(`div`,{className:`fl-ghost-tag`,children:`Forming…`}),(0,a.jsx)(`svg`,{viewBox:`0 0 120 50`,"aria-hidden":`true`,children:(0,a.jsx)(`polyline`,{points:`0,42 24,30 48,34 72,18 96,22 120,8`})})]})]})]})}var y=[{label:`Runway: 14mo`,meta:`4×`,x:92,y:52,tone:`blue`},{label:`Hiring freeze`,meta:`a worry`,x:86,y:200,tone:`amber`},{label:`Ship velocity`,meta:`slowing`,x:300,y:204,tone:`amber`},{label:`Churn signal`,meta:`watch`,x:300,y:50,tone:`pink`},{label:`Pricing`,meta:`your idea`,x:206,y:226,tone:`green`}],b=[[0,3],[3,2],[1,4],[4,2],[0,1]];function x(){let e=(0,i.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`svg`,{className:`fl-mindmap-links`,viewBox:`0 0 420 264`,"aria-hidden":`true`,children:b.map(C)}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsxs)(`div`,{className:`fl-card fl-mindmap`,children:[t,(0,a.jsx)(`div`,{className:`fl-mindmap-hub`,children:(0,a.jsx)(r,{size:46})}),y.map(S)]}),e[1]=n):n=e[1],n}function S(e){return(0,a.jsxs)(`div`,{className:`fl-node tone-`+e.tone,style:{left:`${e.x/420*100}%`,top:`${e.y/264*100}%`},children:[(0,a.jsx)(`div`,{className:`fl-node-label`,children:e.label}),(0,a.jsx)(`div`,{className:`fl-node-meta`,children:e.meta})]},e.label)}function C(e,t){let[n,r]=e,i=y[n],o=y[r],s=(i.x+o.x)/2,c=(i.y+o.y)/2-20;return(0,a.jsx)(`path`,{d:`M${i.x},${i.y} Q${s},${c} ${o.x},${o.y}`},t)}var w=[{icon:`⌨`,label:`Type it`},{icon:`🎙`,label:`Say it`},{icon:`▦`,label:`Drag a card`}];function T(){let e=(0,i.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`span`,{className:`fl-blank-num good`,children:`$2.1M`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsxs)(`span`,{className:`fl-blank-hole`,children:[`your burn / mo`,(0,a.jsx)(`span`,{className:`fl-caret`})]}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsxs)(`div`,{className:`fl-blank-sentence`,children:[`With `,t,` in the bank and a burn of`,` `,n,`, your runway is `,(0,a.jsx)(`span`,{className:`fl-blank-pending`,children:`— months`}),`.`]}),e[2]=r):r=e[2];let o;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,a.jsxs)(`div`,{className:`fl-card fl-blank`,children:[r,(0,a.jsx)(`div`,{className:`fl-blank-options`,"aria-hidden":`true`,children:w.map(E)})]}),e[3]=o):o=e[3],o}function E(e){return(0,a.jsxs)(`span`,{className:`fl-blank-btn`,children:[(0,a.jsx)(`span`,{className:`fl-blank-icon`,children:e.icon}),e.label]},e.label)}var D=[`“ARR climbed to $15.1M — up 21%.”`,`“The trend held steady all quarter.”`,`“North America still leads, at 54%.”`];function O(){return(0,a.jsxs)(`div`,{className:`fl-card fl-walk`,children:[(0,a.jsx)(`div`,{className:`fl-ink-label`,children:`Q3 revenue · read to you`}),(0,a.jsxs)(`div`,{className:`fl-walk-stage`,children:[(0,a.jsxs)(`div`,{className:`fl-walk-presenter`,children:[(0,a.jsx)(r,{size:44,className:`fl-walk-orb`}),(0,a.jsxs)(`div`,{className:`fl-walk-say`,children:[(0,a.jsx)(`span`,{className:`fl-wave`,"aria-hidden":`true`,children:Array.from({length:8},(e,t)=>(0,a.jsx)(`i`,{style:{"--i":String(t)}},t))}),(0,a.jsx)(`span`,{className:`fl-walk-caps`,children:D.map((e,t)=>(0,a.jsx)(`span`,{className:`fl-walk-line l${t+1}`,children:e},e))})]})]}),(0,a.jsxs)(`div`,{className:`fl-walk-items`,children:[(0,a.jsxs)(`div`,{className:`fl-walk-item`,children:[(0,a.jsx)(`span`,{className:`fl-walk-k`,children:`ARR`}),(0,a.jsx)(`span`,{className:`fl-walk-v`,children:`$15.1M`}),(0,a.jsx)(`span`,{className:`fl-walk-up`,children:`▲ 21%`})]}),(0,a.jsx)(`div`,{className:`fl-walk-item`,children:(0,a.jsx)(`svg`,{className:`fl-walk-spark`,viewBox:`0 0 120 26`,"aria-hidden":`true`,children:(0,a.jsx)(`polyline`,{points:`2,20 22,17 42,19 62,11 82,13 100,6 118,3`})})}),(0,a.jsxs)(`div`,{className:`fl-walk-item`,children:[(0,a.jsx)(`span`,{className:`fl-walk-k`,children:`N. America`}),(0,a.jsx)(`span`,{className:`fl-walk-v`,children:`54%`})]}),(0,a.jsx)(`span`,{className:`fl-walk-spot`,"aria-hidden":`true`})]})]})]})}function k(){let e=(0,i.c)(8),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsxs)(n,{eyebrow:`Things a chat window can’t do`,children:[`It’s a `,(0,a.jsx)(`em`,{children:`friend at the whiteboard.`})]}),e[0]=t):t=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsx)(o,{eyebrow:`Highlight is the interface`,eyebrowTone:`presence`,title:`Highlight the answer to ask.`,body:`Drag across a bar, a row, a figure — the highlight grabs exactly what’s under it, and your next question is grounded on that piece, not the whole answer.`,visual:(0,a.jsx)(g,{})}),e[1]=r):r=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,a.jsx)(o,{reverse:!0,eyebrow:`And the pen is in its hand`,eyebrowTone:`amber`,title:`It draws on its own answers.`,body:`A trend arrow along the recovery, a star on the number that matters, a strike through the option it rules out — the whiteboard marks a good teacher leaves.`,visual:(0,a.jsx)(u,{})}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,a.jsx)(o,{eyebrow:`It answers while you talk`,eyebrowTone:`blue`,title:`The answer forms mid-sentence.`,body:`Dashed “ghost” cards sketch the answer taking shape behind your words — and reshape live as your question turns. You see it thinking with you, not after you.`,visual:(0,a.jsx)(v,{})}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,a.jsx)(o,{reverse:!0,eyebrow:`Watch it map your thinking`,eyebrowTone:`green`,title:`Ramble. Get a map of your mind.`,body:`Themes emerge from what you actually said — never fixed buckets — with the tensions between them drawn in. A minute of talking becomes a structure you can see.`,visual:(0,a.jsx)(x,{})}),e[4]=l):l=e[4];let d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,a.jsx)(o,{eyebrow:`The Blank Space`,eyebrowTone:`pink`,title:`It won’t guess. It leaves a space.`,body:`When an answer needs a number only you have, Mavéa leaves a glowing hole to fill — type it, say it, or drag a card in. Uncertainty, made honest and interactive.`,visual:(0,a.jsx)(T,{})}),e[5]=d):d=e[5];let f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,a.jsx)(o,{reverse:!0,eyebrow:`One canvas, many instruments`,eyebrowTone:`presence`,title:`The answer picks its shape.`,body:`Charts, maps, timelines, networks, tables — hundreds of visual instruments on one canvas, and each answer reaches for the ones that fit.`,visual:(0,a.jsx)(h,{})}),e[6]=f):f=e[6];let p;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,a.jsxs)(a.Fragment,{children:[t,(0,a.jsxs)(`div`,{className:`fl-panels`,children:[r,s,c,l,d,f,(0,a.jsx)(o,{eyebrow:`It reads the answer to you`,eyebrowTone:`presence`,title:`It points, and talks you through.`,body:`Mavéa doesn’t drop a wall of cards and leave. It spotlights each part and speaks to it — walking you through the answer a piece at a time, the way a friend at the whiteboard would.`,visual:(0,a.jsx)(O,{})})]})]}),e[7]=p):p=e[7],p}export{k as WowFeatures};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-BlCH2LG4.js";import{n as r}from"./icons-CHVz6kv_.js";import{t as i}from"./useFocusTrap-DbfG6zbM.js";import{t as a}from"./portal-deBu1VaC.js";import{t as o}from"./useZoomGesture-CQdTOGD2.js";var s=e(),c=n(),l=t();function u(e){let t=(0,c.c)(52),{model:n,level:u,onLevel:d,onJump:f,onClose:p}=e,m=(0,s.useRef)(null);i(m);let h;t[0]!==u||t[1]!==p||t[2]!==d?(h=e=>{e===`out`?d(`breath`):u===`breath`?d(`chapters`):p()},t[0]=u,t[1]=p,t[2]=d,t[3]=h):h=t[3],o(m,h);let g,_;t[4]!==u||t[5]!==p||t[6]!==d?(g=()=>{let e=e=>{e.key===`Escape`?(e.preventDefault(),p()):e.key===`ArrowRight`?(e.preventDefault(),u===`chapters`&&d(`breath`)):e.key===`ArrowLeft`&&(e.preventDefault(),u===`breath`?d(`chapters`):p())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},_=[u,p,d],t[4]=u,t[5]=p,t[6]=d,t[7]=g,t[8]=_):(g=t[7],_=t[8]),(0,s.useEffect)(g,_);let v;t[9]===p?v=t[10]:(v=e=>{e.target===e.currentTarget&&p()},t[9]=p,t[10]=v);let y=v,b;t[11]===y?b=t[12]:(b=e=>{e.key!==`Enter`&&e.key!==` `||(e.key===` `&&e.preventDefault(),y(e))},t[11]=y,t[12]=b);let x=`zoom-deck level-`+u,S;t[13]===p?S=t[14]:(S=(0,l.jsx)(`button`,{type:`button`,className:`zoom-level`,onClick:p,children:`Canvas`}),t[13]=p,t[14]=S);let C=`zoom-level`+(u===`chapters`?` active`:``),w=u===`chapters`,T;t[15]===d?T=t[16]:(T=()=>d(`chapters`),t[15]=d,t[16]=T);let E;t[17]!==T||t[18]!==C||t[19]!==w?(E=(0,l.jsx)(`button`,{type:`button`,className:C,"aria-pressed":w,onClick:T,children:`Chapters`}),t[17]=T,t[18]=C,t[19]=w,t[20]=E):E=t[20];let D=`zoom-level`+(u===`breath`?` active`:``),O=u===`breath`,k;t[21]===d?k=t[22]:(k=()=>d(`breath`),t[21]=d,t[22]=k);let A;t[23]!==D||t[24]!==O||t[25]!==k?(A=(0,l.jsx)(`button`,{type:`button`,className:D,"aria-pressed":O,onClick:k,children:`One breath`}),t[23]=D,t[24]=O,t[25]=k,t[26]=A):A=t[26];let j;t[27]!==E||t[28]!==A||t[29]!==S?(j=(0,l.jsxs)(`div`,{className:`zoom-levelbar`,role:`group`,"aria-label":`Zoom level`,children:[S,E,A]}),t[27]=E,t[28]=A,t[29]=S,t[30]=j):j=t[30];let M;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,l.jsx)(r.x,{}),t[31]=M):M=t[31];let N;t[32]===p?N=t[33]:(N=(0,l.jsx)(`button`,{type:`button`,className:`zoom-close`,onClick:p,"aria-label":`Close zoom`,title:`Close`,children:M}),t[32]=p,t[33]=N);let P;t[34]!==j||t[35]!==N?(P=(0,l.jsxs)(`header`,{className:`zoom-toolbar`,children:[j,N]}),t[34]=j,t[35]=N,t[36]=P):P=t[36];let F;t[37]!==u||t[38]!==n.heading||t[39]!==n.meta||t[40]!==n.rows||t[41]!==f||t[42]!==d?(F=u===`breath`?(0,l.jsxs)(`div`,{className:`zoom-breath`,children:[(0,l.jsxs)(`p`,{className:`zoom-breath-line`,children:[n.heading.replace(/, so far\.$/,``),`: `,n.rows.map((e,t)=>(0,l.jsxs)(`button`,{type:`button`,className:`zoom-breath-topic`,onClick:()=>d(`chapters`),children:[e.title,t<n.rows.length-1?` · `:``]},e.frameIndex))]}),(0,l.jsxs)(`p`,{className:`zoom-meta`,children:[n.meta,` · one breath`]})]}):(0,l.jsxs)(`div`,{className:`zoom-chapters`,children:[(0,l.jsxs)(`header`,{className:`zoom-head`,children:[(0,l.jsx)(`span`,{className:`zoom-title`,children:n.heading}),(0,l.jsx)(`span`,{className:`zoom-meta`,children:n.meta})]}),(0,l.jsx)(`ul`,{className:`zoom-rows`,children:n.rows.map(e=>(0,l.jsx)(`li`,{children:(0,l.jsxs)(`button`,{type:`button`,className:`zoom-row`,onClick:()=>f(e.frameIndex),children:[(0,l.jsxs)(`span`,{className:`zoom-row-title`,children:[e.title,(0,l.jsx)(`span`,{className:`zoom-row-clock`,children:e.clock})]}),(0,l.jsx)(`span`,{className:`zoom-row-line`,children:e.line}),e.corrected&&(0,l.jsx)(`span`,{className:`zoom-row-corrected`,children:e.corrected})]})},e.frameIndex))})]}),t[37]=u,t[38]=n.heading,t[39]=n.meta,t[40]=n.rows,t[41]=f,t[42]=d,t[43]=F):F=t[43];let I;t[44]!==P||t[45]!==F||t[46]!==x?(I=(0,l.jsxs)(`div`,{ref:m,className:x,role:`dialog`,"aria-modal":`true`,"aria-label":`Conversation zoomed out`,tabIndex:-1,children:[P,F]}),t[44]=P,t[45]=F,t[46]=x,t[47]=I):I=t[47];let L;return t[48]!==y||t[49]!==I||t[50]!==b?(L=(0,l.jsx)(a,{children:(0,l.jsx)(`div`,{className:`zoom-scrim`,role:`button`,tabIndex:0,"aria-label":`Close`,onClick:y,onKeyDown:b,children:I})}),t[48]=y,t[49]=I,t[50]=b,t[51]=L):L=t[51],L}export{u as ZoomDeck};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DaSxXjOY.js";import{ht as t}from"./index-BlCH2LG4.js";import{S as n,_ as r,b as i,c as a,d as o,f as s,g as c,h as l,l as u,m as d,p as f,u as p,v as m,x as h,y as g}from"./registry-BGptAE_J.js";import{t as _}from"./ReelJelly-BCMS6a1u.js";import{t as v}from"./penStrokes-9Q_l7NTt.js";var y=t(),b=e();function x(e){let t=(0,y.c)(23),{slots:n}=e,r;t[0]===n.title?r=t[1]:(r=h(n.title,l),t[0]=n.title,t[1]=r);let i=r,a;t[2]===n.subtitle?a=t[3]:(a=n.subtitle?h(n.subtitle,d):void 0,t[2]=n.subtitle,t[3]=a);let o=a,s,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={position:`relative`,width:`calc(var(--rw) * 88)`,padding:`calc(var(--ru) * 7) 0`,display:`flex`,flexDirection:`column`,gap:`calc(var(--ru) * 3)`,overflow:`hidden`},c=(0,b.jsx)(`style`,{children:`
|
|
2
2
|
@keyframes neon-glitch {
|
|
3
3
|
0%, 92%, 100% { transform: translate(0, 0); }
|
|
4
4
|
93% { transform: translate(calc(var(--rw) * -0.5), calc(var(--ru) * 0.2)); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as e}from"./providers-wzm7E8Pa.js";import{i as t,n,r,t as i,u as a}from"./PrismOverlay-
|
|
1
|
+
import{y as e}from"./providers-wzm7E8Pa.js";import{i as t,n,r,t as i,u as a}from"./PrismOverlay-DJ-JBI6j.js";import"./BriefingPlayer-BaC5XjsP.js";var o=new Map;function s(){let e=typeof navigator<`u`?navigator:void 0,t=e?.deviceMemory??8,n=e?.hardwareConcurrency??8;return t<=4||n<=4?900:1100}var c={"load-bearing":0,supporting:1,context:2};function l(e,n,r){if(n&&n.length){let i=new Map(e.claims.map(e=>[e.id,e])),a=t(n,e.threads,r),o=new Set,s=[];for(let e of a)for(let t of e.claimIds){if(o.has(t))continue;o.add(t);let e=i.get(t);e&&s.push(e)}for(let t of e.claims)o.has(t.id)||s.push(t);return s}return[...e.claims].sort((e,t)=>c[e.role]-c[t.role]||e.page-t.page)}async function u(t,c,u={}){let d=u.max??6,f=u.verdicts??o,p=l(t,u.placed,f).slice(0,d),m=s(),h=[];for(let t of p){let o=c[t.source];if(!o)continue;let s=i(t),l={isFigure:t.kind===`diagram`,seed:`${t.source}:${t.page}:${t.quote}`,color:r(t.kind),title:t.title,explanation:n(t),...s?{accent:s}:{}};if(e(o)){let e=await a(o,t.page,t.quote,m,t.kind===`diagram`).catch(()=>null);if(e)try{h.push({...l,pageImage:e.canvas.toDataURL(`image/jpeg`,.8),imgW:e.canvas.width,imgH:e.canvas.height,rects:e.rects.map(e=>({x:e.x,y:e.y,w:e.w,h:e.h})),figure:e.figure?{x:e.figure.x,y:e.figure.y,w:e.figure.w,h:e.figure.h}:void 0});continue}catch{}}h.push({...l,pageImage:``,imgW:0,imgH:0,rects:[]})}return h}export{u as autoAnnotationSteps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-BVpWp9h4.js";import{D as t,E as n,T as r,n as i}from"./registry-
|
|
1
|
+
import{r as e}from"./chunk-BVpWp9h4.js";import{D as t,E as n,T as r,n as i}from"./registry-BGptAE_J.js";import{r as a}from"./spokenText-D4zPX9JY.js";var o=e({buildAnnotationReel:()=>d}),s=8,c=0;function l(e,r,o,s,l){let u=t(a(s.voiceover),n.voiceover);return{id:`a${c++}`,content:e,template:r,slots:i(e,o,l),voiceover:u,durationMs:Math.max(s.ms,u?Math.round(u.length/13*1e3)+500:0)}}function u(e){return e.replace(/\.[a-z0-9]+$/i,``).trim()||e}function d(e,t){let n=`Inside ${u(t.fileName)}`,i={topic:t.fileName,question:n},a=l(`title`,`title`,{question:n},{voiceover:n,ms:r.intro},i),o=e.slice(0,s).map(e=>{let t=e.explanation||e.title,n=e.title&&!t.includes(e.title)?`${e.title}. ${t}`:t;return l(`markup`,`documentMarkup`,{...e},{voiceover:n,ms:r.default},i)}),c=l(`outro`,`outro`,{wordmark:`Mavéa`,tagline:`See what it means.`},{voiceover:`Made with Mavéa.`,ms:r.outro},i),d=[a,...o,c];return{topic:t.fileName,question:n,palette:t.palette??`aurora`,vibe:t.vibe??`clean`,seed:0,slides:d,durationMs:d.reduce((e,t)=>e+t.durationMs,0)}}export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,S as t}from"./useStudy-Dh598Dw8.js";import{i as n,t as r}from"./useLiveConfig-BhFHwoy3.js";import{S as i,x as a}from"./shapes-Cw7tCHIp.js";import{i as o,r as s}from"./store-DoJn3lBF.js";import{a as c,c as l,r as u,s as d}from"./store-DXmC_fP2.js";import{r as f,t as p}from"./store-Dn23_Ymr.js";import{c as m,l as h,u as g}from"./store-BMRQiV1z.js";function _(){let e=m();return{app:`mavea`,kind:`backup`,version:1,exportedAt:Date.now(),data:{dashboards:t(),memory:a(),flashcards:u(),study:c(),library:s(),atlas:p(),courses:{courses:e,progress:Object.fromEntries(e.map(e=>[e.id,h(e.id)]))},settings:JSON.parse(r())}}}function v(){let e=JSON.stringify(_()),t=new Blob([e],{type:`application/json`}),n=URL.createObjectURL(t);try{let e=document.createElement(`a`);e.href=n,e.download=`mavea-backup-${new Date().toISOString().slice(0,10)}.json`,e.click()}finally{URL.revokeObjectURL(n)}}var y=e=>Array.isArray(e)?e:[];function b(t){if(t.length>25e6)throw Error(`That file is too large to be a Mavéa backup.`);let r;try{r=JSON.parse(t)}catch{throw Error(`This file isn’t valid JSON — it may be corrupted or not a Mavéa backup.`)}if(!r||typeof r!=`object`)throw Error(`This file isn’t a Mavéa backup.`);let a=r;if(a.app!==`mavea`||a.kind!==`backup`||typeof a.version!=`number`||!a.data)throw Error(`This file isn’t a Mavéa backup.`);let s=a.data,c={dashboards:e(y(s.dashboards)),memory:i(y(s.memory)),flashcards:d(y(s.flashcards)),studyStyle:l(s.study),library:o(y(s.library)),atlas:f(y(s.atlas)),courses:s.courses&&typeof s.courses==`object`?g(s.courses.courses,s.courses.progress):0,settingsApplied:!1,versionAhead:a.version>1};if(s.settings&&typeof s.settings==`object`){let e={...s.settings,keys:{},searchKeys:{},rememberKey:!1};n(JSON.stringify(e)),c.settingsApplied=!0}return c}export{v as downloadBackup,b as importBackup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./ReplayCard-B5njgafT.js";import"./TopicCanvas-CTTBp5sg.js";import"./CanvasSkeleton-DgF1b-bW.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as e,q as t}from"./index-
|
|
1
|
+
import{J as e,q as t}from"./index-BlCH2LG4.js";import{n,r}from"./facts-BBTt3ImG.js";new Set([`scalar`,`series`,`composition`,`comparison`,`ranking`,`distribution`,`relationship`,`structure`,`hierarchy`,`flow`,`sequence`,`keyvalue`,`list`,`geo`,`text`,`code`,`media`,`tabular`,`status`,`selection`,`navigation`,`overlay`,`action`]),new Set([`stat`,`trend`,`bar`,`composition`,`distribution`,`scatter`,`matrix`,`table`,`compare`,`list`,`steps`,`timeline`,`graph`,`tree`,`flow`,`map`,`prose`,`code`,`media`,`document`,`control`,`canvas`]),new Set([`currency`,`percent`,`unit`,`total-row`,`delta`,`target-line`,`status-color`,`in-cell-bar`,`sparkline`,`trend-arrow`,`sort`,`search`,`callout`,`highlight`]),e();var i=[()=>t(()=>import(`./shard000-DM_rqD7W.js`),[]),()=>t(()=>import(`./shard001-gQEQs7_F.js`),[]),()=>t(()=>import(`./shard002-DbDas-W-.js`),[]),()=>t(()=>import(`./shard003-DxMszG4_.js`),[]),()=>t(()=>import(`./shard004-DZMpLBw1.js`),[]),()=>t(()=>import(`./shard005-DLVkh9IH.js`),[]),()=>t(()=>import(`./shard006-B6efKHov.js`),[]),()=>t(()=>import(`./shard007-AFdZLe38.js`),[]),()=>t(()=>import(`./shard008-LbSBzwRx.js`),[]),()=>t(()=>import(`./shard009-D_6-SUDb.js`),[]),()=>t(()=>import(`./shard010-DbOj-uZW.js`),[]),()=>t(()=>import(`./shard011-BYSz7EEW.js`),[]),()=>t(()=>import(`./shard012-B5Ypj7OV.js`),[]),()=>t(()=>import(`./shard013-BtsliNIe.js`),[]),()=>t(()=>import(`./shard014-15sjmk68.js`),[]),()=>t(()=>import(`./shard015-nnXrqru_.js`),[]),()=>t(()=>import(`./shard016-BayXFE13.js`),[]),()=>t(()=>import(`./shard017-Cy4cGexs.js`),[]),()=>t(()=>import(`./shard018-aO-BYJ8H.js`),[]),()=>t(()=>import(`./shard019-gxaTeA3I.js`),[]),()=>t(()=>import(`./shard020-BibJdMI0.js`),[]),()=>t(()=>import(`./shard021-2FE-tze4.js`),[]),()=>t(()=>import(`./shard022-IXiyG-JK.js`),[]),()=>t(()=>import(`./shard023-314F6NJS.js`),[]),()=>t(()=>import(`./shard024-cN5rpQ_X.js`),[]),()=>t(()=>import(`./shard025-KKTaXOGE.js`),[]),()=>t(()=>import(`./shard026-C2Dkd1t6.js`),[]),()=>t(()=>import(`./shard027-Xy-8x9As.js`),[]),()=>t(()=>import(`./shard028-Bul-klUj.js`),[]),()=>t(()=>import(`./shard029-BbRSUcUZ.js`),[]),()=>t(()=>import(`./shard030-GYllsFVC.js`),[]),()=>t(()=>import(`./shard031-DMigeiyn.js`),[]),()=>t(()=>import(`./shard032-CcvmzK0l.js`),[]),()=>t(()=>import(`./shard033-11AU702M.js`),[]),()=>t(()=>import(`./shard034-Bx3urxjM.js`),[]),()=>t(()=>import(`./shard035-DBdEeyCt.js`),[]),()=>t(()=>import(`./shard036-vYgoRBqS.js`),[]),()=>t(()=>import(`./shard037-DP4MMw91.js`),[]),()=>t(()=>import(`./shard038-ffxsv7d6.js`),[]),()=>t(()=>import(`./shard039-C1JHHNp9.js`),[]),()=>t(()=>import(`./shard040-JbVvCSO_.js`),[]),()=>t(()=>import(`./shard041-5L_eFwGx.js`),[]),()=>t(()=>import(`./shard042-C9nsGL79.js`),[]),()=>t(()=>import(`./shard043-Dx_9HSKI.js`),[]),()=>t(()=>import(`./shard044-B3QQNC4A.js`),[]),()=>t(()=>import(`./shard045-B7z0WHO6.js`),[]),()=>t(()=>import(`./shard046-D1yDablJ.js`),[]),()=>t(()=>import(`./shard047-DJi3AgeT.js`),[]),()=>t(()=>import(`./shard048-D_2ipfUr.js`),[]),()=>t(()=>import(`./shard049-1aGgWZdd.js`),[]),()=>t(()=>import(`./shard050-Bjwa0Og4.js`),[]),()=>t(()=>import(`./shard051-Cx_GAk3v.js`),[]),()=>t(()=>import(`./shard052-LaeOD3V5.js`),[]),()=>t(()=>import(`./shard053-D-da7Foj.js`),[]),()=>t(()=>import(`./shard054-CM8eSRQk.js`),[]),()=>t(()=>import(`./shard055-QRpDl4Vs.js`),[]),()=>t(()=>import(`./shard056-DkY7CQm3.js`),[]),()=>t(()=>import(`./shard057-BVCgf7o0.js`),[]),()=>t(()=>import(`./shard058-93aGtdrX.js`),[]),()=>t(()=>import(`./shard059-rJE9X1_I.js`),[]),()=>t(()=>import(`./shard060-Lu_hfl1r.js`),[]),()=>t(()=>import(`./shard061-C9A8iNiq.js`),[]),()=>t(()=>import(`./shard062-BBIpEYZO.js`),[]),()=>t(()=>import(`./shard063-C_uen3Ub.js`),[]),()=>t(()=>import(`./shard064-DAHUsHST.js`),[]),()=>t(()=>import(`./shard065-C2edvdvh.js`),[]),()=>t(()=>import(`./shard066-DFcuVhZm.js`),[]),()=>t(()=>import(`./shard067-BN8DM8JZ.js`),[]),()=>t(()=>import(`./shard068-i464K77p.js`),[]),()=>t(()=>import(`./shard069-Dm9m2a5U.js`),[]),()=>t(()=>import(`./shard070-BPVvR8GH.js`),[]),()=>t(()=>import(`./shard071-Bal_0d9L.js`),[]),()=>t(()=>import(`./shard072-CBQu62kt.js`),[]),()=>t(()=>import(`./shard073-D5BRae0w.js`),[]),()=>t(()=>import(`./shard074-DtFvcBnZ.js`),[])],a=new Set,o=new Map,s=new Map;i.length;function c(e){if(a.has(e))return Promise.resolve();let t=o.get(e);if(t)return t;let n=i[e];if(!n)return Promise.resolve();let r=n().then(({D:t})=>{for(let[e,n]of Object.entries(t))s.set(e,n);a.add(e)}).catch(()=>{}).finally(()=>o.delete(e));return o.set(e,r),r}function l(e){let t=r(e);return t<0?-1:Math.floor(t/8)}async function u(e){let t=new Set;for(let n of e){let e=l(n);e>=0&&!a.has(e)&&t.add(e)}t.size&&await Promise.all([...t].map(c))}function d(e){return s.get(e)}function f(e){let t=n(e);if(!t)return;let r=d(e);if(r)return{...t,...r}}export{u as n,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./threads-DxSb3F0U.js";import{n as t}from"./blockLabel-DAqaHKy3.js";var n=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-deep)`,`var(--insight-soft)`,`var(--danger)`,`var(--presence-soft)`,`var(--warning-soft)`],r=/^(how|what|why|should|can|could|would|will|plan|show|make|build|tell|give|explain|who|when|where|which|is|are|do|does|did|help|me)\b[\s,]*/i;function i(e,t=36){let n=e.trim().replace(/\s+/g,` `);if(n.length<=t)return n;let r=n.slice(0,t),i=r.lastIndexOf(` `);return(i>t*.5?r.slice(0,i):r).replace(/[\s,.;:–-]+$/,``)+`…`}function a(e){let t=e.spec?.title?.trim();if(t)return i(t);let n=e.question?.replace(r,``).trim();return n?i(n.charAt(0).toUpperCase()+n.slice(1)):`Moment`}function o(e){let t=e.toLowerCase();return/\b(build|model|schema|architecture|data model|pipeline|system|wire up)\b/.test(t)?`layers`:/\b(prove|verify|evidence|sources?|cite|citation|try|test|double-check|check)\b/.test(t)?`check`:/\b(card|dashboard|one-?pager|slide|widget|panel)\b/.test(t)?`screen`:/\b(show me|show|generate|draw|chart|graph|diagram|render|visuali[sz]e|design|map)\b/.test(t)?`sparkle`:`mic`}var s={compare:`table`,standings:`table`,scoreboard:`table`,table:`table`,kpi:`table`,chart:`chart`,bars:`chart`,stack:`chart`,scatter:`chart`,heat:`chart`,donut:`chart`,gauge:`chart`,ring:`chart`,map:`globe`,geomap:`globe`,gallery:`image`,timeline:`clock`,quotes:`quote`,pullquote:`quote`,checklist:`check`,checks:`check`,insight:`spark`,codemap:`layers`,schema:`layers`,diff:`layers`,flow:`layers`,pipeline:`layers`},c=new Set([`divider`]),l=8;function u(e){let n=[],r=new Set;for(let i of e){let e=i.id;if(!(!e||r.has(e)||c.has(i.type))&&(r.add(e),n.push({id:e,label:t(i),icon:s[i.type]??`spark`}),n.length>=l))break}return n}function d(t,r){let i=[],s=e(t,r??null);return t.forEach((e,t)=>{let r={frameIndex:t,question:e.question||``,icon:o(e.question||``),mode:e.mode,elements:u(e.spec?.blocks??[])};if(s[t]){let o=i.length;i.push({id:`ch-`+t,title:a(e),color:e.spec?.tint||n[o%n.length],moments:[r]})}else i[i.length-1].moments.push(r)}),i}function f(e){return e.reduce((e,t)=>e+t.moments.length,0)}export{f as n,d as r,n as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{ht as t}from"./index-
|
|
2
|
-
`)}function rt(e){let t=[];for(let n of e){let e=l(n);!e||e.value===`—`||t.push({dashboardId:n.id,label:e.label,value:e.value})}return t}function it(e,t,i){let a=r(e),o=n(e),s={date:q(i),at:i,text:a,...o&&o!==a?{spoken:o}:{},chips:rt(t)};return Ye(s),tt(i),s}function at(e,t){a(
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{ht as t}from"./index-BlCH2LG4.js";import{a as n,i as r}from"./spokenText-D4zPX9JY.js";import{g as i,m as a}from"./kokoro-BCXTWbLb.js";import{n as o,t as s}from"./contentVault-DzTYWcbD.js";import{B as c,F as ee}from"./useStudy-Dh598Dw8.js";import{a as l,i as te}from"./format-hc2QOoIu.js";var u=e(),d=`mavea-dash-ledger-v1`,f=d,ne=10080*60*1e3,re=400,p=0;function ie(){try{let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID()}catch{}return p+=1,`led-${p.toString(36)}-${Math.floor(Math.random()*1e9).toString(36)}`}function m(e){return!!e&&typeof e==`object`}function ae(e,t){return typeof e==`number`&&Number.isFinite(e)?e:t}function h(e,t=``){return typeof e==`string`?e:t}function g(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}var oe=new Set([`check`,`insight`,`savings`,`alert`,`briefing`,`goal`]);function _(e){if(!m(e)||e.action!==`set-cadence`)return;let t=h(e.dashboardId);if(!t||typeof e.to!=`string`)return;let n=e.state===`applied`||e.state===`dismissed`?e.state:`open`;return{action:`set-cadence`,dashboardId:t,to:e.to,savesPerMonth:Math.max(0,ae(e.savesPerMonth,0)),state:n}}function se(e){if(!m(e))return null;let t=h(e.id),n=e.at;if(!t||typeof e.kind!=`string`||!oe.has(e.kind)||typeof n!=`number`||!Number.isFinite(n))return null;let r=_(e.suggestion),i=g(e.domains);return{id:t,at:n,kind:e.kind,text:h(e.text),dashboardIds:g(e.dashboardIds),...i.length?{domains:i}:{},searches:+(e.searches===1),...typeof e.sourceCount==`number`&&Number.isFinite(e.sourceCount)?{sourceCount:e.sourceCount}:{},...e.manual===!0?{manual:!0}:{},...r?{suggestion:r}:{}}}function ce(e,t){let n=t-ne,r=e.filter(e=>e.at>=n);return r.length>re?r.slice(-400):r}function v(e){return Array.isArray(e)?e.map(se).filter(e=>e!==null):[]}var y=null,b=!1,x=0;async function S(e){let t=++x;try{if(typeof localStorage>`u`)return;let n=await o(e);if(t!==x)return;localStorage.setItem(d,n)}catch{}}function le(){try{if(typeof localStorage>`u`)return[];let e=localStorage.getItem(d);if(!e)return[];let t=v(JSON.parse(e));return t.length&&S(t),t}catch{return[]}}async function C(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(d);if(!e)return;try{JSON.parse(e);return}catch{}let t=v(await s(e));if(b)return;y=t,b=!0,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(f,{detail:t}))}catch{}}C();function w(){return y??=le(),y}function ue(){y=null,b=!1,C()}function T(e){let t=v(e);y=t,b=!0,S(t);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(f,{detail:t}))}catch{}}var E=null,D=null;function de(){let e=w();return(D!==e||E===null)&&(E=[...e].reverse(),D=e),E}function O(e){let t=e.at??Date.now(),{at:n,...r}=e,i={...r,id:ie(),at:t};return T(ce([...w(),i],t)),i}function k(e,t){T(w().map(n=>n.id===e&&n.suggestion?{...n,suggestion:{...n.suggestion,state:t}}:n))}function A(e){let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}function j(e,t){let n=A(t);return e.filter(e=>e.at>=n).reduce((e,t)=>e+t.searches,0)}function fe(e,t,n){let r=n-10080*60*1e3;return e.filter(e=>e.at>=r&&e.kind===`check`&&e.dashboardIds.includes(t)).length}function pe(e,t){let n=t-10080*60*1e3,r=e.filter(e=>e.at>=n),i=A(t),a=[];for(let e=6;e>=0;e--){let t=i-e*24*60*60*1e3,n=t+1440*60*1e3;a.push({date:new Date(t).toISOString().slice(0,10),searches:r.filter(e=>e.at>=t&&e.at<n).reduce((e,t)=>e+t.searches,0)})}return{totalSearches:r.reduce((e,t)=>e+t.searches,0),byDay:a,topMoment:r.find(e=>e.kind===`goal`)??[...r].sort((e,t)=>(t.sourceCount??0)-(e.sourceCount??0))[0]??null,estSavedPerMonth:r.filter(e=>e.suggestion?.state===`applied`).reduce((e,t)=>e+(t.suggestion?.savesPerMonth??0),0)}}var M=`mavea-dash-settings-v1`,N=M,P={dailySearchBudget:40,briefingEnabled:!0,briefingSpoken:!1,keyNudgeShown:!1};function me(e){return Math.min(200,Math.max(5,Math.round(e)))}function he(e){return!!e&&typeof e==`object`}function F(e){return he(e)?{dailySearchBudget:typeof e.dailySearchBudget==`number`&&Number.isFinite(e.dailySearchBudget)?me(e.dailySearchBudget):P.dailySearchBudget,briefingEnabled:typeof e.briefingEnabled==`boolean`?e.briefingEnabled:P.briefingEnabled,briefingSpoken:typeof e.briefingSpoken==`boolean`?e.briefingSpoken:P.briefingSpoken,keyNudgeShown:typeof e.keyNudgeShown==`boolean`?e.keyNudgeShown:P.keyNudgeShown}:{...P}}var I;function ge(){try{if(typeof localStorage>`u`)return{...P};let e=localStorage.getItem(M);return e?F(JSON.parse(e)):{...P}}catch{return{...P}}}function L(){return I??=ge(),I}function _e(e){I=e;try{typeof localStorage<`u`&&localStorage.setItem(M,JSON.stringify(e))}catch{}try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(N,{detail:e}))}catch{}}function R(){return L()}function ve(e){_e(F({...L(),...e}))}function ye(){I=void 0}function be(e){let t=t=>{t.key!==null&&t.key!==M||(ye(),e())};return window.addEventListener(N,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(N,e),window.removeEventListener(`storage`,t)}}function xe(){return(0,u.useSyncExternalStore)(be,R)}var Se=.85;function Ce(e){let t=new Date(e);return t.setHours(24,0,0,0),t.getTime()}function we(e,t,n){let r=j(e,n);return{used:r,cap:t,amber:r>=t*Se,paused:r>=t,resumesAt:Ce(n)}}var Te=t(),z=new Set,B=`mavea-dashboard-data-pending`;function Ee(e,t){for(let n of e)t?z.add(n):z.delete(n);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(B))}catch{}}function De(e){return window.addEventListener(B,e),()=>window.removeEventListener(B,e)}function Oe(e){let t=(0,Te.c)(2),n;return t[0]===e?n=t[1]:(n=()=>z.has(e),t[0]=e,t[1]=n),(0,u.useSyncExternalStore)(De,n,ke)}function ke(){return!1}var Ae=14,je=2,Me=336*60*60*1e3,Ne={"15min":()=>`hourly`,hourly:e=>e===0?`daily`:`6h`};function V(e){switch(e){case`15min`:return`every 15 min`;case`hourly`:return`hourly`;case`6h`:return`every 6 hours`;case`daily`:return`daily`;case`manual`:return`manual`}}function Pe(e,t,n){if(!te(e))return null;let r=Ne[e.cadence.data];if(!r||t<Ae||n>je)return null;let i=r(n),a=c[e.cadence.data],o=c[i];if(!Number.isFinite(a)||!Number.isFinite(o)||o<=a)return null;let s=Math.round(t*(1-a/o)*(30/7));return s<=0?null:{dashboardId:e.id,to:i,savesPerMonth:s,checks7d:t,opens7d:n}}function Fe(e,t,n){let r=n-Me;return e.some(e=>e.kind===`savings`&&e.at>=r&&e.suggestion?.dashboardId===t)}function Ie(e,t,n,r,i,a=3){let o=[];for(let s of e){if(o.length>=a)break;if(Fe(t,s.id,i))continue;let e=Pe(s,n(s.id),r(s.id));e&&o.push(e)}return o}function Le(e,t){let n=t.opens7d===1?`1 time`:`${t.opens7d} times`;return`You check ${e.title} ${V(e.cadence.data)} but only opened it ${n} this week. Dropping to ${V(t.to)} would save about ${t.savesPerMonth} searches a month.`}function Re(e){return{action:`set-cadence`,dashboardId:e.dashboardId,to:e.to,savesPerMonth:e.savesPerMonth,state:`open`}}function ze(e,t){let n=new Map(e.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.dashboardId);t&&O({kind:`savings`,text:Le(t,e),dashboardIds:[e.dashboardId],searches:0,suggestion:Re(e)})}}function Be(e,t,n,r=Date.now()){ee(t,{data:n},r),k(e,`applied`),O({kind:`savings`,text:`Applied — cadence dropped to ${V(n)}.`,dashboardIds:[t],searches:0})}function Ve(e){k(e,`dismissed`)}var H=`mavea-dash-optimizer-date`;function U(e){return new Date(e).toISOString().slice(0,10)}function He(e){try{return typeof localStorage>`u`?!1:localStorage.getItem(H)===U(e)}catch{return!1}}function Ue(e){try{typeof localStorage<`u`&&localStorage.setItem(H,U(e))}catch{}}function We(e,t,n,r,i=Date.now()){He(i)||(Ue(i),ze(e,Ie(e,t,n,r,i)))}var W=`mavea-dash-briefing-v1`,G=W,K=`mavea-dash-briefing-date`;function q(e){return new Date(e).toISOString().slice(0,10)}function J(e){return!!e&&typeof e==`object`}function Ge(e){return!J(e)||typeof e.dashboardId!=`string`||!e.dashboardId||typeof e.label!=`string`||typeof e.value!=`string`?null:{dashboardId:e.dashboardId,label:e.label,value:e.value}}function Y(e){if(!J(e)||typeof e.date!=`string`||typeof e.text!=`string`||!e.text)return null;let t=typeof e.at==`number`&&Number.isFinite(e.at)?e.at:0,n=Array.isArray(e.chips)?e.chips.map(Ge).filter(e=>e!==null):[];return{date:e.date,at:t,text:e.text,...typeof e.spoken==`string`&&e.spoken?{spoken:e.spoken}:{},chips:n}}var X;async function Z(e){try{if(typeof localStorage>`u`)return;localStorage.setItem(W,await o(e))}catch{}}function Ke(){try{if(typeof localStorage>`u`)return null;let e=localStorage.getItem(W);if(!e)return null;let t=Y(JSON.parse(e));return t&&Z(t),t}catch{return null}}async function qe(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(W);if(!e)return;try{JSON.parse(e);return}catch{}let t=Y(await s(e));X=t,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(G,{detail:t}))}catch{}}qe();function Je(){return X??=Ke(),X}function Ye(e){X=e,Z(e);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(G,{detail:e}))}catch{}}function Q(e){return window.addEventListener(G,e),()=>window.removeEventListener(G,e)}function Xe(){return(0,u.useSyncExternalStore)(Q,Je,Ze)}function Ze(){return null}function Qe(){try{return typeof localStorage>`u`?null:localStorage.getItem(K)}catch{return null}}function $e(e){try{typeof localStorage<`u`&&localStorage.setItem(K,e)}catch{}}function et(e){return Qe()!==q(e)}function tt(e){$e(q(e))}function nt(e,t){let n=[];for(let r of e){if(t.has(r.id))continue;let e=l(r);!e||e.value===`—`||n.push(`- ${r.title}: ${e.label} is ${e.value}`)}return n.join(`
|
|
2
|
+
`)}function rt(e){let t=[];for(let n of e){let e=l(n);!e||e.value===`—`||t.push({dashboardId:n.id,label:e.label,value:e.value})}return t}function it(e,t,i){let a=r(e),o=n(e),s={date:q(i),at:i,text:a,...o&&o!==a?{spoken:o}:{},chips:rt(t)};return Ye(s),tt(i),s}function at(e,t){i(a(t||e),`mavea`)}var $=`mavea-dashboard-tripwire-toast`;function ot(e){try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent($,{detail:e}))}catch{}}function st(e){let t=t=>e(t.detail);return window.addEventListener($,t),()=>window.removeEventListener($,t)}export{pe as C,j as S,f as _,it as a,de as b,Be as c,Ee as d,Oe as f,xe as g,ve as h,nt as i,Ve as l,R as m,st as n,at as o,we as p,et as r,Xe as s,ot as t,We as u,O as v,ue as x,fe as y};
|