@mavea/mavea 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/PRIVACY.md +9 -2
  3. package/README.md +19 -3
  4. package/SECURITY.md +1 -1
  5. package/TERMS.md +4 -2
  6. package/TRADEMARKS.md +3 -1
  7. package/bin/mavea.mjs +40 -8
  8. package/dist/.vite/manifest.json +886 -846
  9. package/dist/assets/AnnotationLayer-BRYhJ1LB.css +1 -0
  10. package/dist/assets/AnnotationLayer-Bh1yiSAK.js +2 -0
  11. package/dist/assets/{AppCommandPalette-DdOPNZ0e.js → AppCommandPalette-DS4sLY_K.js} +1 -1
  12. package/dist/assets/{AtlasView-DO_p0TdZ.js → AtlasView-CYZ9sfXb.js} +1 -1
  13. package/dist/assets/BlockEmpty-B-giiUPy.js +1 -0
  14. package/dist/assets/{CadenceCard-DxceyiPA.js → CadenceCard-j1V7XOxX.js} +1 -1
  15. package/dist/assets/{CheckLogRail-BibJTid0.js → CheckLogRail-onH7DaxW.js} +1 -1
  16. package/dist/assets/{CommandPalette-Bs6tpdZl.js → CommandPalette-Cz8h94Jd.js} +1 -1
  17. package/dist/assets/ConversationVideoStudio-adb7legp.js +1 -0
  18. package/dist/assets/CourseLessonReader-CkzViEij.js +2 -0
  19. package/dist/assets/CourseLessonReader-DNHFQOkX.css +1 -0
  20. package/dist/assets/{CourseRail-CUa7uIGG.css → CourseRail-BDQIWara.css} +1 -1
  21. package/dist/assets/{CourseRail-BQmUsG6v.js → CourseRail-DD8gtAn4.js} +1 -1
  22. package/dist/assets/CoursesApp-B0HFM8Al.js +2 -0
  23. package/dist/assets/{DashPresent-BDWgO9am.js → DashPresent-BdOJ7F9D.js} +1 -1
  24. package/dist/assets/DashboardDetail-Chrpi1Yk.js +2 -0
  25. package/dist/assets/DashboardLoopGate-B01Hpm7O.js +2 -0
  26. package/dist/assets/DashboardLoopRuntime-BcdZtIgH.js +1 -0
  27. package/dist/assets/{DashboardSettings-DJon1Q4o.js → DashboardSettings-5tn-dw6G.js} +1 -1
  28. package/dist/assets/DashboardsApp--jjj-GVX.js +2 -0
  29. package/dist/assets/DeepZoomApp-BpQbKTjc.js +37 -0
  30. package/dist/assets/DelegatePanel-e4y0CJsn.js +33 -0
  31. package/dist/assets/{DemoGallery-DrSlMsnu.js → DemoGallery-DF1ShRG4.js} +1 -1
  32. package/dist/assets/{DropSelect-GwIXHA5o.js → DropSelect-D3Q9Su_x.js} +1 -1
  33. package/dist/assets/{ExportModal-DBUjC71U.js → ExportModal-DkmyBpeN.js} +1 -1
  34. package/dist/assets/ExportModal-sX8MPVPW.css +1 -0
  35. package/dist/assets/{ExtractionPreview-D4M6eXqb.js → ExtractionPreview-C6F1q3qG.js} +2 -2
  36. package/dist/assets/FeatureUseNotice-CCI4mM39.js +1 -0
  37. package/dist/assets/{FlagshipCommandPalette-DAO849RC.js → FlagshipCommandPalette-BkjvGrKT.js} +1 -1
  38. package/dist/assets/{FlagshipShowcase-g2x-1c70.js → FlagshipShowcase-Dx2noFrP.js} +1 -1
  39. package/dist/assets/{FlashcardsApp-BUKzCr65.js → FlashcardsApp-C1TeLlkY.js} +1 -1
  40. package/dist/assets/GalleryApp-7oBldBKU.js +1 -0
  41. package/dist/assets/{HonestByDesign-DgZFEpEx.js → HonestByDesign-DlRrxgrO.js} +1 -1
  42. package/dist/assets/{HowItWorks-DPFpdeGE.js → HowItWorks-BM2yn2dq.js} +1 -1
  43. package/dist/assets/LegalApp-DPfTD0jz.js +1 -0
  44. package/dist/assets/{LegalMarkdownDocument-BBTHuW_M.js → LegalMarkdownDocument-DJgwmK1q.js} +1 -1
  45. package/dist/assets/{LegalPageShell-hMA-7JLf.js → LegalPageShell-DuIwSVSJ.js} +1 -1
  46. package/dist/assets/Library-CDgWdTiF.js +1 -0
  47. package/dist/assets/{LibraryOverlay-DSUWcUe4.js → LibraryOverlay-DsLhiJzF.js} +1 -1
  48. package/dist/assets/LiveApp-CEaISHEZ.css +1 -0
  49. package/dist/assets/LiveApp-DNYYimuo.js +79 -0
  50. package/dist/assets/LiveSettings-CDHQnEtF.js +6 -0
  51. package/dist/assets/{MindMapViewerDrawer-CKdJtHno.js → MindMapViewerDrawer-C3BgiubE.js} +1 -1
  52. package/dist/assets/{MindShape-B3lg_z4X.js → MindShape-DVlgSR1B.js} +1 -1
  53. package/dist/assets/{PinToDashboard-DpQjBLPa.js → PinToDashboard-Dd_egidB.js} +1 -1
  54. package/dist/assets/{PlanReview-CrTbmMAd.js → PlanReview-wOsBpofo.js} +1 -1
  55. package/dist/assets/PresentationDeck-BSMzp5T9.js +1 -0
  56. package/dist/assets/PrismApp-DbbDNVpy.js +2 -0
  57. package/dist/assets/{PrismAskController-C4MuB8om.js → PrismAskController-BgwijoI2.js} +1 -1
  58. package/dist/assets/PrismBriefingPlayer-B1_ziOwl.js +2 -0
  59. package/dist/assets/PrismOverlay-5ZVXu4WL.css +1 -0
  60. package/dist/assets/PrismOverlay-DLxvsh9l.js +105 -0
  61. package/dist/assets/PrismWorkbench-ZlhI7Mhw.js +1 -0
  62. package/dist/assets/{PrivacyApp-A2Bu6LVd.js → PrivacyApp-Ki_5bM9Z.js} +10 -3
  63. package/dist/assets/ReplayCard-WKBKeSKc.js +2 -0
  64. package/dist/assets/ReplayOverlay-PFSJv540.js +1 -0
  65. package/dist/assets/{RewindOverlay-BO7YgDsW.js → RewindOverlay-okltPbfw.js} +1 -1
  66. package/dist/assets/{RippleApp-BXt7tenS.js → RippleApp-DqVyZYKV.js} +2 -2
  67. package/dist/assets/{RippleAskController-BzdwYcYY.js → RippleAskController-BqnazbZ7.js} +1 -1
  68. package/dist/assets/{RippleOverlay-BSxubBwj.js → RippleOverlay-4McJCSV8.js} +2 -2
  69. package/dist/assets/{SeeDontRead-0He5hS2C.js → SeeDontRead-gARjJuF7.js} +1 -1
  70. package/dist/assets/ShareModal-C5HVVMtQ.js +2 -0
  71. package/dist/assets/{ShipCourse-Dg6kCWyH.js → ShipCourse-BUm4TKUk.js} +1 -1
  72. package/dist/assets/{SignatureLoop-QPwB2oNN.js → SignatureLoop-CYspJuij.js} +1 -1
  73. package/dist/assets/SynthesisApp-BNhF9aJ2.js +2 -0
  74. package/dist/assets/SynthesisOverlay-Bvwdc8uQ.js +66 -0
  75. package/dist/assets/TemplatePicker-DBa4lkpf.js +1 -0
  76. package/dist/assets/{TermsApp-zcPDYfuh.js → TermsApp-BvwDtgIz.js} +5 -3
  77. package/dist/assets/TopicCanvas-Cwc6-K3q.js +2 -0
  78. package/dist/assets/{TourPrism-DbinDupp.js → TourPrism-CCjys3-x.js} +1 -1
  79. package/dist/assets/{TrackerTile-CrT9u1I4.js → TrackerTile-B4j5qtop.js} +2 -2
  80. package/dist/assets/{TwoSurfaces-L0CDuyOZ.js → TwoSurfaces-fGm1MJrD.js} +1 -1
  81. package/dist/assets/WorldOverlay-CLWtwuSl.css +1 -0
  82. package/dist/assets/WorldOverlay-JOp1rLyU.js +2 -0
  83. package/dist/assets/{WowFeatures-CwBk4ZMO.js → WowFeatures-D5dJvp9W.js} +1 -1
  84. package/dist/assets/{ZoomDeck-DlnesweX.js → ZoomDeck-DYmkT0TA.js} +1 -1
  85. package/dist/assets/{alternateFinishes-Cgks49KV.js → alternateFinishes-BHcX08Hs.js} +2 -2
  86. package/dist/assets/annotationAuto-B8_I3PNS.js +1 -0
  87. package/dist/assets/annotationReel-BA8Fv9Or.js +1 -0
  88. package/dist/assets/audioTrack-BJ2D_nuy.js +1 -0
  89. package/dist/assets/{BlockEmpty-B82uCse8.js → axis-DHAV38YM.js} +1 -1
  90. package/dist/assets/backup-DkCsHNEE.js +1 -0
  91. package/dist/assets/cache-7UEbF3S6.js +1 -0
  92. package/dist/assets/canvas-CYrbzF43.js +1 -0
  93. package/dist/assets/capture-Y6Qm8zCN.js +2 -0
  94. package/dist/assets/{catalog-Db9GWM6N.js → catalog-CRekRbKO.js} +1 -1
  95. package/dist/assets/chapters-DcdG3Lu8.js +1 -0
  96. package/dist/assets/{codeContext-goNoLAIr.js → codeContext-CFnI3GLf.js} +1 -1
  97. package/dist/assets/{confirmAdd-CZ829Mbx.js → confirmAdd-D-TTCQ31.js} +1 -1
  98. package/dist/assets/contentVault-XKWjF2FB.js +1 -0
  99. package/dist/assets/{dashboardEvents-CiayRLrH.js → dashboardEvents-MzCzak6K.js} +1 -1
  100. package/dist/assets/{deepen-DAeHHFiI.js → deepen-FZiVqiEc.js} +1 -1
  101. package/dist/assets/effort-BftNJCCV.js +39 -0
  102. package/dist/assets/empty-D51uhW0E.js +1 -0
  103. package/dist/assets/explode-niun7Zqc.js +15 -0
  104. package/dist/assets/{format-g3dP8OI3.js → format-BkvssSOr.js} +1 -1
  105. package/dist/assets/{generate-COfYQFmT.js → generate-BZobrQPX.js} +1 -1
  106. package/dist/assets/{generateBeats-COflu5Zi.js → generateBeats-Dqtfd8HC.js} +1 -1
  107. package/dist/assets/generateCourse-DPL0bO3L.js +28 -0
  108. package/dist/assets/generateLive-B7nlaqz8.js +24 -0
  109. package/dist/assets/{gesture-Bouqjr3g.js → gesture-BBS5nQEi.js} +2 -2
  110. package/dist/assets/{githubBrowser-BDiuD9dz.js → githubBrowser-CErQprLW.js} +1 -1
  111. package/dist/assets/homeTarget-CDc-r2mj.js +1 -0
  112. package/dist/assets/http-Bqk6nJiH.js +2 -0
  113. package/dist/assets/index-CFE0vqqO.css +1 -0
  114. package/dist/assets/{index-LiHcEJt_.js → index-Db-FgYxX.js} +4 -4
  115. package/dist/assets/json-J4Y32_i9.js +1 -0
  116. package/dist/assets/kokoro-yB7iU_JU.js +1 -0
  117. package/dist/assets/{ledger-Cv0LBflx.js → ledger-DHS2di3l.js} +1 -1
  118. package/dist/assets/lens-DyGK7Owa.js +1 -0
  119. package/dist/assets/{lib-u95BsX_B.js → lib-Dkb5WBRc.js} +1 -1
  120. package/dist/assets/liveSchema-Z_39HuDI.js +125 -0
  121. package/dist/assets/{loader-DgMLGfAC.js → loader-Ciz6XbG-.js} +2 -2
  122. package/dist/assets/{model-CAewjw45.js → model-FR-9md4s.js} +1 -1
  123. package/dist/assets/{neighborhoods-CqECCmo8.js → neighborhoods-B56WegJs.js} +1 -1
  124. package/dist/assets/notes-CEloxKQ3.js +1 -0
  125. package/dist/assets/offers-eBNj_lSP.js +1 -0
  126. package/dist/assets/{openWorld-BHTJM39n.js → openWorld-B4VY6xO7.js} +1 -1
  127. package/dist/assets/{owners-HRBX7JN_.js → owners-CP-4Q59L.js} +1 -1
  128. package/dist/assets/{pen-DtEW1xf4.js → pen-UKrUHlDA.js} +1 -1
  129. package/dist/assets/{penStrokes-DlHnO9xE.js → penStrokes-CTC3AYiz.js} +1 -1
  130. package/dist/assets/{perfProbe-ezVn1mOu.js → perfProbe-DrOeB7yd.js} +1 -1
  131. package/dist/assets/{pin-BPGVDgnq.js → pin-C5_s4Ju5.js} +1 -1
  132. package/dist/assets/{planTracker-BwoKEftp.js → planTracker-BA-x4jbw.js} +1 -1
  133. package/dist/assets/{portal-B9DmFo6J.js → portal-TqJbr2rR.js} +1 -1
  134. package/dist/assets/prewarm-Bt5X_9CM.js +1 -0
  135. package/dist/assets/providers-CPhoN8j0.js +1 -0
  136. package/dist/assets/quietHours-LtXDl4-v.js +1 -0
  137. package/dist/assets/{ready-yBSGJubb.js → ready-_sg3IJkE.js} +1 -1
  138. package/dist/assets/{registry-7tKTrzeZ.js → registry-BHDUu15I.js} +1 -1
  139. package/dist/assets/{registry-D06LKiUk.js → registry-BPLbZIVz.js} +1 -1
  140. package/dist/assets/registry-BQuygaKz.js +1 -0
  141. package/dist/assets/registry-B_wlsfxh.js +1 -0
  142. package/dist/assets/{registry-Bl2qfp5V.js → registry-Bjf2Ggs6.js} +1 -1
  143. package/dist/assets/{registry-CE1T0z9x.js → registry-BmjYillB.js} +1 -1
  144. package/dist/assets/{registry-DGNSqTxE.js → registry-BodYWiga.js} +1 -1
  145. package/dist/assets/{registry-Bl7zAWKt.js → registry-BwlvYVHq.js} +1 -1
  146. package/dist/assets/{registry-BJEvFgoL.js → registry-BxkAuBx8.js} +1 -1
  147. package/dist/assets/{registry-BdHj_oIs.js → registry-C3bIc5Kp.js} +1 -1
  148. package/dist/assets/{registry-CEV5h2cu.css → registry-CIcGBgtK.css} +1 -1
  149. package/dist/assets/{registry-BlujNlQJ.js → registry-CfIJ9dJS.js} +1 -1
  150. package/dist/assets/{registry-CvylL2BN.css → registry-CmWPyj7Q.css} +1 -1
  151. package/dist/assets/{registry-BDXwUn3i.js → registry-CvtHBjkb.js} +1 -1
  152. package/dist/assets/{registry-Dd1lcXrO.js → registry-Cz5cZREW.js} +2 -2
  153. package/dist/assets/registry-Di1fTdpi.js +48 -0
  154. package/dist/assets/registry-GxnzELw0.js +1 -0
  155. package/dist/assets/{registry-Cgo4C0ux.js → registry-JRteQJcE.js} +1 -1
  156. package/dist/assets/registry-MwJlqlFZ.js +1 -0
  157. package/dist/assets/{registry-B53EEn8S.js → registry-YrewlFlo.js} +1 -1
  158. package/dist/assets/{registry-qRfnKTt4.js → registry-uiAoJKXu.js} +1 -1
  159. package/dist/assets/{relate-aQFFr11O.js → relate-CCma73G9.js} +1 -1
  160. package/dist/assets/{replay-CalqEgdW.js → replay-dMDmsTaD.js} +1 -1
  161. package/dist/assets/{run-CwMSPOps.js → run-BVgCc5Xi.js} +1 -1
  162. package/dist/assets/{run-DCQrxgHA.js → run-CW67JOGe.js} +1 -1
  163. package/dist/assets/{run-CuHaB8wF.js → run-DqsfL9JC.js} +1 -1
  164. package/dist/assets/{select-wEtBn9U6.js → select-BuqyXI8k.js} +1 -1
  165. package/dist/assets/sentenceCase-CLDiNB0f.js +1 -0
  166. package/dist/assets/shard054-CNzJxw2V.js +1 -0
  167. package/dist/assets/shard070-BmNyRhxw.js +1 -0
  168. package/dist/assets/spokenText-Dy-GZvZV.js +1 -0
  169. package/dist/assets/store-C9s8Bfz0.js +1 -0
  170. package/dist/assets/store-CgA7mKy1.js +1 -0
  171. package/dist/assets/store-D16dGt7I.js +1 -0
  172. package/dist/assets/{store-BWLbFXiY.js → store-DqOaVRLn.js} +1 -1
  173. package/dist/assets/store-gfPI5TVE.js +1 -0
  174. package/dist/assets/useDashboardLoop-Cnxmf7wU.js +5 -0
  175. package/dist/assets/{useDashboards-lgQnk2Al.js → useDashboards-B-EjE8FH.js} +1 -1
  176. package/dist/assets/{useLedger-1WVXef68.js → useLedger-D4cXEwI0.js} +1 -1
  177. package/dist/assets/useLiveConfig-CvOQTr0s.js +1 -0
  178. package/dist/assets/useStudy-70Iz4ZVn.js +1 -0
  179. package/dist/assets/validate-MQG0EcTD.js +4 -0
  180. package/dist/assets/walkSync-D6leFb_u.js +1 -0
  181. package/dist/fonts/LICENSE.txt +2 -0
  182. package/dist/fonts/PROVENANCE.md +1 -0
  183. package/dist/fonts/caveat-var-latin.woff2 +0 -0
  184. package/dist/fonts/fonts.css +10 -0
  185. package/dist/index.html +6 -2
  186. package/dist/legal/PRIVACY.md +9 -2
  187. package/dist/legal/SECURITY.md +1 -1
  188. package/dist/legal/TERMS.md +4 -2
  189. package/dist/legal/TRADEMARKS.md +3 -1
  190. package/docs/media/go-hub.jpg +0 -0
  191. package/docs/media/living-answer.jpg +0 -0
  192. package/package.json +1 -1
  193. package/dist/assets/AnnotationLayer-Cccb12ps.js +0 -0
  194. package/dist/assets/AnnotationLayer-ClU-e6qL.css +0 -1
  195. package/dist/assets/BriefingPlayer-74mRKyjl.js +0 -1
  196. package/dist/assets/ConversationVideoStudio-DMIPUCcq.js +0 -1
  197. package/dist/assets/CourseLessonReader-COmTQdSK.css +0 -1
  198. package/dist/assets/CourseLessonReader-D29Kix4f.js +0 -2
  199. package/dist/assets/CoursesApp-DcDsS_ZS.js +0 -2
  200. package/dist/assets/DashboardDetail-BrnAdWfy.js +0 -2
  201. package/dist/assets/DashboardLoopGate-NxMcQ4rD.js +0 -2
  202. package/dist/assets/DashboardLoopRuntime-Dsy9u1wa.js +0 -1
  203. package/dist/assets/DashboardsApp-DxyMn3x_.js +0 -2
  204. package/dist/assets/DeepZoomApp-nNjqoyYE.js +0 -37
  205. package/dist/assets/DelegatePanel-DN_ZL0j7.js +0 -33
  206. package/dist/assets/ExportModal-D4WpAg2c.css +0 -1
  207. package/dist/assets/FeatureUseNotice-Bda9jr3W.js +0 -1
  208. package/dist/assets/GalleryApp-ot_A7ZF-.js +0 -1
  209. package/dist/assets/LegalApp-C56kWdmK.js +0 -1
  210. package/dist/assets/Library-CVj7R6F4.js +0 -1
  211. package/dist/assets/LiveApp-B62EMybC.js +0 -79
  212. package/dist/assets/LiveApp-CziqEsOb.css +0 -1
  213. package/dist/assets/LiveSettings-BITIaMoT.js +0 -6
  214. package/dist/assets/PresentationDeck-CfYadu9V.js +0 -1
  215. package/dist/assets/PrismApp-bRKK_3JA.js +0 -2
  216. package/dist/assets/PrismBriefingPlayer-ChJj6hSS.js +0 -2
  217. package/dist/assets/PrismOverlay-BwnF4BEn.css +0 -1
  218. package/dist/assets/PrismOverlay-Pp6ZKmTc.js +0 -105
  219. package/dist/assets/PrismWorkbench-BCV7r4Oa.js +0 -1
  220. package/dist/assets/ReplayCard-B6NYiYzQ.js +0 -2
  221. package/dist/assets/ReplayOverlay-BJKtJ-vc.js +0 -1
  222. package/dist/assets/ShareModal-xYdZWJxy.js +0 -2
  223. package/dist/assets/SynthesisApp-DrCq6NDa.js +0 -2
  224. package/dist/assets/SynthesisOverlay-DCa-2Pz_.js +0 -66
  225. package/dist/assets/TopicCanvas-Bw4bMFpe.js +0 -2
  226. package/dist/assets/WorldOverlay-BcjqG1BR.js +0 -2
  227. package/dist/assets/WorldOverlay-D7ay5y4D.css +0 -1
  228. package/dist/assets/annotationAuto-B2UdfJNj.js +0 -1
  229. package/dist/assets/annotationReel-K2FYv-3B.js +0 -1
  230. package/dist/assets/backup-685QrAjt.js +0 -1
  231. package/dist/assets/cache-CvbSI-pr.js +0 -1
  232. package/dist/assets/canvas-C3O7MEA3.js +0 -1
  233. package/dist/assets/capture-DgJLQ_0-.js +0 -2
  234. package/dist/assets/chapters-CIvdCeBC.js +0 -1
  235. package/dist/assets/contentVault-xfUwSJ3i.js +0 -1
  236. package/dist/assets/effort-jJe4iMIq.js +0 -39
  237. package/dist/assets/empty-BO1NC9qY.js +0 -1
  238. package/dist/assets/explode-CPnvJiTg.js +0 -15
  239. package/dist/assets/friendlyAsk-BBdRZIar.js +0 -1
  240. package/dist/assets/generateCourse-BldPpgdh.js +0 -28
  241. package/dist/assets/generateLive-DGwnpIip.js +0 -24
  242. package/dist/assets/homeTarget-CwFsJYwb.js +0 -1
  243. package/dist/assets/http-Lar_UMKb.js +0 -2
  244. package/dist/assets/index-BIUYTk1W.css +0 -1
  245. package/dist/assets/json-B0N3XRZU.js +0 -1
  246. package/dist/assets/kokoro-DXRj0KQX.js +0 -1
  247. package/dist/assets/lens-ChFJD9il.js +0 -1
  248. package/dist/assets/liveSchema-DyfND6P2.js +0 -100
  249. package/dist/assets/notes-DzIAEESd.js +0 -1
  250. package/dist/assets/prewarm-BgUqAJbF.js +0 -1
  251. package/dist/assets/providers-0DthJW_I.js +0 -1
  252. package/dist/assets/quietHours-DyynzDyC.js +0 -1
  253. package/dist/assets/registry-BQzvA61G.js +0 -1
  254. package/dist/assets/registry-BT6ydF33.js +0 -1
  255. package/dist/assets/registry-CPImC7mO.js +0 -1
  256. package/dist/assets/registry-KRYoVMCh.js +0 -48
  257. package/dist/assets/registry-QbArAJKB.js +0 -1
  258. package/dist/assets/shard054-BoC-LNYu.js +0 -1
  259. package/dist/assets/shard070-Dm9m2a5U.js +0 -1
  260. package/dist/assets/spokenText-C88IQJ0M.js +0 -1
  261. package/dist/assets/store-Ba9vzL4H.js +0 -1
  262. package/dist/assets/store-BwyOArJl.js +0 -1
  263. package/dist/assets/store-D-f8ZuaK.js +0 -1
  264. package/dist/assets/store-ruEsXJjU.js +0 -1
  265. package/dist/assets/useDashboardLoop-ifcuVRo-.js +0 -5
  266. package/dist/assets/useLiveConfig-B4CmBiAK.js +0 -1
  267. package/dist/assets/useStudy-CySgE3Cx.js +0 -1
  268. package/dist/assets/validate-sGUCmPAs.js +0 -4
  269. package/dist/assets/walkSync-DBne70gg.js +0 -1
  270. /package/dist/assets/{BriefingPlayer-DHV4vMga.css → PrismBriefingPlayer-DHV4vMga.css} +0 -0
