@mavea/mavea 1.0.16 → 1.0.17

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 (165) hide show
  1. package/dist/.vite/manifest.json +589 -567
  2. package/dist/assets/{AppCommandPalette-Dzl_DbDd.js → AppCommandPalette-B3E1gTd4.js} +1 -1
  3. package/dist/assets/{BlockEmpty-B5Q0hgDJ.js → BlockEmpty-DQkdduUE.js} +1 -1
  4. package/dist/assets/{BriefingPlayer-Dy7JCGm-.js → BriefingPlayer-CRKTlKa3.js} +1 -1
  5. package/dist/assets/{CanvasSkeleton-CJwPWnFG.js → CanvasSkeleton-cQ6KF-6z.js} +2 -2
  6. package/dist/assets/{CheckLogRail-DNtXlkcR.js → CheckLogRail-C6nouD1Y.js} +1 -1
  7. package/dist/assets/{CodeOutput-Bg64AyKu.js → CodeOutput-H8TQzjqL.js} +1 -1
  8. package/dist/assets/{CommandPalette-mO1FEvlx.js → CommandPalette-CSvgbXxg.js} +1 -1
  9. package/dist/assets/CourseLessonReader-1KDKwxIj.js +2 -0
  10. package/dist/assets/{CourseRail-CRcB319H.js → CourseRail-BijCpApU.js} +1 -1
  11. package/dist/assets/CoursesApp-BWkdYL07.js +2 -0
  12. package/dist/assets/{CrossExamPanel-Deywo95y.js → CrossExamPanel-Cn7b5y7B.js} +1 -1
  13. package/dist/assets/{DashPresent-BEm1tGse.js → DashPresent-B025i7iJ.js} +1 -1
  14. package/dist/assets/DashboardDetail-CZLnxgp0.js +2 -0
  15. package/dist/assets/DashboardLoopRuntime-7MpMUcMg.js +1 -0
  16. package/dist/assets/{DashboardOverview-DrdqBgds.js → DashboardOverview-COyleu7v.js} +1 -1
  17. package/dist/assets/{DashboardSettings-CBhzLW0P.js → DashboardSettings-DUfUqbsp.js} +1 -1
  18. package/dist/assets/DashboardsApp-6xMz2qCP.js +2 -0
  19. package/dist/assets/{DeepZoomApp-Chz6laKc.js → DeepZoomApp-CQaTT2Uh.js} +1 -1
  20. package/dist/assets/{DelegatePanel-DmtTY_lE.js → DelegatePanel-D4OrMa2D.js} +1 -1
  21. package/dist/assets/{DemoGallery-zw3d7ap9.js → DemoGallery-Bt92vKqc.js} +1 -1
  22. package/dist/assets/{DropSelect-Bo2Oyi-2.js → DropSelect-Q310fTbf.js} +1 -1
  23. package/dist/assets/{ExportModal-DICXavg9.js → ExportModal-D0zXlC8w.js} +2 -2
  24. package/dist/assets/ExtractionPreview-0SZYynDs.js +18 -0
  25. package/dist/assets/{FlagshipCTA-B-7nH43r.js → FlagshipCTA-D845jkdt.js} +1 -1
  26. package/dist/assets/{FlagshipCommandPalette-DgTL_Kjj.js → FlagshipCommandPalette-DHMnyG7j.js} +1 -1
  27. package/dist/assets/{FlagshipShowcase-CbAC2s4X.js → FlagshipShowcase-BuR3PZvU.js} +1 -1
  28. package/dist/assets/{FlashcardsApp-CatYcaJJ.js → FlashcardsApp-BzWb4cRP.js} +1 -1
  29. package/dist/assets/{ForecastPanel-BOG361kr.js → ForecastPanel-lTnux0EB.js} +1 -1
  30. package/dist/assets/GalleryApp-D0NGZ1_t.js +1 -0
  31. package/dist/assets/{HonestByDesign-hCxc0A7b.js → HonestByDesign-CCOt31nx.js} +1 -1
  32. package/dist/assets/{HowItWorks-BlbQcUxx.js → HowItWorks-auW5XXCZ.js} +1 -1
  33. package/dist/assets/{LegalApp-sCZjJYWx.js → LegalApp-DXDomKFv.js} +1 -1
  34. package/dist/assets/{LegalMarkdownDocument-Bk3U7ChN.js → LegalMarkdownDocument-DBjLz9Yf.js} +1 -1
  35. package/dist/assets/{LegalPageShell-BsgRV7aL.js → LegalPageShell-BG5UUk-9.js} +1 -1
  36. package/dist/assets/{LeverPanel-CP32QcIf.js → LeverPanel-CvYnTLjh.js} +1 -1
  37. package/dist/assets/{Library-CJTnp1pC.js → Library-Cl1gE9Qg.js} +1 -1
  38. package/dist/assets/{LibraryOverlay-geQRGAzG.js → LibraryOverlay-CX4cJLqD.js} +1 -1
  39. package/dist/assets/LiveApp-CDckMWYX.js +61 -0
  40. package/dist/assets/LiveSettings-DgfIXanM.js +6 -0
  41. package/dist/assets/{MindMapViewerDrawer-7HLErRQF.js → MindMapViewerDrawer-ClU9wgSH.js} +1 -1
  42. package/dist/assets/{MindShape-Bhu4yoIj.js → MindShape-yF19n9qq.js} +1 -1
  43. package/dist/assets/{PinToDashboard-Cj8S9XKC.js → PinToDashboard-CpIDAcIU.js} +1 -1
  44. package/dist/assets/PlanReview-CPcqOxjp.js +1 -0
  45. package/dist/assets/{Presence-DDxb6yE5.js → Presence-CHGZ1JRp.js} +1 -1
  46. package/dist/assets/{PresentationDeck-B6AHRYEA.js → PresentationDeck-CrtiWjiM.js} +1 -1
  47. package/dist/assets/PrismApp-D7RbekoX.js +2 -0
  48. package/dist/assets/{PrismAskController-DUvOTeW9.js → PrismAskController-D6_7Epdb.js} +1 -1
  49. package/dist/assets/PrismBriefingPlayer-Dq5_KRU3.js +2 -0
  50. package/dist/assets/PrismOverlay-CduGpA8D.js +131 -0
  51. package/dist/assets/{PrivacyApp-CatB3OpJ.js → PrivacyApp-rhzy-5HG.js} +1 -1
  52. package/dist/assets/{Recap-DkKrrqi5.js → Recap-BPg2xEPo.js} +1 -1
  53. package/dist/assets/{ReelJelly-DCD4bG10.js → ReelJelly-LWeMsFpj.js} +1 -1
  54. package/dist/assets/ReplayCard-C3dGQfxG.js +2 -0
  55. package/dist/assets/{ReplayOverlay-DbJX08Kr.js → ReplayOverlay-C9W603B5.js} +1 -1
  56. package/dist/assets/{RewindOverlay-Bop4a63b.js → RewindOverlay-BIWmxQlx.js} +1 -1
  57. package/dist/assets/RippleApp-C9-KFvkn.js +2 -0
  58. package/dist/assets/{RippleAskController-CK4iSwT0.js → RippleAskController-DEKz-6Vn.js} +1 -1
  59. package/dist/assets/RippleOverlay-CfXvnUHE.js +6 -0
  60. package/dist/assets/{SeeDontRead-CGGKmvBV.js → SeeDontRead-DrG1qBxJ.js} +1 -1
  61. package/dist/assets/{ShareModal-D4En6Y3L.js → ShareModal-eJ6sdMpf.js} +1 -1
  62. package/dist/assets/{ShipCascade-k_GWrcau.js → ShipCascade-BP8qL0yM.js} +1 -1
  63. package/dist/assets/{ShipCourse-BQOY4MyI.js → ShipCourse-BoqW58VU.js} +1 -1
  64. package/dist/assets/{ShipHotspots-vLRK0w_b.js → ShipHotspots-_9XPhZg2.js} +1 -1
  65. package/dist/assets/{ShipIncident-BWxerYtX.js → ShipIncident-Xod2gbjc.js} +1 -1
  66. package/dist/assets/{ShipMigration-OgAGEbjm.js → ShipMigration-BdkaiJ9D.js} +1 -1
  67. package/dist/assets/{ShipOnboarding-B_2IEq3N.js → ShipOnboarding-CblWatXR.js} +1 -1
  68. package/dist/assets/{ShipRead--gGqg2SE.js → ShipRead-BBn7xkOF.js} +1 -1
  69. package/dist/assets/{ShipRollout-B_U2P8Yw.js → ShipRollout-i5BY3YnP.js} +1 -1
  70. package/dist/assets/{ShipSuggestions-D9coTmgw.js → ShipSuggestions-liytLgC-.js} +1 -1
  71. package/dist/assets/{ShipWorkspace-BmdcHZXa.js → ShipWorkspace-C3VQwGn1.js} +1 -1
  72. package/dist/assets/{SignatureLoop-KA6Cf93g.js → SignatureLoop-Ba7plTb5.js} +1 -1
  73. package/dist/assets/{SynthesisApp-BCBhCJhx.js → SynthesisApp-Ch0tWRBS.js} +2 -2
  74. package/dist/assets/{SynthesisOverlay-BuGIeaKq.js → SynthesisOverlay-DMZndCzV.js} +1 -1
  75. package/dist/assets/{TermsApp-CleIlDtR.js → TermsApp-Dk2jpxq-.js} +1 -1
  76. package/dist/assets/{TopicCanvas-BRu3xVL8.js → TopicCanvas-DX0Z1ZHv.js} +2 -2
  77. package/dist/assets/{TourPrism-zbVLe2ag.js → TourPrism-6fWPMU4Z.js} +1 -1
  78. package/dist/assets/{TrackerTile-D9Wa3CSq.js → TrackerTile-BboQpBGy.js} +2 -2
  79. package/dist/assets/{TwoSurfaces-TyWXgAdq.js → TwoSurfaces-Cabk1rES.js} +1 -1
  80. package/dist/assets/{UnderstoodPanel-BS9OhgLJ.js → UnderstoodPanel-B6jfiKx1.js} +1 -1
  81. package/dist/assets/{WhyMachineOverlay-B-KJhCjr.js → WhyMachineOverlay-BRNibJSf.js} +1 -1
  82. package/dist/assets/{WowFeatures-Bv1-PmXF.js → WowFeatures-C7f4qzIf.js} +1 -1
  83. package/dist/assets/{ZoomDeck-C2Q6xbgX.js → ZoomDeck-BtlVyhwv.js} +1 -1
  84. package/dist/assets/{alternateFinishes-BG6svkXG.js → alternateFinishes-CVUX4x0C.js} +1 -1
  85. package/dist/assets/{annotationAuto-BpBsjbDQ.js → annotationAuto-BjWqgseH.js} +1 -1
  86. package/dist/assets/{annotationReel-yzysA-Gr.js → annotationReel-B5A2RZkx.js} +1 -1
  87. package/dist/assets/{backup-BdeBr3wq.js → backup-d46KwktS.js} +1 -1
  88. package/dist/assets/cachedImport-DW0gP14h.js +1 -0
  89. package/dist/assets/canvas-BuMP6u6i.js +1 -0
  90. package/dist/assets/{catalog-DF7YTNju.js → catalog-Bv0dWU_C.js} +1 -1
  91. package/dist/assets/confirmAdd-CWWtX1VN.js +1 -0
  92. package/dist/assets/{dashboardEvents-C_XvGVLJ.js → dashboardEvents-Be4sftHN.js} +1 -1
  93. package/dist/assets/{dist-CBEt6Q8V.js → dist-DIKAXwpM.js} +1 -1
  94. package/dist/assets/{fit-B1LJWvMO.js → fit-CuHWhwsj.js} +1 -1
  95. package/dist/assets/{generateLive-ChhSWKbq.js → generateLive-CMbGT3eM.js} +1 -1
  96. package/dist/assets/index-Dbr1j8Fe.js +22 -0
  97. package/dist/assets/{jspdf.es.min-DutJi91O.js → jspdf.es.min-ydC1TxUW.js} +1 -1
  98. package/dist/assets/{kokoro-kGWf7M0e.js → kokoro-DsmNzulR.js} +1 -1
  99. package/dist/assets/{lib-C7zXL8h0.js → lib-B6qSkBPa.js} +1 -1
  100. package/dist/assets/{liveSchema-DCL21WdS.js → liveSchema-B1MGdSkK.js} +1 -1
  101. package/dist/assets/{motion-dfA87zbb.js → motion-luJxBPnj.js} +1 -1
  102. package/dist/assets/notes-3WQ6b0Mi.js +1 -0
  103. package/dist/assets/{pdf-DFYCstCC.js → pdf-RyoPCIGN.js} +1 -1
  104. package/dist/assets/{perfProbe-CCSPF3EA.js → perfProbe-Xs39DqMh.js} +1 -1
  105. package/dist/assets/{pin-D5_Ebl_s.js → pin-Cj-LMfpK.js} +1 -1
  106. package/dist/assets/{portal-BndazODr.js → portal-zyqZwnb1.js} +1 -1
  107. package/dist/assets/{pptxgen.es-CwCkoJdp.js → pptxgen.es-CveAizg8.js} +1 -1
  108. package/dist/assets/{prewarm--KODwuMi.js → prewarm-K5WcvrNh.js} +1 -1
  109. package/dist/assets/{quietHours-DVPplPtM.js → quietHours-BklvMqsV.js} +1 -1
  110. package/dist/assets/{registry-DQIm_hbI.js → registry-1h9idbfk.js} +1 -1
  111. package/dist/assets/{registry-Dphh5ADP.js → registry-2zthbrHC.js} +1 -1
  112. package/dist/assets/{registry-D7rspCZr.js → registry-4O5l9cd5.js} +1 -1
  113. package/dist/assets/{registry-WJE8Z0T1.js → registry-BRB85vr4.js} +1 -1
  114. package/dist/assets/registry-BdMZ_4cm.js +2 -0
  115. package/dist/assets/{registry-Ba9xMFO4.js → registry-Bnp_yh8G.js} +2 -2
  116. package/dist/assets/{registry-BlB0FYf0.js → registry-C1IrZBk8.js} +1 -1
  117. package/dist/assets/{registry-B3V5-8v0.js → registry-C5DK98Hl.js} +1 -1
  118. package/dist/assets/{registry-0E1uKPCI.js → registry-CK0-re_Q.js} +1 -1
  119. package/dist/assets/{registry-DrNMbrA_.js → registry-COrl_Heq.js} +1 -1
  120. package/dist/assets/{registry-wJhGGVuP.js → registry-CQUQlrSx.js} +1 -1
  121. package/dist/assets/{registry-COxprhRN.js → registry-CXa3qXl3.js} +1 -1
  122. package/dist/assets/{registry-CWkBxxsI.js → registry-C_baBbqq.js} +1 -1
  123. package/dist/assets/{registry-CIa1EU-G.js → registry-CjY5POtx.js} +1 -1
  124. package/dist/assets/{registry-C30HGS2G.js → registry-CoBAqOlY.js} +1 -1
  125. package/dist/assets/{registry-Dvv84L9K.js → registry-DJj-o3MQ.js} +1 -1
  126. package/dist/assets/{registry-DNzF-nvu.js → registry-DfCCnIfu.js} +1 -1
  127. package/dist/assets/{registry-D-qEhm1d.js → registry-DfgFkD3J.js} +1 -1
  128. package/dist/assets/{registry-M3VgAiQv.js → registry-Dhlx1mF4.js} +1 -1
  129. package/dist/assets/{registry-nG70-amx.js → registry-DnEh7nbX.js} +1 -1
  130. package/dist/assets/{registry-hsSlT6pi.js → registry-VD94nLXO.js} +1 -1
  131. package/dist/assets/{registry-BH6FfyZk.js → registry-mFD4P5dI.js} +1 -1
  132. package/dist/assets/registry-sDzDmht4.js +1 -0
  133. package/dist/assets/{relate-DxAi8xpo.js → relate-CEND9Qlk.js} +1 -1
  134. package/dist/assets/{shikiHighlight-B_TEagaE.js → shikiHighlight-SCFIB43b.js} +1 -1
  135. package/dist/assets/useDashboardLoop-C8Mcbcto.js +5 -0
  136. package/dist/assets/{useLiveConfig-Lm0cYTcu.js → useLiveConfig-BW1WkpTc.js} +1 -1
  137. package/dist/assets/{useSpatialCanvas-D_C8VoCy.js → useSpatialCanvas-C5TNlpeK.js} +1 -1
  138. package/dist/assets/{useSpotlightWalk-CCQT0-_g.js → useSpotlightWalk-dA3IdI-1.js} +1 -1
  139. package/dist/assets/{useSrsCards-BKCPBPYw.js → useSrsCards-C7Xni9C0.js} +1 -1
  140. package/dist/assets/{useStudy-Diy4ITBm.js → useStudy-DHRIx8p-.js} +1 -1
  141. package/dist/assets/{useZoomGesture-B82XnSfi.js → useZoomGesture-BsPXvLw2.js} +1 -1
  142. package/dist/index.html +2 -1
  143. package/package.json +1 -1
  144. package/dist/assets/CourseLessonReader-CKfvBMtL.js +0 -2
  145. package/dist/assets/CoursesApp-BbCGxAav.js +0 -2
  146. package/dist/assets/DashboardDetail-tK6FpgtH.js +0 -2
  147. package/dist/assets/DashboardLoopRuntime-Cis4WMqk.js +0 -1
  148. package/dist/assets/DashboardsApp-Dc43FBIi.js +0 -2
  149. package/dist/assets/ExtractionPreview-C636AVw-.js +0 -18
  150. package/dist/assets/GalleryApp-uW6b1Y0d.js +0 -1
  151. package/dist/assets/LiveApp-C0BN0o3_.js +0 -61
  152. package/dist/assets/LiveSettings-CzSXXMoo.js +0 -6
  153. package/dist/assets/PlanReview-3NxZD9wt.js +0 -1
  154. package/dist/assets/PrismApp-BlPpWxao.js +0 -2
  155. package/dist/assets/PrismBriefingPlayer-Bmo9tOGX.js +0 -2
  156. package/dist/assets/PrismOverlay-9Q_14eEO.js +0 -131
  157. package/dist/assets/ReplayCard-Bz69tOST.js +0 -2
  158. package/dist/assets/RippleApp-u3hCfb5b.js +0 -2
  159. package/dist/assets/RippleOverlay-BM_B9JEc.js +0 -6
  160. package/dist/assets/canvas-Ep2Kfupo.js +0 -1
  161. package/dist/assets/index-C7H7A1rW.js +0 -22
  162. package/dist/assets/notes-DblI4Ko_.js +0 -1
  163. package/dist/assets/registry-B51MhOLx.js +0 -2
  164. package/dist/assets/registry-Pr5IKqro.js +0 -1
  165. package/dist/assets/useDashboardLoop-DzbRz-V9.js +0 -5
