@capagents/forgeqe 3.3.9 → 3.4.1

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 (147) hide show
  1. package/HOW_TO_USE.md +53 -5
  2. package/dist/docs-site/docs/area-browser/index.html +6 -3
  3. package/dist/docs-site/docs/area-quality/index.html +37 -0
  4. package/dist/docs-site/docs/cost-architecture/index.html +45 -1
  5. package/dist/docs-site/docs/reference/index.html +1 -0
  6. package/dist/docs-site/docs/search.js +1 -1
  7. package/dist/docs-site/docs/using/index.html +4 -2
  8. package/dist/docs-site/docs/web-app/index.html +11 -7
  9. package/dist/forgeqe.js +2069 -2046
  10. package/dist/template.html +63 -63
  11. package/dist/web/assets/{3d-force-graph-BPsVSYjw.js → 3d-force-graph-B-g_aIro.js} +1 -1
  12. package/dist/web/assets/Agent-FGPuvhc5.js +10 -0
  13. package/dist/web/assets/AgentWork-CFw0XcKd.js +2 -0
  14. package/dist/web/assets/ApiTests-D5rqD6gA.js +17 -0
  15. package/dist/web/assets/{Browse-DbIFxsy8.js → Browse-DLECqaFU.js} +1 -1
  16. package/dist/web/assets/Chat-DS4jyAH3.js +3 -0
  17. package/dist/web/assets/{CommandPalette-DfoEUEL6.js → CommandPalette-x_RA-vYW.js} +1 -1
  18. package/dist/web/assets/Compare-BFDv-NmH.js +1 -0
  19. package/dist/web/assets/Cost-_h1bxSj0.js +1 -0
  20. package/dist/web/assets/{Data-DZlKsTwA.js → Data-BuIpjLOr.js} +4 -4
  21. package/dist/web/assets/Desktop-F-PyYzC0.js +1 -0
  22. package/dist/web/assets/DesktopReview-CODdFSMN.js +2 -0
  23. package/dist/web/assets/Evidence-BXr78jgr.js +1 -0
  24. package/dist/web/assets/Explore-AAssIdGu.js +2 -0
  25. package/dist/web/assets/Features-Ce2hYdNS.js +1 -0
  26. package/dist/web/assets/Flags-DRXJnHt4.js +2 -0
  27. package/dist/web/assets/Flaky-BGUyv4_b.js +1 -0
  28. package/dist/web/assets/Impact-B6F9nuZt.js +3 -0
  29. package/dist/web/assets/Jobs-BsP-lQnC.js +5 -0
  30. package/dist/web/assets/KindPage-jQ0mJt7b.js +6 -0
  31. package/dist/web/assets/LiveDevice-C0OpjAg0.js +1 -0
  32. package/dist/web/assets/Migration-yiY2-7f3.js +8 -0
  33. package/dist/web/assets/Mobile-DcL2FOJg.js +1 -0
  34. package/dist/web/assets/Observability-BdpwjRNO.js +1 -0
  35. package/dist/web/assets/{OwnItems-CqCOuvba.js → OwnItems-DRV4_VbL.js} +3 -3
  36. package/dist/web/assets/PageAgent-C_DrJ3kc.js +1 -0
  37. package/dist/web/assets/Product-BoLtQxi6.js +6 -0
  38. package/dist/web/assets/Production-DgMWWNd_.js +1 -0
  39. package/dist/web/assets/Quality-Dfh-gpB-.js +1 -0
  40. package/dist/web/assets/Readiness-BzlzH-RQ.js +1 -0
  41. package/dist/web/assets/Record-BpL7Br8t.js +1 -0
  42. package/dist/web/assets/Regression-VL1J4PQB.js +5 -0
  43. package/dist/web/assets/{RelationGraph-ClPBGuMw.js → RelationGraph-CrEnF6ZB.js} +1 -1
  44. package/dist/web/assets/Reports-CzJULGPA.js +2 -0
  45. package/dist/web/assets/Requirements-CsfwSrgh.js +2 -0
  46. package/dist/web/assets/Responsive-GfKHZLev.js +3 -0
  47. package/dist/web/assets/RunDiff-DZw8Jja0.js +1 -0
  48. package/dist/web/assets/Settings-CiMIX_QR.js +21 -0
  49. package/dist/web/assets/SiteScan-Cydt89Ja.js +5 -0
  50. package/dist/web/assets/Steps-BoyXqIqo.js +2 -0
  51. package/dist/web/assets/TestData-Jwowbnv2.js +2 -0
  52. package/dist/web/assets/TestManagement-BPx01M_H.js +4 -0
  53. package/dist/web/assets/{WhatsNew-DrPf6l9-.js → WhatsNew-DAtb7FTn.js} +1 -1
  54. package/dist/web/assets/{agentSettingsSheet-DyaVNewv.js → agentSettingsSheet-DxBRwlvu.js} +1 -1
  55. package/dist/web/assets/{api-Dr3U7W5w.js → api-B8AQ8-Gb.js} +1 -1
  56. package/dist/web/assets/dataParts-DvgtfSmo.js +3 -0
  57. package/dist/web/assets/{desktopAppPath-kQmQOW6a.js → desktopAppPath-Mg0cuo3X.js} +1 -1
  58. package/dist/web/assets/{flowTheme-CVnIjV_m.js → flowTheme-BcMJKyow.js} +1 -1
  59. package/dist/web/assets/frame-Z5TaJY7O.js +23 -0
  60. package/dist/web/assets/index-BEY6ZWQm.css +2 -0
  61. package/dist/web/assets/index-nbjwmmih.js +47 -0
  62. package/dist/web/assets/{nav-DVPiPhOy.js → nav-DRpijFeN.js} +1 -1
  63. package/dist/web/assets/pageBack-CINGjBHZ.js +9 -0
  64. package/dist/web/assets/{palette-DwrGI2Fp.js → palette-DOQemIAv.js} +1 -1
  65. package/dist/web/assets/{paletteCommands-DOF2o-rv.js → paletteCommands-Bx61jZay.js} +1 -1
  66. package/dist/web/assets/{parts-DgJ2y_ic.js → parts-BNAiSyF0.js} +1 -1
  67. package/dist/web/assets/{productParts-B78jij3z.js → productParts-tf1w_F1S.js} +1 -1
  68. package/dist/web/assets/qualityParts-O56nH8FQ.js +3 -0
  69. package/dist/web/assets/{recordTest-BbXVOuGZ.js → recordTest-S5MOLSrL.js} +1 -1
  70. package/dist/web/assets/sectionList-BPBmSZXk.js +1 -0
  71. package/dist/web/assets/{stepper-CE4yOLqn.js → stepper-B7sbuU1Q.js} +1 -1
  72. package/dist/web/assets/{wizardParts-Bxb9UG5k.js → wizardParts-OhFd_xL2.js} +1 -1
  73. package/dist/web/index.html +8 -11
  74. package/docs/COST_ARCHITECTURE.md +48 -0
  75. package/docs/WEB_APP.md +12 -7
  76. package/docs/demo-perf-insurance/Acme_Insurance_NFRs.docx +0 -0
  77. package/docs/demo-perf-insurance/Acme_Insurance_NFRs.xlsx +0 -0
  78. package/docs/demo-perf-insurance/README.md +181 -0
  79. package/docs/demo-perf-insurance/env.yaml +16 -0
  80. package/docs/demo-perf-insurance/nft-month-end-summary.csv +12 -0
  81. package/docs/demo-perf-insurance/nft-run-1-summary.csv +12 -0
  82. package/docs/demo-perf-insurance/nft-soak-results.jtl +4801 -0
  83. package/docs/demo-perf-insurance/nft-storm-surge-summary.csv +5 -0
  84. package/docs/demo-perf-insurance/nft-stress-summary.csv +5 -0
  85. package/docs/user-guide.html +48 -5
  86. package/forgeqe.example.yaml +2 -1
  87. package/package.json +1 -1
  88. package/prompts/brain.md +1 -1
  89. package/prompts/perf-strategy.md +3 -1
  90. package/py/forgeqe_engine/busy.py +109 -0
  91. package/py/forgeqe_engine/capture.py +5 -0
  92. package/py/forgeqe_engine/checks.py +30 -0
  93. package/py/forgeqe_engine/d365.py +6 -4
  94. package/py/forgeqe_engine/diagnostics.py +87 -6
  95. package/py/forgeqe_engine/flowmatch.py +45 -3
  96. package/py/forgeqe_engine/logins.py +28 -0
  97. package/py/forgeqe_engine/memory.py +29 -7
  98. package/py/forgeqe_engine/recordsession.py +29 -3
  99. package/py/forgeqe_engine/service.py +112 -9
  100. package/py/forgeqe_engine/webrecord_page.py +19 -1
  101. package/dist/web/assets/Agent-DY6pRvcD.js +0 -10
  102. package/dist/web/assets/AgentWork-Brch_Mn3.js +0 -2
  103. package/dist/web/assets/ApiTests-BtWKVPw5.js +0 -17
  104. package/dist/web/assets/Chat-BWiH0XGV.js +0 -3
  105. package/dist/web/assets/Compare-DTZ_BW1P.js +0 -1
  106. package/dist/web/assets/Cost-DDghPWch.js +0 -1
  107. package/dist/web/assets/Desktop-DTIZ62Pi.js +0 -1
  108. package/dist/web/assets/DesktopReview-B8-dSGJH.js +0 -2
  109. package/dist/web/assets/Evidence-BYw_Q4Ul.js +0 -1
  110. package/dist/web/assets/Explore-BL_c5WK1.js +0 -2
  111. package/dist/web/assets/Features-DrFNrvbh.js +0 -1
  112. package/dist/web/assets/Flags-CHrDwhqG.js +0 -2
  113. package/dist/web/assets/Flaky-DtcLf8h6.js +0 -1
  114. package/dist/web/assets/Impact-CMU_ijo2.js +0 -3
  115. package/dist/web/assets/Jobs-BjybdQb_.js +0 -5
  116. package/dist/web/assets/KindPage-VK-Vgkzv.js +0 -6
  117. package/dist/web/assets/LiveDevice-BqL1P33F.js +0 -1
  118. package/dist/web/assets/Migration-7BI7iXIv.js +0 -8
  119. package/dist/web/assets/Mobile-AgAhvlVL.js +0 -1
  120. package/dist/web/assets/Observability-5r36Xf3d.js +0 -1
  121. package/dist/web/assets/PageAgent-00NQxK49.js +0 -1
  122. package/dist/web/assets/Product-B75ztJFn.js +0 -6
  123. package/dist/web/assets/Production-lIUlcjf0.js +0 -1
  124. package/dist/web/assets/Quality-BlRpB6mx.js +0 -1
  125. package/dist/web/assets/Readiness-CesaSDtp.js +0 -1
  126. package/dist/web/assets/Record-CLy9jQ5N.js +0 -1
  127. package/dist/web/assets/Regression-BjpZrkfK.js +0 -5
  128. package/dist/web/assets/Reports-Du8SNiHM.js +0 -2
  129. package/dist/web/assets/Requirements-Dr1iLoMc.js +0 -2
  130. package/dist/web/assets/Responsive-DcD6MLzG.js +0 -3
  131. package/dist/web/assets/RunDiff-cLSFOsfC.js +0 -1
  132. package/dist/web/assets/Settings-CUT5ggDd.js +0 -21
  133. package/dist/web/assets/SiteScan-iUfWBeLV.js +0 -5
  134. package/dist/web/assets/Steps-DJYwIiDu.js +0 -2
  135. package/dist/web/assets/TestData-DqEcL5o4.js +0 -2
  136. package/dist/web/assets/TestManagement-mBcfWTVH.js +0 -4
  137. package/dist/web/assets/code-Jek8uWUO.js +0 -1
  138. package/dist/web/assets/dataParts-Bdf97ZOD.js +0 -3
  139. package/dist/web/assets/frame-CavkQick.js +0 -13
  140. package/dist/web/assets/index-BaEsXdFc.css +0 -2
  141. package/dist/web/assets/index-C1kXcI0E.js +0 -57
  142. package/dist/web/assets/markdown-Bvv6oj4v.js +0 -7
  143. package/dist/web/assets/pageBack-Blig1Uqs.js +0 -3
  144. package/dist/web/assets/poll-CHpac9Fb.js +0 -1
  145. package/dist/web/assets/qualityParts-t5t9kEKG.js +0 -2
  146. package/dist/web/assets/sectionList-DMyhAqst.js +0 -1
  147. package/dist/web/assets/when-BuWCTaKm.js +0 -1