@@ -1,3 +1,3 @@
1
- import{n as e,t}from"./preload-helper-CiWYd9n-.js";import{n,t as r}from"./catalog-Db9GWM6N.js";import{n as i,t as a}from"./facts-BUGuVUIc.js";import{t as o}from"./liveSchema-DyfND6P2.js";import{a as s,i as c,n as l,t as u}from"./shapes-BwoDrn09.js";var d=`insight.scorecard.trendtile.waterfall.funnel.flightchart.deltacascade.bulletkpi.bulletchart.comparebars.bcgmatrix.pivot.groupedbars.leaderboard.datatable.roadmap.gantt.kanban.plandag.milestones.progressbar.statustimeline.healthgrid.kpidashboard.issuetree.meetingnotes.sparkstat.counter.herostat.streamgraph.scorebadge.radar.smallmultiples.arearange.waffle.histogram.boxplot.sparktable.percentilebar.statpair.calibration.ratinginput.sliderinput.segmented.rangefilter.stepindicator.pregnancyweek.cycletrack.contractiontimer.reasoning.routing.agenttrace.toolcalls.retrieval.embedmap.tokenstream.modelcompare.whatchanged.factcheck.confidencemeter.citationchain.sourcelist.claimgrid.highlightsnippet.redline.annotateddoc.docoutline.network.sunburst.researchsummary.hypothesiscard.dotplot.controlchart.errorbars.kpi.plot.matrix.diagram.diagramflow.docview.pdfreader.datastructure.bigo.complexitysummary.confusionmatrix.protocolstack.logicgates.algorithmtrace.sortingviz.graphtrace.binarytree.dptable.hashtable.trie.gridtrace.sysarchdiagram.recursiontree.sequencealign.compare.timeline.clinicaltimeline.medicationschedule.clearancematrix.anatomyfigure.odontogram.ecgstrip.vitalstrip.careplan.triageboard.mentalhealthscreen.callout.casebrief.discoverytracker.patentclaimchart.litigationtimeline.billtracker.immigrationcase.caseload.verdictcard.scenarioset.divider.wizard.goaltree.candlestick.lollipop.decisiontree.slopegraph.dumbbell.powersample.abtestresult.orgchart.treemap.processflow.journeymap.userpersona.swimlane.bubble.matrixgrid.treetable.footnotetable.tabs.deflist.faq.accordion.riskmatrix.threatmodel.pricingtable.raci.dimensiondrawing.explodedview.weldsymbol.cutlist.linebalance.moodboard.palette.photo.geomap.bars.storystrip.carousel.lightbox.beforeafter.imagecallouts.annotcallouts.videoembed.waveform.sankey.proscons.casestudy.pullquote.takeaways.skeleton.emptystate.mediacard.voicestyle.exposuretriangle.colorwheel.artanalysis.shotlist.runofshow.beatsheet.craftchart.patternpiece.storyarc.castmap.devicemark.creativetest.brandguide.musicstaff.flashcard.chronologicaltimeline.chorddiagram.mixerboard.pianokeys.fretboardmap.circleoffifths.practicelog.gallery.togglegroup.radiogroup.svgblock.scalefelt.moonphase.skychart.orbitdiagram.sizecompare.donut.foodweb.taxonrank.list.speciescard.scoreboard.ring.standings.bump.scoutingreport.tournamentbracket.banner.checklist.epicurve.web.positioncard.differential.growthcurve.painscale.badgeset.livescore.gameboard.boardgamescore.tierlist.seatingchart.checkboxgroup.numberstepper.picturesequence.vaxschedule.vetpatientchart.stickerchart.avatar.avatargroup.chipset.kbd.codeblock.toaststack.spinner.notification.tooltip.hovercard.a11yaudit.usabilityfindings.typespec.navbar.sidenav.treeview.breadcrumb.menubar.toolbar.megamenu.commandbar.pagination.commandk.modal.drawer.bottomnav.screenmap.wireframe.textfield.fileupload.textarea.combobox.formpanel.select.buttonbar.switchset.actionchecklist.otp.trustmap.datepicker.calendarpick.timepicker.daterange.colorpicker.tagsinput.searchselect.sheet.menu.popover.contextmenu.confirmdialog.roomblockdashboard.messagedraft.chatthread.dialogue.variants.verse.slidedeck.screenplay.socialpost.storystructure.ideaboard.longread.variantswitch.forecast.agenda.picks.transitroute.timezones.lifewheel.promptset.prayertimes.amortization.receipt.settleup.bracketbar.stackedbars.budgetallocator.paystub.taxbracket.taxreturnsummary.siteplan.zoningmap.factsheet.newsdigest.dictionary.translation.pronunciation.gloss.stacktrace.syntaxbreakdown.codewalk.hearit.ipachart.scriptstroke.paralleltext.comparematrix.toulmin.etymtree.rollcall.termbase.historicalperson.onthisday.countrycard.worldgrid.warconflict.distinctioncard.chart.stack.messagescriptset.eligibilitycheck.bridge.supplydemand.payoffdiagram.yieldcurve.efficientfrontier.bondladder.collectiontracker.cma.claimagecompare.scatter.companionnote.breathpacer.sleepcycle.heat.bodymap.calheat.workoutplan.macrobreakdown.runninglog.zoneladder.streakgrid.copingmenu.thoughtrecord.habittracker.readinglist.maproute.packlist.weathernow.pictogramchart.menucard.quadrant.venn.recipecard.cocktailcard.ingredientmatrix.plangrid.nutritionlabel.unitconvert.seasonband.worthit.reviewsynth.sizechart.breakdown.gauge.countdown.blanks.reframecard.talktrack.resume.understand.schema.buildprog.sponsorshiptracker.contentcalendar.podcastplanner.marimekko.timeseriesdecomposition.financialstatement.pareto.flowchord.evidencetrace.cohortgrid.fivewhychain.pipeline.quotes.emotionwheel.livecompute.captable.vestingschedule.termsheet.fundraisingrounds.saferterms.dilutionwaterfall.threestatementlink.tamsam.trainingcurve.burnrunway.ridgeplot.correlationheatmap.scatterplotmatrix.roccurve.precisionrecallcurve.biasvariance.gradientdescent.nnarchitecture.datadictionary.datapipeline.ablationtable.interviewscorecard.paybandchart.headcountplan.dosdonts.breakeven.depreciationschedule.logicmodel.fiveforces.cvssscorecard.changelog.lessonplan.equationblock.numberline.workedexample.quiz.quizsession.piedonut.distributioncurve.dualaxis.scatterregression.molecularstructure.sequencediagram.diffviewer.sensitivitytable.periodictable.elementcard.circuitdiagram.statemachine.erdiagram.labpanel.geometrycanvas.freebodydiagram.vectorspace.reactionmechanism.synthesisroute.hazardcard.labprotocol.argumentmap.teachdiagram.fractionbar.gridmatrix.conjugation.probabilitytree.mindshape.world.areaplot.wave.energydiagram.phylotree.parsetree.eratimeline.celldiagram.raydiagram.interferencepattern.vectorfield.phasediagram.particlemodel.bohrmodel.orbitaldiagram.pedigree.indifferencecurve.causationchain.equationbalancer.yieldcalc.vseprmolecule.titrationcurve.unitcircle.solidfigure.crosssection.loaddiagram.scansionmark.clockface.moneytray.placevaluechart.columnarithmetic.pictograph.populationpyramid.shapecard.letterform.toolscale.cyclewheel.phonicsword.sightwordlist.alphabetchart.morphemebreakdown.skilltree.violinplot.stemleafplot.surfaceplot.qqplot.samplingdistribution.gridtransform.phaseportrait.twocolumnproof.polarplot.taylorseries.areamodel.dnahelix.plasmidmap.linespectrum.pyramidtiers.rubric.gradebook.spectrumtable.fmeatable.billofmaterials.chromatogram.stressstraincurve.gatingplot.expressionheatmap.gellane.parallelcoordinates.primefactortree.numbersequence.constantcard.baseconversion.doseladder.flow.analogymap.logstream.gitgraph.queryplan.flamegraph.regexscope.terminal.httpexchange.latencydist.ecdf.codemap.checks.diff.componentapi.sportspitch.developmentmilestone.dentaltreatmentplan.estateplanchecklist.subtextdecode.rehearsal.caregivercoord.allocatepeople.lifeline.familytree.relationshipmap.vendortracker.wiringdiagram.pipingschematic.controlblockdiagram.floorplan.howtosteps.spacefit.thesis.alignmentgauge.standingalerts.sourceslineage.preflightchecklist.inventoryreorder.visachecklist.hrdiagram.ternaryplot.parliamentseats.prooftree.fishbone.classdiagram.energybarchart.karyotype.numberbond.posbreakdown.frayermodel.forestplot.cashflowtimeline.businesscanvas.guitartab.pianoroll.stitchchart.wordsearch.playingcards.statblock`.split(`.`);e();var f=[()=>t(()=>import(`./shard000-Bx6Nmt0m.js`),[]),()=>t(()=>import(`./shard001-CL6O9SLr.js`),[]),()=>t(()=>import(`./shard002-vLQ0Ss-O.js`),[]),()=>t(()=>import(`./shard003-kKZdpzuh.js`),[]),()=>t(()=>import(`./shard004-CdVohAu1.js`),[]),()=>t(()=>import(`./shard005-CMzF_uJB.js`),[]),()=>t(()=>import(`./shard006-DQoDWuoN.js`),[]),()=>t(()=>import(`./shard007-Ck0N0IUk.js`),[]),()=>t(()=>import(`./shard008-Dt395x0Q.js`),[]),()=>t(()=>import(`./shard009-D_z8Lhqh.js`),[]),()=>t(()=>import(`./shard010-CQfR6lnk.js`),[]),()=>t(()=>import(`./shard011-l-w2t2Ie.js`),[]),()=>t(()=>import(`./shard012-BTw_UO1C.js`),[]),()=>t(()=>import(`./shard013-D8ZjKKYb.js`),[]),()=>t(()=>import(`./shard014-Cth_76It.js`),[]),()=>t(()=>import(`./shard015-DdYJVsHx.js`),[]),()=>t(()=>import(`./shard016-BdlBf9uZ.js`),[]),()=>t(()=>import(`./shard017-C3HTxh6t.js`),[]),()=>t(()=>import(`./shard018-Mf4wvqVk.js`),[]),()=>t(()=>import(`./shard019-Dpcy1Arx.js`),[]),()=>t(()=>import(`./shard020-BNvKfQld.js`),[]),()=>t(()=>import(`./shard021-D0kpI_PQ.js`),[]),()=>t(()=>import(`./shard022-Cjms7kAe.js`),[]),()=>t(()=>import(`./shard023-Bdwci7fy.js`),[]),()=>t(()=>import(`./shard024-BBoyPtpP.js`),[]),()=>t(()=>import(`./shard025-lMGpgN_0.js`),[]),()=>t(()=>import(`./shard026-Bp3UVI4_.js`),[]),()=>t(()=>import(`./shard027-C4HTpdeT.js`),[]),()=>t(()=>import(`./shard028-BsFTH3Sf.js`),[]),()=>t(()=>import(`./shard029-B3dEcXPy.js`),[]),()=>t(()=>import(`./shard030-DWwA-fNs.js`),[]),()=>t(()=>import(`./shard031-RhqA_0nH.js`),[]),()=>t(()=>import(`./shard032-BlZdG1Yi.js`),[]),()=>t(()=>import(`./shard033-Dmx2lOjI.js`),[]),()=>t(()=>import(`./shard034-BLOFKJT4.js`),[]),()=>t(()=>import(`./shard035-DMXdH733.js`),[]),()=>t(()=>import(`./shard036-DzOiEn23.js`),[]),()=>t(()=>import(`./shard037-BcHfVaYM.js`),[]),()=>t(()=>import(`./shard038-KozOx-Jh.js`),[]),()=>t(()=>import(`./shard039-apdILQwC.js`),[]),()=>t(()=>import(`./shard040-BrNXGaBi.js`),[]),()=>t(()=>import(`./shard041-D6eq9h1u.js`),[]),()=>t(()=>import(`./shard042-M-L34DbY.js`),[]),()=>t(()=>import(`./shard043-Ct6_C2pN.js`),[]),()=>t(()=>import(`./shard044-Bo0iaVHx.js`),[]),()=>t(()=>import(`./shard045-9ccZ4Y_N.js`),[]),()=>t(()=>import(`./shard046-eXoP478L.js`),[]),()=>t(()=>import(`./shard047-N56r6Lsz.js`),[]),()=>t(()=>import(`./shard048-BeKX7cI8.js`),[]),()=>t(()=>import(`./shard049-hPaNN2sL.js`),[]),()=>t(()=>import(`./shard050-B-YpP0B6.js`),[]),()=>t(()=>import(`./shard051-Bww5_KB2.js`),[]),()=>t(()=>import(`./shard052-DErwF8Df.js`),[]),()=>t(()=>import(`./shard053-C-qGH4jz.js`),[]),()=>t(()=>import(`./shard054-kcSxZrSj.js`),[]),()=>t(()=>import(`./shard055-CsETBTqa.js`),[]),()=>t(()=>import(`./shard056-CdBR4qTC.js`),[]),()=>t(()=>import(`./shard057-yRUG8B9e.js`),[]),()=>t(()=>import(`./shard058-DeDAnECG.js`),[]),()=>t(()=>import(`./shard059-Dh6jbDnW.js`),[]),()=>t(()=>import(`./shard060-B5kpWrhW.js`),[]),()=>t(()=>import(`./shard061-BTnj5LZA.js`),[]),()=>t(()=>import(`./shard062-DC7LTaNc.js`),[]),()=>t(()=>import(`./shard063-C8SIGCfd.js`),[]),()=>t(()=>import(`./shard064-DLyASocW.js`),[]),()=>t(()=>import(`./shard065-Cy_yV4ry.js`),[]),()=>t(()=>import(`./shard066-BmjVQqFX.js`),[]),()=>t(()=>import(`./shard067-uZUJsqtF.js`),[]),()=>t(()=>import(`./shard068-CXVjyJU4.js`),[]),()=>t(()=>import(`./shard069-CyfmjAm-.js`),[]),()=>t(()=>import(`./shard070-CxN3xiuY.js`),[]),()=>t(()=>import(`./shard071-CP1WrYC-.js`),[]),()=>t(()=>import(`./shard072-D6L5Yr05.js`),[]),()=>t(()=>import(`./shard073-DFEzkwg2.js`),[]),()=>t(()=>import(`./shard074-BSv3rvRL.js`),[]),()=>t(()=>import(`./shard075-Bt0OjGVd.js`),[]),()=>t(()=>import(`./shard076-DZHs0uzd.js`),[])],p=new Map(d.map((e,t)=>[e,Math.floor(t/8)])),m=new Set,h=new Map,g=new Map;f.length;function _(e){return p.get(e)??-1}function v(e){if(m.has(e))return Promise.resolve();let t=h.get(e);if(t)return t;let n=f[e];if(!n)return Promise.resolve();let r=n().then(({E:t})=>{for(let[e,n]of Object.entries(t))g.set(e,n);m.add(e)}).catch(()=>{}).finally(()=>h.delete(e));return h.set(e,r),r}async function ee(e){let t=new Set;for(let n of e){let e=_(n);e>=0&&!m.has(e)&&t.add(e)}t.size&&await Promise.all([...t].map(v))}function y(e){let t=g.get(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:null}var b={maxStr:48,maxArray:2},x={maxStr:90,maxArray:5};function S(e,t){if(typeof e==`string`)return e.length>t.maxStr?`${e.slice(0,t.maxStr-1)}…`:e;if(Array.isArray(e))return e.slice(0,t.maxArray).map(e=>S(e,t));if(e&&typeof e==`object`){let n={};for(let[r,i]of Object.entries(e))n[r]=S(i,t);return n}return e}var C=new Map;function w(e,t=!1){let n=`${t?`d`:`c`}:${e}`,r=C.get(n);if(r!==void 0)return r;let i=y(e),a=_(e);if(i===null&&a>=0&&!m.has(a))return null;let o=null;if(i!==null)try{o=JSON.stringify(S(i,t?x:b))}catch{o=null}return C.set(n,o),o}var T=[`insight`,`chart`,`breakdown`,`list`,`timeline`,`compare`,`kpi`,`ring`],E=new Set([...T,`bars`,`stack`,`donut`,`gauge`]),D=new Set([`diagramflow`,`composite`,`svgblock`]),O=new Set([...T,`bars`,`stack`,`donut`,`gauge`,`diagramflow`,`composite`]),k=new Set([`map`,`markermap`,`choropleth`]),te=new Set(a.filter(e=>(e.coercer===`generic`||O.has(e.type))&&!k.has(e.type)).map(e=>e.type)),A={small:new Set([`base`,`frontier`]),mid:new Set([`base`,`frontier`,`cutting`]),frontier:new Set([`base`,`frontier`,`cutting`])};function j(e,t){return A[t].has(e.tier)}function ne(e){return a.filter(t=>j(t,e))}var re={stat:`kpi`,trend:`chart`,bar:`bars`,composition:`breakdown`,distribution:`bars`,scatter:`chart`,matrix:`breakdown`,table:`datatable`,compare:`compare`,list:`list`,steps:`list`,timeline:`timeline`,graph:`diagramflow`,tree:`breakdown`,flow:`diagramflow`,map:`geomap`,prose:`insight`,code:`codeblock`};function M(e){let t=i(e);if(t)return{min:t.colMin??Math.max(3,Math.round(t.colDefault*.7)),pref:t.colDefault}}var N=[{d:`math`,re:/\b(eigen\w*|matrix|matrices|vector|scalar|linear algebra|calculus|derivative|integral|theorem|polynomial|trigonometr\w*|algebra|geometry|equation|probabilit\w*|statistic\w*|logarithm|factorial)\b/i},{d:`science`,re:/\b(physic\w*|chemistr\w*|chemical|molecul\w*|atoms?|reaction|biolog\w*|dna|genes?|enzyme|quantum|thermodynamic\w*|electron|photosynthesis|periodic table|velocity|acceleration|momentum|voltage|circuit)\b/i},{d:`health`,re:/\b(symptom\w*|disease|diagnos\w*|medicine|medication|doctor|clinical|injur\w*|surgery|treatment|dosage|prescription|anatomy|therap\w*|illness|fever|rash|nausea|migraine)\b/i},{d:`fitness`,re:/\b(workout|exercise|gym|reps?|sets?|lift(ing|s)?|cardio|run(ning)?|marathon|muscles?|strength|hypertrophy|stretch\w*|weight loss)\b/i},{d:`money`,re:/\b(budget\w*|salary|income|invest\w*|savings?|debt|loans?|mortgage|tax(es)?|expenses?|spending|paycheck|retirement|portfolio|afford|finances?)\b/i},{d:`business`,re:/\b(revenue|profit|margins?|\bkpi\b|churn|pipeline|startup|funnel|\broi\b|b2b|saas|stakeholders?|quarterly|forecast|go-to-market)\b/i},{d:`sports`,re:/\b(soccer|football|basketball|baseball|tennis|hockey|golf|\bnba\b|\bnfl\b|\bmlb\b|playoffs?|tournament|standings|quarterback|inning|free throw|offside)\b/i},{d:`cooking`,re:/\b(recipe\w*|cook\w*|bak(e|ing)|ingredient\w*|meals?|dinner|lunch|breakfast|dish(es)?|cuisine|saute|simmer|roast|grill|kitchen)\b/i},{d:`travel`,re:/\b(trips?|travel\w*|flights?|itinerar\w*|hotels?|vacation|destinations?|tourist|visa|sightsee\w*|layover|airport)\b/i},{d:`tech`,re:/\b(wi-?fi|router|laptop|smartphone|software|devices?|install\w*|settings|browser|bluetooth|operating system|hard drive)\b/i},{d:`code`,re:/\b(code|functions?|api|algorithm\w*|debug\w*|compile\w*|syntax|typescript|javascript|python|repository|regex|database|query)\b/i},{d:`music`,re:/\b(chord\w*|melody|guitar|piano|instruments?|key signature|tempo|octave|musical scale|fret\w*|sheet music)\b/i},{d:`art`,re:/\b(painting|drawing|sketch\w*|sculpture|artists?|palette|illustration|portrait)\b/i},{d:`home`,re:/\b(apartment|rent(al|ing)?|lease|renovat\w*|furniture|plumb\w*|repair|toilet|sink|drain|garden\w*|appliances?|tenant|landlord)\b/i},{d:`legal`,re:/\b(legal|laws?|contracts?|clause|lawsuit|attorney|lawyer|liabilit\w*|statute|compliance|terms of service)\b/i},{d:`education`,re:/\b(stud(y|ying)|exams?|quiz\w*|homework|college|lecture|curriculum|flashcards?|syllabus|coursework)\b/i},{d:`nature`,re:/\b(animals?|plants?|trees?|weather|climate|ocean|mountains?|rivers?|ecosystem|species|dinosaur\w*|planets?|wildlife|geolog\w*)\b/i},{d:`history`,re:/\b(histor\w*|ancient|centur\w*|\bwar\b|empires?|civilization|dynast\w*|revolution|medieval)\b/i},{d:`language`,re:/\b(translat\w*|pronounc\w*|pronunciation|grammar|vocabular\w*|conjugat\w*|spanish|french|japanese|mandarin|verb tense)\b/i},{d:`data`,re:/\b(datasets?|data ?(science|scientist|analy\w*|pipeline|engineering|warehouse|lake|model(ing|ling)?)|\betl\b|\bsql\b|bigquery|tableau|power ?bi|spreadsheets?|\bcsv\b|pivot tables?|dataframe\w*|pandas)\b/i},{d:`design`,re:/\b(design system|\bux\b|\bui\b|user (experience|interface)|wireframe\w*|figma|prototyp\w*|mockups?|usability|visual hierarchy|component library|brand(ing| guidelines?)|typograph\w*|type ?scale)\b/i},{d:`photo`,re:/\b(photograph\w*|photos?|camera|aperture|shutter speed|\biso\b|exposure|\blens(es)?\b|\bf-?stops?\b|depth of field|lightroom|bokeh)\b/i},{d:`media`,re:/\b(videos?|films?|movies?|footage|podcasts?|youtube|streaming|cinematograph\w*|shot ?lists?|storyboard\w*|b-?roll|screenplay\w*)\b/i},{d:`productivity`,re:/\b(productivit\w*|to-?do\w*|task ?lists?|workflows?|habits?|routines?|time ?management|\bgtd\b|pomodoro|prioriti[sz]\w*|backlog|getting things done)\b/i},{d:`relationship`,re:/\b(relationships?|partner\w*|spouse|husband|wife|boyfriend|girlfriend|marriage|married|dating|breakups?|broke up|divorce\w*|friendships?|in-?laws?|coworkers?|my (boss|friend|mom|dad|family))\b/i},{d:`news`,re:/\b(news|headlines?|current events|breaking|press release|journalis\w*|newspapers?|world events|latest (on|news)|what'?s happening)\b/i},{d:`parenting`,re:/\b(parent\w*|toddler\w*|infants?|newborns?|\bbaby\b|babies|nursery|diaper\w*|tantrum\w*|potty training|bedtime|my (kid|child|son|daughter|baby)|developmental milestones?)\b/i},{d:`writing`,re:/\b(write|writing|rewrite|essays?|paragraphs?|\bdrafts?\b|cover letters?|poems?|poetry|short stor(y|ies)|novels?|screenplay\w*|proofread|prose|narrative|copywrit\w*)\b/i},{d:`decision`,re:/\b(decide|decisions?|choose|choosing|which (one|option|should)|pros and cons|trade-?offs?|should i (buy|get|choose|pick|go)|\bvs\.?\b|versus|compare (these|the|my|two|options))\b/i},{d:`shopping`,re:/\b(buy|buying|purchas\w*|shopping|gifts?|deals?|discount\w*|coupons?|product reviews?|wishlists?|add to cart)\b/i},{d:`reference`,re:/\b(define|definition of|meaning of|look ?up|dictionary|thesaurus|encyclopedia|glossary|translat\w*|spell(ing)? of|synonyms?|antonyms?)\b/i},{d:`lifestyle`,re:/\b(collectibles?|my collection|stamp collection|coin collection|card collection|vinyl collection|collecting (?:stamps|coins|cards|vinyl|memorabilia)|hobby collection|memorabilia)\b/i}];function P(e,t){let n=(t??[]).slice(-2).map(e=>typeof e?.content==`string`?e.content:``).join(` `);return(e+` `+n).toLowerCase()}function ie(e,t){let n=P(e||``,t),r=new Set;for(let{d:e,re:t}of N)t.test(n)&&r.add(e);return r}function ae(e,t){if(!e||e.length===0||t.size===0)return!0;for(let n of e)if(t.has(n))return!0;return!1}var F={circuitdiagram:[`science`,`tech`],molecularstructure:[`science`,`health`],periodictable:[`science`],reactionmechanism:[`science`],bodymap:[`health`,`fitness`],labpanel:[`health`],medicationschedule:[`health`],musicstaff:[`music`],chorddiagram:[`music`],sportspitch:[`sports`]};function oe(e){return e.domains??F[e.type]}var I=/\b(kill (myself|him|her|them)|killing myself|end (my|his|her|their) life|ending my life|take my (own )?life|don'?t want to (be here|live|wake up|exist)|want(ing)? to die|wanna die|suicid\w*|self.?harm|harm myself|hurt(ing)? myself|cut(ting)? myself|no reason to (live|go on)|better off dead|overdos\w*)\b/i;function se(e,t){return I.test(P(e||``,t))}var L=[{test:/\b(state machine|finite[- ]state|\bfsm\b|state diagram|state transitions?|states? and transitions?)\b/,type:`statemachine`,over:`diagram`},{test:/\b(sequence diagram|interaction diagram|message sequence|request[- ]response (?:flow|cycle)|handshake (?:between|sequence)|who calls whom)\b/,type:`sequencediagram`,over:`diagram`},{test:/\b(er[- ]?diagram|entity[- ]relationship|database schema|data model\b|tables? and (?:their )?(?:keys|relationships?))\b/,type:`erdiagram`,over:`diagram`},{test:/\b(risk matrix|probability[- ](?:and[- ]|x[- ]|by[- ])?impact|likelihood[- ](?:and[- ]|x[- ]|vs[- ])?impact|impact[- ](?:and[- ])?likelihood|risk (?:heat ?map|grid))\b/,type:`riskmatrix`,over:`matrixgrid`},{test:/\b(confusion matrix|true positives?|false positives?|precision and recall grid)\b/,type:`confusionmatrix`,over:`matrix`},{test:/\b(magic quadrant|2\s?[x×]\s?2(?: matrix| grid)?|four[- ]quadrant|positioning (?:map|matrix)|priority matrix|eisenhower (?:matrix|box))\b/,type:`quadrant`,over:`compare`},{test:/\b(?:plot|graph|sketch) (?:the )?(?:function|equation|curve|y\s*=|f\(x\))|\bgraph of (?:y|f|the function)\b|\b(?:sine|cosine|tangent) (?:curve|wave|graph)\b|\bparabola\b/,type:`plot`,over:`scatter`},{test:/\bperiodic table\b/,type:`periodictable`,over:`datatable`},{test:/\b(?:timeline|chronology|history) of\b.{0,48}\b(?:\d{3,4}s?|\d{1,2}(?:th|st|nd|rd) century|\bbce?\b|\bad\b|war|empire|dynasty|revolution|civili[sz]ation)\b/,type:`chronologicaltimeline`,over:`timeline`},{test:/\bcompare and contrast\b|\bcomparison (?:table|grid|matrix|chart)\b|\b(?:differences?|distinctions?) between\b|\bhow do\b.{0,40}\bdiffer\b|\b[\w-]+ vs\.? [\w-]+ vs\.? [\w-]+\b/,type:`comparematrix`,over:`compare`},{test:/\b(?:bfs|dfs|breadth[- ]first|depth[- ]first)\b.{0,60}\b(?:graph|node|vertex|vertices)\b|\btrace\b.{0,40}\b(?:bfs|dfs|breadth[- ]first|depth[- ]first)\b|\b(?:bfs|dfs) (?:step|traversal|from)\b/,type:`graphtrace`,over:`datastructure`},{test:/\b(?:dp|dynamic[- ]programming|memoiz[ae]tion|memoization)\s+table\b|\b(?:fill|filling)[- ](?:in )?(?:the )?(?:dp|dynamic[- ]programming)\b|\b(?:lcs|edit[- ]distance|knapsack|coin[- ]change)\b.{0,60}\btable\b/,type:`dptable`,over:`algorithmtrace`},{test:/\bhash\s+(?:table|map)\b.{0,60}\b(?:collision|chaining|bucket|separate[- ]chaining|linear[- ]probing)\b|\bseparate[- ]chaining\b|\bhash function\b.{0,50}\bbucket\b/,type:`hashtable`,over:`datastructure`},{test:/\b(?:prefix[- ]tree|trie\b|autocompletion? (?:using|with|via) (?:a )?trie|insert.{0,30}\btrie\b|search.{0,30}\btrie\b)/,type:`trie`,over:`datastructure`},{test:/\b(?:inorder|preorder|postorder|level[- ]order)\s+traversal\b|\btrace\b.{0,40}\b(?:binary[- ]tree|bst)\b|\bwalk[- ]?(?:me[- ])?through\b.{0,50}\b(?:binary[- ]tree|bst)\b|\bbst\s+(?:insert|search|delete)\b/,type:`binarytree`,over:`datastructure`},{test:/\b(?:bubble|merge|quick|insertion|selection|heap)\s+sort\b|\bsort(?:ing)?\s+algorithm\b.{0,50}\b(?:step|animate|visual|trace)\b|\bvisuali[sz]e\b.{0,40}\bsort\b|\banimated?\b.{0,30}\bsort\b/,type:`sortingviz`,over:`algorithmtrace`},{test:/\b(?:toulmin\b|grounds?\s+and\s+warrant|warrant\s+and\s+(?:grounds?|backing)|claim[\s,]+grounds?[\s,]+warrant)\b/i,type:`toulmin`,over:`argumentmap`},{test:/\b(?:character\s+(?:map|web|network|relationships?)|relationship\s+(?:map|web|diagram)\b.{0,50}\bcharacter|who(?:'s| is)\s+(?:who|friends?|rivals?)|cast\s+of\s+characters?|factions?\s+and\s+alliances?|allies?\s+and\s+rivals?)\b/i,type:`castmap`,over:`network`},{test:/\b(?:freytag|three[- ]act\s+structure|hero(?:'s)?\s+journey|save\s+the\s+cat|plot\s+structure\b|story\s+arc\b|narrative\s+arc\b|story\s+structure\b)\b/i,type:`storyarc`,over:`beatsheet`},{test:/\b(?:rhetorical\s+devices?|literary\s+devices?|figures?\s+of\s+speech|identify\s+the\s+(?:devices?|techniques?|metaphors?)|highlight\s+the\s+(?:metaphors?|similes?|alliteration)|mark\s+the\s+(?:devices?|techniques?))\b/i,type:`devicemark`,over:`annotateddoc`},{test:/\b(?:etymology\b|word\s+origin\b|roots?\s+of\s+the\s+word|where\s+does\s+(?:the\s+word\s+)?[a-z]+\s+come\s+from|latin\s+(?:and\s+greek\s+)?roots?\s+of|word\s+history)\b/i,type:`etymtree`,over:`dictionary`}];function R(e){let t=e.toLowerCase(),n=[],r=new Set;for(let e of L)e.test.test(t)&&!r.has(e.type)&&(r.add(e.type),n.push({type:e.type,over:e.over}));return n}function z(e){return e.length?`BEST-FIT COMPONENT — the content maps to a purpose-built block: prefer ${e.map(e=>`${e.type} (not ${e.over})`).join(`, `)}. The specialist renders this exact structure correctly where the generic only approximates it.`:``}var B={small:8,mid:24,frontier:30},ce=3,V=2,H=2,U=1.6,W=1.2,G=1,le=.6,K=2,ue=.8,q={base:1,frontier:1.3,cutting:1.6},J=1.2,Y=.3,X=2.5,Z=.3,de=new Set,fe=.2,pe=[`teachdiagram`,`workedexample`,`quiz`,`flashcard`],me=1.4,he=new Set([`nav`,`forms`,`pickers`,`overlays`]),ge=new Set([`kbd`,`spinner`,`skeleton`,`sliderinput`,`rangefilter`,`ratinginput`,`emptystate`,`segmented`,`toaststack`,`divider`,`spacer`]);function _e(e){return he.has(e.family)||ge.has(e.type)}function ve(e,t){let n=0;for(let r of e.dataShapes)n+=t[r]??0;return n}function ye(e){return e.shapeFit+G*e.intentPts+K*e.semFit}function be(e,t,n,r=de,i=de,a=!1){let o=ve(e,t),s=1+U*o,c=Math.max(0,e.wowWeight)**+W,l=(q[e.tier]??1)*(e.interactive?J:1),u=n.has(e.type)&&o===0?Y:1,d=r.has(e.type)?X:i.has(e.type)?Z:1,f=a&&e.family===`learn`?me:1;return s*c*l*u*d*f}function xe(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}function Se(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Ce=class{pool;tree;size;highBit;total=0;live;constructor(e){this.pool=e,this.size=e.length,this.live=e.length,this.tree=new Float64Array(this.size+1);for(let t=0;t<this.size;t++)this.add(t,e[t].weight),this.total+=e[t].weight;this.highBit=this.size>0?1<<31-Math.clz32(this.size):0}add(e,t){for(let n=e+1;n<=this.size;n+=n&-n)this.tree[n]+=t}locate(e){let t=0,n=0;for(let r=this.highBit;r>0;r>>=1){let i=t+r;i<=this.size&&n+this.tree[i]<e&&(t=i,n+=this.tree[i])}return Math.min(t,this.size-1)}take(e){let t=this.locate(e),n=this.pool[t];return this.add(t,-n.weight),this.total-=n.weight,this.live--,n}};function we(e,t,n,r){let i=new Ce(e),a=[];for(;a.length<t&&i.live>0&&!(i.total<=0);){let e=i.take(n()*i.total).meta,t=r.family.get(e.family)??0;if(t>=V)continue;let o=r.archetype.get(e.archetype)??0;o>=H||(a.push(e),r.family.set(e.family,t+1),r.archetype.set(e.archetype,o+1))}return a}function Q(e){return Math.max(.5,.15*e)}function Te(e){return[...e].sort((e,t)=>t.fit-e.fit||(e.meta.type<t.meta.type?-1:1))}var Ee=2;function De(e,t,n,r){let i=Te(e),a=[],o=0;for(;o<i.length&&a.length<t;){let e=i[o].fit,s=e-Q(e),c=o;for(;c<i.length&&i[c].fit>=s;)c++;a.push(...we(i.slice(o,c),t-a.length,n,r)),o=c}return a}var Oe=5;function ke(e){let t=e.itemShapes??[],n=e.stringItems??[];if(!t.length&&!n.length)return``;let r=e=>{let t=e.children,n=[e.text,t?r(t):void 0].filter(Boolean).join(`, `);return`${e.prop}[]: {${n}}`};return` · ${[...t.map(r),...n.map(e=>`${e}[]: plain strings`)].join(`, `)}`}function Ae(e){let t=e.propHints;if(!t)return``;let n=Object.entries(t);return n.length?` · hints: ${n.map(([e,t])=>`${e}=${t}`).join(`, `)}`:``}function $(e,t=!1,n=!1){let r=e.requires.length?e.requires.join(`, `):`—`,i=t?w(e.type,n):null;if(i)return`- ${e.type} — ${e.blurb} · needs: ${r}${o(e)} · example: ${i}`;let a=e.optional.slice(0,Oe),s=a.length?` · richer with: ${a.join(`, `)}`:``;return`- ${e.type} — ${e.blurb} · needs: ${r}${ke(e)}${o(e)}${Ae(e)}${s}`}function je(){return T.map(r).filter(e=>!!e).map(e=>$(e)).join(`
1
+ import{n as e,t}from"./preload-helper-CiWYd9n-.js";import{n,t as r}from"./catalog-CRekRbKO.js";import{n as i,t as a}from"./facts-BUGuVUIc.js";import{t as o}from"./liveSchema-Z_39HuDI.js";import{a as s,i as c,n as l,t as u}from"./shapes-BwoDrn09.js";var d=`insight.scorecard.trendtile.waterfall.funnel.flightchart.deltacascade.bulletkpi.bulletchart.comparebars.bcgmatrix.pivot.groupedbars.leaderboard.datatable.roadmap.gantt.kanban.plandag.milestones.progressbar.statustimeline.healthgrid.kpidashboard.issuetree.meetingnotes.sparkstat.counter.herostat.streamgraph.scorebadge.radar.smallmultiples.arearange.waffle.histogram.boxplot.sparktable.percentilebar.statpair.calibration.ratinginput.sliderinput.segmented.rangefilter.stepindicator.pregnancyweek.cycletrack.contractiontimer.reasoning.routing.agenttrace.toolcalls.retrieval.embedmap.tokenstream.modelcompare.whatchanged.factcheck.confidencemeter.citationchain.sourcelist.claimgrid.highlightsnippet.redline.annotateddoc.docoutline.network.sunburst.researchsummary.hypothesiscard.dotplot.controlchart.errorbars.kpi.plot.matrix.diagram.diagramflow.docview.pdfreader.datastructure.bigo.complexitysummary.confusionmatrix.protocolstack.logicgates.algorithmtrace.sortingviz.graphtrace.binarytree.dptable.hashtable.trie.gridtrace.sysarchdiagram.recursiontree.sequencealign.compare.timeline.clinicaltimeline.medicationschedule.clearancematrix.anatomyfigure.odontogram.ecgstrip.vitalstrip.careplan.triageboard.mentalhealthscreen.callout.casebrief.discoverytracker.patentclaimchart.litigationtimeline.billtracker.immigrationcase.caseload.verdictcard.scenarioset.divider.wizard.goaltree.candlestick.lollipop.decisiontree.slopegraph.dumbbell.powersample.abtestresult.orgchart.treemap.processflow.journeymap.userpersona.swimlane.bubble.matrixgrid.treetable.footnotetable.tabs.deflist.faq.accordion.riskmatrix.threatmodel.pricingtable.raci.dimensiondrawing.explodedview.weldsymbol.cutlist.linebalance.moodboard.palette.photo.geomap.bars.storystrip.carousel.lightbox.beforeafter.imagecallouts.annotcallouts.videoembed.waveform.sankey.proscons.casestudy.pullquote.takeaways.skeleton.emptystate.mediacard.voicestyle.exposuretriangle.colorwheel.artanalysis.shotlist.runofshow.beatsheet.craftchart.patternpiece.storyarc.castmap.devicemark.creativetest.brandguide.musicstaff.flashcard.chronologicaltimeline.chorddiagram.mixerboard.pianokeys.fretboardmap.circleoffifths.practicelog.gallery.togglegroup.radiogroup.svgblock.scalefelt.moonphase.skychart.orbitdiagram.sizecompare.donut.foodweb.taxonrank.list.speciescard.scoreboard.ring.standings.bump.scoutingreport.tournamentbracket.banner.checklist.epicurve.web.positioncard.differential.growthcurve.painscale.badgeset.livescore.gameboard.boardgamescore.tierlist.seatingchart.checkboxgroup.numberstepper.picturesequence.vaxschedule.vetpatientchart.stickerchart.avatar.avatargroup.chipset.kbd.codeblock.toaststack.spinner.notification.tooltip.hovercard.a11yaudit.usabilityfindings.typespec.navbar.sidenav.treeview.breadcrumb.menubar.toolbar.megamenu.commandbar.pagination.commandk.modal.drawer.bottomnav.screenmap.wireframe.textfield.fileupload.textarea.combobox.formpanel.select.buttonbar.switchset.actionchecklist.otp.trustmap.datepicker.calendarpick.timepicker.daterange.colorpicker.tagsinput.searchselect.sheet.menu.popover.contextmenu.confirmdialog.roomblockdashboard.messagedraft.chatthread.dialogue.variants.verse.slidedeck.screenplay.socialpost.storystructure.ideaboard.longread.variantswitch.forecast.agenda.picks.transitroute.timezones.lifewheel.promptset.prayertimes.amortization.receipt.settleup.bracketbar.stackedbars.budgetallocator.paystub.taxbracket.taxreturnsummary.siteplan.zoningmap.factsheet.newsdigest.dictionary.translation.pronunciation.gloss.stacktrace.syntaxbreakdown.codewalk.hearit.ipachart.scriptstroke.paralleltext.comparematrix.toulmin.etymtree.rollcall.termbase.historicalperson.onthisday.countrycard.worldgrid.warconflict.distinctioncard.chart.stack.messagescriptset.eligibilitycheck.bridge.supplydemand.payoffdiagram.yieldcurve.efficientfrontier.bondladder.collectiontracker.cma.claimagecompare.scatter.companionnote.breathpacer.sleepcycle.heat.bodymap.calheat.workoutplan.macrobreakdown.runninglog.zoneladder.streakgrid.copingmenu.thoughtrecord.habittracker.readinglist.maproute.packlist.weathernow.pictogramchart.menucard.quadrant.venn.recipecard.cocktailcard.ingredientmatrix.plangrid.nutritionlabel.unitconvert.seasonband.worthit.reviewsynth.sizechart.breakdown.gauge.countdown.blanks.reframecard.talktrack.resume.understand.schema.buildprog.sponsorshiptracker.contentcalendar.podcastplanner.marimekko.timeseriesdecomposition.financialstatement.pareto.flowchord.evidencetrace.cohortgrid.fivewhychain.pipeline.quotes.emotionwheel.livecompute.captable.vestingschedule.termsheet.fundraisingrounds.saferterms.dilutionwaterfall.threestatementlink.tamsam.trainingcurve.burnrunway.ridgeplot.correlationheatmap.scatterplotmatrix.roccurve.precisionrecallcurve.biasvariance.gradientdescent.nnarchitecture.datadictionary.datapipeline.ablationtable.interviewscorecard.paybandchart.headcountplan.dosdonts.breakeven.depreciationschedule.logicmodel.fiveforces.cvssscorecard.changelog.lessonplan.equationblock.numberline.workedexample.quiz.quizsession.piedonut.distributioncurve.dualaxis.scatterregression.molecularstructure.sequencediagram.diffviewer.sensitivitytable.periodictable.elementcard.circuitdiagram.statemachine.erdiagram.labpanel.geometrycanvas.freebodydiagram.vectorspace.reactionmechanism.synthesisroute.hazardcard.labprotocol.argumentmap.teachdiagram.fractionbar.gridmatrix.conjugation.probabilitytree.mindshape.world.areaplot.wave.energydiagram.phylotree.parsetree.eratimeline.celldiagram.raydiagram.interferencepattern.vectorfield.phasediagram.particlemodel.bohrmodel.orbitaldiagram.pedigree.indifferencecurve.causationchain.equationbalancer.yieldcalc.vseprmolecule.titrationcurve.unitcircle.solidfigure.crosssection.loaddiagram.scansionmark.clockface.moneytray.placevaluechart.columnarithmetic.pictograph.populationpyramid.shapecard.letterform.toolscale.cyclewheel.phonicsword.sightwordlist.alphabetchart.morphemebreakdown.skilltree.violinplot.stemleafplot.surfaceplot.qqplot.samplingdistribution.gridtransform.phaseportrait.twocolumnproof.polarplot.taylorseries.areamodel.dnahelix.plasmidmap.linespectrum.pyramidtiers.rubric.gradebook.spectrumtable.fmeatable.billofmaterials.chromatogram.stressstraincurve.gatingplot.expressionheatmap.gellane.parallelcoordinates.primefactortree.numbersequence.constantcard.baseconversion.doseladder.flow.analogymap.logstream.gitgraph.queryplan.flamegraph.regexscope.terminal.httpexchange.latencydist.ecdf.codemap.checks.diff.componentapi.sportspitch.developmentmilestone.dentaltreatmentplan.estateplanchecklist.subtextdecode.rehearsal.caregivercoord.allocatepeople.lifeline.familytree.relationshipmap.vendortracker.wiringdiagram.pipingschematic.controlblockdiagram.floorplan.howtosteps.spacefit.thesis.alignmentgauge.standingalerts.sourceslineage.preflightchecklist.inventoryreorder.visachecklist.hrdiagram.ternaryplot.parliamentseats.prooftree.fishbone.classdiagram.energybarchart.karyotype.numberbond.posbreakdown.frayermodel.forestplot.cashflowtimeline.businesscanvas.guitartab.pianoroll.stitchchart.wordsearch.playingcards.statblock`.split(`.`);e();var f=[()=>t(()=>import(`./shard000-Bx6Nmt0m.js`),[]),()=>t(()=>import(`./shard001-CL6O9SLr.js`),[]),()=>t(()=>import(`./shard002-vLQ0Ss-O.js`),[]),()=>t(()=>import(`./shard003-kKZdpzuh.js`),[]),()=>t(()=>import(`./shard004-CdVohAu1.js`),[]),()=>t(()=>import(`./shard005-CMzF_uJB.js`),[]),()=>t(()=>import(`./shard006-DQoDWuoN.js`),[]),()=>t(()=>import(`./shard007-Ck0N0IUk.js`),[]),()=>t(()=>import(`./shard008-Dt395x0Q.js`),[]),()=>t(()=>import(`./shard009-D_z8Lhqh.js`),[]),()=>t(()=>import(`./shard010-CQfR6lnk.js`),[]),()=>t(()=>import(`./shard011-l-w2t2Ie.js`),[]),()=>t(()=>import(`./shard012-BTw_UO1C.js`),[]),()=>t(()=>import(`./shard013-D8ZjKKYb.js`),[]),()=>t(()=>import(`./shard014-Cth_76It.js`),[]),()=>t(()=>import(`./shard015-DdYJVsHx.js`),[]),()=>t(()=>import(`./shard016-BdlBf9uZ.js`),[]),()=>t(()=>import(`./shard017-C3HTxh6t.js`),[]),()=>t(()=>import(`./shard018-Mf4wvqVk.js`),[]),()=>t(()=>import(`./shard019-Dpcy1Arx.js`),[]),()=>t(()=>import(`./shard020-BNvKfQld.js`),[]),()=>t(()=>import(`./shard021-D0kpI_PQ.js`),[]),()=>t(()=>import(`./shard022-Cjms7kAe.js`),[]),()=>t(()=>import(`./shard023-Bdwci7fy.js`),[]),()=>t(()=>import(`./shard024-BBoyPtpP.js`),[]),()=>t(()=>import(`./shard025-lMGpgN_0.js`),[]),()=>t(()=>import(`./shard026-Bp3UVI4_.js`),[]),()=>t(()=>import(`./shard027-C4HTpdeT.js`),[]),()=>t(()=>import(`./shard028-BsFTH3Sf.js`),[]),()=>t(()=>import(`./shard029-B3dEcXPy.js`),[]),()=>t(()=>import(`./shard030-DWwA-fNs.js`),[]),()=>t(()=>import(`./shard031-RhqA_0nH.js`),[]),()=>t(()=>import(`./shard032-BlZdG1Yi.js`),[]),()=>t(()=>import(`./shard033-Dmx2lOjI.js`),[]),()=>t(()=>import(`./shard034-BLOFKJT4.js`),[]),()=>t(()=>import(`./shard035-DMXdH733.js`),[]),()=>t(()=>import(`./shard036-DzOiEn23.js`),[]),()=>t(()=>import(`./shard037-BcHfVaYM.js`),[]),()=>t(()=>import(`./shard038-KozOx-Jh.js`),[]),()=>t(()=>import(`./shard039-apdILQwC.js`),[]),()=>t(()=>import(`./shard040-BrNXGaBi.js`),[]),()=>t(()=>import(`./shard041-D6eq9h1u.js`),[]),()=>t(()=>import(`./shard042-M-L34DbY.js`),[]),()=>t(()=>import(`./shard043-Ct6_C2pN.js`),[]),()=>t(()=>import(`./shard044-Bo0iaVHx.js`),[]),()=>t(()=>import(`./shard045-9ccZ4Y_N.js`),[]),()=>t(()=>import(`./shard046-eXoP478L.js`),[]),()=>t(()=>import(`./shard047-N56r6Lsz.js`),[]),()=>t(()=>import(`./shard048-BeKX7cI8.js`),[]),()=>t(()=>import(`./shard049-hPaNN2sL.js`),[]),()=>t(()=>import(`./shard050-B-YpP0B6.js`),[]),()=>t(()=>import(`./shard051-Bww5_KB2.js`),[]),()=>t(()=>import(`./shard052-DErwF8Df.js`),[]),()=>t(()=>import(`./shard053-C-qGH4jz.js`),[]),()=>t(()=>import(`./shard054-kcSxZrSj.js`),[]),()=>t(()=>import(`./shard055-CsETBTqa.js`),[]),()=>t(()=>import(`./shard056-CdBR4qTC.js`),[]),()=>t(()=>import(`./shard057-yRUG8B9e.js`),[]),()=>t(()=>import(`./shard058-DeDAnECG.js`),[]),()=>t(()=>import(`./shard059-Dh6jbDnW.js`),[]),()=>t(()=>import(`./shard060-B5kpWrhW.js`),[]),()=>t(()=>import(`./shard061-BTnj5LZA.js`),[]),()=>t(()=>import(`./shard062-DC7LTaNc.js`),[]),()=>t(()=>import(`./shard063-C8SIGCfd.js`),[]),()=>t(()=>import(`./shard064-DLyASocW.js`),[]),()=>t(()=>import(`./shard065-Cy_yV4ry.js`),[]),()=>t(()=>import(`./shard066-BmjVQqFX.js`),[]),()=>t(()=>import(`./shard067-uZUJsqtF.js`),[]),()=>t(()=>import(`./shard068-CXVjyJU4.js`),[]),()=>t(()=>import(`./shard069-CyfmjAm-.js`),[]),()=>t(()=>import(`./shard070-CxN3xiuY.js`),[]),()=>t(()=>import(`./shard071-CP1WrYC-.js`),[]),()=>t(()=>import(`./shard072-D6L5Yr05.js`),[]),()=>t(()=>import(`./shard073-DFEzkwg2.js`),[]),()=>t(()=>import(`./shard074-BSv3rvRL.js`),[]),()=>t(()=>import(`./shard075-Bt0OjGVd.js`),[]),()=>t(()=>import(`./shard076-DZHs0uzd.js`),[])],p=new Map(d.map((e,t)=>[e,Math.floor(t/8)])),m=new Set,h=new Map,g=new Map;f.length;function _(e){return p.get(e)??-1}function v(e){if(m.has(e))return Promise.resolve();let t=h.get(e);if(t)return t;let n=f[e];if(!n)return Promise.resolve();let r=n().then(({E:t})=>{for(let[e,n]of Object.entries(t))g.set(e,n);m.add(e)}).catch(()=>{}).finally(()=>h.delete(e));return h.set(e,r),r}async function ee(e){let t=new Set;for(let n of e){let e=_(n);e>=0&&!m.has(e)&&t.add(e)}t.size&&await Promise.all([...t].map(v))}function y(e){let t=g.get(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:null}var b={maxStr:48,maxArray:2},x={maxStr:90,maxArray:5};function S(e,t){if(typeof e==`string`)return e.length>t.maxStr?`${e.slice(0,t.maxStr-1)}…`:e;if(Array.isArray(e))return e.slice(0,t.maxArray).map(e=>S(e,t));if(e&&typeof e==`object`){let n={};for(let[r,i]of Object.entries(e))n[r]=S(i,t);return n}return e}var C=new Map;function w(e,t=!1){let n=`${t?`d`:`c`}:${e}`,r=C.get(n);if(r!==void 0)return r;let i=y(e),a=_(e);if(i===null&&a>=0&&!m.has(a))return null;let o=null;if(i!==null)try{o=JSON.stringify(S(i,t?x:b))}catch{o=null}return C.set(n,o),o}var T=[`insight`,`chart`,`breakdown`,`list`,`timeline`,`compare`,`kpi`,`ring`],E=new Set([...T,`bars`,`stack`,`donut`,`gauge`]),D=new Set([`diagramflow`,`composite`,`svgblock`]),O=new Set([...T,`bars`,`stack`,`donut`,`gauge`,`diagramflow`,`composite`]),k=new Set([`map`,`markermap`,`choropleth`]),te=new Set(a.filter(e=>(e.coercer===`generic`||O.has(e.type))&&!k.has(e.type)).map(e=>e.type)),A={small:new Set([`base`,`frontier`]),mid:new Set([`base`,`frontier`,`cutting`]),frontier:new Set([`base`,`frontier`,`cutting`])};function j(e,t){return A[t].has(e.tier)}function ne(e){return a.filter(t=>j(t,e))}var re={stat:`kpi`,trend:`chart`,bar:`bars`,composition:`breakdown`,distribution:`bars`,scatter:`chart`,matrix:`breakdown`,table:`datatable`,compare:`compare`,list:`list`,steps:`list`,timeline:`timeline`,graph:`diagramflow`,tree:`breakdown`,flow:`diagramflow`,map:`geomap`,prose:`insight`,code:`codeblock`};function M(e){let t=i(e);if(t)return{min:t.colMin??Math.max(3,Math.round(t.colDefault*.7)),pref:t.colDefault}}var N=[{d:`math`,re:/\b(eigen\w*|matrix|matrices|vector|scalar|linear algebra|calculus|derivative|integral|theorem|polynomial|trigonometr\w*|algebra|geometry|equation|probabilit\w*|statistic\w*|logarithm|factorial)\b/i},{d:`science`,re:/\b(physic\w*|chemistr\w*|chemical|molecul\w*|atoms?|reaction|biolog\w*|dna|genes?|enzyme|quantum|thermodynamic\w*|electron|photosynthesis|periodic table|velocity|acceleration|momentum|voltage|circuit)\b/i},{d:`health`,re:/\b(symptom\w*|disease|diagnos\w*|medicine|medication|doctor|clinical|injur\w*|surgery|treatment|dosage|prescription|anatomy|therap\w*|illness|fever|rash|nausea|migraine)\b/i},{d:`fitness`,re:/\b(workout|exercise|gym|reps?|sets?|lift(ing|s)?|cardio|run(ning)?|marathon|muscles?|strength|hypertrophy|stretch\w*|weight loss)\b/i},{d:`money`,re:/\b(budget\w*|salary|income|invest\w*|savings?|debt|loans?|mortgage|tax(es)?|expenses?|spending|paycheck|retirement|portfolio|afford|finances?)\b/i},{d:`business`,re:/\b(revenue|profit|margins?|\bkpi\b|churn|pipeline|startup|funnel|\broi\b|b2b|saas|stakeholders?|quarterly|forecast|go-to-market)\b/i},{d:`sports`,re:/\b(soccer|football|basketball|baseball|tennis|hockey|golf|\bnba\b|\bnfl\b|\bmlb\b|playoffs?|tournament|standings|quarterback|inning|free throw|offside)\b/i},{d:`cooking`,re:/\b(recipe\w*|cook\w*|bak(e|ing)|ingredient\w*|meals?|dinner|lunch|breakfast|dish(es)?|cuisine|saute|simmer|roast|grill|kitchen)\b/i},{d:`travel`,re:/\b(trips?|travel\w*|flights?|itinerar\w*|hotels?|vacation|destinations?|tourist|visa|sightsee\w*|layover|airport)\b/i},{d:`tech`,re:/\b(wi-?fi|router|laptop|smartphone|software|devices?|install\w*|settings|browser|bluetooth|operating system|hard drive)\b/i},{d:`code`,re:/\b(code|functions?|api|algorithm\w*|debug\w*|compile\w*|syntax|typescript|javascript|python|repository|regex|database|query)\b/i},{d:`music`,re:/\b(chord\w*|melody|guitar|piano|instruments?|key signature|tempo|octave|musical scale|fret\w*|sheet music)\b/i},{d:`art`,re:/\b(painting|drawing|sketch\w*|sculpture|artists?|palette|illustration|portrait)\b/i},{d:`home`,re:/\b(apartment|rent(al|ing)?|lease|renovat\w*|furniture|plumb\w*|repair|toilet|sink|drain|garden\w*|appliances?|tenant|landlord)\b/i},{d:`legal`,re:/\b(legal|laws?|contracts?|clause|lawsuit|attorney|lawyer|liabilit\w*|statute|compliance|terms of service)\b/i},{d:`education`,re:/\b(stud(y|ying)|exams?|quiz\w*|homework|college|lecture|curriculum|flashcards?|syllabus|coursework)\b/i},{d:`nature`,re:/\b(animals?|plants?|trees?|weather|climate|ocean|mountains?|rivers?|ecosystem|species|dinosaur\w*|planets?|wildlife|geolog\w*)\b/i},{d:`history`,re:/\b(histor\w*|ancient|centur\w*|\bwar\b|empires?|civilization|dynast\w*|revolution|medieval)\b/i},{d:`language`,re:/\b(translat\w*|pronounc\w*|pronunciation|grammar|vocabular\w*|conjugat\w*|spanish|french|japanese|mandarin|verb tense)\b/i},{d:`data`,re:/\b(datasets?|data ?(science|scientist|analy\w*|pipeline|engineering|warehouse|lake|model(ing|ling)?)|\betl\b|\bsql\b|bigquery|tableau|power ?bi|spreadsheets?|\bcsv\b|pivot tables?|dataframe\w*|pandas)\b/i},{d:`design`,re:/\b(design system|\bux\b|\bui\b|user (experience|interface)|wireframe\w*|figma|prototyp\w*|mockups?|usability|visual hierarchy|component library|brand(ing| guidelines?)|typograph\w*|type ?scale)\b/i},{d:`photo`,re:/\b(photograph\w*|photos?|camera|aperture|shutter speed|\biso\b|exposure|\blens(es)?\b|\bf-?stops?\b|depth of field|lightroom|bokeh)\b/i},{d:`media`,re:/\b(videos?|films?|movies?|footage|podcasts?|youtube|streaming|cinematograph\w*|shot ?lists?|storyboard\w*|b-?roll|screenplay\w*)\b/i},{d:`productivity`,re:/\b(productivit\w*|to-?do\w*|task ?lists?|workflows?|habits?|routines?|time ?management|\bgtd\b|pomodoro|prioriti[sz]\w*|backlog|getting things done)\b/i},{d:`relationship`,re:/\b(relationships?|partner\w*|spouse|husband|wife|boyfriend|girlfriend|marriage|married|dating|breakups?|broke up|divorce\w*|friendships?|in-?laws?|coworkers?|my (boss|friend|mom|dad|family))\b/i},{d:`news`,re:/\b(news|headlines?|current events|breaking|press release|journalis\w*|newspapers?|world events|latest (on|news)|what'?s happening)\b/i},{d:`parenting`,re:/\b(parent\w*|toddler\w*|infants?|newborns?|\bbaby\b|babies|nursery|diaper\w*|tantrum\w*|potty training|bedtime|my (kid|child|son|daughter|baby)|developmental milestones?)\b/i},{d:`writing`,re:/\b(write|writing|rewrite|essays?|paragraphs?|\bdrafts?\b|cover letters?|poems?|poetry|short stor(y|ies)|novels?|screenplay\w*|proofread|prose|narrative|copywrit\w*)\b/i},{d:`decision`,re:/\b(decide|decisions?|choose|choosing|which (one|option|should)|pros and cons|trade-?offs?|should i (buy|get|choose|pick|go)|\bvs\.?\b|versus|compare (these|the|my|two|options))\b/i},{d:`shopping`,re:/\b(buy|buying|purchas\w*|shopping|gifts?|deals?|discount\w*|coupons?|product reviews?|wishlists?|add to cart)\b/i},{d:`reference`,re:/\b(define|definition of|meaning of|look ?up|dictionary|thesaurus|encyclopedia|glossary|translat\w*|spell(ing)? of|synonyms?|antonyms?)\b/i},{d:`lifestyle`,re:/\b(collectibles?|my collection|stamp collection|coin collection|card collection|vinyl collection|collecting (?:stamps|coins|cards|vinyl|memorabilia)|hobby collection|memorabilia)\b/i}];function P(e,t){let n=(t??[]).slice(-2).map(e=>typeof e?.content==`string`?e.content:``).join(` `);return(e+` `+n).toLowerCase()}function ie(e,t){let n=P(e||``,t),r=new Set;for(let{d:e,re:t}of N)t.test(n)&&r.add(e);return r}function ae(e,t){if(!e||e.length===0||t.size===0)return!0;for(let n of e)if(t.has(n))return!0;return!1}var F={circuitdiagram:[`science`,`tech`],molecularstructure:[`science`,`health`],periodictable:[`science`],reactionmechanism:[`science`],bodymap:[`health`,`fitness`],labpanel:[`health`],medicationschedule:[`health`],musicstaff:[`music`],chorddiagram:[`music`],sportspitch:[`sports`]};function oe(e){return e.domains??F[e.type]}var I=/\b(kill (myself|him|her|them)|killing myself|end (my|his|her|their) life|ending my life|take my (own )?life|don'?t want to (be here|live|wake up|exist)|want(ing)? to die|wanna die|suicid\w*|self.?harm|harm myself|hurt(ing)? myself|cut(ting)? myself|no reason to (live|go on)|better off dead|overdos\w*)\b/i;function se(e,t){return I.test(P(e||``,t))}var L=[{test:/\b(state machine|finite[- ]state|\bfsm\b|state diagram|state transitions?|states? and transitions?)\b/,type:`statemachine`,over:`diagram`},{test:/\b(sequence diagram|interaction diagram|message sequence|request[- ]response (?:flow|cycle)|handshake (?:between|sequence)|who calls whom)\b/,type:`sequencediagram`,over:`diagram`},{test:/\b(er[- ]?diagram|entity[- ]relationship|database schema|data model\b|tables? and (?:their )?(?:keys|relationships?))\b/,type:`erdiagram`,over:`diagram`},{test:/\b(risk matrix|probability[- ](?:and[- ]|x[- ]|by[- ])?impact|likelihood[- ](?:and[- ]|x[- ]|vs[- ])?impact|impact[- ](?:and[- ])?likelihood|risk (?:heat ?map|grid))\b/,type:`riskmatrix`,over:`matrixgrid`},{test:/\b(confusion matrix|true positives?|false positives?|precision and recall grid)\b/,type:`confusionmatrix`,over:`matrix`},{test:/\b(magic quadrant|2\s?[x×]\s?2(?: matrix| grid)?|four[- ]quadrant|positioning (?:map|matrix)|priority matrix|eisenhower (?:matrix|box))\b/,type:`quadrant`,over:`compare`},{test:/\b(?:plot|graph|sketch) (?:the )?(?:function|equation|curve|y\s*=|f\(x\))|\bgraph of (?:y|f|the function)\b|\b(?:sine|cosine|tangent) (?:curve|wave|graph)\b|\bparabola\b/,type:`plot`,over:`scatter`},{test:/\bperiodic table\b/,type:`periodictable`,over:`datatable`},{test:/\b(?:timeline|chronology|history) of\b.{0,48}\b(?:\d{3,4}s?|\d{1,2}(?:th|st|nd|rd) century|\bbce?\b|\bad\b|war|empire|dynasty|revolution|civili[sz]ation)\b/,type:`chronologicaltimeline`,over:`timeline`},{test:/\bcompare and contrast\b|\bcomparison (?:table|grid|matrix|chart)\b|\b(?:differences?|distinctions?) between\b|\bhow do\b.{0,40}\bdiffer\b|\b[\w-]+ vs\.? [\w-]+ vs\.? [\w-]+\b/,type:`comparematrix`,over:`compare`},{test:/\b(?:bfs|dfs|breadth[- ]first|depth[- ]first)\b.{0,60}\b(?:graph|node|vertex|vertices)\b|\btrace\b.{0,40}\b(?:bfs|dfs|breadth[- ]first|depth[- ]first)\b|\b(?:bfs|dfs) (?:step|traversal|from)\b/,type:`graphtrace`,over:`datastructure`},{test:/\b(?:dp|dynamic[- ]programming|memoiz[ae]tion|memoization)\s+table\b|\b(?:fill|filling)[- ](?:in )?(?:the )?(?:dp|dynamic[- ]programming)\b|\b(?:lcs|edit[- ]distance|knapsack|coin[- ]change)\b.{0,60}\btable\b/,type:`dptable`,over:`algorithmtrace`},{test:/\bhash\s+(?:table|map)\b.{0,60}\b(?:collision|chaining|bucket|separate[- ]chaining|linear[- ]probing)\b|\bseparate[- ]chaining\b|\bhash function\b.{0,50}\bbucket\b/,type:`hashtable`,over:`datastructure`},{test:/\b(?:prefix[- ]tree|trie\b|autocompletion? (?:using|with|via) (?:a )?trie|insert.{0,30}\btrie\b|search.{0,30}\btrie\b)/,type:`trie`,over:`datastructure`},{test:/\b(?:inorder|preorder|postorder|level[- ]order)\s+traversal\b|\btrace\b.{0,40}\b(?:binary[- ]tree|bst)\b|\bwalk[- ]?(?:me[- ])?through\b.{0,50}\b(?:binary[- ]tree|bst)\b|\bbst\s+(?:insert|search|delete)\b/,type:`binarytree`,over:`datastructure`},{test:/\b(?:bubble|merge|quick|insertion|selection|heap)\s+sort\b|\bsort(?:ing)?\s+algorithm\b.{0,50}\b(?:step|animate|visual|trace)\b|\bvisuali[sz]e\b.{0,40}\bsort\b|\banimated?\b.{0,30}\bsort\b/,type:`sortingviz`,over:`algorithmtrace`},{test:/\b(?:toulmin\b|grounds?\s+and\s+warrant|warrant\s+and\s+(?:grounds?|backing)|claim[\s,]+grounds?[\s,]+warrant)\b/i,type:`toulmin`,over:`argumentmap`},{test:/\b(?:character\s+(?:map|web|network|relationships?)|relationship\s+(?:map|web|diagram)\b.{0,50}\bcharacter|who(?:'s| is)\s+(?:who|friends?|rivals?)|cast\s+of\s+characters?|factions?\s+and\s+alliances?|allies?\s+and\s+rivals?)\b/i,type:`castmap`,over:`network`},{test:/\b(?:freytag|three[- ]act\s+structure|hero(?:'s)?\s+journey|save\s+the\s+cat|plot\s+structure\b|story\s+arc\b|narrative\s+arc\b|story\s+structure\b)\b/i,type:`storyarc`,over:`beatsheet`},{test:/\b(?:rhetorical\s+devices?|literary\s+devices?|figures?\s+of\s+speech|identify\s+the\s+(?:devices?|techniques?|metaphors?)|highlight\s+the\s+(?:metaphors?|similes?|alliteration)|mark\s+the\s+(?:devices?|techniques?))\b/i,type:`devicemark`,over:`annotateddoc`},{test:/\b(?:etymology\b|word\s+origin\b|roots?\s+of\s+the\s+word|where\s+does\s+(?:the\s+word\s+)?[a-z]+\s+come\s+from|latin\s+(?:and\s+greek\s+)?roots?\s+of|word\s+history)\b/i,type:`etymtree`,over:`dictionary`}];function R(e){let t=e.toLowerCase(),n=[],r=new Set;for(let e of L)e.test.test(t)&&!r.has(e.type)&&(r.add(e.type),n.push({type:e.type,over:e.over}));return n}function z(e){return e.length?`BEST-FIT COMPONENT — the content maps to a purpose-built block: prefer ${e.map(e=>`${e.type} (not ${e.over})`).join(`, `)}. The specialist renders this exact structure correctly where the generic only approximates it.`:``}var B={small:8,mid:24,frontier:30},ce=3,V=2,H=2,U=1.6,W=1.2,G=1,le=.6,K=2,ue=.8,q={base:1,frontier:1.3,cutting:1.6},J=1.2,Y=.3,X=2.5,Z=.3,de=new Set,fe=.2,pe=[`teachdiagram`,`workedexample`,`quiz`,`flashcard`],me=1.4,he=new Set([`nav`,`forms`,`pickers`,`overlays`]),ge=new Set([`kbd`,`spinner`,`skeleton`,`sliderinput`,`rangefilter`,`ratinginput`,`emptystate`,`segmented`,`toaststack`,`divider`,`spacer`]);function _e(e){return he.has(e.family)||ge.has(e.type)}function ve(e,t){let n=0;for(let r of e.dataShapes)n+=t[r]??0;return n}function ye(e){return e.shapeFit+G*e.intentPts+K*e.semFit}function be(e,t,n,r=de,i=de,a=!1){let o=ve(e,t),s=1+U*o,c=Math.max(0,e.wowWeight)**+W,l=(q[e.tier]??1)*(e.interactive?J:1),u=n.has(e.type)&&o===0?Y:1,d=r.has(e.type)?X:i.has(e.type)?Z:1,f=a&&e.family===`learn`?me:1;return s*c*l*u*d*f}function xe(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}function Se(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Ce=class{pool;tree;size;highBit;total=0;live;constructor(e){this.pool=e,this.size=e.length,this.live=e.length,this.tree=new Float64Array(this.size+1);for(let t=0;t<this.size;t++)this.add(t,e[t].weight),this.total+=e[t].weight;this.highBit=this.size>0?1<<31-Math.clz32(this.size):0}add(e,t){for(let n=e+1;n<=this.size;n+=n&-n)this.tree[n]+=t}locate(e){let t=0,n=0;for(let r=this.highBit;r>0;r>>=1){let i=t+r;i<=this.size&&n+this.tree[i]<e&&(t=i,n+=this.tree[i])}return Math.min(t,this.size-1)}take(e){let t=this.locate(e),n=this.pool[t];return this.add(t,-n.weight),this.total-=n.weight,this.live--,n}};function we(e,t,n,r){let i=new Ce(e),a=[];for(;a.length<t&&i.live>0&&!(i.total<=0);){let e=i.take(n()*i.total).meta,t=r.family.get(e.family)??0;if(t>=V)continue;let o=r.archetype.get(e.archetype)??0;o>=H||(a.push(e),r.family.set(e.family,t+1),r.archetype.set(e.archetype,o+1))}return a}function Q(e){return Math.max(.5,.15*e)}function Te(e){return[...e].sort((e,t)=>t.fit-e.fit||(e.meta.type<t.meta.type?-1:1))}var Ee=2;function De(e,t,n,r){let i=Te(e),a=[],o=0;for(;o<i.length&&a.length<t;){let e=i[o].fit,s=e-Q(e),c=o;for(;c<i.length&&i[c].fit>=s;)c++;a.push(...we(i.slice(o,c),t-a.length,n,r)),o=c}return a}var Oe=5;function ke(e){let t=e.itemShapes??[],n=e.stringItems??[];if(!t.length&&!n.length)return``;let r=e=>{let t=e.children,n=[e.text,t?r(t):void 0].filter(Boolean).join(`, `);return`${e.prop}[]: {${n}}`};return` · ${[...t.map(r),...n.map(e=>`${e}[]: plain strings`)].join(`, `)}`}function Ae(e){let t=e.propHints;if(!t)return``;let n=Object.entries(t);return n.length?` · hints: ${n.map(([e,t])=>`${e}=${t}`).join(`, `)}`:``}function $(e,t=!1,n=!1){let r=e.requires.length?e.requires.join(`, `):`—`,i=t?w(e.type,n):null;if(i)return`- ${e.type} — ${e.blurb} · needs: ${r}${o(e)} · example: ${i}`;let a=e.optional.slice(0,Oe),s=a.length?` · richer with: ${a.join(`, `)}`:``;return`- ${e.type} — ${e.blurb} · needs: ${r}${ke(e)}${o(e)}${Ae(e)}${s}`}function je(){return T.map(r).filter(e=>!!e).map(e=>$(e)).join(`
2
2
  `)}var Me=3;function Ne(e,t){let n=[...e.map(e=>r(e.type)).filter(e=>!!e)].sort((e,n)=>{let r=+((t.get(e.type)??0)>0),i=+((t.get(n.type)??0)>0);return r===i?n.wowWeight-e.wowWeight:i-r}).map((e,t)=>$(e,t<Me,!0)),i=[];return n.length&&i.push(`HERO COMPONENTS for THIS answer — your most impressive options, best first. Build the`,`canvas AROUND two or three of these (a demo-grade reply leads with the cool visuals), and`,`fill in the rest with the common blocks below. Pick only components that genuinely FIT this`,`answer's content — a striking visual used for data it wasn't meant for reads as a mistake;`,`when in doubt prefer the clearer block. Use the exact prop NAMES and printed limits shown.`,`The example shows SHAPE and DENSITY, not the answer. Prioritize the highest-value real items`,`that fit; summarize any remainder and offer it as a follow-up instead of cramming, shrinking,`,`or overflowing the card. Use the ANSWER'S OWN real values — never copy example values:`,...n,``),i.push(`ALWAYS AVAILABLE — the reliable staples. Use these freely alongside the hero components`,`(every good canvas mixes both); fall back to a plain insight/list/breakdown only when`,`nothing richer fits:`,je()),i.join(`
3
3
  `)}function Pe(e){try{let t=l(e.userText,e.history),n=e.attachments??[],r=[];(n.some(e=>e.kind===`sheet`)||n.some(e=>e.kind===`image`)&&/\b(receipt|itemi[sz]e|line items?|breakdown|invoice|bill|expenses?|subtotal|totals?|tax)\b/i.test(e.userText))&&r.push(`datatable`),r.length&&(t.tabular=(t.tabular??0)+1.2);let i=new Set(e.recent??[]),a=new Set(e.lessons?.prefer??[]),o=new Set(e.lessons?.avoid??[]),d=e.exclude,f=ie(e.userText,e.history),p=new Set(u(e.userText)),m=R(e.userText);for(let e of m)p.add(e.type);for(let e of r)p.add(e);let h=!!e.teaching&&e.tier!==`small`;if(h)for(let e of pe)p.add(e);let g=se(e.userText,e.history),_=g?new Set([`companionnote`,`reframecard`,`breathpacer`,`copingmenu`]):null,v=new Set(s(c(e.userText,e.history))),ee=e=>{let t=0;for(let n of e.intents??[])v.has(n)&&(t+=1);return t},y=e.semanticFit,b=e=>y?.get(e.type)??0,x=ne(e.tier).filter(e=>te.has(e.type)&&!T.includes(e.type)&&!_e(e)&&!(d&&d.has(e.type))&&(p.has(e.type)||ae(oe(e),f))&&!(_&&_.has(e.type))&&!(e.type===`lifeline`&&!g)).map(e=>{let n=ee(e),r=b(e);return{meta:e,ip:n,sem:r,fit:ye({shapeFit:ve(e,t),intentPts:n,semFit:r})}}),S=x.some(e=>e.fit>0),C=x.map(({meta:e,ip:n,sem:r,fit:s})=>({meta:e,fit:s,weight:be(e,t,i,a,o,h)*(1+le*n+ue*r)*(S&&s===0?fe:1)})),w=e.complexity===`lean`||e.complexity===`brief`,E=e.speedTier===`slow`?Math.max(6,Math.round(B[e.tier]*.45)):B[e.tier],D=w?ce:E,O=xe((Se(e.userText)^Math.imul((e.rotation??0)+1,2654435761))>>>0),k=new Map(C.map(e=>[e.meta.type,e.meta])),A=[...u(e.userText),...r].map(e=>k.get(e)).filter(e=>!!e),j=m.map(e=>k.get(e.type)).filter(e=>!!e),M=g?k.get(`lifeline`):void 0,N=h?pe.map(e=>k.get(e)).filter(e=>!!e):[],P=new Set([...A,...j,...N].map(e=>e.type));M&&P.add(`lifeline`);let F=C.filter(e=>e.fit>0&&!P.has(e.meta.type)).sort((e,t)=>t.fit-e.fit).slice(0,w?1:2).map(e=>e.meta);for(let e of F)P.add(e.type);let I=Te(C.filter(e=>e.fit>0)),L=I.length?I[0].fit-Q(I[0].fit):0,z=[];for(let e of I){if(e.fit<L||z.length>=Ee)break;let t=re[e.meta.archetype];if(!t||T.includes(t)||P.has(t))continue;let n=k.get(t);n&&(P.add(t),z.push(n))}let V=[...M?[M]:[],...A,...j,...N,...F,...z],H=new Set,U=V.filter(e=>!H.has(e.type)&&(H.add(e.type),!0)),W=C.filter(e=>!P.has(e.meta.type)),G={family:new Map,archetype:new Map},K=Math.max(0,D-U.length),q=De(W.filter(e=>e.fit>0),K,O,G),J=we(W.filter(e=>e.fit===0),K-q.length,O,G),Y=[...U,...q,...J],X=Array.from(new Set([...T,...Y.map(e=>e.type)])),Z=C.reduce((e,t)=>Math.max(e,t.fit),0);return{types:X,chosen:Y,fitOf:new Map(C.map(e=>[e.meta.type,e.fit])),allowed:new Set(X),bestFit:Z}}catch{return{types:[...E],chosen:[],fitOf:new Map,allowed:new Set(E),bestFit:0}}}function Fe(e){return e.chosen.length||T.length?Ne(e.chosen,e.fitOf):``}async function Ie(e){let t=Pe(e);return await Promise.all([n([...t.types,...T]),ee(t.types)]),{types:t.types,promptSnippet:Fe(t),allowed:t.allowed,bestFit:t.bestFit}}export{M as a,D as i,R as n,z as r,Ie as t};
@@ -0,0 +1 @@
1
+ function e(e){let t=e.trim();if(!t)return t;let n=String.fromCodePoint(t.codePointAt(0));return n.toUpperCase()+t.slice(n.length)}export{e as t};
@@ -0,0 +1 @@
1
+ var e={videoembed:{blurb:`Video player with chapter markers and chapter-list navigation.`,optional:[`icon`,`iconColor`,`durationLabel`,`active`,`footer`]},geomap:{blurb:"A REAL interactive map (OpenStreetMap tiles) for actual places. Give each marker real {lat, lng} coordinates (decimal degrees), a name, and an optional detail. When the answer spans several places or segments (a multi-day trip, a multi-stop route), emit ONE map PER segment — each plotting that segment’s own stops — not a single overview, unless an overview is what was asked. The card lists every marker by name beside the map, numbered to its pin, so `detail` is where a street address or a one-line note belongs — it is rendered, not hidden. This is the only map type — always use it for any real-world location. For a zoning/land-use ask specifically, prefer zoningmap, which teaches the zone-polygon shape more directly.",optional:[`icon`,`iconColor`,`zoom`,`zones`,`footer`],itemShapes:[{prop:`zones`,text:`label`,textAliases:[`name`,`title`]}],propHints:{"zones[].coords":`the zone boundary as real [lat, lng] pairs (decimal degrees), at least 3 points`,"zones[].category":`'residential'|'commercial'|'industrial'|'mixed'|'open-space'`}},lightbox:{blurb:`Inline gallery grid with full-screen lightbox on tap.`,optional:[`icon`,`iconColor`,`footer`]},moodboard:{blurb:`Masonry layout of images, color swatches, and text blocks.`,optional:[`icon`,`iconColor`,`footer`],propHints:{"tiles[].kind":`'image'|'color'|'text'`}},palette:{blurb:`An actual COLOR palette — swatches with hex codes and WCAG contrast verdicts (brand/design palettes). Never as a generic category, tag, or option list — use chipset or badgeset.`,optional:[`icon`,`iconColor`,`footer`],itemShapes:[{prop:`swatches`,text:`name`,textAliases:[`label`,`title`]}]},mediacard:{blurb:`A poster-forward detail card for ONE recommended title (film/show/book/game): cover art, year/runtime/rating chips, a 0–100 score badge, a spoiler-safe logline, genre tags, and "where to watch" provider chips. Give a real cover.src when you have one; otherwise it falls back to the cover.from/to gradient. Pick this for a single "what should I watch/read next" pick — use carousel or lightbox for a gallery of several.`,optional:[`icon`,`iconColor`,`year`,`runtime`,`rating`,`score`,`genres`,`logline`,`providers`,`footer`],stringItems:[`genres`,`providers`],propHints:{score:`a number 0–100 (aggregate/critic score); omit if unknown rather than guessing`,"cover.src":`real poster/cover image URL; omit to show the from/to gradient placeholder`,"cover.from":`gradient start, e.g. var(--presence-deep)`,"cover.to":`gradient end, e.g. var(--presence-soft)`}},diagram:{blurb:`Labeled vector diagram with shapes (circles, rects, lines, polygons, paths) and annotated callout labels—for anatomy, physics, geography, engineering schematics.`,optional:[`icon`,`iconColor`,`ratio`,`footer`],propHints:{"shapes[].kind":`'circle'|'rect'|'line'|'polygon'|'path'`}},svgblock:{blurb:`Tier-3 escape hatch: model-drawn SVG for a visual no native component covers (a molecule, a circuit, a geometric figure, a custom infographic). Strictly sanitized on render; design tokens (var(--presence) etc.) work via CSS inheritance, so it is light/dark-aware. Use ONLY when diagram/geometrycanvas/vectorspace/reactionmechanism/molecularstructure/etc. do not apply.`,optional:[`icon`,`iconColor`,`caption`,`footer`],propHints:{svg:`Complete <svg> with a viewBox (e.g. viewBox="0 0 400 300") and NO width/height attributes. Colors: ONLY var(--presence/--insight/--warning/--danger/--text-primary/--text-secondary/--text-muted/--surface-card) — never hex. Allowed elements: path, rect, circle, ellipse, line, polyline, polygon, text, tspan, g, defs, linearGradient/radialGradient/stop, clipPath, mask, pattern, marker, use(#id). Forbidden: script, style, foreignObject, image, a, event handlers, animation, and any external/javascript:/data: URL — all are stripped on render.`,caption:`Optional plain-text label shown below the SVG.`}}};export{e as D};
@@ -0,0 +1 @@
1
+ var e={painscale:{blurb:`Clinical pain rating — Wong-Baker FACES or a 0–10 visual-analog scale.`,optional:[`title`,`icon`,`iconColor`,`kind`,`anchors`,`caption`,`footer`],stringItems:[`anchors`],propHints:{value:`0..10 (0 = no pain, 10 = worst pain)`,kind:`'faces' (six Wong-Baker faces, default) | 'vas' (visual-analog 0–10 bar)`}},habittracker:{blurb:`Weekly multi-habit grid with per-habit completion rings and a week summary.`,optional:[`title`,`icon`,`iconColor`,`days`,`caption`,`footer`],itemShapes:[{prop:`habits`,text:`name`,textAliases:[`label`,`title`]}],stringItems:[`days`],propHints:{"habits[].done":"array of booleans, one per day, aligned to `days` (default Mon..Sun)"}},streakgrid:{blurb:`Habit-streak card — recent-day dots, current/best counters, don't-break-the-chain framing.`,optional:[`title`,`icon`,`iconColor`,`habit`,`current`,`best`,`caption`,`footer`],propHints:{"days[].done":`boolean — whether the habit was kept that day (oldest → newest)`}},datatable:{blurb:`Sortable, filterable table with search — annotate it (currency, totals, highlights).`,optional:[`icon`,`iconColor`,`sortKey`,`sortDir`,`searchable`,`searchPlaceholder`,`footer`,`annotations`],propHints:{"rows[]":`object keyed by each columns[].key → that cell's text. NEVER keyed by the column LABEL, and never an array`,annotations:`OPTIONAL closed-grammar adornments that turn a plain table into a receipt/ledger/scorecard. An array of {op,...}: {"op":"format","target":{"kind":"column","key":"<col>"},"as":"currency|percent|unit"}; {"op":"summary","stat":"total|mean|max|min","columns":["<col>"]} (WE compute it — never send the number); {"op":"emphasize","target":{"kind":"row","match":"<row label>"},"tone":"presence|insight|warning|danger"}; {"op":"status","target":{"kind":"column","key":"<col>"},"rules":[{"match":"<text>","tone":"danger"}]}; {"op":"bar","target":{"kind":"column","key":"<col>"}}. Reference only real column keys / row labels.`}},pivot:{blurb:`Two-way crosstab (row category × column category) of ONE metric per view; color-scaled cells, togglable measures, row/col totals.`,optional:[`icon`,`iconColor`,`measure`,`accent`,`footer`],stringItems:[`colHeaders`],propHints:{colHeaders:`category labels across the top (quarters, regions, stages…) — the column dimension, NOT metric names`,measures:`the metric(s) the toggle switches between; the active one fills every column. Different metrics (e.g. Revenue vs Margin) go HERE — never as separate colHeaders, which would just repeat a column. e.g. [{key:'rev',label:'Revenue'}]`,"rows[].cells[].values":`object keyed by each measure.key → that metric at this row × column`}},leaderboard:{blurb:`Ranked rows with medals, bars, and rank-movement indicators; toggle metrics.`,optional:[`icon`,`iconColor`,`metric`,`accent`,`footer`],itemShapes:[{prop:`rows`,text:`name`,textAliases:[`label`,`title`]}]},treetable:{blurb:`Hierarchical tree with expand/collapse rows, inline bars, and tags.`,optional:[`icon`,`iconColor`,`valueLabel`,`accent`,`footer`],itemShapes:[{prop:`nodes`,text:`label`,children:{prop:`children`,text:`label`}}],propHints:{"nodes[].value":`the row's own displayed amount, e.g. "¥1,000" — a SEPARATE field from label, never appended to it as text`,"nodes[].pct":`0..1 share of the whole for the inline bar (e.g. this row's value ÷ the total) — omit rather than guess if there's no meaningful whole to share`,valueLabel:`header for the value column, e.g. "Budget" or "Revenue" (defaults to "Value")`}},swimlane:{blurb:`Concurrent processes as horizontal lanes, each owned by an ACTOR, with time-ordered events/bars across them (UML sequence, multi-team handoffs, request flow). Never for generic multi-row data — use datatable for tabular data.`,optional:[`icon`,`iconColor`,`ticks`,`footer`],itemShapes:[{prop:`lanes`,text:`actor`,textAliases:[`label`,`name`,`title`],children:{prop:`events`,text:`label`,textAliases:[`name`,`title`,`text`]}}],stringItems:[`ticks`]}};export{e as D};
@@ -0,0 +1 @@
1
+ var e=new Set(`about above accept access accident accommodate accompany accomplish according account accurate achieve acknowledge acquire across action active activity actual actually adapt address adequate adjust administration admit adopt adult advance advantage adventure advertise advice advise affair affect afford afraid after afternoon again against agency agenda agent aggressive ago agree agreement agriculture ahead album alcohol alive allow almost alone along already although altogether always amazing ambition among amount analysis analyze ancient anger angle angry animal anniversary announce annual another answer anticipate anxiety anxious anybody anyone anything anyway anywhere apart apartment apologize apparent apparently appeal appear appearance apple application apply appoint appreciate approach appropriate approval approve approximate architecture argue argument arise around arrange arrangement arrival arrive article artificial aside aspect assemble assess asset assign assist associate assume assumption assure athlete atmosphere attach attack attempt attend attention attitude attorney attract attractive audience author authority automatic autumn available average avoid award aware awareness away awful awkward baby background backward balance ballot banana bandwidth barely bargain barrier baseball basic basically basis basket bathroom battery battle beach bear beautiful beauty because become bedroom before begin beginning behalf behavior behind belief believe belong below beneath benefit beside besides better between beyond bicycle billion biology birthday bitter blanket bleed blind block blood board boat body boil bone bonus border boring borrow bother bottle bottom boundary bracket brain branch brave bread break breakfast breath breathe brick bridge brief bright brilliant bring broad broken brother brown brush budget build building bulletin bunch burden bureau burn business busy butter button buyer cabin cabinet cable calculate calendar camera campaign campus cancel cancer candidate capable capacity capital captain capture carbon career careful carefully carrot carry cartoon category cattle caught cause caution ceiling celebrate celebration cell cemetery census center central century ceremony certain certainly certificate chain chair challenge chamber champion chance change channel chapter character characteristic charge charity chart chase cheap check cheese chemical chemistry chest chicken chief child childhood chocolate choice choose chronic church circle circuit circumstance citizen civil civilian claim clarify class classic classroom clean clear clearly client climate climb clinic clock close closely closet clothes cloud coach coast coffee cognitive coincidence collapse colleague collect collection college colonel colony color column combination combine come comfort comfortable command comment commercial commission commit committee common communicate communication community company compare comparison compete competition complain complaint complete completely complex complicated component compose composition compound comprehensive compromise computer conceive concentrate concept concern concert conclude conclusion concrete condition conduct conference confidence confident confirm conflict confuse confusion congress connect connection conscience conscious consecutive consensus consequence conservative consider considerable consideration consist consistent constant constitute constitution constraint construct construction consult consume consumer contact contain container contemporary content contest context continue continuous contract contrast contribute contribution control controversial convenience convenient conventional conversation convert convince cook cool cooperate coordinate copy corner corporate correct correspond cost cottage cotton could council counsel count counter country county couple courage course court cousin cover coverage cream create creation creative creature credit crew crime criminal crisis criteria critical criticism criticize crop cross crowd crucial cruel crystal cultural culture curious currency current currently curriculum curtain custom customer cycle damage dance danger dangerous data database daughter dawn deadline deal debate debt decade decide decision declare decline decrease dedicate deep deeply defeat defend defense deficit define definitely definition degree delay deliberate delicate delicious deliver delivery demand democracy demonstrate density department depend dependent depict deposit depression depth deputy derive describe description desert deserve design designer desire desk desperate despite destroy destruction detail detailed detect determine develop development device devote diagnose diagram dialogue diameter diamond diet differ difference different differently difficult difficulty digital dimension dinner direct direction directly director dirty disability disagree disappear disaster discipline disclose discount discourse discover discovery discuss discussion disease dish dismiss disorder display dispute distance distant distinct distinction distinguish distribute distribution district diverse diversity divide division divorce doctor document documentary dollar domain domestic dominant dominate donate door double doubt downtown dozen draft drag drama dramatic draw drawing dream dress drink drive driver drop drug during dust duty eager early earn earnings earth easily eastern easy economic economics economy edge edition editor educate education educational effect effective effectively efficiency efficient effort eight either elaborate elderly elect election electric electricity electronic element elementary elevator eligible eliminate elite elsewhere embrace emerge emergency emission emotion emotional emphasis emphasize empire employ employee employer employment empty enable encounter encourage endless endure enemy energy enforce engage engine engineer engineering enhance enjoy enormous enough ensure enter enterprise entertainment enthusiasm entire entirely entitle entrance entry envelope environment environmental episode equal equation equipment equivalent error escape especially essay essential essentially establish establishment estate estimate ethics ethnic evaluate evaluation even evening event eventually ever every everybody everyone everything everywhere evidence evident evolution evolve exact exactly examine example exceed excellent except exception excess exchange excited excitement exciting exclude exclusive excuse execute executive exercise exhibit exhibition exist existence existing expand expansion expect expectation expense expensive experience experiment expert explain explanation explode exploit explore explosion export expose exposure express expression extend extension extensive extent external extra extraordinary extreme extremely fabric face facility fact factor factory faculty fail failure fair fairly faith fall false familiar family famous fantasy farm farmer fashion fast faster father fault favor favorite feature federal feedback feeling fellow female fence festival fever field fifteen fifty fight figure file fill film filter final finally finance financial find finding fine finger finish fire firm first fiscal fisherman fitness five fixed flag flame flat flavor flee flexible flight float floor flour flow flower fluid focus follow following food foot football force forecast foreign forest forever forget forgive form formal format formation former formula fortune forward foundation founder four fourth fraction fragile frame framework free freedom freeze frequency frequent frequently fresh friend friendly friendship front frozen fruit frustrate fuel full fully function fund fundamental funding funeral funny furniture further furthermore future gain gallery game gang gap garage garden garlic gasoline gather gear gender general generally generate generation generous genetic gentle gentleman genuine gesture giant gift girl give glad glance glass global glove goal golden golf good govern government governor grab grade gradually graduate grain grand grandfather grandmother grant graph graphic grass grateful grave gravity great greatest green greet grocery ground group grow growth guarantee guard guess guest guidance guide guideline guilty guitar habit habitat hair half hall hand handful handle hang happen happy harbor hard hardly harm harmony harvest hate head headline health healthy hear hearing heart heat heaven heavily heavy height helicopter hello help helpful hence herself hesitate hidden hide hierarchy high highlight highly highway hire historian historic historical history hold hole holiday hollow holy home homeless honest honey honor hope horizon horror horse hospital host hotel hour house household housing however huge human humor hundred hungry hunt hurry hurt husband hypothesis ice idea ideal identical identify identity ideology ignore illegal illness illustrate image imagination imagine immediate immediately immigrant immigration impact implement implication imply importance important impose impossible impress impression impressive improve improvement incentive incident include including income increase increasingly incredible indeed independence independent index indicate indication indicator individual industrial industry inevitable infant infection inflation influence inform information infrastructure ingredient initial initially initiative injury inner innocent innovation input inquiry inside insight insist inspire install instance instead institute institution instruction instructor instrument insurance intact integrate integrity intellectual intelligence intend intense intensity intention interact interaction interest interested interesting interface interior internal international internet interpret interpretation interrupt interval intervention interview introduce introduction invest investigate investigation investment investor invisible invitation invite involve involvement iron island issue item itself jacket jail january jealous jewelry job join joint joke journal journalist journey judge judgment juice jump junior jury justice justify keen keep kettle key keyboard kick kid kill kilometer kind king kitchen knee knife knock knowledge known label labor laboratory ladder lady lake land landscape language large largely last late later latter laugh launch laundry law lawn lawsuit lawyer layer layout lead leader leadership leading leaf league lean learn learning least leather leave lecture left legacy legal legend legislation legitimate leisure lemon lend length less lesson letter level liberal library license lie life lifestyle lifetime lift light like likely limit limited line link lion liquid list listen literacy literally literature little live living load loan lobby local locate location lock logic lonely long look loose lose loss lost loud love lovely lower loyalty luck lucky lunch luxury machine magazine magic magnetic mail main mainly maintain maintenance major majority make maker male mall manage management manager mandate manner manual manufacture manufacturer many map marble march margin marine mark market marketing marriage married marry mask mass massive master match material math mathematics matter mature maximum maybe mayor meal mean meaning meanwhile measure meat mechanical mechanism media medical medication medicine medium meet meeting melody member membership memory mental mention menu merchant mere merely merge message metal method middle midnight might migration mile military milk million mind mineral minimal minimum minister minor minority minute miracle mirror miss missile mission mistake mix mixture mobile mode model moderate modern modest modify moment money monitor month mood moon moral more moreover morning mortgage mostly mother motion motivation motor mount mountain mouse mouth move movement movie much multiple murder muscle museum music musical musician mutual mystery myth naked name narrative narrow nation national native natural naturally nature navy near nearby nearly necessarily necessary neck need negative neglect negotiate neighbor neighborhood neither nerve nervous network neutral never nevertheless newly newspaper next nice night nine nobody noise nominate none nonetheless noon normal normally north northern nose note nothing notice notion novel november nowhere nuclear number numerous nurse nutrition obesity object objective obligation observation observe obtain obvious obviously occasion occasionally occupation occupy occur ocean october offer office officer official often oil okay older once ongoing onion online only onto open opening operate operation operator opinion opponent opportunity oppose opposite opposition option orange order ordinary organic organization organize origin original originally other otherwise ought ourselves outcome outdoor outline output outside overall overcome overlook overseas owner ownership oxygen pace pack package page pain painful paint painter painting pair palace pale panel panic paper parade parent park parking part participant participate particular particularly partner partnership party pass passage passenger passion past patch path patient pattern pause payment peace peak peer penalty pencil pension people pepper per percent percentage perception perfect perfectly perform performance perhaps period permanent permission permit person personal personality personally personnel perspective persuade phase phenomenon philosophy phone photo photograph photographer phrase physical physician physics piano pick picture piece pile pilot pine pink pipe pitch place plain plan plane planet planning plant plastic plate platform play player please pleasure plenty plot plus pocket poem poet poetry point police policy political politician politics poll pollution pool poor popular population port portion portrait pose position positive possess possibility possible possibly post potato potential potentially pound pour poverty powder power powerful practical practice praise pray prayer precise precisely predict prediction prefer preference pregnancy pregnant preparation prepare prescription presence present presentation preserve president press pressure pretend pretty prevent previous previously price pride primarily primary prime principal principle print prior priority prison prisoner privacy private privilege prize probably problem procedure proceed process produce producer product production professional professor profile profit program progress project prominent promise promote prompt proof proper properly property proportion proposal propose prospect protect protection protein protest proud prove provide province provision psychological psychology public publication publicly publish publisher pull punch punishment purchase pure purpose pursue push qualify quality quantity quarter queen question queue quick quickly quiet quietly quit quite quote race racial radical radio railroad rain raise range rank rapid rapidly rare rarely rate rather rating ratio rational reach react reaction read reader reading ready real reality realize really reason reasonable recall receipt receive recent recently reception recipe recognition recognize recommend recommendation record recover recovery recruit reduce reduction refer reference reflect reflection reform refuse regard regime region regional register regular regularly regulate regulation reinforce reject relate relation relationship relative relatively relax release relevant reliable relief religion religious rely remain remaining remark remarkable remember remind remote remove render rent repair repeat replace reply report reporter represent representative reputation request require requirement rescue research researcher resemble reservation resident resist resistance resolution resolve resort resource respect respond response responsibility responsible rest restaurant restore restrict result retail retain retire retirement return reveal revenue reverse review revolution reward rhythm rice rich ride ridiculous rifle right ring rise risk river road robot rock role roll roof room root rope rough roughly round route routine royal rubber rule ruling rumor rural rush sacred sacrifice safe safety salad salary sale salmon salt sample sanction sand satellite satisfaction satisfy sauce save saving scale scan scandal scenario scene schedule scheme scholar scholarship school science scientific scientist scope score scratch screen script sculpture search season seat second secondary secret secretary section sector secure security seed seek seem segment seize seldom select selection sell senate senator send senior sense sensitive sentence separate sequence series serious seriously servant serve service session settle settlement seven several severe sexual shade shadow shake shall shallow shame shape share sharp shed sheet shelf shell shelter shift shine ship shirt shock shoe shoot shop shopping shore short shortage shortly shot should shoulder shout show shower shrimp shut sick side sight sign signal significant significantly silence silent silver similar similarly simple simply since sing singer single sister site situation size skill skin sky sleep slice slide slight slightly slip slow slowly small smart smell smile smoke smooth snap snow social society soft software soil solar soldier sole solid solution solve some somebody somehow someone something sometimes somewhat somewhere song soon sophisticated sorry sort soul sound soup source south southern space spare speak speaker special specialist species specific specifically specify spectrum speech speed spend spending spirit spiritual split spokesman sponsor sport spot spread spring square squeeze stability stable staff stage stair stake stand standard standing star stare start state statement station statistics status stay steady steal steam steel step stick still stimulus stock stomach stone stop storage store storm story straight strain strange strategic strategy stream street strength strengthen stress stretch strict strike string strip stroke strong strongly structure struggle student studio study stuff stupid style subject submit subsequent substance substantial substitute succeed success successful successfully such sudden suddenly suffer sufficient sugar suggest suggestion suit suitable summary summer summit sunlight super supply support supporter suppose supreme sure surely surface surgery surprise surprising surround survey survival survive survivor suspect suspend sustain swear sweep sweet swim swing switch symbol sympathy symptom syndrome system table tablet tackle tail take tale talent talk tall tank tape target task taste tax taxpayer teach teacher teaching team tear technical technique technology teenager telephone telescope television tell temperature temporary tend tendency tension term terrible territory terror test testify testimony testing text texture thank theater theme themselves theory therapy there therefore thick thin thing think thinking third thirty thorough though thought thousand threat threaten three threshold throat through throughout throw thus ticket tide tight time tiny tired tissue title tobacco today together tomato tomorrow tone tongue tonight tool tooth top topic total totally touch tough tour tourism tourist tournament toward tower town toxic toy trace track trade tradition traditional traffic tragedy trail train training transaction transfer transform transformation transit transition translate transmission transport travel treat treatment treaty tree tremendous trend trial tribe trick trigger trip troop trouble truck true truly trust truth tube tune tunnel turn twelve twenty twice twin type typical typically ugly ultimate ultimately unable uncertainty uncle uncomfortable unconscious undergo underlying understand understanding undertake unemployment unexpected unfair unfortunately uniform union unique unit universal universe university unknown unless unlike unlikely until unusual upon upper upset urban urge urgent usage useful user usual usually utility vacation valid valley valuable value variable variation variety various vary vast vegetable vehicle venture venue verbal verdict verify version versus vertical very vessel veteran victim victory video view viewer village violate violence violent virtual virtually virus visible vision visit visitor visual vital voice volume voluntary volunteer vote voter voting vulnerable wage wait wake walk wall wander want warm warn warning wash waste watch water wave weak wealth weapon wear weather wedding week weekend weekly weigh weight welcome welfare well western whatever wheat wheel whenever whereas wherever whether while whisper white whole whom whose wide widely widespread wife wild will willing win wind window wine wing winner winter wipe wire wisdom wise wish withdraw within without witness woman wonder wonderful wood wooden word work worker workshop world worried worry worth would wound wrap write writer writing wrong yard year yellow yesterday yield young youth`.split(` `));function t(t){return e.has(t)}var n=/\[\[([^[\]|]*)\|([^[\]]*)\]\]/g;function r(e){return/^[a-z]+$/.test(e)}function i(e){return e.includes(`[[`)?e.replace(n,(e,n,i)=>{let a=n.trim();return r(a)?i.trim().toLowerCase()===a?a:t(a)?n:e:e}):e}var a=/\[\[([^[\]|]*)\|([^[\]]*)\]\]/g,o=/\[\[([^[\]|]*)\]\]/g,s=/\[\[[^\]]*$/,c=/\s*(?<!\])\((?:\s*(?:\[[^\]]*\]\((?:https?:\/\/|www\.)[^)]*\)|https?:\/\/[^\s)]+)\s*[,;·|]*\s*)+\)/gi,l=/\[([^\]]*)\]\((?:https?:\/\/|www\.|mailto:)[^)]*\)/gi,u=/\bhttps?:\/\/[^\s)\]]+/gi,d=/\s*\(?\s*\[[^\]]*\]\((?:https?:\/\/|www\.|\/)[^)]*$/;function f(e){return e.replace(c,``).replace(d,``).replace(l,`$1`).replace(u,``).replace(/[ \t]{2,}/g,` `).replace(/\s+([.,;:!?])/g,`$1`).trimEnd()}function p(e,t,n){let r=e,i;do i=r,r=r.replace(t,n);while(r!==i);return r}function m(e){return p(p(e,a,`$1`),o,`$1`).replace(s,``).trimEnd()}function h(e){return m(e).replace(/<[^>]*>/g,``).trimEnd()}function g(e){let t=p(i(e),a,`$2`);return t=p(t,o,`$1`),t.replace(s,``).trimEnd()}function _(e){return f(h(e))}function v(e){return f(g(e))}var y=String.raw`\$?\d[\d,]*(?:\.\d+)?(?:\s?(?:dollars?|USD|cents?|percent|%))?`,b=RegExp(`(${y})(\\s*[,;]?\\s+)\\1(?!\\w)`,`gi`);function x(e){let t=e,n;do n=t,t=t.replace(b,`$1`);while(t!==n);return t}function S(e,t,n=.3){let r=e.trim();if(r.length<=t)return r;let i=r.slice(0,t-1),a=[...i.matchAll(/[.!?](?=["')\]]?(?:\s|$))/g)].at(-1);if(a?.index!==void 0&&a.index>t*n)return i.slice(0,a.index+1);let o=i.lastIndexOf(` `);return(o>t*.6?i.slice(0,o):i).trimEnd()+`…`}export{v as a,_ as i,h as n,m as o,g as r,S as s,x as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./contentVault-XKWjF2FB.js";import{n as r,r as i,t as a}from"./localBudget-CxLP6bjE.js";var o=[`stat`,`value`,`big`,`headline`];function s(e){let t=[e.points,e.bars,e.data,e.series,e.values];for(let e of t){if(!Array.isArray(e))continue;let t=e.map(e=>{if(typeof e==`number`)return e;if(e&&typeof e==`object`){let t=e,n=t.v??t.y??t.value;if(typeof n==`number`)return n}return NaN}).filter(e=>Number.isFinite(e));if(t.length>=2)return t.slice(0,24)}}function c(e){return e.find(e=>e.type===`insight`&&!!e.id)||e.find(e=>{if(!e.id)return!1;let t=e.props??{};return o.some(e=>typeof t[e]==`string`&&t[e].trim())})}function l(e){let t=c(e.blocks);if(!t)return null;let n=t.props??{},r=o.find(e=>typeof n[e]==`string`&&n[e].trim());if(!r)return null;let i=typeof n.delta==`string`&&n.delta.trim()?n.delta.trim():void 0,a=typeof n.deltaDir==`string`?n.deltaDir:void 0,l=typeof n.unit==`string`&&n.unit.trim()?n.unit.trim():void 0;return{value:n[r].trim(),unit:l,delta:i,deltaDir:a,points:s(n),kind:t.type}}var u=`mavea-live-library-v1`,d=u,f=12,p=24e4,m=4096,h=null,g=0;function _(){try{let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID()}catch{}return g+=1,`lib-${g.toString(36)}-${Math.floor(Math.random()*1e9).toString(36)}`}function v(e){return e.replace(/\s+/g,` `).trim().toLowerCase()}function y(e){let t=JSON.stringify(e,(e,t)=>typeof t==`string`&&t.length>m&&t.startsWith(`data:`)?``:t);return JSON.parse(t)}function b(e){return!!e&&typeof e==`object`&&Array.isArray(e.blocks)}function x(e){if(!e||typeof e!=`object`)return null;let n=e;if(!b(n.spec))return null;let r=typeof n.question==`string`?t(n.question):``;return r.trim()?{id:typeof n.id==`string`&&n.id?n.id:_(),question:r,title:typeof n.title==`string`?n.title:n.spec.title??``,savedAt:typeof n.savedAt==`number`&&Number.isFinite(n.savedAt)?n.savedAt:0,lead:n.lead&&typeof n.lead==`object`?n.lead:null,spec:n.spec,...typeof n.topic==`string`&&n.topic?{topic:n.topic}:{}}:null}var S=!1,C=0;function w(e){return Array.isArray(e)?e.map(x).filter(e=>e!==null).slice(0,f):[]}async function T(t){let n=++C;try{if(typeof localStorage>`u`)return;let r=await e(t);if(n!==C)return;await i(u,r)}catch{}}async function E(){let t=h;if(!t||t.length<2)return 0;let n=t.slice(0,-1),i=++C,a=await e(n);if(i!==C)return 0;h=n;let o=r(u,a);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(d,{detail:n}))}catch{}return o}a(u,E);function D(){try{if(typeof localStorage>`u`)return[];let e=localStorage.getItem(u);if(!e)return[];let t=w(JSON.parse(e));return t.length&&T(t),t}catch{return[]}}async function O(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(u);if(!e)return;try{JSON.parse(e);return}catch{}let t=w(await n(e));if(S)return;h=t,S=!0,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(d,{detail:t}))}catch{}}var k=O();function A(){return k}function j(){return h||(h=D(),h)}function M(e){let t=w(e);h=t,S=!0,T(t);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(d,{detail:t}))}catch{}}function N(){return j()}function P(e){let t=e.map(x).filter(e=>e!==null);if(!t.length)return 0;let n=new Map(j().map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);(!t||e.savedAt>=t.savedAt)&&n.set(e.id,e)}return M([...n.values()].sort((e,t)=>t.savedAt-e.savedAt)),t.length}function F(e,t,n=Date.now()){try{let r=t.trim();if(!r||!b(e)||e.blocks.length===0)return;let i=y(e),a={id:_(),question:r,title:i.title??``,savedAt:n,lead:l(i),spec:i,...i.topic?{topic:i.topic}:{}};if(JSON.stringify(a).length>p)return;let o=v(r);M([a,...j().filter(e=>v(e.question)!==o)].slice(0,f))}catch{}}function I(e){let t=j().filter(t=>t.id!==e);t.length!==j().length&&M(t)}function L(){M([])}export{I as a,P as i,L as n,F as o,N as r,A as s,d as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./contentVault-XKWjF2FB.js";var r=`mavea-live-atlas-v1`,i=r,a=500,o=null,s=!1,c=0;function l(e){return e.replace(/\s+/g,` `).trim().toLowerCase()}function u(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&typeof t.question==`string`&&typeof t.title==`string`&&typeof t.firstSeen==`number`&&typeof t.savedAt==`number`&&typeof t.blocks==`number`}function d(e){return Array.isArray(e)?e.filter(u).map(e=>({...e,question:t(e.question)})):[]}async function f(t){let n=++c;try{let i=await e(t);if(n!==c)return;localStorage.setItem(r,i)}catch{}}function p(){try{let e=localStorage.getItem(r);if(!e)return[];let t=d(JSON.parse(e));return t.length&&f(t),t}catch{return[]}}async function m(){try{let e=localStorage.getItem(r);if(!e)return;try{JSON.parse(e);return}catch{}let t=d(await n(e));if(s)return;o=t,s=!0,window.dispatchEvent(new CustomEvent(i))}catch{}}var h=m();function g(){return h}function _(){return o??=p(),o}function v(e){let t=d(e);o=t,s=!0,f(t);try{window.dispatchEvent(new CustomEvent(i))}catch{}}function y(){return _()}function b(e){let t=d(e);if(!t.length)return 0;let n=new Map(_().map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);if(!t)n.set(e.id,e);else{let r=Math.min(t.firstSeen,e.firstSeen);n.set(e.id,e.savedAt>=t.savedAt?{...e,firstSeen:r}:{...t,firstSeen:r})}}return v([...n.values()].sort((e,t)=>t.savedAt-e.savedAt).slice(0,a)),t.length}function x(e){try{let t=[..._()],n=new Map(t.map(e=>[e.id,e])),r=!1;for(let t of e){let e=l(t.question);if(!e)continue;let i={id:e,question:t.question,title:t.title,firstSeen:n.get(e)?.firstSeen??t.savedAt,savedAt:t.savedAt,blocks:t.spec.blocks.length,...t.topic?{topic:t.topic}:{}},a=n.get(e);a&&a.savedAt===i.savedAt&&a.blocks===i.blocks||(n.set(e,i),r=!0)}if(!r)return t.length;let i=[...n.values()].sort((e,t)=>t.savedAt-e.savedAt).slice(0,a);return v(i),i.length}catch{return _().length}}function S(e,t){return t.find(t=>l(t.question)===e.id)}var C=`mavea-live-atlas-last-open`;function w(){try{let e=typeof localStorage<`u`?localStorage.getItem(C):null;return e&&parseInt(e,10)||0}catch{return 0}}function T(){try{typeof localStorage<`u`&&localStorage.setItem(C,String(Date.now()))}catch{}}export{S as a,T as i,w as n,x as o,b as r,g as s,y as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{n as t,r as n,t as r}from"./contentVault-XKWjF2FB.js";import{r as i}from"./localBudget-CxLP6bjE.js";var a={"15min":15,hourly:60,"6h":360,daily:1440,manual:1/0},o={daily:1440,weekly:10080,"on-change":1/0,manual:1/0};function s(e,t){return Number.isFinite(t)?e+t*6e4:2**53-1}function c(e){return e===`manual`?0:Math.round(43200/a[e])}function l(e,t){let n=e.window;if(n){if(t<n.startAt)return n.startAt;if(t>n.endAt)return 2**53-1}return s(t,a[e.data])}var u=`mavea-dash-opens-v1`,d=2592e6;function f(e){return!!e&&typeof e==`object`}function ee(e,t){if(!f(e))return{};let n=t-d,r={};for(let[t,i]of Object.entries(e)){if(!t||!Array.isArray(i))continue;let e=i.filter(e=>typeof e==`number`&&Number.isFinite(e)&&e>=n).slice(-30);e.length&&(r[t]=e)}return r}var p;function te(e){try{if(typeof localStorage>`u`)return{};let t=localStorage.getItem(u);return t?ee(JSON.parse(t),e):{}}catch{return{}}}function m(e=Date.now()){return p??=te(e),p}function h(e){p=e;try{typeof localStorage<`u`&&localStorage.setItem(u,JSON.stringify(e))}catch{}}function ne(e,t=Date.now()){if(!e)return;let n=m(t),r=[...n[e]??[],t].filter(e=>e>=t-d).slice(-30);h({...n,[e]:r})}function re(e,t,n=Date.now()){return(m(n)[e]??[]).filter(e=>e>=t).length}function g(e){let t=m(),n={};for(let[r,i]of Object.entries(t))e.has(r)&&(n[r]=i);h(n)}var ie=12,_=new Map,v=0,y=new Set;function b(){for(let e of y)e()}function ae(e){return y.add(e),()=>y.delete(e)}function oe(e,t=Date.now()){v+=1;let n={id:`run-${v}`,dashboardId:e,startedAt:t,steps:[{name:`scheduled`,ok:!0,at:t}]},r=_.get(e)??[];return _.set(e,[n,...r].slice(0,ie)),b(),n}function se(e,t,n,r={}){e&&(e.steps.push({name:t,ok:n,at:r.at??Date.now(),...r.count===void 0?{}:{count:r.count},...r.detail?{detail:r.detail}:{}}),b())}function ce(e,t){e&&(e.endedAt=t.at??Date.now(),t.outcome&&(e.outcome=t.outcome),t.failure&&(e.failure=t.failure),t.attempts!==void 0&&(e.attempts=t.attempts),b())}var le=[];function ue(e){return _.get(e)??le}function de(e){e===void 0?_.clear():_.delete(e),b()}var fe=`mavea-dashboards`,x=`observations`,pe=1,me=200;function he(){return typeof indexedDB<`u`}var S=null;function C(){return S||(S=new Promise((e,t)=>{let n=indexedDB.open(fe,pe);n.onupgradeneeded=()=>{let e=n.result;if(!e.objectStoreNames.contains(x)){let t=e.createObjectStore(x,{keyPath:`id`});t.createIndex(`byTarget`,[`dashboardId`,`targetId`,`observedAt`]),t.createIndex(`byDashboard`,`dashboardId`)}},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error??Error(`indexedDB open failed`))}),S.catch(()=>{S=null}),S)}function w(e){return new Promise((t,n)=>{e.oncomplete=()=>t(),e.onerror=()=>n(e.error??Error(`indexedDB transaction failed`)),e.onabort=()=>n(e.error??Error(`indexedDB transaction aborted`))})}async function ge(e,n,r,i=Date.now(),a){if(he())try{let o=await t({data:r,...a?.length?{receipts:a}:{}}),s=(await C()).transaction(x,`readwrite`),c=s.objectStore(x),l={id:`${e}:${n}:${i}`,dashboardId:e,targetId:n,observedAt:i,payload:o};c.put(l),await w(s),await _e(e,n)}catch{}}async function _e(e,t){try{let n=(await C()).transaction(x,`readwrite`),r=n.objectStore(x).index(`byTarget`),i=IDBKeyRange.bound([e,t,0],[e,t,1/0]),a=[];await new Promise((e,t)=>{let n=r.openKeyCursor(i,`next`);n.onsuccess=()=>{let t=n.result;if(!t)return e();a.push(t.primaryKey),t.continue()},n.onerror=()=>t(n.error??Error(`cursor failed`))});let o=a.length-me;if(o>0){let e=n.objectStore(x);for(let t of a.slice(0,o))e.delete(t)}await w(n)}catch{}}async function ve(e){if(he())try{let t=(await C()).transaction(x,`readwrite`),n=t.objectStore(x).index(`byDashboard`),r=t.objectStore(x);await new Promise((t,i)=>{let a=n.openKeyCursor(IDBKeyRange.only(e));a.onsuccess=()=>{let e=a.result;if(!e)return t();r.delete(e.primaryKey),e.continue()},a.onerror=()=>i(a.error??Error(`cursor failed`))}),await w(t)}catch{}}function T(e){return e.state?e.state:e.lastRefreshedAt===null?{status:`pending`}:e.lastDataOutcome===`unverified`?{status:`degraded`,lastSuccessAt:e.lastRefreshedAt,failure:{kind:`ungrounded`},lastAttemptAt:e.lastRefreshedAt}:{status:`active`,lastSuccessAt:e.lastRefreshedAt}}function E(e){return{status:`active`,lastSuccessAt:e}}function D(e,t,n){let r=e.status===`active`||e.status===`degraded`?e.lastSuccessAt:void 0;return r===void 0?{status:`pending`,failure:t,lastAttemptAt:n}:{status:`degraded`,lastSuccessAt:r,failure:t,lastAttemptAt:n}}function ye(e){switch(e.kind){case`auth`:return`Your model rejected the key — reconnect it in Live, then check again.`;case`rate-limit`:return`Your model provider is rate-limiting right now. This retries itself shortly.`;case`network`:return`Couldn't reach your model. This retries itself once the connection is back.`;case`no-model`:return`No model is connected yet — connect one in Live and this starts checking.`;case`ungrounded`:return`No live source backed this up — the model may not have searched. Try a stronger model in Settings, or reword what to track.`;case`provider-unavailable`:return`Your model provider is unavailable right now. This retries itself shortly.`}}function be(e){switch(e){case`no-model`:return{kind:`no-model`};case`unverified`:return{kind:`ungrounded`};case`failed`:return{kind:`network`};default:return null}}var xe=e({DASHBOARDS_EVENT:()=>k,DASHBOARDS_QUOTA_EVENT:()=>A,MAX_METRICS:()=>12,MAX_WIDGETS:()=>12,addDashboard:()=>Ue,addWidget:()=>et,appendSource:()=>it,applyRefreshResult:()=>bt,blockToWidget:()=>Ke,clearDashboards:()=>Xe,clearOneShot:()=>vt,createBlankDashboard:()=>Ge,ensureFirstCheck:()=>mt,foldInto:()=>ot,getDashboard:()=>He,getDashboards:()=>Ve,hasDroppedWrite:()=>F,invalidate:()=>Re,markAiRefreshed:()=>ht,markDataRefreshed:()=>ft,markDataRetry:()=>pt,markTrackerFailure:()=>$,markVerdictFailed:()=>dt,mergeDashboards:()=>We,newDashboardId:()=>I,removeDashboard:()=>Ye,removeWidget:()=>$e,reorderWidgets:()=>Ze,setCadenceWindow:()=>gt,setOneShot:()=>_t,setVerdict:()=>ut,setWidgetOrder:()=>nt,setWidgetRefreshQuery:()=>tt,setWidgetSpan:()=>Qe,updateCadence:()=>Je,updateDashboard:()=>qe,updateMetricValue:()=>ct,updateTripwireStates:()=>lt,whenDashboardsHydrated:()=>Le}),O=`mavea-dashboards-v1`,k=O,A=`${O}:quota`,j=24,Se=12,Ce=4096,we=60,M=null,N=0,P=!1;function F(){return P}function I(){try{let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID()}catch{}return N+=1,`dash-${N.toString(36)}-${Math.floor(Math.random()*1e9).toString(36)}`}function Te(e){let t=JSON.stringify(e,(e,t)=>typeof t==`string`&&t.length>Ce&&t.startsWith(`data:`)?``:t);return JSON.parse(t)}function L(e){return!!e&&typeof e==`object`}function R(e,t){return typeof e==`number`&&Number.isFinite(e)?e:t}function z(e,t=``){return typeof e==`string`?e:t}function Ee(e){return e===`5min`?`15min`:z(e,`manual`)}function De(e){if(!L(e))return null;let t=e.at,n=e.value;return typeof t!=`number`||!Number.isFinite(t)||typeof n!=`number`||!Number.isFinite(n)?null:{at:t,value:n}}var Oe=new Set([`auth`,`rate-limit`,`network`,`no-model`,`ungrounded`,`provider-unavailable`]);function B(e){if(!L(e))return;let t=L(e.failure)&&Oe.has(z(e.failure.kind))?{kind:z(e.failure.kind),...typeof e.failure.retryAt==`number`&&Number.isFinite(e.failure.retryAt)?{retryAt:e.failure.retryAt}:{}}:void 0,n=typeof e.lastAttemptAt==`number`&&Number.isFinite(e.lastAttemptAt)?e.lastAttemptAt:void 0,r=typeof e.lastSuccessAt==`number`&&Number.isFinite(e.lastSuccessAt)?e.lastSuccessAt:void 0;if(e.status===`pending`)return{status:`pending`,...t?{failure:t}:{},...n===void 0?{}:{lastAttemptAt:n}};if(e.status===`active`&&r!==void 0)return{status:`active`,lastSuccessAt:r};if(e.status===`degraded`&&t&&n!==void 0)return{status:`degraded`,failure:t,lastAttemptAt:n,...r===void 0?{}:{lastSuccessAt:r}}}function ke(e){if(!L(e))return null;let t=(Array.isArray(e.history)?e.history:[]).map(De).filter(e=>e!==null).slice(-60);return{...e,history:t.length?t:void 0}}function Ae(e){if(!L(e))return;let t=e.startAt,n=e.endAt;if(!(typeof t!=`number`||!Number.isFinite(t))&&!(typeof n!=`number`||!Number.isFinite(n)||n<=t))return{label:z(e.label),startAt:t,endAt:n,origin:e.origin===`search`?`search`:`user`}}function je(e){if(!(!L(e)||typeof e.text!=`string`||!e.text))return{text:e.text,at:R(e.at,0)}}function Me(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!L(n)||typeof n.expected!=`string`||!n.expected)continue;let e=n.result;(e===`hit`||e===`miss`||e===`unclear`)&&t.push({at:R(n.at,0),expected:n.expected,result:e,...typeof n.note==`string`&&n.note?{note:n.note}:{}})}return t.slice(-20)}function V(e,t){if(!e.window||t<=e.window.endAt)return e;let{window:n,...r}=e;return r}var H=new Set([`thesis`,`alignmentgauge`,`standingalerts`,`sourceslineage`]);function Ne(e,t,n){let r=n||t;return r?e.map(e=>{if(e.refreshQuery?.trim()||e.metricId||H.has(e.block.type))return e;let t=e.block.props?.title,n=typeof t==`string`&&t.trim()?`${r} — ${t.trim()}`:r;return{...e,refreshQuery:n}}):e}function Pe(e){if(!L(e))return null;let t=z(e.id);if(!t)return null;let r=L(e.thesis)?e.thesis:null,i=Array.isArray(e.widgets)?e.widgets.filter(e=>L(e)&&L(e.block)):[],a=L(e.cadence)?e.cadence:{},o=L(e.alerts)?e.alerts:{},s=Fe(e.lastVerdict),c=z(e.title,`Untitled`),l=n(z(e.question)),u=Ae(a.window),d=je(e.prediction),f=Me(e.predictionHistory);return{id:t,title:c,question:l,thesis:{text:z(r?.text),saidAt:R(r?.saidAt,0)},tripwires:Array.isArray(e.tripwires)?e.tripwires:[],metrics:Array.isArray(e.metrics)?e.metrics.map(ke).filter(e=>e!==null):[],sources:Array.isArray(e.sources)?e.sources:[],widgets:Ne(i.slice(0,12),c,l),cadence:{data:Ee(a.data),ai:z(a.ai,`manual`),...u?{window:u}:{}},smartTrigger:typeof e.smartTrigger!=`boolean`||e.smartTrigger,alerts:{inApp:o.inApp!==!1,push:o.push===!0},...typeof e.topic==`string`&&e.topic?{topic:e.topic}:{},createdAt:R(e.createdAt,0),updatedAt:R(e.updatedAt,0),...typeof e.lastTouchedByUserAt==`number`&&Number.isFinite(e.lastTouchedByUserAt)?{lastTouchedByUserAt:e.lastTouchedByUserAt}:{},nextDataAt:R(e.nextDataAt,0),nextAiAt:R(e.nextAiAt,2**53-1),...typeof e.oneShotAt==`number`&&Number.isFinite(e.oneShotAt)?{oneShotAt:e.oneShotAt,oneShotLabel:z(e.oneShotLabel)}:{},...d?{prediction:d}:{},...f.length?{predictionHistory:f}:{},lastRefreshedAt:typeof e.lastRefreshedAt==`number`&&Number.isFinite(e.lastRefreshedAt)?e.lastRefreshedAt:null,...e.lastDataOutcome===`updated`||e.lastDataOutcome===`no-change`||e.lastDataOutcome===`unverified`?{lastDataOutcome:e.lastDataOutcome}:{},...B(e.state)?{state:B(e.state)}:{},...s?{lastVerdict:s}:{},...typeof e.lastVerdictAttemptAt==`number`&&Number.isFinite(e.lastVerdictAttemptAt)?{lastVerdictAttemptAt:e.lastVerdictAttemptAt}:{},...typeof e.lastVerdictError==`string`&&e.lastVerdictError?{lastVerdictError:e.lastVerdictError}:{}}}function Fe(e){return!L(e)||typeof e.text!=`string`||!e.text?null:{text:e.text,at:R(e.at,0),grounded:e.grounded===!0,...Array.isArray(e.sources)?{sources:e.sources}:{},...typeof e.tripwireId==`string`?{tripwireId:e.tripwireId}:{}}}var U=!1,W=0;function G(e){return Array.isArray(e)?e.map(Pe).filter(e=>e!==null):[]}async function K(e){let n=++W,r=!1;try{if(typeof localStorage>`u`)return;let a=await t(e);if(n!==W)return;r=await i(O,a)}catch{}if(!r){P=!0;try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(A))}catch{}}}function Ie(){try{if(typeof localStorage>`u`)return[];let e=localStorage.getItem(O);if(!e)return[];let t=G(JSON.parse(e));return t.length&&K(t),t}catch{return[]}}async function q(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(O);if(!e)return;try{JSON.parse(e);return}catch{}let t=G(await r(e));if(U)return;M=t,U=!0,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(k,{detail:t}))}catch{}}var J=q();function Le(){return J}function Y(){return M??=Ie(),M}function Re(){let e=M;M=null,U=!1,J=q();try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(O);if(!e)return;JSON.parse(e)}catch{M=e}}function ze(e){return e.length<=j?e:[...e].sort((e,t)=>(t.lastTouchedByUserAt??t.updatedAt)-(e.lastTouchedByUserAt??e.updatedAt)).slice(0,j)}function X(e){let t=G(e);M=t,U=!0,K(t);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(k,{detail:t}))}catch{}}function Z(e,t,n=Date.now(),r={}){let i=!1,a=Y().map(a=>a.id===e?(i=!0,{...t(a),updatedAt:n,...r.userTouch?{lastTouchedByUserAt:n}:{}}):a);i&&X(a)}var Q=null,Be=null;function Ve(){let e=Y();return(Be!==e||Q===null)&&(Q=[...e].sort((e,t)=>(t.lastTouchedByUserAt??t.createdAt)-(e.lastTouchedByUserAt??e.createdAt)),Be=e),Q}function He(e){return Y().find(t=>t.id===e)??null}function Ue(e){X(ze([Te({...e,lastTouchedByUserAt:e.lastTouchedByUserAt??e.updatedAt}),...Y().filter(t=>t.id!==e.id)]))}function We(e){let t=G(e);if(!t.length)return 0;let n=new Map(Y().map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);(!t||e.updatedAt>=t.updatedAt)&&n.set(e.id,e)}return X(ze([...n.values()])),t.length}function Ge(e){let t=e.now??Date.now();return{id:I(),title:e.title||`Untitled dashboard`,question:e.question??``,thesis:{text:``,saidAt:t},tripwires:[],metrics:[],sources:[{kind:`ORIGIN`,conversationId:`pin`,title:e.title||`Pinned cards`,contributed:`Started by pinning a card.`,at:t}],widgets:[],cadence:{data:`manual`,ai:`manual`},smartTrigger:!1,alerts:{inApp:!0,push:!1},...e.topic?{topic:e.topic}:{},createdAt:t,updatedAt:t,nextDataAt:2**53-1,nextAiAt:2**53-1,lastRefreshedAt:null}}function Ke(e,t=`pin`,n){let r=new Set([`chart`,`plot`,`dualaxis`,`bars`,`timeline`,`breakdown`,`table`]);return{id:`w-pin-`+Math.random().toString(36).slice(2,9),block:e,span:r.has(e.type)?2:1,fromSource:t,...n?.trim()?{refreshQuery:n.trim()}:{}}}function qe(e,t){Z(e,e=>({...e,...t}),void 0,{userTouch:!0})}function Je(e,t,n=Date.now()){Z(e,e=>{let r={...e.cadence,...t};return{...e,cadence:r,...t.data===void 0?{}:{nextDataAt:l(r,n)},...t.ai===void 0?{}:{nextAiAt:s(n,o[r.ai])}}},n,{userTouch:!0})}function Ye(e){let t=Y().filter(t=>t.id!==e);t.length!==Y().length&&(X(t),g(new Set(t.map(e=>e.id))),de(e),ve(e))}function Xe(){Y().length!==0&&(X([]),g(new Set))}function Ze(e,t,n){Z(e,e=>{let r=[...e.widgets];if(t<0||t>=r.length||n<0||n>=r.length)return e;let[i]=r.splice(t,1);return r.splice(n,0,i),{...e,widgets:r}},void 0,{userTouch:!0})}function Qe(e,t,n){Z(e,e=>({...e,widgets:e.widgets.map(e=>e.id===t?{...e,span:n}:e)}),void 0,{userTouch:!0})}function $e(e,t){Z(e,e=>({...e,widgets:e.widgets.filter(e=>e.id!==t)}),void 0,{userTouch:!0})}function et(e,t,n={}){let r=Array.isArray(t)?t:[t];r.length!==0&&Z(e,e=>{let t=Math.max(0,Math.min(n.at??e.widgets.length,e.widgets.length)),i=[...e.widgets.slice(0,t),...r,...e.widgets.slice(t)],a=i;if(i.length>12){let e=i.filter(e=>!H.has(e.block.type)),t=i.length-12;if(e.length>=t){let n=new Set(e.slice(-t).map(e=>e.id));a=i.filter(e=>!n.has(e.id))}else a=i.slice(0,12)}return{...e,widgets:a,...n.source?{sources:[...e.sources,n.source].slice(-rt)}:{}}},void 0,{userTouch:!0})}function tt(e,t,n){let r=n.trim();if(!r||t.length===0)return;let i=new Set(t);Z(e,e=>({...e,widgets:e.widgets.map(e=>i.has(e.id)?{...e,refreshQuery:r}:e)}))}function nt(e,t){Z(e,e=>{let n=new Map(e.widgets.map(e=>[e.id,e])),r=t.map(e=>n.get(e)).filter(e=>!!e),i=new Set(r.map(e=>e.id)),a=e.widgets.filter(e=>!i.has(e.id));return{...e,widgets:[...r,...a]}},void 0,{userTouch:!0})}var rt=24;function it(e,t){Z(e,e=>({...e,sources:[...e.sources,t].slice(-24)}),void 0,{userTouch:!0})}var at=12;function ot(e,t){Z(e,e=>({...e,metrics:[...e.metrics,...t.metrics].slice(0,12),tripwires:[...e.tripwires,...t.tripwires].slice(0,12),widgets:[...e.widgets,...t.widgets].slice(0,12),sources:[...e.sources,t.source].slice(-24)}),void 0,{userTouch:!0})}function st(e,t,n){if(n===null)return e;let r=[...e??[],{at:t,value:n}];return r.length>we?r.slice(-60):r}function ct(e,t,n,r,i,a=Date.now()){Z(e,e=>({...e,metrics:e.metrics.map(e=>e.id===t?{...e,lastValue:n,lastRaw:r,origin:i,asOf:a,history:st(e.history,a,n)}:e)}),a,{userTouch:i===`user`})}function lt(e,t,n=Date.now()){Z(e,e=>({...e,tripwires:t}),n)}function ut(e,t,n=Date.now()){Z(e,e=>({...e,lastVerdict:t,lastVerdictAttemptAt:n,lastVerdictError:void 0}),n)}function dt(e,t,n){Z(e,e=>({...e,lastVerdictAttemptAt:t,lastVerdictError:n}),t)}function ft(e,t=Date.now(),n=`updated`){Z(e,e=>{let r=V(e.cadence,t);return{...e,cadence:r,nextDataAt:l(r,t),lastRefreshedAt:t,lastDataOutcome:n,state:E(t)}})}function $(e,t,n=Date.now()){Z(e,e=>({...e,state:D(T(e),t,n)}))}function pt(e,t){Z(e,e=>({...e,nextDataAt:t,...e.oneShotAt!==void 0&&e.oneShotAt<t?{oneShotAt:t}:{}}))}function mt(e,t=Date.now()){Z(e,e=>e.oneShotAt===void 0?{...e,oneShotAt:t,oneShotLabel:`first check`}:e)}function ht(e,t=Date.now()){Z(e,e=>({...e,nextAiAt:s(t,o[e.cadence.ai])}))}function gt(e,t,n=Date.now()){Z(e,e=>{let r=t?{...e.cadence,window:t}:{...e.cadence,window:void 0};return{...e,cadence:r,nextDataAt:l(r,n)}},n,{userTouch:t?.origin===`user`})}function _t(e,t,n,r=Date.now()){Z(e,e=>({...e,oneShotAt:t,oneShotLabel:n}),r,{userTouch:!0})}function vt(e,t=Date.now()){Z(e,e=>({...e,oneShotAt:void 0,oneShotLabel:void 0}),t)}var yt=3e5;function bt(e,t,n=Date.now()){Z(e,e=>{let r=new Map((t.values??[]).map(e=>[e.metricId,e])),i=new Map((t.blocks??[]).map(e=>[e.widgetId,e.block])),a=e.prediction,o=e.predictionHistory;if(t.grade&&a){let e={at:n,expected:a.text,result:t.grade.result,...t.grade.note?{note:t.grade.note}:{}};o=[...o??[],e].slice(-20),a=void 0}t.expects?.trim()&&(a={text:t.expects.trim(),at:n});let s=V(e.cadence,n),c=l(s,n),u=t.outcome===`unverified`&&e.lastDataOutcome!==`unverified`&&c!==2**53-1&&(!s.window||n>=s.window.startAt)?Math.min(c,n+yt):c;return{...e,cadence:s,metrics:e.metrics.map(e=>{let t=r.get(e.id);return t?{...e,lastValue:t.value,lastRaw:t.raw,origin:t.origin,asOf:n,history:st(e.history,n,t.value)}:e}),widgets:e.widgets.map(e=>{let t=i.get(e.id);return t?{...e,block:t}:e}),...t.tripwires?{tripwires:t.tripwires}:{},...t.consumedOneShot?{oneShotAt:void 0,oneShotLabel:void 0}:{},nextDataAt:u,lastRefreshedAt:n,lastDataOutcome:t.outcome,state:t.outcome===`unverified`?D(T(e),{kind:`ungrounded`},n):E(n),prediction:a,predictionHistory:o}},n)}export{xe as A,ue as B,Ye as C,nt as D,ut as E,Le as F,re as G,se as H,be as I,a as J,ne as K,ye as L,qe as M,ct as N,tt as O,lt as P,T as R,I as S,gt as T,oe as U,ce as V,ae as W,l as X,c as Y,s as Z,ht as _,Ue as a,dt as b,Ke as c,mt as d,ot as f,Re as g,F as h,Se as i,Je as j,Qe as k,vt as l,Ve as m,A as n,et as o,He as p,o as q,at as r,bt as s,k as t,Ge as u,pt as v,$e as w,We as x,$ as y,ge as z};
@@ -1 +1 @@
1
- import{n as e,t}from"./contentVault-xfUwSJ3i.js";var n=new Set(`the.a.an.and.or.but.of.to.in.on.for.is.are.was.were.be.been.am.as.at.by.it.its.this.that.these.those.with.your.you.my.mine.me.we.us.our.they.them.their.he.she.his.her.do.does.did.has.have.had.will.would.can.could.should.about.from.into.if.then.so.than.too.very.just.also.what.when.where.who.why.how.which.not.no.yes.up.out.over`.split(`.`));function r(e){return(e.toLowerCase().match(/[a-z0-9]+/g)??[]).filter(e=>e.length>=2&&!n.has(e))}function i(e){return new Set(r(e))}function a(e,t){if(!e.size||!t.size)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);return n/(e.size+t.size-n)}function o(e,t){if(!e.size)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);return n/e.size}var s=`mavea-live-memory-v3`,c=`mavea-live-memory-v2`,l=`mavea-live-memory-v1`,u=`mavea-live-memory`,d=50,f=20,p=400,m=200,h=/^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)*$/,g=.5,_={"model-inferred":0,"web-grounded":1,"ink-correction":2,"user-stated":3,"user-edit":3},v=new Set([`user-stated`,`user-edit`,`ink-correction`,`web-grounded`]);function y(e){return v.has(e??`model-inferred`)}function b(e,t){return _[t]>_[e]?t:e}var x={nodes:[],updatedAt:0},S=null,C=0;function w(){try{let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID()}catch{}return C+=1,`mn-${C.toString(36)}-${Math.floor(Math.random()*1e9).toString(36)}`}function T(e){return e.replace(/\s+/g,` `).trim().slice(0,p)}function E(e){return e.toLowerCase().trim().replace(/\s+/g,`.`)}var D=new Set(Object.keys(_));function O(e){return typeof e==`string`&&D.has(e)}function k(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`&&e.length>0).slice(0,12);return t.length?t:void 0}function A(e){return e===`tight`||e===`standard`||e===`deep`}function j(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.floor(e):void 0}function M(e){if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.concept==`string`?E(t.concept):``;if(!n||!h.test(n))return null;let r=typeof t.body==`string`?T(t.body):``;return r?{id:typeof t.id==`string`&&t.id?t.id:w(),concept:n,body:r,updatedAt:typeof t.updatedAt==`number`&&Number.isFinite(t.updatedAt)?t.updatedAt:0,kind:t.kind===`procedural`?`procedural`:`semantic`,source:O(t.source)?t.source:`model-inferred`,state:t.state===`archived`?`archived`:`active`,prevBody:typeof t.prevBody==`string`?T(t.prevBody):void 0,turnId:typeof t.turnId==`string`?t.turnId:void 0,quote:typeof t.quote==`string`?t.quote.replace(/\s+/g,` `).trim().slice(0,m):void 0,uses:j(t.uses)??0,prefer:k(t.prefer),avoid:k(t.avoid),depth:A(t.depth)?t.depth:void 0,verify:typeof t.verify==`boolean`?t.verify:void 0,wins:j(t.wins),losses:j(t.losses)}:null}function N(){try{if(typeof localStorage>`u`)return null;let e=localStorage.getItem(l);if(!e)return null;let t=JSON.parse(e),n=Array.isArray(t.facts)?t.facts.map(e=>{if(e&&typeof e==`object`){let t=e;return typeof t.text==`string`?t.text.trim():``}return``}).filter(e=>e.length>0):[];if(!n.length)return null;let r=M({concept:`profile`,body:n.join(`. `),source:`model-inferred`});return r?{nodes:[r],updatedAt:0}:null}catch{return null}}function P(){try{if(typeof localStorage>`u`)return null;let e=localStorage.getItem(c);if(!e)return null;let t=JSON.parse(e),n=Array.isArray(t.nodes)?t.nodes.map(M).filter(e=>e!==null):[];return n.length?{nodes:n.slice(-50),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}:null}catch{return null}}var F=!1,I=0;function L(e){let t=e??{};return{nodes:(Array.isArray(t.nodes)?t.nodes.map(M).filter(e=>e!==null):[]).slice(-50),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}async function R(t){let n=++I;try{if(typeof localStorage>`u`)return;let r=await e(t);if(n!==I)return;localStorage.setItem(s,r)}catch{}}function z(){try{if(typeof localStorage>`u`)return{...x};let e=localStorage.getItem(s);if(!e)return P()??N()??{...x};let t=L(JSON.parse(e));return t.nodes.length&&R(t),t}catch{return{...x}}}async function B(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(s);if(!e)return;try{JSON.parse(e);return}catch{}let n=L(await t(e));if(F)return;S=n,F=!0,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(u,{detail:{nodes:n.nodes,changed:[]}}))}catch{}}var V=B();function H(){return V}function U(){return S||(S=z(),S)}function W(e,t){S=e,F=!0,R(e);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(u,{detail:{nodes:e.nodes,changed:t}}))}catch{}}function G(e){if(e.length<=d)return e;let t=(e,t)=>t.updatedAt-e.updatedAt,n=e.filter(e=>e.kind===`procedural`).sort(t),r=e.filter(e=>e.kind!==`procedural`).sort(t),i=n.slice(0,f),a=r.slice(0,d-i.length),o=Math.max(0,d-i.length-a.length),s=n.slice(f,f+o);return[...i,...s,...a]}function K(){return[...U().nodes].sort((e,t)=>t.updatedAt-e.updatedAt)}function q(e){let t=e.map(M).filter(e=>e!==null);if(!t.length)return 0;let n=new Map(U().nodes.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);(!t||e.updatedAt>=t.updatedAt)&&n.set(e.id,e)}return W({nodes:G([...n.values()]),updatedAt:Date.now()},t),t.length}function J(e,t={}){let n=U(),r=t.now??Date.now(),o=[],s=!1,c=[...n.nodes];for(let t of e){let e=E(t.concept);if(!e||!h.test(e))continue;let n=T(t.body),l=O(t.source)?t.source:`model-inferred`,u=t.kind===`procedural`?`procedural`:`semantic`,d=t.quote?t.quote.replace(/\s+/g,` `).trim().slice(0,m):void 0,f=c.findIndex(t=>t.concept===e&&t.state!==`archived`);if(f<0){if(!n)continue;let i={id:w(),concept:e,body:n,updatedAt:r,kind:u,source:l,state:`active`,turnId:t.turnId,quote:d,uses:0,prefer:t.prefer,avoid:t.avoid,depth:t.depth,verify:t.verify,wins:t.outcome===`win`?1:void 0,losses:t.outcome===`loss`?1:void 0};c.push(i),o.push(i),s=!0;continue}let p=c[f],_={...p},v=!1,y=!1;u===`procedural`&&_.kind!==`procedural`&&(_.kind=`procedural`,y=!0),t.prefer&&(_.prefer=Array.from(new Set([...p.prefer??[],...t.prefer])).slice(0,12),y=!0),t.avoid&&(_.avoid=Array.from(new Set([...p.avoid??[],...t.avoid])).slice(0,12),y=!0),t.depth&&t.depth!==p.depth&&(_.depth=t.depth,y=!0),typeof t.verify==`boolean`&&t.verify!==p.verify&&(_.verify=t.verify,y=!0),t.outcome===`win`?(_.wins=(p.wins??0)+1,y=!0):t.outcome===`loss`&&(_.losses=(p.losses??0)+1,y=!0),n&&n!==p.body&&(a(i(p.body),i(n))>=g?_.uses=(p.uses??0)+1:(_.prevBody=p.body,_.uses=0),_.body=n,d&&(_.quote=d),t.turnId&&(_.turnId=t.turnId),v=!0,y=!0);let x=b(p.source??`model-inferred`,l);x!==(p.source??`model-inferred`)&&(_.source=x,y=!0),y&&(_.updatedAt=r,c[f]=_,s=!0,v&&o.push(_))}return s?(c=G(c),W({nodes:c,updatedAt:r},o),o):[]}function Y(e,t){let n=U(),r=T(t);if(!r)return;let i=!1,a=n.nodes.map(t=>t.id===e?(i=!0,{...t,prevBody:t.body===r?t.prevBody:t.body,body:r,source:`user-edit`,updatedAt:Date.now()}):t);i&&W({nodes:a,updatedAt:Date.now()},[])}function X(e){let t=U(),n=t.nodes.filter(t=>t.id!==e);n.length!==t.nodes.length&&W({nodes:n,updatedAt:Date.now()},[])}function Z(){W({nodes:[],updatedAt:Date.now()},[])}export{K as a,J as c,i as d,Z as i,H as l,X as n,q as o,Y as r,y as s,u as t,o as u};
1
+ import{n as e,t}from"./contentVault-XKWjF2FB.js";var n=new Set(`the.a.an.and.or.but.of.to.in.on.for.is.are.was.were.be.been.am.as.at.by.it.its.this.that.these.those.with.your.you.my.mine.me.we.us.our.they.them.their.he.she.his.her.do.does.did.has.have.had.will.would.can.could.should.about.from.into.if.then.so.than.too.very.just.also.what.when.where.who.why.how.which.not.no.yes.up.out.over`.split(`.`));function r(e){return(e.toLowerCase().match(/[a-z0-9]+/g)??[]).filter(e=>e.length>=2&&!n.has(e))}function i(e){return new Set(r(e))}function a(e,t){if(!e.size||!t.size)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);return n/(e.size+t.size-n)}function o(e,t){if(!e.size)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);return n/e.size}var s=`mavea-live-memory-v3`,c=`mavea-live-memory-v2`,l=`mavea-live-memory-v1`,u=`mavea-live-memory`,d=50,f=20,p=400,m=200,h=/^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)*$/,g=.5,_={"model-inferred":0,"web-grounded":1,"ink-correction":2,"user-stated":3,"user-edit":3},v=new Set([`user-stated`,`user-edit`,`ink-correction`,`web-grounded`]);function y(e){return v.has(e??`model-inferred`)}function b(e,t){return _[t]>_[e]?t:e}var x={nodes:[],updatedAt:0},S=null,C=0;function w(){try{let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID()}catch{}return C+=1,`mn-${C.toString(36)}-${Math.floor(Math.random()*1e9).toString(36)}`}function T(e){return e.replace(/\s+/g,` `).trim().slice(0,p)}function E(e){return e.toLowerCase().trim().replace(/\s+/g,`.`)}var D=new Set(Object.keys(_));function O(e){return typeof e==`string`&&D.has(e)}function k(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`&&e.length>0).slice(0,12);return t.length?t:void 0}function A(e){return e===`tight`||e===`standard`||e===`deep`}function j(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.floor(e):void 0}function M(e){if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.concept==`string`?E(t.concept):``;if(!n||!h.test(n))return null;let r=typeof t.body==`string`?T(t.body):``;return r?{id:typeof t.id==`string`&&t.id?t.id:w(),concept:n,body:r,updatedAt:typeof t.updatedAt==`number`&&Number.isFinite(t.updatedAt)?t.updatedAt:0,kind:t.kind===`procedural`?`procedural`:`semantic`,source:O(t.source)?t.source:`model-inferred`,state:t.state===`archived`?`archived`:`active`,prevBody:typeof t.prevBody==`string`?T(t.prevBody):void 0,turnId:typeof t.turnId==`string`?t.turnId:void 0,quote:typeof t.quote==`string`?t.quote.replace(/\s+/g,` `).trim().slice(0,m):void 0,uses:j(t.uses)??0,prefer:k(t.prefer),avoid:k(t.avoid),depth:A(t.depth)?t.depth:void 0,verify:typeof t.verify==`boolean`?t.verify:void 0,wins:j(t.wins),losses:j(t.losses)}:null}function N(){try{if(typeof localStorage>`u`)return null;let e=localStorage.getItem(l);if(!e)return null;let t=JSON.parse(e),n=Array.isArray(t.facts)?t.facts.map(e=>{if(e&&typeof e==`object`){let t=e;return typeof t.text==`string`?t.text.trim():``}return``}).filter(e=>e.length>0):[];if(!n.length)return null;let r=M({concept:`profile`,body:n.join(`. `),source:`model-inferred`});return r?{nodes:[r],updatedAt:0}:null}catch{return null}}function P(){try{if(typeof localStorage>`u`)return null;let e=localStorage.getItem(c);if(!e)return null;let t=JSON.parse(e),n=Array.isArray(t.nodes)?t.nodes.map(M).filter(e=>e!==null):[];return n.length?{nodes:n.slice(-50),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}:null}catch{return null}}var F=!1,I=0;function L(e){let t=e??{};return{nodes:(Array.isArray(t.nodes)?t.nodes.map(M).filter(e=>e!==null):[]).slice(-50),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}async function R(t){let n=++I;try{if(typeof localStorage>`u`)return;let r=await e(t);if(n!==I)return;localStorage.setItem(s,r)}catch{}}function z(){try{if(typeof localStorage>`u`)return{...x};let e=localStorage.getItem(s);if(!e)return P()??N()??{...x};let t=L(JSON.parse(e));return t.nodes.length&&R(t),t}catch{return{...x}}}async function B(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(s);if(!e)return;try{JSON.parse(e);return}catch{}let n=L(await t(e));if(F)return;S=n,F=!0,typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(u,{detail:{nodes:n.nodes,changed:[]}}))}catch{}}var V=B();function H(){return V}function U(){return S||(S=z(),S)}function W(e,t){S=e,F=!0,R(e);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(u,{detail:{nodes:e.nodes,changed:t}}))}catch{}}function G(e){if(e.length<=d)return e;let t=(e,t)=>t.updatedAt-e.updatedAt,n=e.filter(e=>e.kind===`procedural`).sort(t),r=e.filter(e=>e.kind!==`procedural`).sort(t),i=n.slice(0,f),a=r.slice(0,d-i.length),o=Math.max(0,d-i.length-a.length),s=n.slice(f,f+o);return[...i,...s,...a]}function K(){return[...U().nodes].sort((e,t)=>t.updatedAt-e.updatedAt)}function q(e){let t=e.map(M).filter(e=>e!==null);if(!t.length)return 0;let n=new Map(U().nodes.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);(!t||e.updatedAt>=t.updatedAt)&&n.set(e.id,e)}return W({nodes:G([...n.values()]),updatedAt:Date.now()},t),t.length}function J(e,t={}){let n=U(),r=t.now??Date.now(),o=[],s=!1,c=[...n.nodes];for(let t of e){let e=E(t.concept);if(!e||!h.test(e))continue;let n=T(t.body),l=O(t.source)?t.source:`model-inferred`,u=t.kind===`procedural`?`procedural`:`semantic`,d=t.quote?t.quote.replace(/\s+/g,` `).trim().slice(0,m):void 0,f=c.findIndex(t=>t.concept===e&&t.state!==`archived`);if(f<0){if(!n)continue;let i={id:w(),concept:e,body:n,updatedAt:r,kind:u,source:l,state:`active`,turnId:t.turnId,quote:d,uses:0,prefer:t.prefer,avoid:t.avoid,depth:t.depth,verify:t.verify,wins:t.outcome===`win`?1:void 0,losses:t.outcome===`loss`?1:void 0};c.push(i),o.push(i),s=!0;continue}let p=c[f],_={...p},v=!1,y=!1;u===`procedural`&&_.kind!==`procedural`&&(_.kind=`procedural`,y=!0),t.prefer&&(_.prefer=Array.from(new Set([...p.prefer??[],...t.prefer])).slice(0,12),y=!0),t.avoid&&(_.avoid=Array.from(new Set([...p.avoid??[],...t.avoid])).slice(0,12),y=!0),t.depth&&t.depth!==p.depth&&(_.depth=t.depth,y=!0),typeof t.verify==`boolean`&&t.verify!==p.verify&&(_.verify=t.verify,y=!0),t.outcome===`win`?(_.wins=(p.wins??0)+1,y=!0):t.outcome===`loss`&&(_.losses=(p.losses??0)+1,y=!0),n&&n!==p.body&&(a(i(p.body),i(n))>=g?_.uses=(p.uses??0)+1:(_.prevBody=p.body,_.uses=0),_.body=n,d&&(_.quote=d),t.turnId&&(_.turnId=t.turnId),v=!0,y=!0);let x=b(p.source??`model-inferred`,l);x!==(p.source??`model-inferred`)&&(_.source=x,y=!0),y&&(_.updatedAt=r,c[f]=_,s=!0,v&&o.push(_))}return s?(c=G(c),W({nodes:c,updatedAt:r},o),o):[]}function Y(e,t){let n=U(),r=T(t);if(!r)return;let i=!1,a=n.nodes.map(t=>t.id===e?(i=!0,{...t,prevBody:t.body===r?t.prevBody:t.body,body:r,source:`user-edit`,updatedAt:Date.now()}):t);i&&W({nodes:a,updatedAt:Date.now()},[])}function X(e){let t=U(),n=t.nodes.filter(t=>t.id!==e);n.length!==t.nodes.length&&W({nodes:n,updatedAt:Date.now()},[])}function Z(){W({nodes:[],updatedAt:Date.now()},[])}export{K as a,J as c,i as d,Z as i,H as l,X as n,q as o,Y as r,y as s,u as t,o as u};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{r as t}from"./history-D2EH2X6D.js";import{n,r,t as i}from"./contentVault-XKWjF2FB.js";import{n as a,r as o,t as s}from"./localBudget-CxLP6bjE.js";function c(e){return e.toLowerCase().replace(/['’]/g,``).replace(/[^a-z0-9]+/g,` `).trim()}function l(e,t){let n=t?.failOpen??!1;if(!e||!e.trim())return()=>n;let r=c(e),i=r.split(` `).filter(Boolean);return e=>{let t=c(e);if(!t)return!1;if(r.includes(t))return!0;let n=t.split(` `).filter(Boolean),a=n.length;if(a===0)return!1;let o=Math.ceil(a*.9),s=new Set(n);for(let e=0;e+a<=i.length;e++){let t=0;for(let n=0;n<a;n++)s.has(i[e+n])&&t++;if(t>=o)return!0}return!1}}var u=80,d=120,f=90,p=120,m=120,h=30,g=32,_=/\b(?:trauma(?:ti[sz](?:ed?|ing))?|ptsd|clinical depression|major depression|anxiety disorder|bipolar|narcissistic|borderline personality|attachment disorder|co-?dependent(?:ency)?|dissociat(?:e|ed|ion)|avoidant attachment|anxious attachment|emotional dysregulation|hypervigilance|love-?bombing|codependency|enmeshment|enmeshed|parentif(?:ied|ying)|scapegoat(?:ing)?|golden child)\b/i,v=new Set([`person`,`option`,`want`,`fear`,`constraint`,`tradeoff`,`contradiction`,`open_loop`,`action`,`value`,`question`]),ee=new Set([`supports`,`tensions`,`depends_on`,`same_thread`,`blocks`]),y=new Set([`forming`,`stable`,`maybe`]),b=new Set([`said`,`inferred`]);function x(e,t){if(typeof e!=`string`)return null;let n=e.trim();return n?n.length>t?`${n.slice(0,t-1)}…`:n:null}function S(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=x(n.id,32);if(!r)return null;let i=v.has(n.kind)?n.kind:null;if(!i)return null;let a=x(n.label,u);if(!a)return null;let o=x(n.quote,d);if(!o||_.test(a)||_.test(o)||!t(o))return null;let s=y.has(n.status)?n.status:`stable`,c=b.has(n.confidence)?n.confidence:`said`,l=typeof n.weight==`number`?n.weight:1;return{id:r,kind:i,label:a,quote:o,status:s,confidence:c,weight:Math.max(1,Math.min(3,Math.round(l)))}}function C(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=x(n.from,32),i=x(n.to,32);if(!r||!i||t&&(!t.has(r)||!t.has(i))||r===i)return null;let a=ee.has(n.kind)?n.kind:null;if(!a)return null;let o=typeof n.label==`string`?x(n.label,h)??void 0:void 0;return{from:r,to:i,kind:a,...o?{label:o}:{}}}function te(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=x(n.id,32);if(!r)return null;let i=x(n.label,g);if(!i||_.test(i))return null;let a=Array.isArray(n.atomIds)?n.atomIds:[],o=new Set,s=[];for(let e of a){let n=x(e,32);n&&t.has(n)&&!o.has(n)&&(o.add(n),s.push(n))}if(s.length===0)return null;let c=typeof n.weight==`number`?n.weight:1;return{id:r,label:i,atomIds:s,weight:Math.max(1,Math.min(3,Math.round(c)))}}function w(e,t){let n=null;if(e&&typeof e==`object`&&!Array.isArray(e))n=e;else if(typeof e==`string`){let t=e.match(/\{[\s\S]*\}/);if(!t)return null;try{n=JSON.parse(t[0])}catch{return null}}if(!n)return null;let r=x(n.center,f);if(!r)return null;let i=typeof n.title==`string`?x(n.title,60)??void 0:void 0,a=l(t,{failOpen:!0}),o=(Array.isArray(n.atoms)?n.atoms:[]).map(e=>S(e,a)).filter(e=>e!==null);if(o.length===0)return null;let s=new Set(o.map(e=>e.id)),c=(Array.isArray(n.links)?n.links:[]).map(e=>C(e,s)).filter(e=>e!==null),u=(Array.isArray(n.clusters)?n.clusters:[]).map(e=>te(e,s)).filter(e=>e!==null),d;if(n.unsaid&&typeof n.unsaid==`object`&&!Array.isArray(n.unsaid)){let e=n.unsaid,t=x(e.label,p),r=x(e.why,m);t&&r&&!_.test(t)&&!_.test(r)&&(d={label:t,why:r,confidence:`maybe`})}return{center:r,...i?{title:i}:{},atoms:o,links:c,...u.length?{clusters:u}:{},...d?{unsaid:d}:{}}}function T(e,t){let n=null;if(e&&typeof e==`object`&&!Array.isArray(e))n=e;else if(typeof e==`string`){let t=e.match(/\{[\s\S]*\}/);if(!t)return null;try{n=JSON.parse(t[0])}catch{return null}}if(!n)return null;let r=l(t,{failOpen:!0}),i=(Array.isArray(n.add)?n.add:[]).map(e=>S(e,r)).filter(e=>e!==null),a=(Array.isArray(n.addLinks)?n.addLinks:[]).map(e=>C(e)).filter(e=>e!==null);return i.length===0&&a.length===0?null:{add:i,addLinks:a}}var E=e({SESSION_STORAGE_KEY:()=>O,SESSION_TTL_MS:()=>k,SESSION_TURNS_CAP:()=>10,clearSession:()=>$,hasSavedSession:()=>Q,loadSession:()=>Z,saveSession:()=>Y,whenSessionSettled:()=>X});function D(e){return e===`replace`||e===`augment`||e===`refine`}var O=`mavea-live-session-v1`,k=6048e5,A=6e5,j=4096;function M(e){let t=JSON.stringify(e,(e,t)=>typeof t==`string`&&t.length>j&&t.startsWith(`data:`)?``:t);return JSON.parse(t)}function N(e){return!!e&&typeof e==`object`&&Array.isArray(e.blocks)}function P(e){if(!e||typeof e!=`object`)return null;let t=e;return t.role!==`user`&&t.role!==`assistant`||typeof t.content!=`string`?null:{role:t.role,content:t.role===`user`?r(t.content):t.content}}function F(e,t){if(!e||typeof e!=`object`)return null;let n=e;if(![`circle`,`underline`,`point`,`highlight`,`rising`,`falling`,`bracket`,`note`,`connect`].includes(n.kind)||typeof n.at!=`string`||!n.at)return null;let r={kind:n.kind,at:n.at};if(typeof n.to==`string`&&n.to&&(r.to=n.to),typeof n.label==`string`&&n.label&&(r.label=n.label),r.kind===`note`&&!r.label)return null;if((n.color===`key`||n.color===`cool`)&&(r.color=n.color),r.kind===`connect`){let e=typeof n.onIndex==`number`?Math.round(n.onIndex):-1;if(!r.to||e<0||e>=t)return null;r.onIndex=e}return r}function I(e,t){if(!Array.isArray(e))return[];let n=[];for(let r of e){if(!r||typeof r!=`object`)continue;let e=r;if(typeof e.index!=`number`)continue;let i={index:e.index,...typeof e.say==`string`?{say:e.say}:{},...typeof e.saySpoken==`string`?{saySpoken:e.saySpoken}:{}},a=F(e.mark,t);if(a&&(i.mark=a),Array.isArray(e.marks)){let n=e.marks.map(e=>F(e,t)).filter(e=>e!==null);n.length&&(i.marks=n)}n.push(i)}return n}function L(e){if(!e||typeof e!=`object`)return null;let n=e;if(!N(n.spec)||n.spec.blocks.length===0||typeof n.question!=`string`)return null;let i=n.mind?w(n.mind):null,a={question:r(n.question),...typeof n.id==`string`&&n.id.trim()?{id:n.id}:{},narration:typeof n.narration==`string`?n.narration:``,...typeof n.spoken==`string`?{spoken:n.spoken}:{},mode:D(n.mode)?n.mode:`replace`,...typeof n.topicShift==`boolean`?{topicShift:n.topicShift}:{},tour:I(n.tour,n.spec.blocks.length),spec:n.spec,at:typeof n.at==`number`&&Number.isFinite(n.at)?n.at:0,...i?{mind:i}:{}};return a.id=t(a),a}var R=null,z=!1,B=null,V=0,H=0;function U(e){let t=e;if(!t||typeof t!=`object`||t.v!==1||typeof t.savedAt!=`number`||!Number.isFinite(t.savedAt)||!Array.isArray(t.frames))return null;let n=t.frames.map(L).filter(e=>e!==null).slice(-10);if(!n.length)return null;let r=(Array.isArray(t.history)?t.history:[]).map(P).filter(e=>e!==null);return{v:1,savedAt:t.savedAt,history:r,frames:n}}async function W(e){let t=++H;try{if(typeof localStorage>`u`)return;let r=await n(e);if(t!==H)return;await o(O,r)}catch{}}async function G(){let e=R;if(!e||e.frames.length<2)return 0;let t={...e,frames:e.frames.slice(1)},r=++H,i=await n(t);return r===H?(R=t,a(O,i)):0}s(O,G);function K(){try{if(typeof localStorage>`u`)return null;let e=localStorage.getItem(O);if(!e)return null;let t=U(JSON.parse(e));return t&&W(t),t}catch{return null}}var q=null;function J(){return z?Promise.resolve():q||(q=(async()=>{try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(O);if(!e)return;let t,n=!1;try{t=U(JSON.parse(e)),n=t!==null}catch{t=U(await i(e))}if(z)return;R=t,t&&(B=t,n&&W(t))}catch{}finally{z=!0,q=null}})(),q)}J();function Y(e,t,n=Date.now()){if(!z){let r=V;J().then(()=>{r===V&&(z=!0,Y(e,t,n))});return}try{if(typeof localStorage>`u`)return;if(!t.length){$();return}let r=B&&n-B.savedAt<=6048e5?B:null,i=r?.frames.length?r.frames[r.frames.length-1]:null,a=!!i&&!t.some(e=>e.at===i.at),o=a?[...r.frames,...t]:t,s=a?[...r.history,...e]:e,c=M(o.slice(-10)).map(L).filter(e=>e!==null),l={v:1,savedAt:n,history:s.slice(-20).map(P).filter(e=>e!==null),frames:c},u=JSON.stringify(l);if(u.length>A&&c.length>1){let e=u.length,t=0;for(;e>A&&c.length-t>1;)e-=JSON.stringify(c[t]).length+1,t++;c=c.slice(t),l={...l,frames:c},u=JSON.stringify(l)}if(u.length>A)return;R=l,z=!0,W(l)}catch{}}function X(e=1200){return z?Promise.resolve():Promise.race([J(),new Promise(t=>setTimeout(t,e))]).then(()=>void 0)}function Z(e=Date.now()){let t=R??K();return t&&!R&&(R=t,z=!0),t?e-t.savedAt>6048e5?null:t:(J(),null)}function Q(){if(R)return!0;try{return typeof localStorage<`u`&&!!localStorage.getItem(`mavea-live-session-v1`)}catch{return!1}}function $(){R=null,B=null,z=!0,V++,H++;try{typeof localStorage<`u`&&localStorage.removeItem(O)}catch{}}export{Y as a,T as c,Z as i,$ as n,E as o,Q as r,w as s,O as t};
@@ -0,0 +1,5 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/liveSchema-Z_39HuDI.js","assets/icons-gLFQTv74.js","assets/jsx-runtime-DeHZSEgm.js","assets/rolldown-runtime-DkW27tQK.js","assets/safeImageUrl-BINWXOTz.js","assets/empty-D51uhW0E.js","assets/catalog-BHjl-1uH.js","assets/sourceHost-BV3t2XDb.js","assets/spokenText-Dy-GZvZV.js","assets/annotations-CftUUB13.js","assets/catalog-CRekRbKO.js","assets/preload-helper-CiWYd9n-.js","assets/facts-BUGuVUIc.js","assets/blockTypes-DUDdP3pB.js","assets/streamParse-BX0bAppQ.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./compiler-runtime-qQQXpJgv.js";import{n as r,t as i}from"./preload-helper-CiWYd9n-.js";import{c as a,i as o}from"./http-Bqk6nJiH.js";import{i as s}from"./number-zqlPMliA.js";import{E as c,G as l,H as u,L as d,P as f,U as p,V as m,_ as h,b as g,m as _,p as v,s as y,v as b,y as x,z as ee}from"./store-D16dGt7I.js";import{t as te}from"./providers-CPhoN8j0.js";import{n as S,u as C}from"./useLiveConfig-CvOQTr0s.js";import{t as ne}from"./json-J4Y32_i9.js";import{i as w,n as T,r as E}from"./ledger-DHS2di3l.js";import{d as re,i as D,l as O,o as k,u as A}from"./format-BkvssSOr.js";import{t as j}from"./dataPending-DGdCvY5Y.js";import{t as M}from"./now-C9-UAzTC.js";import{n as ie,t as ae}from"./predictions-CkVKHq-5.js";import{t as N}from"./notify-Bz4wuE4T.js";import{a as oe,i as se,r as ce,t as le,u as ue}from"./dashboardEvents-MzCzak6K.js";var P=t(),de=n(),fe=`mavea-dashboard-scheduler`;function pe(){if(typeof navigator>`u`)return null;let e=navigator.locks;return typeof e?.request==`function`?e:null}async function me(e){let t=pe();if(!t){await e();return}try{await t.request(fe,{ifAvailable:!0},async t=>{t&&await e()})}catch{await e()}}function he(e){return new Set(e.toLowerCase().replace(/[^a-z0-9 ]/g,` `).replace(/\s+/g,` `).trim().split(` `).filter(e=>e.length>3))}function F(e){return e.replace(/\s+/g,` `).trim().toLowerCase()}var ge={WATCHING:`watching`,CLEAR:`clear`,TRIGGERED:`triggered`,AWAITING:`awaiting`},_e={ORIGIN:`origin`,ADDED:`added`,LINKED:`linked`},ve={CLEAR:1,WATCHING:.75,TRIGGERED:0,AWAITING:0};function ye(e){let t=e.tripwires.filter(e=>e.state!==`AWAITING`);if(t.length===0)return null;let n=t.reduce((e,t)=>e+ve[t.state],0);return Math.round(100*n/t.length)}function be(e){return e===null?``:e>=80?`Tracking well`:e>=55?`Holding, with risks`:e>=30?`Slipping`:`Lines are breaking`}var xe=new Set([`thesis`,`alignmentgauge`,`standingalerts`,`sourceslineage`]);function Se(e){let t=e.block.type;return xe.has(t)?!0:!!e.metricId&&t===`insight`}function Ce(e,t){let n=t.block.type;if(!xe.has(n)){if(t.metricId&&n===`insight`){let n=e.metrics.find(e=>e.id===t.metricId);if(n){let e=n.lastValue===null?`—`:n.lastRaw??O(String(n.lastValue),n.unit),r=n.lastValue===null?`inferred`:`strong`,i=t.block.props;return{...t.block,props:{...i,stat:e,conf:r}}}}return t.block}let r=e.sources.find(e=>e.kind===`ORIGIN`);if(n===`thesis`){let n=e.tripwires[0],i={reasoning:e.thesis.text,...r?{asOf:r.title}:{},...n?{reconsiderIf:n.label,tripwireState:ge[n.state]}:{}};return{...t.block,props:i}}if(n===`alignmentgauge`){let n=ye(e),r={pct:n,band:be(n)};return{...t.block,props:r}}if(n===`standingalerts`){let n={alerts:e.tripwires.map(e=>({label:e.label,state:ge[e.state]}))};return{...t.block,props:n}}let i={rows:e.sources.map(e=>({kind:_e[e.kind],label:e.title,...e.contributed?{contributed:e.contributed}:{}}))};return{...t.block,props:i}}var we={metric:`{"kind":"metric","value":number,"raw"?:string}`,series:`{"kind":"series","points":[{"label":string,"value":number}]}`,list:`{"kind":"list","items":[string]}`,table:`{"kind":"table","columns":[string],"rows":[[string]]}`,event:`{"kind":"event","events":[{"when":string,"title":string,"detail"?:string}]}`};function I(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function L(e){return Array.isArray(e)?e:[]}function R(e){return typeof e==`string`?e.trim():typeof e==`number`&&Number.isFinite(e)?String(e):typeof e==`boolean`?e?`yes`:`no`:``}function z(e,...t){for(let n of t){let t=R(e[n]);if(t)return t}return``}function Te(e){if(!I(e))return R(e);let t=z(e,`text`,`label`,`title`,`name`,`item`);if(t){let n=Object.entries(e).filter(([e])=>![`text`,`label`,`title`,`name`,`item`].includes(e)).map(([,e])=>R(e)).filter(Boolean);return n.length?`${t} — ${n.join(` — `)}`:t}return Object.values(e).map(R).filter(Boolean).join(` — `)}function Ee(e,t){let n=I(t)?t:{};switch(e){case`metric`:{let e=s(n.value??n.number??n.amount??t);if(e===null)return null;let r=z(n,`raw`,`display`,`formatted`);return{kind:`metric`,value:e,...r?{raw:r}:{}}}case`series`:{let e=L(n.points??n.data??n.series).map(e=>{let t=I(e)?e:{},n=z(t,`label`,`name`,`x`,`when`,`date`),r=s(t.value??t.y??t.amount);return n&&r!==null?{label:n,value:r}:null}).filter(e=>e!==null);return e.length?{kind:`series`,points:e}:null}case`list`:{let e=L(n.items??n.list??n.entries??t).map(Te).filter(Boolean);return e.length?{kind:`list`,items:e}:null}case`table`:{let e=L(n.rows??n.data??t),r=L(n.columns??n.headers??n.cols).map(R).filter(Boolean);!r.length&&I(e[0])&&(r=Object.keys(e[0]).map(R));let i=e.map(e=>Array.isArray(e)?e.map(R):I(e)?r.map(t=>R(e[t])):[]).filter(e=>e.some(Boolean));return r.length&&i.length?{kind:`table`,columns:r,rows:i}:null}case`event`:{let e=L(n.events??n.items??t).map(e=>{let t=I(e)?e:{},n=z(t,`title`,`name`,`event`,`label`);if(!n)return null;let r=z(t,`when`,`date`,`time`,`at`,`start`),i=z(t,`detail`,`description`,`note`,`status`);return{when:r,title:n,...i?{detail:i}:{}}}).filter(e=>e!==null);return e.length?{kind:`event`,events:e}:null}}}var De={list:`list`,checklist:`list`,timeline:`event`,datatable:`table`,standings:`table`,chart:`series`,bars:`series`};function B(e){return De[e]??null}function V(e,t){return e.raw??O(String(e.value),t)}function Oe(e,t,n={},r){let i=typeof n.title==`string`?n.title:``,a={...i?{title:i}:{},...n.icon?{icon:n.icon}:{}};switch(e){case`insight`:return t.kind===`metric`?{...n,...a,stat:V(t,r),conf:`strong`}:null;case`kpi`:return t.kind===`metric`?{...a,items:[{label:i||`Now`,value:V(t,r)}]}:t.kind===`series`?{...a,items:t.points.slice(-4).map(e=>({label:e.label,value:String(e.value)}))}:null;case`list`:case`checklist`:{let n=t.kind===`list`?t.items:t.kind===`event`?t.events.map(e=>[e.when,e.title,e.detail].filter(Boolean).join(` — `)):t.kind===`series`?t.points.map(e=>`${e.label} — ${e.value}`):t.kind===`table`?t.rows.map(e=>e.filter(Boolean).join(` — `)):null;return n?.length?e===`checklist`?{...a,rows:n.map(e=>({t:e,st:`todo`}))}:{...a,items:n}:null}case`timeline`:return t.kind===`event`?{...a,events:t.events.map(e=>({time:e.when,title:e.title,...e.detail?{detail:e.detail}:{}}))}:null;case`datatable`:{if(t.kind!==`table`)return null;let e=t.columns.map((e,t)=>({key:`c${t}`,label:e}));return{...a,columns:e,rows:t.rows.map(e=>Object.fromEntries(e.map((e,t)=>[`c${t}`,e])))}}case`standings`:{if(t.kind!==`table`)return null;let e=t.rows.map(e=>({team:e[0]??``,rec:e[1]??``,gb:e[2]??``})).filter(e=>e.team);return e.length?{...a,rows:e}:null}case`chart`:return t.kind===`series`?{...a,labels:t.points.map(e=>e.label),series:[{name:i||`Value`,color:`var(--insight)`,data:t.points.map(e=>e.value)}],conf:`strong`}:null;case`bars`:return t.kind===`series`?{...a,bars:t.points.map(e=>({label:e.label,value:e.value})),conf:`strong`}:null;default:return null}}r();function ke(e){let t=e instanceof Error?e.message:String(e);if(/\b429\b|rate.?limit/i.test(t)){let e=Number(/(?:in|after)\s+([\d.]+)\s*s/i.exec(t)?.[1]);return Number.isFinite(e)&&e>0?{kind:`rate-limit`,retryAt:Date.now()+Math.min(e*1e3,12e4)}:{kind:`rate-limit`}}return/\b401\b|\b403\b|api key|unauthor/i.test(t)?{kind:`auth`}:/\b5\d\d\b|overloaded|unavailable|capacity/i.test(t)?{kind:`provider-unavailable`}:{kind:`network`}}function Ae(e,t,n,r){switch(e){case`gt`:return t>r;case`gte`:return t>=r;case`lt`:return t<r;case`lte`:return t<=r;case`crosses_up`:return n!==null&&n<r&&t>=r;case`crosses_down`:return n!==null&&n>r&&t<=r;case`pct_rise`:return n!==null&&n!==0&&(t-n)/Math.abs(n)*100>=r;case`pct_drop`:return n!==null&&n!==0&&(n-t)/Math.abs(n)*100>=r;default:return!1}}function je(e,t,n){if(n===0)return!0;let r=t/n;switch(e){case`gt`:case`gte`:return r>=.9;case`lt`:case`lte`:return r<=1.1;default:return!0}}function Me(e,t,n){return t===null?`AWAITING`:Ae(e.comparator,t,n,e.threshold)?`TRIGGERED`:je(e.comparator,t,e.threshold)?`WATCHING`:`CLEAR`}function H(e,t={}){let n=new Map(e.metrics.map(e=>[e.id,e])),r=[];return{tripwires:e.tripwires.map(e=>{let i=n.get(e.metricId),a=i?i.lastValue:null,o=Me(e,a,e.metricId in t?t[e.metricId]:a),s=o===`TRIGGERED`&&e.state!==`TRIGGERED`?{...e,state:o,brokenValue:a??void 0,brokenAt:i?.asOf}:{...e,state:o};return o===`TRIGGERED`&&e.state!==`TRIGGERED`&&r.push(s),s}),newlyTriggered:r}}function Ne(e,t){return e.nextDataAt<=t||e.oneShotAt!==void 0&&e.oneShotAt<=t}function U(e){return e.oneShotAt===void 0?e.nextDataAt:Math.min(e.nextDataAt,e.oneShotAt)}function Pe(e,t=Date.now(),n=4){return e.filter(e=>Ne(e,t)).sort((e,t)=>U(e)-U(t)).slice(0,n)}function Fe(e,t=Date.now()){return e.filter(e=>e.nextAiAt<=t).sort((e,t)=>e.nextAiAt-t.nextAiAt)[0]??null}function W(e,t,n=Date.now()){return e.smartTrigger&&t.length>0?{fire:!0,trigger:t[0]}:(e.cadence.ai===`daily`||e.cadence.ai===`weekly`)&&n>=e.nextAiAt?{fire:!0,trigger:`scheduled`}:{fire:!1,trigger:null}}function G(e){let t=[];for(let n of o(e.sources)){let e=a(n);typeof e.title==`string`&&typeof e.url==`string`&&t.push({title:e.title,url:e.url})}return t}function K(e,t){return(e.sources?.length??0)>0||G(t).length>0}function Ie(e){return`- VALUE "${e.label}" — ${e.query}`}function Le(e,t,n){let r=B(e.block.type);return r?`- DATA #${t} [${r}] ${e.refreshQuery}\n return EXACTLY: ${we[r]}`:`- BLOCK #${t} [${e.block.type}] ${e.refreshQuery}\n`+(n?` expected props (use EXACTLY these field names): ${n}\n`:``)+` current content: ${JSON.stringify(e.block.props??{}).slice(0,600)}`}function Re(){return{values:{},widgets:{}}}function ze(e){return{metrics:e.metrics.filter(e=>e.query.trim()!==``&&!e.blankKey),targets:e.widgets.filter(e=>!!e.refreshQuery?.trim()&&!Se(e))}}function Be(e){let t=[e.block.type];if(e.block.type===`composite`){let n=e.block.props.regions;for(let e of n??[]){let n=e?.block?.type;typeof n==`string`&&n&&t.push(n)}}return t}function Ve(e,t,n){let r=n.reduce((e,t)=>e+(B(t.block.type)?300:1200),0);return 400+t.length*120+r+(e.prediction?150:0)}var He=12e3;function q(e){let t=[],n=1200;for(let r of e){let{metrics:e,targets:i}=ze(r);if(e.length===0&&i.length===0)continue;let a=Ve(r,e,i);if(t.length>0&&n+a>He)break;n+=a,t.push({d:r,metrics:e,targets:i})}return t}function Ue(e,t){let n=Math.max(0,Math.round((t-e)/6e4));if(n<60)return`${n}m ago`;let r=Math.round(n/60);return r<24?`${r}h ago`:`${Math.round(r/24)}d ago`}function We(e,t,n){let r=[...e.metrics.map(Ie),...e.targets.map((e,t)=>Le(e,t,n(e.block.type))),...e.d.prediction?[`- PREVIOUS EXPECTATION (made ${Ue(e.d.prediction.at,t)}): "${e.d.prediction.text}" — grade it.`]:[]];return`DASHBOARD ${e.d.id} "${e.d.title}"\n${r.join(`
3
+ `)}`}function Ge(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Ke(e,t){let n=e.dashboards;if(n===void 0&&t.length===1)return{[t[0].d.id]:e};let r=new Map,i=[];if(Array.isArray(n))for(let e of n){let t=a(e);i.push(t),typeof t.id==`string`&&t.id&&r.set(t.id,t)}else if(Ge(n))for(let[e,t]of Object.entries(n))r.set(e,a(t));let o={};return t.forEach((e,t)=>{o[e.d.id]=r.get(e.d.id)??i[t]??{}}),o}function qe(e){let t=a(e);if(typeof t.metricLabel!=`string`||!t.metricLabel.trim())return;let n=o(t.readings).filter(e=>typeof e==`string`&&!!e.trim());if(!(n.length<2))return{metricLabel:t.metricLabel.trim(),readings:n,note:typeof t.note==`string`?t.note.trim().slice(0,200):``}}function Je(e){let t=a(e),n=typeof t.start==`string`?Date.parse(t.start):NaN,r=typeof t.end==`string`?Date.parse(t.end):NaN;if(!(!Number.isFinite(n)||!Number.isFinite(r)||r<=n)&&!(r-n>6048e5))return{startAt:n,endAt:r,label:typeof t.label==`string`?t.label.trim().slice(0,60):``}}var Ye=` YOUR PREVIOUS ATTEMPT DID NOT ACTUALLY SEARCH (no citations came back). Before answering this time, you MUST run a real web search for every DASHBOARD section above and report only what those searches returned, listing the real URLs relied on in "sources" — this is not optional. If search is genuinely unavailable or turns up nothing, return null values and omit "sources" entirely; never invent a value or a source just to satisfy this instruction.`;async function Xe(e,t,n={}){let r=Date.now(),c={ok:!0,grounded:!1,perDashboard:{},sources:[],attempts:0};if(e.length===0&&!n.briefingContext)return c;try{let c=te(t.provider),l=e.flatMap(e=>e.targets.filter(e=>!B(e.block.type))),u=new Set(l.flatMap(Be)),d=u.size>0,f=d?await i(()=>import(`./liveSchema-Z_39HuDI.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])):null,p=e.map(e=>We(e,r,f?f.blockShapeHint:()=>null)).join(`
4
+
5
+ `),m={type:`object`,properties:{dashboards:{type:`array`,description:`One object per DASHBOARD section above, in the same order, each echoing its id.`,items:{type:`object`,properties:{id:{type:`string`},values:{type:`object`,description:`Map of VALUE label -> current numeric value, or null.`},observations:{type:`array`,description:`Exactly one object per DATA item for this dashboard, in the same order, each in the exact shape that DATA line specifies.`,items:{type:`object`}},blocks:{type:`array`,description:`Exactly one block per BLOCK item for this dashboard, in order.`,items:{type:`object`,properties:{type:{type:`string`},props:{type:`object`}},required:[`type`,`props`]}},expects:{type:`string`,description:`A short "by next check" expectation — omit if nothing here is genuinely predictable.`},grade:{type:`object`,description:`ONLY when this dashboard has a PREVIOUS EXPECTATION line.`,properties:{result:{type:`string`},note:{type:`string`}}},disagreement:{type:`object`,description:`ONLY when two real sources genuinely disagreed on a value.`,properties:{metricLabel:{type:`string`},readings:{type:`array`,items:{type:`string`}},note:{type:`string`}}},liveWindow:{type:`object`,description:`ONLY when search revealed a real, bounded live-event window.`,properties:{start:{type:`string`},end:{type:`string`},label:{type:`string`}}}},required:[`id`]}},...n.briefingContext?{briefing:{type:`string`,description:`2-4 sentences summarizing ALL dashboards (this batch + the given CONTEXT), real values only; use [[shown|said]] pronunciation twins for speech-risky terms.`}}:{},sources:{type:`array`,description:`OMIT unless this call used web search. Real source URLs actually relied on — never invented.`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]}}},required:[`dashboards`]},h=d===!1,g=Math.min(h?4e3:14e3,Math.max(h?1500:3e3,1200+e.reduce((e,t)=>e+Ve(t.d,t.metrics,t.targets),0)+(n.briefingContext?700:0))),_=M()+` You are checking several standing trackers at once. Return ONLY JSON: {"dashboards": [{"id": string, "values": {...}, "observations": [...], "blocks": [...], "expects"?: string, "grade"?: {...}, "disagreement"?: {...}, "liveWindow"?: {...}}, ...], `+(n.briefingContext?`"briefing": string, `:``)+`"sources": [...]}. Use web search for every DASHBOARD section below — never invent a value or detail. ECHO each dashboard's exact "id" so results map back correctly. For a VALUE item, give its CURRENT real number (no units) or null if unverifiable. For a BLOCK For a DATA item, return ONE object in "observations" (same order as the DATA lines) in the exact shape that line prints — plain data, no component or prop names, and omit the entry entirely rather than inventing a value you did not find. For a BLOCK item, produce exactly one block whose "type" is the EXACT bracketed type given — never substitute a different one — matching its current content for detail level (real names, numbers, dates). Where a BLOCK lists "expected props", copy that shape EXACTLY: the same field names, and an array shown as string[] takes plain strings, never objects. CRITICAL — a "current content" showing something live, in progress, or upcoming is NOT necessarily still true right now: explicitly check whether it has SINCE concluded and report the concluding outcome if so, reasoning from the date/time above which of upcoming/live/finished applies at this exact moment. If a dashboard has a PREVIOUS EXPECTATION line, grade it honestly ("hit" it came true, "miss" it did not, "unclear" if genuinely unknowable yet) — grade ONLY dashboards that have this line, never invent a grade otherwise. Offer a fresh "expects" only when something is genuinely predictable by the next check; most checks have nothing worth predicting, so omit it far more often than not. If two real sources genuinely disagree on a value, report it in "disagreement" instead of silently picking one. If search reveals a real bounded live-event window (a match's actual start/end time) for a dashboard, report it in "liveWindow" with ISO start/end — never invent a time. `+(n.briefingContext?`Also compose "briefing": 2-4 warm, concrete sentences summarizing ALL dashboards — this batch PLUS the CONTEXT lines below (already-known values — do NOT search for those, use them as given) — real values only, never memory. The briefing is displayed and spoken: preserve normal spelling on the left, but wrap a name, place, brand, or borrowed term a voice would genuinely mispronounce as [[shown|said]] (for example [[Omakase|oh-mah-kah-seh]]). The said side must be lowercase voice-safe syllables matching a native/source-language pronunciation, never IPA or an Anglicized guess. Annotate sparingly — the said side is one you invent, so a wrong one makes the voice say a word WRONG. Ordinary English words and names are never annotated. `:``)+`If search genuinely turns up nothing more specific than what is already shown, say so honestly rather than inventing new specifics or repeating the old ones as if just confirmed. CITE SOURCES — every real URL actually relied on, in "sources"; omit it entirely if you used no search.`,v=`Use web search.\n\n${p}`+(n.briefingContext?`\n\nCONTEXT (already known — do not search these):\n${n.briefingContext}`:``),y=e=>c.generate({system:e?_+Ye:_,history:[],user:v,maxTokens:g,temperature:.15,thinkingLevel:e?`high`:`low`,tools:{webSearch:!0,requireSearch:!0},format:m,...d?{blockTypes:[...u],complexity:`brief`}:{}},t).then(e=>({rr:e,grounded:K(e,a(ne(e.raw)))})),b=await y(!1),x=1;!b.grounded&&e.length>0&&(b=await y(!0),x=2);let{rr:S}=b,C=a(ne(S.raw)),w=K(S,C),T=Ke(C,e),E=S.sources&&S.sources.length?S.sources:G(C),re=[...new Set(E.map(e=>k(e.url)).filter(Boolean))],D=f?f.validateLiveResponse:null,A={};for(let t of e){let e=T[t.d.id]??{},n=Re();if(w&&t.metrics.length>0){let r=a(e.values),i=new Map(Object.entries(r).map(([e,t])=>[F(e),t]));for(let e of t.metrics){let t=s(r[e.label]??i.get(F(e.label)));t!==null&&(n.values[e.id]={value:t,raw:O(String(t),e.unit)})}}if(t.targets.length>0&&w){let i=o(e.observations??e.data);t.targets.forEach((e,a)=>{let o=B(e.block.type);if(!o)return;let s=Ee(o,i[a]);if(!s)return;let c=e.block.props??{},l=e.metricId?t.d.metrics.find(t=>t.id===e.metricId):void 0,u=Oe(e.block.type,s,c,l?.unit);u&&(n.widgets[e.id]={...e.block,props:u},ee(t.d.id,e.id,s,r,re))})}if(t.targets.length>0&&D){let r=o(e.blocks);t.targets.forEach((e,t)=>{if(B(e.block.type))return;let i=r[t];if(!i)return;let a=D({narration:``,title:`x`,sub:``,blocks:[i]},new Set(Be(e)),1,w,!0)?.blocks[0];a&&a.type===e.block.type&&(n.widgets[e.id]=a)})}if(w){let r=ae(e.expects);if(r&&(n.expects=r),t.d.prediction){let t=ie(e.grade);t&&(n.grade=t)}let i=qe(e.disagreement);i&&(n.disagreement=i);let a=Je(e.liveWindow);a&&(n.liveWindow=a)}A[t.d.id]=n}Object.values(A).every(e=>Object.keys(e.values).length===0&&Object.keys(e.widgets).length===0&&!e.expects)&&console.warn(`[dashboards] refreshDashboards got a response but nothing parsed out of it for any dashboard (${w?`empty/unparseable`:`ungrounded after ${x} attempt${x>1?`s`:``}, discarded`})`,{dashboardIds:e.map(e=>e.d.id),raw:S.raw});let j=n.briefingContext&&w&&typeof C.briefing==`string`&&C.briefing.trim()?C.briefing.trim():void 0;return{ok:!0,grounded:w,perDashboard:A,sources:E,attempts:x,...j?{briefing:j}:{}}}catch(t){console.error(`[dashboards] refreshDashboards failed`,t);let n={};for(let t of e)n[t.d.id]=Re();return{ok:!1,grounded:!1,perDashboard:n,sources:[],attempts:0,failure:ke(t)}}}function Ze(e){let t=Array.isArray(e?.sources)?e.sources:[],n=[];for(let e of t){let t=e&&typeof e==`object`?e:{};typeof t.title==`string`&&typeof t.url==`string`&&n.push({title:t.title,url:t.url})}return n}function Qe(e){try{let t=typeof e==`string`?JSON.parse($e(e)):e,n=t?.verdict;return{text:typeof n==`string`&&n.trim()?n.trim():null,sources:Ze(t)}}catch{return{text:typeof e==`string`&&e.trim()?e.trim():null,sources:[]}}}function $e(e){let t=e.indexOf(`{`),n=e.lastIndexOf(`}`);return t>=0&&n>t?e.slice(t,n+1):e}async function J(e,t,n,r=Date.now()){try{let i=te(n.provider),a=t===`scheduled`?null:t,o=a?e.metrics.find(e=>e.id===a.metricId):void 0,s=e.metrics.map(e=>`${e.label}=${e.lastRaw??`—`}`).join(`, `),c=a?`A line the user set just crossed: "${a.label}" — ${o?.label??a.label} is now ${o?.lastRaw??a.brokenValue??`past the threshold`}. Currently tracked: ${s}. Using web search, say briefly and honestly what the latest numbers show and whether this reads as a real move or just noise.`:`Currently tracked: ${s}. Using web search, give a brief, honest read: what the latest numbers show and what has materially changed since the last check.`,l=await i.generate({system:M()+` You give a brief, honest read on the latest numbers a user is tracking: what they show now, what has materially changed since the last check, and — if a specific line was crossed — whether that looks like a real move or noise. One or two plain sentences. Never invent data. CITE YOUR SOURCES — whenever you used web search, include the exact source URLs you actually relied on as a top-level "sources": [{"title": string, "url": string}] array; only real URLs from the search results — never invent one, and omit "sources" entirely if you didn’t search. Return ONLY JSON: {"verdict":"…","sources":[...]}.`,history:[],user:c,maxTokens:700,temperature:.3,thinkingLevel:`low`,tools:{webSearch:!0}},n),{text:u,sources:d}=Qe(l.raw);return u?{text:u,at:r,grounded:(l.sources?.length??0)>0||d.length>0,...l.sources&&l.sources.length?{sources:l.sources}:{},...a?{tripwireId:a.id}:{}}:null}catch(e){return console.error(`[dashboards] analyzeMove failed`,e),null}}function et(e){let t=(e??[]).slice(-3);if(t.length<3)return 0;let[n,r,i]=t;return n.value<r.value&&r.value<i.value?1:n.value>r.value&&r.value>i.value?-1:0}function tt(e){let t=e.metrics.filter(e=>(e.history?.length??0)>=3);for(let n=0;n<t.length;n++)for(let r=n+1;r<t.length;r++){let i=t[n],a=t[r],o=et(i.history);if(o!==0&&o===et(a.history))return{text:`${i.label} and ${a.label} have moved together over the last three checks.`,dashboardIds:[e.id]}}return null}function nt(e,t){let n=e.filter(e=>{let n=e.cadence.window;return!!n&&t>=n.startAt&&t<=n.endAt});if(n.length<2)return null;let[r,i]=n;return{text:`${r.title} and ${i.title} overlap right now — their checks are batched into shared searches while both are live.`,dashboardIds:[r.id,i.id]}}var rt=5;function it(e){if(e.cadence.data!==`15min`&&e.cadence.data!==`hourly`)return null;let t=e.metrics.find(e=>(e.history?.length??0)>=rt);if(!t?.history)return null;let n=t.history.slice(-5);return n.every(e=>e.value===n[0].value)?{text:`${t.label} hasn't moved across ${e.title}'s last ${rt} checks.`,dashboardIds:[e.id]}:null}function at(e,t){let n=t.note?` ${t.note}`:``;return{text:`Sources disagreed on ${t.metricLabel}: ${t.readings.join(` vs `)}.${n}`,dashboardIds:[e.id]}}var ot=432e5;function st(e,t,n){let r=n-ot;return e.some(e=>e.kind===`insight`&&e.at>=r&&e.text===t.text)}function ct(e,t,n,r=2){let i=[],a=nt(e,n);a&&i.push(a);for(let t of e){let e=tt(t);e&&i.push(e);let n=it(t);n&&i.push(n)}return i.filter(e=>!st(t,e,n)).slice(0,r)}var lt=e({checkAllDashboardsNow:()=>Ct,readDashboardNow:()=>wt,refreshDashboardNow:()=>St,runRefreshBatch:()=>$,selectTickTargets:()=>Tt,useDashboardLoop:()=>Et,useVerdictPending:()=>mt}),ut=15e3,dt=3e5;function ft(e,t){switch(e?.kind){case`rate-limit`:return e.retryAt?Math.max(15e3,e.retryAt-t):6e4;case`provider-unavailable`:return 12e4;case`auth`:return 216e5;default:return dt}}var Y=new Set,X=new Set,Z=`mavea-dashboard-verdict-pending`;function Q(e,t){t?X.add(e):X.delete(e);try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(Z,{detail:e}))}catch{}}function pt(e){return window.addEventListener(Z,e),()=>window.removeEventListener(Z,e)}function mt(e){let t=(0,de.c)(2),n;return t[0]===e?n=t[1]:(n=()=>X.has(e),t[0]=e,t[1]=n),(0,P.useSyncExternalStore)(pt,n,ht)}function ht(){return!1}function gt(e,t){return e.map(e=>{let n=t.perDashboard[e.d.id]??{values:{},widgets:{}},r=e.metrics.find(e=>n.values[e.id]);return r?`${e.d.title} at ${n.values[r.id].raw}`:e.targets.some(e=>n.widgets[e.id])?`${e.d.title} updated`:t.grounded?`${e.d.title} checked`:`${e.d.title} — couldn't verify`}).join(` · `)}var _t=`Daily search budget reached — auto-checks paused until midnight. Manual checks still work.`;function vt(e){let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}function yt(e){let t=vt(e);w().some(e=>e.kind===`savings`&&e.at>=t&&e.text===_t)||T({kind:`savings`,text:_t,dashboardIds:[],searches:0})}async function bt(e,t,n,r,i,a,o=!1){let{d:s}=e,l=Object.keys(t.values).length>0||Object.keys(t.widgets).length>0?`updated`:o?`unverified`:`no-change`,u=s.metrics.map(e=>{let n=t.values[e.id];return n?{...e,lastValue:n.value}:e}),d={...s,metrics:u},{tripwires:f,newlyTriggered:p}=H(d,n),m=s.oneShotAt!==void 0&&s.oneShotAt<=a;y(s.id,{values:Object.entries(t.values).map(([e,t])=>({metricId:e,value:t.value,raw:t.raw,origin:`search`})),blocks:Object.entries(t.widgets).map(([e,t])=>({widgetId:e,block:t})),tripwires:f,outcome:l,...t.expects?{expects:t.expects}:{},...t.grade?{grade:t.grade}:{},...m?{consumedOneShot:!0}:{}},a),p.length&&(N(d,p),T({kind:`alert`,text:`${p.map(e=>e.label).join(`, `)} crossed the line you set.`,dashboardIds:[s.id],searches:0}),d.alerts.inApp&&le({dashboardId:s.id,dashboardTitle:s.title,tripwireLabel:p[0].label})),t.disagreement&&T({kind:`insight`,text:at(s,t.disagreement).text,dashboardIds:[s.id],searches:0});let _={...s,tripwires:f},v=W(_,p,a);if(v.fire&&v.trigger&&i){Q(s.id,!0);let e=await J(_,v.trigger,r,a);Q(s.id,!1),e?c(s.id,e,a):g(s.id,a,`Mavéa couldn't get a fresh read — will try again.`),h(s.id,a),T({kind:v.trigger===`scheduled`?`check`:`alert`,text:e?e.text.slice(0,200):`Couldn't get a fresh read on ${s.title}.`,dashboardIds:[s.id],searches:1,...e?.sources?.length?{sourceCount:e.sources.length}:{}})}else v.fire&&v.trigger&&h(s.id,a);return l}async function $(e,t,n,r={}){let i=Date.now(),a={},o=q(e),s=e.filter(e=>!o.some(t=>t.d.id===e.id)),c={};for(let t of e)c[t.id]=Object.fromEntries(t.metrics.map(e=>[e.id,e.lastValue]));for(let e of s)a[e.id]=await bt({d:e,metrics:[],targets:[]},{values:{},widgets:{}},c[e.id],t,n,i);if(o.length===0)return a;let l=new Map(o.map(e=>[e.d.id,p(e.d.id,i)])),f=e=>{for(let t of l.values())e(t)};if(!n)return a;let h=o.map(e=>e.d.id);j(h,!0);try{let e=await Xe(o,t,r.briefing?{briefingContext:r.briefing.context}:{});if(!e.ok){let t=e.failure??{kind:`network`},n=ft(e.failure,i);f(n=>{u(n,`search`,!1,{detail:d(t)}),m(n,{outcome:`failed`,failure:t,attempts:e.attempts})});for(let e of o)b(e.d.id,i+n),x(e.d.id,t,i),a[e.d.id]=`failed`;return a}for(let r of o){let o=e.perDashboard[r.d.id]??{values:{},widgets:{}},s=l.get(r.d.id)??null;u(s,`search`,!0,{count:e.attempts}),u(s,`sources`,e.sources.length>0,{count:e.sources.length,...e.sources.length===0?{detail:`The model answered without citing a live source.`}:{}});let d=Object.keys(o.values).length+Object.keys(o.widgets).length;u(s,`extraction`,d>0,{count:d,...d===0?{detail:`Nothing in the reply matched this tracker’s metrics or cards.`}:{}}),u(s,`grounding`,e.grounded,{...e.grounded?{}:{detail:`Ungrounded — every value from it was discarded.`}}),a[r.d.id]=await bt(r,o,c[r.d.id],t,n,i,!e.grounded);let f=a[r.d.id];u(s,`saved`,f===`updated`||f===`no-change`),u(s,`tripwires`,!0),m(s,{outcome:f===`failed`?`failed`:f,attempts:e.attempts,...f===`unverified`?{failure:{kind:`ungrounded`}}:{}})}r.briefing&&e.briefing&&(oe(e.briefing,r.briefing.allDashboards,i),T({kind:`briefing`,text:`Morning briefing compiled — folded into this batched search.`,dashboardIds:o.map(e=>e.d.id),searches:0}));let s=[...new Set(e.sources.map(e=>k(e.url)))].filter(Boolean);return T({kind:`check`,text:gt(o,e),dashboardIds:o.map(e=>e.d.id),...s.length?{domains:s}:{},searches:1,...e.sources.length?{sourceCount:e.sources.length}:{},...r.manual?{manual:!0}:{}}),a}finally{j(h,!1)}}async function xt(e,t,n,r){let{tripwires:i,newlyTriggered:a}=H(e);f(e.id,i,r),a.length&&(N(e,a),e.alerts.inApp&&le({dashboardId:e.id,dashboardTitle:e.title,tripwireLabel:a[0].label}));let o={...e,tripwires:i},s=W(o,a,r);if(!s.fire||!s.trigger||!n)return;Q(e.id,!0);let l=await J(o,s.trigger,t,r);Q(e.id,!1),l?c(e.id,l,r):g(e.id,r,`Mavéa couldn't get a fresh read — will try again.`),h(e.id,r),T({kind:s.trigger===`scheduled`?`check`:`alert`,text:l?l.text.slice(0,200):`Couldn't get a fresh read on ${e.title}.`,dashboardIds:[e.id],searches:1,...l?.sources?.length?{sourceCount:l.sources.length}:{}})}async function St(e){if(Y.has(e))return`busy`;let t=v(e);if(!t)return`busy`;let n=C(S());if(!n.apiKey)return`no-model`;Y.add(e);try{let r=await $([t],n,!0,{manual:!0});return r[e]===`failed`?`failed`:r[e]===`unverified`?`unverified`:`done`}finally{Y.delete(e)}}async function Ct(){let e=C(S());if(!e.apiKey)return`no-model`;let t=_().filter(D),n=t.filter(e=>!Y.has(e.id));if(n.length===0)return t.length>0?`busy`:`done`;for(;n.length>0;){let t=q(n);if(t.length===0)break;let r=t.map(e=>e.d.id);r.forEach(e=>Y.add(e));let i={};try{i=await $(t.map(e=>e.d),e,!0,{manual:!0})}finally{r.forEach(e=>Y.delete(e))}if(r.length>0&&r.every(e=>i[e]===`failed`))return`failed`;n=n.filter(e=>!r.includes(e.id))}return`done`}async function wt(e){if(X.has(e))return`busy`;let t=v(e);if(!t)return`failed`;let n=C(S());if(!n.apiKey)return`no-model`;let r=Date.now(),i=t.tripwires.find(e=>e.state===`TRIGGERED`),a=i??`scheduled`;Q(e,!0);let o;try{o=await J(t,a,n,r)}finally{Q(e,!1)}return o?c(e,o,r):g(e,r,`Mavéa couldn’t get a fresh read — try again in a moment.`),h(e,r),T({kind:i?`alert`:`check`,text:o?o.text.slice(0,200):`Couldn’t get a fresh read on ${t.title}.`,dashboardIds:[e],searches:1,manual:!0,...o?.sources?.length?{sourceCount:o.sources.length}:{}}),o?`done`:`failed`}function Tt(e,t,n,r,i){let a=Pe(e,r).filter(e=>!i.has(e.id)),o=Fe(e,r);o&&i.has(o.id)&&(o=null);let s=A(t,n,r),c=!1;s.paused&&(c=a.some(D)||!!o,a=a.filter(e=>!D(e)),o=null);let l=q(a);return o&&l.some(e=>e.d.id===o.id)&&(o=null),{dueData:a,dueAi:o,pausedAndBlocked:c}}function Et(){let e=(0,P.useRef)(!1);(0,P.useEffect)(()=>{let t=!0,n=async()=>{if(e.current||!t||typeof document<`u`&&document.visibilityState!==`visible`)return;let n=C(S()),r=!!n.apiKey,i=Date.now(),a=_(),o=re(),s=w();ue(a,s,e=>E(s,e,i),e=>l(e,i-6048e5,i),i);for(let e of ct(a,s,i))T({kind:`insight`,text:e.text,dashboardIds:e.dashboardIds,searches:0});let{dueData:c,dueAi:u,pausedAndBlocked:d}=Tt(a,s,o.dailySearchBudget,i,Y);d&&yt(i);let f=r&&o.briefingEnabled&&ce(i);if(c.length===0&&!u){if(f&&!a.some(D)){let e=se(a,new Set);if(e){let t=await Xe([],n,{briefingContext:e});t.briefing&&(oe(t.briefing,a,i),T({kind:`briefing`,text:`Morning briefing compiled.`,dashboardIds:[],searches:1}))}}return}e.current=!0,c.forEach(e=>Y.add(e.id)),u&&Y.add(u.id);try{if(c.length>0){let e=f?{context:se(a,new Set(q(c).map(e=>e.d.id))),allDashboards:a}:void 0;await $(c,n,r,e?{briefing:e}:{})}u&&await xt(u,n,r,i)}finally{c.forEach(e=>Y.delete(e.id)),u&&Y.delete(u.id),e.current=!1}},r=()=>{me(n).catch(e=>{console.error(`[dashboards] scheduled tick failed`,e)})},i=window.setInterval(r,ut),a=()=>{document.visibilityState===`visible`&&r()};return document.addEventListener(`visibilitychange`,a),r(),()=>{t=!1,window.clearInterval(i),document.removeEventListener(`visibilitychange`,a)}},[])}export{mt as a,he as c,lt as i,F as l,St as n,H as o,Et as r,Ce as s,wt as t};
@@ -1 +1 @@
1
- import{t as e}from"./react-BZJXY1be.js";import{g as t,h as n,m as r,n as i,t as a}from"./store-Ba9vzL4H.js";var o=e();function s(e){let n=n=>{(n.key===null||n.key===`mavea-dashboards-v1`)&&(t(),e())};return window.addEventListener(a,e),window.addEventListener(`storage`,n),()=>{window.removeEventListener(a,e),window.removeEventListener(`storage`,n)}}function c(){return(0,o.useSyncExternalStore)(s,r)}function l(e){return window.addEventListener(i,e),()=>window.removeEventListener(i,e)}function u(){return(0,o.useSyncExternalStore)(l,n,d)}function d(){return!1}export{u as n,c as t};
1
+ import{t as e}from"./react-BZJXY1be.js";import{g as t,h as n,m as r,n as i,t as a}from"./store-D16dGt7I.js";var o=e();function s(e){let n=n=>{(n.key===null||n.key===`mavea-dashboards-v1`)&&(t(),e())};return window.addEventListener(a,e),window.addEventListener(`storage`,n),()=>{window.removeEventListener(a,e),window.removeEventListener(`storage`,n)}}function c(){return(0,o.useSyncExternalStore)(s,r)}function l(e){return window.addEventListener(i,e),()=>window.removeEventListener(i,e)}function u(){return(0,o.useSyncExternalStore)(l,n,d)}function d(){return!1}export{u as n,c as t};
@@ -1 +1 @@
1
- import{t as e}from"./react-BZJXY1be.js";import{a as t,i as n,t as r}from"./ledger-Cv0LBflx.js";var i=e();function a(e){let n=n=>{(n.key===null||n.key===`mavea-dash-ledger-v1`)&&(t(),e())};return window.addEventListener(r,e),window.addEventListener(`storage`,n),()=>{window.removeEventListener(r,e),window.removeEventListener(`storage`,n)}}function o(){return(0,i.useSyncExternalStore)(a,n)}export{o as t};
1
+ import{t as e}from"./react-BZJXY1be.js";import{a as t,i as n,t as r}from"./ledger-DHS2di3l.js";var i=e();function a(e){let n=n=>{(n.key===null||n.key===`mavea-dash-ledger-v1`)&&(t(),e())};return window.addEventListener(r,e),window.addEventListener(`storage`,n),()=>{window.removeEventListener(r,e),window.removeEventListener(`storage`,n)}}function o(){return(0,i.useSyncExternalStore)(a,n)}export{o as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-DkW27tQK.js";import{t}from"./react-BZJXY1be.js";import{t as n}from"./compiler-runtime-qQQXpJgv.js";import{i as r,n as i}from"./info-CiqHR5cs.js";import{r as a,t as o}from"./keyVault-Aw5Y2PjT.js";import"./providers-CPhoN8j0.js";var s=e({LIVE_V2_EVENT:()=>f,SECRET_PERSISTENCE_EVENT:()=>p,exportConfig:()=>J,getLiveConfigV2:()=>A,getSecretPersistenceStatus:()=>B,hasModelConfigured:()=>q,importConfig:()=>re,importConfigWithSummary:()=>Z,resetLiveConfig:()=>W,secretsReady:()=>R,setLiveConfigV2:()=>U,setProviderField:()=>G,toCaps:()=>Q,toModelConfig:()=>K,useLiveConfig:()=>$,whenSecretPersistenceSettled:()=>V}),c=n(),l=t(),u=`mavea-live-v2`,d=`mavea-live-v2:secrets`,f=u,p=`${u}:secret-persistence`,m=25e4,h=512,g={provider:`gemini`,models:{},keys:{},rememberKey:!1,webSearch:!1,searchMode:`off`,quality:`balanced`,searchProvider:`wikipedia`,searchKeys:{},memoryEnabled:!1,autoSaveFlashcards:!1,generativeBlocks:!0,worldEnabled:!0,libraryEnabled:!0,teachMode:!1,annotationsEnabled:!0,morningBrief:!1,explainLevel:`standard`,fontScale:`normal`,pttKey:`Alt`,pttSide:`any`,voiceSpeed:1};function _(e){return e===`left`||e===`right`?e:`any`}var v=null;function y(e){return i.some(t=>t.id===e)?e:g.provider}function b(e){let t={};if(e&&typeof e==`object`)for(let n of i){let r=e[n.id];typeof r==`string`&&r.length<=h&&(t[n.id]=r)}return t}function x(e,t){return typeof e==`boolean`?e:t}function S(e){return typeof e==`number`&&Number.isFinite(e)?Math.min(2,Math.max(.75,e)):g.voiceSpeed}function C(e){return e===`wikipedia`||e===`brave`||e===`tavily`?e:g.searchProvider}function w(e){return e===`off`||e===`realtime`?e:void 0}function T(e){return e===`fast`||e===`balanced`||e===`thorough`?e:g.quality}function E(e){return e===`simple`||e===`deep`?e:g.explainLevel}function D(e){return e===`smaller`||e===`larger`?e:g.fontScale}function O(e){let t={};if(e&&typeof e==`object`)for(let n of[`brave`,`tavily`]){let r=e[n];typeof r==`string`&&r.length<=h&&(t[n]=r)}return t}function k(){try{if(typeof localStorage>`u`)return{...g};let e=localStorage.getItem(u);if(!e)return{...g};let t=JSON.parse(e),n=x(t.webSearch,g.webSearch),r=w(t.searchMode)??(t.searchMode===void 0&&n?`realtime`:`off`);return{provider:y(t.provider),models:b(t.models),keys:b(t.keys),rememberKey:x(t.rememberKey,g.rememberKey),webSearch:n,searchMode:r,quality:T(t.quality),searchProvider:C(t.searchProvider),searchKeys:O(t.searchKeys),memoryEnabled:x(t.memoryEnabled,g.memoryEnabled),autoSaveFlashcards:x(t.autoSaveFlashcards,g.autoSaveFlashcards),generativeBlocks:x(t.generativeBlocks,g.generativeBlocks),worldEnabled:x(t.worldEnabled,g.worldEnabled),libraryEnabled:x(t.libraryEnabled,g.libraryEnabled),teachMode:x(t.teachMode,g.teachMode),annotationsEnabled:x(t.annotationsEnabled,g.annotationsEnabled),morningBrief:x(t.morningBrief,g.morningBrief),explainLevel:E(t.explainLevel),fontScale:D(t.fontScale),pttKey:typeof t.pttKey==`string`&&t.pttKey?t.pttKey:g.pttKey,pttSide:_(t.pttSide),voiceSpeed:S(t.voiceSpeed)}}catch{return{...g}}}function A(){return v||(v=k(),v)}function j(e){try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(u,{detail:e}))}catch{}}function M(e){return Object.keys(e.keys).length>0||Object.keys(e.searchKeys).length>0}var N=0,P=!1,F=`not-requested`,I=Promise.resolve(),L=Promise.resolve();function R(){return L}function z(e){F=e;try{typeof window<`u`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(p,{detail:e}))}catch{}}function B(){return F}async function V(){return await I,F}async function H(e){let t=++N;if(typeof localStorage>`u`){z(e.rememberKey&&M(e)?`session-only`:`not-requested`);return}if(!e.rememberKey||!M(e)){if(e.rememberKey&&!P){z(`pending`);return}try{localStorage.removeItem(d)}catch{}t===N&&z(`not-requested`);return}z(`pending`);try{let n=await a(JSON.stringify({keys:e.keys,searchKeys:e.searchKeys}));if(t!==N)return;localStorage.setItem(d,n),z(`persisted`)}catch{if(t!==N)return;try{localStorage.removeItem(d)}catch{}z(`session-only`)}}async function ee(){if(typeof localStorage>`u`){z(`unavailable`);return}let e;try{e=localStorage.getItem(d)}catch{P=!0,z(`unavailable`);return}if(!e){P=!0,z(`not-requested`);return}let t=N;try{let n=JSON.parse(await o(e));if(t===N){let e=A();v={...e,keys:{...e.keys,...b(n.keys)},searchKeys:{...e.searchKeys,...O(n.searchKeys)}},j(v),z(`persisted`)}}catch{t===N&&z(`unavailable`)}finally{P=!0}}function U(e){let t={...A(),...e};v=t;try{if(typeof localStorage<`u`){let e={...t,keys:{},searchKeys:{}};localStorage.setItem(u,JSON.stringify(e)),I=H(t)}else z(t.rememberKey?M(t)?`session-only`:`unavailable`:`not-requested`)}catch{z(t.rememberKey?M(t)?`session-only`:`unavailable`:`not-requested`)}return j(t),t}function te(){if(typeof localStorage>`u`){P=!0;return}M(A())?(P=!0,U({})):(L=ee(),I=L)}te();function W(){return U(g)}function G(e,t,n){let r=A(),i=t===`model`?`models`:`keys`;return U({[i]:{...r[i],[e]:n}})}function K(e){return{provider:e.provider,model:e.models[e.provider]||r(e.provider).defaultModel,apiKey:e.keys[e.provider]}}function q(e){let t=r(e.provider);return!!(e.models[e.provider]||t.defaultModel)&&(!t.needsKey||!!e.keys[e.provider])}function J(){let e={...A(),keys:{},searchKeys:{},rememberKey:!1};return JSON.stringify(e,null,2)}var ne=[`provider`,`models`,`webSearch`,`searchMode`,`quality`,`searchProvider`,`memoryEnabled`,`autoSaveFlashcards`,`generativeBlocks`,`worldEnabled`,`libraryEnabled`,`teachMode`,`annotationsEnabled`,`morningBrief`,`explainLevel`,`fontScale`,`pttKey`,`pttSide`,`voiceSpeed`];function Y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function X(e){return typeof e==`string`||Array.isArray(e)?e.length>0:e&&typeof e==`object`?Object.keys(e).length>0:e!=null}function Z(e,t={}){if((typeof TextEncoder==`function`?new TextEncoder().encode(e).byteLength:e.length*2)>m)throw Error(`Invalid config file — the settings object is too large.`);let n;try{n=JSON.parse(e)}catch{throw Error(`Invalid config file — could not parse JSON.`)}if(!n||typeof n!=`object`||Array.isArray(n))throw Error(`Invalid config file — expected a settings object.`);let r=n;if(Object.keys(r).length>64)throw Error(`Invalid config file — the settings object has too many fields.`);let i=A(),a=t.mode===`merge`?{...i,...r}:r,o=x(a.webSearch,g.webSearch),s=w(a.searchMode)??(a.searchMode===void 0&&o?`realtime`:`off`),c={provider:y(a.provider),models:b(a.models),keys:i.keys,rememberKey:t.preserveSecretState!==!1&&i.rememberKey,webSearch:o,searchMode:s,quality:T(a.quality),searchProvider:C(a.searchProvider),searchKeys:i.searchKeys,memoryEnabled:x(a.memoryEnabled,g.memoryEnabled),autoSaveFlashcards:x(a.autoSaveFlashcards,g.autoSaveFlashcards),generativeBlocks:x(a.generativeBlocks,g.generativeBlocks),worldEnabled:x(a.worldEnabled,g.worldEnabled),libraryEnabled:x(a.libraryEnabled,g.libraryEnabled),teachMode:x(a.teachMode,g.teachMode),annotationsEnabled:x(a.annotationsEnabled,g.annotationsEnabled),morningBrief:x(a.morningBrief,g.morningBrief),explainLevel:E(a.explainLevel),fontScale:D(a.fontScale),pttKey:typeof a.pttKey==`string`&&a.pttKey.length>0&&a.pttKey.length<=32?a.pttKey:g.pttKey,pttSide:_(a.pttSide),voiceSpeed:S(a.voiceSpeed)},l=[];return Y(r,`keys`)&&X(r.keys)&&l.push(`provider-api-keys`),Y(r,`searchKeys`)&&X(r.searchKeys)&&l.push(`search-api-keys`),[`githubToken`,`github_token`,`ghToken`].some(e=>Y(r,e)&&X(r[e]))&&l.push(`github-token`),{config:U(c),credentialsIgnored:l,appliedFields:ne.filter(e=>Y(r,e))}}function re(e,t){return Z(e,t).config}function Q(e){return{webSearch:e.searchMode!==`off`,searchMode:e.searchMode,quality:e.quality,memoryEnabled:e.memoryEnabled,generativeBlocks:e.generativeBlocks,worldEnabled:e.worldEnabled,explainLevel:e.explainLevel}}function $(){let e=(0,c.c)(4),[t,n]=(0,l.useState)(ie),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{if(typeof window>`u`)return;let e=()=>n(A());return window.addEventListener(f,e),e(),()=>window.removeEventListener(f,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,l.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a=[t,U],e[2]=t,e[3]=a),a}function ie(){return A()}export{W as a,G as c,$ as d,s as f,Z as i,Q as l,A as n,R as o,q as r,U as s,J as t,K as u};
@@ -0,0 +1 @@
1
+ import{t as e}from"./react-BZJXY1be.js";import{a as t,i as n,o as r,t as i}from"./store-D2IJF4SA.js";import{r as a,t as o}from"./queue-Adae4IzW.js";var s=e();function c(e){let[t,n]=(0,s.useState)(e);return(0,s.useEffect)(()=>{if(typeof window>`u`)return;let t=()=>n(e());return t(),window.addEventListener(i,t),window.addEventListener(`focus`,t),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(i,t),window.removeEventListener(`focus`,t),document.removeEventListener(`visibilitychange`,t)}},[]),t}function l(){return c(o)}function u(){return c(r)}function d(){return c(t)}function f(){return c(p)}function p(){return n()}function m(){return c(h)}function h(){return a()}export{l as a,u as i,d as n,m as r,f as t};
@@ -0,0 +1,4 @@
1
+ import{t as e}from"./types-C42I77wh.js";import{a as t,r as n}from"./number-zqlPMliA.js";import{t as r}from"./json-J4Y32_i9.js";import{i,r as a}from"./verbatim-DBTj9sPD.js";import{n as o}from"./citation-BsSvaaer.js";import{i as s,n as c,r as l,s as u,t as d}from"./receipts-D7zveV-I.js";var f={text:``,chunks:[],quotable:!1},p=e=>({text:e,chunks:[],quotable:e.trim()!==``});function m(e){let{source:t,text:n}=e;return[t.url?`${t.title??t.url}\n${t.url}`:t.title??``,n].filter(e=>e.trim()).join(`
2
+ `)}function h(e,t){let n=[],r=[],i=0,a=!1;for(let o of e){let e=m(o);if(!e.trim())continue;let s=e.length+(r.length?2:0);i+s>t||(i+=s,o.text.trim()!==``&&(a=!0),r.push(e),n.push({source:o.source,text:e}))}return{text:r.join(`
3
+
4
+ `),chunks:n,quotable:a}}function g(e){return{source:{kind:`web`,title:e.title,...e.url?{url:e.url,host:o(e.url)}:{}},text:e.snippet??``}}function _(e){let t=e.chunks.map(e=>({source:e.source,text:i(e.text)}));return e=>{let n=i(e);if(!n)return null;let r=t.filter(e=>e.text.includes(n));return r.length===1?r[0].source:null}}function v(e,t=`an unnamed cause`){let n=e??``;return n.replace(/[\p{Cf}\p{Cc}]/gu,``).trim().length>0?n.trim():t}function y(e){let t=e.replace(/[-_]+/g,` `).trim();return t.length===0?e:t[0].toUpperCase()+t.slice(1)}var b=/^\d{4}$/,x=/^(\d{4})[-/](\d{1,2})$/;function S(e){let t=e.trim();if(b.test(t))return Date.UTC(Number(t),0,1);let n=x.exec(t);if(n){let e=Number(n[2]);return e>=1&&e<=12?Date.UTC(Number(n[1]),e-1,1):null}let r=Date.parse(t);return Number.isFinite(r)?r:null}var C=[`economy`,`policy`,`technology`,`science`,`environment`,`society`,`health`,`conflict`];function w(e){return typeof e==`string`&&C.includes(e)?e:void 0}var T=new Set([`root`,`mechanism`,`outcome`]),E=[`T0`,`T1`,`T2`,`T3`],D=140,O=40,k=120,A=240,j=240,ee=24,M=12,N=6,P=16,F=4,I=48,te=40,L=24,ne=24;function R(e,t){if(typeof e!=`string`)return null;let n=e.trim();return n?n.length>t?n.slice(0,t):n:null}var re=e=>e<0?0:e>1?1:e;function z(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,ne).replace(/-+$/,``)}function B(e){if(typeof e!=`string`)return null;let t=e.trim();if(!t||t.length>L)return null;let n=S(t);return n===null?null:{label:t,at:n}}function ie(t,n,r){let i=typeof t==`string`?{t}:t;if(!i||typeof i!=`object`||Array.isArray(i))return;let a=i,o=B(a.t);if(!o)return;let s=B(a.until),c=E.includes(a.tier)?a.tier:`T0`,u=R(a.quote,A),d=e(c)&&u?{quote:u,tier:c,receipt:a.receipt}:r?{...r,receipt:void 0}:null,f=d&&d.quote.includes(o.label)&&n.holds(d.quote)?{tier:d.tier,receipt:l(d.receipt,d.quote,n.sourceOf(d.quote))}:{tier:`T0`};return{t:o.label,...s&&s.at>o.at?{until:s.label}:{},...f}}function V(n,r,i,a){let o=T.has(n.role)?n.role:`mechanism`,c=typeof n.depth==`number`&&Number.isFinite(n.depth)?Math.max(0,Math.round(n.depth)):o===`root`?0:o===`outcome`?2:1,u=E.includes(n.tier)?n.tier:`T0`,d=typeof n.value==`number`&&Number.isFinite(n.value)?n.value:void 0,f=R(n.unit,M)??void 0,p=R(n.detail,j)??void 0,m=w(n.domain),h=s(n),g;e(u)?h&&i.holds(h)?(g=l(n.receipt,h,i.sourceOf(h)),d!==void 0&&!t(d,h)&&(d=void 0)):(u=`T0`,d=void 0):u===`T3`?(!a||d===void 0)&&(u=`T0`,d=void 0):d=void 0;let _=ie(n.date,i,g&&e(u)?{quote:g.quote,tier:u}:null);return{label:r,role:o,depth:c,tier:u,...d===void 0?{}:{value:d},...f?{unit:f}:{},...g?{receipt:g}:{},...p?{detail:p}:{},..._?{date:_}:{},...m?{domain:m}:{}}}function H(n,r,i){if(!n||typeof n!=`object`||Array.isArray(n))return;let a=n,o=E.includes(a.tier)?a.tier:`T0`;if(o===`T0`||o===`T3`&&!i)return;let c=R(a.unit,M)??void 0,u=s(a),d=e(o)&&u&&r.holds(u)?l(a.receipt,u):void 0,f=[];for(let n of Array.isArray(a.points)?a.points:[]){if(f.length>=te)break;if(!n||typeof n!=`object`)continue;let i=n,a=R(i.t,L),c=typeof i.value==`number`&&Number.isFinite(i.value)?i.value:void 0;if(!(!a||c===void 0)){if(e(o)){let e=s(i);if(!e||!r.holds(e)||!t(c,e))continue;f.push({t:a,value:c,receipt:l(i.receipt,e,r.sourceOf(e))})}else f.push({t:a,value:c})}}if(f.length!==0)return{points:f,tier:o,...c?{unit:c}:{},...d?{receipt:d}:{}}}function U(e,t,n,r){let i=[],a=new Set;for(let o of Array.isArray(e)?e:[]){if(i.length>=F)break;if(!o||typeof o!=`object`)continue;let e=o,s=R(e.id,O)??R(e.label,k);if(!s)continue;let c=s.startsWith(`${t}.`)?s.slice(t.length+1):s,l=z(c);if(!l)continue;let u=`${t}.${l}`;if(a.has(u))continue;a.add(u);let d=R(e.label,k)??y(c),f=H(e.series,n,r);i.push({id:u,...V(e,d,n,r),...f?{series:f}:{}})}return i}function ae(e,t){let n=new Map(e.map(e=>[e,0])),r=new Map(e.map(e=>[e,[]]));for(let e of t){let t=r.get(e.from);!t||!n.has(e.to)||(n.set(e.to,n.get(e.to)+1),t.push(e.to))}let i=[...r.keys()].filter(e=>n.get(e)===0),a=0;for(let e=0;e<i.length;e+=1){a+=1;for(let t of r.get(i[e])){let e=n.get(t)-1;n.set(t,e),e===0&&i.push(t)}}return a===r.size}function oe(e,t){let n=new Map(e.map(e=>[e,[]]));t.forEach((e,t)=>{let r=n.get(e.from);r&&n.has(e.to)&&r.push(t)});let r=new Map,i=new Set;for(let a of e){if(r.has(a))continue;r.set(a,1);let e=[{id:a,next:0}];for(;e.length>0;){let a=e[e.length-1],o=n.get(a.id);if(a.next>=o.length){r.set(a.id,2),e.pop();continue}let s=o[a.next];a.next+=1;let{to:c}=t[s],l=r.get(c);l===1?i.add(s):l===void 0&&(r.set(c,1),e.push({id:c,next:0}))}}return i}var W=e=>{let t=e.slice(0,3).map(e=>`${e.from} → ${e.to}`);return e.length>t.length?`${t.join(`, `)}, +${e.length-t.length} more`:t.join(`, `)};function G(e,t){if(ae(e,t))return{edges:[...t],notes:[]};let n=oe(e,t),r=t.filter((e,t)=>n.has(t));return{edges:t.filter((e,t)=>!n.has(t)),notes:[`Dropped ${r.length} link${r.length===1?``:`s`} that closed a causal loop (${W(r)}) — a causal web cannot come back round to its own cause.`]}}var K=e=>e.length===0?[]:[`Dropped ${e.length} self-link${e.length===1?``:`s`} (${W(e)}) — nothing causes itself.`];function q(e,t){let n=Math.max(0,N-t.length),r=[...(e??[]).slice(0,n),...t];return r.length>0?r.slice(0,N):void 0}function se(t,i){let o=typeof t==`string`?r(t):t;if(!o||typeof o!=`object`||Array.isArray(o))return null;let s=o,m=R(s.title,D);if(!m)return null;let h=s.provenance&&typeof s.provenance==`object`?s.provenance:{},g=typeof i==`string`?p(i):i??f,v=h.illustrative===!0||!g.quotable,y={holds:a(g.text),sourceOf:_(g)},b=[],x=new Set;for(let e of Array.isArray(s.nodes)?s.nodes:[]){if(b.length>=P)break;if(!e||typeof e!=`object`)continue;let t=e,n=R(t.id,O),r=R(t.label,k);if(!n||!r||x.has(n))continue;x.add(n);let i=H(t.series,y,v),a=U(t.children,n,y,v);b.push({id:n,...V(t,r,y,v),...i?{series:i}:{},...a.length?{children:a}:{}})}if(b.length<2)return null;let S=new Set(b.map(e=>e.id)),C=[],w=[];for(let t of Array.isArray(s.edges)?s.edges:[]){if(C.length>=I)break;if(!t||typeof t!=`object`)continue;let r=t,i=R(r.from,O),a=R(r.to,O);if(!i||!a||!S.has(i)||!S.has(a))continue;if(i===a){w.push({from:i,to:a});continue}let o=r.sign===-1?-1:1,s=R(r.verb,ee)??void 0,f=r.relation==null?void 0:u(r.relation),p=E.includes(r.tier)?r.tier:`T0`,m=typeof r.weight==`number`&&Number.isFinite(r.weight)?re(r.weight):void 0,h=d(r,y.holds,y.sourceOf),g=!1,_=m;_!==void 0&&!h.some(e=>n(_,e.quote))&&(m=void 0),e(p)&&m!==void 0&&h.length>0||(p=`T0`,m=void 0,g=!0);let v=r.counter&&typeof r.counter==`object`?r.counter:null,b=v?R(v.quote,A):null,x=b&&y.holds(b)?l(v,b,y.sourceOf(b)):void 0;C.push({from:i,to:a,sign:o,tier:p,...s?{verb:s}:{},...m===void 0?{}:{weight:m},...h.length?{receipt:h[0],receipts:h}:{},...g?{provisional:!0}:{},...f?{relation:f}:{},...x?{counter:x}:{},status:c({tier:p,weight:m,receipt:h[0],receipts:h,counter:x})})}let T=G([...S],C),j=R(s.outcomeId,O);(!j||!S.has(j))&&(j=(b.find(e=>e.role===`outcome`)??b.reduce((e,t)=>t.depth>e.depth?t:e)).id);let M=q(Array.isArray(h.notes)?h.notes.map(e=>String(e)):void 0,[...K(w),...T.notes]);return{title:m,outcomeId:j,nodes:b,edges:T.edges,provenance:{...v?{illustrative:!0}:{},...M?{notes:M}:{}}}}var J=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,``);function Y(e,t){let n=new Set(e.nodes.map(e=>e.id)),r=new Map;for(let t of e.nodes){let e=J(t.label),n=r.get(e);n?n.push(t.id):r.set(e,[t.id])}let i=new Map,a=new Set,o=new Set,s=[],c=new Set(n);for(let t of e.nodes)for(let e of t.children??[])c.add(e.id);for(let l of t.nodes){if(i.has(l.id))continue;let t=n.has(l.id)?l.id:null;if(!t){let e=r.get(J(l.label));e&&e.length===1&&(t=e[0])}if(t){if(o.has(t))continue;o.add(t),i.set(l.id,t),a.add(l.id);continue}if(e.nodes.length+s.length>=P)continue;let u=l.id;for(let e=2;c.has(u);e+=1)u=`${l.id}-${e}`;c.add(u),i.set(l.id,u),s.push({node:l,id:u})}return{idMap:i,matched:a,fresh:s}}function ce(e,t){return t.nodes.length===0?0:Y(e,t).matched.size/t.nodes.length}var le=t=>e(t.tier)&&!!t.receipt;function ue(t,n){return n?t?e(n.tier)||!e(t.tier)?n:t:n:t}function X(e,t){let n=le(t)?t:e,r=ue(e.series,t.series),i=t.detail??e.detail,a=t.date??e.date,o=t.domain??e.domain;return{id:e.id,label:e.label,role:e.role,depth:e.depth,tier:n.tier,...n.value===void 0?{}:{value:n.value},...n.unit?{unit:n.unit}:{},...n.receipt?{receipt:n.receipt}:{},...a?{date:a}:{},...r?{series:r}:{},...i?{detail:i}:{},...o?{domain:o}:{}}}function Z(e,t,n,r){let i=e?[...e]:[],a=new Map(i.map((e,t)=>[e.id,t]));for(let e of t??[]){let t=z(e.id.startsWith(`${n}.`)?e.id.slice(n.length+1):e.id.split(`.`).pop()??``);if(!t)continue;let o=`${r}.${t}`,{children:s,...c}=e,l={...c,id:o},u=a.get(o);u===void 0?i.length<F&&(a.set(o,i.length),i.push(l)):i[u]=X(i[u],l)}return i.length?i:void 0}function de(e,t){let n=Z(e.children,t.children,t.id,e.id);return{...X(e,t),...n?{children:n}:{}}}var Q=e=>e.receipts??(e.receipt?[e.receipt]:[]);function fe(e,t){let n=Q(e),r=Q(t).length>0&&n.length===0?t:e,i=r===t?e:t,a=[],o=new Set;for(let e of[...Q(r),...Q(i)])a.length>=3||o.has(e.quote)||(o.add(e.quote),a.push(e));let s=r.relation??i.relation,l=r.counter??i.counter;return{from:e.from,to:e.to,sign:r.sign,tier:r.tier,...r.verb?{verb:r.verb}:{},...r.weight===void 0?{}:{weight:r.weight},...a.length?{receipt:a[0],receipts:a}:{},...r.provisional?{provisional:!0}:{},...s?{relation:s}:{},...l?{counter:l}:{},status:c({tier:r.tier,...r.weight===void 0?{}:{weight:r.weight},...a.length?{receipt:a[0],receipts:a}:{},...l?{counter:l}:{}})}}function pe(e,t){let{idMap:n,fresh:r}=Y(e,t),i=new Map(t.nodes.map(e=>[e.id,e])),a=[...e.nodes],o=new Map(e.nodes.map((e,t)=>[e.id,t]));for(let[e,t]of n){let n=o.get(t);if(n===void 0)continue;let r=i.get(e);r&&(a[n]=de(a[n],r))}for(let{node:e,id:t}of r){let{children:n,...r}=e,i=Z(void 0,e.children,e.id,t);a.push({...r,id:t,...i?{children:i}:{}})}let s=[...e.edges],c=new Map(e.edges.map((e,t)=>[`${e.from}\0${e.to}`,t])),l=e=>n.get(e)??(o.has(e)?e:void 0);for(let e of t.edges){let t=l(e.from),n=l(e.to);if(!t||!n||t===n)continue;let r=`${t}\0${n}`,i=c.get(r);i===void 0?s.length<I&&(c.set(r,s.length),s.push({...e,from:t,to:n})):s[i]=fe(s[i],{...e,from:t,to:n})}let u=G(a.map(e=>e.id),s),d=q(e.provenance.notes,u.notes);return{title:e.title,outcomeId:e.outcomeId,nodes:a,edges:u.edges,provenance:{...e.provenance.illustrative?{illustrative:!0}:{},...d?{notes:d}:{}}}}function me(e,t,n,i){let o=typeof e==`string`?r(e):e;if(!o||typeof o!=`object`)return[];let s=o.children,c=typeof n==`string`?p(n):n??f;return U(s,t,{holds:a(c.text),sourceOf:_(c)},i)}function he(e,t,n){if(n.length===0)return e;let r=$(e.nodes,t,n);return r===e.nodes?e:{...e,nodes:[...r]}}function $(e,t,n){let r=!1,i=e.map(e=>{if(e.id===t)return(e.children?.length??0)>0?e:(r=!0,{...e,children:[...n]});if(e.children===void 0)return e;let i=$(e.children,t,n);return i===e.children?e:(r=!0,{...e,children:[...i]})});return r?i:e}export{ce as a,v as c,g as d,pe as i,f as l,me as n,C as o,se as r,S as s,he as t,h as u};
@@ -0,0 +1 @@
1
+ import{T as e,j as t}from"./kokoro-yB7iU_JU.js";import{n,t as r}from"./nextFrame-12y0UrAd.js";var i=1100,a=15e3,o=1e4,s=12e3,c=8e3,l=3500,u=2500,d=3e3,f=1800;function p(e){return e*2+12e3}function m(e,t=1700){let n=e.trim();return n?Math.min(7e3,Math.max(1500,Math.round(n.split(/\s+/).length*385+500))):t}function h(e){return new Promise(t=>setTimeout(t,e))}async function g(e,t=a){return await n(e.started,t)??!1}async function _(e,t,r=i){await Promise.all([n(e.finished,p(t)),h(r)])}function v(n){let r=n.speaking??e,i=n.subscribe??t;return new Promise(e=>{let t=!1,a=!1,o=()=>{a||(a=!0,c(),clearTimeout(l),e())},s=()=>{t&&!r()&&o()},c=i(s);setTimeout(()=>{t=!0,s()},n.floorMs);let l=setTimeout(o,n.capMs)})}function y(e){let t=e;return typeof t.getAnimations==`function`&&t.getAnimations({subtree:!0}).some(e=>e.playState===`running`)}async function b(e,t=`.card`,i=f){await n((async()=>{await r(),await r();let n=e()?.querySelector(t)??null;for(;!n;)await r(),n=e()?.querySelector(t)??null;for(;y(n);)await r()})(),i)}async function x(e){try{await n((async()=>{await r(),await r(),await n(e.loadFams(),c),e.settle&&await e.settle(),e.wantVoice&&e.firstLine&&await n(e.firstLine.started,o)})(),s)}catch{}}export{b as a,p as c,g as d,v as f,d as i,m as l,u as n,x as o,l as r,h as s,i as t,_ as u};
@@ -8,6 +8,8 @@ Copyright and Reserved Font Name notices, copied from the shipped font metadata:
8
8
  - Archivo — Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo)
9
9
  - Bodoni Moda — Copyright 2020 The Bodoni Moda Project Authors
10
10
  (https://github.com/indestructible-type/Bodoni)
11
+ - Caveat — Copyright 2014 The Caveat Project Authors
12
+ (https://github.com/googlefonts/caveat)
11
13
  - EB Garamond — Copyright 2017 The EB Garamond Project Authors
12
14
  (https://github.com/octaviopardo/EBGaramond12)
13
15
  - Hanken Grotesk — Copyright 2021 The Hanken Grotesk Project Authors
@@ -9,6 +9,7 @@ come from each file's OpenType `name` table; SHA-256 identifies the exact shippe
9
9
  | `archivo-var-latin.woff2` | 2.001 | `7150c0ec5ad356453013d11affec1fbab95de0dd2dcecb043b4f1cb7f87c4ba4` |
10
10
  | `bodoni-moda-400-italic-latin.woff2` | 2.005 | `068e05ed09c93380583f8a61fd0a640aab30cfb464fc3ba7c94b09eb124574fb` |
11
11
  | `bodoni-moda-var-latin.woff2` | 2.005 | `c1de3473cec36815a9cfb203f3b6202971e26ac642017d08f097df2368cfe195` |
12
+ | `caveat-var-latin.woff2` | 2.000 | `7a0049db01fdd8fc7af7ef36675862a72a5c76d0cb45ae63c9f5b6f1b769dac7` |
12
13
  | `eb-garamond-var-italic-latin.woff2` | 1.003 | `d2761541b314509e02df3539cd35fc712954a48a50f4e0ab424dde817c699c2a` |
13
14
  | `eb-garamond-var-latin.woff2` | 1.003 | `68fd4b247dde89984ee835d99953d235e4927be2b1b732ad81173b519869cee8` |
14
15
  | `hanken-grotesk-var-latin.woff2` | 3.013 | `1f21c6eaa0000f3329cfcfac966b43d5bebf5aa610303e33294ac31bc6f4bb59` |
@@ -157,3 +157,13 @@
157
157
  font-display: swap;
158
158
  src: url('/fonts/archivo-var-latin.woff2') format('woff2');
159
159
  }
160
+ @font-face {
161
+ font-family: 'Caveat';
162
+ font-style: normal;
163
+ font-weight: 400 700;
164
+ font-display: swap;
165
+ src: url('/fonts/caveat-var-latin.woff2') format('woff2');
166
+ unicode-range:
167
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
168
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
169
+ }