@@ -1,2 +1,2 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-C7H7A1rW.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import"./lib-C7zXL8h0.js";import{n as o}from"./motion-dfA87zbb.js";import{t as s}from"./registry-types-DMuK0vJ6.js";import{n as c,r as l,t as u}from"./CodeOutput-Bg64AyKu.js";var d=n();function f({title:e,icon:t=`alert`,iconColor:n=`var(--warning)`,errorType:r,message:o,frames:s,cause:c,fix:l,footer:u,delay:f}){let p=i[t]??i.alert,m=s??[];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f??0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`st-error-block`,children:[(0,d.jsx)(`div`,{className:`st-error-type`,children:r}),(0,d.jsx)(`div`,{className:`st-error-msg`,children:o}),c&&(0,d.jsxs)(`div`,{className:`st-cause`,children:[`Caused by: `,c]})]}),m.length>0&&(0,d.jsxs)(`div`,{className:`st-frames`,children:[(0,d.jsx)(`div`,{className:`st-frames-label`,children:`Call stack`}),m.map((e,t)=>(0,d.jsxs)(`div`,{className:`st-frame${e.isUser?` user-code`:``}`,children:[(0,d.jsx)(`div`,{className:`st-frame-num`,style:{minWidth:`max-content`},children:t+1}),(0,d.jsxs)(`div`,{className:`st-file-col`,children:[(0,d.jsxs)(`div`,{className:`st-file`,children:[e.file,e.line==null?``:`:${e.line}`,e.col==null?``:`:${e.col}`]}),e.fn&&(0,d.jsx)(`div`,{className:`st-fn`,children:e.fn}),e.context&&(0,d.jsx)(`div`,{className:`st-ctx`,children:e.context})]})]},t))]}),l&&(0,d.jsxs)(`div`,{className:`st-fix`,children:[(0,d.jsx)(`div`,{className:`st-fix-label`,children:`Suggested fix`}),(0,d.jsx)(`div`,{children:l})]}),u&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var p=r(),m=t();function h(e){switch(e){case`keyword`:case`type`:return`var(--insight)`;case`value`:return`var(--presence)`;case`comment`:return`var(--text-muted)`;default:return`var(--text-primary)`}}function g(e){let t=(0,p.c)(4),{tokens:n}=e,r;t[0]===n?r=t[1]:(r=n.map(_),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,d.jsx)(`div`,{className:`sb-tokens`,children:r}),t[2]=r,t[3]=i),i}function _(e,t){return(0,d.jsxs)(`span`,{className:`sb-token`,children:[(0,d.jsx)(`span`,{className:`sb-token-code`,style:{color:h(e.kind)},children:e.code}),(0,d.jsx)(`span`,{className:`sb-token-label`,children:e.label})]},t)}function v({title:e,icon:t=`doc`,iconColor:n,lang:r,lines:o,summary:s,runnable:f=!1,footer:p,delay:h}){let _=i[t]??i.doc,v=n??`var(--insight)`,y=o??[],b=(r??``).toLowerCase(),x=f&&l(b),S=y.map(e=>e.code).join(`
1
+ import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-Dbr1j8Fe.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import"./lib-B6qSkBPa.js";import{n as o}from"./motion-luJxBPnj.js";import{t as s}from"./registry-types-DMuK0vJ6.js";import{n as c,r as l,t as u}from"./CodeOutput-H8TQzjqL.js";var d=n();function f({title:e,icon:t=`alert`,iconColor:n=`var(--warning)`,errorType:r,message:o,frames:s,cause:c,fix:l,footer:u,delay:f}){let p=i[t]??i.alert,m=s??[];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f??0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`st-error-block`,children:[(0,d.jsx)(`div`,{className:`st-error-type`,children:r}),(0,d.jsx)(`div`,{className:`st-error-msg`,children:o}),c&&(0,d.jsxs)(`div`,{className:`st-cause`,children:[`Caused by: `,c]})]}),m.length>0&&(0,d.jsxs)(`div`,{className:`st-frames`,children:[(0,d.jsx)(`div`,{className:`st-frames-label`,children:`Call stack`}),m.map((e,t)=>(0,d.jsxs)(`div`,{className:`st-frame${e.isUser?` user-code`:``}`,children:[(0,d.jsx)(`div`,{className:`st-frame-num`,style:{minWidth:`max-content`},children:t+1}),(0,d.jsxs)(`div`,{className:`st-file-col`,children:[(0,d.jsxs)(`div`,{className:`st-file`,children:[e.file,e.line==null?``:`:${e.line}`,e.col==null?``:`:${e.col}`]}),e.fn&&(0,d.jsx)(`div`,{className:`st-fn`,children:e.fn}),e.context&&(0,d.jsx)(`div`,{className:`st-ctx`,children:e.context})]})]},t))]}),l&&(0,d.jsxs)(`div`,{className:`st-fix`,children:[(0,d.jsx)(`div`,{className:`st-fix-label`,children:`Suggested fix`}),(0,d.jsx)(`div`,{children:l})]}),u&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(u)})]})}var p=r(),m=t();function h(e){switch(e){case`keyword`:case`type`:return`var(--insight)`;case`value`:return`var(--presence)`;case`comment`:return`var(--text-muted)`;default:return`var(--text-primary)`}}function g(e){let t=(0,p.c)(4),{tokens:n}=e,r;t[0]===n?r=t[1]:(r=n.map(_),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,d.jsx)(`div`,{className:`sb-tokens`,children:r}),t[2]=r,t[3]=i),i}function _(e,t){return(0,d.jsxs)(`span`,{className:`sb-token`,children:[(0,d.jsx)(`span`,{className:`sb-token-code`,style:{color:h(e.kind)},children:e.code}),(0,d.jsx)(`span`,{className:`sb-token-label`,children:e.label})]},t)}function v({title:e,icon:t=`doc`,iconColor:n,lang:r,lines:o,summary:s,runnable:f=!1,footer:p,delay:h}){let _=i[t]??i.doc,v=n??`var(--insight)`,y=o??[],b=(r??``).toLowerCase(),x=f&&l(b),S=y.map(e=>e.code).join(`
2
2
  `),[C,w]=(0,m.useState)(null),T=(0,m.useCallback)(()=>w(null),[]);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h??0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(_,{className:`ic`,style:{color:v}}),e,r&&(0,d.jsx)(`span`,{style:{marginLeft:`auto`,fontFamily:`var(--font-mono, ui-monospace, monospace)`,fontSize:`var(--fs-xs, 11px)`,color:`var(--text-muted)`,textTransform:`lowercase`,letterSpacing:`0.03em`},children:r})]}),s&&(0,d.jsx)(`p`,{className:`sb-summary`,children:s}),(0,d.jsx)(`div`,{className:`sb-lines`,children:y.map((e,t)=>(0,d.jsxs)(`div`,{className:`sb-line-row`,style:t%2==0?{background:`var(--surface-elevated)`,borderRadius:`var(--r-sm)`}:{},children:[(0,d.jsxs)(`div`,{className:`sb-code-col`,children:[(0,d.jsx)(`div`,{className:`sb-code`,children:e.code}),e.tokens&&e.tokens.length>0&&(0,d.jsx)(g,{tokens:e.tokens})]}),e.explanation&&(0,d.jsx)(`div`,{className:`sb-exp`,style:{flex:`1.2`,minWidth:0,paddingTop:4},children:e.explanation})]},t))}),p&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(p)}),x&&(0,d.jsxs)(`div`,{style:{marginTop:10},children:[(0,d.jsx)(c,{code:S,lang:b,onResult:w}),C&&(0,d.jsx)(u,{result:C,onDismiss:T})]})]})}function y(e){let t=(0,p.c)(2),{step:n}=e;if(!n.code)return null;let r;return t[0]===n.code?r=t[1]:(r=(0,d.jsx)(`pre`,{className:`cw-code`,children:n.code}),t[0]=n.code,t[1]=r),r}function b({title:e,icon:t=`doc`,iconColor:n,algorithm:r,steps:o,footer:s,delay:c}){let l=i[t]??i.doc,u=n??`var(--presence)`,f=o??[];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:u}}),` `,e]}),r&&(0,d.jsx)(`div`,{className:`cw-algo`,children:r}),(0,d.jsx)(`div`,{className:`cw-steps`,children:f.map(e=>(0,d.jsxs)(`div`,{className:`cw-step`,children:[(0,d.jsx)(`div`,{className:`cw-num`,children:e.step}),(0,d.jsxs)(`div`,{className:`cw-body`,children:[(0,d.jsx)(`div`,{className:`cw-step-title`,children:e.title}),(0,d.jsx)(y,{step:e}),(0,d.jsx)(`div`,{className:`cw-exp`,children:e.explanation})]})]},e.step))}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function x({title:e,icon:t=`sliders`,iconColor:n,component:r,props:o,footer:s,delay:c}){let l=i[t]??i.sliders,u=n??`var(--insight)`,f=o??[],p=f.reduce((e,t)=>e+ +!!t.required,0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:u}}),` `,e]}),r&&(0,d.jsxs)(`div`,{className:`cap-head`,children:[(0,d.jsx)(`span`,{className:`cap-sig`,children:r}),f.length>0&&(0,d.jsxs)(`span`,{className:`cap-count`,children:[f.length,` `,f.length===1?`prop`:`props`,p>0&&(0,d.jsxs)(`span`,{className:`cap-count-req`,children:[` · `,p,` required`]})]})]}),f.length>0?(0,d.jsx)(`div`,{className:`cap-scroll`,children:(0,d.jsxs)(`div`,{className:`cap-table`,role:`table`,children:[(0,d.jsxs)(`div`,{className:`cap-row cap-row--head`,role:`row`,children:[(0,d.jsx)(`span`,{className:`cap-th cap-c-name`,role:`columnheader`,children:`Prop`}),(0,d.jsx)(`span`,{className:`cap-th cap-c-type`,role:`columnheader`,children:`Type`}),(0,d.jsx)(`span`,{className:`cap-th cap-c-default`,role:`columnheader`,children:`Default`})]}),f.map((e,t)=>(0,d.jsxs)(`div`,{className:`cap-row`,role:`row`,children:[(0,d.jsxs)(`div`,{className:`cap-cell cap-c-name`,role:`cell`,children:[(0,d.jsx)(`span`,{className:`cap-name`,children:e.name}),e.required?(0,d.jsxs)(`span`,{className:`cap-req`,title:`Required`,children:[(0,d.jsx)(i.alert,{className:`ic cap-req-ic`,style:{width:11,height:11}}),`required`]}):(0,d.jsx)(`span`,{className:`cap-opt`,title:`Optional`,children:`optional`})]}),(0,d.jsx)(`div`,{className:`cap-cell cap-c-type`,role:`cell`,children:(0,d.jsx)(`span`,{className:`cap-type`,children:e.type})}),(0,d.jsx)(`div`,{className:`cap-cell cap-c-default`,role:`cell`,children:e.default!=null&&e.default!==``?(0,d.jsx)(`span`,{className:`cap-default`,children:e.default}):(0,d.jsx)(`span`,{className:`cap-dash`,children:`—`})}),e.desc&&(0,d.jsx)(`div`,{className:`cap-desc`,role:`cell`,children:e.desc})]},`${e.name}-${t}`))]})}):(0,d.jsx)(`p`,{className:`cap-empty`,children:`No props documented.`}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function S({title:e,icon:t=`chevR`,iconColor:n=`var(--presence)`,prompt:r=`$`,lines:o,exitCode:s,caption:c,footer:l,delay:u}){let f=i[t]??i.chevR,p=o??[];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`term`,role:`img`,"aria-label":e?`Terminal: ${e}`:`Terminal session`,children:[(0,d.jsxs)(`div`,{className:`term-bar`,"aria-hidden":`true`,children:[(0,d.jsx)(`span`,{className:`term-dot term-dot-a`}),(0,d.jsx)(`span`,{className:`term-dot term-dot-b`}),(0,d.jsx)(`span`,{className:`term-dot term-dot-c`}),(0,d.jsx)(`span`,{className:`term-bar-label`,children:r})]}),(0,d.jsxs)(`div`,{className:`term-body`,children:[p.map((e,t)=>(0,d.jsx)(C,{line:e,prompt:r},t)),s!=null&&(0,d.jsxs)(`div`,{className:`term-exit${s===0?` ok`:` err`}`,children:[`exit `,s,s===0?` · ok`:` · failed`]})]})]}),c&&(0,d.jsx)(`div`,{className:`term-caption`,children:c}),l&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(l)})]})}function C(e){let t=(0,p.c)(18),{line:n,prompt:r}=e,i=n.kind??`stdout`;if(i===`command`){let e=n.text??``,i,a;if(t[0]!==e){let n=e.indexOf(` `);i=n===-1?e:e.slice(0,n),a=n===-1?``:e.slice(n),t[0]=e,t[1]=i,t[2]=a}else i=t[1],a=t[2];let o=a,s=n.prompt??r,c;t[3]===s?c=t[4]:(c=(0,d.jsx)(`span`,{className:`term-prompt`,children:s}),t[3]=s,t[4]=c);let l;t[5]===i?l=t[6]:(l=(0,d.jsx)(`span`,{className:`term-cmd-head`,children:i}),t[5]=i,t[6]=l);let u;t[7]!==o||t[8]!==l?(u=(0,d.jsxs)(`span`,{className:`term-cmd-text`,children:[l,o]}),t[7]=o,t[8]=l,t[9]=u):u=t[9];let f;return t[10]!==c||t[11]!==u?(f=(0,d.jsxs)(`div`,{className:`term-line term-cmd`,children:[c,u]}),t[10]=c,t[11]=u,t[12]=f):f=t[12],f}if(i===`comment`){let e;return t[13]===n.text?e=t[14]:(e=(0,d.jsxs)(`div`,{className:`term-line term-comment`,children:[`# `,n.text]}),t[13]=n.text,t[14]=e),e}let a=`term-line term-${i===`stderr`?`err`:`out`}`,o;return t[15]!==n.text||t[16]!==a?(o=(0,d.jsx)(`div`,{className:a,children:n.text}),t[15]=n.text,t[16]=a,t[17]=o):o=t[17],o}var w=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function T({title:e,icon:t=`layers`,iconColor:n=`var(--insight)`,entries:r,caption:o,footer:s,delay:c}){let l=i[t]??i.layers,u=(0,m.useMemo)(()=>r??[],[r]),[f,p]=(0,m.useState)(null),h=(0,m.useMemo)(()=>{let e={};for(let t of w)e[t]=0;for(let t of u)t?.level&&e[t.level]!=null&&(e[t.level]+=1);return e},[u]),g=f?u.filter(e=>e.level===f):u,_=w.filter(e=>h[e]>0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c??0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),_.length>0&&(0,d.jsx)(`div`,{className:`log-vol`,role:`group`,"aria-label":`Filter by level`,children:_.map(e=>(0,d.jsxs)(`button`,{type:`button`,className:`log-chip log-${e}${f===e?` on`:``}`,"aria-pressed":f===e,onClick:()=>p(f===e?null:e),children:[(0,d.jsx)(`span`,{className:`log-chip-name`,children:e}),(0,d.jsx)(`span`,{className:`log-chip-count`,children:h[e]})]},e))}),(0,d.jsxs)(`div`,{className:`log-feed`,children:[g.map((e,t)=>(0,d.jsxs)(`div`,{className:`log-row log-${e.level}`,children:[e.time&&(0,d.jsx)(`span`,{className:`log-time`,children:e.time}),(0,d.jsx)(`span`,{className:`log-pill log-${e.level}`,children:e.level}),e.source&&(0,d.jsx)(`span`,{className:`log-src`,children:e.source}),(0,d.jsx)(`span`,{className:`log-msg`,children:e.message})]},t)),g.length===0&&(0,d.jsx)(`div`,{className:`log-empty`,children:`No entries`})]}),o&&(0,d.jsx)(`div`,{className:`term-caption`,children:o}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(s)})]})}function E(e){let t=(0,p.c)(5),{d:n,color:r,delay:i}=e,a=(0,m.useRef)(null),s;t[0]===i?s=t[1]:(s={delay:i},t[0]=i,t[1]=s),o(a,s);let c;return t[2]!==r||t[3]!==n?(c=(0,d.jsx)(`path`,{ref:a,d:n,fill:`none`,stroke:r,strokeWidth:2,strokeLinecap:`round`,opacity:.85}),t[2]=r,t[3]=n,t[4]=c):c=t[4],c}var D=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--danger)`,`var(--insight-soft)`],O=36,k=22,A=16,j=5.5,M=14;function N({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,branches:r,commits:o,caption:s,footer:c,delay:l}){let u=i[t]??i.share,f=o??[],p=f.slice(0,M),m=f.length-p.length,h=r?.length?r:p.reduce((e,t)=>e.includes(t.branch)?e:[...e,t.branch],[]),g=e=>Math.max(0,h.indexOf(e)),_=e=>D[g(e)%D.length],v=new Map(p.map((e,t)=>[e.id,t])),y=e=>A+e*k,b=e=>e*O+O/2,x=A*2+Math.max(0,h.length-1)*k,S=Math.max(O,p.length*O);return p.length===0?(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`log-empty`,children:`No commits`})]}):(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),h.length>1&&(0,d.jsx)(`div`,{className:`gg-legend`,children:h.map((e,t)=>(0,d.jsxs)(`span`,{className:`gg-leg`,children:[(0,d.jsx)(`span`,{className:`gg-leg-dot`,style:{background:D[t%D.length]}}),e]},e))}),(0,d.jsxs)(`div`,{className:`gg`,children:[(0,d.jsxs)(`svg`,{className:`gg-graph`,width:x,height:S,viewBox:`0 0 ${x} ${S}`,style:{flex:`0 0 ${x}px`},"aria-hidden":`true`,children:[p.map((e,t)=>{let n=y(g(e.branch)),r=b(t);return(e.parents??[]).map(t=>{let i=v.get(t);if(i==null)return null;let a=y(g(p[i].branch)),o=b(i);return(0,d.jsx)(E,{d:n===a?`M ${n} ${r} L ${a} ${o}`:`M ${n} ${r} C ${n} ${r+O*.6}, ${a} ${o-O*.6}, ${a} ${o}`,color:_(p[i].branch),delay:l},`${e.id}-${t}`)})}),p.map((e,t)=>{let n=y(g(e.branch)),r=b(t);return(0,d.jsxs)(`g`,{children:[e.head&&(0,d.jsx)(`circle`,{cx:n,cy:r,r:8.5,fill:`none`,stroke:_(e.branch),strokeWidth:1.5,opacity:.5}),(0,d.jsx)(`circle`,{cx:n,cy:r,r:j,fill:_(e.branch)})]},e.id)})]}),(0,d.jsx)(`div`,{className:`gg-rows`,children:p.map(e=>(0,d.jsxs)(`div`,{className:`gg-row`,style:{height:O},children:[(0,d.jsx)(`span`,{className:`gg-hash`,children:e.id}),(0,d.jsx)(`span`,{className:`gg-msg`,children:e.message}),e.tag&&(0,d.jsx)(`span`,{className:`gg-tag`,children:e.tag}),e.head&&(0,d.jsx)(`span`,{className:`gg-head`,children:`HEAD`})]},e.id))})]}),m>0&&(0,d.jsxs)(`div`,{className:`gg-more`,children:[`+`,m,` older commits`]}),s&&(0,d.jsx)(`div`,{className:`term-caption`,children:s}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(c)})]})}var P=18;function F({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,sql:r,nodes:o,caption:s,footer:c,delay:l}){let u=i[t]??i.layers,f=o??[],p=e=>e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,d.jsx)(`pre`,{className:`qp-sql`,children:r}),(0,d.jsxs)(`div`,{className:`qp-tree`,children:[f.map((e,t)=>(0,d.jsxs)(`div`,{className:`qp-node${e.slow?` slow`:``}`,style:{marginLeft:Math.max(0,e.depth??0)*P},children:[(0,d.jsxs)(`div`,{className:`qp-node-main`,children:[(0,d.jsx)(`span`,{className:`qp-op`,children:e.op}),e.detail&&(0,d.jsx)(`span`,{className:`qp-detail`,children:e.detail})]}),(0,d.jsxs)(`div`,{className:`qp-metrics`,children:[e.rows!=null&&(0,d.jsxs)(`span`,{className:`qp-metric`,children:[p(e.rows),(0,d.jsx)(`i`,{children:` rows`})]}),e.cost!=null&&(0,d.jsxs)(`span`,{className:`qp-metric`,children:[e.cost,(0,d.jsx)(`i`,{children:` cost`})]}),e.timeMs!=null&&(0,d.jsxs)(`span`,{className:`qp-metric${e.slow?` qp-hot`:``}`,children:[e.timeMs,(0,d.jsx)(`i`,{children:` ms`})]})]})]},t)),f.length===0&&(0,d.jsx)(`div`,{className:`log-empty`,children:`No plan`})]}),s&&(0,d.jsx)(`div`,{className:`term-caption`,children:s}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(c)})]})}var I=22,L=80;function R(e){let t=[],n=[],r=0,i=0;for(let a of e){for(;n.length&&n[n.length-1].depth>=a.depth;)n.pop();let e=n[n.length-1],o=e?e.cursor:r,s=Math.max(0,a.value||0);t.push({f:a,x:o,w:s}),e?e.cursor+=s:r+=s,n.push({depth:a.depth,cursor:o}),a.depth>i&&(i=a.depth)}return{placed:t,total:r||1,maxDepth:i}}function z({title:e,icon:t=`layers`,iconColor:n=`var(--warning)`,frames:r,unit:o,caption:s,footer:c,delay:l}){let u=i[t]??i.layers,f=(r??[]).slice(0,L);if(f.length===0)return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`log-empty`,children:`No samples`})]});let{placed:p,total:m,maxDepth:h}=R(f),g=(h+1)*I,_=e=>`${e}${o?` ${o}`:``}`;return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l??0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(u,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`flame`,style:{height:g},children:p.map(({f:e,x:t,w:n},r)=>{let i=t/m*100,a=Math.min(100-i,n/m*100);if(a<=0)return null;let o=Math.round(n/m*100);return(0,d.jsx)(`div`,{className:`flame-cell${e.hot?` hot`:``}`,style:{left:`${i}%`,width:`${a}%`,top:e.depth*I,"--d":String(e.depth)},title:`${e.name} — ${_(n)} (${o}%)`,"aria-label":`${e.name} — ${_(n)} (${o}%)`,children:(0,d.jsx)(`span`,{className:`flame-label`,children:e.name})},r)})}),(0,d.jsxs)(`div`,{className:`flame-foot`,children:[(0,d.jsxs)(`span`,{children:[`total `,_(m),` · `,f.length,` frames`]}),p.some(e=>e.f.hot)&&(0,d.jsx)(`span`,{className:`flame-hot-key`,children:`hot path`})]}),s&&(0,d.jsx)(`div`,{className:`term-caption`,children:s}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(c)})]})}function B({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,pattern:r,flags:o,parts:s,samples:c,caption:l,footer:u,delay:f}){let p=i[t]??i.spark,m=s??[];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f??0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`rx-pattern`,children:[(0,d.jsx)(`span`,{className:`rx-slash`,children:`/`}),(0,d.jsx)(`span`,{className:`rx-src`,children:r}),(0,d.jsx)(`span`,{className:`rx-slash`,children:`/`}),o&&(0,d.jsx)(`span`,{className:`rx-flags`,children:o})]}),(0,d.jsx)(`div`,{className:`rx-parts`,children:m.map((e,t)=>(0,d.jsxs)(`div`,{className:`rx-part`,children:[(0,d.jsx)(`code`,{className:`rx-token rx-${e.kind??`other`}`,children:e.token}),(0,d.jsx)(`span`,{className:`rx-label`,children:e.label})]},t))}),c&&c.length>0&&(0,d.jsx)(`div`,{className:`rx-samples`,children:c.map((e,t)=>(0,d.jsxs)(`div`,{className:`rx-sample`,children:[e.label&&(0,d.jsx)(`span`,{className:`rx-sample-label`,children:e.label}),(0,d.jsx)(`code`,{className:`rx-sample-text`,children:e.segments.map((e,t)=>e.match?(0,d.jsx)(`mark`,{className:`rx-hit`,style:e.group==null?void 0:{"--g":String(e.group%4)},children:e.text},t):(0,d.jsx)(`span`,{children:e.text},t))})]},t))}),l&&(0,d.jsx)(`div`,{className:`term-caption`,children:l}),u&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(u)})]})}var V=`-`,H={dna:`DNA`,rna:`RNA`,protein:`Protein`};function U(e,t){let n=e?e[t]:void 0;return n===void 0?V:n}function W(e){let t=0;for(let n of e)t=Math.max(t,n?.chars?.length??0);return t}function G(e,t){let n=Array(t).fill(!0);for(let r=0;r<t;r++){let t=null;for(let i of e){let e=U(i?.chars,r);if(t===null)t=e;else if(e!==t){n[r]=!1;break}}}return n}function K(e,t){let n=``;for(let r=0;r<t;r++){let t=new Map;for(let n of e){let e=U(n?.chars,r);e!==V&&t.set(e,(t.get(e)??0)+1)}if(t.size===0){n+=V;continue}let i=V,a=0,o=!1;for(let[e,n]of t)n>a?(i=e,a=n,o=!1):n===a&&(o=!0);n+=o?`.`:i}return n}function q({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,kind:r,sequences:o,consensus:s,highlightMismatches:c=!1,footer:l,delay:u}){let f=i[t]??i.layers,p=(0,m.useMemo)(()=>Array.isArray(o)?o.filter(e=>!!e):[],[o]),h=(0,m.useMemo)(()=>W(p),[p]),g=(0,m.useMemo)(()=>c&&h>0?G(p,h):null,[c,p,h]),_=s?.trim(),v=(0,m.useMemo)(()=>_&&p.length>0&&h>0?K(p,h):null,[_,p,h]),y=H[r]??`Sequence`;return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u??0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`sq-head`,children:[(0,d.jsx)(`span`,{className:`sq-kind`,children:y}),(0,d.jsxs)(`span`,{className:`sq-stat`,children:[p.length,` read`,p.length===1?``:`s`,` · `,h,` col`,h===1?``:`s`]})]}),p.length===0||h===0?(0,d.jsx)(`div`,{className:`sq-empty`,children:`No sequence data to align.`}):(0,d.jsx)(`div`,{className:`sq-scroll`,role:`table`,"aria-label":`${y} alignment: ${p.length} reads, ${h} columns`,children:(0,d.jsxs)(`div`,{className:`sq-rows`,children:[p.map((e,t)=>(0,d.jsx)(J,{index:t,label:e?.label,chars:e?.chars,width:h,conserved:g},t)),v&&(0,d.jsxs)(`div`,{className:`sq-row sq-consensus`,role:`row`,children:[(0,d.jsx)(`span`,{className:`sq-label`,children:_}),(0,d.jsx)(`span`,{className:`sq-chars`,children:Array.from({length:h},(e,t)=>{let n=v[t];return(0,d.jsx)(`span`,{className:`sq-char${n===V?` gap`:n===`.`?` ambiguous`:``}`,children:n},t)})})]})]})}),l&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:10},dangerouslySetInnerHTML:a(l)})]})}function J({index:e,label:t,chars:n,width:r,conserved:i}){let a=t?.trim()||`Sequence ${e+1}`;return(0,d.jsxs)(`div`,{className:`sq-row m-stagger-item m-fade-rise`,role:`row`,style:{"--i":e},children:[(0,d.jsx)(`span`,{className:`sq-label`,title:a,children:a}),(0,d.jsx)(`span`,{className:`sq-chars`,children:Array.from({length:r},(e,t)=>{let r=U(n,t),a=r===V,o=!a&&i!==null&&i[t]===!1;return(0,d.jsx)(`span`,{className:`sq-char${a?` gap`:``}${o?` mismatch`:``}`,children:r},t)})})]})}var Y=e({codeRegistry:()=>X}),X={stacktrace:s(f),syntaxbreakdown:s(v),codewalk:s(b),componentapi:s(x),terminal:s(S),logstream:s(T),gitgraph:s(N),queryplan:s(F),flamegraph:s(z),regexscope:s(B),sequencealign:s(q)};export{Y as n,X as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{n as r}from"./icons-CHVz6kv_.js";import{t as i}from"./useFocusTrap-DbfG6zbM.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./registry-types-DMuK0vJ6.js";import{t as s}from"./portal-BndazODr.js";var c=t(),l=n();function u({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:o=`Open dialog`,triggerIcon:u=`external`,description:d=`A centered modal dialog with a focus ring, backdrop, and Escape&#8209;to&#8209;close.`,heading:f=`Publish this version?`,body:p=`Publishing makes <strong>Revision 12</strong> the live version everyone sees. You can roll back to any earlier revision at any time.`,confirm:m=`Publish`,cancel:h=`Cancel`,color:g=`var(--presence)`,delay:_}){let v=r[t]||r.layers,y=r[u]||r.external,[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(!1),w=(0,c.useRef)(null);return i(w,{active:b}),(0,c.useEffect)(()=>{if(!b)return;let e=e=>{e.key===`Escape`&&x(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(_||0)+`ms`,"--ov-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>x(!0),children:[(0,l.jsx)(y,{className:`ic`}),` `,o]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(S?`Published — <strong>Revision 12</strong> is now live.`:d)})]}),b&&(0,l.jsx)(s,{accent:g,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>x(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),x(!1))}}),(0,l.jsxs)(`div`,{className:`ov-dialog`,ref:w,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":f,children:[(0,l.jsxs)(`div`,{className:`ov-dialog-head`,children:[(0,l.jsx)(`div`,{className:`ov-dialog-title`,children:f}),(0,l.jsx)(`button`,{type:`button`,className:`ov-x`,"aria-label":`Close`,onClick:()=>x(!1),children:(0,l.jsx)(r.x,{className:`ic`})})]}),(0,l.jsx)(`div`,{className:`ov-dialog-body`,dangerouslySetInnerHTML:a(p)}),(0,l.jsxs)(`div`,{className:`ov-dialog-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>x(!1),children:h}),(0,l.jsx)(`button`,{type:`button`,className:`ov-btn solid`,onClick:()=>{C(!0),x(!1)},children:m})]})]})]})})]})}function d({title:e,icon:t=`alert`,iconColor:n=`var(--danger)`,trigger:i=`Delete project`,triggerIcon:o=`x`,description:u=`A destructive&#8209;action confirm with a warning badge, Cancel, and Confirm.`,heading:d=`Delete “Q3 Forecast”?`,body:f=`This permanently removes the project and all <strong>34 documents</strong> inside it. This action cannot be undone.`,alertIcon:p=`alert`,confirm:m=`Delete forever`,cancel:h=`Cancel`,color:g=`var(--danger)`,delay:_}){let v=r[t]||r.alert,y=r[o]||r.x,b=r[p]||r.alert,[x,S]=(0,c.useState)(!1),[C,w]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{if(!x)return;let e=e=>e.key===`Escape`&&S(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[x]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(_||0)+`ms`,"--ov-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger danger`+(C?` is-done`:``),onClick:()=>!C&&S(!0),children:[C?(0,l.jsx)(r.check,{className:`ic`}):(0,l.jsx)(y,{className:`ic`}),` `,C?`Deleted`:i]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(C?`Project deleted. <strong>34 documents</strong> removed.`:u)})]}),x&&(0,l.jsx)(s,{accent:g,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>S(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),S(!1))}}),(0,l.jsxs)(`div`,{className:`ov-dialog ov-alert`,role:`alertdialog`,"aria-modal":`true`,"aria-label":d,children:[(0,l.jsx)(`div`,{className:`ov-alert-badge`,children:(0,l.jsx)(b,{className:`ic`})}),(0,l.jsx)(`div`,{className:`ov-dialog-title ov-alert-title`,children:d}),(0,l.jsx)(`div`,{className:`ov-dialog-body ov-alert-body`,dangerouslySetInnerHTML:a(f)}),(0,l.jsxs)(`div`,{className:`ov-dialog-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>S(!1),children:h}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid danger`,onClick:()=>{w(!0),S(!1)},children:[(0,l.jsx)(r.x,{className:`ic`}),` `,m]})]})]})]})})]})}var f=[{label:`Status`,value:`In review`,icon:`clock`},{label:`Owner`,value:`Maya Chen`,icon:`mail`},{label:`Pages`,value:`24`,icon:`doc`},{label:`Last edited`,value:`2h ago`,icon:`edit`},{label:`Visibility`,value:`Team`,icon:`eye`},{label:`Sources`,value:`8 linked`,icon:`link`},{label:`Confidence`,value:`Strong`,icon:`shield`}];function p({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:o=`View details`,triggerIcon:u=`external`,description:d=`A right&#8209;side drawer slides in with a header, scrollable body, and footer.`,heading:p=`Q3 Forecast.pdf`,subhead:m=`Document properties`,rows:h=f,confirm:g=`Open document`,cancel:_=`Close`,color:v=`var(--presence)`,delay:y}){let b=r[t]||r.layers,x=r[u]||r.external,[S,C]=(0,c.useState)(!1),w=(0,c.useRef)(null);return i(w,{active:S}),(0,c.useEffect)(()=>{if(!S)return;let e=e=>{e.key===`Escape`&&C(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(y||0)+`ms`,"--ov-c":v},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(b,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>C(!0),children:[(0,l.jsx)(x,{className:`ic`}),` `,o]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(d)})]}),S&&(0,l.jsx)(s,{accent:v,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>C(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C(!1))}}),(0,l.jsxs)(`div`,{className:`ov-drawer`,ref:w,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":p,children:[(0,l.jsxs)(`div`,{className:`ov-drawer-head`,children:[(0,l.jsxs)(`div`,{className:`ov-drawer-titles`,children:[(0,l.jsx)(`div`,{className:`ov-drawer-sub`,children:m}),(0,l.jsx)(`div`,{className:`ov-drawer-title`,children:p})]}),(0,l.jsx)(`button`,{type:`button`,className:`ov-x`,"aria-label":`Close`,onClick:()=>C(!1),children:(0,l.jsx)(r.x,{className:`ic`})})]}),(0,l.jsx)(`div`,{className:`ov-drawer-body`,children:h.map(e=>{let t=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{className:`ov-drawer-row`,children:[(0,l.jsxs)(`span`,{className:`ov-drawer-row-l`,children:[t&&(0,l.jsx)(t,{className:`ic`}),` `,e.label]}),(0,l.jsx)(`span`,{className:`ov-drawer-row-v`,children:e.value})]},e.label)})}),(0,l.jsxs)(`div`,{className:`ov-drawer-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>C(!1),children:_}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid`,onClick:()=>C(!1),children:[(0,l.jsx)(r.external,{className:`ic`}),` `,g]})]})]})]})})]})}var m=[{label:`Copy link`,icon:`link`,meta:`Anyone with the link`},{label:`Share to team`,icon:`share`,meta:`12 members`,selected:!0},{label:`Email a copy`,icon:`mail`},{label:`Export as PDF`,icon:`export`}];function h({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,trigger:i=`Share`,triggerIcon:o=`share`,description:u=`A bottom sheet slides up with a grabber handle — mobile&#8209;style.`,heading:d=`Share this report`,subhead:f=`Choose how you want to send it`,options:p=m,color:h=`var(--presence)`,delay:g}){let _=r[t]||r.share,v=r[o]||r.share,[y,b]=(0,c.useState)(!1),x=Math.max(0,p.findIndex(e=>e.selected)),[S,C]=(0,c.useState)(x===-1?0:x);return(0,c.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&b(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>b(!0),children:[(0,l.jsx)(v,{className:`ic`}),` `,i]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(u)})]}),y&&(0,l.jsx)(s,{accent:h,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>b(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b(!1))}}),(0,l.jsxs)(`div`,{className:`ov-sheet`,role:`dialog`,"aria-modal":`true`,"aria-label":d,children:[(0,l.jsx)(`div`,{className:`ov-sheet-grab`}),(0,l.jsxs)(`div`,{className:`ov-sheet-head`,children:[(0,l.jsx)(`div`,{className:`ov-sheet-title`,children:d}),(0,l.jsx)(`div`,{className:`ov-sheet-sub`,children:f})]}),(0,l.jsx)(`div`,{className:`ov-sheet-list`,children:p.map((e,t)=>{let n=e.icon?r[e.icon]:r.chevR;return(0,l.jsxs)(`button`,{type:`button`,className:`ov-sheet-opt`+(S===t?` on`:``),onClick:()=>C(t),children:[(0,l.jsx)(`span`,{className:`ov-sheet-opt-ic`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`ov-sheet-opt-meta`,children:[(0,l.jsx)(`span`,{className:`ov-sheet-opt-label`,children:e.label}),e.meta&&(0,l.jsx)(`span`,{className:`ov-sheet-opt-sub`,children:e.meta})]}),(0,l.jsx)(`span`,{className:`ov-sheet-radio`,children:S===t&&(0,l.jsx)(r.check,{className:`ic`})})]},e.label)})}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid ov-sheet-cta`,onClick:()=>b(!1),children:[(0,l.jsx)(r.send,{className:`ic`}),` Continue`]})]})]})})]})}function g({title:e,icon:t=`bell`,iconColor:n=`var(--presence)`,trigger:i=`Notifications`,triggerIcon:o=`bell`,description:s=`An anchored panel opens beside the trigger with a pointer arrow.`,heading:u=`What's new`,body:d=`3 sources finished syncing and <strong>2 new findings</strong> are ready to review in your workspace.`,stat:f=`+2`,statLabel:p=`new findings`,action:m=`Review now`,color:h=`var(--presence)`,delay:g}){let _=r[t]||r.bell,v=r[o]||r.bell,[y,b]=(0,c.useState)(!1),x=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&b(!1),t=e=>{x.current&&!x.current.contains(e.target)&&b(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[y]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-anchor`,ref:x,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`+(y?` active`:``),"aria-expanded":y,onClick:()=>b(e=>!e),children:[(0,l.jsx)(v,{className:`ic`}),` `,i,(0,l.jsx)(`span`,{className:`ov-trigger-badge`,children:f})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)}),y&&(0,l.jsxs)(`div`,{className:`ov-pop`,role:`dialog`,"aria-label":u,children:[(0,l.jsx)(`div`,{className:`ov-pop-arrow`}),(0,l.jsx)(`div`,{className:`ov-pop-head`,children:u}),(0,l.jsxs)(`div`,{className:`ov-pop-stat`,children:[(0,l.jsx)(`span`,{className:`ov-pop-stat-val tab-num`,children:f}),(0,l.jsx)(`span`,{className:`ov-pop-stat-label`,children:p})]}),(0,l.jsx)(`div`,{className:`ov-pop-body`,dangerouslySetInnerHTML:a(d)}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-pop-action`,onClick:()=>b(!1),children:[m,` `,(0,l.jsx)(r.chevR,{className:`ic`})]})]})]})]})}var _=[{label:`Reports`,value:`47`},{label:`Sources`,value:`312`},{label:`Followers`,value:`1.2k`}];function v({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,mention:i=`@maya.chen`,lead:o=`Reviewed and approved by `,name:s=`Maya Chen`,handle:u=`@maya.chen`,bio:d=`Lead research analyst. Covers macro &amp; market intelligence for the strategy team.`,avatar:f=`MC`,stats:p=_,action:m=`Follow`,color:h=`var(--presence)`,delay:g}){let v=r[t]||r.chat,[y,b]=(0,c.useState)(!1),[x,S]=(0,c.useState)(!1),C=(0,c.useRef)(null),w=()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>b(!0),320)},T=()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>b(!1),140)};return(0,c.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`p`,{className:`ov-hc-lead`,children:[(0,l.jsx)(`span`,{dangerouslySetInnerHTML:a(o)}),(0,l.jsxs)(`span`,{className:`ov-hc-anchor`,onMouseEnter:w,onMouseLeave:T,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-mention`+(y?` active`:``),onClick:()=>b(e=>!e),children:i}),y&&(0,l.jsxs)(`span`,{className:`ov-hc-card`,role:`dialog`,"aria-label":s,onMouseEnter:w,onMouseLeave:T,children:[(0,l.jsxs)(`span`,{className:`ov-hc-top`,children:[(0,l.jsx)(`span`,{className:`ov-hc-avatar`,children:f}),(0,l.jsxs)(`span`,{className:`ov-hc-names`,children:[(0,l.jsx)(`span`,{className:`ov-hc-name`,children:s}),(0,l.jsx)(`span`,{className:`ov-hc-handle`,children:u})]}),(0,l.jsx)(`button`,{type:`button`,className:`ov-hc-follow`+(x?` on`:``),onClick:()=>S(e=>!e),children:x?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.check,{className:`ic`}),` Following`]}):m})]}),(0,l.jsx)(`span`,{className:`ov-hc-bio`,dangerouslySetInnerHTML:a(d)}),(0,l.jsx)(`span`,{className:`ov-hc-stats`,children:p.map(e=>(0,l.jsxs)(`span`,{className:`ov-hc-stat`,children:[(0,l.jsx)(`span`,{className:`ov-hc-stat-val tab-num`,children:e.value}),(0,l.jsx)(`span`,{className:`ov-hc-stat-label`,children:e.label})]},e.label))})]})]}),(0,l.jsx)(`span`,{children:` after a full source audit.`})]}),(0,l.jsx)(`p`,{className:`ov-desc ov-hc-hint`,children:`Hover the mention to preview the profile card.`})]})}var y=[{label:`Share`,icon:`share`,tip:`Share with your team`,placement:`top`},{label:`Export`,icon:`export`,tip:`Download as PDF or CSV`,placement:`bottom`},{label:`Sources`,icon:`link`,tip:`8 verified sources linked`,placement:`left`},{label:`Lock`,icon:`lock`,tip:`Restrict editing to owners`,placement:`right`}];function b({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,prompt:i=`Hover any control to see a placed tooltip.`,targets:o=y,color:s=`var(--presence)`,delay:u}){let d=r[t]||r.spark,[f,p]=(0,c.useState)(null);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--ov-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`p`,{className:`ov-desc ov-tip-prompt`,dangerouslySetInnerHTML:a(i)}),(0,l.jsx)(`div`,{className:`ov-tip-grid`,children:o.map((e,t)=>{let n=e.icon?r[e.icon]:r.spark,i=e.placement||`top`;return(0,l.jsxs)(`div`,{className:`ov-tip-cell`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-tip-target`+(f===t?` on`:``),onMouseEnter:()=>p(t),onMouseLeave:()=>p(e=>e===t?null:e),onFocus:()=>p(t),onBlur:()=>p(e=>e===t?null:e),children:[(0,l.jsx)(n,{className:`ic`}),(0,l.jsx)(`span`,{children:e.label})]}),f===t&&(0,l.jsxs)(`span`,{className:`ov-tip-bubble place-`+i,role:`tooltip`,children:[e.tip,(0,l.jsx)(`span`,{className:`ov-tip-arrow`})]})]},e.label)})})]})}var x=[{label:`Edit report`,icon:`edit`,shortcut:`⌘E`},{label:`Duplicate`,icon:`layers`,shortcut:`⌘D`},{label:`Add to favorites`,icon:`spark`},{label:`Share`,icon:`share`,shortcut:`⌘⇧S`,separator:!0},{label:`Export PDF`,icon:`export`},{label:`Delete`,icon:`x`,danger:!0,separator:!0}];function S({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:i=`Options`,triggerIcon:o=`plus`,description:s=`A dropdown menu with icons, shortcut hints, separators, and a destructive item.`,menuLabel:u=`Q3 Forecast.pdf`,items:d=x,color:f=`var(--presence)`,delay:p}){let m=r[t]||r.layers,h=r[o]||r.plus,[g,_]=(0,c.useState)(!1),[v,y]=(0,c.useState)(null),b=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!g)return;let e=e=>e.key===`Escape`&&_(!1),t=e=>{b.current&&!b.current.contains(e.target)&&_(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[g]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--ov-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-anchor`,ref:b,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`+(g?` active`:``),"aria-haspopup":`menu`,"aria-expanded":g,onClick:()=>_(e=>!e),children:[(0,l.jsx)(h,{className:`ic`}),` `,i,(0,l.jsx)(r.chevR,{className:`ic ov-trigger-caret`+(g?` up`:``)})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)}),g&&(0,l.jsxs)(`div`,{className:`ov-menu`,role:`menu`,children:[u&&(0,l.jsx)(`div`,{className:`ov-menu-label`,children:u}),d.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{children:[e.separator&&(0,l.jsx)(`div`,{className:`ov-menu-sep`}),(0,l.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`ov-menu-item`+(e.danger?` danger`:``)+(v===t?` on`:``),onMouseEnter:()=>y(t),onClick:()=>_(!1),children:[n&&(0,l.jsx)(n,{className:`ic ov-menu-ic`}),(0,l.jsx)(`span`,{className:`ov-menu-text`,children:e.label}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut})]})]},e.label)})]})]})]})}var C=196,w=[{label:`Open`,icon:`external`,shortcut:`↵`},{label:`Rename`,icon:`edit`,shortcut:`F2`},{label:`Copy link`,icon:`link`,shortcut:`⌘C`},{label:`Download`,icon:`export`,separator:!0},{label:`Move to trash`,icon:`x`,danger:!0,separator:!0}];function T({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,target:i=`Right-click this file`,targetIcon:o=`doc`,description:s=`Right&#8209;click (or click) the target to open a context menu at the pointer.`,items:u=w,color:d=`var(--presence)`,delay:f}){let p=r[t]||r.table,m=r[o]||r.doc,[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(null),y=(0,c.useRef)(null),b=e=>{e.preventDefault();let t=y.current?.getBoundingClientRect(),n=t?Math.min(e.clientX-t.left,t.width-C):12,r=t?e.clientY-t.top:12;g({x:Math.max(8,n),y:Math.max(8,r)})};return(0,c.useEffect)(()=>{if(!h)return;let e=e=>e.key===`Escape`&&g(null),t=e=>{let t=y.current?.querySelector(`.ov-ctx`);t&&!t.contains(e.target)&&g(null)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[h]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`,"--ov-c":d},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-ctx-host`,ref:y,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-ctx-zone`+(h?` active`:``),onContextMenu:b,onClick:b,children:[(0,l.jsx)(m,{className:`ic ov-ctx-zone-ic`}),(0,l.jsx)(`span`,{children:i})]}),h&&(0,l.jsx)(`div`,{className:`ov-ctx`,role:`menu`,style:{left:h.x,top:h.y,maxWidth:C},children:u.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{children:[e.separator&&(0,l.jsx)(`div`,{className:`ov-menu-sep`}),(0,l.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`ov-menu-item`+(e.danger?` danger`:``)+(_===t?` on`:``),onMouseEnter:()=>v(t),onClick:()=>g(null),children:[n&&(0,l.jsx)(n,{className:`ic ov-menu-ic`}),(0,l.jsx)(`span`,{className:`ov-menu-text`,style:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.label}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut})]})]},e.label)})})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)})]})}var E=[{label:`Actions`,commands:[{label:`New report`,icon:`plus`,shortcut:`⌘N`,hint:`Start a blank canvas`},{label:`Import sources`,icon:`upload`,shortcut:`⌘I`},{label:`Share workspace`,icon:`share`}]},{label:`Navigate`,commands:[{label:`Go to dashboard`,icon:`chart`,shortcut:`G D`},{label:`Open documents`,icon:`doc`,shortcut:`G O`},{label:`Search sources`,icon:`globe`}]},{label:`Preferences`,commands:[{label:`Toggle theme`,icon:`moon`,shortcut:`⌘\\`},{label:`Notification settings`,icon:`bell`}]}];function D({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,trigger:o=`Search commands`,triggerIcon:u=`spark`,description:d=`A ⌘K command palette — search, ↑/↓ to highlight, Enter to run.`,placeholder:f=`Type a command or search…`,groups:p=E,color:m=`var(--presence)`,delay:h}){let g=r[t]||r.spark,_=r[u]||r.spark,[v,y]=(0,c.useState)(!1),[b,x]=(0,c.useState)(``),[S,C]=(0,c.useState)(0),w=(0,c.useRef)(null),T=(0,c.useRef)(null);i(T,{active:v});let D=(0,c.useMemo)(()=>p.flatMap(e=>e.commands.map(t=>({...t,group:e.label}))),[p]),O=(0,c.useMemo)(()=>{let e=b.trim().toLowerCase();return e?D.filter(t=>t.label.toLowerCase().includes(e)||(t.hint||``).toLowerCase().includes(e)):D},[D,b]),k=(0,c.useMemo)(()=>{let e=new Map;for(let t of O)e.has(t.group)||e.set(t.group,[]),e.get(t.group).push(t);return Array.from(e.entries())},[O]);(0,c.useEffect)(()=>{if(v){C(0);let e=setTimeout(()=>w.current?.focus(),30);return()=>clearTimeout(e)}},[v]),(0,c.useEffect)(()=>C(0),[b]),(0,c.useEffect)(()=>{if(!v)return;let e=e=>{e.key===`Escape`?y(!1):e.key===`ArrowDown`?(e.preventDefault(),C(e=>Math.max(0,Math.min(O.length-1,e+1)))):e.key===`ArrowUp`?(e.preventDefault(),C(e=>Math.max(0,e-1))):e.key===`Enter`&&(e.preventDefault(),y(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v,O.length]);let A=-1;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h||0)+`ms`,"--ov-c":m},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger ov-ck-trigger`,onClick:()=>y(!0),children:[(0,l.jsx)(_,{className:`ic`}),` `,o,(0,l.jsx)(`kbd`,{className:`ov-kbd ov-ck-kbd`,children:`⌘K`})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(d)})]}),v&&(0,l.jsx)(s,{accent:m,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>y(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),y(!1))}}),(0,l.jsxs)(`div`,{className:`ov-ck`,ref:T,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,l.jsxs)(`div`,{className:`ov-ck-search`,children:[(0,l.jsx)(r.globe,{className:`ic ov-ck-search-ic`}),(0,l.jsx)(`input`,{ref:w,className:`ov-ck-input`,placeholder:f,value:b,onChange:e=>x(e.target.value),spellCheck:!1}),(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`esc`})]}),(0,l.jsxs)(`div`,{className:`ov-ck-list`,children:[k.length===0&&(0,l.jsxs)(`div`,{className:`ov-ck-empty`,children:[`No commands match “`,(0,l.jsx)(`strong`,{children:b}),`”`]}),k.map(([e,t])=>(0,l.jsxs)(`div`,{className:`ov-ck-group`,children:[(0,l.jsx)(`div`,{className:`ov-ck-group-label`,children:e}),t.map(e=>{A+=1;let t=A,n=e.icon?r[e.icon]:r.chevR;return(0,l.jsxs)(`button`,{type:`button`,className:`ov-ck-item`+(S===t?` on`:``),onMouseEnter:()=>C(t),onClick:()=>y(!1),children:[(0,l.jsx)(`span`,{className:`ov-ck-item-ic`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`ov-ck-item-meta`,children:[(0,l.jsx)(`span`,{className:`ov-ck-item-label`,children:e.label}),e.hint&&(0,l.jsx)(`span`,{className:`ov-ck-item-hint`,children:e.hint})]}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut}),(0,l.jsx)(r.chevR,{className:`ic ov-ck-item-go`})]},e.label)})]},e))]}),(0,l.jsxs)(`div`,{className:`ov-ck-foot`,children:[(0,l.jsxs)(`span`,{className:`ov-ck-foot-hint`,children:[(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↑`}),(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↓`}),` navigate`]}),(0,l.jsxs)(`span`,{className:`ov-ck-foot-hint`,children:[(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↵`}),` select`]}),(0,l.jsxs)(`span`,{className:`ov-ck-foot-count`,children:[O.length,` commands`]})]})]})]})})]})}var O=e({overlaysRegistry:()=>k}),k={modal:o(u),confirmdialog:o(d),drawer:o(p),sheet:o(h),popover:o(g),hovercard:o(v),tooltip:o(b),menu:o(S),contextmenu:o(T),commandk:o(D)};export{O as n,k as t};
1
+ import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{n as r}from"./icons-CHVz6kv_.js";import{t as i}from"./useFocusTrap-DbfG6zbM.js";import{t as a}from"./richText-BkxJhl9N.js";import{t as o}from"./registry-types-DMuK0vJ6.js";import{t as s}from"./portal-zyqZwnb1.js";var c=t(),l=n();function u({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:o=`Open dialog`,triggerIcon:u=`external`,description:d=`A centered modal dialog with a focus ring, backdrop, and Escape&#8209;to&#8209;close.`,heading:f=`Publish this version?`,body:p=`Publishing makes <strong>Revision 12</strong> the live version everyone sees. You can roll back to any earlier revision at any time.`,confirm:m=`Publish`,cancel:h=`Cancel`,color:g=`var(--presence)`,delay:_}){let v=r[t]||r.layers,y=r[u]||r.external,[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(!1),w=(0,c.useRef)(null);return i(w,{active:b}),(0,c.useEffect)(()=>{if(!b)return;let e=e=>{e.key===`Escape`&&x(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(_||0)+`ms`,"--ov-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>x(!0),children:[(0,l.jsx)(y,{className:`ic`}),` `,o]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(S?`Published — <strong>Revision 12</strong> is now live.`:d)})]}),b&&(0,l.jsx)(s,{accent:g,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>x(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),x(!1))}}),(0,l.jsxs)(`div`,{className:`ov-dialog`,ref:w,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":f,children:[(0,l.jsxs)(`div`,{className:`ov-dialog-head`,children:[(0,l.jsx)(`div`,{className:`ov-dialog-title`,children:f}),(0,l.jsx)(`button`,{type:`button`,className:`ov-x`,"aria-label":`Close`,onClick:()=>x(!1),children:(0,l.jsx)(r.x,{className:`ic`})})]}),(0,l.jsx)(`div`,{className:`ov-dialog-body`,dangerouslySetInnerHTML:a(p)}),(0,l.jsxs)(`div`,{className:`ov-dialog-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>x(!1),children:h}),(0,l.jsx)(`button`,{type:`button`,className:`ov-btn solid`,onClick:()=>{C(!0),x(!1)},children:m})]})]})]})})]})}function d({title:e,icon:t=`alert`,iconColor:n=`var(--danger)`,trigger:i=`Delete project`,triggerIcon:o=`x`,description:u=`A destructive&#8209;action confirm with a warning badge, Cancel, and Confirm.`,heading:d=`Delete “Q3 Forecast”?`,body:f=`This permanently removes the project and all <strong>34 documents</strong> inside it. This action cannot be undone.`,alertIcon:p=`alert`,confirm:m=`Delete forever`,cancel:h=`Cancel`,color:g=`var(--danger)`,delay:_}){let v=r[t]||r.alert,y=r[o]||r.x,b=r[p]||r.alert,[x,S]=(0,c.useState)(!1),[C,w]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{if(!x)return;let e=e=>e.key===`Escape`&&S(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[x]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(_||0)+`ms`,"--ov-c":g},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger danger`+(C?` is-done`:``),onClick:()=>!C&&S(!0),children:[C?(0,l.jsx)(r.check,{className:`ic`}):(0,l.jsx)(y,{className:`ic`}),` `,C?`Deleted`:i]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(C?`Project deleted. <strong>34 documents</strong> removed.`:u)})]}),x&&(0,l.jsx)(s,{accent:g,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>S(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),S(!1))}}),(0,l.jsxs)(`div`,{className:`ov-dialog ov-alert`,role:`alertdialog`,"aria-modal":`true`,"aria-label":d,children:[(0,l.jsx)(`div`,{className:`ov-alert-badge`,children:(0,l.jsx)(b,{className:`ic`})}),(0,l.jsx)(`div`,{className:`ov-dialog-title ov-alert-title`,children:d}),(0,l.jsx)(`div`,{className:`ov-dialog-body ov-alert-body`,dangerouslySetInnerHTML:a(f)}),(0,l.jsxs)(`div`,{className:`ov-dialog-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>S(!1),children:h}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid danger`,onClick:()=>{w(!0),S(!1)},children:[(0,l.jsx)(r.x,{className:`ic`}),` `,m]})]})]})]})})]})}var f=[{label:`Status`,value:`In review`,icon:`clock`},{label:`Owner`,value:`Maya Chen`,icon:`mail`},{label:`Pages`,value:`24`,icon:`doc`},{label:`Last edited`,value:`2h ago`,icon:`edit`},{label:`Visibility`,value:`Team`,icon:`eye`},{label:`Sources`,value:`8 linked`,icon:`link`},{label:`Confidence`,value:`Strong`,icon:`shield`}];function p({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:o=`View details`,triggerIcon:u=`external`,description:d=`A right&#8209;side drawer slides in with a header, scrollable body, and footer.`,heading:p=`Q3 Forecast.pdf`,subhead:m=`Document properties`,rows:h=f,confirm:g=`Open document`,cancel:_=`Close`,color:v=`var(--presence)`,delay:y}){let b=r[t]||r.layers,x=r[u]||r.external,[S,C]=(0,c.useState)(!1),w=(0,c.useRef)(null);return i(w,{active:S}),(0,c.useEffect)(()=>{if(!S)return;let e=e=>{e.key===`Escape`&&C(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(y||0)+`ms`,"--ov-c":v},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(b,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>C(!0),children:[(0,l.jsx)(x,{className:`ic`}),` `,o]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(d)})]}),S&&(0,l.jsx)(s,{accent:v,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>C(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C(!1))}}),(0,l.jsxs)(`div`,{className:`ov-drawer`,ref:w,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":p,children:[(0,l.jsxs)(`div`,{className:`ov-drawer-head`,children:[(0,l.jsxs)(`div`,{className:`ov-drawer-titles`,children:[(0,l.jsx)(`div`,{className:`ov-drawer-sub`,children:m}),(0,l.jsx)(`div`,{className:`ov-drawer-title`,children:p})]}),(0,l.jsx)(`button`,{type:`button`,className:`ov-x`,"aria-label":`Close`,onClick:()=>C(!1),children:(0,l.jsx)(r.x,{className:`ic`})})]}),(0,l.jsx)(`div`,{className:`ov-drawer-body`,children:h.map(e=>{let t=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{className:`ov-drawer-row`,children:[(0,l.jsxs)(`span`,{className:`ov-drawer-row-l`,children:[t&&(0,l.jsx)(t,{className:`ic`}),` `,e.label]}),(0,l.jsx)(`span`,{className:`ov-drawer-row-v`,children:e.value})]},e.label)})}),(0,l.jsxs)(`div`,{className:`ov-drawer-foot`,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-btn ghost`,onClick:()=>C(!1),children:_}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid`,onClick:()=>C(!1),children:[(0,l.jsx)(r.external,{className:`ic`}),` `,g]})]})]})]})})]})}var m=[{label:`Copy link`,icon:`link`,meta:`Anyone with the link`},{label:`Share to team`,icon:`share`,meta:`12 members`,selected:!0},{label:`Email a copy`,icon:`mail`},{label:`Export as PDF`,icon:`export`}];function h({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,trigger:i=`Share`,triggerIcon:o=`share`,description:u=`A bottom sheet slides up with a grabber handle — mobile&#8209;style.`,heading:d=`Share this report`,subhead:f=`Choose how you want to send it`,options:p=m,color:h=`var(--presence)`,delay:g}){let _=r[t]||r.share,v=r[o]||r.share,[y,b]=(0,c.useState)(!1),x=Math.max(0,p.findIndex(e=>e.selected)),[S,C]=(0,c.useState)(x===-1?0:x);return(0,c.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&b(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`,onClick:()=>b(!0),children:[(0,l.jsx)(v,{className:`ic`}),` `,i]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(u)})]}),y&&(0,l.jsx)(s,{accent:h,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>b(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b(!1))}}),(0,l.jsxs)(`div`,{className:`ov-sheet`,role:`dialog`,"aria-modal":`true`,"aria-label":d,children:[(0,l.jsx)(`div`,{className:`ov-sheet-grab`}),(0,l.jsxs)(`div`,{className:`ov-sheet-head`,children:[(0,l.jsx)(`div`,{className:`ov-sheet-title`,children:d}),(0,l.jsx)(`div`,{className:`ov-sheet-sub`,children:f})]}),(0,l.jsx)(`div`,{className:`ov-sheet-list`,children:p.map((e,t)=>{let n=e.icon?r[e.icon]:r.chevR;return(0,l.jsxs)(`button`,{type:`button`,className:`ov-sheet-opt`+(S===t?` on`:``),onClick:()=>C(t),children:[(0,l.jsx)(`span`,{className:`ov-sheet-opt-ic`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`ov-sheet-opt-meta`,children:[(0,l.jsx)(`span`,{className:`ov-sheet-opt-label`,children:e.label}),e.meta&&(0,l.jsx)(`span`,{className:`ov-sheet-opt-sub`,children:e.meta})]}),(0,l.jsx)(`span`,{className:`ov-sheet-radio`,children:S===t&&(0,l.jsx)(r.check,{className:`ic`})})]},e.label)})}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-btn solid ov-sheet-cta`,onClick:()=>b(!1),children:[(0,l.jsx)(r.send,{className:`ic`}),` Continue`]})]})]})})]})}function g({title:e,icon:t=`bell`,iconColor:n=`var(--presence)`,trigger:i=`Notifications`,triggerIcon:o=`bell`,description:s=`An anchored panel opens beside the trigger with a pointer arrow.`,heading:u=`What's new`,body:d=`3 sources finished syncing and <strong>2 new findings</strong> are ready to review in your workspace.`,stat:f=`+2`,statLabel:p=`new findings`,action:m=`Review now`,color:h=`var(--presence)`,delay:g}){let _=r[t]||r.bell,v=r[o]||r.bell,[y,b]=(0,c.useState)(!1),x=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&b(!1),t=e=>{x.current&&!x.current.contains(e.target)&&b(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[y]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-anchor`,ref:x,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`+(y?` active`:``),"aria-expanded":y,onClick:()=>b(e=>!e),children:[(0,l.jsx)(v,{className:`ic`}),` `,i,(0,l.jsx)(`span`,{className:`ov-trigger-badge`,children:f})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)}),y&&(0,l.jsxs)(`div`,{className:`ov-pop`,role:`dialog`,"aria-label":u,children:[(0,l.jsx)(`div`,{className:`ov-pop-arrow`}),(0,l.jsx)(`div`,{className:`ov-pop-head`,children:u}),(0,l.jsxs)(`div`,{className:`ov-pop-stat`,children:[(0,l.jsx)(`span`,{className:`ov-pop-stat-val tab-num`,children:f}),(0,l.jsx)(`span`,{className:`ov-pop-stat-label`,children:p})]}),(0,l.jsx)(`div`,{className:`ov-pop-body`,dangerouslySetInnerHTML:a(d)}),(0,l.jsxs)(`button`,{type:`button`,className:`ov-pop-action`,onClick:()=>b(!1),children:[m,` `,(0,l.jsx)(r.chevR,{className:`ic`})]})]})]})]})}var _=[{label:`Reports`,value:`47`},{label:`Sources`,value:`312`},{label:`Followers`,value:`1.2k`}];function v({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,mention:i=`@maya.chen`,lead:o=`Reviewed and approved by `,name:s=`Maya Chen`,handle:u=`@maya.chen`,bio:d=`Lead research analyst. Covers macro &amp; market intelligence for the strategy team.`,avatar:f=`MC`,stats:p=_,action:m=`Follow`,color:h=`var(--presence)`,delay:g}){let v=r[t]||r.chat,[y,b]=(0,c.useState)(!1),[x,S]=(0,c.useState)(!1),C=(0,c.useRef)(null),w=()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>b(!0),320)},T=()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>b(!1),140)};return(0,c.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--ov-c":h},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(v,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`p`,{className:`ov-hc-lead`,children:[(0,l.jsx)(`span`,{dangerouslySetInnerHTML:a(o)}),(0,l.jsxs)(`span`,{className:`ov-hc-anchor`,onMouseEnter:w,onMouseLeave:T,children:[(0,l.jsx)(`button`,{type:`button`,className:`ov-mention`+(y?` active`:``),onClick:()=>b(e=>!e),children:i}),y&&(0,l.jsxs)(`span`,{className:`ov-hc-card`,role:`dialog`,"aria-label":s,onMouseEnter:w,onMouseLeave:T,children:[(0,l.jsxs)(`span`,{className:`ov-hc-top`,children:[(0,l.jsx)(`span`,{className:`ov-hc-avatar`,children:f}),(0,l.jsxs)(`span`,{className:`ov-hc-names`,children:[(0,l.jsx)(`span`,{className:`ov-hc-name`,children:s}),(0,l.jsx)(`span`,{className:`ov-hc-handle`,children:u})]}),(0,l.jsx)(`button`,{type:`button`,className:`ov-hc-follow`+(x?` on`:``),onClick:()=>S(e=>!e),children:x?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.check,{className:`ic`}),` Following`]}):m})]}),(0,l.jsx)(`span`,{className:`ov-hc-bio`,dangerouslySetInnerHTML:a(d)}),(0,l.jsx)(`span`,{className:`ov-hc-stats`,children:p.map(e=>(0,l.jsxs)(`span`,{className:`ov-hc-stat`,children:[(0,l.jsx)(`span`,{className:`ov-hc-stat-val tab-num`,children:e.value}),(0,l.jsx)(`span`,{className:`ov-hc-stat-label`,children:e.label})]},e.label))})]})]}),(0,l.jsx)(`span`,{children:` after a full source audit.`})]}),(0,l.jsx)(`p`,{className:`ov-desc ov-hc-hint`,children:`Hover the mention to preview the profile card.`})]})}var y=[{label:`Share`,icon:`share`,tip:`Share with your team`,placement:`top`},{label:`Export`,icon:`export`,tip:`Download as PDF or CSV`,placement:`bottom`},{label:`Sources`,icon:`link`,tip:`8 verified sources linked`,placement:`left`},{label:`Lock`,icon:`lock`,tip:`Restrict editing to owners`,placement:`right`}];function b({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,prompt:i=`Hover any control to see a placed tooltip.`,targets:o=y,color:s=`var(--presence)`,delay:u}){let d=r[t]||r.spark,[f,p]=(0,c.useState)(null);return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(u||0)+`ms`,"--ov-c":s},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsx)(`p`,{className:`ov-desc ov-tip-prompt`,dangerouslySetInnerHTML:a(i)}),(0,l.jsx)(`div`,{className:`ov-tip-grid`,children:o.map((e,t)=>{let n=e.icon?r[e.icon]:r.spark,i=e.placement||`top`;return(0,l.jsxs)(`div`,{className:`ov-tip-cell`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-tip-target`+(f===t?` on`:``),onMouseEnter:()=>p(t),onMouseLeave:()=>p(e=>e===t?null:e),onFocus:()=>p(t),onBlur:()=>p(e=>e===t?null:e),children:[(0,l.jsx)(n,{className:`ic`}),(0,l.jsx)(`span`,{children:e.label})]}),f===t&&(0,l.jsxs)(`span`,{className:`ov-tip-bubble place-`+i,role:`tooltip`,children:[e.tip,(0,l.jsx)(`span`,{className:`ov-tip-arrow`})]})]},e.label)})})]})}var x=[{label:`Edit report`,icon:`edit`,shortcut:`⌘E`},{label:`Duplicate`,icon:`layers`,shortcut:`⌘D`},{label:`Add to favorites`,icon:`spark`},{label:`Share`,icon:`share`,shortcut:`⌘⇧S`,separator:!0},{label:`Export PDF`,icon:`export`},{label:`Delete`,icon:`x`,danger:!0,separator:!0}];function S({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,trigger:i=`Options`,triggerIcon:o=`plus`,description:s=`A dropdown menu with icons, shortcut hints, separators, and a destructive item.`,menuLabel:u=`Q3 Forecast.pdf`,items:d=x,color:f=`var(--presence)`,delay:p}){let m=r[t]||r.layers,h=r[o]||r.plus,[g,_]=(0,c.useState)(!1),[v,y]=(0,c.useState)(null),b=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!g)return;let e=e=>e.key===`Escape`&&_(!1),t=e=>{b.current&&!b.current.contains(e.target)&&_(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[g]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`,"--ov-c":f},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-anchor`,ref:b,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger`+(g?` active`:``),"aria-haspopup":`menu`,"aria-expanded":g,onClick:()=>_(e=>!e),children:[(0,l.jsx)(h,{className:`ic`}),` `,i,(0,l.jsx)(r.chevR,{className:`ic ov-trigger-caret`+(g?` up`:``)})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)}),g&&(0,l.jsxs)(`div`,{className:`ov-menu`,role:`menu`,children:[u&&(0,l.jsx)(`div`,{className:`ov-menu-label`,children:u}),d.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{children:[e.separator&&(0,l.jsx)(`div`,{className:`ov-menu-sep`}),(0,l.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`ov-menu-item`+(e.danger?` danger`:``)+(v===t?` on`:``),onMouseEnter:()=>y(t),onClick:()=>_(!1),children:[n&&(0,l.jsx)(n,{className:`ic ov-menu-ic`}),(0,l.jsx)(`span`,{className:`ov-menu-text`,children:e.label}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut})]})]},e.label)})]})]})]})}var C=196,w=[{label:`Open`,icon:`external`,shortcut:`↵`},{label:`Rename`,icon:`edit`,shortcut:`F2`},{label:`Copy link`,icon:`link`,shortcut:`⌘C`},{label:`Download`,icon:`export`,separator:!0},{label:`Move to trash`,icon:`x`,danger:!0,separator:!0}];function T({title:e,icon:t=`table`,iconColor:n=`var(--presence)`,target:i=`Right-click this file`,targetIcon:o=`doc`,description:s=`Right&#8209;click (or click) the target to open a context menu at the pointer.`,items:u=w,color:d=`var(--presence)`,delay:f}){let p=r[t]||r.table,m=r[o]||r.doc,[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(null),y=(0,c.useRef)(null),b=e=>{e.preventDefault();let t=y.current?.getBoundingClientRect(),n=t?Math.min(e.clientX-t.left,t.width-C):12,r=t?e.clientY-t.top:12;g({x:Math.max(8,n),y:Math.max(8,r)})};return(0,c.useEffect)(()=>{if(!h)return;let e=e=>e.key===`Escape`&&g(null),t=e=>{let t=y.current?.querySelector(`.ov-ctx`);t&&!t.contains(e.target)&&g(null)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[h]),(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(f||0)+`ms`,"--ov-c":d},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(p,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-ctx-host`,ref:y,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-ctx-zone`+(h?` active`:``),onContextMenu:b,onClick:b,children:[(0,l.jsx)(m,{className:`ic ov-ctx-zone-ic`}),(0,l.jsx)(`span`,{children:i})]}),h&&(0,l.jsx)(`div`,{className:`ov-ctx`,role:`menu`,style:{left:h.x,top:h.y,maxWidth:C},children:u.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,l.jsxs)(`div`,{children:[e.separator&&(0,l.jsx)(`div`,{className:`ov-menu-sep`}),(0,l.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`ov-menu-item`+(e.danger?` danger`:``)+(_===t?` on`:``),onMouseEnter:()=>v(t),onClick:()=>g(null),children:[n&&(0,l.jsx)(n,{className:`ic ov-menu-ic`}),(0,l.jsx)(`span`,{className:`ov-menu-text`,style:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.label}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut})]})]},e.label)})})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(s)})]})}var E=[{label:`Actions`,commands:[{label:`New report`,icon:`plus`,shortcut:`⌘N`,hint:`Start a blank canvas`},{label:`Import sources`,icon:`upload`,shortcut:`⌘I`},{label:`Share workspace`,icon:`share`}]},{label:`Navigate`,commands:[{label:`Go to dashboard`,icon:`chart`,shortcut:`G D`},{label:`Open documents`,icon:`doc`,shortcut:`G O`},{label:`Search sources`,icon:`globe`}]},{label:`Preferences`,commands:[{label:`Toggle theme`,icon:`moon`,shortcut:`⌘\\`},{label:`Notification settings`,icon:`bell`}]}];function D({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,trigger:o=`Search commands`,triggerIcon:u=`spark`,description:d=`A ⌘K command palette — search, ↑/↓ to highlight, Enter to run.`,placeholder:f=`Type a command or search…`,groups:p=E,color:m=`var(--presence)`,delay:h}){let g=r[t]||r.spark,_=r[u]||r.spark,[v,y]=(0,c.useState)(!1),[b,x]=(0,c.useState)(``),[S,C]=(0,c.useState)(0),w=(0,c.useRef)(null),T=(0,c.useRef)(null);i(T,{active:v});let D=(0,c.useMemo)(()=>p.flatMap(e=>e.commands.map(t=>({...t,group:e.label}))),[p]),O=(0,c.useMemo)(()=>{let e=b.trim().toLowerCase();return e?D.filter(t=>t.label.toLowerCase().includes(e)||(t.hint||``).toLowerCase().includes(e)):D},[D,b]),k=(0,c.useMemo)(()=>{let e=new Map;for(let t of O)e.has(t.group)||e.set(t.group,[]),e.get(t.group).push(t);return Array.from(e.entries())},[O]);(0,c.useEffect)(()=>{if(v){C(0);let e=setTimeout(()=>w.current?.focus(),30);return()=>clearTimeout(e)}},[v]),(0,c.useEffect)(()=>C(0),[b]),(0,c.useEffect)(()=>{if(!v)return;let e=e=>{e.key===`Escape`?y(!1):e.key===`ArrowDown`?(e.preventDefault(),C(e=>Math.max(0,Math.min(O.length-1,e+1)))):e.key===`ArrowUp`?(e.preventDefault(),C(e=>Math.max(0,e-1))):e.key===`Enter`&&(e.preventDefault(),y(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v,O.length]);let A=-1;return(0,l.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(h||0)+`ms`,"--ov-c":m},children:[(0,l.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,l.jsx)(g,{className:`ic`,style:{color:n}}),` `,e]}),(0,l.jsxs)(`div`,{className:`ov-trigger-wrap`,children:[(0,l.jsxs)(`button`,{type:`button`,className:`ov-trigger ov-ck-trigger`,onClick:()=>y(!0),children:[(0,l.jsx)(_,{className:`ic`}),` `,o,(0,l.jsx)(`kbd`,{className:`ov-kbd ov-ck-kbd`,children:`⌘K`})]}),(0,l.jsx)(`p`,{className:`ov-desc`,dangerouslySetInnerHTML:a(d)})]}),v&&(0,l.jsx)(s,{accent:m,children:(0,l.jsxs)(`div`,{className:`ov-portal`,children:[(0,l.jsx)(`div`,{className:`ov-backdrop`,onClick:()=>y(!1),role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),y(!1))}}),(0,l.jsxs)(`div`,{className:`ov-ck`,ref:T,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,l.jsxs)(`div`,{className:`ov-ck-search`,children:[(0,l.jsx)(r.globe,{className:`ic ov-ck-search-ic`}),(0,l.jsx)(`input`,{ref:w,className:`ov-ck-input`,placeholder:f,value:b,onChange:e=>x(e.target.value),spellCheck:!1}),(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`esc`})]}),(0,l.jsxs)(`div`,{className:`ov-ck-list`,children:[k.length===0&&(0,l.jsxs)(`div`,{className:`ov-ck-empty`,children:[`No commands match “`,(0,l.jsx)(`strong`,{children:b}),`”`]}),k.map(([e,t])=>(0,l.jsxs)(`div`,{className:`ov-ck-group`,children:[(0,l.jsx)(`div`,{className:`ov-ck-group-label`,children:e}),t.map(e=>{A+=1;let t=A,n=e.icon?r[e.icon]:r.chevR;return(0,l.jsxs)(`button`,{type:`button`,className:`ov-ck-item`+(S===t?` on`:``),onMouseEnter:()=>C(t),onClick:()=>y(!1),children:[(0,l.jsx)(`span`,{className:`ov-ck-item-ic`,children:(0,l.jsx)(n,{className:`ic`})}),(0,l.jsxs)(`span`,{className:`ov-ck-item-meta`,children:[(0,l.jsx)(`span`,{className:`ov-ck-item-label`,children:e.label}),e.hint&&(0,l.jsx)(`span`,{className:`ov-ck-item-hint`,children:e.hint})]}),e.shortcut&&(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:e.shortcut}),(0,l.jsx)(r.chevR,{className:`ic ov-ck-item-go`})]},e.label)})]},e))]}),(0,l.jsxs)(`div`,{className:`ov-ck-foot`,children:[(0,l.jsxs)(`span`,{className:`ov-ck-foot-hint`,children:[(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↑`}),(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↓`}),` navigate`]}),(0,l.jsxs)(`span`,{className:`ov-ck-foot-hint`,children:[(0,l.jsx)(`kbd`,{className:`ov-kbd`,children:`↵`}),` select`]}),(0,l.jsxs)(`span`,{className:`ov-ck-foot-count`,children:[O.length,` commands`]})]})]})]})})]})}var O=e({overlaysRegistry:()=>k}),k={modal:o(u),confirmdialog:o(d),drawer:o(p),sheet:o(h),popover:o(g),hovercard:o(v),tooltip:o(b),menu:o(S),contextmenu:o(T),commandk:o(D)};export{O as n,k as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-C7H7A1rW.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import{r as o}from"./format-DlZTyeMy.js";import{a as s,r as c}from"./scale-Bcgfo6Hp.js";import"./lib-C7zXL8h0.js";import{t as l}from"./registry-types-DMuK0vJ6.js";var u=t(),d=n();function f({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,steps:r,conclusion:o,footer:s,delay:c}){let l=i[t]||i.sparkle,[f,p]=(0,u.useState)(0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-cot`,children:r.map((e,t)=>{let n=f===t;return(0,d.jsxs)(`div`,{className:`ai-cot-step`+(n?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-cot-head`,onClick:()=>p(n?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-cot-dot`,children:(0,d.jsx)(`span`,{children:t+1})}),(0,d.jsxs)(`span`,{className:`ai-cot-body`,children:[(0,d.jsxs)(`span`,{className:`ai-cot-label`,children:[e.label,e.tag&&(0,d.jsx)(`span`,{className:`ai-tag`,style:{"--c":e.tagColor||`var(--presence)`},children:e.tag})]}),(0,d.jsx)(`span`,{className:`ai-cot-summary`,children:e.summary})]}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(n?` is-open`:``)})]}),n&&e.detail&&(0,d.jsx)(`div`,{className:`ai-cot-detail`,dangerouslySetInnerHTML:a(e.detail)})]},t)})}),o&&(0,d.jsxs)(`div`,{className:`ai-cot-conclusion`,children:[(0,d.jsx)(i.check,{className:`ic`}),(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(o)})]}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var p={ok:{c:`var(--insight)`,label:`OK`},error:{c:`var(--danger)`,label:`ERR`},pending:{c:`var(--warning)`,label:`RUNNING`}};function m({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,calls:r,footer:o,delay:s}){let c=i[t]||i.layers,[l,f]=(0,u.useState)(0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-tc`,children:r.map((e,t)=>{let r=l===t,a=p[e.status||`ok`]||p.ok;return(0,d.jsxs)(`div`,{className:`ai-tc-call`+(r?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-tc-head`,onClick:()=>f(r?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-tc-conn`,"aria-hidden":!0}),(0,d.jsx)(`span`,{className:`ai-tc-verb mono`,style:{color:n},children:e.verb||`call`}),(0,d.jsx)(`span`,{className:`ai-tc-name mono`,children:e.name}),(0,d.jsx)(`span`,{className:`ai-tc-spacer`}),typeof e.ms==`number`&&(0,d.jsxs)(`span`,{className:`ai-tc-ms tab-num`,children:[e.ms,`ms`]}),(0,d.jsx)(`span`,{className:`ai-tc-status`,style:{"--c":a.c},children:a.label}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(r?` is-open`:``)})]}),r&&(0,d.jsxs)(`div`,{className:`ai-tc-detail`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane-label`,children:[(0,d.jsx)(i.arrowUp,{className:`ic`}),` Request`]}),(0,d.jsx)(`pre`,{className:`ai-tc-code mono`,children:e.request})]}),(0,d.jsxs)(`div`,{className:`ai-tc-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane-label`,children:[(0,d.jsx)(i.arrowDown,{className:`ic`,style:{color:a.c}}),` Response`]}),(0,d.jsx)(`pre`,{className:`ai-tc-code mono`,children:e.response})]})]})]},t)})}),o&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function h({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,nodes:r,footer:o,delay:s}){let c=i[t]||i.share,[l,f]=(0,u.useState)(!1);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(c,{className:`ic`,style:{color:n}}),` `,e,(0,d.jsxs)(`button`,{className:`ai-at-toggle`+(l?` is-on`:``),onClick:()=>f(e=>!e),children:[(0,d.jsx)(i.layers,{className:`ic`}),` `,l?`Explored`:`Chosen path`]})]}),(0,d.jsx)(`div`,{className:`ai-at`,children:r.map((e,t)=>{let n=l?e.branches:e.branches.filter(e=>e.chosen);return(0,d.jsxs)(`div`,{className:`ai-at-node`,children:[(0,d.jsxs)(`div`,{className:`ai-at-step`,children:[(0,d.jsx)(`span`,{className:`ai-at-rail`,"aria-hidden":!0}),(0,d.jsx)(`span`,{className:`ai-at-stepnum tab-num`,children:t+1}),(0,d.jsxs)(`div`,{className:`ai-at-decision`,children:[(0,d.jsx)(`div`,{className:`ai-at-step-label`,children:e.step}),(0,d.jsx)(`div`,{className:`ai-at-step-q`,children:e.decision})]})]}),(0,d.jsx)(`div`,{className:`ai-at-branches`,children:n.map((e,t)=>{let n=e.chosen?e.color||`var(--insight)`:`var(--text-muted)`;return(0,d.jsxs)(`div`,{className:`ai-at-branch`+(e.chosen?` is-chosen`:` is-alt`),style:{"--c":n},children:[(0,d.jsx)(`span`,{className:`ai-at-branch-mark`,children:e.chosen?(0,d.jsx)(i.check,{className:`ic`}):(0,d.jsx)(i.x,{className:`ic`})}),(0,d.jsx)(`span`,{className:`ai-at-branch-label`,children:e.label}),e.note&&(0,d.jsx)(`span`,{className:`ai-at-branch-note`,children:e.note}),typeof e.score==`number`&&(0,d.jsx)(`span`,{className:`ai-at-branch-score tab-num`,children:Math.round(e.score*100)})]},t)})})]},t)})}),o&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function g({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,prompt:r,outputs:o,footer:s,delay:c}){let l=i[t]||i.layers,[f,p]=(0,u.useState)(new Set),[m,h]=(0,u.useState)(!0),g=e=>p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):o.length-n.size>1&&n.add(e),n}),_=o.filter((e,t)=>!f.has(t));return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e,(0,d.jsxs)(`button`,{className:`ai-at-toggle`+(m?` is-on`:``),onClick:()=>h(e=>!e),children:[(0,d.jsx)(i.eye,{className:`ic`}),` Diff`]})]}),r&&(0,d.jsxs)(`div`,{className:`ai-mc-prompt`,children:[(0,d.jsx)(`span`,{className:`ai-mc-prompt-tag`,children:`PROMPT`}),` `,r]}),(0,d.jsx)(`div`,{className:`ai-mc-tabs`,children:o.map((e,t)=>{let n=!f.has(t),r=e.color||`var(--presence)`;return(0,d.jsxs)(`button`,{className:`ai-mc-tab`+(n?` is-on`:``),style:{"--c":r},onClick:()=>g(t),children:[(0,d.jsx)(`span`,{className:`ai-mc-dot`}),e.model,e.best&&(0,d.jsx)(i.check,{className:`ai-mc-best`})]},t)})}),(0,d.jsx)(`div`,{className:`ai-mc-grid`+(m?``:` no-diff`),style:{"--cols":String(_.length)},children:o.map((e,t)=>f.has(t)?null:(0,d.jsxs)(`div`,{className:`ai-mc-col`+(e.best?` is-best`:``),style:{"--c":e.color||`var(--presence)`},children:[(0,d.jsxs)(`div`,{className:`ai-mc-col-head`,children:[(0,d.jsx)(`span`,{className:`ai-mc-dot`}),(0,d.jsx)(`span`,{className:`ai-mc-model`,children:e.model}),e.badge&&(0,d.jsx)(`span`,{className:`ai-mc-badge`,children:e.badge})]}),(0,d.jsx)(`div`,{className:`ai-mc-text`,dangerouslySetInnerHTML:a(e.text)}),e.meta&&e.meta.length>0&&(0,d.jsx)(`div`,{className:`ai-mc-meta`,children:e.meta.map((e,t)=>(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:e.k}),` `,(0,d.jsx)(`span`,{className:`tab-num`,children:e.v})]},t))})]},t))}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function _(e){return e>=.85?`var(--insight)`:e>=.6?`var(--presence)`:e>=.4?`var(--warning)`:`var(--danger)`}function v({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,prefix:r,tokens:o,footer:s,delay:c}){let l=i[t]||i.spark,[f,p]=(0,u.useState)(null),m=f==null?null:o[f];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-ts-stream`,children:[r&&(0,d.jsx)(`span`,{className:`ai-ts-prefix`,children:r}),o.map((e,t)=>{let n=_(e.p);return(0,d.jsx)(`span`,{className:`ai-ts-tok`+(f===t?` is-on`:``),style:{"--c":n,"--a":String(.1+e.p*.32)},onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),children:e.text},t)})]}),(0,d.jsx)(`div`,{className:`ai-ts-readout`,children:m?(0,d.jsxs)(`div`,{className:`ai-ts-pop`,children:[(0,d.jsxs)(`div`,{className:`ai-ts-pop-head`,children:[(0,d.jsx)(`span`,{className:`ai-ts-pop-tok mono`,children:m.text.trim()||`␣`}),(0,d.jsxs)(`span`,{className:`ai-ts-pop-p tab-num`,style:{color:_(m.p)},children:[(m.p*100).toFixed(1),`%`]})]}),(0,d.jsx)(`div`,{className:`ai-ts-bar`,children:(0,d.jsx)(`span`,{style:{width:`${m.p*100}%`,background:_(m.p)}})}),m.alts&&m.alts.length>0&&(0,d.jsxs)(`div`,{className:`ai-ts-alts`,children:[(0,d.jsx)(`span`,{className:`faint`,children:`alternatives`}),m.alts.map((e,t)=>(0,d.jsxs)(`span`,{className:`ai-ts-alt`,children:[(0,d.jsx)(`span`,{className:`mono`,children:e.t.trim()||`␣`}),(0,d.jsxs)(`span`,{className:`tab-num faint`,children:[(e.p*100).toFixed(0),`%`]})]},t))]})]}):(0,d.jsxs)(`span`,{className:`faint`,children:[(0,d.jsx)(i.eye,{className:`ic`,style:{verticalAlign:`-2px`,width:14,height:14}}),` `,`Hover a token to see its probability and top alternatives`]})}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function y(e){return e>=.8?`var(--insight)`:e>=.6?`var(--presence)`:e>=.4?`var(--warning)`:`var(--text-muted)`}function b({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,query:r,chunks:o,footer:s,delay:c}){let l=i[t]||i.layers,f=o.map((e,t)=>({c:e,i:t})).sort((e,t)=>t.c.score-e.c.score),[p,m]=(0,u.useState)(f.length?f[0].i:-1);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,d.jsxs)(`div`,{className:`ai-rt-query`,children:[(0,d.jsx)(i.spark,{className:`ic`,style:{color:n}}),` `,(0,d.jsx)(`span`,{children:r})]}),(0,d.jsx)(`div`,{className:`ai-rt`,children:f.map(({c:e,i:t},n)=>{let r=p===t,o=y(e.score);return(0,d.jsxs)(`div`,{className:`ai-rt-chunk`+(r?` is-open`:``),style:{"--c":o},children:[(0,d.jsxs)(`button`,{className:`ai-rt-head`,onClick:()=>m(r?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-rt-rank tab-num`,children:n+1}),(0,d.jsxs)(`span`,{className:`ai-rt-body`,children:[(0,d.jsxs)(`span`,{className:`ai-rt-source`,children:[(0,d.jsx)(i.doc,{className:`ic`}),` `,e.source,e.used&&(0,d.jsx)(`span`,{className:`ai-rt-used`,children:`used`}),e.tag&&(0,d.jsx)(`span`,{className:`ai-tag`,style:{"--c":e.tagColor||`var(--presence)`},children:e.tag})]}),(0,d.jsx)(`span`,{className:`ai-rt-snippet`,children:e.snippet})]}),(0,d.jsxs)(`span`,{className:`ai-rt-score`,children:[(0,d.jsx)(`span`,{className:`ai-rt-meter`,children:(0,d.jsx)(`span`,{style:{width:`${e.score*100}%`,background:o}})}),(0,d.jsx)(`span`,{className:`tab-num`,style:{color:o},children:e.score.toFixed(2)})]}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(r?` is-open`:``)})]}),r&&e.body&&(0,d.jsx)(`div`,{className:`ai-rt-detail`,dangerouslySetInnerHTML:a(e.body)})]},t)})}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function x({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,beforeLabel:r=`Before`,afterLabel:o=`After`,before:s,after:c,diff:l,footer:f,delay:p}){let m=i[t]||i.edit,[h,g]=(0,u.useState)(`diff`),_=l.filter(e=>e.t===`add`).length,v=l.filter(e=>e.t===`del`).length;return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-wc-seg`,children:[(0,d.jsx)(`button`,{className:`ai-wc-seg-btn`+(h===`before`?` is-on`:``),onClick:()=>g(`before`),children:r}),(0,d.jsx)(`button`,{className:`ai-wc-seg-btn`+(h===`after`?` is-on`:``),onClick:()=>g(`after`),children:o}),(0,d.jsxs)(`button`,{className:`ai-wc-seg-btn`+(h===`diff`?` is-on`:``),onClick:()=>g(`diff`),children:[`Diff`,` `,(0,d.jsxs)(`span`,{className:`ai-wc-count`,children:[(0,d.jsxs)(`span`,{className:`ai-wc-add`,children:[`+`,_]}),` `,(0,d.jsxs)(`span`,{className:`ai-wc-del`,children:[`−`,v]})]})]})]}),h===`before`&&(0,d.jsx)(`div`,{className:`ai-wc-prose ai-wc-old`,dangerouslySetInnerHTML:a(s)}),h===`after`&&(0,d.jsx)(`div`,{className:`ai-wc-prose ai-wc-new`,dangerouslySetInnerHTML:a(c)}),h===`diff`&&(0,d.jsx)(`div`,{className:`ai-wc-diff`,children:l.map((e,t)=>(0,d.jsxs)(`div`,{className:`ai-wc-line `+(e.t||`ctx`),children:[(0,d.jsx)(`span`,{className:`ai-wc-gutter`,children:e.t===`add`?`+`:e.t===`del`?`−`:``}),(0,d.jsx)(`span`,{className:`ai-wc-content`,dangerouslySetInnerHTML:a(e.c)})]},t))}),f&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}function S({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,query:r,classifier:o=`router`,choices:s,footer:c,delay:l}){let f=i[t]||i.share,[p,m]=(0,u.useState)(Math.max(0,s.findIndex(e=>e.taken))),h=s[p];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-ro`,children:[(0,d.jsxs)(`div`,{className:`ai-ro-source`,children:[r&&(0,d.jsx)(`div`,{className:`ai-ro-query`,children:r}),(0,d.jsxs)(`div`,{className:`ai-ro-classifier`,children:[(0,d.jsx)(i.sparkle,{className:`ic`,style:{color:n}}),` `,o]})]}),(0,d.jsx)(`svg`,{role:`img`,"aria-label":e,className:`ai-ro-wires`,viewBox:`0 0 40 100`,preserveAspectRatio:`none`,"aria-hidden":!0,children:s.map((e,t)=>{let n=(t+.5)/s.length*100,r=e.taken;return(0,d.jsx)(`path`,{d:`M0 50 C 20 50, 20 ${n}, 40 ${n}`,fill:`none`,stroke:r?e.color||`var(--insight)`:`var(--grid-strong)`,strokeWidth:r?2.4:1.4,strokeDasharray:r?`0`:`3 3`},t)})}),(0,d.jsx)(`div`,{className:`ai-ro-choices`,children:s.map((e,t)=>{let n=e.color||(e.taken?`var(--insight)`:`var(--text-muted)`);return(0,d.jsxs)(`button`,{className:`ai-ro-choice`+(e.taken?` is-taken`:``)+(p===t?` is-sel`:``),style:{"--c":n},onClick:()=>m(t),children:[(0,d.jsxs)(`span`,{className:`ai-ro-choice-top`,children:[(0,d.jsx)(`span`,{className:`ai-ro-choice-label`,children:e.label}),e.taken&&(0,d.jsx)(`span`,{className:`ai-ro-taken`,children:(0,d.jsx)(i.check,{className:`ic`})})]}),e.sub&&(0,d.jsx)(`span`,{className:`ai-ro-choice-sub`,children:e.sub}),typeof e.score==`number`&&(0,d.jsx)(`span`,{className:`ai-ro-choice-meter`,children:(0,d.jsx)(`span`,{style:{width:`${e.score*100}%`,background:n}})})]},t)})})]}),h&&h.reason&&(0,d.jsxs)(`div`,{className:`ai-ro-reason`,style:{"--c":h.color||(h.taken?`var(--insight)`:`var(--presence)`)},children:[(0,d.jsx)(i.quote,{className:`ic`}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`strong`,{children:h.label}),` —`,` `,(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(h.reason)})]})]}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var C=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--danger)`];function w({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,clusters:r,points:o,footer:s,delay:c}){let l=i[t]||i.globe,[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(null),g=e=>r[e]?.color||C[e%C.length],_=e=>14+e*512,v=e=>14+(1-e)*272,y=f==null?null:o[f];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-em-legend`,children:r.map((e,t)=>(0,d.jsxs)(`button`,{className:`ai-em-leg`+(m===t?` is-on`:``)+(m!=null&&m!==t?` muted`:``),onClick:()=>h(m===t?null:t),children:[(0,d.jsx)(`span`,{className:`ai-em-swatch`,style:{background:g(t)}}),e.name]},t))}),(0,d.jsx)(`div`,{className:`ai-em-wrap`,children:(0,d.jsxs)(`svg`,{role:`img`,"aria-label":e,viewBox:`0 0 540 300`,width:`100%`,className:`ai-em-svg`,style:{display:`block`},children:[[.25,.5,.75].map(e=>(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:_(e),y1:14,x2:_(e),y2:286,stroke:`var(--grid-line)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:14,y1:v(e),x2:526,y2:v(e),stroke:`var(--grid-line)`,strokeWidth:`1`})]},e)),o.map((e,t)=>{let n=g(e.cluster),r=m!=null&&m!==e.cluster,a=f===t;return e.query?(0,d.jsxs)(`g`,{onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),style:{cursor:`pointer`},children:[(0,d.jsx)(`circle`,{cx:_(e.x),cy:v(e.y),r:a?11:9,fill:`none`,stroke:`var(--presence)`,strokeWidth:`2`,opacity:r?.3:1}),(0,d.jsx)(i.spark,{x:_(e.x)-6,y:v(e.y)-6,width:`12`,height:`12`,style:{color:`var(--presence)`,opacity:r?.3:1}})]},t):(0,d.jsx)(`circle`,{cx:_(e.x),cy:v(e.y),r:a?7:4.5,fill:n,opacity:r?.18:a?1:.82,stroke:a?`var(--text-primary)`:`transparent`,strokeWidth:a?1.5:0,onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),style:{cursor:`pointer`,transition:`r var(--m-fast) var(--ease-out)`}},t)})]})}),(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:y?(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`ai-em-swatch`,style:{background:g(y.cluster),display:`inline-block`,verticalAlign:`middle`,marginRight:6}}),(0,d.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:y.label}),(0,d.jsxs)(`span`,{className:`faint`,children:[` `,`· `,r[y.cluster]?.name||`cluster ${y.cluster}`]})]}):s?(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(s)}):(0,d.jsx)(`span`,{className:`faint`,children:`Hover a point for its label · click a legend chip to isolate a cluster`})})]})}function T({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,bins:r,color:o=`var(--presence)`,ece:s,footer:c,delay:l}){let f=i[t]||i.chart,p=[...r].sort((e,t)=>e.predicted-t.predicted),[m,h]=(0,u.useState)(null),g=e=>42+e*236,_=e=>278-e*236,v=Math.max(1,...p.map(e=>e.count)),y=p.map((e,t)=>`${t?`L`:`M`} ${g(e.predicted)} ${_(e.actual)}`).join(` `),b=m==null?null:p[m];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e,s&&(0,d.jsxs)(`span`,{className:`ai-cal-ece tab-num`,children:[`ECE `,s]})]}),(0,d.jsx)(`div`,{className:`ai-cal-wrap`,children:(0,d.jsxs)(`svg`,{role:`img`,"aria-label":e,viewBox:`0 0 320 320`,width:`100%`,className:`ai-cal-svg`,style:{display:`block`},children:[p.map((e,t)=>{let n=236/p.length,r=e.count/v*236*.5;return(0,d.jsx)(`rect`,{x:g(e.predicted)-n*.32,y:278-r,width:n*.64,height:r,fill:`var(--track)`,rx:2,opacity:m===t?.9:.55},`c`+t)}),(0,d.jsx)(`line`,{x1:42,y1:278,x2:278,y2:278,stroke:`var(--grid-strong)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:42,y1:42,x2:42,y2:278,stroke:`var(--grid-strong)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:g(0),y1:_(0),x2:g(1),y2:_(1),stroke:`var(--hover-line)`,strokeWidth:`1.4`,strokeDasharray:`5 5`}),(0,d.jsx)(`path`,{d:y,fill:`none`,stroke:o,strokeWidth:`2.4`,strokeLinejoin:`round`,strokeLinecap:`round`}),p.map((e,t)=>{let n=m===t;return(0,d.jsxs)(`g`,{onMouseEnter:()=>h(t),onMouseLeave:()=>h(null),style:{cursor:`pointer`},children:[(0,d.jsx)(`circle`,{cx:g(e.predicted),cy:_(e.actual),r:14,fill:`transparent`}),n&&(0,d.jsx)(`line`,{x1:g(e.predicted),y1:_(e.predicted),x2:g(e.predicted),y2:_(e.actual),stroke:`var(--warning)`,strokeWidth:`1.4`,strokeDasharray:`2 2`}),(0,d.jsx)(`circle`,{cx:g(e.predicted),cy:_(e.actual),r:n?6:4,fill:o,stroke:`var(--surface-1, var(--bg))`,strokeWidth:`1.5`,style:{transition:`r var(--m-fast)`}})]},`p`+t)}),(0,d.jsx)(`text`,{x:320/2,y:314,textAnchor:`middle`,fontSize:`11`,fill:`var(--text-muted)`,children:`predicted probability`}),(0,d.jsx)(`text`,{x:0,y:0,transform:`translate(14, ${320/2}) rotate(-90)`,textAnchor:`middle`,fontSize:`11`,fill:`var(--text-muted)`,children:`observed accuracy`})]})}),(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:8},children:b?(0,d.jsxs)(`span`,{className:`ai-cal-readout`,children:[(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`predicted`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,children:[(b.predicted*100).toFixed(0),`%`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`actual`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,style:{color:o},children:[(b.actual*100).toFixed(0),`%`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`gap`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,style:{color:`var(--warning)`},children:[((b.actual-b.predicted)*100).toFixed(0),`pt`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`n`}),` `,(0,d.jsx)(`span`,{className:`tab-num`,children:b.count})]})]}):c?(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(c)}):(0,d.jsx)(`span`,{className:`faint`,children:`Dashed diagonal = perfect calibration · hover a bin for predicted vs actual`})})]})}var E={GET:`var(--presence)`,POST:`var(--insight)`,PUT:`var(--warning)`,PATCH:`var(--warning)`,DELETE:`var(--danger)`};function D(e){return typeof e==`number`?e>=500?`var(--danger)`:e>=400?`var(--warning)`:e>=300?`var(--presence)`:e>=200?`var(--insight)`:`var(--text-muted)`:`var(--text-muted)`}function O({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,exchanges:r,caption:s,footer:c,delay:l}){let f=i[t]||i.globe,[p,m]=(0,u.useState)(r.findIndex(e=>e.reqBody||e.respPreview));return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-hx`,children:r.map((e,t)=>{let n=D(e.status),r=E[e.method]||`var(--text-secondary)`,a=!!(e.reqBody||e.respPreview),s=p===t;return(0,d.jsxs)(`div`,{className:`ai-hx-row`+(s?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-hx-head`,onClick:()=>a&&m(s?-1:t),...a?{}:{"aria-disabled":!0,tabIndex:-1},children:[(0,d.jsx)(`span`,{className:`ai-hx-method mono`,style:{"--c":r},children:e.method}),(0,d.jsx)(`span`,{className:`ai-hx-url mono`,children:e.url}),(0,d.jsx)(`span`,{className:`ai-hx-spacer`}),typeof e.durationMs==`number`&&(0,d.jsx)(`span`,{className:`ai-hx-ms tab-num`,children:o(e.durationMs,{unit:`ms`,decimals:0})}),typeof e.status==`number`&&(0,d.jsxs)(`span`,{className:`ai-hx-status tab-num`,style:{"--c":n},title:e.statusText,children:[e.status,e.statusText&&(0,d.jsxs)(`span`,{className:`ai-hx-status-text`,children:[` `,e.statusText]})]}),a&&(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(s?` is-open`:``)})]}),e.note&&(0,d.jsxs)(`div`,{className:`ai-hx-note`,style:{"--c":n},children:[(0,d.jsx)(i.alert,{className:`ic`}),` `,(0,d.jsx)(`span`,{children:e.note})]}),a&&s&&(0,d.jsxs)(`div`,{className:`ai-hx-detail`,children:[e.reqBody&&(0,d.jsxs)(`div`,{className:`ai-hx-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-hx-pane-label`,children:[(0,d.jsx)(i.arrowUp,{className:`ic`}),` Request`]}),(0,d.jsx)(`pre`,{className:`ai-hx-code mono`,children:e.reqBody})]}),e.respPreview&&(0,d.jsxs)(`div`,{className:`ai-hx-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-hx-pane-label`,children:[(0,d.jsx)(i.arrowDown,{className:`ic`,style:{color:n}}),` Response`]}),(0,d.jsx)(`pre`,{className:`ai-hx-code mono`,children:e.respPreview})]})]})]},t)})}),s&&(0,d.jsx)(`div`,{className:`ai-hx-caption`,children:s}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var k=r(),A=320,j={l:44,r:16,t:16,b:36},M=A-j.l-j.r;function N(e,t,n,r,i,a){let o=[...t??[],...n??[]].filter(Number.isFinite);if(!o.length)return null;let l=Math.max(...o)*1.08||1,u=s(0,l,c(l-0,4)).filter(e=>e<=l),d=r-j.t-j.b,f=e.length,p=(e,t)=>j.l+(t>1?e/(t-1)*M:M/2),m=e=>j.t+d-(e-0)/(l-0)*d,h=e=>e.map((e,t)=>`${t===0?`M`:`L`}${p(t,f).toFixed(1)},${m(e).toFixed(1)}`).join(` `),g=t?h(t):``,_=n?h(n):``,v=``;if(a&&t&&n){let e=Math.min(t.length,n.length),r=[],i=[];for(let a=0;a<e;a++)n[a]>t[a]&&(r.push(`${p(a,f).toFixed(1)},${m(n[a]).toFixed(1)}`),i.push(`${p(a,f).toFixed(1)},${m(t[a]).toFixed(1)}`));r.length>=2&&(v=`M${r.join(` L`)} L${[...i].reverse().join(` L`)} Z`)}let y=i!==null&&i>=0&&i<f?p(i,f):null;return{yMin:0,yMax:l,yTickVals:u,PH:d,toX:e=>p(e,f),toY:m,trainPath:g,valPath:_,overfitPath:v,bestX:y}}function P(e){let t=(0,k.c)(42),{model:n,epochs:r,label:i,offsetY:a}=e,{yTickVals:o,PH:s,toX:c,toY:l,trainPath:u,valPath:f,overfitPath:p,bestX:m}=n,h=r.length,g=`translate(0,${a})`,_;if(t[0]!==l||t[1]!==o){let e;t[3]===l?e=t[4]:(e=e=>(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:j.l,y1:l(e),x2:j.l+M,y2:l(e),stroke:`var(--grid-line)`,strokeWidth:.8}),(0,d.jsx)(`text`,{x:j.l-5,y:l(e)+4,textAnchor:`end`,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:e<1?e.toFixed(2):e.toFixed(1)})]},e),t[3]=l,t[4]=e),_=o.map(e),t[0]=l,t[1]=o,t[2]=_}else _=t[2];let v=j.t+s,y;t[5]===v?y=t[6]:(y=(0,d.jsx)(`line`,{x1:j.l,y1:j.t,x2:j.l,y2:v,stroke:`var(--grid-strong)`,strokeWidth:1}),t[5]=v,t[6]=y);let b=j.t+s,x=j.t+s,S;t[7]!==b||t[8]!==x?(S=(0,d.jsx)(`line`,{x1:j.l,y1:b,x2:j.l+M,y2:x,stroke:`var(--grid-strong)`,strokeWidth:1}),t[7]=b,t[8]=x,t[9]=S):S=t[9];let C;t[10]===p?C=t[11]:(C=p&&(0,d.jsx)(`path`,{d:p,fill:`var(--danger)`,fillOpacity:.1}),t[10]=p,t[11]=C);let w;t[12]!==s||t[13]!==m?(w=m!==null&&(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:m,y1:j.t,x2:m,y2:j.t+s,stroke:`var(--warning)`,strokeWidth:1.5,strokeDasharray:`4 3`}),(0,d.jsx)(`text`,{x:m>A-50?m-3:m+3,y:j.t+10,textAnchor:m>A-50?`end`:`start`,fontSize:8,fill:`var(--warning)`,fontFamily:`inherit`,fontWeight:`600`,children:`Best`})]}),t[12]=s,t[13]=m,t[14]=w):w=t[14];let T;t[15]===u?T=t[16]:(T=u&&(0,d.jsx)(`path`,{d:u,fill:`none`,stroke:`var(--insight)`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`}),t[15]=u,t[16]=T);let E;t[17]===f?E=t[18]:(E=f&&(0,d.jsx)(`path`,{d:f,fill:`none`,stroke:`var(--presence)`,strokeWidth:2,strokeDasharray:`5 3`,strokeLinecap:`round`,strokeLinejoin:`round`}),t[17]=f,t[18]=E);let D;if(t[19]!==s||t[20]!==r||t[21]!==h||t[22]!==c){let e;t[24]!==s||t[25]!==h||t[26]!==c?(e=(e,t)=>t%Math.max(1,Math.ceil(h/6))!==0&&t!==h-1?null:(0,d.jsx)(`text`,{x:c(t),y:j.t+s+14,textAnchor:`middle`,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:e},e),t[24]=s,t[25]=h,t[26]=c,t[27]=e):e=t[27],D=r.map(e),t[19]=s,t[20]=r,t[21]=h,t[22]=c,t[23]=D}else D=t[23];let O;t[28]===i?O=t[29]:(O=(0,d.jsx)(`text`,{x:j.l+4,y:j.t+12,fontSize:9,fontWeight:`600`,fill:`var(--text-secondary)`,fontFamily:`inherit`,children:i}),t[28]=i,t[29]=O);let N;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,d.jsxs)(`g`,{transform:`translate(${A-j.r-72},${j.t+2})`,children:[(0,d.jsx)(`line`,{x1:0,y1:5,x2:14,y2:5,stroke:`var(--insight)`,strokeWidth:2}),(0,d.jsx)(`text`,{x:17,y:9,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:`Train`}),(0,d.jsx)(`line`,{x1:0,y1:16,x2:14,y2:16,stroke:`var(--presence)`,strokeWidth:2,strokeDasharray:`4 2`}),(0,d.jsx)(`text`,{x:17,y:20,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:`Val`})]}),t[30]=N):N=t[30];let P;return t[31]!==g||t[32]!==T||t[33]!==E||t[34]!==D||t[35]!==O||t[36]!==_||t[37]!==y||t[38]!==S||t[39]!==C||t[40]!==w?(P=(0,d.jsxs)(`g`,{transform:g,children:[_,y,S,C,w,T,E,D,O,N]}),t[31]=g,t[32]=T,t[33]=E,t[34]=D,t[35]=O,t[36]=_,t[37]=y,t[38]=S,t[39]=C,t[40]=w,t[41]=P):P=t[41],P}function F({title:e=`Training Curves`,icon:t=`sparkle`,iconColor:n=`var(--presence)`,epochs:r,trainLoss:o,valLoss:s,trainAcc:c,valAcc:l,bestEpoch:f,lossLabel:p=`Loss`,accLabel:m=`Accuracy`,footer:h,delay:g}){let _=i[t]??i.sparkle,v=o!==void 0||s!==void 0,y=c!==void 0||l!==void 0,b=+!!v+ +!!y,x=b>1?180:220,S=b*x,C=(0,u.useMemo)(()=>{if(f===void 0)return null;let e=r.indexOf(f);return e>=0?e:null},[f,r]),w=(0,u.useMemo)(()=>v?N(r,o,s,x,C,!0):null,[r,o,s,x,C,v]),T=(0,u.useMemo)(()=>y?N(r,c,l,x,C,!1):null,[r,c,l,x,C,y]);return!r.length||b===0?null:(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(_,{className:`ic`,style:{color:n}}),e]}),(0,d.jsxs)(`svg`,{viewBox:`0 0 ${A} ${S}`,width:`100%`,role:`img`,"aria-label":e,style:{display:`block`,overflow:`visible`},children:[w&&(0,d.jsx)(P,{model:w,epochs:r,label:p,offsetY:0}),T&&(0,d.jsx)(P,{model:T,epochs:r,label:m,offsetY:w?x:0})]}),h&&(0,d.jsx)(`div`,{className:`insight-summary`,dangerouslySetInnerHTML:a(h)})]})}var I=e({aiRegistry:()=>L}),L={reasoning:l(f),toolcalls:l(m),agenttrace:l(h),modelcompare:l(g),tokenstream:l(v),retrieval:l(b),whatchanged:l(x),routing:l(S),embedmap:l(w),calibration:l(T),httpexchange:l(O),trainingcurve:l(F)};export{I as n,L as t};
1
+ import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{ht as r}from"./index-Dbr1j8Fe.js";import{n as i}from"./icons-CHVz6kv_.js";import{t as a}from"./richText-BkxJhl9N.js";import{r as o}from"./format-DlZTyeMy.js";import{a as s,r as c}from"./scale-Bcgfo6Hp.js";import"./lib-B6qSkBPa.js";import{t as l}from"./registry-types-DMuK0vJ6.js";var u=t(),d=n();function f({title:e,icon:t=`sparkle`,iconColor:n=`var(--presence)`,steps:r,conclusion:o,footer:s,delay:c}){let l=i[t]||i.sparkle,[f,p]=(0,u.useState)(0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-cot`,children:r.map((e,t)=>{let n=f===t;return(0,d.jsxs)(`div`,{className:`ai-cot-step`+(n?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-cot-head`,onClick:()=>p(n?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-cot-dot`,children:(0,d.jsx)(`span`,{children:t+1})}),(0,d.jsxs)(`span`,{className:`ai-cot-body`,children:[(0,d.jsxs)(`span`,{className:`ai-cot-label`,children:[e.label,e.tag&&(0,d.jsx)(`span`,{className:`ai-tag`,style:{"--c":e.tagColor||`var(--presence)`},children:e.tag})]}),(0,d.jsx)(`span`,{className:`ai-cot-summary`,children:e.summary})]}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(n?` is-open`:``)})]}),n&&e.detail&&(0,d.jsx)(`div`,{className:`ai-cot-detail`,dangerouslySetInnerHTML:a(e.detail)})]},t)})}),o&&(0,d.jsxs)(`div`,{className:`ai-cot-conclusion`,children:[(0,d.jsx)(i.check,{className:`ic`}),(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(o)})]}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}var p={ok:{c:`var(--insight)`,label:`OK`},error:{c:`var(--danger)`,label:`ERR`},pending:{c:`var(--warning)`,label:`RUNNING`}};function m({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,calls:r,footer:o,delay:s}){let c=i[t]||i.layers,[l,f]=(0,u.useState)(0);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(c,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-tc`,children:r.map((e,t)=>{let r=l===t,a=p[e.status||`ok`]||p.ok;return(0,d.jsxs)(`div`,{className:`ai-tc-call`+(r?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-tc-head`,onClick:()=>f(r?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-tc-conn`,"aria-hidden":!0}),(0,d.jsx)(`span`,{className:`ai-tc-verb mono`,style:{color:n},children:e.verb||`call`}),(0,d.jsx)(`span`,{className:`ai-tc-name mono`,children:e.name}),(0,d.jsx)(`span`,{className:`ai-tc-spacer`}),typeof e.ms==`number`&&(0,d.jsxs)(`span`,{className:`ai-tc-ms tab-num`,children:[e.ms,`ms`]}),(0,d.jsx)(`span`,{className:`ai-tc-status`,style:{"--c":a.c},children:a.label}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(r?` is-open`:``)})]}),r&&(0,d.jsxs)(`div`,{className:`ai-tc-detail`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane-label`,children:[(0,d.jsx)(i.arrowUp,{className:`ic`}),` Request`]}),(0,d.jsx)(`pre`,{className:`ai-tc-code mono`,children:e.request})]}),(0,d.jsxs)(`div`,{className:`ai-tc-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-tc-pane-label`,children:[(0,d.jsx)(i.arrowDown,{className:`ic`,style:{color:a.c}}),` Response`]}),(0,d.jsx)(`pre`,{className:`ai-tc-code mono`,children:e.response})]})]})]},t)})}),o&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function h({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,nodes:r,footer:o,delay:s}){let c=i[t]||i.share,[l,f]=(0,u.useState)(!1);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(s||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(c,{className:`ic`,style:{color:n}}),` `,e,(0,d.jsxs)(`button`,{className:`ai-at-toggle`+(l?` is-on`:``),onClick:()=>f(e=>!e),children:[(0,d.jsx)(i.layers,{className:`ic`}),` `,l?`Explored`:`Chosen path`]})]}),(0,d.jsx)(`div`,{className:`ai-at`,children:r.map((e,t)=>{let n=l?e.branches:e.branches.filter(e=>e.chosen);return(0,d.jsxs)(`div`,{className:`ai-at-node`,children:[(0,d.jsxs)(`div`,{className:`ai-at-step`,children:[(0,d.jsx)(`span`,{className:`ai-at-rail`,"aria-hidden":!0}),(0,d.jsx)(`span`,{className:`ai-at-stepnum tab-num`,children:t+1}),(0,d.jsxs)(`div`,{className:`ai-at-decision`,children:[(0,d.jsx)(`div`,{className:`ai-at-step-label`,children:e.step}),(0,d.jsx)(`div`,{className:`ai-at-step-q`,children:e.decision})]})]}),(0,d.jsx)(`div`,{className:`ai-at-branches`,children:n.map((e,t)=>{let n=e.chosen?e.color||`var(--insight)`:`var(--text-muted)`;return(0,d.jsxs)(`div`,{className:`ai-at-branch`+(e.chosen?` is-chosen`:` is-alt`),style:{"--c":n},children:[(0,d.jsx)(`span`,{className:`ai-at-branch-mark`,children:e.chosen?(0,d.jsx)(i.check,{className:`ic`}):(0,d.jsx)(i.x,{className:`ic`})}),(0,d.jsx)(`span`,{className:`ai-at-branch-label`,children:e.label}),e.note&&(0,d.jsx)(`span`,{className:`ai-at-branch-note`,children:e.note}),typeof e.score==`number`&&(0,d.jsx)(`span`,{className:`ai-at-branch-score tab-num`,children:Math.round(e.score*100)})]},t)})})]},t)})}),o&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(o)})]})}function g({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,prompt:r,outputs:o,footer:s,delay:c}){let l=i[t]||i.layers,[f,p]=(0,u.useState)(new Set),[m,h]=(0,u.useState)(!0),g=e=>p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):o.length-n.size>1&&n.add(e),n}),_=o.filter((e,t)=>!f.has(t));return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e,(0,d.jsxs)(`button`,{className:`ai-at-toggle`+(m?` is-on`:``),onClick:()=>h(e=>!e),children:[(0,d.jsx)(i.eye,{className:`ic`}),` Diff`]})]}),r&&(0,d.jsxs)(`div`,{className:`ai-mc-prompt`,children:[(0,d.jsx)(`span`,{className:`ai-mc-prompt-tag`,children:`PROMPT`}),` `,r]}),(0,d.jsx)(`div`,{className:`ai-mc-tabs`,children:o.map((e,t)=>{let n=!f.has(t),r=e.color||`var(--presence)`;return(0,d.jsxs)(`button`,{className:`ai-mc-tab`+(n?` is-on`:``),style:{"--c":r},onClick:()=>g(t),children:[(0,d.jsx)(`span`,{className:`ai-mc-dot`}),e.model,e.best&&(0,d.jsx)(i.check,{className:`ai-mc-best`})]},t)})}),(0,d.jsx)(`div`,{className:`ai-mc-grid`+(m?``:` no-diff`),style:{"--cols":String(_.length)},children:o.map((e,t)=>f.has(t)?null:(0,d.jsxs)(`div`,{className:`ai-mc-col`+(e.best?` is-best`:``),style:{"--c":e.color||`var(--presence)`},children:[(0,d.jsxs)(`div`,{className:`ai-mc-col-head`,children:[(0,d.jsx)(`span`,{className:`ai-mc-dot`}),(0,d.jsx)(`span`,{className:`ai-mc-model`,children:e.model}),e.badge&&(0,d.jsx)(`span`,{className:`ai-mc-badge`,children:e.badge})]}),(0,d.jsx)(`div`,{className:`ai-mc-text`,dangerouslySetInnerHTML:a(e.text)}),e.meta&&e.meta.length>0&&(0,d.jsx)(`div`,{className:`ai-mc-meta`,children:e.meta.map((e,t)=>(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:e.k}),` `,(0,d.jsx)(`span`,{className:`tab-num`,children:e.v})]},t))})]},t))}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function _(e){return e>=.85?`var(--insight)`:e>=.6?`var(--presence)`:e>=.4?`var(--warning)`:`var(--danger)`}function v({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,prefix:r,tokens:o,footer:s,delay:c}){let l=i[t]||i.spark,[f,p]=(0,u.useState)(null),m=f==null?null:o[f];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-ts-stream`,children:[r&&(0,d.jsx)(`span`,{className:`ai-ts-prefix`,children:r}),o.map((e,t)=>{let n=_(e.p);return(0,d.jsx)(`span`,{className:`ai-ts-tok`+(f===t?` is-on`:``),style:{"--c":n,"--a":String(.1+e.p*.32)},onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),children:e.text},t)})]}),(0,d.jsx)(`div`,{className:`ai-ts-readout`,children:m?(0,d.jsxs)(`div`,{className:`ai-ts-pop`,children:[(0,d.jsxs)(`div`,{className:`ai-ts-pop-head`,children:[(0,d.jsx)(`span`,{className:`ai-ts-pop-tok mono`,children:m.text.trim()||`␣`}),(0,d.jsxs)(`span`,{className:`ai-ts-pop-p tab-num`,style:{color:_(m.p)},children:[(m.p*100).toFixed(1),`%`]})]}),(0,d.jsx)(`div`,{className:`ai-ts-bar`,children:(0,d.jsx)(`span`,{style:{width:`${m.p*100}%`,background:_(m.p)}})}),m.alts&&m.alts.length>0&&(0,d.jsxs)(`div`,{className:`ai-ts-alts`,children:[(0,d.jsx)(`span`,{className:`faint`,children:`alternatives`}),m.alts.map((e,t)=>(0,d.jsxs)(`span`,{className:`ai-ts-alt`,children:[(0,d.jsx)(`span`,{className:`mono`,children:e.t.trim()||`␣`}),(0,d.jsxs)(`span`,{className:`tab-num faint`,children:[(e.p*100).toFixed(0),`%`]})]},t))]})]}):(0,d.jsxs)(`span`,{className:`faint`,children:[(0,d.jsx)(i.eye,{className:`ic`,style:{verticalAlign:`-2px`,width:14,height:14}}),` `,`Hover a token to see its probability and top alternatives`]})}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function y(e){return e>=.8?`var(--insight)`:e>=.6?`var(--presence)`:e>=.4?`var(--warning)`:`var(--text-muted)`}function b({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,query:r,chunks:o,footer:s,delay:c}){let l=i[t]||i.layers,f=o.map((e,t)=>({c:e,i:t})).sort((e,t)=>t.c.score-e.c.score),[p,m]=(0,u.useState)(f.length?f[0].i:-1);return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),r&&(0,d.jsxs)(`div`,{className:`ai-rt-query`,children:[(0,d.jsx)(i.spark,{className:`ic`,style:{color:n}}),` `,(0,d.jsx)(`span`,{children:r})]}),(0,d.jsx)(`div`,{className:`ai-rt`,children:f.map(({c:e,i:t},n)=>{let r=p===t,o=y(e.score);return(0,d.jsxs)(`div`,{className:`ai-rt-chunk`+(r?` is-open`:``),style:{"--c":o},children:[(0,d.jsxs)(`button`,{className:`ai-rt-head`,onClick:()=>m(r?-1:t),children:[(0,d.jsx)(`span`,{className:`ai-rt-rank tab-num`,children:n+1}),(0,d.jsxs)(`span`,{className:`ai-rt-body`,children:[(0,d.jsxs)(`span`,{className:`ai-rt-source`,children:[(0,d.jsx)(i.doc,{className:`ic`}),` `,e.source,e.used&&(0,d.jsx)(`span`,{className:`ai-rt-used`,children:`used`}),e.tag&&(0,d.jsx)(`span`,{className:`ai-tag`,style:{"--c":e.tagColor||`var(--presence)`},children:e.tag})]}),(0,d.jsx)(`span`,{className:`ai-rt-snippet`,children:e.snippet})]}),(0,d.jsxs)(`span`,{className:`ai-rt-score`,children:[(0,d.jsx)(`span`,{className:`ai-rt-meter`,children:(0,d.jsx)(`span`,{style:{width:`${e.score*100}%`,background:o}})}),(0,d.jsx)(`span`,{className:`tab-num`,style:{color:o},children:e.score.toFixed(2)})]}),(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(r?` is-open`:``)})]}),r&&e.body&&(0,d.jsx)(`div`,{className:`ai-rt-detail`,dangerouslySetInnerHTML:a(e.body)})]},t)})}),s&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(s)})]})}function x({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,beforeLabel:r=`Before`,afterLabel:o=`After`,before:s,after:c,diff:l,footer:f,delay:p}){let m=i[t]||i.edit,[h,g]=(0,u.useState)(`diff`),_=l.filter(e=>e.t===`add`).length,v=l.filter(e=>e.t===`del`).length;return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-wc-seg`,children:[(0,d.jsx)(`button`,{className:`ai-wc-seg-btn`+(h===`before`?` is-on`:``),onClick:()=>g(`before`),children:r}),(0,d.jsx)(`button`,{className:`ai-wc-seg-btn`+(h===`after`?` is-on`:``),onClick:()=>g(`after`),children:o}),(0,d.jsxs)(`button`,{className:`ai-wc-seg-btn`+(h===`diff`?` is-on`:``),onClick:()=>g(`diff`),children:[`Diff`,` `,(0,d.jsxs)(`span`,{className:`ai-wc-count`,children:[(0,d.jsxs)(`span`,{className:`ai-wc-add`,children:[`+`,_]}),` `,(0,d.jsxs)(`span`,{className:`ai-wc-del`,children:[`−`,v]})]})]})]}),h===`before`&&(0,d.jsx)(`div`,{className:`ai-wc-prose ai-wc-old`,dangerouslySetInnerHTML:a(s)}),h===`after`&&(0,d.jsx)(`div`,{className:`ai-wc-prose ai-wc-new`,dangerouslySetInnerHTML:a(c)}),h===`diff`&&(0,d.jsx)(`div`,{className:`ai-wc-diff`,children:l.map((e,t)=>(0,d.jsxs)(`div`,{className:`ai-wc-line `+(e.t||`ctx`),children:[(0,d.jsx)(`span`,{className:`ai-wc-gutter`,children:e.t===`add`?`+`:e.t===`del`?`−`:``}),(0,d.jsx)(`span`,{className:`ai-wc-content`,dangerouslySetInnerHTML:a(e.c)})]},t))}),f&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(f)})]})}function S({title:e,icon:t=`share`,iconColor:n=`var(--presence)`,query:r,classifier:o=`router`,choices:s,footer:c,delay:l}){let f=i[t]||i.share,[p,m]=(0,u.useState)(Math.max(0,s.findIndex(e=>e.taken))),h=s[p];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsxs)(`div`,{className:`ai-ro`,children:[(0,d.jsxs)(`div`,{className:`ai-ro-source`,children:[r&&(0,d.jsx)(`div`,{className:`ai-ro-query`,children:r}),(0,d.jsxs)(`div`,{className:`ai-ro-classifier`,children:[(0,d.jsx)(i.sparkle,{className:`ic`,style:{color:n}}),` `,o]})]}),(0,d.jsx)(`svg`,{role:`img`,"aria-label":e,className:`ai-ro-wires`,viewBox:`0 0 40 100`,preserveAspectRatio:`none`,"aria-hidden":!0,children:s.map((e,t)=>{let n=(t+.5)/s.length*100,r=e.taken;return(0,d.jsx)(`path`,{d:`M0 50 C 20 50, 20 ${n}, 40 ${n}`,fill:`none`,stroke:r?e.color||`var(--insight)`:`var(--grid-strong)`,strokeWidth:r?2.4:1.4,strokeDasharray:r?`0`:`3 3`},t)})}),(0,d.jsx)(`div`,{className:`ai-ro-choices`,children:s.map((e,t)=>{let n=e.color||(e.taken?`var(--insight)`:`var(--text-muted)`);return(0,d.jsxs)(`button`,{className:`ai-ro-choice`+(e.taken?` is-taken`:``)+(p===t?` is-sel`:``),style:{"--c":n},onClick:()=>m(t),children:[(0,d.jsxs)(`span`,{className:`ai-ro-choice-top`,children:[(0,d.jsx)(`span`,{className:`ai-ro-choice-label`,children:e.label}),e.taken&&(0,d.jsx)(`span`,{className:`ai-ro-taken`,children:(0,d.jsx)(i.check,{className:`ic`})})]}),e.sub&&(0,d.jsx)(`span`,{className:`ai-ro-choice-sub`,children:e.sub}),typeof e.score==`number`&&(0,d.jsx)(`span`,{className:`ai-ro-choice-meter`,children:(0,d.jsx)(`span`,{style:{width:`${e.score*100}%`,background:n}})})]},t)})})]}),h&&h.reason&&(0,d.jsxs)(`div`,{className:`ai-ro-reason`,style:{"--c":h.color||(h.taken?`var(--insight)`:`var(--presence)`)},children:[(0,d.jsx)(i.quote,{className:`ic`}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`strong`,{children:h.label}),` —`,` `,(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(h.reason)})]})]}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var C=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--danger)`];function w({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,clusters:r,points:o,footer:s,delay:c}){let l=i[t]||i.globe,[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(null),g=e=>r[e]?.color||C[e%C.length],_=e=>14+e*512,v=e=>14+(1-e)*272,y=f==null?null:o[f];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(c||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-em-legend`,children:r.map((e,t)=>(0,d.jsxs)(`button`,{className:`ai-em-leg`+(m===t?` is-on`:``)+(m!=null&&m!==t?` muted`:``),onClick:()=>h(m===t?null:t),children:[(0,d.jsx)(`span`,{className:`ai-em-swatch`,style:{background:g(t)}}),e.name]},t))}),(0,d.jsx)(`div`,{className:`ai-em-wrap`,children:(0,d.jsxs)(`svg`,{role:`img`,"aria-label":e,viewBox:`0 0 540 300`,width:`100%`,className:`ai-em-svg`,style:{display:`block`},children:[[.25,.5,.75].map(e=>(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:_(e),y1:14,x2:_(e),y2:286,stroke:`var(--grid-line)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:14,y1:v(e),x2:526,y2:v(e),stroke:`var(--grid-line)`,strokeWidth:`1`})]},e)),o.map((e,t)=>{let n=g(e.cluster),r=m!=null&&m!==e.cluster,a=f===t;return e.query?(0,d.jsxs)(`g`,{onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),style:{cursor:`pointer`},children:[(0,d.jsx)(`circle`,{cx:_(e.x),cy:v(e.y),r:a?11:9,fill:`none`,stroke:`var(--presence)`,strokeWidth:`2`,opacity:r?.3:1}),(0,d.jsx)(i.spark,{x:_(e.x)-6,y:v(e.y)-6,width:`12`,height:`12`,style:{color:`var(--presence)`,opacity:r?.3:1}})]},t):(0,d.jsx)(`circle`,{cx:_(e.x),cy:v(e.y),r:a?7:4.5,fill:n,opacity:r?.18:a?1:.82,stroke:a?`var(--text-primary)`:`transparent`,strokeWidth:a?1.5:0,onMouseEnter:()=>p(t),onMouseLeave:()=>p(null),style:{cursor:`pointer`,transition:`r var(--m-fast) var(--ease-out)`}},t)})]})}),(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},children:y?(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`ai-em-swatch`,style:{background:g(y.cluster),display:`inline-block`,verticalAlign:`middle`,marginRight:6}}),(0,d.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:y.label}),(0,d.jsxs)(`span`,{className:`faint`,children:[` `,`· `,r[y.cluster]?.name||`cluster ${y.cluster}`]})]}):s?(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(s)}):(0,d.jsx)(`span`,{className:`faint`,children:`Hover a point for its label · click a legend chip to isolate a cluster`})})]})}function T({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,bins:r,color:o=`var(--presence)`,ece:s,footer:c,delay:l}){let f=i[t]||i.chart,p=[...r].sort((e,t)=>e.predicted-t.predicted),[m,h]=(0,u.useState)(null),g=e=>42+e*236,_=e=>278-e*236,v=Math.max(1,...p.map(e=>e.count)),y=p.map((e,t)=>`${t?`L`:`M`} ${g(e.predicted)} ${_(e.actual)}`).join(` `),b=m==null?null:p[m];return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e,s&&(0,d.jsxs)(`span`,{className:`ai-cal-ece tab-num`,children:[`ECE `,s]})]}),(0,d.jsx)(`div`,{className:`ai-cal-wrap`,children:(0,d.jsxs)(`svg`,{role:`img`,"aria-label":e,viewBox:`0 0 320 320`,width:`100%`,className:`ai-cal-svg`,style:{display:`block`},children:[p.map((e,t)=>{let n=236/p.length,r=e.count/v*236*.5;return(0,d.jsx)(`rect`,{x:g(e.predicted)-n*.32,y:278-r,width:n*.64,height:r,fill:`var(--track)`,rx:2,opacity:m===t?.9:.55},`c`+t)}),(0,d.jsx)(`line`,{x1:42,y1:278,x2:278,y2:278,stroke:`var(--grid-strong)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:42,y1:42,x2:42,y2:278,stroke:`var(--grid-strong)`,strokeWidth:`1`}),(0,d.jsx)(`line`,{x1:g(0),y1:_(0),x2:g(1),y2:_(1),stroke:`var(--hover-line)`,strokeWidth:`1.4`,strokeDasharray:`5 5`}),(0,d.jsx)(`path`,{d:y,fill:`none`,stroke:o,strokeWidth:`2.4`,strokeLinejoin:`round`,strokeLinecap:`round`}),p.map((e,t)=>{let n=m===t;return(0,d.jsxs)(`g`,{onMouseEnter:()=>h(t),onMouseLeave:()=>h(null),style:{cursor:`pointer`},children:[(0,d.jsx)(`circle`,{cx:g(e.predicted),cy:_(e.actual),r:14,fill:`transparent`}),n&&(0,d.jsx)(`line`,{x1:g(e.predicted),y1:_(e.predicted),x2:g(e.predicted),y2:_(e.actual),stroke:`var(--warning)`,strokeWidth:`1.4`,strokeDasharray:`2 2`}),(0,d.jsx)(`circle`,{cx:g(e.predicted),cy:_(e.actual),r:n?6:4,fill:o,stroke:`var(--surface-1, var(--bg))`,strokeWidth:`1.5`,style:{transition:`r var(--m-fast)`}})]},`p`+t)}),(0,d.jsx)(`text`,{x:320/2,y:314,textAnchor:`middle`,fontSize:`11`,fill:`var(--text-muted)`,children:`predicted probability`}),(0,d.jsx)(`text`,{x:0,y:0,transform:`translate(14, ${320/2}) rotate(-90)`,textAnchor:`middle`,fontSize:`11`,fill:`var(--text-muted)`,children:`observed accuracy`})]})}),(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:8},children:b?(0,d.jsxs)(`span`,{className:`ai-cal-readout`,children:[(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`predicted`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,children:[(b.predicted*100).toFixed(0),`%`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`actual`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,style:{color:o},children:[(b.actual*100).toFixed(0),`%`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`gap`}),` `,(0,d.jsxs)(`span`,{className:`tab-num`,style:{color:`var(--warning)`},children:[((b.actual-b.predicted)*100).toFixed(0),`pt`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`faint`,children:`n`}),` `,(0,d.jsx)(`span`,{className:`tab-num`,children:b.count})]})]}):c?(0,d.jsx)(`span`,{dangerouslySetInnerHTML:a(c)}):(0,d.jsx)(`span`,{className:`faint`,children:`Dashed diagonal = perfect calibration · hover a bin for predicted vs actual`})})]})}var E={GET:`var(--presence)`,POST:`var(--insight)`,PUT:`var(--warning)`,PATCH:`var(--warning)`,DELETE:`var(--danger)`};function D(e){return typeof e==`number`?e>=500?`var(--danger)`:e>=400?`var(--warning)`:e>=300?`var(--presence)`:e>=200?`var(--insight)`:`var(--text-muted)`:`var(--text-muted)`}function O({title:e,icon:t=`globe`,iconColor:n=`var(--presence)`,exchanges:r,caption:s,footer:c,delay:l}){let f=i[t]||i.globe,[p,m]=(0,u.useState)(r.findIndex(e=>e.reqBody||e.respPreview));return(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,d.jsx)(`div`,{className:`ai-hx`,children:r.map((e,t)=>{let n=D(e.status),r=E[e.method]||`var(--text-secondary)`,a=!!(e.reqBody||e.respPreview),s=p===t;return(0,d.jsxs)(`div`,{className:`ai-hx-row`+(s?` is-open`:``),children:[(0,d.jsxs)(`button`,{className:`ai-hx-head`,onClick:()=>a&&m(s?-1:t),...a?{}:{"aria-disabled":!0,tabIndex:-1},children:[(0,d.jsx)(`span`,{className:`ai-hx-method mono`,style:{"--c":r},children:e.method}),(0,d.jsx)(`span`,{className:`ai-hx-url mono`,children:e.url}),(0,d.jsx)(`span`,{className:`ai-hx-spacer`}),typeof e.durationMs==`number`&&(0,d.jsx)(`span`,{className:`ai-hx-ms tab-num`,children:o(e.durationMs,{unit:`ms`,decimals:0})}),typeof e.status==`number`&&(0,d.jsxs)(`span`,{className:`ai-hx-status tab-num`,style:{"--c":n},title:e.statusText,children:[e.status,e.statusText&&(0,d.jsxs)(`span`,{className:`ai-hx-status-text`,children:[` `,e.statusText]})]}),a&&(0,d.jsx)(i.chevR,{className:`ai-cot-chev`+(s?` is-open`:``)})]}),e.note&&(0,d.jsxs)(`div`,{className:`ai-hx-note`,style:{"--c":n},children:[(0,d.jsx)(i.alert,{className:`ic`}),` `,(0,d.jsx)(`span`,{children:e.note})]}),a&&s&&(0,d.jsxs)(`div`,{className:`ai-hx-detail`,children:[e.reqBody&&(0,d.jsxs)(`div`,{className:`ai-hx-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-hx-pane-label`,children:[(0,d.jsx)(i.arrowUp,{className:`ic`}),` Request`]}),(0,d.jsx)(`pre`,{className:`ai-hx-code mono`,children:e.reqBody})]}),e.respPreview&&(0,d.jsxs)(`div`,{className:`ai-hx-pane`,children:[(0,d.jsxs)(`div`,{className:`ai-hx-pane-label`,children:[(0,d.jsx)(i.arrowDown,{className:`ic`,style:{color:n}}),` Response`]}),(0,d.jsx)(`pre`,{className:`ai-hx-code mono`,children:e.respPreview})]})]})]},t)})}),s&&(0,d.jsx)(`div`,{className:`ai-hx-caption`,children:s}),c&&(0,d.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:a(c)})]})}var k=r(),A=320,j={l:44,r:16,t:16,b:36},M=A-j.l-j.r;function N(e,t,n,r,i,a){let o=[...t??[],...n??[]].filter(Number.isFinite);if(!o.length)return null;let l=Math.max(...o)*1.08||1,u=s(0,l,c(l-0,4)).filter(e=>e<=l),d=r-j.t-j.b,f=e.length,p=(e,t)=>j.l+(t>1?e/(t-1)*M:M/2),m=e=>j.t+d-(e-0)/(l-0)*d,h=e=>e.map((e,t)=>`${t===0?`M`:`L`}${p(t,f).toFixed(1)},${m(e).toFixed(1)}`).join(` `),g=t?h(t):``,_=n?h(n):``,v=``;if(a&&t&&n){let e=Math.min(t.length,n.length),r=[],i=[];for(let a=0;a<e;a++)n[a]>t[a]&&(r.push(`${p(a,f).toFixed(1)},${m(n[a]).toFixed(1)}`),i.push(`${p(a,f).toFixed(1)},${m(t[a]).toFixed(1)}`));r.length>=2&&(v=`M${r.join(` L`)} L${[...i].reverse().join(` L`)} Z`)}let y=i!==null&&i>=0&&i<f?p(i,f):null;return{yMin:0,yMax:l,yTickVals:u,PH:d,toX:e=>p(e,f),toY:m,trainPath:g,valPath:_,overfitPath:v,bestX:y}}function P(e){let t=(0,k.c)(42),{model:n,epochs:r,label:i,offsetY:a}=e,{yTickVals:o,PH:s,toX:c,toY:l,trainPath:u,valPath:f,overfitPath:p,bestX:m}=n,h=r.length,g=`translate(0,${a})`,_;if(t[0]!==l||t[1]!==o){let e;t[3]===l?e=t[4]:(e=e=>(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:j.l,y1:l(e),x2:j.l+M,y2:l(e),stroke:`var(--grid-line)`,strokeWidth:.8}),(0,d.jsx)(`text`,{x:j.l-5,y:l(e)+4,textAnchor:`end`,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:e<1?e.toFixed(2):e.toFixed(1)})]},e),t[3]=l,t[4]=e),_=o.map(e),t[0]=l,t[1]=o,t[2]=_}else _=t[2];let v=j.t+s,y;t[5]===v?y=t[6]:(y=(0,d.jsx)(`line`,{x1:j.l,y1:j.t,x2:j.l,y2:v,stroke:`var(--grid-strong)`,strokeWidth:1}),t[5]=v,t[6]=y);let b=j.t+s,x=j.t+s,S;t[7]!==b||t[8]!==x?(S=(0,d.jsx)(`line`,{x1:j.l,y1:b,x2:j.l+M,y2:x,stroke:`var(--grid-strong)`,strokeWidth:1}),t[7]=b,t[8]=x,t[9]=S):S=t[9];let C;t[10]===p?C=t[11]:(C=p&&(0,d.jsx)(`path`,{d:p,fill:`var(--danger)`,fillOpacity:.1}),t[10]=p,t[11]=C);let w;t[12]!==s||t[13]!==m?(w=m!==null&&(0,d.jsxs)(`g`,{children:[(0,d.jsx)(`line`,{x1:m,y1:j.t,x2:m,y2:j.t+s,stroke:`var(--warning)`,strokeWidth:1.5,strokeDasharray:`4 3`}),(0,d.jsx)(`text`,{x:m>A-50?m-3:m+3,y:j.t+10,textAnchor:m>A-50?`end`:`start`,fontSize:8,fill:`var(--warning)`,fontFamily:`inherit`,fontWeight:`600`,children:`Best`})]}),t[12]=s,t[13]=m,t[14]=w):w=t[14];let T;t[15]===u?T=t[16]:(T=u&&(0,d.jsx)(`path`,{d:u,fill:`none`,stroke:`var(--insight)`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`}),t[15]=u,t[16]=T);let E;t[17]===f?E=t[18]:(E=f&&(0,d.jsx)(`path`,{d:f,fill:`none`,stroke:`var(--presence)`,strokeWidth:2,strokeDasharray:`5 3`,strokeLinecap:`round`,strokeLinejoin:`round`}),t[17]=f,t[18]=E);let D;if(t[19]!==s||t[20]!==r||t[21]!==h||t[22]!==c){let e;t[24]!==s||t[25]!==h||t[26]!==c?(e=(e,t)=>t%Math.max(1,Math.ceil(h/6))!==0&&t!==h-1?null:(0,d.jsx)(`text`,{x:c(t),y:j.t+s+14,textAnchor:`middle`,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:e},e),t[24]=s,t[25]=h,t[26]=c,t[27]=e):e=t[27],D=r.map(e),t[19]=s,t[20]=r,t[21]=h,t[22]=c,t[23]=D}else D=t[23];let O;t[28]===i?O=t[29]:(O=(0,d.jsx)(`text`,{x:j.l+4,y:j.t+12,fontSize:9,fontWeight:`600`,fill:`var(--text-secondary)`,fontFamily:`inherit`,children:i}),t[28]=i,t[29]=O);let N;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,d.jsxs)(`g`,{transform:`translate(${A-j.r-72},${j.t+2})`,children:[(0,d.jsx)(`line`,{x1:0,y1:5,x2:14,y2:5,stroke:`var(--insight)`,strokeWidth:2}),(0,d.jsx)(`text`,{x:17,y:9,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:`Train`}),(0,d.jsx)(`line`,{x1:0,y1:16,x2:14,y2:16,stroke:`var(--presence)`,strokeWidth:2,strokeDasharray:`4 2`}),(0,d.jsx)(`text`,{x:17,y:20,fontSize:8,fill:`var(--text-muted)`,fontFamily:`inherit`,children:`Val`})]}),t[30]=N):N=t[30];let P;return t[31]!==g||t[32]!==T||t[33]!==E||t[34]!==D||t[35]!==O||t[36]!==_||t[37]!==y||t[38]!==S||t[39]!==C||t[40]!==w?(P=(0,d.jsxs)(`g`,{transform:g,children:[_,y,S,C,w,T,E,D,O,N]}),t[31]=g,t[32]=T,t[33]=E,t[34]=D,t[35]=O,t[36]=_,t[37]=y,t[38]=S,t[39]=C,t[40]=w,t[41]=P):P=t[41],P}function F({title:e=`Training Curves`,icon:t=`sparkle`,iconColor:n=`var(--presence)`,epochs:r,trainLoss:o,valLoss:s,trainAcc:c,valAcc:l,bestEpoch:f,lossLabel:p=`Loss`,accLabel:m=`Accuracy`,footer:h,delay:g}){let _=i[t]??i.sparkle,v=o!==void 0||s!==void 0,y=c!==void 0||l!==void 0,b=+!!v+ +!!y,x=b>1?180:220,S=b*x,C=(0,u.useMemo)(()=>{if(f===void 0)return null;let e=r.indexOf(f);return e>=0?e:null},[f,r]),w=(0,u.useMemo)(()=>v?N(r,o,s,x,C,!0):null,[r,o,s,x,C,v]),T=(0,u.useMemo)(()=>y?N(r,c,l,x,C,!1):null,[r,c,l,x,C,y]);return!r.length||b===0?null:(0,d.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`},children:[(0,d.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,d.jsx)(_,{className:`ic`,style:{color:n}}),e]}),(0,d.jsxs)(`svg`,{viewBox:`0 0 ${A} ${S}`,width:`100%`,role:`img`,"aria-label":e,style:{display:`block`,overflow:`visible`},children:[w&&(0,d.jsx)(P,{model:w,epochs:r,label:p,offsetY:0}),T&&(0,d.jsx)(P,{model:T,epochs:r,label:m,offsetY:w?x:0})]}),h&&(0,d.jsx)(`div`,{className:`insight-summary`,dangerouslySetInnerHTML:a(h)})]})}var I=e({aiRegistry:()=>L}),L={reasoning:l(f),toolcalls:l(m),agenttrace:l(h),modelcompare:l(g),tokenstream:l(v),retrieval:l(b),whatchanged:l(x),routing:l(S),embedmap:l(w),calibration:l(T),httpexchange:l(O),trainingcurve:l(F)};export{I as n,L as t};