@@ -1,7 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlight-b70fFRUT.js","assets/rolldown-runtime-XKyaHtl9.js","assets/jsx-runtime-LKYXHABd.js","assets/default-DB4ZMZxa.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{t as n}from"./react-BDur5s0O.js";import{B as r,l as i,o as a,t as o}from"./preload-helper-BupTYkQW.js";import{t as s}from"./utils-DJRAScIl.js";import{t as c}from"./jsx-runtime-LKYXHABd.js";import{M as l}from"./api-Dr3U7W5w.js";import{S as u,b as d,g as f,r as p,v as m,x as h}from"./pageBack-Blig1Uqs.js";import{At as g,E as _,Ur as v,Z as y,ct as b,dr as x,ft as S,mt as C,qt as w,ur as T,w as E,xt as D}from"./line-icons-Cwj9OmCz.js";import{n as O,t as k}from"./code-Jek8uWUO.js";import"./default-DB4ZMZxa.js";var A=t(n(),1),j=c();function M({children:e,className:t,...n}){return(0,j.jsx)(`div`,{"data-code-block":``,className:s(`not-prose flex w-full min-w-0 flex-col overflow-clip rounded-xl border border-line bg-bg text-ink shadow-sm`,t),...n,children:e})}function N({children:e,className:t,...n}){return(0,j.jsx)(`div`,{className:s(`flex items-center justify-between gap-2`,t),...n,children:e})}function P({code:e,language:t=`plaintext`,log:n=!1,wrap:i=!1,marked:a=new Set,lineNumbers:o=!1,className:c}){let l=na(n?null:e||null,t),u=n?(0,j.jsx)(p,{text:e}):l,d=e.split(`
3
- `),f=o||a.size>0,m=(0,A.useRef)(null),h=a.size?Math.min(...a):-1;return(0,A.useEffect)(()=>{m.current?.scrollIntoView({block:`center`,behavior:r()})},[h]),(0,j.jsxs)(`div`,{className:s(`flex min-h-0 w-full flex-1 overflow-auto py-4 font-mono text-body-sm leading-[1.7]`,c),children:[f&&(0,j.jsx)(`pre`,{"aria-hidden":`true`,className:`m-0 min-h-full flex-none self-start text-right text-muted/70 select-none`,children:d.map((e,t)=>(0,j.jsx)(`span`,{ref:t===h?m:void 0,className:s(`block px-4`,a.has(t)&&`font-medium text-ink`),children:t+1},t))}),(0,j.jsxs)(`pre`,{className:s(`relative m-0 min-w-0 flex-1 pr-4`,f?``:`pl-4`,i?`whitespace-pre-wrap [overflow-wrap:anywhere]`:`whitespace-pre`),children:[!i&&[...a].map(e=>(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute right-0 left-[-16px] bg-accent-soft`,style:{top:`calc(${e} * 1.7em)`,height:`1.7em`}},e)),(0,j.jsx)(`code`,{className:`hljs relative`,children:u})]})]})}function F({files:e,footer:t,empty:n,className:r,label:i,wrap:a=!1,lineNumbers:o=!1}){let[c,l]=(0,A.useState)(0),[d,f]=(0,A.useState)(a),p=e[Math.min(c,e.length-1)],m=p?.code||``;return(0,j.jsxs)(M,{role:`figure`,"aria-label":i,className:s(`min-h-0`,r),children:[(0,j.jsxs)(N,{className:`min-h-10 border-b border-line bg-surface-muted py-1 pr-2 pl-4`,children:[e.length>1?(0,j.jsx)(`div`,{role:`group`,"aria-label":`Files`,className:`flex min-w-0 flex-1 items-center gap-1 overflow-x-auto`,children:e.map((e,t)=>(0,j.jsx)(`button`,{type:`button`,"aria-pressed":t===c,onClick:()=>l(t),"data-tip":e.title,className:s(u({size:`sm`}),`block flex-none truncate px-2 font-mono font-normal`),children:e.name},e.name+t))}):(0,j.jsx)(`span`,{"data-tip":p?.title,className:`min-w-0 truncate font-mono text-body-sm text-muted`,children:p?.name}),m&&(0,j.jsxs)(`span`,{className:`flex flex-none items-center gap-1`,children:[(0,j.jsx)(h,{variant:`icon`,size:`icon-sm`,"aria-pressed":d,"aria-label":d?`Do not wrap long lines`:`Wrap long lines`,"data-tip":d?`Do not wrap long lines`:`Wrap long lines`,onClick:()=>f(!d),children:(0,j.jsx)(v,{size:14,"aria-hidden":`true`})}),(0,j.jsx)(Qi,{text:m,label:`Copy ${p?.name||`the code`}`})]})]}),m?(0,j.jsx)(P,{code:m,language:p?.lang||`plaintext`,log:p?.log,wrap:d,marked:p?.marked,lineNumbers:o},p?.name):(0,j.jsx)(`div`,{className:`flex min-h-[200px] flex-1 items-center justify-center px-4 text-center text-body-sm text-muted`,children:n??`Nothing to show.`}),t&&(0,j.jsx)(`div`,{className:`border-t border-line px-4 py-2 text-body-sm text-muted`,children:t})]})}function I({diff:e,className:t}){let n=0,r=0,i=e.split(`
4
- `).flatMap((e,t)=>{if(/^(diff |index |--- |\+\+\+ )/.test(e))return[];let i=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(e);return i?(n=Number(i[1]),r=Number(i[2]),[{key:t,kind:`hunk`,text:e,a:``,b:``}]):e.startsWith(`+`)?[{key:t,kind:`add`,text:e.slice(1),a:``,b:String(r++)}]:e.startsWith(`-`)?[{key:t,kind:`del`,text:e.slice(1),a:String(n++),b:``}]:e.startsWith(`\\`)?[{key:t,kind:`hunk`,text:e,a:``,b:``}]:[{key:t,kind:`same`,text:e.startsWith(` `)?e.slice(1):e,a:String(n++),b:String(r++)}]});return(0,j.jsx)(`div`,{className:s(k,`max-h-[420px] p-0 leading-[1.6]`,t),children:(0,j.jsx)(`table`,{className:`w-full border-collapse`,children:(0,j.jsx)(`tbody`,{children:i.map(e=>(0,j.jsxs)(`tr`,{className:e.kind===`add`?`bg-pass-soft`:e.kind===`del`?`bg-fail-soft`:e.kind===`hunk`?`bg-surface-muted`:void 0,children:[(0,j.jsx)(`td`,{className:`w-10 px-2 text-right align-top text-muted tabular-nums select-none`,children:e.a}),(0,j.jsx)(`td`,{className:`w-10 px-2 text-right align-top text-muted tabular-nums select-none`,children:e.b}),(0,j.jsx)(`td`,{"aria-hidden":`true`,className:s(`w-4 align-top select-none`,e.kind===`add`?`text-pass`:e.kind===`del`?`text-fail`:`text-muted`),children:e.kind===`add`?`+`:e.kind===`del`?`−`:``}),(0,j.jsxs)(`td`,{className:s(`pr-4 align-top whitespace-pre`,e.kind===`hunk`?`text-muted`:`text-ink`),children:[(0,j.jsx)(`span`,{className:`sr-only`,children:e.kind===`add`?`added: `:e.kind===`del`?`removed: `:``}),e.text||` `]})]},e.key))})})})}var ee={};function te(e,t){let n=t||ee;return ne(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function ne(e,t,n){if(ie(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return re(e.children,t,n)}return Array.isArray(e)?re(e,t,n):``}function re(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ne(e[i],t,n);return r.join(``)}function ie(e){return!!(e&&typeof e==`object`)}var ae=document.createElement(`i`);function oe(e){let t=`&`+e+`;`;ae.innerHTML=t;let n=ae.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function L(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function R(e,t){return e.length>0?(L(e,e.length,0,t),e):t}var se={}.hasOwnProperty;function ce(e){let t={},n=-1;for(;++n<e.length;)le(t,e[n]);return t}function le(e,t){let n;for(n in t){let r=(se.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){se.call(r,a)||(r[a]=[]);let e=i[a];ue(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ue(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);L(e,0,0,r)}function de(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function z(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var B=K(/[A-Za-z]/),V=K(/[\dA-Za-z]/),fe=K(/[#-'*+\--9=?A-Z^-~]/);function pe(e){return e!==null&&(e<32||e===127)}var me=K(/\d/),he=K(/[\dA-Fa-f]/),ge=K(/[!-/:-@[-`{-~]/);function H(e){return e!==null&&e<-2}function U(e){return e!==null&&(e<0||e===32)}function W(e){return e===-2||e===-1||e===32}var _e=K(/\p{P}|\p{S}/u),G=K(/\s/);function K(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return W(r)?(e.enter(n),s(r)):t(r)}function s(r){return W(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function ve(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&W(t)?(e.enter(r),c(t)):l(t)}function c(t){return W(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var ye={tokenize:be};function be(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return H(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var xe=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Se(this,e,t,n,!1)}addBefore(e,t,n){Se(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Se(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Ce={tokenize:Te},we={tokenize:Ee};function Te(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new xe;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(we,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(we,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return H(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new xe;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ee(e,t,n){return q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function De(e){if(e===null||U(e)||G(e))return 1;if(_e(e))return 2}function Oe(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var ke={name:`attention`,resolveAll:Ae,tokenize:je};function Ae(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Me(o,-a),Me(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=R(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=R(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=R(r,Oe(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=R(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=R(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),L(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function je(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=De(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=De(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Me(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ne={name:`autolink`,tokenize:Pe};function Pe(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return B(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||V(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||V(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||pe(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):fe(t)?(e.consume(t),l):n(t)}function u(e){return V(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||V(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Fe={partial:!0,tokenize:Ie};function Ie(e,t,n){return r;function r(t){return W(t)?q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||H(e)?t(e):n(e)}}var Le={continuation:{tokenize:ze},exit:Be,name:`blockQuote`,tokenize:Re};function Re(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return W(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ze(e,t,n){let r=this;return i;function i(t){return W(t)?q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Le,t,n)(r)}}function Be(e){e.exit(`blockQuote`)}var Ve={name:`characterEscape`,tokenize:He};function He(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ge(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Ue={name:`characterReference`,tokenize:We};function We(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=V,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=he,u):(e.enter(`characterReferenceValue`),a=7,o=me,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===V&&!oe(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ge={partial:!0,tokenize:Ke};function Ke(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var qe={concrete:!0,name:`codeFenced`,tokenize:Je};function Je(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),W(t)?q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||H(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ge,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||H(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&W(t)?q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||H(t)?e.check(Ge,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||H(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),W(t)?q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),W(t)?q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||H(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Ye={name:`codeIndented`,tokenize:Ze},Xe={partial:!0,tokenize:Qe};function Ze(e,t,n){return r;function r(t){return e.enter(`codeIndented`),ve(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):H(t)?e.attempt(Xe,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||H(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Qe(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):H(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):ve(e,t,a,`linePrefix`,4,4)(o)}function a(e){return H(e)?i(e):n(e)}}var $e={name:`codeText`,previous:tt,resolve:et,tokenize:nt};function et(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function tt(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function nt(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):H(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||H(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var rt=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&it(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),it(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),it(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);it(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);it(this.left,t.reverse())}}}};function it(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function at(e){let t={},n=-1,r,i,a,o,s,c,l,u=new rt(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,ot(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return L(e,0,1/0,u.slice(0)),!l}function ot(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var st={resolve:lt,tokenize:ut},ct={partial:!0,tokenize:dt};function lt(e){return at(e),e}function ut(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):H(t)?e.check(ct,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function dt(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),q(e,a,`linePrefix`)}function a(i){if(i===null||H(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function ft(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||pe(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||H(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||U(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||pe(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function pt(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):H(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||H(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!W(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function mt(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):H(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||H(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ht(e,t){let n;return r;function r(i){return H(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):W(i)?q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var gt={name:`definition`,tokenize:vt},_t={partial:!0,tokenize:yt};function vt(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return pt.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=z(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return U(t)?ht(e,l)(t):l(t)}function l(t){return ft(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(_t,d,d)(t)}function d(t){return W(t)?q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||H(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function yt(e,t,n){return r;function r(t){return U(t)?ht(e,i)(t):n(t)}function i(t){return mt(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return W(t)?q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||H(e)?t(e):n(e)}}var bt={name:`hardBreakEscape`,tokenize:xt};function xt(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return H(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var St={name:`headingAtx`,resolve:Ct,tokenize:wt};function Ct(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};L(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function wt(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||U(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||H(n)?(e.exit(`atxHeading`),t(n)):W(n)?q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||U(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Tt=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Et=[`pre`,`script`,`style`,`textarea`],Dt={concrete:!0,name:`htmlFlow`,resolveTo:kt,tokenize:At},Ot={partial:!0,tokenize:jt};function kt(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function At(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):B(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):B(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return B(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||U(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Et.includes(l)?(i=1,r.interrupt?t(s):O(s)):Tt.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||V(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return W(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||B(t)?(e.consume(t),b):W(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||V(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):W(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):W(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||H(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||U(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||W(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||H(t)?O(t):W(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ee):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):H(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ot,te,k)(t)):t===null||H(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ge,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||H(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Et.includes(n)?(e.consume(t),ee):O(t)}return B(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),ee):t===45&&i===2?(e.consume(t),I):O(t)}function ee(t){return t===null||H(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),ee)}function te(n){return e.exit(`htmlFlow`),t(n)}}function jt(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Fe,t,n)}}var Mt={name:`htmlText`,tokenize:Nt};function Nt(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):B(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):B(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):H(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):H(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):H(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):H(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return B(t)?(e.consume(t),S):n(t)}function S(t){return t===45||V(t)?(e.consume(t),S):C(t)}function C(t){return H(t)?(o=C,N(t)):W(t)?(e.consume(t),C):M(t)}function w(t){return t===45||V(t)?(e.consume(t),w):t===47||t===62||U(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||B(t)?(e.consume(t),E):H(t)?(o=T,N(t)):W(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||V(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):H(t)?(o=D,N(t)):W(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):H(t)?(o=O,N(t)):W(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):H(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||U(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||U(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return W(t)?q(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Pt={name:`labelEnd`,resolveAll:Rt,resolveTo:zt,tokenize:Bt},Ft={tokenize:Vt},It={tokenize:Ht},Lt={tokenize:Ut};function Rt(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&L(e,0,e.length,n),e}function zt(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=R(o,e.slice(i+1,i+r+3)),o=R(o,[[`enter`,l,t]]),o=R(o,Oe(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=R(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=R(o,e.slice(a+1)),o=R(o,[[`exit`,s,t]]),L(e,i,e.length,o),e}function Bt(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(z(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Ft,u,o?u:d)(t):t===91?e.attempt(It,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Lt,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Vt(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return U(t)?ht(e,a)(t):a(t)}function a(t){return t===41?u(t):ft(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return U(t)?ht(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?mt(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return U(t)?ht(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ht(e,t,n){let r=this;return i;function i(t){return pt.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(z(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ut(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Wt={name:`labelStartImage`,resolveAll:Pt.resolveAll,tokenize:Gt};function Gt(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Kt={name:`labelStartLink`,resolveAll:Pt.resolveAll,tokenize:qt};function qt(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Jt={name:`lineEnding`,tokenize:Yt};function Yt(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),q(e,t,`linePrefix`)}}var Xt={name:`thematicBreak`,tokenize:Zt};function Zt(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||H(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),W(t)?q(e,s,`whitespace`)(t):s(t))}}var J={continuation:{tokenize:tn},exit:rn,name:`list`,tokenize:en},Qt={partial:!0,tokenize:an},$t={partial:!0,tokenize:nn};function en(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:me(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Xt,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return me(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Fe,r.interrupt?n:u,e.attempt(Qt,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return W(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function tn(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Fe,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!W(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($t,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(J,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function nn(e,t,n){let r=this;return q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function rn(e){e.exit(this.containerState.type)}function an(e,t,n){let r=this;return q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!W(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var on={name:`setextUnderline`,resolveTo:sn,tokenize:cn};function sn(e,t){let n=new xe,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function cn(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),W(t)?q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||H(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ln={tokenize:un};function un(e){let t=this,n=e.attempt(Fe,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(st,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var dn={resolveAll:hn()},fn=mn(`string`),pn=mn(`text`);function mn(e){return{resolveAll:hn(e===`text`?gn:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function hn(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function gn(e,t){let n=new xe,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var _n=e({attentionMarkers:()=>Tn,contentInitial:()=>yn,disable:()=>En,document:()=>vn,flow:()=>xn,flowInitial:()=>bn,insideSpan:()=>wn,string:()=>Sn,text:()=>Cn}),vn={42:J,43:J,45:J,48:J,49:J,50:J,51:J,52:J,53:J,54:J,55:J,56:J,57:J,62:Le},yn={91:gt},bn={[-2]:Ye,[-1]:Ye,32:Ye},xn={35:St,42:Xt,45:[on,Xt],60:Dt,61:on,95:Xt,96:qe,126:qe},Sn={38:Ue,92:Ve},Cn={[-5]:Jt,[-4]:Jt,[-3]:Jt,33:Wt,38:Ue,42:ke,60:[Ne,Mt],91:Kt,92:[bt,Ve],93:Pt,95:ke,96:$e},wn={null:[ke,dn]},Tn={null:[42,95]},En={null:[]};function Dn(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=R(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Oe(a,l.events,l),l.events):[]}function f(e,t){return kn(p(e),t)}function p(e){return On(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){H(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&L(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function On(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function kn(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
5
- `;break;case-3:o=`\r
6
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function An(e){let t={constructs:ce([_n,...(e||{}).extensions||[]]),content:n(ye),defined:[],document:n(Ce),flow:n(ln),lazy:{},string:n(fn),text:n(pn)};return t;function n(e){return n;function n(n){return Dn(t,e,n)}}}function jn(e){for(;!at(e););return e}var Mn=/[\0\t\n\r]/g;function Nn(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){Mn.lastIndex=c;let n=Mn.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Pn=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Fn(e){return e.replace(Pn,In)}function In(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return de(n.slice(t?2:1),t?16:10)}return oe(n)||e}function Ln(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?zn(e.position):`start`in e||`end`in e?zn(e):`line`in e||`column`in e?Rn(e):``}function Rn(e){return Bn(e&&e.line)+`:`+Bn(e&&e.column)}function zn(e){return Rn(e&&e.start)+`-`+Rn(e&&e.end)}function Bn(e){return e&&typeof e==`number`?e:1}var Vn={}.hasOwnProperty;function Hn(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Un(n)(jn(An(n).document().write(Nn()(e,t,!0))))}function Un(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(U),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(me),blockQuote:o(ue),characterEscape:E,characterReference:E,codeFenced:o(B),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(B,s),codeText:o(V,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(fe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(pe),hardBreakEscape:o(he),hardBreakTrailing:o(he),htmlFlow:o(ge,s),htmlFlowData:E,htmlText:o(ge,s),htmlTextData:E,image:o(H),label:s,link:o(U),listItem:o(_e),listItemValue:p,listOrdered:o(W,f),listUnordered:o(W),paragraph:o(G),reference:ie,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(me),strong:o(K),thematicBreak:o(ve)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:L,characterReferenceMarkerNumeric:L,characterReferenceValue:R,characterReference:se,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:ee,resourceTitleString:ne,resource:re,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Wn(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),Vn.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Kn).call(o,void 0,e[0])}for(r.position={start:Y(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Y(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Y(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+Ln({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Kn).call(this,e,r[0])),n.position.end=Y(e.end)}function d(){return te(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=z(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=q(),n.position={start:Y(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Y(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Y(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Fn(t),n.identifier=z(t).toLowerCase()}function I(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=z(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function L(e){this.data.characterReferenceType=e.type}function R(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=de(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=oe(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=Y(e.end)}function ce(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[],position:void 0}}function B(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function V(){return{type:`inlineCode`,value:``,position:void 0}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function pe(){return{type:`emphasis`,children:[],position:void 0}}function me(){return{type:`heading`,depth:0,children:[],position:void 0}}function he(){return{type:`break`,position:void 0}}function ge(){return{type:`html`,value:``,position:void 0}}function H(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function U(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function W(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function _e(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function G(){return{type:`paragraph`,children:[],position:void 0}}function K(){return{type:`strong`,children:[],position:void 0}}function q(){return{type:`text`,value:``,position:void 0}}function ve(){return{type:`thematicBreak`,position:void 0}}}function Y(e){return{line:e.line,column:e.column,offset:e.offset}}function Wn(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Wn(e,r):Gn(e,r)}}function Gn(e,t){let n;for(n in t)if(Vn.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Kn(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Ln({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+`) is still open`)}function qn(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Jn(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var Yn=(function(e){if(e==null)return er;if(typeof e==`function`)return $n(e);if(typeof e==`object`)return Array.isArray(e)?Xn(e):Zn(e);if(typeof e==`string`)return Qn(e);throw Error(`Expected function, string, or object as test`)});function Xn(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Yn(e[n]);return $n(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Zn(e){let t=e;return $n(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Qn(e){return $n(t);function t(t){return t&&t.type===e}}function $n(e){return t;function t(t,n,r){return!!(tr(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function er(){return!0}function tr(e){return typeof e==`object`&&!!e&&`type`in e}function nr(e){return e}var rr=[],ir=`skip`;function ar(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=Yn(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+nr(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=rr;if(s&&r&&(o=or(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=or(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function or(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?rr:[e]}function sr(e,t,n){let r=Yn((n||{}).ignore||[]),i=cr(t),a=-1;for(;++a<i.length;)ar(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return ir}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function cr(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([lr(e[0]),ur(e[1])])}return t}function lr(e){return typeof e==`string`?new RegExp(Jn(e),`g`):e}function ur(e){return typeof e==`function`?e:function(){return e}}function dr(){return{transforms:[vr],enter:{literalAutolink:fr,literalAutolinkEmail:pr,literalAutolinkHttp:pr,literalAutolinkWww:pr},exit:{literalAutolink:_r,literalAutolinkEmail:gr,literalAutolinkHttp:mr,literalAutolinkWww:hr}}}function fr(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function pr(e){this.config.enter.autolinkProtocol.call(this,e)}function mr(e){this.config.exit.autolinkProtocol.call(this,e)}function hr(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function gr(e){this.config.exit.autolinkEmail.call(this,e)}function _r(e){this.exit(e)}function vr(e){sr(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yr],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,br]],{ignore:[`link`,`linkReference`]})}function yr(e,t,n,r,i){let a=``;if(!Cr(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!xr(n)))return!1;let o=Sr(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function br(e,t,n,r){return!Cr(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function xr(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Sr(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=qn(e,`(`),a=qn(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Cr(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||G(n)||_e(n))&&(!t||n!==47)}Nr.peek=Mr;function wr(){this.buffer()}function Tr(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Er(){this.buffer()}function Dr(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Or(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=z(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kr(e){this.exit(e)}function Ar(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=z(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jr(e){this.exit(e)}function Mr(){return`[`}function Nr(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Pr(){return{enter:{gfmFootnoteCallString:wr,gfmFootnoteCall:Tr,gfmFootnoteDefinitionLabelString:Er,gfmFootnoteDefinition:Dr},exit:{gfmFootnoteCallString:Or,gfmFootnoteCall:kr,gfmFootnoteDefinitionLabelString:Ar,gfmFootnoteDefinition:jr}}}Rr.attention=zr,Rr.peek=Br;function Fr(){return{canContainEols:[`delete`],enter:{strikethrough:Ir},exit:{strikethrough:Lr}}}function Ir(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Lr(e){this.exit(e)}function Rr(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function zr(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Br(){return`~`}function Vr(){return{enter:{table:Hr,tableData:Kr,tableHeader:Kr,tableRow:Wr},exit:{codeText:qr,table:Ur,tableData:Gr,tableHeader:Gr,tableRow:Gr}}}function Hr(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Ur(e){this.exit(e),this.data.inTable=void 0}function Wr(e){this.enter({type:`tableRow`,children:[]},e)}function Gr(e){this.exit(e)}function Kr(e){this.enter({type:`tableCell`,children:[]},e)}function qr(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Jr));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Jr(e,t){return t===`|`?t:e}function Yr(){return{exit:{taskListCheckValueChecked:Xr,taskListCheckValueUnchecked:Xr,paragraph:Zr}}}function Xr(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Zr(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Qr(){return[dr(),Pr(),Fr(),Vr(),Yr()]}var $r={tokenize:ui,partial:!0},ei={tokenize:di,partial:!0},ti={tokenize:fi,partial:!0},ni={tokenize:pi,partial:!0},ri={tokenize:mi,partial:!0},ii={name:`wwwAutolink`,tokenize:ci,previous:hi},ai={name:`protocolAutolink`,tokenize:li,previous:gi},X={name:`emailAutolink`,tokenize:si,previous:_i},Z={};function oi(){return{text:Z}}for(var Q=48;Q<123;)Z[Q]=X,Q++,Q===58?Q=65:Q===91&&(Q=97);Z[43]=X,Z[45]=X,Z[46]=X,Z[95]=X,Z[72]=[X,ai],Z[104]=[X,ai],Z[87]=[X,ii],Z[119]=[X,ii];function si(e,t,n){let r=this,i,a;return o;function o(t){return!vi(t)||!_i.call(r,r.previous)||yi(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return vi(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ri,u,l)(t):t===45||t===95||V(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&B(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ci(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!hi.call(r,r.previous)||yi(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check($r,e.attempt(ei,e.attempt(ti,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function li(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&gi.call(r,r.previous)&&!yi(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(B(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||pe(t)||U(t)||G(t)||_e(t)?n(t):e.attempt(ei,e.attempt(ti,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ui(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function di(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(ni,c,s)(t):t===null||U(t)||G(t)||t!==45&&_e(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function fi(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ni,t,a)(o):o===null||U(o)||G(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function pi(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||U(o)||G(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||U(e)||G(e)?t(e):r(e)}function a(e){return B(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):B(t)?(e.consume(t),o):n(t)}}function mi(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return V(e)?n(e):t(e)}}function hi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||U(e)}function gi(e){return!B(e)}function _i(e){return!(e===47||vi(e))}function vi(e){return e===43||e===45||e===46||e===95||V(e)}function yi(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var bi={tokenize:Oi,partial:!0};function xi(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Ti,continuation:{tokenize:Ei},exit:Di}},text:{91:{name:`gfmFootnoteCall`,tokenize:wi},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Si,resolveTo:Ci}}}}function Si(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=z(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ci(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function wi(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||U(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(z(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return U(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Ti(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||U(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=z(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return U(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Ei(e,t,n){return e.check(Fe,t,e.attempt(bi,t,n))}function Di(e){e.exit(`gfmFootnoteDefinition`)}function Oi(e,t,n){let r=this;return q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function ki(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&L(o,o.length,0,Oe(s,e.slice(r+1,n),t)),L(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),L(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=De(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=De(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Ai=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){ji(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function ji(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Mi(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Ni(){return{flow:{null:{name:`table`,tokenize:Pi,resolveAll:Fi}}}}function Pi(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):H(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):W(t)?q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||U(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,W(t)?q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return W(t)?q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||H(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return W(t)?q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||H(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||H(n)?(e.exit(`tableRow`),t(n)):W(n)?q(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||U(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Fi(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Ai;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Li(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ii(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ii(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ii(f,t,o,i,n,d)):(o[0]=o[1],d=Ii(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Li(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Mi(t.events,n))}return e}function Ii(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ri(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ri(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ri(t.events,n[2]),a=Ri(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ri(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Li(e,t,n,r,i){let a=[],o=Ri(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ri(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var zi={name:`tasklistCheck`,tokenize:Vi};function Bi(){return{text:{91:zi}}}function Vi(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return U(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return H(r)?t(r):W(r)?e.check({tokenize:Hi},t,n)(r):n(r)}}function Hi(e,t,n){return q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Ui(e){return ce([oi(),xi(),ki(e),Ni(),Bi()])}var Wi=12,Gi=`max-w-measure`,Ki=`[&_p]:max-w-none [&_ul]:max-w-none [&_ol]:max-w-none [&_blockquote]:max-w-none [&_h1]:max-w-none [&_h2]:max-w-none [&_h3]:max-w-none [&_h4]:max-w-none [&_h5]:max-w-none [&_h6]:max-w-none`,qi=`[&>h3:not(:first-child)]:mt-8 [&>h3:not(:first-child)]:pt-6 [&>hr+h3]:mt-6 [&>hr+h3]:pt-0[&>h4:not(:first-child)]:mt-8 [&>h4:not(:first-child)]:pt-6 [&>hr+h4]:mt-6 [&>hr+h4]:pt-0`;function Ji(e){let t=String(e??``).replace(/[\u0000-\u0020\u007f-\u009f]/g,``).trim();return t?/^https?:\/\/[^/]/i.test(t)?`web`:/^mailto:[^\s@]+@/i.test(t)?`mail`:/^[a-z]:[\\/]/i.test(t)?`path`:/^[a-z][a-z0-9+.-]*:/i.test(t)?`unsafe`:`path`:`unsafe`}function Yi(e){return Hn(e,{extensions:[Ui()],mdastExtensions:[Qr()]})}var Xi=e=>`value`in e&&typeof e.value==`string`?e.value:`children`in e?e.children.map(Xi).join(``):``;async function Zi(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function Qi({text:e,label:t}){let[n,r]=(0,A.useState)(!1);return(0,j.jsx)(h,{variant:`icon`,size:`icon-sm`,"aria-label":n?`Copied`:t,"data-tip":n?`Copied`:t,onClick:async()=>{await Zi(e)&&(r(!0),setTimeout(()=>r(!1),1500))},className:`flex-none`,children:n?(0,j.jsx)(E,{size:14,"aria-hidden":`true`,className:`text-pass`}):(0,j.jsx)(y,{size:14,"aria-hidden":`true`})})}var $i=null,ea,ta=()=>ea??=o(()=>import(`./highlight-b70fFRUT.js`).then(e=>void($i=e),e=>{throw ea=void 0,e}),__vite__mapDeps([0,1,2,3]));function na(e,t){let[n,r]=(0,A.useState)(!!$i);return(0,A.useEffect)(()=>{if(n||e===null)return;let t=!1;return ta().then(()=>!t&&r(!0),()=>{}),()=>{t=!0}},[n,e]),(0,A.useMemo)(()=>e===null?null:$i?$i.highlighted(e,t):e,[e,t,n])}function ra(e){return(/(?:title|file|filename)=["']?([^"'\s]+)["']?/.exec(e||``)||/^\s*([\w./\\-]+\.\w{1,8})\s*$/.exec(e||``))?.[1]??``}function ia(e){let[t=``,n=``]=String(e||``).split(`:`);return{lang:t.toLowerCase(),file:n}}var aa={ts:`typescript`,tsx:`typescript`,js:`javascript`,jsx:`javascript`,py:`python`,sh:`bash`,shell:`bash`,yml:`yaml`,cs:`csharp`,md:`markdown`};function oa({value:e,lang:t,meta:n}){let{lang:r,file:i}=ia(t),a=i||ra(n);return r===`diff`||r===`patch`?(0,j.jsx)(I,{diff:e,className:`my-4`}):(0,j.jsx)(F,{files:[{name:a||aa[r]||r||`text`,code:e,lang:r||`plaintext`}],label:a||`Code`,className:`my-4 max-h-[480px]`})}var sa=/^(passed|pass|ok|success|succeeded|done|✓|✅|yes)$/i,ca=/^(failed|fail|error|errored|broken|✗|❌|no)$/i,la=/^(skipped|skip|pending|blocked|n\/a|stopped|flaky)$/i;function ua({node:e,ctx:t}){let[n,r]=(0,A.useState)(!1),[a,...o]=e.children,c=e.align||[],l=n?o:o.slice(0,Wi),u=e.children.map(e=>e.children.map(e=>Xi(e).replace(/\s+/g,` `).trim()).join(` `)).join(`
7
- `),d=(e,n,r,i)=>{let a=Xi(e).trim(),o=r?`th`:`td`,l=!r&&(sa.test(a)?`pass`:ca.test(a)?`fail`:la.test(a)?`skip`:``);return(0,j.jsx)(o,{scope:r?`col`:void 0,className:s(`border-t border-line-soft px-4 py-2 align-top`,r&&`border-t-0 bg-surface-muted text-body-sm font-medium whitespace-nowrap text-ink-2`,c[i]===`right`?`text-right tabular-nums`:c[i]===`center`?`text-center`:`text-left`),children:l?(0,j.jsx)(f,{tone:l===`pass`?`pass`:l===`fail`?`fail`:`neutral`,children:a}):$(e,t)},n)};return(0,j.jsxs)(`figure`,{className:`my-4`,children:[(0,j.jsx)(`div`,{className:s(i,`overflow-x-auto`),children:(0,j.jsxs)(`table`,{className:`min-w-full border-collapse text-body-sm [overflow-wrap:normal]`,children:[a&&(0,j.jsx)(`thead`,{className:`bg-surface-strong`,children:(0,j.jsx)(`tr`,{children:a.children.map((e,t)=>d(e,t,!0,t))})}),(0,j.jsx)(`tbody`,{children:l.map((e,t)=>(0,j.jsx)(`tr`,{className:`even:bg-surface-muted/50`,children:e.children.map((e,t)=>d(e,t,!1,t))},t))})]})}),(0,j.jsxs)(`figcaption`,{className:`mt-1 flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`flex-1 text-body-sm text-muted`,children:[o.length,` row`,o.length===1?``:`s`]}),o.length>l.length&&(0,j.jsxs)(h,{variant:`ghost`,size:`sm`,onClick:()=>r(!0),"data-tip":`Show all ${o.length} rows`,children:[(0,j.jsx)(_,{size:14,"aria-hidden":`true`}),`All (`,o.length,`)`]}),(0,j.jsx)(Qi,{text:u,label:`Copy the table, for a spreadsheet`})]})]})}var da=e=>{try{return new URL(e).host.replace(/^www\./,``)}catch{return``}},fa=e=>{try{let t=new URL(e);return`${t.host.replace(/^www\./,``)}${t.pathname.replace(/\/$/,``)}`}catch{return e}};function pa(e){let t=e.trim().replace(/(?<![\\/])[\\/]+$/,``);return/\.html?$/i.test(t)||!/\.[A-Za-z][A-Za-z0-9]{0,7}$/.test(t.split(/[\\/]/).pop()||``)?`report`:/\.(cs|ts|tsx|js|jsx|mjs|py|java|kt|go|rb|php|feature|spec|robot|cy\.ts|json|ya?ml|xml|csproj|sln|sql|sh|ps1)$/i.test(t)?`code`:`file`}function ma(e,t=3){let n=e.trim().split(/[\\/]/).filter(Boolean);return n.length>t?`…/${n.slice(-t).join(`/`)}`:e.trim()}function ha({path:e,line:t}){let n=ma(e),r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`))+1;return(0,j.jsxs)(j.Fragment,{children:[r>0&&(0,j.jsx)(`span`,{className:`font-normal text-muted`,children:n.slice(0,r)}),n.slice(r),t]})}function ga(e){let t=/^(.+?)(:\d{1,7}(?:[-–]\d{1,7})?)$/.exec(e.trim());return t?{path:t[1],line:t[2]}:{path:e.trim(),line:``}}function _a({note:e}){return(0,j.jsx)(`span`,{role:`status`,className:`mx-1 inline-block max-w-full align-baseline text-body-sm text-muted [overflow-wrap:anywhere]`,children:e})}function va({path:e,line:t=``,children:n,onNote:r}){let[i,a]=(0,A.useState)(``),[o,s]=(0,A.useState)(!1),c=async()=>{a(``);let t=await m(e);r?r(t):a(t)},l=pa(e),u=l===`report`?/\.html?$/i.test(e)?S:g:l===`code`?C:D;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`span`,{className:`group/file mx-1 inline-flex max-w-full items-baseline gap-1 align-baseline`,children:[(0,j.jsxs)(h,{variant:`link`,size:`inline`,"data-tip":`Open ${e}${t}`,onClick:()=>void c(),className:`min-w-0 gap-1 self-center font-mono text-label-md font-normal`,children:[(0,j.jsx)(d,{icon:u,size:13,className:`flex-none`}),(0,j.jsx)(`span`,{className:`truncate`,children:n??(0,j.jsx)(ha,{path:e,line:t})})]}),(0,j.jsx)(h,{variant:`icon`,size:`icon-xs`,"aria-label":o?`Copied`:`Copy the path ${e}`,"data-tip":o?`Copied`:`Copy the path ${e}`,onClick:async()=>{await Zi(e)&&(s(!0),setTimeout(()=>s(!1),1500))},className:`self-center opacity-40 group-hover/file:opacity-100 focus-visible:opacity-100`,children:o?(0,j.jsx)(E,{size:12,"aria-hidden":`true`,className:`text-pass`}):(0,j.jsx)(y,{size:12,"aria-hidden":`true`})})]}),i&&(0,j.jsx)(_a,{note:i})]})}function ya({path:e,alt:t}){let[n,r]=(0,A.useState)(``),[i,o]=(0,A.useState)(!1);return(0,A.useEffect)(()=>{let t=!1;return l.open(e).then(e=>!t&&(e.kind===`image`?r(e.url):o(!0)),()=>!t&&o(!0)),()=>{t=!0}},[e]),i?(0,j.jsx)(va,{path:e,children:t}):n?(0,j.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,"data-tip":`${t}: open full size`,className:`my-2 block w-fit`,children:(0,j.jsx)(`img`,{src:n,alt:t,className:s(a,`block max-h-[360px] max-w-full object-contain`)})}):(0,j.jsxs)(`span`,{className:`text-body-sm text-muted`,children:[t,`…`]})}var ba=/(?<![\w/\\.:@~-])((?:[A-Za-z]:)?(?:\.{1,2})?[\\/]?(?:\.?[\w@-][\w@.-]*[\\/])+\.?[\w@-][\w@.-]*\.[A-Za-z][A-Za-z0-9]{0,7})(?![\w\\/-])/g;function xa(e){let t=[],n=0;for(let r of e.matchAll(ba))r.index>n&&t.push(e.slice(n,r.index)),t.push((0,j.jsx)(va,{path:r[1]},r.index)),n=r.index+r[0].length;return t.length?(n<e.length&&t.push(e.slice(n)),t):e}var Sa=/^(?:[A-Za-z]:)?[\\/]?(?:[\w@.~-]+[\\/])*\.forgeqe[\\/]reports[\\/][\w.-]+[\\/]?$/,Ca=e=>{if(Sa.test(e.trim()))return!0;ba.lastIndex=0;let t=[...e.trim().matchAll(ba)];return t.length===1&&t[0][0]===e.trim()};function wa({url:e,children:t}){return(0,j.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`inline text-accent-fg underline-offset-2 hover:underline`,"data-tip":e,children:[t,(0,j.jsx)(b,{size:12,"aria-hidden":`true`,className:`ml-1 inline align-[-1px]`})]})}function Ta({name:e,refs:t,code:n}){return(0,j.jsx)(h,{variant:`link`,size:`inline`,onClick:()=>t.open(e),className:s(n&&`font-mono`),children:e})}function Ea(e,t){let n=[...t].filter(Boolean).sort((e,t)=>t.length-e.length);if(!n.length)return[{text:e,ref:!1}];let r=RegExp(`(?<![\\w./-])(${n.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)})(?![\\w/-]|\\.\\w)`,`g`),i=[],a=0;for(let t of e.matchAll(r))t.index>a&&i.push({text:e.slice(a,t.index),ref:!1}),i.push({text:t[0],ref:!0}),a=t.index+t[0].length;return a<e.length&&i.push({text:e.slice(a),ref:!1}),i}function $(e,t){return`children`in e?e.children.map((e,n)=>(0,j.jsx)(A.Fragment,{children:Da(e,t)},n)):null}function Da(e,t){switch(e.type){case`paragraph`:return(0,j.jsx)(`p`,{className:s(`my-2`,Gi),children:$(e,t)});case`heading`:{let n=[`text-headline-md`,`text-headline-sm`,`text-body-lg`,`text-body-sm text-muted`,`text-body-sm text-muted`,`text-body-sm text-muted`][e.depth-1],r=`h${Math.min(6,e.depth+2)}`;return(0,j.jsx)(r,{className:s(`mb-2 font-medium`,n,Gi,e.depth<=2?`mt-8`:`mt-6`),children:$(e,t)})}case`text`:if(t.refs?.names.length){let n=t.refs;return Ea(e.value,n.names).map((e,t)=>(0,j.jsx)(A.Fragment,{children:e.ref?(0,j.jsx)(Ta,{name:e.text,refs:n}):xa(e.text)},t))}return xa(e.value);case`strong`:return(0,j.jsx)(`strong`,{className:`font-medium`,children:$(e,t)});case`emphasis`:return(0,j.jsx)(`em`,{children:$(e,t)});case`delete`:return(0,j.jsx)(`del`,{className:`text-muted`,children:$(e,t)});case`inlineCode`:if(t.refs?.names.includes(e.value.trim()))return(0,j.jsx)(Ta,{name:e.value.trim(),refs:t.refs,code:!0});if(Ca(e.value))return(0,j.jsx)(va,{path:e.value.trim()});{let{path:t,line:n}=ga(e.value);if(n&&Ca(t))return(0,j.jsx)(va,{path:t,line:n})}return(0,j.jsx)(`code`,{className:s(O,`text-label-md font-normal`),children:e.value});case`break`:return(0,j.jsx)(`br`,{});case`thematicBreak`:return(0,j.jsx)(`hr`,{className:`my-6 border-0 border-t border-line`});case`blockquote`:return(0,j.jsx)(`blockquote`,{className:s(`my-4 border-0 border-l-[3px] border-solid border-line-strong py-1 pl-4 text-ink-2`,Gi),children:$(e,t)});case`list`:{let n=e.children.some(e=>typeof e.checked==`boolean`),r=e.ordered?`ol`:`ul`;return(0,j.jsx)(r,{start:e.ordered&&e.start&&e.start!==1?e.start:void 0,className:s(`my-2 pl-6 marker:text-muted [&_ol]:my-1 [&_ol]:pl-6 [&_ul]:my-1 [&_ul]:list-[circle] [&_ul]:pl-6`,Gi,n?`list-none pl-1`:e.ordered?`list-decimal`:`list-disc`),children:$(e,t)})}case`listItem`:{let n=e.children.map((n,r)=>n.type===`paragraph`&&!e.spread?(0,j.jsx)(A.Fragment,{children:$(n,t)},r):(0,j.jsx)(A.Fragment,{children:Da(n,t)},r));return typeof e.checked==`boolean`?(0,j.jsxs)(`li`,{className:`my-1 flex items-start gap-2`,children:[e.checked?(0,j.jsx)(x,{size:16,"aria-label":`Done`,className:`mt-1 flex-none text-pass`}):(0,j.jsx)(T,{size:16,"aria-label":`Not done`,className:`mt-1 flex-none text-muted`}),(0,j.jsx)(`span`,{className:s(`min-w-0`,e.checked&&`text-ink-2`),children:n})]}):(0,j.jsx)(`li`,{className:`my-1 pl-1`,children:n})}case`code`:return(0,j.jsx)(oa,{value:e.value,lang:e.lang,meta:e.meta});case`table`:return(0,j.jsx)(ua,{node:e,ctx:t});case`link`:{let n=Ji(e.url),r=$(e,{...t,refs:void 0});if(n===`web`){let t=Xi(e);return(0,j.jsx)(wa,{url:e.url,children:t===e.url?fa(e.url):r})}return n===`mail`?(0,j.jsx)(`a`,{href:e.url,className:`text-accent-fg underline-offset-2 hover:underline`,children:r}):n===`path`?(0,j.jsx)(va,{path:e.url,children:Xi(e)===e.url?void 0:r}):(0,j.jsx)(`span`,{children:r})}case`image`:{let t=Ji(e.url),n=e.alt||`image`;return t===`web`?(0,j.jsxs)(wa,{url:e.url,children:[(0,j.jsx)(w,{size:14,"aria-hidden":`true`,className:`mr-1 inline align-[-2px]`}),n,` (`,da(e.url),`)`]}):t===`path`?(0,j.jsx)(ya,{path:e.url,alt:n}):(0,j.jsx)(`span`,{children:n})}case`html`:return(0,j.jsx)(`span`,{className:`font-mono text-body-sm text-ink-2`,children:e.value});case`footnoteReference`:{let n=t.footnotes.get(e.identifier)??t.footnotes.size+1;return t.footnotes.set(e.identifier,n),(0,j.jsxs)(`sup`,{className:`text-body-sm text-muted`,children:[`[`,n,`]`]})}case`footnoteDefinition`:return(0,j.jsxs)(`div`,{className:`my-1 flex gap-2 text-body-sm text-ink-2`,children:[(0,j.jsxs)(`span`,{className:`text-muted`,children:[`[`,t.footnotes.get(e.identifier)??e.label??e.identifier,`]`]}),(0,j.jsx)(`div`,{className:`min-w-0 [&>p]:my-0`,children:$(e,t)})]});case`definition`:return null;case`yaml`:return(0,j.jsx)(oa,{value:e.value,lang:`yaml`});default:return`children`in e?$(e,t):`value`in e?String(e.value):null}}function Oa({text:e,className:t,refs:n}){let r=(0,A.useMemo)(()=>Yi(e),[e]),i={footnotes:new Map,refs:n};return(0,j.jsx)(`div`,{className:s(`text-body-lg leading-[1.65] text-ink [overflow-wrap:anywhere] [&>:first-child]:mt-0 [&>:last-child]:mb-0`,qi,t),children:r.children.map((e,t)=>(0,j.jsx)(A.Fragment,{children:Da(e,i)},t))})}export{Ji as a,P as c,Ki as i,F as l,va as n,na as o,Oa as r,I as s,Qi as t};
@@ -1,3 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-BDur5s0O.js";import{F as n,I as r,f as i,h as a}from"./preload-helper-BupTYkQW.js";import{r as o,t as s}from"./utils-DJRAScIl.js";import{t as c}from"./jsx-runtime-LKYXHABd.js";import{M as l}from"./api-Dr3U7W5w.js";import{$ as u,At as d,B as f,Bn as p,Bt as m,C as h,Cn as g,D as _,Dn as v,Er as y,Et as ee,G as te,Gn as b,Hr as ne,Ir as re,J as x,Jn as S,Jt as C,K as w,Ln as T,Lr as E,Lt as D,Nt as O,O as k,On as A,Ot as j,Pt as M,Qn as N,Qt as P,Rn as F,Rr as I,Rt as L,Sr as R,Tt as ie,U as z,Ut as ae,V as B,Vr as V,W as H,Wn as U,Wr as W,Wt as oe,Xn as se,Xt as ce,Y as le,Yt as ue,Zn as de,Zt as fe,_r as pe,a as me,an as he,ar as ge,b as _e,bn as ve,br as ye,bt as be,cn as xe,cr as Se,d as Ce,dt as we,en as Te,er as Ee,f as De,fr as Oe,ft as ke,g as Ae,gn as je,gt as Me,hn as Ne,ht as Pe,in as Fe,ir as Ie,it as Le,kn as Re,kt as ze,l as Be,lt as Ve,m as He,mr as Ue,mt as We,n as Ge,nn as Ke,nt as qe,or as Je,p as Ye,pn as Xe,q as Ze,qt as Qe,r as $e,rr as et,sr as tt,t as nt,tn as rt,tr as it,tt as at,u as ot,un as st,v as ct,vn as lt,vr as ut,w as dt,wn as ft,wt as pt,x as mt,xn as ht,xr as gt,xt as _t,y as vt,yn as yt,zn as bt,zt as xt}from"./line-icons-Cwj9OmCz.js";import{r as St}from"./nav-DVPiPhOy.js";var G=c(),Ct={fail:`rounded-base bg-fail-soft px-4 py-2 text-body-sm text-fail [overflow-wrap:anywhere]`,warn:`rounded-base bg-warn-soft px-4 py-2 text-body-sm text-warn [overflow-wrap:anywhere]`,pass:`rounded-base bg-pass-soft px-4 py-2 text-body-sm text-pass [overflow-wrap:anywhere]`,info:`rounded-base bg-accent-soft px-4 py-2 text-body-sm text-ink [overflow-wrap:anywhere]`};function wt({tone:e,as:t=`p`,className:n,children:r,id:i}){return(0,G.jsx)(t,{id:i,role:e===`fail`?`alert`:`status`,className:s(`m-0`,Ct[e],n),children:r})}var K=e(t(),1),Tt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Et=o,Dt=(e,t)=>n=>{if(t?.variants==null)return Et(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Tt(t)||Tt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Et(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Ot=[];for(let e of[2,5,8,11,14])for(let t of[2,5,8,11,14])Math.hypot(t-8,e-8)<=7&&Ot.push([t,e]);function kt({className:e}){let t=`dotm-${(0,K.useId)().replace(/[^\w-]/g,``)}`;return(0,G.jsx)(`span`,{"aria-hidden":`true`,"data-spinner":``,className:s(`inline-flex size-4 flex-none`,e),children:(0,G.jsxs)(`svg`,{viewBox:`0 0 16 16`,className:`size-full`,fill:`currentColor`,children:[(0,G.jsx)(`defs`,{children:(0,G.jsxs)(`clipPath`,{id:t,children:[(0,G.jsx)(`rect`,{className:`dotm-gate-y`,x:`0`,y:`0`,width:`16`,height:`3`}),(0,G.jsx)(`rect`,{className:`dotm-gate-x`,x:`0`,y:`0`,width:`3`,height:`16`})]})}),(0,G.jsx)(`g`,{opacity:`0.25`,children:Ot.map(([e,t])=>(0,G.jsx)(`circle`,{cx:e,cy:t,r:`1.2`},`${e}-${t}`))}),(0,G.jsx)(`g`,{clipPath:`url(#${t})`,children:Ot.map(([e,t])=>(0,G.jsx)(`circle`,{cx:e,cy:t,r:`1.2`},`${e}-${t}`))})]})})}var q=Dt(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap font-medium no-underline transition-[background-color,color,opacity,transform] duration-150 disabled:cursor-not-allowed disabled:opacity-50`,{variants:{variant:{outline:`rounded-full border-0 bg-accent-fg/10 text-ink hover:bg-accent-fg/16 hover:text-ink aria-pressed:bg-accent-fg/24 aria-checked:bg-accent-fg/24 [&>svg]:text-icon`,primary:`rounded-full border-0 bg-primary-btn text-primary-btn-ink hover:-translate-y-[0.5px] hover:bg-primary-btn/88 hover:text-primary-btn-ink`,accent:`rounded-full border-0 bg-accent text-accent-ink hover:-translate-y-[0.5px] hover:bg-accent-hover hover:text-accent-ink`,danger:`rounded-full border-0 bg-tint text-fail hover:bg-fail-soft hover:text-fail`,destructive:`rounded-full border-0 bg-fail text-bg hover:opacity-90 hover:text-bg`,ghost:`rounded-full border-0 bg-transparent text-ink hover:bg-tint [&>svg]:text-icon`,icon:`rounded-full border-0 bg-transparent text-ink-2 hover:bg-tint hover:text-ink [&>svg]:text-icon`,link:`border-0 bg-transparent text-accent-fg underline-offset-2 hover:text-accent-fg-hover hover:underline`,field:s(r,`justify-start px-4 font-normal text-muted hover:text-ink [&>svg]:text-icon`)},size:{default:`min-h-10 px-4 text-body-sm [&>svg]:size-4 [&>svg]:flex-none`,lg:`min-h-11 px-6 text-body-sm [&>svg]:size-4 [&>svg]:flex-none`,sm:`min-h-8 px-4 text-body-sm [&>svg]:size-3.5 [&>svg]:flex-none`,icon:`size-10 [&>svg]:size-4`,"icon-sm":`size-8 [&>svg]:size-4`,"icon-xs":`size-7 pointer-coarse:size-9 [&>svg]:size-3.5`,inline:`min-h-0 p-0 text-body-sm [&>svg]:size-3.5 [&>svg]:flex-none`}},defaultVariants:{variant:`outline`,size:`default`}}),At=new Set([`sm`,`inline`,`icon-xs`]);function jt({className:e,variant:t,size:n,type:r=`button`,disabled:i,onClick:a,busy:o,children:c,...l}){if(o)return(0,G.jsxs)(`button`,{type:r,disabled:!0,"aria-busy":`true`,className:s(q({variant:t,size:n}),`disabled:cursor-progress disabled:opacity-80 [&>svg]:hidden`,e),...l,children:[(0,G.jsx)(kt,{className:At.has(n??``)?`size-3.5`:`size-4`}),c]});let u=l[`data-tip`];return i&&r!==`submit`&&typeof u==`string`&&u.trim()?(0,G.jsx)(`button`,{type:r,"aria-disabled":`true`,className:s(q({variant:t,size:n}),`cursor-not-allowed opacity-50`,e),onClick:e=>{e.preventDefault(),e.stopPropagation()},...l,children:c}):(0,G.jsx)(`button`,{type:r,disabled:i,onClick:a,className:s(q({variant:t,size:n}),e),...l,children:c})}var Mt=new Map([[nt,`accessibility`],[Ge,`history`],[$e,`web`],[Be,`branch`],[De,`feature`],[Ye,`knowledge-base`],[He,`knowledge-base`],[Ae,`container`],[ct,`architecture`],[vt,`bug`],[_e,`speed`],[mt,`history`],[h,`report`],[f,`stories`],[B,`stories`],[z,`cloud`],[H,`code`],[te,`code`],[w,`coins`],[Ze,`columns`],[le,`container`],[u,`server`],[at,`database`],[qe,`database`],[Le,`download`],[Ve,`visual`],[we,`report`],[ke,`report`],[We,`code`],[Pe,`code`],[Me,`file`],[be,`table`],[_t,`stories`],[pt,`warning`],[ie,`flask`],[ee,`folder`],[j,`folder`],[ze,`folder`],[d,`folder`],[O,`visual`],[M,`branch`],[D,`branch`],[L,`web`],[xt,`feature`],[m,`wrench`],[ae,`pulse`],[oe,`history`],[Qe,`screenshot`],[C,`screenshot`],[ue,`screenshot`],[ce,`inbox`],[fe,`info`],[P,`key`],[Te,`desktop`],[rt,`layers`],[Ke,`board`],[Fe,`info`],[he,`sparkle`],[xe,`stories`],[st,`layers`],[Xe,`key`],[Ne,`mail`],[je,`web`],[lt,`chat`],[yt,`stories`],[ve,`chat`],[ht,`mic`],[g,`desktop`],[ft,`mobile`],[v,`network`],[A,`replay`],[Re,`palette`],[T,`coins`],[F,`replay`],[bt,`plug`],[p,`plug`],[U,`replay`],[b,`rocket`],[S,`route`],[se,`visual`],[de,`scroll`],[Ee,`mail`],[it,`server`],[et,`feature`],[Ie,`shield`],[ge,`route`],[Je,`mobile`],[tt,`sparkle`],[Se,`sparkle`],[Oe,`board`],[Ue,`terminal`],[pe,`table`],[ut,`mobile`],[ye,`terminal`],[gt,`ticket`],[R,`history`],[y,`warning`],[re,`coins`],[E,`wand`],[I,`wand`],[V,`plug`],[ne,`network`],[W,`wrench`],[ot,`bell`],[Ce,`bell`],[x,`route`]]);function Nt({icon:e,size:t=16,className:n,label:r}){let o=Mt.get(e);if(o){let e=a(o);if(e)return(0,G.jsx)(i,{src:e,name:o,px:t+2,alt:r||``,className:n})}return(0,G.jsx)(e,{size:t,strokeWidth:1.8,"aria-hidden":!r||void 0,"aria-label":r,className:n})}var Pt={idle:[`default`,`blink`],working:[`default`,`gyro`],reasoning:[`default`,`twins`],searching:[`default`,`lighthouse`],background:[`default`,`spiral`],retrying:[`default`,`surge`],compacting:[`default`,`squeeze`,`fuse`],waiting:[`default`],using:[`default`,`tap`,`scroll`,`type`,`zoom`,`snap`,`record`]},J=Math.PI*2,Ft=Math.PI*(3-Math.sqrt(5)),Y=e=>(1-Math.cos(Math.PI*e))/2,X=e=>{let t=Math.sin(e*127.1)*43758.5453;return t-Math.floor(t)},It=(e,t)=>(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2,Lt=(e,t,n)=>{let r=[],i=[],a=e[t];for(let o=0;o<e.length;o++){if(o===t)continue;let s=It(a,e[o]),c=r.length;if(c===n){if(s>=i[n-1])continue;c--}for(;c>0&&i[c-1]>s;)r[c]=r[c-1],i[c]=i[c-1],c--;r[c]=o,i[c]=s}return r},Rt={idle:6500,"idle-blink":13e3,working:3e3,"working-gyro":3e3,reasoning:6500,"reasoning-twins":6500,searching:13e3,"searching-lighthouse":13e3,background:13e3,"background-spiral":13e3,retrying:13e3,"retrying-surge":13e3,compacting:1e4,"compacting-squeeze":1e4,"compacting-fuse":1e4,waiting:13e3,using:13e3,"using-tap":13e3,"using-scroll":13e3,"using-type":13e3,"using-zoom":13e3,"using-snap":13e3,"using-record":13e3},zt=new Map;function Bt(e,t,n){let r=zt.get(e);return r||zt.set(e,r={t:0,last:t}),t>r.last&&(r.t+=Math.min(t-r.last,100)*n,r.last=t),r.t}var Vt=e=>1-Math.exp(-4.5*e)*Math.cos(3*Math.PI*e)-e*Math.exp(-4.5);function Ht(e,t){let n=3200,r=Math.floor(e/n),i=e-r*n,a=1260*t,o=2200*t,s;if(i<2e3)s=i*t;else if(i<2200){let e=(i-2e3)/200;s=(2e3+200*(e-e*e/2))*t}else if(i<3e3)s=2100*t-a*Vt((i-2200)/800);else{let e=(i-3e3)/200;s=2100*t-a+100*e*e*t}return r*(o-a)+s}function Ut(e,t){if(e===`retrying`)return Ht(2*t,J/9e3);if(e===`retrying-surge`){let e=t/3250,n=e-Math.floor(e);return(Math.floor(e)+(1-(1-n)**3))*J}return e===`using-scroll`?.4:e===`using-snap`?(Math.floor(t/_n)*vn+Math.min(t%_n,vn))/Rt[e]*J:t/Rt[e]*J}var Wt=(()=>{let e=30*Math.PI/180,t=10*Math.PI/180;return[-Math.sin(t)*Math.cos(e),Math.cos(t)*Math.cos(e),Math.sin(e)]})(),Gt=1.4,Kt=30*Math.PI/180,qt=Math.PI/2,Jt=1800,Yt=.4,Xt=.6;function Zt(e){let t=e*2.45+X(e)*1.5,n=(15+30*X(e+.5))*Math.PI/180;return[Math.sin(n)*Math.cos(t),Math.sin(n)*Math.sin(t),Math.cos(n)]}function Qt(e){let t=Math.floor(e/Jt),n=e/Jt-t,r=n<Yt?(1-Math.cos(n/Yt*Math.PI))/2:1,i=Zt(t),a=Zt(t+1),o=i.map((e,t)=>e+(a[t]-e)*r),s=Math.hypot(o[0],o[1],o[2]);return o.map(e=>e/s)}var $t=.45,en=.5,tn=600,nn=e=>Zt(e+57),rn=(e,t,n)=>{let r=e.map((e,r)=>e+(t[r]-e)*n),i=Math.hypot(r[0],r[1],r[2]);return r.map(e=>e/i)},an=(e,t)=>e<t?(1-(e/t)**2)**2:0,on=1400;function sn(e){let t=Math.floor(e/on),n=e/on-t;return{at:rn(nn(t),nn(t+1),n<.35?Y(n/.35):1),click:nn(n<.5?t:t+1),since:(n<.5?n+.5:n-.5)*on}}var cn=e=>e<60?e/60:Math.max(0,1-(e-60)/240)**2,ln=1,un=[[0,0],[0,16],[4,12],[7,18],[9,17],[6,11],[11,11]].map(([e,t])=>[e/18*ln,t/18*ln]);function dn(e,t,n){let r=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){let[o,s]=e[i],[c,l]=e[a];s>n!=l>n&&t<(c-o)*(n-s)/(l-s)+o&&(r=!r)}return r}var Z=[-.3,.5],fn=(e,t)=>[e,t,Math.sqrt(Math.max(0,1-e*e-t*t))],pn=e=>fn(Z[0]+.35*e[0],Z[1]+.35*e[1]),mn=1800;function hn(e,t){let n=e%mn/mn,r=n<.3?Y(n/.3):n<.6?1:n<.85?1-Y((n-.6)/.25):0,i=e=>fn(Z[0]+.3*e*Math.cos(t),Z[1]+.3*e*Math.sin(t));return{at:i(r),click:i(1),since:(n<.45?n+.55:n-.45)*mn}}var gn=2600,_n=2600,vn=2100;function yn(e){let t=e%_n-vn;return t<0?0:Math.exp(-t/220)}function bn(e){let t=e%_n;return t<120?1.2*(1-Y(t/120)):t<180?0:t<430?1.2*Y((t-180)/250):1.2}var xn=1200,Sn=e=>Math.abs(1-2*(e%xn/xn));function Cn(e){let t=e%gn/gn;return t<.25?Y(t/.25):t<.5?1:t<.75?1-Y((t-.5)/.25):0}var wn=1500,Tn=1.1;function En(e){let t=Math.floor(e/wn),n=Math.min(1,(e/wn-t)/.75);return{by:(t+1-(1-n)**3)*Tn,pace:(1-n)**2}}var Dn={right:0,"up-right":45,up:90,"up-left":135,left:180,"down-left":225,down:270,"down-right":315},On=[90,270,45,180,0,225].map(e=>e*Math.PI/180);function kn(e,t){let n=-Math.sin(e),r=Math.cos(e),i=Math.sin(t),a=Math.cos(t),o=1-a;return[a+n*n*o,n*r*o,r*i,n*r*o,a+r*r*o,-n*i,-r*i,n*i,a]}var An=(e,t)=>e.map((n,r)=>e[r-r%3]*t[r%3]+e[r-r%3+1]*t[r%3+3]+e[r-r%3+2]*t[r%3+6]),Q=[`xxxx xxx xx`,`xxxxx xx xxxx`,`xxx xxxxx`],jn=.09,Mn=.3,Nn=.33,Pn=-.5,$=(()=>{let e=0;return Q.flatMap((t,n)=>[...t].map((r,i)=>{let a={row:n,col:i,at:e};return e+=r===` `?200:i===t.length-1?350:70+60*X(n*31+i),a}))})(),Fn=Q.map((e,t)=>$.flatMap((e,n)=>e.row===t?[n]:[])),In=$[$.length-1].at,Ln=In+1300;function Rn(e){let t=e%Ln,n=0;for(;n<$.length&&$[n].at<=t;)n++;let r=n?t-$[n-1].at:1/0,i=$[n]??{row:Q.length-1,col:Q[Q.length-1].length},a=r<300?1:+(Math.floor(t/450)%2==0);return{n,since:r,blink:a,caret:[Pn+i.col*jn,Nn-i.row*Mn],fade:t<In+900?1:Math.max(0,1-(t-In-900)/300)}}var zn=220,Bn=5,Vn=24,Hn=16,Un={mount:({make:e,pts:t})=>{let n=t.map(()=>e(`circle`)),r=new Uint8Array(t.length);return{dot(e,t,i,a,o){let s=n[e],c=o.toFixed(2);c===`0.00`&&r[e]||(r[e]=+(c===`0.00`),s.setAttribute(`cx`,t.toFixed(2)),s.setAttribute(`cy`,i.toFixed(2)),s.setAttribute(`r`,Math.max(.45,a).toFixed(2)),s.setAttribute(`fill-opacity`,c))}}}};function Wn(e){let t=(e,t)=>[Math.cos(e)*Math.cos(t),Math.sin(e),Math.cos(e)*Math.sin(t)],n=Math.sqrt(4*Math.PI/e),r=.6*n;return Array.from({length:8},(e,i)=>{let a=i?i&-i:8,o=Math.min(85*Math.PI/180,Math.acos(Math.min(1,n*8/(J*a)))),s=[];for(let e=-o+i*.618%1*r;e<=o;e+=r/Math.sqrt(1+Math.cos(e)**2))s.push(t(e,i/8*J-e));return s}).flat()}function Gn(e,t,n){return n?n.points(t,e):e===`background-spiral`?Wn(t):Array.from({length:t},(e,n)=>{let r=1-2*(n+.5)/t,i=Math.sqrt(1-r*r),a=n*Ft;return[i*Math.cos(a),r,i*Math.sin(a)]})}function Kn(e,{state:t,variant:n,size:r=20,speed:i=1,label:a,shape:o,render:s=Un,density:c=1,dotSize:l=1,tilt:u=20,direction:d}={}){let f=t===`base`?`idle`:t,p=f&&Object.hasOwn(Pt,f)?f:`idle`,m=n!=="default"&&Pt[p].includes(n??``)?`${p}-${n}`:p,h={width:r,height:r,viewBox:`0 0 ${r} ${r}`,fill:`currentColor`};for(let[t,n]of Object.entries(h))e.setAttribute(t,String(n));a?(e.setAttribute(`role`,`img`),e.setAttribute(`aria-label`,a),e.removeAttribute(`aria-hidden`)):(e.setAttribute(`aria-hidden`,`true`),e.removeAttribute(`role`),e.removeAttribute(`aria-label`));let g=m===`background`?1:m===`using`||m===`using-type`?Math.max(4,1e3/r):4,_=Math.max(8,Math.round(r*g*c)),v=typeof o==`function`?{points:o}:o,y=r/2,ee=y*.8*(v?.scale??1),te=(r/64)**.6*(.72*Math.sqrt(4/g))*l,b=Gn(m,_,v),ne=s.mount({make:t=>e.appendChild(document.createElementNS(`http://www.w3.org/2000/svg`,t)),pts:b,size:r,radius:te}),re=!!s.flat,x=(m===`reasoning`||m===`reasoning-twins`)&&b.length>1,S=m===`compacting`||m===`compacting-fuse`,C=x?b.map((e,t)=>Lt(b,t,Vn)):[],w=Array.from({length:m===`reasoning-twins`?2:1},()=>[]),T=0,E={k:0,m:[1,0,0,0,1,0,0,0,1]},D=e=>{let t=Rt[m],n=Ut(m,e),i=m===`using-scroll`?En(e):null,a=d&&Dn[d],o=null;if(i&&a!==void 0)o=kn(a*Math.PI/180+Math.PI,i.by);else if(i){let t=Math.floor(e/wn);for(t<E.k&&(E={k:0,m:[1,0,0,0,1,0,0,0,1]});E.k<t;E.k++)E.m=An(kn(On[E.k%On.length],Tn),E.m);o=An(kn(On[t%On.length],i.by-t*Tn),E.m)}let s=m===`working-gyro`?e/5e3*J:null,c=((re?0:u)+(v?.tip??0)+(s===null?0:10*Math.cos(s)))*Math.PI/180,l=s===null?0:12*Math.sin(s)*Math.PI/180,f=Math.sin(l),p=Math.cos(l),h=Math.sin(n),g=Math.cos(n),_=Math.sin(c),D=Math.cos(c),O=e=>b[e][1]*_+(-b[e][0]*h+b[e][2]*g)*D,k=new Map;if(x){let t=e/zn,n=Math.floor(t),r=t-n;if(!w[0].length){let e=[...b.keys()].reduce((e,t)=>O(t)>O(e)?t:e,0),t=t=>O(t)+It(b[t],b[e]);w.forEach((n,r)=>n.push(r?[...b.keys()].reduce((e,n)=>t(n)>t(e)?n:e,0):e))}for(T=Math.max(T,n-Hn);T<n;T++)w.forEach((e,t)=>{let n=e.slice(-8),r=e[e.length-1],i=-1,a=-1/0,o=m===`reasoning-twins`?w[1-t].at(-1):void 0;C[r].forEach((e,r)=>{let s=o===void 0?0:1.2*Math.min(Math.sqrt(It(b[e],b[o])),.8),c=O(e)+.35*X(T*31+r+t*977)+s;!n.includes(e)&&c>a&&(a=c,i=e)}),e.push(i<0?C[r][0]:i),e.length>Hn&&e.shift()});let i=(e,t)=>e!==void 0&&k.set(e,Math.max(k.get(e)??0,t));for(let e of w)for(let t=4;t>=0;t--)i(e[e.length-1-t],t===0?Y(Math.min(1,r*2)):1-(t-1+r)/Bn)}let A=e/2e3*J+n,j=J/2e3+J/t,M=e=>70*Math.PI/180*(1-2*(e%6e3/6e3)),N=Math.min(1,3*Math.sin(Math.PI*(e%6e3/6e3))),P=m===`searching`?Qt(e):null,F=m===`working-gyro`?.5*Math.sin(e/2600*J):m===`compacting-squeeze`?Math.sin(e/2600*J):0,I=null;if(S){let t=e%2800/2800,n=(t-.7)/.3,r=m===`compacting-fuse`?(1-n)**3:n<.45?1-1.25*Y(n/.45):n<.7?-.25*(1-(n-.45)/.25)**2:0;I={at:-1.15+2.3*Math.min(1,t/.7),hold:t<.7?1:r}}let L=null;m===`using-tap`&&(L=sn(e));let R=m===`using`;if(R){let t=a===void 0?sn(e):null;L=t?{...t,at:pn(t.at),click:pn(t.click)}:hn(e,(a??0)*Math.PI/180)}let ie=R&&L?1-.15*cn(L.since):1,z=m===`using-type`?Rn(e):null,ae=m===`using-zoom`?Cn(e):null,B=m===`using-snap`?yn(e):null,V=m===`idle-blink`?bn(e):null,H=m===`using-record`?Sn(e):null;b.forEach(([t,a,s],c)=>{let u=n+Gt*F*a,[d,v]=F?[Math.sin(u),Math.cos(u)]:[h,g],b=-t*d+s*v,S=t*v+s*d,C=a*D-b*_,w=b,T=S*_,E=a*_+b*D;o&&([S,C,E]=[0,3,6].map(e=>o[e]*S+o[e+1]*C+o[e+2]*E));let O=(E+1)/2,U=(.5+1.4*O)*te,W=Math.max(0,(O-.3)/.7);if(P){let e=Math.acos(Math.min(1,(S*P[0]+C*P[1]+E*P[2])/Math.hypot(S,C,E))),t=e<Xt?(1-(e/Xt)**2)**2:0;W*=1-.55*(1-t),r<=24&&(U*=1+.5*t),t&&(S*=1+.12*t,C*=1+.12*t,S+=(S-P[0])*.35*t,C+=(C-P[1])*.35*t,U*=1+.9*t,W+=(1-W)*t)}if(I){let e=S,t=Math.min(1,Math.max(0,(I.at-e)/.2))*I.hold,n=m===`compacting`?1.5:1;if(S*=1-.2*n*t,C*=1-.2*n*t,U*=1-.3*n*t,m===`compacting-fuse`){W*=1-.5*t;let n=Math.exp(-(((e-I.at)/.08)**2))*Math.max(0,I.hold)*Math.min(1,O/.5);U*=1+.8*n,W+=(1-W)*n}}if(m===`working`){let t=e%1700,n=1.3-2.6*Y(Math.min(1,t/1200)),r=re?C:S*Wt[0]+C*Wt[1]+E*Wt[2],i=t<1200?Math.exp(-(((r-n)/.2)**2)):0;U*=1+.6*i,W+=(1-W)*i;let a=Math.min(1,Math.max(0,(r-n)/.2))*(t<1200?1:1-Math.min(1,1.6*((t-1200)/800)));S*=1-.08*a,C*=1-.08*a,U*=1-.15*a}if(m===`searching-lighthouse`){W*=.5;let t=Math.sin(Kt),n=Math.cos(Kt),r=S*n-C*t,i=-_*(S*t+C*n)+D*E,a=((Math.atan2(r,i)-(e/2500%1*J-Math.PI)+Math.PI)%J+J)%J-Math.PI,o=(a<0?Math.max(0,1+a/qt):Math.exp(-((a/.45)**2)))*(.25+.75*Math.min(1,Math.max(0,(O-.4)/.3)));U*=1+.6*o,W+=(1-W)*o}if(x){let e=k.get(c)??0;W*=.5,e&&(U*=1+.8*e,W+=(1-W)*e)}if(m===`waiting`){let n=Math.asin(a/(Math.hypot(t,a,s)||1)),r=Math.atan2(s,t),i=Math.atan2(Math.sin(r-A),Math.cos(r-A)),o=i*Math.cos(n),c=Math.exp(-(((n-M(e+i/j))/.28)**2))*Math.exp(-((o/(i*j>0?.12:1))**2)),l=N*c**.6;W=W*.5+(1-W*.5)*l,U*=1+1.1*l}if(L){let e=Math.hypot(S,C,E)||1,t=t=>Math.acos(Math.min(1,Math.max(-1,(S*t[0]+C*t[1]+E*t[2])/e)));W*=R?.25:.5;let n=L.since,r=R?0:an(t(L.at),$t),i=t(L.click),a=cn(n),o=a*an(i,en),s=Math.min(1,n/tn),c=Math.exp(-(((i-(.15+1.3*(1-(1-s)**2)))/.18)**2))*(1-s)**2;if(S*=1-.14*o,C*=1-.14*o,U*=(1-.35*o)*(1+.7*Math.max(c,r*(1-a))),W+=(1-W)*Math.max(r,c),R&&dn(un,(S-L.at[0])/ie,(L.at[1]-C)/ie)){let e=Math.min(1,Math.max(0,(O-.5)/.2));U*=1+.15*e,W+=(1-W)*e}}if(z){W*=.25;let e=Math.round((Nn-C)/Mn),t=Math.floor((S-Pn)/jn),n=Fn[e]?.[t],r=0;n!==void 0&&n<z.n&&Q[e][t]===`x`&&Math.abs(Nn-e*Mn-C)<.085&&(r=.75+(n===z.n-1?.25*Math.exp(-z.since/120):0));let[i,a]=z.caret;Math.abs(C-a)<.1&&(r=Math.max(r,z.blink*Math.exp(-(((S-i)/.04)**2)))),W+=(1-W)*r*z.fade*Math.min(1,Math.max(0,(O-.5)/.2))}if(ae){let e=ae*Math.max(0,E);S*=1+.45*e,C*=1+.45*e,U*=1+.8*e,W*=Math.min(1,Math.max(0,(1.05-Math.hypot(S,C))/.1))}if(i&&(W*=.55+.45*i.pace),B!==null&&(W*=.55,U*=1+.25*B,W+=(1-W)*B),V!==null){let e=Math.exp(-(((Math.abs(C)-V)/.06)**2))*+(V<1.2);W*=Math.min(1,Math.max(0,(V-Math.abs(C))/.08)),U*=1+.4*e,W+=(1-W)*e*Math.min(1,Math.max(0,(O-.4)/.3))}H!==null&&(S*=.92+.08*H,C*=.92+.08*H,W*=.3+.7*H),l&&([S,C]=[S*p-C*f,S*f+C*p]),ne.dot(c,y+S*ee,y-C*ee,U,W,w,-T)}),ne.frame?.()},O=`${m}@${i}`;D(Bt(O,performance.now(),i));let k=matchMedia(`(prefers-reduced-motion: reduce)`).matches,A=!1,j=0,M=!1,N=new IntersectionObserver(e=>A=e[e.length-1].isIntersecting);N.observe(e);function P(e){A&&D(Bt(O,e,i)),j=requestAnimationFrame(P)}let F=()=>{cancelAnimationFrame(j),j=0},I=()=>{j||k||M||(j=requestAnimationFrame(P))};return I(),{pause:F,play:I,destroy(){M=!0,F(),N.disconnect(),e.replaceChildren()}}}function qn({state:e,variant:t,size:n=20,speed:r=1,paused:i=!1,label:a,shape:o,render:s,density:c,dotSize:l,tilt:u,direction:d,className:f}){let p=(0,K.useRef)(null),m=(0,K.useRef)(null);(0,K.useEffect)(()=>(m.current=Kn(p.current,{state:e,variant:t,size:n,speed:r,label:a,shape:o,render:s,density:c,dotSize:l,tilt:u,direction:d})).destroy,[e,t,n,r,a,o,s,c,l,u,d]),(0,K.useEffect)(()=>{i?m.current.pause():m.current.play()},[i,e,t,n,r,a,o,s,c,l,u,d]);let h=a?{role:`img`,"aria-label":a}:{"aria-hidden":!0};return(0,G.jsx)(`svg`,{ref:p,width:n,height:n,viewBox:`0 0 ${n} ${n}`,fill:`currentColor`,className:f,...h})}var Jn={thinking:{state:`reasoning`},searching:{state:`searching`},reading:{state:`searching`,variant:`lighthouse`},working:{state:`working`},writing:{state:`working`,variant:`gyro`},browsing:{state:`using`,variant:`tap`},recording:{state:`using`,variant:`record`},handing:{state:`background`},retrying:{state:`retrying`},compacting:{state:`compacting`},waiting:{state:`waiting`},idle:{state:`idle`}};function Yn({state:e=`working`,label:t,px:n=16,className:r}){return(0,G.jsx)(qn,{...Jn[e],size:n,label:t,className:s(`block flex-none text-ink`,r)})}async function Xn(e,t=l.open){let n=window.open(`about:blank`,`_blank`);try{let r=await t(e);if(r.kind===`download`){n?.close();let e=document.createElement(`a`);return e.href=r.url,e.download=r.name,e.click(),``}return n?(n.opener=null,n.location.href=r.url,``):`The browser blocked the new tab.`}catch(e){return n?.close(),e.message}}function Zn({icon:e,title:t,children:n,action:r,center:i=!1,page:a=!1,className:o}){return(0,G.jsxs)(`div`,{role:`status`,className:s(`flex flex-col gap-2 py-6`,i||a?`items-center text-center`:`items-start`,a&&`mx-auto max-w-[480px] py-16`,o),children:[e&&(0,G.jsx)(Nt,{icon:e,size:22,className:`mb-1 text-muted`}),t&&(0,G.jsx)(`p`,{className:`m-0 text-body-lg font-medium text-ink`,children:t}),n&&(0,G.jsx)(`div`,{className:`m-0 text-body-sm leading-relaxed text-ink-2`,children:n}),r&&(0,G.jsx)(`div`,{className:`mt-1 flex flex-wrap items-center gap-2`,children:r})]})}var Qn={pass:`bg-pass-soft text-pass`,fail:`bg-fail-soft text-fail`,warn:`bg-warn-soft text-warn`,running:`bg-accent-soft text-accent-fg`,neutral:`bg-surface-strong text-ink-2`},$n={pass:`bg-pass-dot`,fail:`bg-fail-dot`,warn:`bg-warn-dot`,neutral:`bg-muted`};function er({tone:e,children:t,className:n,icon:r=!0,orb:i=`working`}){let a=r&&e!==`running`?$n[e]:void 0,o=r&&e===`running`;return(0,G.jsxs)(`span`,{className:s(`inline-flex min-h-6 items-center gap-1 rounded-full px-2 text-label-sm whitespace-nowrap`,(a||o)&&`pl-2`,Qn[e],n),children:[o&&(0,G.jsx)(Yn,{state:i,px:16}),a&&(0,G.jsx)(`span`,{"aria-hidden":`true`,className:s(`size-1.5 flex-none rounded-full`,a)}),t]})}function tr({id:e,label:t,value:r,onChange:i,placeholder:a,className:o}){return(0,G.jsxs)(`div`,{className:s(`relative min-w-0 w-full max-w-[320px] flex-[0_1_320px]`,o),children:[(0,G.jsx)(N,{size:14,"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-2.5 -translate-y-1/2 text-muted`}),(0,G.jsx)(`label`,{htmlFor:e,className:`sr-only`,children:t}),(0,G.jsx)(n,{size:`sm`,id:e,type:`search`,value:r,onChange:e=>i(e.target.value),placeholder:a??t,className:`pl-8`})]})}function nr({items:e,value:t,onChange:n}){return(0,G.jsx)(G.Fragment,{children:e.map(e=>(0,G.jsxs)(`button`,{type:`button`,"aria-pressed":t===e.id,"data-tip":e.tip,onClick:()=>n(e.id),className:s(q({size:`sm`}),`gap-1`),children:[e.icon&&(0,G.jsx)(Nt,{icon:e.icon,size:14}),e.label,e.n!==void 0&&(0,G.jsx)(`span`,{className:s(`tabular-nums`,e.alert&&e.n?`text-fail`:``),children:e.n})]},e.id))})}function rr({items:e,value:t,onChange:n,className:r}){return(0,G.jsx)(G.Fragment,{children:e.map(e=>{let i=t.includes(e.id);return(0,G.jsxs)(`button`,{type:`button`,"aria-pressed":i,"data-tip":e.title,onClick:()=>n(i?t.filter(t=>t!==e.id):[...t,e.id]),className:s(q({size:`sm`}),``,r),children:[i&&(0,G.jsx)(dt,{size:14,"aria-hidden":`true`}),e.label,e.note&&(0,G.jsx)(`span`,{className:s(`text-body-sm font-normal`,e.noteClass),children:e.note})]},e.id)})})}function ir({page:e,size:t,total:n,onPage:r,label:i,children:a}){let o=Math.max(1,Math.ceil(n/t));return(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4 border-t border-line-soft px-4 py-2 text-body-sm text-muted`,children:[(0,G.jsxs)(`span`,{className:`flex-1`,children:[n?`${e*t+1}–${Math.min(n,e*t+t)} of ${n}`:`None`,a]}),o>1&&(0,G.jsxs)(`nav`,{"aria-label":i,className:`flex items-center gap-1`,children:[(0,G.jsx)(jt,{size:`sm`,variant:`ghost`,disabled:e===0,onClick:()=>r(e-1),"aria-label":`Previous page`,"data-tip":`Previous page`,children:(0,G.jsx)(_,{"aria-hidden":`true`})}),(0,G.jsxs)(`span`,{className:`px-1 tabular-nums`,children:[`Page `,e+1,` of `,o]}),(0,G.jsx)(jt,{size:`sm`,variant:`ghost`,disabled:e>=o-1,onClick:()=>r(e+1),"aria-label":`Next page`,"data-tip":`Next page`,children:(0,G.jsx)(k,{"aria-hidden":`true`})})]})]})}var ar={accent:`text-icon`,soft:`text-accent-line`,pass:`text-pass`,fail:`text-fail`};function or(e,t){if(!e.length)return``;let n=`M${e[0][0].toFixed(1)} ${e[0][1].toFixed(1)}`;for(let r=0;r<e.length-1;r++){let i=e[r-1]??e[r],a=e[r],o=e[r+1],s=e[r+2]??o,c=Math.min(t,a[1]+(o[1]-i[1])/6),l=Math.min(t,o[1]-(s[1]-a[1])/6);n+=` C${(a[0]+(o[0]-i[0])/6).toFixed(1)} ${c.toFixed(1)} ${(o[0]-(s[0]-a[0])/6).toFixed(1)} ${l.toFixed(1)} ${o[0].toFixed(1)} ${o[1].toFixed(1)}`}return n}function sr({series:e,label:t,axis:n,hover:r=-1,onHover:i,max:a,padded:o=!0,lead:c=0,className:l=`h-24`}){let u=(0,K.useId)().replace(/:/g,``),d=Math.max(1,...e.map(e=>e.values.length)),f=a??Math.max(Number.MIN_VALUE,...e.flatMap(e=>e.values)),p=e=>d>1?e/(d-1)*280:140,m=e=>o?92-Math.max(0,e)/(f||1)*80:96-Math.max(0,e)/(f||1)*96,h=e.map((e,t)=>{let n=e.values.map((e,t)=>[p(t),m(e)]);return{s:e,k:t,pts:n,line:or(n,o?92:96)}}),g=h[c]??h[0],_=e=>g&&g.pts[e]?g.pts[e]:null,v=(e,t)=>{let n=_(e);return n?(0,G.jsx)(`span`,{"aria-hidden":`true`,className:s(`pointer-events-none absolute -translate-x-1/2 -translate-y-1/2 rounded-full bg-current ring-2 ring-bg`,t?`size-2`:`size-1.5 opacity-80`),style:{left:`${n[0]/280*100}%`,top:`${n[1]/96*100}%`,boxShadow:t?`0 0 8px 1px color-mix(in srgb, currentColor 60%, transparent)`:void 0}},`dot-${e}`):null},y=(g?.pts.length??1)-1;return(0,G.jsxs)(`div`,{role:`img`,"aria-label":t,className:`flex w-full min-w-0 flex-col gap-2`,children:[(0,G.jsxs)(`div`,{className:s(`relative w-full`,l,g?ar[g.s.tone??`accent`]:``),onMouseLeave:i?()=>i(-1):void 0,children:[(0,G.jsxs)(`svg`,{viewBox:`0 0 280 96`,preserveAspectRatio:`none`,className:`block size-full overflow-visible`,"aria-hidden":`true`,children:[(0,G.jsx)(`defs`,{children:h.map(({k:e})=>(0,G.jsxs)(`linearGradient`,{id:`${u}-f${e}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,G.jsx)(`stop`,{offset:`0%`,stopColor:`currentColor`,stopOpacity:`0.28`}),(0,G.jsx)(`stop`,{offset:`100%`,stopColor:`currentColor`,stopOpacity:`0`})]},e))}),h.map(({s:e,k:t,line:n})=>(0,G.jsxs)(`g`,{className:ar[e.tone??`accent`],children:[e.fill!==!1&&(0,G.jsx)(`path`,{d:`${n} L${p(e.values.length-1)} 96 L0 96 Z`,fill:`url(#${u}-f${t})`}),(0,G.jsx)(`path`,{d:n,fill:`none`,stroke:`currentColor`,strokeWidth:e.glow===!1?1.5:2,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`,style:e.glow===!1?void 0:{filter:`drop-shadow(0 0 4px color-mix(in srgb, currentColor 55%, transparent))`}})]},t))]}),v(y,!0),r>=0&&r!==y&&v(r,!1),i&&(0,G.jsx)(`div`,{className:`absolute inset-0 flex`,"aria-hidden":`true`,children:Array.from({length:d},(e,t)=>(0,G.jsx)(`span`,{className:s(`h-full flex-1`,r===t&&`bg-current/5`),onMouseEnter:()=>i(t)},t))})]}),n&&n.length>0&&(0,G.jsx)(`div`,{className:`flex justify-between text-body-sm text-muted tabular-nums`,"aria-hidden":`true`,children:n.map((e,t)=>(0,G.jsx)(`span`,{children:e},t))})]})}function cr({share:e,text:t,lead:n=!1,tone:r,className:i}){let a=Math.max(0,Math.min(1,e))*100,o=a>=25&&(n||!!r),c=r===`fail`?`bg-fail text-bg`:r===`pass`?`bg-pass text-bg`:n?`bg-accent text-white`:`bg-accent-line`;return(0,G.jsxs)(`span`,{"aria-hidden":`true`,className:s(`flex h-5 min-w-0 items-center gap-2 rounded-md bg-surface-strong`,i),children:[(0,G.jsx)(`span`,{className:s(`flex h-full items-center justify-end rounded-md px-2 text-label-sm font-medium whitespace-nowrap tabular-nums transition-[width] duration-200 ease-out`,c),style:{width:a>0?`${Math.max(2,a)}%`:`0`},children:o?t:null}),!o&&(0,G.jsx)(`span`,{className:`text-label-sm whitespace-nowrap text-ink-2 tabular-nums`,children:t})]})}function lr({rows:e,label:t,more:n}){return(0,G.jsxs)(`ul`,{"aria-label":t,className:`m-0 flex list-none flex-col overflow-hidden rounded-base p-0`,children:[e.map((e,t)=>(0,G.jsxs)(`li`,{className:s(`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-1 px-4 py-2`,t>0&&`border-t border-line`,t%2==1&&`bg-surface-muted`),children:[(0,G.jsx)(`span`,{"data-tip":e.label,className:`min-w-0 truncate text-body-sm text-ink-2`,children:e.label}),(0,G.jsxs)(`span`,{className:`row-span-2 flex flex-col items-end gap-1`,children:[(0,G.jsxs)(`span`,{className:`rounded-full border border-accent-line px-2 text-label-sm font-medium text-ink-2 tabular-nums`,children:[e.share>0&&e.share<.005?`<1`:Math.round(Math.max(0,Math.min(1,e.share))*100),`%`]}),e.note]}),(0,G.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,G.jsx)(`span`,{className:`text-headline-sm font-medium text-ink tabular-nums`,children:e.value}),e.sub?(0,G.jsx)(`span`,{className:`truncate text-label-sm text-muted tabular-nums`,children:e.sub}):null]})]},e.key)),n?(0,G.jsx)(`li`,{className:`border-t border-line px-4 py-2 text-body-sm text-muted`,children:n}):null]})}function ur({value:e,limit:t,warnAt:n=.8,label:r,className:i}){let a=t>0?e/t:0,o=Math.max(1.15,Math.min(a,1.5)),c=e=>`${Math.min(100,e/o*100).toFixed(2)}%`,l=a>=1?`over`:a>=n?`near`:`fine`,u={width:c(Math.max(.01,a))};return l===`over`&&(u.backgroundImage=`linear-gradient(90deg, var(--color-accent), var(--color-fail))`),(0,G.jsxs)(`span`,{className:s(`flex min-w-0 items-center gap-2`,i),children:[(0,G.jsxs)(`span`,{role:`meter`,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e,"aria-label":`${r}: ${Math.round(a*100)} percent of the limit, ${l===`over`?`over`:l===`near`?`near the limit`:`fine`}`,className:`relative block h-2 min-w-0 flex-1 rounded-full bg-surface-strong`,children:[(0,G.jsx)(`span`,{className:s(`absolute inset-y-0 left-0 rounded-full transition-[width] duration-200 ease-out`,l===`near`?`bg-warn`:`bg-accent`),style:u}),(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -inset-y-1 w-px bg-warn`,style:{left:c(n)}}),(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -inset-y-1 w-0.5 bg-fail`,style:{left:c(1)}})]}),(0,G.jsx)(`span`,{"aria-hidden":`true`,className:s(`text-label-sm whitespace-nowrap`,l===`over`?`text-fail`:l===`near`?`text-warn`:`text-muted`),children:l===`over`?`over`:l===`near`?`near the limit`:`fine`})]})}function dr({parts:e,label:t,className:n}){let r=e.reduce((e,t)=>e+Math.max(0,t.value),0);return(0,G.jsx)(`span`,{role:`img`,"aria-label":t,className:s(`flex h-6 w-full min-w-0 gap-1`,n),children:e.filter(e=>e.value>0).map(e=>(0,G.jsx)(`span`,{"aria-hidden":`true`,className:s(`flex min-w-1 items-center justify-center overflow-hidden rounded-md text-label-sm font-medium whitespace-nowrap text-bg tabular-nums transition-[flex-grow] duration-200 ease-out`,e.className),style:{flexGrow:e.value,flexBasis:0},children:r&&e.value/r>=.08?e.text??e.value:null},e.key))})}var fr={pass:`bg-pass`,fail:`bg-fail`,warn:`bg-warn`,muted:`bg-line-strong`},pr={pass:`var(--color-pass)`,fail:`var(--color-fail)`,warn:`var(--color-warn)`,muted:`var(--color-line-strong)`};function mr({runs:e,label:t,className:n}){return(0,G.jsx)(`span`,{role:`img`,"aria-label":t,className:s(`inline-flex flex-none items-center gap-1`,n),children:e.map((t,n)=>{let r=n===e.length-1;return(0,G.jsx)(`span`,{"data-tip":t.title,"aria-hidden":`true`,className:s(`block flex-none rounded-full`,fr[t.tone],r?`size-3`:`size-2`),style:r?{boxShadow:`0 0 0 2px var(--color-bg), 0 0 0 3px ${pr[t.tone]}`}:void 0},n)})})}function hr({share:e,marks:t,className:n,fill:r}){return(0,G.jsxs)(`span`,{"aria-hidden":`true`,className:s(`relative block h-2 rounded-full bg-surface-strong`,n),children:[(0,G.jsx)(`span`,{className:s(`absolute inset-y-0 left-0 rounded-full transition-[width] duration-200 ease-out`,r),style:{width:`${Math.max(0,Math.min(1,e))*100}%`}}),t.map(e=>(0,G.jsx)(`span`,{className:`absolute -inset-y-1 w-px bg-muted`,style:{left:`${e*100}%`}},e))]})}function gr({value:e,label:t,size:n=`sm`,className:r}){let i=n===`lg`?104:56,a=n===`lg`?8:5,o=(i-a)/2,c=2*Math.PI*o,l=e===null?0:Math.max(0,Math.min(100,e))/100,u=e===null?`text-muted`:`text-accent`;return(0,G.jsxs)(`figure`,{role:`img`,"aria-label":`${t}: ${e===null?`not scored`:`${Math.round(e)} out of 100`}`,className:s(`m-0 flex flex-col items-center gap-2`,r),children:[(0,G.jsxs)(`span`,{className:`relative inline-flex`,style:{width:i,height:i},children:[(0,G.jsxs)(`svg`,{"aria-hidden":`true`,width:i,height:i,viewBox:`0 0 ${i} ${i}`,className:`-rotate-90`,children:[(0,G.jsx)(`circle`,{cx:i/2,cy:i/2,r:o,fill:`none`,stroke:`currentColor`,strokeWidth:a,className:`text-surface-strong`}),(0,G.jsx)(`circle`,{cx:i/2,cy:i/2,r:o,fill:`none`,stroke:`currentColor`,strokeWidth:a,strokeLinecap:`round`,strokeDasharray:c,strokeDashoffset:c*(1-l),className:s(`transition-[stroke-dashoffset] duration-200 ease-out`,u)})]}),(0,G.jsx)(`span`,{"aria-hidden":`true`,className:s(`absolute inset-0 flex items-center justify-center tabular-nums`,n===`lg`?`text-headline-md`:`text-body-sm font-medium`),children:e===null?`–`:Math.round(e)})]}),(0,G.jsx)(`figcaption`,{"aria-hidden":`true`,className:`text-center text-body-sm text-muted`,children:t})]})}var _r={error:`text-fail`,warn:`text-warn`},vr=/\b(?:0|no|zero)\s+(?:errors?|failures?|failed|warnings?)\b|"(?:errors?|warnings?)"\s*:\s*(?:(?:null|false|0)\b|""|\[\])/gi,yr=/\b(?:error|errors|fatal|exception|traceback|failed|failure|failing|panic|critical)\b|\bERR!|\b[A-Z]\w*(?:Error|Exception):|[✗✘❌]/i,br=/\b(?:warn|warning|warnings|deprecated|deprecation)\b|⚠/i;function xr(e){let t=e.replace(vr,``);return yr.test(t)?`error`:br.test(t)?`warn`:null}function Sr({text:e}){let t=e.split(`
2
- `);return(0,G.jsx)(G.Fragment,{children:t.map((e,n)=>{let r=xr(e),i=n<t.length-1?`
3
- `:``;return r?(0,G.jsxs)(`span`,{"data-level":r,className:_r[r],children:[e,i]},n):(0,G.jsxs)(K.Fragment,{children:[e,i]},n)})})}function Cr({href:e,label:t,className:n}){return(0,G.jsxs)(`a`,{href:e,className:s(`inline-flex min-h-9 w-fit items-center gap-2 self-start text-body-sm`,n),children:[(0,G.jsx)(me,{size:16,"aria-hidden":`true`}),t]})}var wr=()=>typeof location>`u`?[]:location.hash.replace(/^#\/?/,``).split(`/`).filter(Boolean);function Tr(){let[e,t]=(0,K.useState)(wr);return(0,K.useEffect)(()=>{let e=()=>t(wr());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),e}function Er({to:e,className:t}){let n=St(Tr()),r=e??n;return r?(0,G.jsx)(Cr,{href:r.href,label:r.label,className:s(`md:hidden`,t)}):null}export{Ct as C,q as S,Zn as _,ur as a,Nt as b,gr as c,cr as d,nr as f,er as g,tr as h,sr as i,hr as l,rr as m,Er as n,lr as o,ir as p,Sr as r,mr as s,Cr as t,dr as u,Xn as v,wt as w,jt as x,Yn as y};
@@ -1 +0,0 @@
1
- var e=1e3;function t(t,n,r){let i=Math.max(1,Math.floor(t)||1),a=Math.min(15e3,e*2**Math.min(i-1,4));return n===401?{waitMs:a,say:r,giveUp:!0}:n===404?{waitMs:e*2,say:i>=3?r:null,giveUp:i>=3}:n===0||n>=500?{waitMs:a,say:i>=3?`Reconnecting to ForgeQE web… The chat carries on there; this page catches up when it answers.`:null,giveUp:!1}:{waitMs:a,say:r,giveUp:!1}}function n(e,t=typeof window>`u`?null:window){return new Promise(n=>{let r=()=>{clearTimeout(a),t?.removeEventListener(`online`,r),t?.removeEventListener(`focus`,r),typeof document<`u`&&document.removeEventListener(`visibilitychange`,i),n()},i=()=>{(typeof document>`u`||document.visibilityState===`visible`)&&r()},a=setTimeout(r,e);t?.addEventListener(`online`,r),t?.addEventListener(`focus`,r),typeof document<`u`&&document.addEventListener(`visibilitychange`,i)})}export{n,t};
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-BDur5s0O.js";import{r as n}from"./route-9BkoTWUE.js";import{F as r,H as i,l as a,o,u as s}from"./preload-helper-BupTYkQW.js";import{t as c}from"./utils-DJRAScIl.js";import{t as l}from"./jsx-runtime-LKYXHABd.js";import{Y as u}from"./api-Dr3U7W5w.js";import{C as d,S as f,b as p,f as m,g as h,u as g,v as _,w as v,x as y}from"./pageBack-Blig1Uqs.js";import{$t as b,E as x,Er as S,Gr as C,I as w,Kr as T,N as E,Nr as D,Nt as O,Qn as k,Rt as A,Tr as j,Wn as ee,Wr as te,Yt as M,Zt as ne,_t as re,at as ie,cn as ae,ct as oe,lt as se,o as ce,or as le,t as ue,v as de,wr as fe,xt as pe,yt as me,z as he}from"./line-icons-Cwj9OmCz.js";import{Ct as N,Et as ge,Jt as P,St as F,_t as I,bt as L,vt as _e,wt as R,zt as ve}from"./frame-CavkQick.js";import{t as ye}from"./when-BuWCTaKm.js";import"./code-Jek8uWUO.js";import{n as be}from"./markdown-Bvv6oj4v.js";import{X as z,Y as xe,Z as B}from"./index-C1kXcI0E.js";var V=e(t(),1),H=l(),U={failed:{label:`Fails`,cell:`bg-fail text-bg`,key:`bg-fail`},review:{label:`Needs a person`,cell:`bg-warn text-bg`,key:`bg-warn`},passed:{label:`Rules pass`,cell:`bg-pass-soft`,key:`bg-pass-soft`},exercised:{label:`A persona got through`,cell:`bg-accent-line`,key:`bg-accent-line`},not_tested:{label:`Checked by hand`,cell:`bg-bg ring-1 ring-line ring-inset`,key:`bg-bg ring-1 ring-line-strong ring-inset`}};function Se({cells:e,label:t,className:n,words:r,count:i,keyed:a=!0}){let o=[...new Set(e.map(e=>e.group))],s=e=>r?.[e]??U[e].label;return(0,H.jsxs)(`div`,{className:c(`@container flex min-w-0 flex-col gap-4`,n),children:[(0,H.jsx)(`div`,{className:`flex flex-col gap-4 @3xl:flex-row @3xl:gap-4`,children:o.map(n=>{let r=e.filter(e=>e.group===n);return(0,H.jsxs)(`div`,{className:`flex min-w-32 flex-col gap-2`,style:{flexGrow:r.length,flexBasis:0},children:[(0,H.jsx)(`ol`,{"aria-label":`${t}: ${n}`,className:`m-0 flex list-none gap-1 p-0`,children:r.map(e=>{let t=U[e.result],n=e.result===`failed`||e.result===`review`;return(0,H.jsxs)(`li`,{"data-tip":`${e.id} ${e.title} (${e.level}): ${s(e.result)}`,className:c(`flex h-11 min-w-0 flex-1 items-end justify-center overflow-hidden rounded-sm pb-1`,t.cell),children:[n&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`text-label-sm [writing-mode:vertical-rl] rotate-180`,children:e.id}),(0,H.jsx)(`span`,{className:`sr-only`,children:`${e.id} ${e.title}: ${s(e.result)}`})]},e.id)})}),(0,H.jsxs)(`span`,{className:`flex justify-between gap-2 text-label-md text-ink-2`,children:[(0,H.jsx)(`span`,{className:`truncate`,children:n}),(0,H.jsx)(`span`,{className:`flex-none text-muted tabular-nums`,children:i?i(r):r.length})]})]},n)})}),a&&(0,H.jsx)(Ce,{cells:e,words:r})]})}function Ce({cells:e,words:t}){let n=Object.keys(U).filter(t=>e.some(e=>e.result===t));return(0,H.jsx)(`ul`,{"aria-label":`Key`,className:`m-0 flex list-none flex-wrap gap-x-4 gap-y-1 p-0 text-label-md text-muted`,children:n.map(e=>(0,H.jsxs)(`li`,{className:`inline-flex items-center gap-2`,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:c(`size-3 rounded-sm`,U[e].key)}),t?.[e]??U[e].label]},e))})}var W={region:{title:`Some content sits outside the page's regions`,why:`Screen reader users jump between regions (header, main, navigation, footer) to find things. Content outside every region is easy to miss.`,fix:["Put the content inside a region: `<main>`, `<header>`, `<nav>`, `<aside>` or `<footer>`.","For a banner or strip of its own, a `<section>` or `<aside>` with an `aria-label` is enough."]},"landmark-unique":{title:`Two regions of the same kind have the same name`,why:`A screen reader lists both under one name, so people can't tell which one they are moving to.`,fix:["Give each region its own `aria-label`, such as “Flight filters” and “Sort options”.",`Or, if they are one thing, merge them into a single region.`]},"landmark-one-main":{title:`The page has no main region`,why:`Screen reader users skip straight to the main content with one key. Without a main region they have to read through everything before it.`,fix:["Wrap the page's main content in one `<main>` element."]},"landmark-complementary-is-top-level":{title:`A side region is nested inside another region`,why:`Screen readers list regions as an outline; a side region buried inside another is hard to find and confusing to reach.`,fix:["Move the `<aside>` out so it is not inside `<main>`, `<nav>` or another region, or make it a plain `<div>`."]},"color-contrast":{title:`Text is too faint against its background`,why:`People with low vision, colour blindness or a screen in sunlight can't read text without enough contrast.`,fix:[`Darken the text or lighten the background until the contrast is at least 4.5:1 (3:1 for large text).`,`Check the colours with a contrast checker, including hover and disabled states.`]},"link-in-text-block":{title:`A link in a sentence can only be told apart by its colour`,why:`People who can't see the colour difference don't know the words are a link.`,fix:[`Underline links inside text, or give them a contrast of 3:1 with the text around them plus a visible change on hover and focus.`]},"image-alt":{title:`An image has no text alternative`,why:`Screen readers can't describe the image, so its meaning is lost; some read out the file name instead.`,fix:["Add an `alt` that says what the image shows or does.",'If it is only decoration, use `alt=""` so screen readers skip it.']},"role-img-alt":{title:`An element shown as an image has no text alternative`,why:`Screen readers announce an image with nothing to say about it.`,fix:["Give it an `aria-label` or `aria-labelledby` that says what it shows."]},"svg-img-alt":{title:`An SVG image has no text alternative`,why:`Screen readers announce an image with nothing to say about it.`,fix:["Add a `<title>` inside the SVG, or an `aria-label` on it.",'If it is only decoration, add `aria-hidden="true"`.']},"input-image-alt":{title:`An image button has no text alternative`,why:`Screen reader users hear “button” but not what it does.`,fix:['Add an `alt` to the `<input type="image">` that says what the button does.']},"image-redundant-alt":{title:`An image's text repeats the words next to it`,why:`Screen reader users hear the same thing twice.`,fix:["Make the image's `alt` empty, or say something the nearby text doesn't."]},label:{title:`A form field has no label`,why:`Screen reader users don't know what to type, and clicking the words next to the field doesn't focus it.`,fix:['Add a `<label for="…">` tied to the field\'s `id`.',"If a visible label really can't be shown, add an `aria-label`."]},"select-name":{title:`A drop-down has no label`,why:`Screen reader users don't know what they are choosing.`,fix:['Add a `<label for="…">` tied to the `<select>`\'s `id`, or an `aria-label`.']},"autocomplete-valid":{title:`A field's autocomplete value is not one browsers know`,why:`Browsers and password managers can't fill it in, which matters most to people who find typing hard.`,fix:["Use a standard `autocomplete` value, such as `email`, `given-name` or `postal-code`."]},"button-name":{title:`A button has no name`,why:`Screen reader users hear “button” but not what it does; voice control users can't say its name to press it.`,fix:["Put text inside the button, or add an `aria-label` for an icon-only button."]},"link-name":{title:`A link has no name`,why:`Screen reader users hear “link” but not where it goes.`,fix:["Put text inside the link, or give an icon link an `aria-label`.","For an image link, give the image an `alt` that says where it goes."]},"html-has-lang":{title:`The page doesn't say which language it is in`,why:`Screen readers read the page with the wrong voice and pronunciation.`,fix:['Add the language to the page, such as `<html lang="en">`.']},"html-lang-valid":{title:`The page's language code is not a real one`,why:`Screen readers can't pick the right voice and pronunciation.`,fix:["Use a valid code in `<html lang>`, such as `en`, `en-GB` or `fr`."]},"document-title":{title:`The page has no title`,why:`The title is the first thing a screen reader says and what shows in tabs and history; without it people can't tell pages apart.`,fix:["Add a `<title>` that says what the page is, such as “Search results – Flights”."]},"frame-title":{title:`A frame has no title`,why:`Screen reader users don't know what the embedded content is before going into it.`,fix:["Add a `title` to the `<iframe>` that says what it holds."]},"heading-order":{title:`Heading levels skip a step`,why:`Screen reader users move through a page by its headings; a skipped level makes them think something is missing.`,fix:["Go down one level at a time: an `<h2>` is followed by an `<h3>`, not an `<h4>`.",`Choose the level by the outline, then style it to the size you want.`]},"page-has-heading-one":{title:`The page has no main heading`,why:`Screen reader users jump to the main heading to learn what the page is about.`,fix:["Add one `<h1>` that names the page."]},"empty-heading":{title:`A heading is empty`,why:`Screen readers announce a heading with nothing in it, which is confusing when moving by headings.`,fix:[`Put text in the heading, or remove it if it is only used for spacing.`]},list:{title:`A list holds things that aren't list items`,why:`Screen readers miscount the items or don't announce it as a list.`,fix:["Put only `<li>` elements (or `<script>` and `<template>`) directly inside `<ul>` and `<ol>`."]},listitem:{title:`A list item is outside a list`,why:`Screen readers don't announce it as part of a list.`,fix:["Put every `<li>` inside a `<ul>` or `<ol>`."]},"duplicate-id-aria":{title:`Two elements share an id that labels something`,why:`A field or control can end up announced with another element's label.`,fix:["Give every element that `aria-labelledby`, `aria-describedby` or `<label for>` points at its own `id`."]},"aria-allowed-attr":{title:`An element uses an ARIA attribute its role doesn't allow`,why:`Screen readers ignore it or announce the element wrongly.`,fix:["Remove the attribute, or change the element's `role` to one that supports it."]},"aria-required-attr":{title:`An element is missing an ARIA attribute its role needs`,why:`Screen readers can't tell its state, such as whether a box is ticked or a section is open.`,fix:['Add the attribute the role needs, such as `aria-checked` on a `role="checkbox"`.']},"aria-valid-attr-value":{title:`An ARIA attribute has a value that isn't allowed`,why:`Screen readers ignore it, so the element's state or relations are lost.`,fix:[`Use one of the attribute's allowed values, and make every id it points at exist on the page.`]},"aria-hidden-focus":{title:`Hidden content can still be reached with the keyboard`,why:`Keyboard users land on something a screen reader says nothing about.`,fix:['Make the controls inside unfocusable with `tabindex="-1"` or `inert`, or don\'t hide the content.']},"nested-interactive":{title:`A control is inside another control`,why:`Screen readers announce only the outer one, and the inner one may be impossible to reach.`,fix:[`Move the inner link or button out, so no control holds another.`]},"scrollable-region-focusable":{title:`A scrolling area can't be scrolled with the keyboard`,why:`Keyboard users can't reach the content hidden in it.`,fix:['Add `tabindex="0"` and an `aria-label` to the scrolling element, or put a focusable control in it.']},tabindex:{title:`An element jumps the keyboard order`,why:"A `tabindex` above 0 makes keyboard focus jump around the page in an order people don't expect.",fix:['Use `tabindex="0"` or none, and order the HTML the way people should move through it.']},"meta-viewport":{title:`The page stops people from zooming`,why:`People with low vision need to zoom in to read.`,fix:["Remove `user-scalable=no` and any `maximum-scale` below 5 from the viewport `<meta>`."]},"target-size":{title:`A control is too small to tap reliably`,why:`People with tremors or large fingers hit the wrong thing.`,fix:[`Make the control at least 24 by 24 pixels, or leave that much space around it.`]}},we=e=>e.split("`").map((e,t)=>({code:t%2==1,text:e})).filter(e=>e.text),G=[`critical`,`serious`,`moderate`,`minor`],Te={critical:`fail`,serious:`fail`,moderate:`warn`,minor:`neutral`},K=[{key:`lcp`,label:`LCP`,good:2500,poor:4e3,unit:`ms`},{key:`cls`,label:`CLS`,good:.1,poor:.25,unit:``},{key:`inp`,label:`INP`,good:200,poor:500,unit:`ms`},{key:`fcp`,label:`FCP`,good:1800,poor:3e3,unit:`ms`},{key:`ttfb`,label:`TTFB`,good:800,poor:1800,unit:`ms`},{key:`load`,label:`Load`,good:1/0,poor:1/0,unit:`ms`}],q=(e,t)=>t?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:e.toFixed(3).replace(/(?<!0)0+$/,``).replace(/\.$/,``),J=(e,t)=>`${e} ${t}${e===1?``:`s`}`,Y=e=>`${e} ${e===1?`criterion`:`criteria`}`,Ee=e=>e.replace(/(data:[\w/+.-]+;base64,)[A-Za-z0-9+/=]{24,}/g,`$1…`),X=e=>{try{let t=new URL(e),n=t.pathname===`/`?``:t.pathname.length>44?`${t.pathname.slice(0,20)}…${t.pathname.slice(-20)}`:t.pathname;return`${t.host}${n}${t.search?`?…`:``}`}catch{return e.length>70?`${e.slice(0,68)}…`:e}},De=e=>{try{let t=new URL(String(e??``));return t.protocol===`http:`||t.protocol===`https:`?t.href:null}catch{return null}},Z=e=>e>=90?`text-pass`:e>=60?`text-warn`:`text-fail`,Oe=[{label:`Use only a keyboard`,icon:b,how:`Tab through every control: can you reach it, see where focus is, and get out again?`,people:[`Keyboard only`]},{label:`Zoom to 200% and enlarge text`,icon:T,how:`Nothing is cut off, overlaps or needs scrolling sideways.`,people:[`200% zoom`,`Large text`]},{label:`Listen with a screen reader`,icon:ie,how:`Headings, names and changes on the page are announced in a sensible order.`,people:[`Screen reader`]},{label:`Look past colour and motion`,icon:se,how:`Nothing relies on colour alone, motion can be stopped, and contrast holds in high contrast mode.`,people:[`Colour vision`,`Reduced motion`,`High contrast`,`Blur or low contrast`]},{label:`Read, understand and correct`,icon:de,how:`Instructions, errors and help are clear, consistent and let you recover.`,people:[`Cognitive`]},{label:`Touch, gestures and media`,icon:le,how:`Targets are big enough, gestures have a simple way round, media has captions.`,people:[`Touch`,`Hand tremor`,`Deaf or hard of hearing`]}],ke={label:`Read and judge the content`,icon:me,how:`A person reads the page and judges it against the criterion.`},Ae={critical:`bg-fail`,serious:`bg-warn`,moderate:`bg-placeholder`,minor:`bg-line-strong`};function je({items:e}){return(0,H.jsx)(`span`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-body-sm text-ink-2 tabular-nums`,children:e.map(e=>(0,H.jsx)(`span`,{"data-tip":e.title,children:e.id},e.id))})}function Me({text:e}){return(0,H.jsx)(H.Fragment,{children:we(e).map((e,t)=>e.code?(0,H.jsx)(`code`,{className:`rounded-sm bg-surface-muted px-1 font-mono text-body-sm`,children:e.text},t):(0,H.jsx)(`span`,{children:e.text},t))})}function Ne({f:e,examples:t}){let[n,r]=(0,V.useState)(!1),a=Object.hasOwn(W,e.rule)?W[e.rule]:void 0,o=[...new Set(t.map(e=>e.page))],s=De(e.helpUrl);return(0,H.jsxs)(`li`,{className:`flex flex-col`,children:[(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":n,onClick:()=>r(!n),className:c(i,`grid grid-cols-[minmax(0,1fr)_auto_16px] gap-4 text-left @xl:grid-cols-[96px_minmax(0,1fr)_72px_56px_16px]`),children:[(0,H.jsx)(`span`,{className:`col-span-3 @xl:col-span-1`,children:(0,H.jsx)(h,{tone:Te[e.impact],className:`capitalize`,children:e.impact})}),(0,H.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,H.jsx)(`span`,{className:`text-body-md text-ink [overflow-wrap:anywhere]`,children:a?.title??e.help}),a?(0,H.jsx)(`span`,{className:`text-body-sm text-ink-2`,children:a.why}):null,(0,H.jsx)(`span`,{className:`font-mono text-body-sm text-muted`,children:e.rule})]}),(0,H.jsxs)(`span`,{className:`flex flex-col items-end`,children:[(0,H.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:e.count}),(0,H.jsx)(`span`,{className:`text-body-sm text-muted`,children:e.count===1?`element`:`elements`})]}),(0,H.jsxs)(`span`,{className:`hidden flex-col items-end @xl:flex`,children:[(0,H.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:e.pages}),(0,H.jsx)(`span`,{className:`text-body-sm text-muted`,children:e.pages===1?`page`:`pages`})]}),(0,H.jsx)(x,{size:16,"aria-hidden":`true`,className:c(`text-icon transition-transform`,n&&`rotate-180`)})]}),(0,H.jsx)(P,{open:n,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4 @xl:pl-32`,children:[a?(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(`span`,{className:`text-body-sm font-medium text-ink`,children:`How to fix it`}),(0,H.jsx)(`ol`,{className:`m-0 flex list-decimal flex-col gap-1 pl-6 text-body-sm text-ink-2`,children:a.fix.map((e,t)=>(0,H.jsx)(`li`,{children:(0,H.jsx)(Me,{text:e})},t))})]}):null,t.length?(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(`span`,{className:`text-body-sm font-medium text-ink`,children:t.length<e.count?`The first ${t.length} of ${e.count}`:J(e.count,`element`)}),t.slice(0,3).map((e,t)=>(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsxs)(`span`,{className:`flex min-w-0 flex-wrap gap-x-2 text-body-sm text-muted`,children:[(0,H.jsx)(`span`,{"data-tip":e.page,children:X(e.page)}),e.target&&(0,H.jsx)(`span`,{className:`min-w-0 truncate font-mono`,"data-tip":e.target,children:e.target})]}),e.html&&(0,H.jsx)(`code`,{className:c(`overflow-auto rounded-base bg-surface-muted p-4 font-mono text-body-sm leading-relaxed whitespace-pre-wrap text-ink-2 [overflow-wrap:anywhere]`,`line-clamp-3 break-all`),children:Ee(e.html)}),e.fix?.length?(0,H.jsx)(`span`,{className:`flex flex-col text-body-sm text-ink-2`,children:e.fix.map((e,t)=>(0,H.jsx)(`span`,{className:t===0&&/:$/.test(e)?`text-muted`:void 0,children:e},t))}):null]},t))]}):(0,H.jsx)(`span`,{className:`text-body-sm text-muted`,children:`No elements were kept for this rule.`}),(0,H.jsxs)(`span`,{className:`flex flex-wrap items-center justify-between gap-2 text-body-sm`,children:[(0,H.jsx)(`span`,{className:`text-muted`,children:o.length?`On ${o.map(X).join(`, `)}`:``}),s&&(0,H.jsxs)(`a`,{href:s,target:`_blank`,rel:`noreferrer noopener`,className:`inline-flex items-center gap-1`,children:[a?`More from the checker`:`How to fix it`,` `,(0,H.jsx)(oe,{size:12,"aria-hidden":`true`})]})]})]})})]})}var Pe=(e,t)=>Object.hasOwn(e.examples,t)&&Array.isArray(e.examples[t])?e.examples[t]:[];function Fe({run:e,standard:t,disclaimer:n,links:r={}}){let i=e.report,a=e.ledger,[o,l]=(0,V.useState)(!1),[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(null);if(!i?.accessibility.pages)return(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no accessibility results: report.accessibility was off, or the run visited no page.`});let m=i.accessibility,_=i.breaches.filter(e=>e.kind===`accessibility`),b=a?.criteria??[],S=e=>b.find(t=>t.id===e),C=a?.summary??{},T=m.failed.reduce((e,t)=>e+t.count,0),E=b.map(e=>({id:e.id,title:e.title,level:e.level,group:e.principle,result:e.result})),O=new Map;for(let e of[...m.failed].sort((e,t)=>G.indexOf(e.impact)-G.indexOf(t.impact)||t.count-e.count))O.set(e.wcag||``,[...O.get(e.wcag||``)||[],e]);let k=b.filter(e=>e.result===`not_tested`),j=[...Oe.map(e=>({...e,items:k.filter(t=>t.people.some(t=>e.people.includes(t)))})),{...ke,items:k.filter(e=>!e.people.length)}].filter(e=>e.items.length),ee=(0,H.jsx)(z,{icon:te,title:`Fix these`,n:m.failed.length?`${J(m.failed.length,`rule`)} break ${Y([...O.keys()].filter(Boolean).length)}, ${T} elements in all`:void 0,divider:!1,children:m.failed.length?(0,H.jsx)(`div`,{className:`flex flex-col gap-6`,children:[...O.entries()].map(([t,n])=>{let r=S(t),i=new Set(n.flatMap(t=>Pe(e,t.rule).map(e=>e.page)));return(0,H.jsxs)(`section`,{"aria-label":t?`${t} ${r?.title??``}`:`Not tied to a criterion`,className:`flex flex-col gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,H.jsx)(`span`,{className:`flex h-9 w-14 flex-none items-center justify-center rounded-base bg-fail-soft text-label-md text-fail tabular-nums`,children:t||`–`}),(0,H.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,H.jsx)(`span`,{className:`text-body-lg font-medium`,children:t?r?.title??`WCAG ${t}`:`Not tied to a WCAG criterion`}),(0,H.jsxs)(`span`,{className:`text-body-sm text-muted`,children:[r?`Level ${r.level}, `:``,J(n.length,`rule`),`, `,n.reduce((e,t)=>e+t.count,0),` elements`,i.size?` on ${J(i.size,`page`)}`:``]})]})]}),(0,H.jsx)(s,{className:`p-0 @xl:ml-18`,children:(0,H.jsx)(`ul`,{className:`m-0 flex list-none flex-col divide-y divide-line-soft p-0`,children:n.map(t=>(0,H.jsx)(Ne,{f:t,examples:Pe(e,t.rule)},t.rule))})})]},t||`none`)})}):(0,H.jsx)(v,{tone:`pass`,children:`No rule failed on the pages this run checked.`})}),M=a?(0,H.jsxs)(z,{icon:ae,title:`Check these by hand`,description:`What the rules cannot settle.`,divider:!1,children:[a.review.length>0&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(B,{icon:w,level:3,title:`The rules could not decide`,n:a.review.length}),(0,H.jsx)(v,{tone:`warn`,as:`div`,children:(0,H.jsx)(`ul`,{className:`m-0 flex list-none flex-col divide-y divide-warn/10 p-0`,children:a.review.map(e=>(0,H.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1 py-2`,children:[(0,H.jsx)(`span`,{className:`text-ink`,children:Object.hasOwn(W,e.rule)?W[e.rule].title:(0,H.jsx)(`span`,{className:`font-mono`,children:e.rule})}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 text-ink-2`,children:e.criteria.map(e=>`${e.id} ${e.title}`).join(`, `)}),(0,H.jsx)(`span`,{className:`text-muted tabular-nums`,children:J(e.pages,`page`)})]},e.rule))})})]}),j.length>0&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(B,{icon:D,level:3,title:`No rule checks these ${Y(k.length)}`}),(0,H.jsx)(s,{className:`p-0`,children:(0,H.jsx)(`ul`,{className:`m-0 flex list-none flex-col divide-y divide-line-soft p-0`,children:j.map(e=>{let t=f===e.label,n=`hand-${e.label.replace(/\W+/g,`-`).toLowerCase()}`;return(0,H.jsxs)(`li`,{children:[(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":t,"aria-controls":n,onClick:()=>p(t?null:e.label),className:c(`flex w-full min-h-11 cursor-pointer items-center gap-4 rounded-base border-0 bg-transparent px-4 py-2 text-left text-body-sm text-ink no-underline transition-colors duration-150 hover:bg-tint hover:text-ink aria-[current]:bg-tint-hover aria-selected:bg-tint-hover aria-pressed:bg-tint-hover aria-checked:bg-tint-hover has-[:checked]:bg-tint-hover disabled:cursor-not-allowed disabled:opacity-50`,`w-full gap-4`),children:[(0,H.jsx)(ve,{icon:e.icon}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 text-left text-body-md`,children:e.label}),(0,H.jsx)(`span`,{className:`text-body-sm text-muted tabular-nums`,children:e.items.length}),(0,H.jsx)(x,{size:14,"aria-hidden":`true`,className:c(`text-icon transition-transform`,!t&&`-rotate-90`)})]}),(0,H.jsxs)(P,{open:t,id:n,className:`flex flex-col gap-2 px-4 pb-4 @xl:pl-18`,children:[(0,H.jsx)(`span`,{className:`text-body-sm text-ink-2`,children:e.how}),(0,H.jsx)(je,{items:e.items})]})]},e.label)})})}),(0,H.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[`Personas test most of these by how they use the page.`,r.personas?(0,H.jsxs)(H.Fragment,{children:[` `,(0,H.jsx)(`a`,{href:r.personas,children:`Test with personas`})]}):null]})]})]}):null;return(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-6`,children:[a&&(0,H.jsxs)(s,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`p`,{className:`m-0 flex flex-wrap items-baseline gap-x-4 gap-y-1`,children:[(0,H.jsx)(`span`,{className:c(`text-headline-sm`,C.failed?`text-fail`:`text-pass`),children:C.failed?`${Y(C.failed)} ${C.failed===1?`fails`:`fail`}`:`Nothing failed`}),C.review?(0,H.jsx)(`span`,{className:`text-body-md text-warn`,children:C.review===1?`1 check needs you`:`${C.review} checks need you`}):null]}),(0,H.jsx)(Se,{keyed:!1,label:`${a.label} criteria`,cells:E}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsxs)(y,{variant:`ghost`,size:`sm`,"aria-expanded":u,"aria-controls":`ruler-help-${e.id}`,onClick:()=>d(!u),className:`gap-1 self-start`,children:[(0,H.jsx)(x,{size:13,"aria-hidden":`true`,className:c(`text-muted transition-transform`,!u&&`-rotate-90`)}),`How to read this`]}),(0,H.jsxs)(P,{open:u,id:`ruler-help-${e.id}`,className:`flex flex-col gap-2`,children:[(0,H.jsx)(Ce,{cells:E}),(0,H.jsxs)(`p`,{className:`m-0 text-body-md text-ink-2`,children:[`Each square is one `,a.label,` criterion. `,C.failed?`${Y(C.failed)} ${C.failed===1?`fails`:`fail`}`:`No criterion fails`,` on `,m.pages===1?`this page`:`these ${m.pages} pages`,C.review?`, and ${C.review} ${C.review===1?`needs`:`need`} a person to decide`:``,`. `,C.passed??0,` `,C.passed===1?`passes`:`pass`,` every rule that checks `,C.passed===1?`it`:`them`,`; the other `,C.not_tested??0,` no rule can check, so a person tests them by hand.`]})]})]})]}),_.map((e,t)=>(0,H.jsxs)(v,{tone:`fail`,children:[`Over budget on `,X(e.page),`: `,e.text]},t)),(0,H.jsxs)(`div`,{className:`grid items-start gap-10 @5xl:grid-cols-[minmax(0,1fr)_300px]`,children:[(0,H.jsx)(`div`,{className:`flex min-w-0 flex-col gap-10`,children:m.failed.length?(0,H.jsxs)(H.Fragment,{children:[ee,M]}):(0,H.jsxs)(H.Fragment,{children:[!a&&(0,H.jsx)(v,{tone:`pass`,children:`Nothing failed on the pages this run checked.`}),M]})}),(0,H.jsxs)(`aside`,{"aria-label":`About this run`,className:`flex min-w-0 flex-col gap-6 @5xl:sticky @5xl:top-6`,children:[a&&(0,H.jsxs)(s,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(B,{icon:A,level:3,title:`Pages checked`,n:a.pages.length}),(0,H.jsx)(`ul`,{className:`m-0 flex list-none flex-col divide-y divide-line-soft p-0`,children:a.pages.map(e=>(0,H.jsxs)(`li`,{className:`flex flex-col gap-1 py-2`,children:[(0,H.jsxs)(`span`,{className:`flex items-baseline justify-between gap-2`,children:[(0,H.jsx)(`span`,{className:`min-w-0 truncate text-body-sm font-medium text-ink`,"data-tip":e.url,children:e.title||X(e.url)}),(0,H.jsx)(`span`,{className:c(`text-body-sm font-medium tabular-nums`,e.total?`text-fail`:`text-pass`),children:e.total})]}),(0,H.jsx)(`span`,{className:`truncate text-body-sm text-muted`,children:X(e.url)}),e.total>0&&(0,H.jsx)(g,{label:G.filter(t=>e.byImpact[t]).map(t=>`${e.byImpact[t]} ${t}`).join(`, `),parts:G.map(t=>({key:t,value:e.byImpact[t],className:Ae[t],text:``})),className:`h-2`})]},e.url))})]}),(0,H.jsxs)(s,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(B,{icon:ne,level:3,title:`This run`}),(0,H.jsxs)(`dl`,{className:`m-0 grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-body-sm`,children:[(0,H.jsx)(`dt`,{className:`text-muted`,children:`Standard`}),(0,H.jsx)(`dd`,{className:`m-0 text-ink-2`,children:a?.label??t}),(0,H.jsx)(`dt`,{className:`text-muted`,children:`Engine`}),(0,H.jsx)(`dd`,{className:`m-0 text-ink-2`,children:a?.engine||i.engine||`axe-core`}),(0,H.jsx)(`dt`,{className:`text-muted`,children:`Budget`}),(0,H.jsx)(`dd`,{className:`m-0 text-ink-2`,children:i.budgets.accessibility?_.length?`${J(_.length,`budget`)} exceeded`:`Within the budget`:`None set, so nothing fails the run`})]}),r.measured?(0,H.jsx)(xe,{href:r.measured,children:`Everything it measured`}):null]}),m.passed.length>0&&(0,H.jsxs)(s,{className:`flex flex-col p-0`,children:[(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":o,onClick:()=>l(!o),className:c(`flex w-full min-h-11 cursor-pointer items-center gap-4 rounded-base border-0 bg-transparent px-4 py-2 text-left text-body-sm text-ink no-underline transition-colors duration-150 hover:bg-tint hover:text-ink aria-[current]:bg-tint-hover aria-selected:bg-tint-hover aria-pressed:bg-tint-hover aria-checked:bg-tint-hover has-[:checked]:bg-tint-hover disabled:cursor-not-allowed disabled:opacity-50`,`justify-between`),children:[(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,H.jsx)(x,{size:14,"aria-hidden":`true`,className:c(`text-icon transition-transform`,!o&&`-rotate-90`)}),`Rules that passed`]}),(0,H.jsx)(`span`,{className:`text-muted tabular-nums`,children:m.passed.length})]}),(0,H.jsx)(P,{open:o,children:(0,H.jsx)(`ul`,{className:`m-0 flex list-none flex-wrap gap-1 p-2`,children:m.passed.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsx)(h,{tone:`pass`,icon:!1,className:`font-mono`,children:e})},e))})})]})]})]}),(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:n})]})}function Ie({run:e}){let t=e.report;if(!t?.performance.pages.length)return(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no timings: the run visited no page.`});let n=(e,t)=>e>t.poor?`poor`:e>t.good?`needs improvement`:`good`,r={poor:`text-fail`,"needs improvement":`text-warn`,good:`text-pass`},i=t.breaches.filter(e=>e.kind===`performance`);return(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,H.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[`Core Web Vitals of each page, from one visit in ForgeQE's browser, against Google's thresholds: `,(0,H.jsx)(`span`,{className:`text-pass`,children:`good`}),`, `,(0,H.jsx)(`span`,{className:`text-warn`,children:`needs improvement`}),`, `,(0,H.jsx)(`span`,{className:`text-fail`,children:`poor`}),`.`,` `,t.budgets.performance?`Pages over quality.budgets.performance are marked.`:`No performance budget set: nothing fails on timings.`]}),i.map((e,t)=>(0,H.jsxs)(`p`,{className:c(d.fail,`m-0`),children:[`Over budget · `,X(e.page),`: `,e.text]},t)),(0,H.jsx)(I,{label:`Timings`,minWidth:720,head:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`th`,{scope:`col`,className:N,children:`Page`}),K.map(e=>(0,H.jsx)(`th`,{scope:`col`,className:R,"data-tip":e.label,children:e.label},e.key)),(0,H.jsx)(`th`,{scope:`col`,className:R,children:`Requests`}),(0,H.jsx)(`th`,{scope:`col`,className:R,children:`Size`})]}),children:t.performance.pages.map((e,t)=>(0,H.jsxs)(`tr`,{className:`border-t border-line-soft align-top`,children:[(0,H.jsxs)(`td`,{className:L,children:[(0,H.jsx)(`span`,{className:`block max-w-[340px] truncate font-mono text-body-sm`,"data-tip":e.url,children:X(e.url)}),e.over.length>0&&(0,H.jsxs)(`span`,{className:`text-body-sm text-fail`,children:[`over: `,e.over.join(`, `)]})]}),K.map(t=>{let i=e[t.key];return(0,H.jsxs)(`td`,{"data-sort":typeof i==`number`?i:-1,className:c(F,typeof i==`number`&&t.good!==1/0?r[n(i,t)]:typeof i==`number`?`text-ink-2`:`text-muted`),children:[typeof i==`number`?q(i,t.unit):`–`,typeof i==`number`&&t.good!==1/0&&(0,H.jsxs)(`span`,{className:`sr-only`,children:[` (`,n(i,t),`)`]})]},t.key)}),(0,H.jsx)(`td`,{className:c(F,`text-muted`),children:e.requests??`–`}),(0,H.jsx)(`td`,{className:c(F,`text-muted`),"data-sort":e.kb??-1,children:e.kb===void 0?`–`:`${e.kb} KB`})]},t))}),(0,H.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[K.filter(e=>e.good!==1/0).map(e=>`${e.label}: good up to ${q(e.good,e.unit)}, poor over ${q(e.poor,e.unit)}`).join(`; `),`. Lab values from one visit, not data from real users.`]})]})}var Q={pass:{label:`Passed`,tone:`pass`,cell:`bg-pass-dot`},warn:{label:`Warning`,tone:`warn`,cell:`bg-warn-dot`},fail:{label:`Failed`,tone:`fail`,cell:`bg-fail-dot`}},Le={fail:0,warn:1,pass:2};function Re({checks:e}){return(0,H.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:e.map(e=>(0,H.jsxs)(`li`,{className:`flex flex-col gap-1 border-t border-line-soft py-2 first:border-t-0 @xl:flex-row @xl:gap-4`,children:[(0,H.jsx)(`span`,{className:`flex-none font-medium text-ink @xl:w-56`,children:e.label}),(0,H.jsx)(`span`,{className:`min-w-0 text-body-sm text-ink-2 [overflow-wrap:anywhere]`,children:e.text})]},e.id))})}function ze({checks:e}){let[t,n]=(0,V.useState)(!1),r=t=>e.filter(e=>e.status===t),i=[{status:`fail`,title:`To fix`,items:r(`fail`)},{status:`warn`,title:`To improve`,items:r(`warn`)}].filter(e=>e.items.length),a=r(`pass`);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[i.map(e=>(0,H.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,H.jsxs)(`h4`,{className:`m-0 flex items-center gap-2 text-body-md font-medium text-ink`,children:[(0,H.jsx)(h,{tone:Q[e.status].tone,className:`min-h-5 px-2 text-body-sm`,children:e.items.length}),e.title]}),(0,H.jsx)(Re,{checks:e.items})]},e.status)),!i.length&&(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-pass`,children:`Every check passed.`}),a.length>0&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":t,onClick:()=>n(!t),className:`flex cursor-pointer items-center gap-1 self-start border-0 bg-transparent p-0 text-body-sm text-ink-2`,children:[(0,H.jsx)(x,{size:14,"aria-hidden":`true`,className:c(`text-muted transition-transform`,!t&&`-rotate-90`)}),`Passed `,(0,H.jsx)(`span`,{className:`text-muted tabular-nums`,children:a.length})]}),t&&(0,H.jsx)(Re,{checks:a})]})]})}var Be=e=>{try{return new URL(e).host}catch{return e}};function Ve({seo:e}){let[t,n]=(0,V.useState)(e.pages[0]?.url??``),[r,i]=(0,V.useState)(!1),a=(e,t)=>e.checks.filter(e=>e.status===t).length,o=e.pages.reduce((e,t)=>e+a(t,`fail`),0),s=e.pages.reduce((e,t)=>e+a(t,`warn`),0),l=e.pages.find(e=>e.url===t)??e.pages[0];return(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-6`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsxs)(`p`,{className:`m-0 flex flex-wrap items-baseline gap-x-4 gap-y-1`,children:[(0,H.jsxs)(`span`,{className:c(`text-headline-sm font-medium`,Z(e.score)),children:[`Score `,e.score,e.pages.length>1?(0,H.jsx)(`span`,{className:`text-body-md font-normal text-muted`,children:` on average`}):null]}),(0,H.jsx)(`span`,{className:c(`text-body-md`,o?`text-fail`:`text-muted`),children:o?`${J(o,`check`)} to fix`:`Nothing to fix`}),(0,H.jsx)(`span`,{className:c(`text-body-md`,s?`text-warn`:`text-muted`),children:s?`${s} to improve`:`Nothing to improve`})]}),(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":r,onClick:()=>i(!r),className:`flex cursor-pointer items-center gap-1 self-start border-0 bg-transparent p-0 text-body-sm text-accent-fg`,children:[(0,H.jsx)(x,{size:14,"aria-hidden":`true`,className:c(`transition-transform`,!r&&`-rotate-90`)}),`How the score works`]}),r&&(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-ink-2`,children:`Each page gets the share of its checks that passed, weighted by how much each matters; a check to improve counts half. The checks read what the page tells search engines: its title, description, headings, canonical address, whether it may be indexed, language, mobile viewport, links, images and structured data.`})]}),e.pages.length>1&&(0,H.jsx)(`ul`,{"aria-label":`Pages`,className:`m-0 flex list-none flex-col p-0`,children:e.pages.map(e=>{let t=l?.url===e.url;return(0,H.jsx)(`li`,{children:(0,H.jsxs)(`button`,{type:`button`,"aria-pressed":t,onClick:()=>n(e.url),className:c(`flex w-full cursor-pointer items-center gap-4 rounded-base border-0 px-4 py-2 text-left`,t?`bg-surface-strong`:`bg-transparent hover:bg-tint`),children:[(0,H.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,H.jsx)(`span`,{className:`truncate font-medium text-ink`,children:e.title||X(e.url)}),(0,H.jsx)(`span`,{className:`truncate text-body-sm text-muted`,"data-tip":e.url,children:X(e.url)})]}),(0,H.jsxs)(`span`,{className:c(`w-24 flex-none text-right text-body-sm`,a(e,`fail`)?`text-fail`:`text-muted`),children:[a(e,`fail`),` to fix`]}),(0,H.jsxs)(`span`,{className:c(`hidden w-24 flex-none text-right text-body-sm @xl:inline`,a(e,`warn`)?`text-warn`:`text-muted`),children:[a(e,`warn`),` to improve`]}),(0,H.jsx)(`span`,{className:c(`w-10 flex-none text-right font-medium tabular-nums`,Z(e.score)),children:e.score})]})},e.url)})}),l&&(0,H.jsx)(z,{level:3,icon:k,title:l.title||X(l.url),description:X(l.url),children:(0,H.jsx)(ze,{checks:l.checks})}),e.sites.map(e=>(0,H.jsx)(z,{level:3,icon:A,title:`${Be(e.origin)}: robots.txt and sitemap`,description:`What the site tells every crawler.`,children:(0,H.jsx)(ze,{checks:e.checks})},e.origin))]})}function He({seo:e}){let t=e.analytics,n=e.pages.map(e=>e.url);return(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,H.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[t.tools.length?`${J(t.tools.length,`tool`)} found`:`No analytics tag found`,t.consentManagers.length?`; consent banner: ${t.consentManagers.join(`, `)}`:`; no consent banner found`,`. Each page was opened fresh, with no consent given, so a hit sent here was sent before anyone answered a banner.`]}),t.tools.length>0&&(0,H.jsxs)(`div`,{className:`overflow-x-auto`,children:[(0,H.jsx)(I,{label:`Analytics tools on each page`,head:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-left text-label-md font-medium whitespace-nowrap text-muted`,children:`Tool`}),(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-left text-label-md font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Ids`}),(0,H.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,children:`Hits`}),n.map((e,t)=>(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-left text-label-md font-medium whitespace-nowrap text-muted`,`w-8 text-center`),"data-tip":e,children:(0,H.jsx)(`span`,{"aria-label":`Page ${t+1}: ${e}`,children:t+1})},e))]}),children:t.tools.map(e=>(0,H.jsxs)(`tr`,{className:`border-t border-line-soft`,children:[(0,H.jsx)(`td`,{className:c(`px-4 py-2`,`font-medium`),children:e.tool}),(0,H.jsx)(`td`,{className:c(`px-4 py-2`,`hidden font-mono text-body-sm text-ink-2 @xl:table-cell`),children:e.ids.join(`, `)||`–`}),(0,H.jsx)(`td`,{className:`px-4 py-2 text-right whitespace-nowrap tabular-nums`,children:e.hits}),n.map(t=>{let n=e.pages.includes(t);return(0,H.jsx)(`td`,{className:c(`px-4 py-2`,`text-center`),"data-sort":+!!n,children:(0,H.jsx)(`span`,{role:`img`,"aria-label":n?`On ${t}`:`Not on ${t}`,className:c(`inline-block size-3 rounded-full`,n?`bg-accent`:`shadow-[inset_0_0_0_1.5px_var(--color-line-strong)]`)})},t)})]},e.tool))}),(0,H.jsx)(`ol`,{className:`m-0 mt-2 flex list-none flex-wrap gap-x-4 gap-y-1 p-0 text-body-sm text-muted`,children:n.map((e,t)=>(0,H.jsxs)(`li`,{className:`font-mono`,"data-tip":e,children:[t+1,`: `,X(e)]},e))})]}),t.findings.length>0&&(0,H.jsx)(I,{label:`Analytics findings`,empty:`Nothing matches.`,head:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-left text-label-md font-medium whitespace-nowrap text-muted`,`w-[110px]`),children:`Status`}),(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-left text-label-md font-medium whitespace-nowrap text-muted`,`w-[22%]`),children:`Tool`}),(0,H.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-left text-label-md font-medium whitespace-nowrap text-muted`,children:`Finding`}),(0,H.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,children:`Pages`})]}),children:t.findings.map((e,t)=>(0,H.jsxs)(`tr`,{className:`border-t border-line-soft align-top`,children:[(0,H.jsx)(`td`,{className:`px-4 py-2`,"data-sort":Le[e.status],children:(0,H.jsx)(h,{tone:Q[e.status].tone,className:`min-h-5 px-2 text-body-sm`,children:Q[e.status].label})}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:e.tool}),(0,H.jsx)(`td`,{className:c(`px-4 py-2`,`text-ink-2 [overflow-wrap:anywhere]`),"data-tip":e.pages.join(`
2
- `),children:e.text}),(0,H.jsx)(`td`,{className:`px-4 py-2 text-right whitespace-nowrap tabular-nums`,children:e.pages.length})]},t))})]})}var Ue={same:{label:`Same`,tone:`pass`},changed:{label:`Changed`,tone:`warn`},new:{label:`New baseline`,tone:`neutral`},no_baseline:{label:`No baseline`,tone:`neutral`}},$=e=>new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),We=e=>!!(e.breaches||e.a11y?.failed||e.perf.over||e.visual?.changed);function Ge({run:e,standard:t,disclaimer:r}){return(0,H.jsx)(Fe,{run:e,standard:t,disclaimer:r,links:{personas:n(`accessibility`),measured:n(`quality`,encodeURIComponent(e.id))}})}function Ke({run:e}){return(0,H.jsx)(Ie,{run:e})}function qe({run:e,index:t,which:n,label:r}){let[i,a]=(0,V.useState)(``),[s,l]=(0,V.useState)(!1);return(0,V.useEffect)(()=>{let r=!1;return a(``),l(!1),u.image(e,t,n).then(e=>!r&&a(e),()=>!r&&l(!0)),()=>{r=!0}},[e,t,n]),(0,H.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-2`,children:[(0,H.jsx)(`figcaption`,{className:`text-body-sm font-medium text-muted`,children:r}),i?(0,H.jsx)(`img`,{src:i,alt:`${r} of the page`,className:c(o,`block h-auto w-full`)}):(0,H.jsx)(`span`,{className:c(o,`flex h-[120px] items-center justify-center gap-2 text-body-sm text-muted`),children:s?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p,{icon:M,size:14}),` Not available`]}):`Loading…`})]})}function Je({run:e,budget:t,onChange:n}){let[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(``),[l,p]=(0,V.useState)(!1),[m,g]=(0,V.useState)(``),[_,v]=(0,V.useState)(new Set),[b,S]=(0,V.useState)(`all`),w=e.visual?.pages??[],T=w.find(e=>e.status===`changed`)?.index;(0,V.useEffect)(()=>v(T===void 0?new Set:new Set([T])),[e.id,T]);let D=async e=>{p(!0),g(``);try{n(await e()),a(null),s(``)}catch(e){g(e.message)}finally{p(!1)}};if(!e.visual)return e.captured?(0,H.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[(0,H.jsxs)(`p`,{className:`m-0 text-body-sm text-ink-2`,children:[`This run captured `,J(e.captured,`page`),` but they were not compared with the baselines yet.`]}),(0,H.jsxs)(y,{size:`sm`,variant:`primary`,disabled:l,"data-tip":`Compare with the baselines`,onClick:()=>D(()=>u.compare(e.id)),children:[(0,H.jsx)(re,{"aria-hidden":`true`}),`Compare`]}),m&&(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-fail`,children:m})]}):(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no visual captures: quality.visual.enabled was off, or the run visited no page.`});let O=w.filter(e=>e.status===`changed`),k=(b===`changed`?O:w).toSorted((e,t)=>Number(t.status===`changed`)-Number(e.status===`changed`)||(t.diffPercent??0)-(e.diffPercent??0)),A=e=>{let t=new Set(_);t.has(e)?t.delete(e):t.add(e),v(t)};return(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[`Each page captured with animations frozen and masked regions hidden, against its approved baseline. `,t?`A page over quality.budgets.visual fails the run.`:`No visual budget set: a change does not fail the run.`]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`div`,{role:`group`,"aria-label":`Show`,className:`flex gap-1`,children:[[`all`,`All pages`,w.length],[`changed`,`Changed`,O.length]].map(([e,t,n])=>(0,H.jsxs)(`button`,{type:`button`,"aria-pressed":b===e,onClick:()=>S(e),className:c(f({size:`sm`}),`gap-1 font-normal`),children:[t,` `,(0,H.jsx)(`span`,{className:`tabular-nums opacity-75`,children:n})]},e))}),(0,H.jsx)(`span`,{className:`flex-1`}),O.length>1&&(0,H.jsxs)(y,{size:`sm`,disabled:l,"data-tip":`Approve all ${O.length} changes`,onClick:()=>a(O.map(e=>e.url)),children:[(0,H.jsx)(E,{"aria-hidden":`true`}),`Approve (`,O.length,`)`]})]}),i&&(0,H.jsxs)(`div`,{role:`alertdialog`,"aria-label":`Approve as baseline`,className:c(d.info,`flex flex-col gap-2`),children:[(0,H.jsxs)(`span`,{className:`font-medium`,children:[`Make this run's capture the baseline of `,i.length===1?X(i[0]):J(i.length,`page`),`?`]}),(0,H.jsx)(`span`,{className:`text-ink-2`,children:`Later runs are compared with it. Approve only a change that was intended; one that was not is a visual defect.`}),(0,H.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[`Why it changed (kept with the baseline)`,(0,H.jsx)(r,{size:`sm`,value:o,maxLength:300,placeholder:`New checkout banner`,onChange:e=>s(e.target.value),className:`max-w-[480px]`})]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,H.jsxs)(y,{size:`sm`,variant:`primary`,disabled:l,onClick:()=>D(()=>u.approve(e.id,i,o.trim()||void 0)),children:[(0,H.jsx)(E,{"aria-hidden":`true`}),`Approve`]}),(0,H.jsxs)(y,{size:`sm`,onClick:()=>a(null),children:[(0,H.jsx)(C,{"aria-hidden":`true`}),`Cancel`]})]})]}),m&&(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-fail`,children:m}),(0,H.jsx)(I,{label:`Pages against their baselines`,fixed:!0,resetKey:b,empty:`No page changed.`,head:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`th`,{scope:`col`,className:N,children:`Page`}),(0,H.jsx)(`th`,{scope:`col`,className:c(N,`hidden w-[110px] @2xl:table-cell`),children:`Size`}),(0,H.jsx)(`th`,{scope:`col`,className:c(R,`w-[90px]`),children:`Changed`}),(0,H.jsx)(`th`,{scope:`col`,className:c(N,`w-[120px]`),children:`Result`}),(0,H.jsx)(`th`,{scope:`col`,className:c(N,`w-[96px]`),children:(0,H.jsx)(`span`,{className:`sr-only`,children:`Approve`})})]}),children:k.map(t=>{let n=_.has(t.index);return(0,H.jsxs)(V.Fragment,{children:[(0,H.jsxs)(`tr`,{onClick:()=>A(t.index),"aria-expanded":n,className:c(ge,n&&`bg-surface-muted`),children:[(0,H.jsx)(`td`,{className:L,children:(0,H.jsxs)(`span`,{className:`flex items-start gap-1`,children:[(0,H.jsx)(x,{size:13,"aria-hidden":`true`,className:c(`mt-1 flex-none text-muted transition-transform`,!n&&`-rotate-90`)}),(0,H.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,H.jsx)(`span`,{className:`truncate`,"data-tip":t.title||t.url,children:t.title||X(t.url)}),(0,H.jsx)(`span`,{className:`truncate font-mono text-body-sm text-muted`,"data-tip":t.url,children:X(t.url)})]})]})}),(0,H.jsxs)(`td`,{className:c(L,`hidden whitespace-nowrap text-muted @2xl:table-cell`),children:[t.size||`–`,t.resized?` · resized ${t.resized}`:``]}),(0,H.jsx)(`td`,{"data-sort":t.status===`changed`?t.diffPercent:-1,className:c(F,t.over?`text-fail`:t.status===`changed`?`text-warn`:`text-muted`),children:t.status===`changed`?`${t.diffPercent}%${t.limit===void 0?``:` / ${t.limit}%`}`:`–`}),(0,H.jsx)(`td`,{className:L,children:(0,H.jsx)(h,{tone:t.over?`fail`:Ue[t.status].tone,className:`min-h-5 px-2 text-body-sm`,children:t.over?`Over budget`:Ue[t.status].label})}),(0,H.jsx)(`td`,{className:F,onClick:e=>e.stopPropagation(),children:t.status===`changed`&&(0,H.jsx)(y,{variant:`icon`,size:`icon-sm`,disabled:l,"aria-label":`Approve ${X(t.url)}`,"data-tip":`Approve ${X(t.url)}`,onClick:()=>a([t.url]),children:(0,H.jsx)(E,{"aria-hidden":`true`})})})]}),n&&(0,H.jsx)(`tr`,{className:`bg-surface-muted`,children:(0,H.jsx)(`td`,{colSpan:5,className:`px-4 py-2`,children:(0,H.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-4`,children:[t.images.baseline&&(0,H.jsx)(qe,{run:e.id,index:t.index,which:`baseline`,label:`Baseline`}),t.images.current&&(0,H.jsx)(qe,{run:e.id,index:t.index,which:`current`,label:`This run`}),t.images.diff&&(0,H.jsx)(qe,{run:e.id,index:t.index,which:`diff`,label:`Difference (in red)`})]})})})]},t.index)})})]})}function Ye({values:e}){if(e.length<2)return null;let t=Math.max(1,...e);return(0,H.jsx)(`span`,{role:`img`,"aria-label":`Violations over the last ${e.length} runs: ${e.join(`, `)}`,className:`flex flex-none items-end gap-1`,children:e.map((n,r)=>{let i=n?Math.max(1,Math.round(n/t*5)):0;return(0,H.jsx)(`span`,{className:`flex flex-col-reverse gap-1`,"aria-hidden":`true`,children:Array.from({length:Math.max(1,i)},(t,n)=>(0,H.jsx)(`i`,{className:c(`size-1.5 rounded-full`,i?r===e.length-1?`bg-accent`:`bg-accent-line`:`bg-line`)},n))},r)})})}function Xe({icon:e,className:t,lines:n}){return n.length?(0,H.jsxs)(`span`,{className:c(`flex items-start gap-2 text-body-sm`,t),children:[(0,H.jsx)(p,{icon:e,size:14,className:`mt-1 flex-none`}),(0,H.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:n.join(` · `)})]}):null}function Ze({trends:e}){return e.length?(0,H.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:e.map(e=>{let t=e.a11y.latest?G.reduce((t,n)=>t+(e.a11y.latest[n]||0),0):void 0;return(0,H.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-line-soft py-4 first:border-t-0`,children:[(0,H.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-4`,children:[(0,H.jsx)(`span`,{className:`min-w-0 flex-[1_1_240px] truncate font-mono text-body-sm`,"data-tip":e.page,children:/^https?:/.test(e.page)?X(e.page):e.page}),(0,H.jsx)(Ye,{values:e.a11y.trail}),(0,H.jsxs)(`span`,{className:`text-body-sm text-muted`,children:[J(e.runs,`run`),t===void 0?``:` · ${J(t,`violation`)} now`]})]}),(0,H.jsx)(Xe,{icon:j,className:`text-fail`,lines:[...e.perf.worse.map(e=>`slower: ${e}`),...e.a11y.newRules.map(e=>`newly failing: ${e}`)]}),(0,H.jsx)(Xe,{icon:fe,className:`text-pass`,lines:[...e.perf.better.map(e=>`faster: ${e}`),...e.a11y.fixedRules.map(e=>`fixed: ${e}`)]})]},e.page)})}):(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`No history yet: every browser run adds each page's accessibility and timings to quality-history.json in the reports folder.`})}var Qe={accessibility:e=>!!e.a11y?.pages,performance:e=>e.perf.pages>0,visual:e=>!!e.visual||e.captured>0},$e={accessibility:e=>!!e.a11y?.failed,performance:e=>e.perf.over>0,visual:e=>!!(e.visual?.changed||e.visual?.over)},et=(e,t)=>t.filter(Qe[e]);function tt({kind:e,runs:t}){let[r,i]=(0,V.useState)(`all`),a=et(e,t),o=r===`attention`?a.filter($e[e]):a,s=t=>location.hash=n(e,encodeURIComponent(t));return(0,H.jsx)(I,{label:`Runs`,placeholder:`Find a run by what it did`,resetKey:r,empty:`Nothing matches.`,height:_e,tools:(0,H.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,H.jsx)(m,{items:[{id:`all`,label:`All`,n:a.length},{id:`attention`,label:`Needs a look`,n:a.filter($e[e]).length,alert:!0}],value:r,onChange:i})}),head:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`th`,{scope:`col`,className:c(N,`w-[46%]`),children:`Run`}),e===`accessibility`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,children:`Rules failed`}),(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Critical · serious`}),(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,`hidden @3xl:table-cell`),children:`Moderate · minor`}),(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Pages`})]}),e===`performance`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,children:`Over budget`}),(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Pages timed`})]}),e===`visual`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,children:`Changed`}),(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`New`}),(0,H.jsx)(`th`,{scope:`col`,className:c(`px-4 py-2 text-right text-label-md font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Same`})]}),(0,H.jsx)(`th`,{scope:`col`,className:c(N,`hidden @xl:table-cell`),children:`When`})]}),children:o.map(t=>{let r=$e[e](t),i=(t.over?.[e]??0)>0,a=i?he:r?S:E,o=i?`text-fail`:r?`text-warn`:`text-pass`,l=i?`Over a budget`:r?`Needs a look`:`Within budgets`;return(0,H.jsxs)(`tr`,{onClick:()=>s(t.id),className:ge,children:[(0,H.jsx)(`td`,{className:c(L,`max-w-0`),children:(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(a,{size:15,"aria-label":l,className:c(`flex-none`,o)}),(0,H.jsx)(`a`,{href:n(e,encodeURIComponent(t.id)),onClick:e=>e.stopPropagation(),"data-tip":t.goal,className:`truncate text-ink no-underline hover:underline`,children:t.goal})]})}),e===`accessibility`&&t.a11y&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.a11y.failed?`text-fail`:`text-muted`),children:t.a11y.failed}),(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden @2xl:table-cell`,t.a11y.critical+t.a11y.serious?`text-fail`:`text-muted`),"data-sort":t.a11y.critical*1e3+t.a11y.serious,children:`${t.a11y.critical} · ${t.a11y.serious}`}),(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @3xl:table-cell`),"data-sort":t.a11y.moderate*1e3+t.a11y.minor,children:`${t.a11y.moderate} · ${t.a11y.minor}`}),(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),children:t.a11y.pages})]}),e===`performance`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.perf.over?`text-fail`:`text-muted`),children:t.perf.over}),(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),children:t.perf.pages})]}),e===`visual`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.visual?.changed?`text-warn`:`text-muted`),"data-sort":t.visual?t.visual.changed:-1,children:t.visual?t.visual.changed:`not compared`}),(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @2xl:table-cell`),"data-sort":t.visual?t.visual.new+t.visual.no_baseline:-1,children:t.visual?t.visual.new+t.visual.no_baseline:`–`}),(0,H.jsx)(`td`,{className:c(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),"data-sort":t.visual?t.visual.same:-1,children:t.visual?t.visual.same:`–`})]}),(0,H.jsx)(`td`,{className:c(L,`hidden whitespace-nowrap text-body-sm text-muted @xl:table-cell`),"data-tip":$(t.at),"data-sort":new Date(t.at).getTime()||0,children:ye(t.at)})]},t.id)})})}function nt({kind:e,id:t,view:r,onChanged:i}){let[a,o]=(0,V.useState)(null),[s,l]=(0,V.useState)(``);(0,V.useEffect)(()=>{let e=!1;return o(null),u.run(t).then(t=>{e||(o(t),l(``))},t=>!e&&l(t.message)),()=>{e=!0}},[t]);let[f,p]=(0,V.useState)(``),m=(0,H.jsxs)(`a`,{href:n(e),className:`inline-flex items-center gap-1 self-start text-body-sm no-underline`,children:[(0,H.jsx)(x,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});return s||!a?(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[m,s?(0,H.jsx)(`p`,{className:c(d.fail,`m-0`),children:s}):(0,H.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`Loading…`})]}):(0,H.jsxs)(`section`,{"aria-labelledby":`run-h`,className:`flex min-w-0 flex-col gap-4`,children:[m,e===`accessibility`?(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,H.jsx)(B,{id:`run-h`,icon:ue,title:(0,H.jsx)(`span`,{"data-tip":a.goal,className:`block truncate`,children:a.goal}),actions:(0,H.jsx)(rt,{run:a,note:p})}),(0,H.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1 text-body-sm text-muted`,children:[(0,H.jsx)(`span`,{children:$(a.at)}),(a.ledger||a.report)&&(0,H.jsx)(`span`,{children:a.ledger?`${a.ledger.engine||`axe-core`} with ${a.ledger.label}`:`${a.report.engine||`axe-core`} with ${r.standard}`}),(0,H.jsx)(be,{path:a.dir})]}),f&&(0,H.jsx)(v,{tone:`fail`,children:f})]}):(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,H.jsx)(B,{id:`run-h`,icon:e===`performance`?O:M,title:(0,H.jsx)(`span`,{"data-tip":a.goal,className:`block truncate`,children:a.goal})}),(0,H.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-body-sm text-muted`,children:[$(a.at),` · `,(0,H.jsx)(be,{path:a.dir}),` · `,(0,H.jsx)(`a`,{href:n(`quality`,encodeURIComponent(a.id)),children:`Everything it measured`})]})]}),e===`accessibility`&&(0,H.jsx)(Ge,{run:a,standard:r.standard,disclaimer:r.disclaimer}),e===`performance`&&(0,H.jsx)(Ke,{run:a}),e===`visual`&&(0,H.jsx)(Je,{run:a,budget:r.budgets.visual,onChange:e=>{o(e),i()}})]})}function rt({run:e,note:t}){let[r,i]=(0,V.useState)(!1),a=e.ledger?.report,o=async()=>{i(!0),t(``);let n=await _(`${e.dir}/${a}`);i(!1),n&&t(n)};return(0,H.jsxs)(H.Fragment,{children:[a&&(0,H.jsxs)(y,{size:`sm`,variant:`ghost`,busy:r,"data-tip":`Open this run's own report`,onClick:()=>void o(),children:[(0,H.jsx)(pe,{"aria-hidden":`true`}),`Full report`]}),e.ledger?.scan&&(0,H.jsxs)(`a`,{href:n(`accessibility`,`suites`,`new`,`scan:${encodeURIComponent(e.id)}`),className:f({size:`sm`,variant:`ghost`}),"data-tip":`Check these pages again later with no model, against a baseline`,children:[(0,H.jsx)(ee,{"aria-hidden":`true`}),`Save as regression suite`]}),(0,H.jsxs)(`a`,{href:n(`accessibility`),className:f({size:`sm`,variant:`primary`}),"data-tip":`Have the personas use the site: they test what no rule can`,children:[(0,H.jsx)(D,{"aria-hidden":`true`}),`Test with personas`]})]})}function it({r:e,to:t,line:n}){return(0,H.jsxs)(`div`,{className:c(a,`ml-12 flex flex-wrap items-center gap-x-4 gap-y-2`),children:[(0,H.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_240px] flex-col`,children:[(0,H.jsx)(`span`,{className:`text-body-lg font-medium [overflow-wrap:anywhere]`,children:e.goal}),(0,H.jsx)(`span`,{className:`text-body-sm text-muted`,children:n})]}),(0,H.jsxs)(y,{size:`sm`,variant:`primary`,"data-tip":`Open the run`,onClick:()=>location.hash=t,children:[(0,H.jsx)(ce,{"aria-hidden":`true`}),`Open`]})]})}export{q as _,Ke as a,X as b,Je as c,$ as d,He as f,K as g,Te as h,tt as i,We as l,G as m,Xe as n,it as o,Ve as p,nt as r,Ze as s,Ge as t,et as u,J as v,Z as y};
@@ -1 +0,0 @@
1
- import{Cn as e,Dn as t,Gn as n,Jn as r,K as i,Nt as a,Ot as o,Qt as ee,Rr as s,Tt as c,Ut as l,W as u,Wn as d,Wt as te,Xn as ne,Y as re,Zn as ie,Zt as ae,cr as oe,ft as se,gt as ce,ir as le,kn as ue,l as de,or as fe,pn as pe,q as me,r as he,tn as ge,tr as _e,tt as ve,u as f,xn as ye,y as be,yn as xe,zn as Se,zt as Ce}from"./line-icons-Cwj9OmCz.js";var we=`ForgeQE`,Te=/\bForgeQE\b/g,p=[`placeholder`,`title`,`aria-label`,`data-tip`,`alt`],Ee=`input, textarea, pre, code, [contenteditable], [data-keep-name]`,m=(e,t)=>t===`ForgeQE`?e:e.replace(Te,()=>t),h=new WeakMap,g=new WeakMap;function _(e,t){return e&&e.shown===t?e.from:t}function v(e){return!!e?.closest(Ee)}function y(e,t){if(v(e.parentElement))return;let n=e.nodeValue??``,r=_(h.get(e),n);if(r===n&&!r.includes(`ForgeQE`))return;let i=m(r,t);h.set(e,{from:r,shown:i}),i!==n&&(e.nodeValue=i)}function b(e,t){if(!e.closest(`pre, code, [contenteditable], [data-keep-name]`))for(let n of p){let r=e.getAttribute(n);if(r===null)continue;let i=g.get(e),a=_(i?.get(n),r);if(a===r&&!a.includes(`ForgeQE`))continue;let o=m(a,t);i||g.set(e,i=new Map),i.set(n,{from:a,shown:o}),o!==r&&e.setAttribute(n,o)}}function x(e,t){if(e.nodeType===Node.TEXT_NODE)return y(e,t);if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)return;e.nodeType===Node.ELEMENT_NODE&&b(e,t);let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT);for(let e=n.nextNode();e;e=n.nextNode())e.nodeType===Node.TEXT_NODE?y(e,t):b(e,t)}var S,C=we,w,T=()=>C,E=e=>m(e,C);function D(e){let t=e?.trim()||`ForgeQE`;typeof document>`u`?C=t:(w===void 0&&(w=document.title),!(t===C&&S)&&(C=t,S?.disconnect(),x(document.body,C),document.title=m(w,C),S=new MutationObserver(e=>{S?.disconnect();for(let t of e)if(t.type===`characterData`)y(t.target,C);else if(t.type===`attributes`)b(t.target,C);else for(let e of t.addedNodes)x(e,C);S?.observe(document.body,O)}),S.observe(document.body,O)))}var O={subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:[...p]},k=`forgeqe.engine.forgeqe-test.forgeqe-read.forgeqe-review.forgeqe-test-plan.forgeqe-heal.forgeqe-migrate.forgeqe-perf.forgeqe-tosca.forgeqe-tosca-assistant.forgeqe-find.forgeqe-pr-review.forgeqe-api.forgeqe-api-plan.forgeqe-explore-plan.forgeqe-defect-rca.forgeqe-refine.forgeqe-agent-builder.forgeqe-suite-builder.forgeqe-team-builder.forgeqe-responsive.forgeqe-test-linker.forgeqe-bug-report.forgeqe-data.forgeqe-persona.forgeqe-basal.forgeqe-doc-reader.forgeqe-knowledge-agent.forgeqe-judge.forgeqe-model-profile.forgeqe-knowledge.forgeqe-investigate.forgeqe-evidence-acceptance.forgeqe-impact-reader.forgeqe-evidence-content.forgeqe-evidence-scenarios.explore.general`.split(`.`);function De(e){try{let t=A(e);return t&&t!==`ForgeQE`?t:void 0}catch{return}}function A(e,t=`the name`){if(e==null)return``;if(typeof e!=`string`)throw Error(`${t} must be text.`);if(/[\u0000-\u001f\u007f-\u009f\u2028\u2029]/.test(e))throw Error(`${t} must be one line of plain text.`);let n=e.replace(/\s+/g,` `).trim();if(n.length>40)throw Error(`${t} is ${n.length} characters; at most 40.`);return n}var j={};function M(e){let t={};if(!e||typeof e!=`object`||Array.isArray(e))return t;for(let[n,r]of Object.entries(e))if(k.includes(n))try{let e=A(r);e&&(t[n]=e)}catch{}return t}function Oe(e){j=M(e)}var ke=e=>Object.hasOwn(j,e)?j[e]:void 0,N=[`orchestrator`,`specs`,`api`,`explorer`,`case`,`browser-agent`,`test-finder`,`report`,`scribe`,`knowledge-base`,`healer`,`result`,`pr-reviewer`,`rule`,`trace`,`model`,`context-engine`,`database`],P={orchestrator:`Atlas`,specs:`Specs`,api:`API`,explorer:`Explorer`,case:`Test case`,"browser-agent":`Browser`,"test-finder":`Search`,report:`Report`,scribe:`Coding`,"knowledge-base":`Knowledge`,healer:`Healing`,result:`Result`,"pr-reviewer":`PR review`,rule:`Rule`,trace:`Trace`,model:`Model`,"context-engine":`Helper`,database:`Database`},F=new Set(N),Ae=/^[a-z0-9]+(-[a-z0-9]+)*$/,je=/^(ph|lucide):([a-z0-9]+(?:-[a-z0-9]+)*)$/;function I(e){return typeof e==`string`&&F.has(e)}function L(e){if(typeof e!=`string`||e.length>80)return;let t=je.exec(e);if(!t)return;let n=t[1],r=t[2];if(!(!Ae.test(r)||r.length>64)&&!/-(bold|fill|light|thin|duotone|bold-duotone)$/.test(r))return{set:n,name:r,id:`${n}:${r}`}}function R(e){return typeof e!=`string`||!e||e.length>80||e.includes(`\0`)||e.includes(`/`)||e.includes(`\\`)||e.includes(`..`)?!1:F.has(e)?!0:L(e)!==void 0}function Me(e){if(I(e))return P[e];let t=L(e);return t?t.name.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):e}var z=new Map,B=new Set,V=0;function Ne(){return{ids:[...B].sort(),version:V}}var Pe=`forgeqe`,H={forgeqe:{name:`Atlas`,icon:`orchestrator`,hue:`#a78bfa`},"forgeqe-refine":{name:`Polish`,icon:`specs`,hue:`#8fa2ff`},"forgeqe-api-plan":{name:`Planner`,icon:`ph:list-checks`,hue:`#e0a3f5`},"forgeqe-explore-plan":{name:`Rover`,icon:`explorer`,hue:`#f59fe0`},"forgeqe-test-plan":{name:`Pathfinder`,icon:`case`,hue:`#c9b3ff`},engine:{name:`WebPilot`,icon:`browser-agent`,hue:`#5ea6f0`},desktop:{name:`DeskPilot`,icon:`ph:desktop`,hue:`#4f7fd9`},mobile:{name:`MobilePilot`,icon:`ph:device-mobile`,hue:`#3a8fb7`},"forgeqe-find":{name:`Hound`,icon:`test-finder`,hue:`#1fa3c4`},"forgeqe-test":{name:`Quill`,icon:`scribe`,hue:`#3a9a7e`},"forgeqe-read":{name:`Vera`,icon:`knowledge-base`,hue:`#3fa34d`},"forgeqe-heal":{name:`Mender`,icon:`healer`,hue:`#86a92c`},"forgeqe-migrate":{name:`Mover`,icon:`ph:arrows-left-right`,hue:`#2f8f63`},"forgeqe-tosca":{name:`Bridge`,icon:`ph:bridge`,hue:`#2c7a4b`},"forgeqe-responsive":{name:`Prism`,icon:`ph:devices`,hue:`#b03a7a`},"forgeqe-api":{name:`Link`,icon:`api`,hue:`#1f9c90`},"forgeqe-perf":{name:`Surge`,icon:`ph:gauge`,hue:`#1f6b3a`},"forgeqe-review":{name:`Checker`,icon:`result`,hue:`#e0457b`},"forgeqe-pr-review":{name:`Patch`,icon:`pr-reviewer`,hue:`#d93a52`},"forgeqe-judge":{name:`Gavel`,icon:`rule`,hue:`#e0603a`},"forgeqe-defect-rca":{name:`Sleuth`,icon:`trace`,hue:`#d6701f`},"forgeqe-model-profile":{name:`Scales`,icon:`model`,hue:`#b88a14`},"forgeqe-data":{name:`Miner`,icon:`database`,hue:`#2b7fc2`},"req-agent":{name:`Spec`,icon:`ph:file-magnifying-glass`,hue:`#5b6fd6`},"forgeqe-persona":{name:`Mask`,icon:`ph:identification-badge`,hue:`#7d3f8a`},"forgeqe-basal":{name:`BASAL`,icon:`ph:columns`,hue:`#1f6f66`},"forgeqe-knowledge-agent":{name:`Librarian`,icon:`ph:lightbulb`,hue:`#4f6672`},explore:{name:`Scout`,icon:`ph:binoculars`,hue:`#62789e`},general:{name:`Jack`,icon:`context-engine`,hue:`#a07c43`}},U={"forgeqe-agent-builder":`Smith`,"forgeqe-suite-builder":`Sorter`,"forgeqe-team-builder":`Captain`,"forgeqe-test-linker":`Matchmaker`,"forgeqe-talk":`Aria`,"forgeqe-bug-report":`Herald`,"forgeqe-bi":`Beacon`,"forgeqe-knowledge":`Mapper`,"forgeqe-investigate":`Digger`,"forgeqe-evidence-acceptance":`Clerk`,"forgeqe-impact-reader":`Ripple`,"forgeqe-evidence-content":`Grader`,"forgeqe-evidence-scenarios":`Drafter`,"forgeqe-doc-reader":`Skimmer`,"forgeqe-tosca-assistant":`Guide`},W={"forgeqe-agent-builder":`ph:puzzle-piece`,"forgeqe-suite-builder":`ph:stack`,"forgeqe-team-builder":`ph:users-three`,"forgeqe-test-linker":`ph:link-simple`,"forgeqe-talk":`ph:microphone-stage`,"forgeqe-bug-report":`ph:bug`,"forgeqe-bi":`report`,"forgeqe-knowledge":`ph:share-network`,"forgeqe-investigate":`ph:magnifying-glass-plus`,"forgeqe-evidence-acceptance":`ph:clipboard-text`,"forgeqe-impact-reader":`ph:waves`,"forgeqe-evidence-content":`ph:quotes`,"forgeqe-evidence-scenarios":`ph:cards`,"forgeqe-doc-reader":`ph:book-open-text`},Fe=Object.freeze(Object.keys(W));function G(e){let t=ke(e),n=K(e);return t?{...n,name:t}:n}function Ie(e,t=!1){return/\bagent$/i.test(e.trim())?`${t?`The`:`the`} ${e}`:e}function K(e){let t=Object.hasOwn(H,e)?H[e]:void 0;if(t)return t;let n=z.get(e)||(Object.hasOwn(W,e)?W[e]:void 0)||`context-engine`;if(Object.hasOwn(U,e))return{name:U[e],icon:n,hue:`#62789e`};let r=e.replace(/^forgeqe-/,``).replace(/[-_]+/g,` `).trim().slice(0,40),i=r?r.charAt(0).toUpperCase()+r.slice(1):``;return{name:i?/ agent$/i.test(i)?i:`${i} agent`:`Jack`,icon:n,hue:`#62789e`}}var q=[{id:`assisted`,label:`Advisers`,about:`AI assisted: they help with your work, saying what ForgeQE knows and reviewing pull requests, and you decide.`,short:`Help you decide`},{id:`native`,label:`Builders`,about:`AI native: they make the work itself, tests, test data, personas and diagnoses, from your recordings, runs and descriptions.`,short:`Do the work for you`},{id:`agentic`,label:`Operators`,about:`Agentic: they act on their own across many steps, using the browser, your tools and the other agents to finish a task.`,short:`Work on their own`},{id:`custom`,label:`Custom agents`,about:`Agents your team makes for its own work.`,short:`Made by your team`}],J=[{id:`orchestrator`,short:`Leads every chat`,category:`agentic`,agent:`forgeqe`,runs:[`forgeqe`,`forgeqe-refine`,`forgeqe-find`,`explore`,`general`],about:`Leads every chat: works out what you asked, uses ForgeQE's tools and your connected systems, and hands parts to the other agents.`,crew:[{agent:`forgeqe-refine`,does:`turns a rough request into a clear task, from Refine in the message box`},{agent:`forgeqe-find`,does:`finds the tests in your repository a request means, to run them`},{agent:`explore`,does:`searches and reads the repository and web pages; it changes nothing`},{agent:`general`,does:`takes on a part of a bigger task, with the same tools`}],starters:[{label:`Run test cases`,text:`Run SHOP-12 and SHOP-14 on Chrome and Edge`},{label:`Review requirements`,text:`Review the payments refund brief and list its gaps`},{label:`Find and run tests`,text:`Find the tests for the basket and run them`}]},{id:`browser`,short:`Runs tests in a browser`,category:`agentic`,agent:`engine`,runs:[`engine`,`browser agent`],about:`Runs your test cases in a real browser, step by step, and keeps a screenshot of every step as evidence.`,starters:[{label:`Run test cases`,text:`Run SHOP-12 and SHOP-14 on Chrome and Edge`},{label:`Check a page`,text:`Sign in to QA and check the dashboard loads with this week's orders`},{label:`Try it as a blind user`,text:`Act as a blind screen reader user and try to check out on QA: list the accessibility barriers`}]},{id:`desktop`,opens:[`desktop`],short:`Automates desktop apps`,category:`agentic`,agent:`desktop`,runs:[`desktop`,`desktop agent`],about:`Carries out a goal in a Windows desktop app and saves it as a workflow with checks, records the steps you do by hand, and replays saved workflows with no model. It asks before it takes the mouse and keyboard.`,prompt:!1,starters:[{label:`Automate a task`,text:`Create an invoice for Contoso in the Billing app and save it as a test`},{label:`Record my steps`,text:`I'll show you the steps in Billing: record them`},{label:`Replay a workflow`,text:`Replay the billing workflow with customer Fabrikam`}]},{id:`mobile`,opens:[`mobile`],short:`Automates mobile apps`,category:`agentic`,agent:`mobile`,runs:[`mobile`,`mobile agent`],about:`Carries out a goal in an Android or iOS app through Appium and saves it as a workflow with checks, replays saved workflows on Appium or Maestro with no model, and runs your team's Maestro flows. You watch the device while it works, and it asks before it acts on one.`,prompt:!1,starters:[{label:`Automate a task`,text:`Sign in to the courier app and accept the first delivery, and save it as a test`},{label:`Replay on Maestro`,text:`Replay the courier login on Maestro`},{label:`Run our Maestro flows`,text:`Run our Maestro flows in .maestro/`},{label:`Upload a build`,text:`Upload builds/courier.apk to TestMu for the courier app`}]},{id:`exploration`,opens:[`explore`],short:`Explores user journeys`,category:`agentic`,agent:`forgeqe-explore-plan`,runs:[`forgeqe-explore-plan`],about:`Explores a journey the way a curious user would, and plans charters for what is worth a closer look.`,starters:[{label:`Explore a journey`,text:`Explore the checkout on QA and report anything that looks wrong`},{label:`Plan charters`,text:`Plan exploratory charters for the new refunds page`}]},{id:`coding`,opens:[`record`,`agent`],short:`Records and writes tests`,category:`native`,agent:`forgeqe-test`,runs:[`forgeqe-test`,`forgeqe-read`,`forgeqe-test-plan`,`forgeqe-review`],about:`Writes automated tests in your repository, in your team's style, from a journey you record, a verified run or a test case, and shows its plan first; ForgeQE runs every test it writes.`,crew:[{agent:`forgeqe-test-plan`,does:`places a recorded test in your repository and finds what it reuses there`},{agent:`forgeqe-read`,does:`reads the repository ahead, for the code a test can reuse`},{agent:`forgeqe-review`,does:`reviews each written test against your team's rules before you take it`}],starters:[{label:`Write a test`,text:`Write a Playwright test for the login flow on QA`},{label:`Automate a case`,text:`Turn SHOP-12 into an automated test`},{label:`From my recording`,text:`Write the test for my last recording`},{label:`Review written tests`,text:`Review the tests written in my last chat`}]},{id:`knowledge-agent`,opens:[`knowledge`],short:`Says what ForgeQE knows`,category:`assisted`,agent:`forgeqe-knowledge-agent`,runs:[`forgeqe-knowledge-agent`,`Librarian`],about:`Tells you what ForgeQE has understood about your product, from its knowledge notes, documents, skills and product graph, and takes your corrections. Each change to a note, a skill, a team prompt or the graph is shown first and written only when you approve it.`,starters:[{label:`Ask what it knows`,text:`What do you know about refunds?`},{label:`Correct it`,text:`Refunds over 1000 EUR need a supervisor, not 500: correct it`}]},{id:`healing`,opens:[`regression`],short:`Runs and heals packs`,category:`agentic`,agent:`forgeqe-heal`,runs:[`forgeqe-heal`],about:`Builds a regression pack from a release's changes, runs it, and fixes the tests the application outgrew, such as a moved button or a renamed field, saying what it changed.`,starters:[{label:`Heal failing tests`,text:`Heal the tests that failed in last night's run`}]},{id:`migration`,short:`Migrates test suites`,category:`agentic`,agent:`forgeqe-migrate`,runs:[`forgeqe-migrate`,`forgeqe-tosca`,`forgeqe-tosca-assistant`],about:`Moves a test suite to another framework or language, such as Selenium Java to Playwright, or Tricentis Tosca test cases from a .tsu export to code, after a plan you confirm; every Tosca step and check is kept, and ForgeQE runs every migrated test.`,opens:[`migration`],crew:[{agent:`forgeqe-tosca`,does:`converts Tricentis Tosca test cases from a .tsu export, one file at a time, keeping every step and check`},{agent:`forgeqe-tosca-assistant`,does:`reads what you ask to convert from Tosca and fills in New migration for you`}],starters:[{label:`Plan a migration`,text:`Plan migrating our Selenium tests in tests/ to Playwright TypeScript`},{label:`Convert a Tosca export`,text:`Plan converting tosca/checkout.tsu to Playwright TypeScript`}]},{id:`requirements`,short:`Reviews requirements`,category:`assisted`,agent:`req-agent`,runs:[`req-agent`],prompt:!1,about:`Reviews a requirement before it is built and tested: eight specialist roles and the business personas you pick read it with what ForgeQE knows about your product: its knowledge, documents, requirements search, product graph and what earlier reviews decided. They score it on six dimensions, and list its gaps and questions, each with a change you keep or leave.`,opens:[`requirements`],starters:[{label:`What makes a good requirement?`,text:`What should a requirement say so that the Requirements Agent scores it well on testability?`},{label:`Write test cases from a review`,text:`Write test cases from the requirements.json of my latest requirement review`}]},{id:`responsive`,short:`Tests pages on devices`,category:`agentic`,agent:`forgeqe-responsive`,runs:[`forgeqe-responsive`],about:`Opens one page on many phones, tablets and desktops at once, does your steps on every device, planned for each layout, and finds what breaks: sideways scrolling, text and tap targets too small, broken images, and your own checks.`,opens:[`responsive`],starters:[{label:`Check a page on phones`,text:`Check the home page on phones, tablets and desktops and tell me what breaks`},{label:`What scrolls sideways?`,text:`Which devices make the checkout page scroll sideways?`}]},{id:`api`,opens:[`api-tests`,`agent`],short:`Writes API tests`,category:`native`,agent:`forgeqe-api`,runs:[`forgeqe-api`,`forgeqe-api-plan`],about:`Writes API and contract tests in your repository from your API's description, with test data from your databases, and plans end-to-end scenarios for them.`,crew:[{agent:`forgeqe-api-plan`,does:`plans end-to-end scenarios: the calls, their order and what each checks`}],starters:[{label:`Contract tests`,text:`Write contract tests for the orders API`},{label:`Plan scenarios`,text:`Plan end-to-end scenarios for the payments API`}]},{id:`perf`,opens:[`performance`,`agent`],short:`Writes load tests`,category:`native`,agent:`forgeqe-perf`,runs:[`forgeqe-perf`],about:`Writes JMeter load test plans from your words; ForgeQE checks each plan and runs it with the users you choose on a test environment, never production, with response times, throughput and errors per request.`,starters:[{label:`Write a load test`,text:`Write a load test for checkout with 100 users over 5 minutes`},{label:`Run a load test`,text:`Which load tests do we have, and which can run?`}]},{id:`db`,opens:[`data`],short:`Finds test data`,category:`native`,agent:`forgeqe-data`,runs:[`forgeqe-data`,`Miner`],about:`Reads your connected databases and answers in your words: the test data a test needs, as existing rows or new ones with their INSERT script, and queries, data checks and database test scripts. The other agents ask it before they run.`,starters:[{label:`Find test data`,text:`Find two customers with paid orders for the checkout test`},{label:`Check the data`,text:`Check the orders table: no order without a customer, no negative totals`}]},{id:`persona`,short:`Business personas`,category:`native`,agent:`forgeqe-persona`,runs:[`forgeqe-persona`,`Mask`],about:`Describes the people who validate your software the way the business does: a subject matter expert such as a payments SME, an end user, a specialist or a business user, with what each one checks before they accept it. Every agent can act as one or test for one.`,starters:[{label:`A payments SME`,text:`Create a persona of an SME in card payments who reconciles settlements and handles refunds`},{label:`Test as a customer`,text:`Test the checkout as the retail-customer persona`}]},{id:`basal`,short:`BASAL: business testing`,category:`agentic`,agent:`forgeqe-basal`,runs:[`forgeqe-basal`,`BASAL`],about:`Tests a business decision the way real people meet it. Ask a business question with its brief: BASAL reads your product's knowledge graph and documents, writes a test strategy, casts the stakeholders as personas, and has ForgeQE's browser, API, mobile and desktop agents play each step as them on a test environment. Code judges the business outcome from the evidence.`,starters:[{label:`Launch decision`,text:`Should we launch saved cards with a fee? Test how merchants, shoppers and support would really be affected`},{label:`Weekend sale`,text:`Before our weekend sale, test that prices stay the same from list to cart and that no customer gets a lower price than shown`}]},{id:`pr-review`,short:`Reviews pull requests`,category:`assisted`,agent:`forgeqe-pr-review`,runs:[`forgeqe-pr-review`],about:`Reviews a pull request's tests and changes, and says what is missing or risky.`,starters:[{label:`Review a pull request`,text:`Review the tests in pull request 42`}]},{id:`root-cause`,short:`Explains failures`,category:`native`,agent:`forgeqe-defect-rca`,runs:[`forgeqe-defect-rca`],about:`Finds why a test failed: the defect, the step where it showed, and the evidence for it.`,starters:[{label:`Find a root cause`,text:`Find the root cause of last night's checkout failure`}]}],Y=e=>J.find(t=>t.id===e),X=Object.freeze({planning:`coding`,review:`coding`,"api-planning":`api`,refine:`orchestrator`,search:`orchestrator`,research:`orchestrator`,helper:`orchestrator`,tosca:`migration`});Object.freeze({"forgeqe-judge":{label:`Settings › Product knowledge`,path:[`settings`,`evidence`]},"forgeqe-model-profile":{label:`Settings › Routing`,path:[`settings`,`routing`]}});var Z=e=>Y(e)??(e&&Object.hasOwn(X,e)?Y(X[e]):void 0);function Le(e,t=`all`){let n=e.toLowerCase().split(/\s+/).filter(Boolean),r=e=>q.find(t=>t.id===e)?.label||``,i=e=>(e.crew||[]).map(e=>`${G(e.agent).name} ${e.does}`).join(` `);return J.filter(e=>(t===`all`||e.category===t)&&n.every(t=>`${G(e.agent).name} ${e.id} ${e.short} ${e.about} ${i(e)} ${r(e.category)}`.toLowerCase().includes(t)))}var Re=`category`,ze=e=>q.find(t=>t.id===e);function Q(e){try{let t=JSON.parse(e||`[]`);if(!Array.isArray(t))return[];let n=t.filter(e=>typeof e==`string`).map(e=>Z(e)?.id??e);return[...new Set(n.filter(e=>Y(e)!==void 0||He(e)!==void 0))]}catch{return[]}}var $=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function Be(e,t=`merge`){let n=[...B].join(`,`);t===`replace`&&(z.clear(),B.clear());for(let t of e)typeof t.id!=`string`||!$.test(t.id)||t.id.length>40||(B.add(t.id),R(t.icon)?z.set(t.id,t.icon):z.delete(t.id));[...B].join(`,`)!==n&&V++}var Ve=e=>`custom:${e}`;function He(e){let t=e.startsWith(`custom:`)?e.slice(7):``;return $.test(t)&&t.length<=40?t:void 0}function Ue(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);return e.filter(e=>n.every(t=>`${e.name} ${e.id} ${e.description} custom`.toLowerCase().includes(t)))}var We=[{id:`setup`,group:`Start`,icon:o,label:`Set up`,file:``,intro:`The project folder ForgeQE works on, ForgeQE in it, and what this computer needs to run it.`},{id:`environments`,group:`General`,icon:ge,label:`Environments`,file:``,intro:`Where the agents work, and the apps in each place. The active one is used unless a request names another.`},{id:`signins`,group:`General`,icon:ee,label:`Sign-ins`,file:`forgeqe.yaml`,intro:`Logins for the apps the agents sign in to. Passwords go to your credential store; the model sees only a placeholder.`},{id:`secrets`,group:`General`,icon:pe,label:`Secrets`,file:``,intro:`Every password, key and token ForgeQE keeps, by name, and the vaults it pulls them from: Azure Key Vault, Google Secret Manager and AWS Secrets Manager. Values go to your credential store; the agents see only the names.`},{id:`integrations`,group:`General`,icon:Se,label:`Integrations`,file:`forgeqe.yaml`,intro:`Test case systems and bugs (sources:), and remote browser grids (browser.providers).`},{id:`notifications`,group:`General`,icon:f,label:`Notifications`,file:`forgeqe.yaml`,intro:`Teams channels and email lists, and the events each one gets (notify:). Monitor alerts are set under Monitor.`},{id:`appearance`,group:`General`,icon:ue,label:`Appearance`,file:`forgeqe.yaml`,intro:`The project's logo, name and colours in this web app, for everyone who opens it (theme:).`},{id:`voice`,group:`General`,icon:ye,label:`Voice`,file:``,intro:`Talk to ForgeQE's agents: speech set up on this computer, in English for now, and how long Talk waits when you pause. Speech never leaves this computer.`},{id:`models`,group:`AI`,icon:oe,label:`Models`,file:`llms.json and forgeqe.yaml`,intro:`The models the agents use (llm:). Keys you type go to your credential store, never to a file.`},{id:`routing`,group:`AI`,icon:r,label:`Routing`,file:`forgeqe.yaml`,intro:`Which model each area of work and each agent gets (llm.routing, llm.routes, llm.agents).`},{id:`skills`,group:`AI`,icon:Ce,label:`Skills`,file:`forgeqe.yaml`,intro:`What the agents know how to do: your test conventions, frameworks and apps, as folders with a SKILL.md, grouped by the agents that use them. Add your own for this project.`},{id:`prompts`,group:`AI`,icon:xe,label:`Prompts`,file:``,intro:`The instructions each agent starts from, with the agents that use each. Edit one to change how that agent works in this project, or add your own prompt for the agents you choose.`},{id:`guardrails`,group:`AI`,icon:le,label:`Guardrails`,file:`.forgeqe/guardrails`,intro:`Rules your agents follow in every chat and schedule: for every agent, or only the ones you choose.`},{id:`agents`,group:`AI`,icon:t,label:`Agents`,file:`forgeqe.yaml`,intro:`What you call the agents, their instructions, where their knowledge and guardrails are, custom agents, and the tools they get.`},{id:`evidence`,group:`AI`,icon:c,label:`Product knowledge`,file:`forgeqe.yaml`,intro:`What the agents know about your product, in five steps: its repositories, where its requirements are searched, its documents, the product and its knowledge, and how the graph is built.`},{id:`mcp`,group:`AI`,icon:_e,label:`MCP servers`,file:`forgeqe.yaml`,intro:`More MCP servers whose tools ForgeQE's agent gets (mcp:). Each test case system's own server is set with it under Integrations.`},{id:`tests`,group:`Testing`,icon:u,label:`Code`,file:`forgeqe.yaml`,intro:`Writing tests (code:): where passed runs become tests, how hard the coding agent tries, its time limits, and the help it gets.`},{id:`runs`,group:`Testing`,icon:se,label:`Reports and memory`,file:`forgeqe.yaml`,intro:`Where reports are exported (export:, report:), page memory and replays (memory:, registry:), suites, flaky tests, release readiness, defect analysis, and the project report (bi:).`},{id:`registry`,group:`Testing`,icon:d,label:`Replays`,file:`forgeqe.yaml`,intro:`Run a passed test again for free: ForgeQE repeats its saved steps without the AI.`},{id:`parallel`,group:`Testing`,icon:me,label:`Parallel execution`,file:`forgeqe.yaml`,intro:`How many browsers, scheduled runs and monitor checks go at once. Mobile devices at once are set under Mobile.`},{id:`browser`,group:`Testing`,icon:he,label:`Browser`,file:`forgeqe.yaml`,intro:`How the browser agent runs: where, how it looks, and how long it may take.`},{id:`monitor`,group:`Testing`,icon:l,label:`Monitor`,file:`forgeqe.yaml`,intro:`Checks that run on a schedule, and the alerts when one starts failing, keeps failing, or recovers.`},{id:`mobile`,group:`Testing`,icon:fe,label:`Mobile`,file:`forgeqe.yaml and the clouds' files`,intro:`How Android and iOS apps run (mobile:): Appium or Maestro, on several devices at once, on this machine or a device cloud such as TestMu AI. The apps themselves are in Environments.`},{id:`desktop`,group:`Testing`,icon:e,label:`Desktop`,file:`forgeqe.yaml`,intro:`How Windows desktop apps replay (desktop:). The apps themselves are in Environments.`},{id:`containers`,group:`Testing`,icon:re,label:`Containers`,file:`forgeqe.yaml`,intro:`Services for test runs in Docker or Podman (containers:): databases, queues, the API under test, mocks, and the images tests and agents run in.`},{id:`databases`,group:`Testing`,icon:ve,label:`Databases`,file:`forgeqe.yaml`,intro:`Databases the agent may read, and write to after you confirm (databases:), for questions, test data and data flows. An environment can add its own.`},{id:`quality`,group:`Testing`,icon:a,label:`Quality`,file:`forgeqe.yaml`,intro:`Accessibility, performance, visual and API checks on every page a run visits.`},{id:`logs`,group:`Activity`,icon:ie,label:`Logs`,file:``,intro:`A log of each chat, run and suite on this machine, for finding out what happened.`},{id:`audit`,group:`Activity`,icon:te,label:`Audit`,file:``,intro:`What ForgeQE did and what went wrong: sessions, tool and model calls, runs and errors, and who changed which setting.`},{id:`observability`,group:`Activity`,icon:ne,label:`Observability`,file:``,intro:`Send ForgeQE's own spans and metrics to your OpenTelemetry collector: off unless you turn it on, and never what the agents read or wrote.`},{id:`tokenomics`,group:`Activity`,icon:i,label:`Tokenomics`,file:`forgeqe.yaml`,intro:`Where the tokens and money went, from this project's reports, and the budgets that warn before they run out.`},{id:`generated`,group:`Activity`,icon:s,label:`Generated code`,file:``,intro:`How much of the code ForgeQE wrote in the repository is still there, by run (forgeqe generated).`},{id:`files`,group:`Advanced`,icon:ce,label:`Settings as text`,file:``,intro:`forgeqe.yaml, llms.json and env.yaml as they are on disk, for anything the form does not have.`},{id:`report`,group:`Advanced`,icon:be,label:`Report a problem`,file:``,intro:`Tell the ForgeQE team about a problem in ForgeQE. It drafts the bug with you, shows everything it will send, and files it in their Azure DevOps.`},{id:`features`,group:`Advanced`,icon:de,label:`What's ready`,file:``,intro:`What ForgeQE can do here. Pick one to see what it needs.`},{id:`whats-new`,group:`Advanced`,icon:n,label:`What's new`,file:``,intro:`What each release of ForgeQE added, improved and fixed. Pick a change to read more.`},{id:`about`,group:`Advanced`,icon:ae,label:`About ForgeQE`,file:``,intro:`The version of ForgeQE on this computer, updating it, and its guides.`}],Ge=[`guardrails`,`skills`,`prompts`];export{Oe as A,P as C,L as D,R as E,T as M,E as N,k as O,D as P,N as S,I as T,Ne as _,Pe as a,Be as b,$ as c,Y as d,Z as f,Ue as g,Le as h,J as i,M as j,De as k,X as l,G as m,Ge as n,Re as o,Ve as p,q as r,Fe as s,We as t,ze as u,K as v,Me as w,Ie as x,Q as y};
@@ -1 +0,0 @@
1
- var e=new Intl.RelativeTimeFormat(`en`,{style:`narrow`}),t=(t,n)=>e.format(-t,n);function n(e){let n=e?Date.parse(e):NaN;if(Number.isNaN(n))return``;let r=Math.max(0,(Date.now()-n)/1e3);if(r<60)return`just now`;if(r<3600)return t(Math.floor(r/60),`minute`);if(r<21600)return t(Math.floor(r/3600),`hour`);let i=new Date(n);return i.toDateString()===new Date().toDateString()?i.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):r<518400?i.toLocaleString([],{weekday:`short`,hour:`2-digit`,minute:`2-digit`}):i.toLocaleDateString([],{day:`numeric`,month:`short`})}function r(e,t=new Date){let n=e?new Date(e):null;if(!n||Number.isNaN(n.getTime()))return`Older`;let r=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();return n.getTime()>=r?`Today`:n.getTime()>=r-864e5?`Yesterday`:n.getTime()>=r-5184e5?`Earlier this week`:`Older`}export{r as n,t as r,n as t};