@saywright/studio 0.0.0-stage → 0.1.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 (107) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +5 -0
  3. package/README.md +63 -2
  4. package/bin/saywright.mjs +10 -0
  5. package/dist/THIRD_PARTY_NOTICES.md +2699 -0
  6. package/dist/axe.min.js +12 -0
  7. package/dist/bridge.js +6582 -0
  8. package/dist/cli.mjs +56050 -0
  9. package/dist/client/assets/Calibration-xY4YDLzU.js +1 -0
  10. package/dist/client/assets/Calibration-xY4YDLzU.js.br +0 -0
  11. package/dist/client/assets/Calibration-xY4YDLzU.js.gz +0 -0
  12. package/dist/client/assets/CodeViews-ytEy2pIT.js +3 -0
  13. package/dist/client/assets/CodeViews-ytEy2pIT.js.br +0 -0
  14. package/dist/client/assets/CodeViews-ytEy2pIT.js.gz +0 -0
  15. package/dist/client/assets/CommandPalette-BA3akF-p.js +1 -0
  16. package/dist/client/assets/CommandPalette-BA3akF-p.js.br +0 -0
  17. package/dist/client/assets/CommandPalette-BA3akF-p.js.gz +0 -0
  18. package/dist/client/assets/HelpDialog-C6qmdEwi.js +1 -0
  19. package/dist/client/assets/HelpDialog-C6qmdEwi.js.br +0 -0
  20. package/dist/client/assets/HelpDialog-C6qmdEwi.js.gz +0 -0
  21. package/dist/client/assets/ReportView-Bj9xxLCi.js +4 -0
  22. package/dist/client/assets/ReportView-Bj9xxLCi.js.br +0 -0
  23. package/dist/client/assets/ReportView-Bj9xxLCi.js.gz +0 -0
  24. package/dist/client/assets/SettingsDialog-VrACcdUX.js +1 -0
  25. package/dist/client/assets/SettingsDialog-VrACcdUX.js.br +0 -0
  26. package/dist/client/assets/SettingsDialog-VrACcdUX.js.gz +0 -0
  27. package/dist/client/assets/asr.worker-FcRNDSsJ.js +17 -0
  28. package/dist/client/assets/asr.worker-FcRNDSsJ.js.br +0 -0
  29. package/dist/client/assets/asr.worker-FcRNDSsJ.js.gz +0 -0
  30. package/dist/client/assets/button-B2NFEpCs.js +18 -0
  31. package/dist/client/assets/button-B2NFEpCs.js.br +0 -0
  32. package/dist/client/assets/button-B2NFEpCs.js.gz +0 -0
  33. package/dist/client/assets/camera-BD9K1f5I.js +1 -0
  34. package/dist/client/assets/cn-Wq33h1G4.js +1 -0
  35. package/dist/client/assets/cn-Wq33h1G4.js.br +0 -0
  36. package/dist/client/assets/cn-Wq33h1G4.js.gz +0 -0
  37. package/dist/client/assets/confirm-D1U-bFIL.js +41 -0
  38. package/dist/client/assets/confirm-D1U-bFIL.js.br +0 -0
  39. package/dist/client/assets/confirm-D1U-bFIL.js.gz +0 -0
  40. package/dist/client/assets/footprints-DiYtIryA.js +1 -0
  41. package/dist/client/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  42. package/dist/client/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  43. package/dist/client/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  44. package/dist/client/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  45. package/dist/client/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
  46. package/dist/client/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
  47. package/dist/client/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
  48. package/dist/client/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  49. package/dist/client/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
  50. package/dist/client/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
  51. package/dist/client/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  52. package/dist/client/assets/index-BakNwOFF.css +2 -0
  53. package/dist/client/assets/index-BakNwOFF.css.br +0 -0
  54. package/dist/client/assets/index-BakNwOFF.css.gz +0 -0
  55. package/dist/client/assets/index-DUAtV_Av.js +18 -0
  56. package/dist/client/assets/index-DUAtV_Av.js.br +0 -0
  57. package/dist/client/assets/index-DUAtV_Av.js.gz +0 -0
  58. package/dist/client/assets/ort-wasm-simd-threaded-DcHrbrbl.wasm +0 -0
  59. package/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
  60. package/dist/client/assets/preload-helper-BLdHbfdN.js.br +0 -0
  61. package/dist/client/assets/preload-helper-BLdHbfdN.js.gz +0 -0
  62. package/dist/client/assets/refresh-cw-Dobx2YmO.js +1 -0
  63. package/dist/client/assets/tracker.worker-DWwj76VA.js +41 -0
  64. package/dist/client/assets/tracker.worker-DWwj76VA.js.br +0 -0
  65. package/dist/client/assets/tracker.worker-DWwj76VA.js.gz +0 -0
  66. package/dist/client/assets/vision_bundle-ByYCzljp.js +41 -0
  67. package/dist/client/assets/vision_bundle-ByYCzljp.js.br +0 -0
  68. package/dist/client/assets/vision_bundle-ByYCzljp.js.gz +0 -0
  69. package/dist/client/favicon.svg +1 -0
  70. package/dist/client/index.html +27 -0
  71. package/dist/client/index.html.br +0 -0
  72. package/dist/client/index.html.gz +0 -0
  73. package/dist/client/voice-capture-worklet.js +23 -0
  74. package/dist/sample/index.html +13 -0
  75. package/dist/sample/package.json +23 -0
  76. package/dist/sample/playwright.config.ts +20 -0
  77. package/dist/sample/saywright.config.json +68 -0
  78. package/dist/sample/src/App.tsx +32 -0
  79. package/dist/sample/src/components/AddressCard.tsx +16 -0
  80. package/dist/sample/src/components/CouponField.tsx +50 -0
  81. package/dist/sample/src/components/Header.tsx +26 -0
  82. package/dist/sample/src/components/LineItems.tsx +22 -0
  83. package/dist/sample/src/components/OrderSummary.tsx +32 -0
  84. package/dist/sample/src/components/ProductCard.tsx +26 -0
  85. package/dist/sample/src/ds/Badge.tsx +14 -0
  86. package/dist/sample/src/ds/Button.tsx +16 -0
  87. package/dist/sample/src/ds/Card.tsx +17 -0
  88. package/dist/sample/src/ds/Heading.tsx +14 -0
  89. package/dist/sample/src/ds/ProductGrid.tsx +15 -0
  90. package/dist/sample/src/ds/SummaryRow.tsx +18 -0
  91. package/dist/sample/src/ds/TextField.tsx +31 -0
  92. package/dist/sample/src/ds/index.ts +7 -0
  93. package/dist/sample/src/lib/cart.ts +20 -0
  94. package/dist/sample/src/lib/money.ts +7 -0
  95. package/dist/sample/src/lib/pricing.ts +34 -0
  96. package/dist/sample/src/lib/route.ts +17 -0
  97. package/dist/sample/src/main.tsx +10 -0
  98. package/dist/sample/src/pages/Checkout.tsx +37 -0
  99. package/dist/sample/src/pages/Shop.tsx +27 -0
  100. package/dist/sample/src/styles.css +155 -0
  101. package/dist/sample/tests/smoke.spec.ts +7 -0
  102. package/dist/sample/tsconfig.json +37 -0
  103. package/dist/sample/vite.config.ts +8 -0
  104. package/dist/server/node-BgmEDdmn.mjs +23 -0
  105. package/dist/server/node-DuXxFg5I.mjs +2501 -0
  106. package/dist/server/speech-worker.mjs +266 -0
  107. package/package.json +97 -4
@@ -0,0 +1 @@
1
+ import{i as e,o as t,r as n,t as r}from"./cn-Wq33h1G4.js";import{$ as i,K as a,Q as o,Z as s,i as c,o as l,r as u,rt as d,s as f,t as p}from"./button-B2NFEpCs.js";import{o as m,y as h}from"./index-DUAtV_Av.js";var g=t(e(),1),_=n(),v=.07,y=[{x:v,y:v,label:`top left`},{x:.9299999999999999,y:v,label:`top right`},{x:.9299999999999999,y:.9299999999999999,label:`bottom right`},{x:v,y:.9299999999999999,label:`bottom left`}],b=750,x=.014,S=.05;function C(e){if(e.length!==4)return null;let t=(e[0].x+e[3].x)/2,n=(e[1].x+e[2].x)/2,r=(e[0].y+e[1].y)/2,i=(e[2].y+e[3].y)/2,a=(n-t)/(1-2*v),o=(i-r)/(1-2*v);return a<.1||o<.08||a>1.4||o>1.4?null:{x0:t-v*a,x1:n+v*a,y0:r-v*o,y1:i+v*o}}function w(){let e=i(e=>e.overlay===`calibrate`),t=i(e=>e.camera.status),n=i(e=>e.hand.present),[v,w]=(0,g.useState)(0),[E,D]=(0,g.useState)(0),[O,k]=(0,g.useState)(null),A=(0,g.useRef)([]),j=(0,g.useRef)([]),M=(0,g.useRef)(!1),N=v>=4;(0,g.useEffect)(()=>{if(e)return a.calibrating=!0,w(0),D(0),k(null),A.current=[],j.current=[],t!==`on`&&a.startCamera(),()=>{a.calibrating=!1}},[e]),(0,g.useEffect)(()=>{if(!e||N)return;let t=e=>{let t=a.engine.state.landmarks;if(!a.engine.state.present||!t){j.current=[],D(0);return}let n={t:e.t,x:1-t[8].x,y:t[8].y},r=A.current[A.current.length-1];if(r&&Math.hypot(n.x-r.x,n.y-r.y)<S){j.current=[],D(0);return}for(j.current.push(n);j.current.length>1&&j.current[1].t<=e.t-b;)j.current.shift();let i=j.current.length,o=j.current.reduce((e,t)=>e+t.x,0)/i,s=j.current.reduce((e,t)=>e+t.y,0)/i,c=Math.max(...j.current.map(e=>Math.hypot(e.x-o,e.y-s))),l=j.current[i-1].t-j.current[0].t,u=a.engine.state.pinching,d=u&&!M.current;if(M.current=u,c>x){if(j.current=[n],D(0),!d)return}else D(Math.min(1,l/b));(d||c<=x&&l>=b)&&(A.current.push(d?{x:n.x,y:n.y}:{x:o,y:s}),j.current=[],D(0),w(e=>e+1))};return a.frameListeners.add(t),()=>void a.frameListeners.delete(t)},[e,N]),(0,g.useEffect)(()=>{if(!e||!N)return;let t=C(A.current);t?d.getState().setEngine({box:t}):k(`Those points were too close together. Point at each target with your whole arm, and try again.`)},[e,N]);let P=()=>{let e=s().calibrateReturn;o({overlay:e,calibrateReturn:null,...e===`onboarding`?{onboardingStep:s().onboardingStep+1}:{}})},F=()=>{A.current=[],j.current=[],k(null),D(0),w(0)};return(0,g.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&o({overlay:s().calibrateReturn,calibrateReturn:null})};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e]),(0,_.jsx)(f,{children:e&&(0,_.jsxs)(l.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`fixed inset-0 z-[90] bg-[#07080a]/92 backdrop-blur-md`,role:`dialog`,"aria-label":`Calibrate reach`,children:[y.map((e,t)=>(0,_.jsx)(T,{x:e.x,y:e.y,state:t<v?`done`:t===v&&!N?`active`:`idle`,progress:t===v?E:0},t)),(0,_.jsxs)(`div`,{className:`absolute left-1/2 top-1/2 w-[400px] -translate-x-1/2 -translate-y-1/2 text-center`,children:[(0,_.jsx)(`div`,{className:`mb-4 flex justify-center gap-1.5`,children:y.map((e,t)=>(0,_.jsx)(`span`,{className:r(`h-1 w-8 rounded-full transition-colors`,t<v?`bg-human`:`bg-white/15`)},t))}),O?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`h2`,{className:`text-[18px] font-semibold text-white`,children:`Let’s try that again`}),(0,_.jsx)(`p`,{className:`mt-2 text-[13px] leading-relaxed text-white/65`,children:O}),(0,_.jsxs)(`div`,{className:`mt-5 flex justify-center gap-2`,children:[(0,_.jsx)(p,{variant:`ghost`,className:`text-white/70 hover:text-white`,onClick:P,children:`Cancel`}),(0,_.jsx)(p,{variant:`human`,onClick:F,children:`Try again`})]})]}):N?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`div`,{className:`mx-auto mb-3 flex size-10 items-center justify-center rounded-full bg-human text-[#1b1203]`,children:(0,_.jsx)(c,{className:`size-5`})}),(0,_.jsx)(`h2`,{className:`text-[18px] font-semibold text-white`,children:`Reach calibrated`}),(0,_.jsx)(`p`,{className:`mt-2 text-[13px] leading-relaxed text-white/65`,children:`Your comfortable pointing area now covers the whole screen.`}),(0,_.jsxs)(`div`,{className:`mt-5 flex justify-center gap-2`,children:[(0,_.jsx)(p,{variant:`ghost`,className:`text-white/70 hover:text-white`,onClick:F,children:`Redo`}),(0,_.jsx)(p,{variant:`human`,onClick:P,children:`Continue`})]})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`h2`,{className:`text-[18px] font-semibold text-white`,children:[`Point at the `,y[v].label,` target`]}),(0,_.jsx)(`p`,{className:`mt-2 text-[13px] leading-relaxed text-white/65`,children:t===`on`?n?`Aim where it feels natural, then hold still for a moment, or pinch.`:`Raise one hand so the camera can see it.`:`Starting the camera…`}),(0,_.jsx)(m,{className:`mx-auto mt-5 h-[120px] w-[160px] rounded-[12px] ring-1 ring-white/10`,box:!1}),(0,_.jsxs)(`p`,{className:`mt-5 text-[12px] text-white/40`,children:[(0,_.jsx)(h,{tone:`onDark`,children:`Esc`}),` to cancel`]})]})]}),(0,_.jsx)(`button`,{"data-hand":!0,onClick:()=>o({overlay:s().calibrateReturn,calibrateReturn:null}),className:`absolute right-5 top-5 rounded-[8px] p-2 text-white/50 hover:bg-white/10 hover:text-white`,"aria-label":`Close`,children:(0,_.jsx)(u,{className:`size-4`})})]},`calibrate`)})}function T({x:e,y:t,state:n,progress:r}){let i=2*Math.PI*26;return(0,_.jsx)(`div`,{className:`absolute -translate-x-1/2 -translate-y-1/2`,style:{left:`${e*100}%`,top:`${t*100}%`},children:(0,_.jsxs)(l.svg,{width:`76`,height:`76`,viewBox:`0 0 76 76`,animate:{scale:n===`active`?1:.8,opacity:n===`idle`?.35:1},transition:{type:`spring`,stiffness:400,damping:28},children:[(0,_.jsx)(`circle`,{cx:`38`,cy:`38`,r:26,fill:`none`,stroke:n===`done`?`#3dd68c`:`rgba(255,255,255,.25)`,strokeWidth:`2`}),n===`active`&&(0,_.jsx)(`circle`,{cx:`38`,cy:`38`,r:26,fill:`none`,stroke:`#ffb224`,strokeWidth:`4`,strokeLinecap:`round`,strokeDasharray:i,strokeDashoffset:i*(1-r),transform:`rotate(-90 38 38)`}),n===`done`?(0,_.jsx)(`path`,{d:`M30 38.5l5.5 5.5 11-12`,fill:`none`,stroke:`#3dd68c`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`circle`,{cx:`38`,cy:`38`,r:`4`,fill:n===`active`?`#ffb224`:`rgba(255,255,255,.5)`}),n===`active`&&(0,_.jsx)(`circle`,{cx:`38`,cy:`38`,r:`12`,fill:`none`,stroke:`#ffb224`,strokeOpacity:`.5`,strokeWidth:`1.5`,className:`origin-center animate-ping`})]})]})})}export{w as Calibration};
@@ -0,0 +1,3 @@
1
+ import{i as e,n as t,o as n,r,t as i}from"./cn-Wq33h1G4.js";var a=n(e(),1),o=Object.create,s=Object.defineProperty,c=Object.defineProperties,l=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t)=>{for(var n in t||={})m.call(t,n)&&g(e,n,t[n]);if(f)for(var n of f(t))h.call(t,n)&&g(e,n,t[n]);return e},v=(e,t)=>c(e,u(t)),y=(e,t)=>{var n={};for(var r in e)m.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&f)for(var r of f(e))t.indexOf(r)<0&&h.call(e,r)&&(n[r]=e[r]);return n},b=(e,t)=>function(){return t||(0,e[d(e)[0]])((t={exports:{}}).exports,t),t.exports},x=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},S=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of d(t))!m.call(e,i)&&i!==n&&s(e,i,{get:()=>t[i],enumerable:!(r=l(t,i))||r.enumerable});return e},C=((e,t,n)=>(n=e==null?{}:o(p(e)),S(t||!e||!e.__esModule?s(n,`default`,{value:e,enumerable:!0}):n,e)))(b({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){n||={};var i,a;switch(r.util.type(t)){case`Object`:if(a=r.util.objId(t),n[a])return n[a];for(var o in i={},n[a]=i,t)t.hasOwnProperty(o)&&(i[o]=e(t[o],n));return i;case`Array`:return a=r.util.objId(t),n[a]?n[a]:(i=[],n[a]=i,t.forEach(function(t,r){i[r]=e(t,n)}),i);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return`none`},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,`gi`),``),t.classList.add(`language-`+n)},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var i in t)n[i]=t[i];return n},insertBefore:function(e,t,n,i){i||=r.languages;var a=i[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=i[e];return i[e]=o,r.languages.DFS(r.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,i,a){a||={};var o=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],i||s);var c=t[s],l=r.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run(`before-tokenize`,a),!a.grammar)throw Error(`The language "`+a.language+`" has no grammar.`);return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run(`after-tokenize`,a),i.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new s;return c(i,i.head,e),o(e,i,t,i.head,0),u(i)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var i=0,a;a=n[i++];)a(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}i.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var i=``;return t.forEach(function(t){i+=e(t,n)}),i}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),r.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function a(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function o(e,t,n,s,u,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=s.next,C=u;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof i)){var T=1,E;if(v){if(E=a(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof i)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=a(x,0,w,_),!E)continue;var D=E.index,j=E[0],M=w.slice(0,D),N=w.slice(D+j.length),P=C+w.length;d&&P>d.reach&&(d.reach=P);var F=S.prev;M&&(F=c(t,F,M),C+=M.length),l(t,F,T);var I=new i(f,g?r.tokenize(j,g):j,y,j);if(S=c(t,F,I),N&&c(t,S,N),T>1){var L={cause:f+`,`+m,reach:P};o(e,t,n,S.prev,C,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function l(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function u(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}return r}();t.exports=n,n.default=n}})());C.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},C.languages.markup.tag.inside[`attr-value`].inside.entity=C.languages.markup.entity,C.languages.markup.doctype.inside[`internal-subset`].inside=C.languages.markup,C.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(C.languages.markup.tag,"addInlined",{value:function(e,t){var n={},n=(n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:C.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),t=(n[`language-`+t]={pattern:/[\s\S]+/,inside:C.languages[t]},{});t[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:n},C.languages.insertBefore(`markup`,`cdata`,t)}}),Object.defineProperty(C.languages.markup.tag,"addAttribute",{value:function(e,t){C.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:C.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),C.languages.html=C.languages.markup,C.languages.mathml=C.languages.markup,C.languages.svg=C.languages.markup,C.languages.xml=C.languages.extend(`markup`,{}),C.languages.ssml=C.languages.xml,C.languages.atom=C.languages.xml,C.languages.rss=C.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:`escape`},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r=`(?:[^\\\\-]|`+n.source+`)`,r=RegExp(r+`-`+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:`variable`};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:`operator`},"char-class-punctuation":{pattern:/^\[|\]$/,alias:`punctuation`},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:`operator`}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:`class-name`},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:`class-name`},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:`keyword`},{pattern:/\\k<[^<>']+>/,alias:`keyword`,inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:`function`},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:`punctuation`,inside:{"group-name":i}},{pattern:/\)/,alias:`punctuation`}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:`number`},alternation:{pattern:/\|/,alias:`keyword`}}}(C),C.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},C.languages.javascript=C.languages.extend(`clike`,{"class-name":[C.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),C.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,C.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:C.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:C.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:C.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:C.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:C.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),C.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:C.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),C.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),C.languages.markup&&(C.languages.markup.tag.addInlined(`script`,`javascript`),C.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),C.languages.js=C.languages.javascript,C.languages.actionscript=C.languages.extend(`javascript`,{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),C.languages.actionscript[`class-name`].alias=`function`,delete C.languages.actionscript.parameter,delete C.languages.actionscript[`literal-property`],C.languages.markup&&C.languages.insertBefore(`actionscript`,`string`,{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:C.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:`variable`};e.languages.coffeescript=e.languages.extend(`javascript`,{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:`variable`}}),e.languages.insertBefore(`coffeescript`,`comment`,{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:`comment`},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:`regex`,inside:{comment:t,interpolation:n}}}),e.languages.insertBefore(`coffeescript`,`string`,{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:`punctuation`},script:{pattern:/[\s\S]+/,alias:`language-javascript`,inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:`string`},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:`string`,inside:{interpolation:n}}]}),e.languages.insertBefore(`coffeescript`,`keyword`,{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript[`template-string`],e.languages.coffee=e.languages.coffeescript}(C),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t=typeof t==`string`?[t]:t).forEach(function(t){var r=function(e){e.inside||={},e.inside.rest=n},i=`doc-comment`;if(a=e.languages[t]){var a,o=a[i];if((o||=(a=e.languages.insertBefore(t,`comment`,{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:`comment`}}))[i])instanceof RegExp&&(o=a[i]={pattern:o}),Array.isArray(o))for(var s=0,c=o.length;s<c;s++)o[s]instanceof RegExp&&(o[s]={pattern:o[s]}),r(o[s]);else r(o)}})}}),t.addSupport([`java`,`javascript`,`php`],t)}(C),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined(`style`,`css`),t.tag.addAttribute(`style`,`css`))}(C),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+`)*\\]`),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:`keyword`},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside[`selector-function-argument`].inside=t,e.languages.insertBefore(`css`,`property`,{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore(`css`,`function`,{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:`color`},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(C),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r=`(?:`+n.source+`(?:[ ]+`+t.source+`)?|`+t.source+`(?:[ ]+`+n.source+`)?)`,i=`(?:[^\\s\\x00-\\x08\\x0e-\\x1f!"#%&'*,\\-:>?@[\\]\`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*`.replace(/<PLAIN>/g,function(){return`[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]`}),a=`"(?:[^"\\\\\\r\\n]|\\\\.)*"|'(?:[^'\\\\\\r\\n]|\\\\.)*'`;function o(e,t){t=(t||``).replace(/m/g,``)+`m`;var n=`([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))`.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e});return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)`.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:`string`},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)`.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return`(?:`+i+`|`+a+`)`})),lookbehind:!0,greedy:!0,alias:`atrule`},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:`important`},datetime:{pattern:o(`\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?`),lookbehind:!0,alias:`number`},boolean:{pattern:o(`false|true`,`i`),lookbehind:!0,alias:`important`},null:{pattern:o(`null|~`,`i`),lookbehind:!0,alias:`important`},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(`[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)`,`i`),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(C),function(e){function t(e){return e=e.replace(/<inner>/g,function(){return`(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))`}),RegExp(`((?:^|[^\\\\])(?:\\\\{2})*)(?:`+e+`)`)}var n="(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+",r=`\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))`.replace(/__/g,function(){return n}),i=`\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)`,a=(e.languages.markdown=e.languages.extend(`markup`,{}),e.languages.insertBefore(`markdown`,`prolog`,{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:[`yaml`,`language-yaml`],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:`punctuation`},table:{pattern:RegExp(`^`+r+i+`(?:`+r+`)*`,`m`),inside:{"table-data-rows":{pattern:RegExp(`^(`+r+i+`)(?:`+r+`)*$`),lookbehind:!0,inside:{"table-data":{pattern:RegExp(n),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp(`^(`+r+`)`+i+`$`),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp(`^`+r+`$`),inside:{"table-header":{pattern:RegExp(n),alias:`important`,inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:`keyword`},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:`important`,inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:`important`,inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:`punctuation`},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:`punctuation`},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:`url`},bold:{pattern:t(`\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(`\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(`(~~?)(?:(?!~)<inner>)+\\2`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:[`code`,`keyword`]},url:{pattern:t(`!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])`),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),[`url`,`bold`,`italic`,`strike`].forEach(function(t){[`url`,`bold`,`italic`,`strike`,`code-snippet`].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add(`after-tokenize`,function(e){e.language!==`markdown`&&e.language!==`md`||function e(t){if(t&&typeof t!=`string`)for(var n=0,r=t.length;n<r;n++){var i,a=t[n];a.type===`code`?(i=a.content[1],a=a.content[3],i&&a&&i.type===`code-language`&&a.type===`code-block`&&typeof i.content==`string`&&(i=i.content.replace(/\b#/g,`sharp`).replace(/\b\+\+/g,`pp`),i=`language-`+(i=(/[a-z][\w-]*/i.exec(i)||[``])[0].toLowerCase()),a.alias?typeof a.alias==`string`?a.alias=[a.alias,i]:a.alias.push(i):a.alias=[i])):e(a.content)}}(e.tokens)}),e.hooks.add(`wrap`,function(t){if(t.type===`code-block`){for(var n=``,r=0,i=t.classes.length;r<i;r++){var c=t.classes[r],c=/language-(.+)/.exec(c);if(c){n=c[1];break}}var l,u=e.languages[n];u?t.content=e.highlight(function(e){return e=e.replace(a,``),e=e.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;return(t=t.toLowerCase())[0]===`#`?(n=t[1]===`x`?parseInt(t.slice(2),16):Number(t.slice(1)),s(n)):o[t]||e})}(t.content),u,n):n&&n!==`none`&&e.plugins.autoloader&&(l=`md-`+new Date().valueOf()+`-`+Math.floor(0x2386f26fc10000*Math.random()),t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}),RegExp(e.languages.markup.tag.pattern.source,`gi`)),o={amp:`&`,lt:`<`,gt:`>`,quot:`"`},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(C),C.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:`string`,inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:C.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:`function`},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:`class-name`},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:`function`},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},C.hooks.add(`after-tokenize`,function(e){if(e.language===`graphql`)for(var t=e.tokens.filter(function(e){return typeof e!=`string`&&e.type!==`comment`&&e.type!==`scalar`}),n=0;n<t.length;){var r=t[n++];if(r.type===`keyword`&&r.content===`mutation`){var i=[];if(d([`definition-mutation`,`punctuation`])&&u(1).content===`(`){n+=2;var a=f(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=u(0);o.type===`variable`&&(p(o,`variable-input`),i.push(o.content))}n=a+1}if(d([`punctuation`,`property-query`])&&u(0).content===`{`&&(n++,p(u(0),`property-mutation`),0<i.length)){var s=f(/^\{$/,/^\}$/);if(s!==-1)for(var c=n;c<s;c++){var l=t[c];l.type===`variable`&&0<=i.indexOf(l.content)&&p(l,`variable-input`)}}}}function u(e){return t[n+e]}function d(e,t){t||=0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function f(e,r){for(var i=1,a=n;a<t.length;a++){var o=t[a],s=o.content;if(o.type===`punctuation`&&typeof s==`string`){if(e.test(s))i++;else if(r.test(s)&&--i===0)return a}}return-1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}}),C.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript[`template-string`],n=t.pattern.source,r=t.inside.interpolation,i=r.inside[`interpolation-punctuation`],a=r.pattern.source;function o(t,r){if(e.languages[t])return{pattern:RegExp(`((?:`+r+`)\\s*)`+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run(`before-tokenize`,t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run(`after-tokenize`,t),t.tokens}function c(t,n,o){var c=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),l=0,u={},c=s(c.map(function(e){if(typeof e==`string`)return e;for(var n,r,e=e.content;t.indexOf((r=l++,n=`___`+o.toUpperCase()+`_`+r+`___`))!==-1;);return u[n]=e,n}).join(``),n,o),d=Object.keys(u);return l=0,function t(n){for(var a=0;a<n.length;a++){if(l>=d.length)return;var o,c,f,p,m,h,g,_=n[a];typeof _==`string`||typeof _.content==`string`?(o=d[l],(g=(h=typeof _==`string`?_:_.content).indexOf(o))!==-1&&(++l,c=h.substring(0,g),m=u[o],f=void 0,(p={})[`interpolation-punctuation`]=i,(p=e.tokenize(m,p)).length===3&&((f=[1,1]).push.apply(f,s(p[1],e.languages.javascript,`javascript`)),p.splice.apply(p,f)),f=new e.Token(`interpolation`,p,r.alias,m),p=h.substring(g+o.length),m=[],c&&m.push(c),m.push(f),p&&(t(h=[p]),m.push.apply(m,h)),typeof _==`string`?(n.splice.apply(n,[a,1].concat(m)),a+=m.length-1):_.content=m)):(g=_.content,t(Array.isArray(g)?g:[g]))}}(c),new e.Token(o,c,`language-`+o,t)}e.languages.javascript[`template-string`]=[o(`css`,`\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)`),o(`html`,`\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?=`),o(`svg`,`\\bsvg`),o(`markdown`,`\\b(?:markdown|md)`),o(`graphql`,`\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)`),o(`sql`,`\\bsql`),t].filter(Boolean);var l={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return typeof e==`string`?e:Array.isArray(e)?e.map(u).join(``):u(e.content)}e.hooks.add(`after-tokenize`,function(t){t.language in l&&function t(n){for(var r=0,i=n.length;r<i;r++){var a,o,s,l=n[r];typeof l!=`string`&&(a=l.content,Array.isArray(a)?l.type===`template-string`?(l=a[1],a.length===3&&typeof l!=`string`&&l.type===`embedded-code`&&(o=u(l),l=l.alias,l=Array.isArray(l)?l[0]:l,s=e.languages[l])&&(a[1]=c(o,s,l))):t(a):typeof a!=`string`&&t([a]))}}(t.tokens)})}(C),function(e){e.languages.typescript=e.languages.extend(`javascript`,{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript[`literal-property`];var t=e.languages.extend(`typescript`,{});delete t[`class-name`],e.languages.typescript[`class-name`].inside=t,e.languages.insertBefore(`typescript`,`function`,{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:`operator`},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:t}}}}),e.languages.ts=e.languages.typescript}(C),function(e){var t=e.languages.javascript,n=`\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})+\\}`,r=`(@(?:arg|argument|param|property)\\s+(?:`+n+`\\s+)?)`;e.languages.jsdoc=e.languages.extend(`javadoclike`,{parameter:{pattern:RegExp(r+`(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?=\\s|$)`),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore(`jsdoc`,`keyword`,{"optional-parameter":{pattern:RegExp(r+`\\[(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?:=[^[\\]]+)?\\](?=\\s|$)`),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:`language-javascript`},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(`(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\\s+(?:<TYPE>\\s+)?)[A-Z]\\w*(?:\\.[A-Z]\\w*)*`.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp(`(@[a-z]+\\s+)`+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:`language-javascript`}}}}),e.languages.javadoclike.addSupport(`javascript`,e.languages.jsdoc)}(C),function(e){e.languages.flow=e.languages.extend(`javascript`,{}),e.languages.insertBefore(`flow`,`keyword`,{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:`class-name`}]}),e.languages.flow[`function-variable`].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore(`flow`,`operator`,{"flow-punctuation":{pattern:/\{\||\|\}/,alias:`punctuation`}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(C),C.languages.n4js=C.languages.extend(`javascript`,{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),C.languages.insertBefore(`n4js`,`constant`,{annotation:{pattern:/@+\w+/,alias:`operator`}}),C.languages.n4jsd=C.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,function(){return`(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*`}),t)}e.languages.insertBefore(`javascript`,`function-variable`,{"method-variable":{pattern:RegExp(`(\\.\\s*)`+e.languages.javascript[`function-variable`].pattern.source),lookbehind:!0,alias:[`function-variable`,`method`,`function`,`property-access`]}}),e.languages.insertBefore(`javascript`,`function`,{method:{pattern:RegExp(`(\\.\\s*)`+e.languages.javascript.function.source),lookbehind:!0,alias:[`function`,`property-access`]}}),e.languages.insertBefore(`javascript`,`constant`,{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:`class-name`},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:`class-name`}]}),e.languages.insertBefore(`javascript`,`keyword`,{imports:{pattern:t(`(\\bimport\\b\\s*)(?:<ID>(?:\\s*,\\s*(?:\\*\\s*as\\s+<ID>|\\{[^{}]*\\}))?|\\*\\s*as\\s+<ID>|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)`),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(`(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+<ID>)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})`),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:`module`},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:`control-flow`},{pattern:/\bnull\b/,alias:[`null`,`nil`]},{pattern:/\bundefined\b/,alias:`nil`}),e.languages.insertBefore(`javascript`,`operator`,{spread:{pattern:/\.{3}/,alias:`operator`},arrow:{pattern:/=>/,alias:`operator`}}),e.languages.insertBefore(`javascript`,`punctuation`,{"property-access":{pattern:t(`(\\.\\s*)#?<ID>`),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:`variable`},console:{pattern:/\bconsole(?=\s*\.)/,alias:`class-name`}});for(var n=[`function`,`function-variable`,`method`,`method-variable`,`property-access`],r=0;r<n.length;r++){var i=n[r],a=e.languages.javascript[i],i=(a=e.util.type(a)===`RegExp`?e.languages.javascript[i]={pattern:a}:a).inside||{};(a.inside=i)[`maybe-class-name`]=/^[A-Z][\s\S]*/}}(C),function(e){var t=e.util.clone(e.languages.javascript),n=`(?:\\s|\\/\\/.*(?!.)|\\/\\*(?:[^*]|\\*(?!\\/))\\*\\/)`,r=`(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})`,i=`(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})`;function a(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=a(i).source,e.languages.jsx=e.languages.extend(`markup`,t),e.languages.jsx.tag.pattern=a(`<\\/?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[\\s\\S]|[^\\\\"])*"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\\/?)?>`),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside[`attr-value`].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside[`class-name`]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore(`inside`,`attr-name`,{spread:{pattern:a(`<SPREAD>`),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore(`inside`,`special-attr`,{script:{pattern:a(`=<BRACES>`),alias:`language-javascript`,inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:`punctuation`},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],a=!1;typeof i!=`string`&&(i.type===`tag`&&i.content[0]&&i.content[0].type===`tag`?i.content[0].content[0].content===`</`?0<n.length&&n[n.length-1].tagName===s(i.content[0].content[1])&&n.pop():i.content[i.content.length-1].content!==`/>`&&n.push({tagName:s(i.content[0].content[1]),openedBraces:0}):0<n.length&&i.type===`punctuation`&&i.content===`{`?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&i.type===`punctuation`&&i.content===`}`?n[n.length-1].openedBraces--:a=!0),(a||typeof i==`string`)&&0<n.length&&n[n.length-1].openedBraces===0&&(a=s(i),r<t.length-1&&(typeof t[r+1]==`string`||t[r+1].type===`plain-text`)&&(a+=s(t[r+1]),t.splice(r+1,1)),0<r&&(typeof t[r-1]==`string`||t[r-1].type===`plain-text`)&&(a=s(t[r-1])+a,t.splice(r-1,1),r--),t[r]=new e.Token(`plain-text`,a,null,a)),i.content&&typeof i.content!=`string`&&o(i.content)}}var s=function(e){return e?typeof e==`string`?e:typeof e.content==`string`?e.content:e.content.map(s).join(``):``};e.hooks.add(`after-tokenize`,function(e){e.language!==`jsx`&&e.language!==`tsx`||o(e.tokens)})}(C),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend(`jsx`,t),delete e.languages.tsx.parameter,delete e.languages.tsx[`literal-property`],e.languages.tsx.tag);t.pattern=RegExp(`(^|[^\\w$]|(?=<\\/))(?:`+t.pattern.source+`)`,t.pattern.flags),t.lookbehind=!0}(C),C.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(`(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:`punctuation`},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(`(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:`punctuation`},string:/[\s\S]+/}}],directive:{pattern:RegExp(`#(?:(?:elseif|if)\\b(?:[ ]*(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)`),alias:`property`,inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:`constant`},"other-directive":{pattern:/#\w+\b/,alias:`property`},attribute:{pattern:/@\w+/,alias:`atrule`},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:`function`},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:`important`},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:`constant`},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:`keyword`},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},C.languages.swift[`string-literal`].forEach(function(e){e.inside.interpolation.inside=C.languages.swift}),function(e){e.languages.kotlin=e.languages.extend(`clike`,{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin[`class-name`];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:`punctuation`},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore(`kotlin`,`string`,{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:`multiline`,inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:`singleline`,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore(`kotlin`,`keyword`,{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:`builtin`}}),e.languages.insertBefore(`kotlin`,`function`,{label:{pattern:/\b\w+@|@\w+\b/,alias:`symbol`}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(C),C.languages.c=C.languages.extend(`clike`,{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),C.languages.insertBefore(`c`,`string`,{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),C.languages.insertBefore(`c`,`string`,{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:`property`,inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},C.languages.c.string],char:C.languages.c.char,comment:C.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:`function`}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:`keyword`},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:C.languages.c}}}}),C.languages.insertBefore(`c`,`function`,{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete C.languages.c.boolean,C.languages.objectivec=C.languages.extend(`c`,{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete C.languages.objectivec[`class-name`],C.languages.objc=C.languages.objectivec,C.languages.reason=C.languages.extend(`clike`,{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),C.languages.insertBefore(`reason`,`class-name`,{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:`symbol`}}),delete C.languages.reason.function,function(e){for(var t=`\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/`,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return`[^\\s\\S]`}),e.languages.rust={comment:[{pattern:RegExp(`(^|[^\\\\])`+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:`attr-name`,inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:`punctuation`},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:`symbol`},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:`punctuation`},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:`function`},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:`class-name`},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:`namespace`},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:`namespace`,inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:`property`},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust[`closure-params`].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(C),C.languages.go=C.languages.extend(`clike`,{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),C.languages.insertBefore(`go`,`string`,{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete C.languages.go[`class-name`],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=`\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b`.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend(`c`,{"class-name":[{pattern:RegExp(`(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+`.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore(`cpp`,`string`,{module:{pattern:RegExp(`(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\\r\\n|[\\s\\S])|[^"\\\\\\r\\n])*"|<[^<>\\r\\n]*>|`+`<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>`.replace(/<mod-name>/g,function(){return n})+`)`),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:`string`,greedy:!0}}),e.languages.insertBefore(`cpp`,`keyword`,{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:e.languages.cpp}}}}),e.languages.insertBefore(`cpp`,`operator`,{"double-colon":{pattern:/::/,alias:`punctuation`}}),e.languages.insertBefore(`cpp`,`class-name`,{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend(`cpp`,{})}}),e.languages.insertBefore(`inside`,`double-colon`,{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp[`base-clause`])}(C),C.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:`punctuation`},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:`string`},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:[`annotation`,`punctuation`],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},C.languages.python[`string-interpolation`].inside.interpolation.inside.rest=C.languages.python,C.languages.py=C.languages.python,C.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},C.languages.webmanifest=C.languages.json;var w={};x(w,{dracula:()=>T,duotoneDark:()=>E,duotoneLight:()=>D,github:()=>O,gruvboxMaterialDark:()=>W,gruvboxMaterialLight:()=>ee,jettwaveDark:()=>B,jettwaveLight:()=>V,nightOwl:()=>k,nightOwlLight:()=>A,oceanicNext:()=>M,okaidia:()=>N,oneDark:()=>H,oneLight:()=>U,palenight:()=>P,shadesOfPurple:()=>F,synthwave84:()=>I,ultramin:()=>L,vsDark:()=>R,vsLight:()=>z});var T={plain:{color:`#F8F8F2`,backgroundColor:`#282A36`},styles:[{types:[`prolog`,`constant`,`builtin`],style:{color:`rgb(189, 147, 249)`}},{types:[`inserted`,`function`],style:{color:`rgb(80, 250, 123)`}},{types:[`deleted`],style:{color:`rgb(255, 85, 85)`}},{types:[`changed`],style:{color:`rgb(255, 184, 108)`}},{types:[`punctuation`,`symbol`],style:{color:`rgb(248, 248, 242)`}},{types:[`string`,`char`,`tag`,`selector`],style:{color:`rgb(255, 121, 198)`}},{types:[`keyword`,`variable`],style:{color:`rgb(189, 147, 249)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(98, 114, 164)`}},{types:[`attr-name`],style:{color:`rgb(241, 250, 140)`}}]},E={plain:{backgroundColor:`#2a2734`,color:`#9a86fd`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`,`punctuation`],style:{color:`#6c6783`}},{types:[`namespace`],style:{opacity:.7}},{types:[`tag`,`operator`,`number`],style:{color:`#e09142`}},{types:[`property`,`function`],style:{color:`#9a86fd`}},{types:[`tag-id`,`selector`,`atrule-id`],style:{color:`#eeebff`}},{types:[`attr-name`],style:{color:`#c4b9fe`}},{types:[`boolean`,`string`,`entity`,`url`,`attr-value`,`keyword`,`control`,`directive`,`unit`,`statement`,`regex`,`atrule`,`placeholder`,`variable`],style:{color:`#ffcc99`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`#c4b9fe`}}]},D={plain:{backgroundColor:`#faf8f5`,color:`#728fcb`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`,`punctuation`],style:{color:`#b6ad9a`}},{types:[`namespace`],style:{opacity:.7}},{types:[`tag`,`operator`,`number`],style:{color:`#063289`}},{types:[`property`,`function`],style:{color:`#b29762`}},{types:[`tag-id`,`selector`,`atrule-id`],style:{color:`#2d2006`}},{types:[`attr-name`],style:{color:`#896724`}},{types:[`boolean`,`string`,`entity`,`url`,`attr-value`,`keyword`,`control`,`directive`,`unit`,`statement`,`regex`,`atrule`],style:{color:`#728fcb`}},{types:[`placeholder`,`variable`],style:{color:`#93abdc`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`#896724`}}]},O={plain:{color:`#393A34`,backgroundColor:`#f6f8fa`},styles:[{types:[`comment`,`prolog`,`doctype`,`cdata`],style:{color:`#999988`,fontStyle:`italic`}},{types:[`namespace`],style:{opacity:.7}},{types:[`string`,`attr-value`],style:{color:`#e3116c`}},{types:[`punctuation`,`operator`],style:{color:`#393A34`}},{types:[`entity`,`url`,`symbol`,`number`,`boolean`,`variable`,`constant`,`property`,`regex`,`inserted`],style:{color:`#36acaa`}},{types:[`atrule`,`keyword`,`attr-name`,`selector`],style:{color:`#00a4db`}},{types:[`function`,`deleted`,`tag`],style:{color:`#d73a49`}},{types:[`function-variable`],style:{color:`#6f42c1`}},{types:[`tag`,`selector`,`keyword`],style:{color:`#00009f`}}]},k={plain:{color:`#d6deeb`,backgroundColor:`#011627`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`,fontStyle:`italic`}},{types:[`inserted`,`attr-name`],style:{color:`rgb(173, 219, 103)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(99, 119, 119)`,fontStyle:`italic`}},{types:[`string`,`url`],style:{color:`rgb(173, 219, 103)`}},{types:[`variable`],style:{color:`rgb(214, 222, 235)`}},{types:[`number`],style:{color:`rgb(247, 140, 108)`}},{types:[`builtin`,`char`,`constant`,`function`],style:{color:`rgb(130, 170, 255)`}},{types:[`punctuation`],style:{color:`rgb(199, 146, 234)`}},{types:[`selector`,`doctype`],style:{color:`rgb(199, 146, 234)`,fontStyle:`italic`}},{types:[`class-name`],style:{color:`rgb(255, 203, 139)`}},{types:[`tag`,`operator`,`keyword`],style:{color:`rgb(127, 219, 202)`}},{types:[`boolean`],style:{color:`rgb(255, 88, 116)`}},{types:[`property`],style:{color:`rgb(128, 203, 196)`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`}}]},A={plain:{color:`#403f53`,backgroundColor:`#FBFBFB`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`,fontStyle:`italic`}},{types:[`inserted`,`attr-name`],style:{color:`rgb(72, 118, 214)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`rgb(152, 159, 177)`,fontStyle:`italic`}},{types:[`string`,`builtin`,`char`,`constant`,`url`],style:{color:`rgb(72, 118, 214)`}},{types:[`variable`],style:{color:`rgb(201, 103, 101)`}},{types:[`number`],style:{color:`rgb(170, 9, 130)`}},{types:[`punctuation`],style:{color:`rgb(153, 76, 195)`}},{types:[`function`,`selector`,`doctype`],style:{color:`rgb(153, 76, 195)`,fontStyle:`italic`}},{types:[`class-name`],style:{color:`rgb(17, 17, 17)`}},{types:[`tag`],style:{color:`rgb(153, 76, 195)`}},{types:[`operator`,`property`,`keyword`,`namespace`],style:{color:`rgb(12, 150, 155)`}},{types:[`boolean`],style:{color:`rgb(188, 84, 84)`}}]},j={char:`#D8DEE9`,comment:`#999999`,keyword:`#c5a5c5`,primitive:`#5a9bcf`,string:`#8dc891`,variable:`#d7deea`,boolean:`#ff8b50`,punctuation:`#5FB3B3`,tag:`#fc929e`,function:`#79b6f2`,className:`#FAC863`,method:`#6699CC`,operator:`#fc929e`},M={plain:{backgroundColor:`#282c34`,color:`#ffffff`},styles:[{types:[`attr-name`],style:{color:j.keyword}},{types:[`attr-value`],style:{color:j.string}},{types:[`comment`,`block-comment`,`prolog`,`doctype`,`cdata`,`shebang`],style:{color:j.comment}},{types:[`property`,`number`,`function-name`,`constant`,`symbol`,`deleted`],style:{color:j.primitive}},{types:[`boolean`],style:{color:j.boolean}},{types:[`tag`],style:{color:j.tag}},{types:[`string`],style:{color:j.string}},{types:[`punctuation`],style:{color:j.string}},{types:[`selector`,`char`,`builtin`,`inserted`],style:{color:j.char}},{types:[`function`],style:{color:j.function}},{types:[`operator`,`entity`,`url`,`variable`],style:{color:j.variable}},{types:[`keyword`],style:{color:j.keyword}},{types:[`atrule`,`class-name`],style:{color:j.className}},{types:[`important`],style:{fontWeight:`400`}},{types:[`bold`],style:{fontWeight:`bold`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`namespace`],style:{opacity:.7}}]},N={plain:{color:`#f8f8f2`,backgroundColor:`#272822`},styles:[{types:[`changed`],style:{color:`rgb(162, 191, 252)`,fontStyle:`italic`}},{types:[`deleted`],style:{color:`#f92672`,fontStyle:`italic`}},{types:[`inserted`],style:{color:`rgb(173, 219, 103)`,fontStyle:`italic`}},{types:[`comment`],style:{color:`#8292a2`,fontStyle:`italic`}},{types:[`string`,`url`],style:{color:`#a6e22e`}},{types:[`variable`],style:{color:`#f8f8f2`}},{types:[`number`],style:{color:`#ae81ff`}},{types:[`builtin`,`char`,`constant`,`function`,`class-name`],style:{color:`#e6db74`}},{types:[`punctuation`],style:{color:`#f8f8f2`}},{types:[`selector`,`doctype`],style:{color:`#a6e22e`,fontStyle:`italic`}},{types:[`tag`,`operator`,`keyword`],style:{color:`#66d9ef`}},{types:[`boolean`],style:{color:`#ae81ff`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`,opacity:.7}},{types:[`tag`,`property`],style:{color:`#f92672`}},{types:[`attr-name`],style:{color:`#a6e22e !important`}},{types:[`doctype`],style:{color:`#8292a2`}},{types:[`rule`],style:{color:`#e6db74`}}]},P={plain:{color:`#bfc7d5`,backgroundColor:`#292d3e`},styles:[{types:[`comment`],style:{color:`rgb(105, 112, 152)`,fontStyle:`italic`}},{types:[`string`,`inserted`],style:{color:`rgb(195, 232, 141)`}},{types:[`number`],style:{color:`rgb(247, 140, 108)`}},{types:[`builtin`,`char`,`constant`,`function`],style:{color:`rgb(130, 170, 255)`}},{types:[`punctuation`,`selector`],style:{color:`rgb(199, 146, 234)`}},{types:[`variable`],style:{color:`rgb(191, 199, 213)`}},{types:[`class-name`,`attr-name`],style:{color:`rgb(255, 203, 107)`}},{types:[`tag`,`deleted`],style:{color:`rgb(255, 85, 114)`}},{types:[`operator`],style:{color:`rgb(137, 221, 255)`}},{types:[`boolean`],style:{color:`rgb(255, 88, 116)`}},{types:[`keyword`],style:{fontStyle:`italic`}},{types:[`doctype`],style:{color:`rgb(199, 146, 234)`,fontStyle:`italic`}},{types:[`namespace`],style:{color:`rgb(178, 204, 214)`}},{types:[`url`],style:{color:`rgb(221, 221, 221)`}}]},F={plain:{color:`#9EFEFF`,backgroundColor:`#2D2A55`},styles:[{types:[`changed`],style:{color:`rgb(255, 238, 128)`}},{types:[`deleted`],style:{color:`rgba(239, 83, 80, 0.56)`}},{types:[`inserted`],style:{color:`rgb(173, 219, 103)`}},{types:[`comment`],style:{color:`rgb(179, 98, 255)`,fontStyle:`italic`}},{types:[`punctuation`],style:{color:`rgb(255, 255, 255)`}},{types:[`constant`],style:{color:`rgb(255, 98, 140)`}},{types:[`string`,`url`],style:{color:`rgb(165, 255, 144)`}},{types:[`variable`],style:{color:`rgb(255, 238, 128)`}},{types:[`number`,`boolean`],style:{color:`rgb(255, 98, 140)`}},{types:[`attr-name`],style:{color:`rgb(255, 180, 84)`}},{types:[`keyword`,`operator`,`property`,`namespace`,`tag`,`selector`,`doctype`],style:{color:`rgb(255, 157, 0)`}},{types:[`builtin`,`char`,`constant`,`function`,`class-name`],style:{color:`rgb(250, 208, 0)`}}]},I={plain:{backgroundColor:`linear-gradient(to bottom, #2a2139 75%, #34294f)`,backgroundImage:`#34294f`,color:`#f92aad`,textShadow:`0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3`},styles:[{types:[`comment`,`block-comment`,`prolog`,`doctype`,`cdata`],style:{color:`#495495`,fontStyle:`italic`}},{types:[`punctuation`],style:{color:`#ccc`}},{types:[`tag`,`attr-name`,`namespace`,`number`,`unit`,`hexcode`,`deleted`],style:{color:`#e2777a`}},{types:[`property`,`selector`],style:{color:`#72f1b8`,textShadow:`0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475`}},{types:[`function-name`],style:{color:`#6196cc`}},{types:[`boolean`,`selector-id`,`function`],style:{color:`#fdfdfd`,textShadow:`0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975`}},{types:[`class-name`,`maybe-class-name`,`builtin`],style:{color:`#fff5f6`,textShadow:`0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75`}},{types:[`constant`,`symbol`],style:{color:`#f92aad`,textShadow:`0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3`}},{types:[`important`,`atrule`,`keyword`,`selector-class`],style:{color:`#f4eee4`,textShadow:`0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575`}},{types:[`string`,`char`,`attr-value`,`regex`,`variable`],style:{color:`#f87c32`}},{types:[`parameter`],style:{fontStyle:`italic`}},{types:[`entity`,`url`],style:{color:`#67cdcc`}},{types:[`operator`],style:{color:`ffffffee`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`entity`],style:{cursor:`help`}},{types:[`inserted`],style:{color:`green`}}]},L={plain:{color:`#282a2e`,backgroundColor:`#ffffff`},styles:[{types:[`comment`],style:{color:`rgb(197, 200, 198)`}},{types:[`string`,`number`,`builtin`,`variable`],style:{color:`rgb(150, 152, 150)`}},{types:[`class-name`,`function`,`tag`,`attr-name`],style:{color:`rgb(40, 42, 46)`}}]},R={plain:{color:`#9CDCFE`,backgroundColor:`#1E1E1E`},styles:[{types:[`prolog`],style:{color:`rgb(0, 0, 128)`}},{types:[`comment`],style:{color:`rgb(106, 153, 85)`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`rgb(86, 156, 214)`}},{types:[`number`,`inserted`],style:{color:`rgb(181, 206, 168)`}},{types:[`constant`],style:{color:`rgb(100, 102, 149)`}},{types:[`attr-name`,`variable`],style:{color:`rgb(156, 220, 254)`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`rgb(206, 145, 120)`}},{types:[`selector`],style:{color:`rgb(215, 186, 125)`}},{types:[`tag`],style:{color:`rgb(78, 201, 176)`}},{types:[`tag`],languages:[`markup`],style:{color:`rgb(86, 156, 214)`}},{types:[`punctuation`,`operator`],style:{color:`rgb(212, 212, 212)`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`rgb(220, 220, 170)`}},{types:[`class-name`],style:{color:`rgb(78, 201, 176)`}},{types:[`char`],style:{color:`rgb(209, 105, 105)`}}]},z={plain:{color:`#000000`,backgroundColor:`#ffffff`},styles:[{types:[`comment`],style:{color:`rgb(0, 128, 0)`}},{types:[`builtin`],style:{color:`rgb(0, 112, 193)`}},{types:[`number`,`variable`,`inserted`],style:{color:`rgb(9, 134, 88)`}},{types:[`operator`],style:{color:`rgb(0, 0, 0)`}},{types:[`constant`,`char`],style:{color:`rgb(129, 31, 63)`}},{types:[`tag`],style:{color:`rgb(128, 0, 0)`}},{types:[`attr-name`],style:{color:`rgb(255, 0, 0)`}},{types:[`deleted`,`string`],style:{color:`rgb(163, 21, 21)`}},{types:[`changed`,`punctuation`],style:{color:`rgb(4, 81, 165)`}},{types:[`function`,`keyword`],style:{color:`rgb(0, 0, 255)`}},{types:[`class-name`],style:{color:`rgb(38, 127, 153)`}}]},B={plain:{color:`#f8fafc`,backgroundColor:`#011627`},styles:[{types:[`prolog`],style:{color:`#000080`}},{types:[`comment`],style:{color:`#6A9955`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`#569CD6`}},{types:[`number`,`inserted`],style:{color:`#B5CEA8`}},{types:[`constant`],style:{color:`#f8fafc`}},{types:[`attr-name`,`variable`],style:{color:`#9CDCFE`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`#cbd5e1`}},{types:[`selector`],style:{color:`#D7BA7D`}},{types:[`tag`],style:{color:`#0ea5e9`}},{types:[`tag`],languages:[`markup`],style:{color:`#0ea5e9`}},{types:[`punctuation`,`operator`],style:{color:`#D4D4D4`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`#7dd3fc`}},{types:[`class-name`],style:{color:`#0ea5e9`}},{types:[`char`],style:{color:`#D16969`}}]},V={plain:{color:`#0f172a`,backgroundColor:`#f1f5f9`},styles:[{types:[`prolog`],style:{color:`#000080`}},{types:[`comment`],style:{color:`#6A9955`}},{types:[`builtin`,`changed`,`keyword`,`interpolation-punctuation`],style:{color:`#0c4a6e`}},{types:[`number`,`inserted`],style:{color:`#B5CEA8`}},{types:[`constant`],style:{color:`#0f172a`}},{types:[`attr-name`,`variable`],style:{color:`#0c4a6e`}},{types:[`deleted`,`string`,`attr-value`,`template-punctuation`],style:{color:`#64748b`}},{types:[`selector`],style:{color:`#D7BA7D`}},{types:[`tag`],style:{color:`#0ea5e9`}},{types:[`tag`],languages:[`markup`],style:{color:`#0ea5e9`}},{types:[`punctuation`,`operator`],style:{color:`#475569`}},{types:[`punctuation`],languages:[`markup`],style:{color:`#808080`}},{types:[`function`],style:{color:`#0e7490`}},{types:[`class-name`],style:{color:`#0ea5e9`}},{types:[`char`],style:{color:`#D16969`}}]},H={plain:{backgroundColor:`hsl(220, 13%, 18%)`,color:`hsl(220, 14%, 71%)`,textShadow:`0 1px rgba(0, 0, 0, 0.3)`},styles:[{types:[`comment`,`prolog`,`cdata`],style:{color:`hsl(220, 10%, 40%)`}},{types:[`doctype`,`punctuation`,`entity`],style:{color:`hsl(220, 14%, 71%)`}},{types:[`attr-name`,`class-name`,`maybe-class-name`,`boolean`,`constant`,`number`,`atrule`],style:{color:`hsl(29, 54%, 61%)`}},{types:[`keyword`],style:{color:`hsl(286, 60%, 67%)`}},{types:[`property`,`tag`,`symbol`,`deleted`,`important`],style:{color:`hsl(355, 65%, 65%)`}},{types:[`selector`,`string`,`char`,`builtin`,`inserted`,`regex`,`attr-value`],style:{color:`hsl(95, 38%, 62%)`}},{types:[`variable`,`operator`,`function`],style:{color:`hsl(207, 82%, 66%)`}},{types:[`url`],style:{color:`hsl(187, 47%, 55%)`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`hsl(220, 14%, 71%)`}}]},U={plain:{backgroundColor:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`},styles:[{types:[`comment`,`prolog`,`cdata`],style:{color:`hsl(230, 4%, 64%)`}},{types:[`doctype`,`punctuation`,`entity`],style:{color:`hsl(230, 8%, 24%)`}},{types:[`attr-name`,`class-name`,`boolean`,`constant`,`number`,`atrule`],style:{color:`hsl(35, 99%, 36%)`}},{types:[`keyword`],style:{color:`hsl(301, 63%, 40%)`}},{types:[`property`,`tag`,`symbol`,`deleted`,`important`],style:{color:`hsl(5, 74%, 59%)`}},{types:[`selector`,`string`,`char`,`builtin`,`inserted`,`regex`,`attr-value`,`punctuation`],style:{color:`hsl(119, 34%, 47%)`}},{types:[`variable`,`operator`,`function`],style:{color:`hsl(221, 87%, 60%)`}},{types:[`url`],style:{color:`hsl(198, 99%, 37%)`}},{types:[`deleted`],style:{textDecorationLine:`line-through`}},{types:[`inserted`],style:{textDecorationLine:`underline`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`important`,`bold`],style:{fontWeight:`bold`}},{types:[`important`],style:{color:`hsl(230, 8%, 24%)`}}]},W={plain:{color:`#ebdbb2`,backgroundColor:`#292828`},styles:[{types:[`imports`,`class-name`,`maybe-class-name`,`constant`,`doctype`,`builtin`,`function`],style:{color:`#d8a657`}},{types:[`property-access`],style:{color:`#7daea3`}},{types:[`tag`],style:{color:`#e78a4e`}},{types:[`attr-name`,`char`,`url`,`regex`],style:{color:`#a9b665`}},{types:[`attr-value`,`string`],style:{color:`#89b482`}},{types:[`comment`,`prolog`,`cdata`,`operator`,`inserted`],style:{color:`#a89984`}},{types:[`delimiter`,`boolean`,`keyword`,`selector`,`important`,`atrule`,`property`,`variable`,`deleted`],style:{color:`#ea6962`}},{types:[`entity`,`number`,`symbol`],style:{color:`#d3869b`}}]},ee={plain:{color:`#654735`,backgroundColor:`#f9f5d7`},styles:[{types:[`delimiter`,`boolean`,`keyword`,`selector`,`important`,`atrule`,`property`,`variable`,`deleted`],style:{color:`#af2528`}},{types:[`imports`,`class-name`,`maybe-class-name`,`constant`,`doctype`,`builtin`],style:{color:`#b4730e`}},{types:[`string`,`attr-value`],style:{color:`#477a5b`}},{types:[`property-access`],style:{color:`#266b79`}},{types:[`function`,`attr-name`,`char`,`url`],style:{color:`#72761e`}},{types:[`tag`],style:{color:`#b94c07`}},{types:[`comment`,`prolog`,`cdata`,`operator`,`inserted`],style:{color:`#a89984`}},{types:[`entity`,`number`,`symbol`],style:{color:`#924f79`}}]},te=e=>(0,a.useCallback)(n=>{var r=n,{className:i,style:a,line:o}=r;let s=v(_({},y(r,[`className`,`style`,`line`])),{className:t(`token-line`,i)});return typeof e==`object`&&`plain`in e&&(s.style=e.plain),typeof a==`object`&&(s.style=_(_({},s.style||{}),a)),s},[e]),ne=e=>{let n=(0,a.useCallback)(({types:t,empty:n})=>{if(e!=null)return t.length===1&&t[0]===`plain`?n==null?void 0:{display:`inline-block`}:t.length===1&&n!=null?e[t[0]]:Object.assign(n==null?{}:{display:`inline-block`},...t.map(t=>e[t]))},[e]);return(0,a.useCallback)(e=>{var r=e,{token:i,className:a,style:o}=r;let s=v(_({},y(r,[`token`,`className`,`style`])),{className:t(`token`,...i.types,a),children:i.content,style:n(i)});return o!=null&&(s.style=_(_({},s.style||{}),o)),s},[n])},re=/\r\n|\r|\n/,G=e=>{e.length===0?e.push({types:[`plain`],content:`
2
+ `,empty:!0}):e.length===1&&e[0].content===``&&(e[0].content=`
3
+ `,e[0].empty=!0)},K=(e,t)=>{let n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},q=e=>{let t=[[]],n=[e],r=[0],i=[e.length],a=0,o=0,s=[],c=[s];for(;o>-1;){for(;(a=r[o]++)<i[o];){let e,l=t[o],u=n[o][a];if(typeof u==`string`?(l=o>0?l:[`plain`],e=u):(l=K(l,u.type),u.alias&&(l=K(l,u.alias)),e=u.content),typeof e!=`string`){o++,t.push(l),n.push(e),r.push(0),i.push(e.length);continue}let d=e.split(re),f=d.length;s.push({types:l,content:d[0]});for(let e=1;e<f;e++)G(s),c.push(s=[]),s.push({types:l,content:d[e]})}o--,t.pop(),n.pop(),r.pop(),i.pop()}return G(s),c},ie=({prism:e,code:t,grammar:n,language:r})=>(0,a.useMemo)(()=>{if(n==null)return q([t]);let i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run(`before-tokenize`,i),i.tokens=e.tokenize(t,n),e.hooks.run(`after-tokenize`,i),q(i.tokens)},[t,n,r,e]),ae=(e,t)=>{let{plain:n}=e,r=e.styles.reduce((e,n)=>{let{languages:r,style:i}=n;return r&&!r.includes(t)||n.types.forEach(t=>{e[t]=_(_({},e[t]),i)}),e},{});return r.root=n,r.plain=v(_({},n),{backgroundColor:void 0}),r},oe=({children:e,language:t,code:n,theme:r,prism:i})=>{let a=t.toLowerCase(),o=ae(r,a),s=te(o),c=ne(o),l=i.languages[a];return e({tokens:ie({prism:i,language:a,code:n,grammar:l}),className:`prism-code language-${a}`,style:o==null?{}:o.root,getLineProps:s,getTokenProps:c})},J=e=>(0,a.createElement)(oe,v(_({},e),{prism:e.prism||C,theme:e.theme||R,code:e.code,language:e.language})),Y=r(),se=e=>/\.(tsx|jsx)$/.test(e)?`tsx`:/\.ts$/.test(e)?`typescript`:/\.css$/.test(e)?`css`:/\.json$/.test(e)?`json`:`tsx`,X=()=>document.documentElement.classList.contains(`dark`);function Z(){let[e,t]=(0,a.useState)(X);return(0,a.useEffect)(()=>{let e=new MutationObserver(()=>t(X()));return e.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}),()=>e.disconnect()},[]),e?le:ce}function Q(e,t){return{...e,styles:e.styles.map(e=>{let{opacity:n,...r}=e.style;return{...e,style:{...r,...r.color?{color:t[r.color]??r.color}:{}}}})}}var ce=Q(w.github,{"#999988":`#55554a`,"#e3116c":`#a8004f`,"#36acaa":`#00625e`,"#00a4db":`#005a8a`,"#d73a49":`#a51d27`,"#6f42c1":`#643ab0`}),le=Q(w.vsDark,{"rgb(0, 0, 128)":`#9da0a8`,"rgb(106, 153, 85)":`#8ab872`,"rgb(86, 156, 214)":`#7db8ea`,"rgb(100, 102, 149)":`#a3a6dc`,"#808080":`#a3a3a3`,"rgb(209, 105, 105)":`#ec8f8f`}),$=/[\s"'`<>={}(),;]/;function ue(e){let t=new Map,n=0;for(;n<e.length;){if(e[n].type!==`del`){n++;continue}let r=n;for(;r<e.length&&e[r].type===`del`;)r++;let i=r;for(;i<e.length&&e[i].type===`add`;)i++;if(r-n===i-r)for(let i=0;i<r-n;i++){let a=e[n+i].text,o=e[r+i].text,s=0;for(;s<a.length&&s<o.length&&a[s]===o[s];)s++;let c=0;for(;c<a.length-s&&c<o.length-s&&a[a.length-1-c]===o[o.length-1-c];)c++;for(;s>0&&!$.test(a[s-1]);)s--;let l=a.length-c,u=o.length-c;for(;l<a.length&&!$.test(a[l]);)l++;for(;u<o.length&&!$.test(o[u]);)u++;Math.max(l-s,u-s)<Math.max(a.length,o.length)*.7&&(l>s&&t.set(n+i,[s,l]),u>s&&t.set(r+i,[s,u]))}n=i}return t}function de(e,t,n,r){let a=[],o=0;return e.forEach((e,s)=>{let{style:c,className:l}=t({token:e}),u=e.content,d=o;o+=u.length;let f=[];if(!n||n[1]<=d||n[0]>=o)f.push([u,!1]);else{let e=Math.max(0,n[0]-d),t=Math.min(u.length,n[1]-d);e>0&&f.push([u.slice(0,e),!1]),f.push([u.slice(e,t),!0]),t<u.length&&f.push([u.slice(t),!1])}for(let[e,[t,n]]of f.entries())t&&a.push((0,Y.jsx)(`span`,{className:i(l,n&&r),style:{color:c?.color},children:t},`${s}-${e}`))}),a}function fe({file:e}){let t=Z();return(0,Y.jsx)(`div`,{className:`overflow-hidden rounded-[8px] bg-sunken ring-1 ring-inset ring-line`,children:e.hunks.map((n,r)=>{let a=ue(n.lines);return(0,Y.jsx)(`div`,{className:i(`py-1`,r>0&&`border-t border-dashed border-line`),children:n.lines.map((n,r)=>(0,Y.jsxs)(`div`,{className:i(`grid grid-cols-[30px_14px_1fr] font-mono text-[11.5px] leading-[18px]`,n.type===`add`&&`bg-ok-soft`,n.type===`del`&&`bg-bad-soft`),children:[(0,Y.jsx)(`span`,{className:`select-none pr-1.5 text-right text-fg-3`,children:n.type===`del`?n.oldNo:n.newNo}),(0,Y.jsx)(`span`,{className:i(`select-none text-center`,n.type===`add`?`text-ok`:n.type===`del`?`text-bad`:`text-transparent`),children:n.type===`add`?`+`:n.type===`del`?`−`:` `}),(0,Y.jsx)(J,{code:n.text||` `,language:se(e.path),theme:t,children:({tokens:e,getTokenProps:t})=>(0,Y.jsx)(`span`,{className:`whitespace-pre-wrap break-all pr-2`,children:de(e[0]??[],t,a.get(r),n.type===`add`?`rounded-[3px] bg-ok/12 underline decoration-ok/60 underline-offset-2`:`rounded-[3px] bg-bad/12 underline decoration-bad/60 underline-offset-2`)})})]},r))},r)})})}function pe({code:e,language:t=`tsx`,focus:n,start:r=1}){let a=Z();return(0,Y.jsx)(J,{code:e.replace(/\n$/,``),language:t,theme:a,children:({tokens:e,getLineProps:t,getTokenProps:a})=>(0,Y.jsx)(`pre`,{tabIndex:0,role:`region`,"aria-label":`Source code`,className:`overflow-x-auto rounded-[8px] bg-sunken py-2 font-mono text-[11.5px] leading-[19px] ring-1 ring-inset ring-line`,children:e.map((e,o)=>{let s=r+o,{style:c,...l}=t({line:e});return(0,Y.jsxs)(`div`,{...l,className:i(`grid grid-cols-[34px_1fr] pr-3`,s===n&&`bg-human-soft shadow-[inset_2px_0_0_var(--human)]`),children:[(0,Y.jsx)(`span`,{className:`select-none pr-2.5 text-right text-fg-3`,children:s}),(0,Y.jsx)(`span`,{className:`whitespace-pre`,children:e.map((e,t)=>{let{style:n,...r}=a({token:e});return(0,Y.jsx)(`span`,{...r,style:{color:n?.color}},t)})})]},o)})})})}export{pe as CodeBlock,fe as DiffView};
@@ -0,0 +1 @@
1
+ import{i as e,o as t,r as n}from"./cn-Wq33h1G4.js";import{C as r,E as i,G as a,R as o,T as s,Y as c,d as l,f as u,p as d,r as f,w as p}from"./confirm-D1U-bFIL.js";import{$ as m,At as h,K as g,Ot as _,Q as v,a as y,at as b,i as ee,it as x,jt as S,nt as C,q as w,rt as T}from"./button-B2NFEpCs.js";import{n as te,t as E}from"./camera-BD9K1f5I.js";import{t as D}from"./footprints-DiYtIryA.js";import{$ as O,A as ne,C as k,F as A,G as j,I as M,L as re,N as ie,O as ae,R as N,S as oe,V as se,Z as ce,at as le,b as ue,ct as de,i as P,j as fe,k as pe,nt as me,ot as he,r as ge,st as _e,t as ve,tt as ye,y as F,z as be}from"./index-DUAtV_Av.js";var I={name:`eraser`,size:24,node:[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]};I.node;var xe=y(I),L={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};L.node;var Se=y(L),R={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};R.node;var Ce=y(R),z={name:`send-horizontal`,size:24,node:[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]],aliases:[`send-horizonal`]};z.node;var we=y(z),B={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};B.node;var Te=y(B),V=1,Ee=.9,De=.8,Oe=.17,ke=.1,Ae=.999,je=.9999,Me=.99,Ne=/[\\\/_+.#"@\[\(\{&]/,Pe=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,Ie=/[\s-]/g;function Le(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?V:Me;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Le(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=V:Ne.test(e.charAt(l-1))?(d*=De,p=e.slice(i,l-1).match(Pe),p&&i>0&&(d*=Ae**+p.length)):Fe.test(e.charAt(l-1))?(d*=Ee,m=e.slice(i,l-1).match(Ie),m&&i>0&&(d*=Ae**+m.length)):(d*=Oe,i>0&&(d*=Ae**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=je)),(d<ke&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Le(e,t,n,r,l+1,a+2,o),f*ke>d&&(d=f*ke)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Re(e){return e.toLowerCase().replace(Ie,` `)}function ze(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Le(e,t,Re(e),Re(t),0,0,{})}var H=t(e(),1),U=`[cmdk-group=""]`,Be=`[cmdk-group-items=""]`,Ve=`[cmdk-group-heading=""]`,He=`[cmdk-item=""]`,Ue=`${He}:not([aria-disabled="true"])`,We=`cmdk-item-select`,W=`data-value`,Ge=(e,t,n)=>ze(e,t,n),Ke=H.createContext(void 0),G=()=>H.useContext(Ke),qe=H.createContext(void 0),Je=()=>H.useContext(qe),Ye=H.createContext(void 0),Xe=H.forwardRef((e,t)=>{let n=J(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=J(()=>new Set),i=J(()=>new Map),s=J(()=>new Map),c=J(()=>new Set),l=st(e),{label:u,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,b=o(),ee=o(),x=o(),S=H.useRef(null),C=lt();q(()=>{if(f!==void 0){let e=f.trim();n.current.value=e,w.emit()}},[f]),q(()=>{C(6,ne)},[]);let w=H.useMemo(()=>({subscribe:e=>(c.current.add(e),()=>c.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),C(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(b))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=k()?.id,w.emit()}),r||C(5,ne),l.current?.value!==void 0){let e=t??``;(o=(a=l.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{c.current.forEach(e=>e())}}),[]),T=H.useMemo(()=>({value:(e,t,r)=>{t!==s.current.get(e)?.value&&(s.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,te(t,r)),C(2,()=>{E(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{O(),E(),n.current.value||D(),w.emit()}),()=>{s.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=k();C(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{s.current.delete(e),i.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e[`aria-label`],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:x,labelId:ee,listInnerRef:S}),[]);function te(e,t){let r=l.current?.filter??Ge;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||l.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;A().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Be);t?t.appendChild(e.parentElement===t?e:e.closest(`${Be} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Be} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${U}[${W}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=A().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(W);w.setState(`value`,e||void 0)}function O(){if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=te(s.current.get(t)?.value??``,s.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function ne(){var e;let t=k();t&&(t.parentElement?.firstChild===t&&((e=t.closest(U)?.querySelector(Ve))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function k(){return S.current?.querySelector(`${He}[aria-selected="true"]`)}function A(){return Array.from(S.current?.querySelectorAll(Ue)||[])}function j(e){let t=A()[e];t&&w.setState(`value`,t.getAttribute(W))}function M(e){var t;let n=k(),r=A(),i=r.findIndex(e=>e===n),a=r[i+e];(t=l.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(W))}function re(e){let t=k()?.closest(U),n;for(;t&&!n;)t=e>0?at(t,U):ot(t,U),n=t?.querySelector(Ue);n?w.setState(`value`,n.getAttribute(W)):M(e)}let ie=()=>j(A().length-1),ae=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?re(1):M(1)},N=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?re(-1):M(-1)};return H.createElement(a.div,{ref:t,tabIndex:-1,...y,"cmdk-root":``,onKeyDown:e=>{var t;(t=y.onKeyDown)==null||t.call(y,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:v&&e.ctrlKey&&ae(e);break;case`ArrowDown`:ae(e);break;case`p`:case`k`:v&&e.ctrlKey&&N(e);break;case`ArrowUp`:N(e);break;case`Home`:e.preventDefault(),j(0);break;case`End`:e.preventDefault(),ie();break;case`Enter`:{e.preventDefault();let t=k();if(t){let e=new Event(We);t.dispatchEvent(e)}}}}},H.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:dt},u),X(e,e=>H.createElement(qe.Provider,{value:w},H.createElement(Ke.Provider,{value:T},e))))}),Ze=H.forwardRef((e,t)=>{let n=o(),r=H.useRef(null),i=H.useContext(Ye),s=G(),l=st(e),u=l.current?.forceMount??i?.forceMount;q(()=>{if(!u)return s.item(n,i?.id)},[u]);let d=ct(n,r,[e.value,e.children,r],e.keywords),f=Je(),p=Y(e=>e.value&&e.value===d.current),m=Y(e=>u||s.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);H.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(We,h),()=>t.removeEventListener(We,h)},[m,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=l.current).onSelect)==null||t.call(e,d.current)}function g(){f.setState(`value`,d.current,!0)}if(!m)return null;let{disabled:_,value:v,onSelect:y,forceMount:b,keywords:ee,...x}=e;return H.createElement(a.div,{ref:c(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||s.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),Qe=H.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...s}=e,l=o(),u=H.useRef(null),d=H.useRef(null),f=o(),p=G(),m=Y(e=>i||p.filter()===!1?!0:!e.search||e.filtered.groups.has(l));q(()=>p.group(l),[]),ct(l,u,[e.value,e.heading,d]);let h=H.useMemo(()=>({id:l,forceMount:i}),[i]);return H.createElement(a.div,{ref:c(u,t),...s,"cmdk-group":``,role:`presentation`,hidden:!m||void 0},n&&H.createElement(`div`,{ref:d,"cmdk-group-heading":``,"aria-hidden":!0,id:f},n),X(e,e=>H.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?f:void 0},H.createElement(Ye.Provider,{value:h},e))))}),$e=H.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=H.useRef(null),o=Y(e=>!e.search);return!n&&!o?null:H.createElement(a.div,{ref:c(i,t),...r,"cmdk-separator":``,role:`separator`})}),et=H.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=Je(),s=Y(e=>e.search),c=Y(e=>e.selectedItemId),l=G();return H.useEffect(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),H.createElement(a.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:i?e.value:s,onChange:e=>{i||o.setState(`search`,e.target.value),n?.(e.target.value)}})}),tt=H.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,o=H.useRef(null),s=H.useRef(null),l=Y(e=>e.selectedItemId),u=G();return H.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),H.createElement(a.div,{ref:c(o,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:u.listId},X(e,e=>H.createElement(`div`,{ref:c(s,u.listInnerRef),"cmdk-list-sizer":``},e)))}),nt=H.forwardRef((e,t)=>{let{open:n,onOpenChange:a,overlayClassName:o,contentClassName:c,container:l,...u}=e;return H.createElement(r,{open:n,onOpenChange:a},H.createElement(i,{container:l},H.createElement(s,{"cmdk-overlay":``,className:o}),H.createElement(p,{"aria-label":e.label,"cmdk-dialog":``,className:c},H.createElement(Xe,{ref:t,...u}))))}),rt=H.forwardRef((e,t)=>Y(e=>e.filtered.count===0)?H.createElement(a.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),it=H.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...o}=e;return H.createElement(a.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},X(e,e=>H.createElement(`div`,{"aria-hidden":!0},e)))}),K=Object.assign(Xe,{List:tt,Item:Ze,Input:et,Group:Qe,Separator:$e,Dialog:nt,Empty:rt,Loading:it});function at(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ot(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function st(e){let t=H.useRef(e);return q(()=>{t.current=e}),t}var q=typeof window>`u`?H.useEffect:H.useLayoutEffect;function J(e){let t=H.useRef();return t.current===void 0&&(t.current=e()),t}function Y(e){let t=Je(),n=()=>e(t.snapshot());return H.useSyncExternalStore(t.subscribe,n,n)}function ct(e,t,n,r=[]){let i=H.useRef(),a=G();return q(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(W,s),i.current=s}),i}var lt=()=>{let[e,t]=H.useState(),n=J(()=>new Map);return q(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function ut(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function X({asChild:e,children:t},n){return e&&H.isValidElement(t)?H.cloneElement(ut(t),{ref:t.ref},n(t.props.children)):n(t)}var dt={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Z=n();function Q({icon:e,children:t,onSelect:n,kbd:r,value:i,keywords:a}){return(0,Z.jsxs)(K.Item,{value:i,keywords:a,onSelect:n,"data-hand":!0,className:`flex h-9 cursor-default items-center gap-3 rounded-[8px] px-2.5 text-[13px] text-fg-2 data-[selected=true]:bg-hover data-[selected=true]:text-fg [&_svg]:size-[15px] [&_svg]:text-fg-3`,children:[e,(0,Z.jsx)(`span`,{className:`flex-1 truncate`,children:t}),r&&(0,Z.jsx)(F,{children:r})]})}function $({heading:e,children:t}){return(0,Z.jsx)(K.Group,{heading:e,className:`px-1.5 pb-1 [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:pt-2.5 [&_[cmdk-group-heading]]:text-[11.5px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-fg-3`,children:t})}var ft=e=>T.getState().setUi({panelOpen:!0,panelTab:e}),pt=(e,t,n)=>{let r=Ge(e,t,n);return r<.2?0:r};function mt(){let e=m(e=>e.overlay===`palette`),t=m(e=>e.changes.some(e=>e.status===`preview`)),n=m(e=>!!e.selection),r=m(e=>!!e.status?.app),i=m(e=>e.status?.app?.id??null),a=m(e=>e.camera.status),o=C(),s=m(e=>e.recorder),c=b(e=>e.live.status===`recording`),p=S(e=>e.apps),y=T(e=>e.theme),I=w(),[L,R]=(0,H.useState)(``),z=()=>{v({overlay:null}),R(``)},B=e=>()=>{z(),setTimeout(e,0)},V=L.trim(),Ee=B(()=>void g.handleUtterance(V,null,`typed`));return(0,Z.jsx)(f,{open:e,onOpenChange:e=>e?v({overlay:`palette`}):z(),title:`Command palette`,position:`top`,focusFirst:!0,className:`w-[min(600px,calc(100vw-32px))]`,children:(0,Z.jsxs)(K,{loop:!0,filter:pt,className:`flex min-h-0 flex-col`,onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),V&&Ee())},children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2.5 border-b border-line px-3.5`,children:[(0,Z.jsx)(fe,{className:`size-4 text-fg-3`}),(0,Z.jsx)(K.Input,{value:L,onValueChange:R,autoFocus:!0,placeholder:`Search commands…`,className:`h-12 flex-1 bg-transparent text-[14px] text-fg outline-none placeholder:text-fg-3`}),(0,Z.jsx)(F,{children:`Esc`})]}),(0,Z.jsxs)(K.List,{className:`max-h-[380px] overflow-y-auto py-1`,children:[(0,Z.jsxs)(K.Empty,{className:`px-4 py-6 text-center text-[12.5px] text-fg-3`,children:[`No command matches “`,V,`”.`]}),t&&(0,Z.jsxs)($,{heading:`Preview`,children:[(0,Z.jsx)(Q,{icon:(0,Z.jsx)(ee,{}),kbd:`↵`,onSelect:B(()=>void g.keep(`palette`)),keywords:[`keep`,`accept`],children:`Keep the preview`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(k,{}),kbd:_(`mod+z`),onSelect:B(()=>void g.undo(`palette`)),keywords:[`undo`,`revert`],children:`Undo the preview`})]}),r&&(0,Z.jsxs)($,{heading:`Modes`,children:[(0,Z.jsxs)(Q,{icon:(0,Z.jsx)(pe,{}),kbd:`E`,onSelect:B(()=>g.setMode(`edit`)),children:[P.edit,`: point and change`]}),(0,Z.jsxs)(Q,{icon:(0,Z.jsx)(re,{}),kbd:`U`,onSelect:B(()=>g.setMode(`use`)),children:[P.use,`: click through the app`]}),(0,Z.jsxs)(Q,{icon:(0,Z.jsx)(d,{}),kbd:`R`,onSelect:B(()=>g.setMode(`record`)),keywords:[`record a bug`,`playwright`,`check`],children:[P.record,`: narrate a bug, get a Playwright test`]})]}),r&&(0,Z.jsxs)($,{heading:`Test and review`,children:[c?(0,Z.jsx)(Q,{icon:(0,Z.jsx)(ae,{}),onSelect:B(()=>void x.stop()),keywords:[`record session`,`test session`],children:`Stop recording and write the report`}):(0,Z.jsx)(Q,{icon:(0,Z.jsx)(me,{}),onSelect:B(()=>b.setState({setup:!0})),keywords:[`test session`,`report`,`recording`],children:`Record session: use the app, get a report`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(l,{}),onSelect:B(()=>(ft(`experts`),void ue.run())),keywords:[`experts`,`audit`,`accessibility`,`seo`,`ux`,`content`],children:`Review this page with the Experts`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(oe,{}),onSelect:B(()=>(ft(`sessions`),setTimeout(()=>document.querySelector(`[data-autopilot-goal]`)?.focus(),250))),keywords:[`autopilot`,`explore`,`ai tester`],children:`Autopilot: let the AI test your app…`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ce,{}),onSelect:B(()=>ft(`sessions`)),keywords:[`reports`,`recordings`],children:`Sessions and their reports`}),(s.expectations.length>0||s.spec)&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Q,{icon:(0,Z.jsx)(oe,{}),onSelect:B(()=>void g.generateTest()),children:`Generate test`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(A,{}),onSelect:B(()=>void g.runTest()),children:`Run test`}),s.run?.status===`failed`&&(0,Z.jsxs)(Q,{icon:(0,Z.jsx)(l,{}),onSelect:B(()=>void g.fix()),children:[`Fix with `,I]})]})]}),n&&(0,Z.jsxs)($,{heading:`Selection`,children:[(0,Z.jsx)(Q,{icon:(0,Z.jsx)(le,{}),kbd:`↑`,onSelect:B(()=>void g.step(`parent`)),children:`Select what contains it`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(_e,{}),kbd:`↓`,onSelect:B(()=>void g.step(`child`)),children:`Select inside it`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(he,{}),kbd:`→`,onSelect:B(()=>void g.step(`next`)),children:`Select the next one`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(te,{}),kbd:`←`,onSelect:B(()=>void g.step(`prev`)),children:`Select the previous one`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(O,{}),kbd:`O`,onSelect:B(()=>void g.openInEditor()),children:`Open in editor`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(xe,{}),kbd:`Esc`,onSelect:B(()=>g.clearTargets()),children:`Clear the selection`})]}),(0,Z.jsxs)($,{heading:o?`Hand and voice`:`Voice`,children:[o&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Q,{icon:(0,Z.jsx)(E,{}),kbd:`C`,onSelect:B(()=>g.toggleCamera()),children:a===`on`?`Turn off hand control`:`Turn on hand control`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(ce,{}),onSelect:B(()=>v({overlay:`calibrate`,calibrateReturn:null})),children:`Calibrate reach`})]}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(be,{}),kbd:`Space`,onSelect:B(()=>g.startTalk(`toggle`)),children:`Start talking (hands-free)`})]}),(0,Z.jsxs)($,{heading:`Apps`,children:[r&&(0,Z.jsx)(Q,{icon:(0,Z.jsx)(ie,{}),onSelect:B(()=>g.reloadApp()),children:`Reload the app`}),p.filter(e=>e.id!==i).map(e=>(0,Z.jsxs)(Q,{value:`switch ${e.id} ${e.name}`,icon:(0,Z.jsx)(de,{}),onSelect:B(()=>void h.open(e.id)),keywords:[`switch`,`open`,e.name],children:[`Switch to `,e.name]},e.id)),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(u,{}),onSelect:B(()=>h.show(`folder`)),keywords:[`add`,`folder`,`address`,`github`],children:`Link an app…`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(se,{}),onSelect:B(()=>h.show()),children:`All apps`}),r&&Object.keys(ge).map(e=>(0,Z.jsxs)(Q,{icon:(0,Z.jsx)(N,{}),onSelect:B(()=>T.getState().setUi({device:e})),children:[`Viewport: `,ge[e].label]},e))]}),(0,Z.jsxs)($,{heading:`Studio`,children:[(0,Z.jsx)(Q,{icon:(0,Z.jsx)(M,{}),kbd:`\\`,onSelect:B(()=>T.getState().setUi({panelOpen:!T.getState().ui.panelOpen})),children:`Toggle panel`}),(0,Z.jsx)(Q,{icon:y===`light`?(0,Z.jsx)(Se,{}):(0,Z.jsx)(Te,{}),onSelect:B(()=>T.getState().set({theme:y===`light`?`dark`:`light`})),children:y===`light`?`Dark theme`:`Light theme`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(ne,{}),onSelect:B(()=>v({overlay:`settings`,settingsTab:`general`})),keywords:[`preferences`,`options`],children:`Settings`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(l,{}),onSelect:B(()=>v({overlay:`settings`,settingsTab:`ai`})),keywords:[`connect`,`api key`,`model`,`claude`,`chatgpt`,`gemini`],children:`Settings: connect an AI`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(j,{}),onSelect:B(()=>v({overlay:`settings`,settingsTab:`usage`})),keywords:[`cost`,`budget`,`spend`,`money`],children:`Settings: usage and budget`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(ye,{}),kbd:`?`,onSelect:B(()=>v({overlay:`help`})),keywords:[`help`,`keys`],children:o?`Gestures, phrases and shortcuts`:`Phrases and shortcuts`}),(0,Z.jsx)(Q,{icon:(0,Z.jsx)(D,{}),onSelect:B(()=>ve.start()),keywords:[`tour`,`intro`,`getting started`,`onboarding`,`learn`],children:`Take the quick-start tour`})]})]}),V&&(0,Z.jsxs)(`button`,{"data-hand":!0,onClick:Ee,className:`flex h-11 shrink-0 items-center gap-3 border-t border-line px-4 text-start text-[13px] text-fg-2 hover:bg-hover hover:text-fg [&_svg]:size-[15px]`,"data-send-request":!0,children:[(0,Z.jsx)(we,{className:`shrink-0 text-ai-fg`}),(0,Z.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[`Send as a request: “`,V,`” `,(0,Z.jsxs)(`span`,{className:`text-fg-3`,children:[`· a quick edit, or `,I===`AI`?`the AI`:I]})]}),(0,Z.jsx)(F,{children:_(`mod+enter`)})]})]})})}export{mt as CommandPalette};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./cn-Wq33h1G4.js";import{r as n}from"./confirm-D1U-bFIL.js";import{$ as r,Q as i,n as a,nt as o,r as s,t as c}from"./button-B2NFEpCs.js";import{t as l}from"./footprints-DiYtIryA.js";import{D as u,E as d,H as f,U as p,W as m,c as h,l as g,s as _,t as v,y}from"./index-DUAtV_Av.js";import{shortcutsFor as b}from"./SettingsDialog-VrACcdUX.js";var x=e(),S=[[(0,x.jsx)(g,{}),`Point`,`Move the cursor with your index finger.`],[(0,x.jsx)(h,{}),`Pinch`,`Edit mode: select what is highlighted; pinch it again to deselect; pinch empty space to clear. Use and Write test: click.`],[(0,x.jsx)(h,{}),`Pinch and hold`,`Add what is highlighted to the selection (or take it out), for “make this look like that”.`],[(0,x.jsx)(p,{}),`Pinch and move`,`Scroll the app like a touch screen. The selection stays as it was.`],[(0,x.jsx)(_,{}),`Peace sign`,`Start talking. Pause to send.`],[(0,x.jsx)(d,{}),`Thumb up`,`Keep the preview.`],[(0,x.jsx)(u,{}),`Thumb down`,`Undo the preview.`],[(0,x.jsx)(f,{}),`Open palm, held`,`Stop: cancel listening or a request, clear the selection.`],[(0,x.jsx)(m,{}),`Fist`,`Freeze the cursor while you reposition your hand.`]],C=[[`make this bigger`,`Steps the size or padding prop up.`],[`make this look like that`,`Copies the look of a second element. Point at each as you say it.`],[`rename this to Pay now`,`Changes the text.`],[`move this above that`,`Reorders elements.`],[`remove this`,`Deletes the element (it is a preview, so you can undo).`],[`why is the total wrong?`,`The AI answers with file and line references.`],[`the card · the button inside`,`Selects the nearest one around or inside what is selected.`],[`go up · go inside · next · previous`,`Moves the selection. Also ↑ ↓ ← →.`],[`add this · deselect`,`Adds what you point at to the selection; clears it.`],[`keep it · undo · cancel`,`Decide on the preview.`],[`this should show $80.80`,`In Write test mode: adds a check to the test.`],[`generate test · run test · fix it`,`Turn the narration into a Playwright test, then fix the bug.`],[`mark this`,`While recording a session: marks the moment for the report.`]];function w(){let e=r(e=>e.overlay===`help`),u=r(e=>!!e.status?.app),d=o(),f=b(d);return(0,x.jsxs)(n,{open:e,onOpenChange:e=>i({overlay:e?`help`:null}),title:d?`Gestures, phrases and shortcuts`:`Phrases and shortcuts`,className:d?`w-[min(980px,calc(100vw-32px))]`:`w-[min(720px,calc(100vw-32px))]`,children:[(0,x.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-5 py-3.5`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{className:`text-[15px] font-semibold text-fg`,children:`Point, speak, build`}),(0,x.jsx)(`p`,{className:`text-[12.5px] text-fg-3`,children:`“This” and “that” mean whatever you point at while you say them.`})]}),(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[!u&&(0,x.jsx)(`span`,{className:`text-[12px] text-fg-3`,children:`Starts once an app is open`}),(0,x.jsx)(c,{icon:(0,x.jsx)(l,{}),onClick:()=>{i({overlay:null}),v.start()},"data-take-tour":!0,children:`Take the tour`}),(0,x.jsx)(a,{onClick:()=>i({overlay:null}),"aria-label":`Close`,children:(0,x.jsx)(s,{})})]})]}),(0,x.jsxs)(`div`,{className:t(`grid min-h-0 flex-1 grid-cols-1 gap-6 overflow-y-auto p-5`,d?`md:grid-cols-3`:`md:grid-cols-2`),children:[d&&(0,x.jsxs)(`section`,{children:[(0,x.jsx)(`h3`,{className:`mb-2.5 text-[12px] font-medium text-fg-3`,children:`Hand`}),(0,x.jsx)(`ul`,{className:`space-y-2.5`,children:S.map(([e,t,n])=>(0,x.jsxs)(`li`,{className:`flex gap-3`,children:[(0,x.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-[8px] bg-human-soft text-human-fg [&_svg]:size-[17px]`,children:e}),(0,x.jsxs)(`span`,{children:[(0,x.jsx)(`span`,{className:`block text-[12.5px] font-medium text-fg`,children:t}),(0,x.jsx)(`span`,{className:`block text-[12px] leading-snug text-fg-3`,children:n})]})]},t))})]}),(0,x.jsxs)(`section`,{children:[(0,x.jsx)(`h3`,{className:`mb-2.5 text-[12px] font-medium text-fg-3`,children:`Say`}),(0,x.jsx)(`ul`,{className:`space-y-2.5`,children:C.map(([e,t])=>(0,x.jsxs)(`li`,{children:[(0,x.jsxs)(`span`,{className:`block text-[12.5px] font-medium text-human-fg`,children:[`“`,e,`”`]}),(0,x.jsx)(`span`,{className:`block text-[12px] leading-snug text-fg-3`,children:t})]},e))})]}),(0,x.jsxs)(`section`,{children:[(0,x.jsx)(`h3`,{className:`mb-2.5 text-[12px] font-medium text-fg-3`,children:`Keyboard`}),(0,x.jsx)(`ul`,{className:`space-y-1.5`,children:f.map(([e,t])=>(0,x.jsxs)(`li`,{className:`flex items-center justify-between gap-3`,children:[(0,x.jsx)(`span`,{className:`text-[12px] text-fg-2`,children:e}),(0,x.jsx)(`span`,{className:`flex shrink-0 gap-1`,children:t.map((e,t)=>e===`–`?(0,x.jsx)(`span`,{className:`text-fg-3`,children:`–`},t):(0,x.jsx)(y,{children:e},t))})]},e))})]})]})]})}export{w as HelpDialog};
@@ -0,0 +1,4 @@
1
+ import{i as e,o as t,r as n,t as r}from"./cn-Wq33h1G4.js";import{d as i,f as a,i as o,l as s,m as c,n as l,p as u,u as d}from"./confirm-D1U-bFIL.js";import{$ as f,Dt as p,K as m,Tt as h,Y as g,a as _,at as v,gt as y,i as b,it as x,n as S,o as ee,q as C,r as w,rt as T,s as te,t as E}from"./button-B2NFEpCs.js";import{n as D,t as O}from"./camera-BD9K1f5I.js";import{n as k,t as A}from"./refresh-cw-Dobx2YmO.js";import{$ as ne,B as re,E as ie,F as j,K as ae,L as oe,M as se,P as ce,S as le,St as ue,T as de,X as fe,Y as pe,_t as me,bt as he,d as ge,dt as _e,et as ve,f as ye,ft as be,gt as xe,h as Se,ht as Ce,it as we,lt as Te,m as Ee,mt as De,p as Oe,q as ke,rt as Ae,tt as je,u as Me,ut as M,vt as Ne,w as N,x as Pe,xt as Fe,yt as Ie}from"./index-DUAtV_Av.js";var Le={name:`bug`,size:24,node:[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]};Le.node;var Re=_(Le),ze={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};ze.node;var Be=_(ze),Ve={name:`clipboard-copy`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2`,key:`4jdomd`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v4`,key:`3hqy98`}],[`path`,{d:`M21 14H11`,key:`1bme5i`}],[`path`,{d:`m15 10-4 4 4 4`,key:`5dvupr`}]]};Ve.node;var He=_(Ve),Ue={name:`earth`,size:24,node:[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`globe-2`]};Ue.node;var We=_(Ue),P={name:`file-headphone`,size:24,node:[[`path`,{d:`M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343`,key:`1vfytu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0`,key:`1etmh7`}]],aliases:[`file-audio`,`file-audio-2`]};P.node;var Ge=_(P),F={name:`image-off`,size:24,node:[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]};F.node;var Ke=_(F),I={name:`languages`,size:24,node:[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]};I.node;var L=_(I),R={name:`lightbulb`,size:24,node:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]};R.node;var z=_(R),B={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};B.node;var V=_(B),H={name:`list-restart`,size:24,node:[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M7 12H3`,key:`13ou7f`}],[`path`,{d:`M7 19H3`,key:`wbqt3n`}],[`path`,{d:`M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14`,key:`qth677`}],[`path`,{d:`M11 10v4h4`,key:`172dkj`}]]};H.node;var U=_(H),W={name:`navigation`,size:24,node:[[`polygon`,{points:`3 11 22 2 13 21 11 13 3 11`,key:`1ltx0t`}]]};W.node;var qe=_(W),Je={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Je.node;var Ye=_(Je),Xe={name:`quote`,size:24,node:[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]};Xe.node;var Ze=_(Xe),Qe={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Qe.node;var $e=_(Qe),et={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};et.node;var tt=_(et),G=t(e(),1),K=n(),q={critical:{bar:`bg-bad`,chip:`bg-bad text-inverse`},high:{bar:`bg-[#f76b15]`,chip:`bg-[#f76b15]/15 text-[#a94405] dark:text-[#ff8a3d]`},medium:{bar:`bg-warn/70`,chip:`bg-warn-soft text-warn`},low:{bar:`bg-fg-3/50`,chip:`bg-active text-fg-2`}},J={fixed:{chip:`bg-ok-soft text-ok`,bar:`bg-ok`,icon:Ae},still:{chip:`bg-bad-soft text-bad`,bar:`bg-bad`,icon:ve},unknown:{chip:`bg-active text-fg-2`,bar:`bg-fg-3/40`,icon:je}};function nt({r:e,t,lang:n}){let i=J[e.verdict],a=i.icon;return(0,K.jsxs)(`span`,{className:r(`inline-flex items-center gap-1 rounded-[5px] px-1.5 py-px text-[10.5px] font-semibold`,i.chip),title:n===`ar`?e.whyAr:e.why,"data-verdict":e.verdict,children:[(0,K.jsx)(a,{className:`size-3`}),t.verdicts[e.verdict]]})}function rt(e,t,n){let r=n.find(e=>e.shot)?.shot;if(r)return r;let i=t.issues.find(t=>e.evidence.includes(t.id)||t.evidence.some(t=>e.evidence.includes(t)));if(i?.shot)return i.shot;let a=n[0]?.t;if(a==null||!t.shots.length)return null;let o=t.shots[0];for(let e of t.shots)Math.abs(e.t-a-500)<Math.abs(o.t-a-500)&&(o=e);return Math.abs(o.t-a)<1e4?o.name:null}function it(e,t,n){let r=n.find(e=>e.kind===`speech`),i=e=>e.replace(/[^\p{L}\p{N}]+/gu,` `).trim().toLowerCase();if(e.quote){let n=i(e.quote).slice(0,40),r=t.transcript.find(e=>i(e.text).includes(n)||n.includes(i(e.text).slice(0,30)));if(r)return r}return r?t.transcript.find(e=>e.start===r.t)??null:null}function at(e){let t=e.split(`
2
+ `),n=e=>/^\s*at\s/.test(e);return{prose:t.filter(e=>!n(e)).join(` `).trim(),frames:t.filter(n).map(e=>e.trim())}}function ot({text:e}){let{prose:t,frames:n}=at(e);return(0,K.jsxs)(K.Fragment,{children:[t&&(0,K.jsx)(`p`,{className:`text-fg`,children:t}),n.length>0&&(0,K.jsx)(`pre`,{tabIndex:0,role:`region`,"aria-label":`Stack trace`,className:`overflow-x-auto rounded-[8px] bg-sunken px-3 py-2 font-mono text-[11.5px] leading-relaxed text-fg-2 ring-1 ring-inset ring-line`,dir:`ltr`,children:n.join(`
3
+ `)})]})}function st({f:e,a:t,t:n,act:a,index:o,start:s,verdict:l,lang:d}){let[f,p]=(0,G.useState)(o<3),m=C(),h=y(e,t),g=rt(e,t,h),_=it(e,t,h),v=h[0]?.t,b=q[e.severity];return(0,K.jsxs)(`article`,{className:`group relative overflow-hidden rounded-[14px] bg-raised ring-1 ring-inset ring-line transition-shadow hover:ring-line-strong`,"data-finding":e.id,"data-verdict":l?.verdict,children:[(0,K.jsx)(`span`,{className:r(`absolute inset-y-0 start-0 w-[3px]`,b.bar)}),(0,K.jsxs)(`button`,{"data-hand":!0,onClick:()=>p(!f),className:`flex w-full items-start gap-3 px-4 pb-3 pt-3.5 text-start`,children:[(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[l&&(0,K.jsx)(nt,{r:l,t:n,lang:d}),(0,K.jsx)(`span`,{className:r(`rounded-[5px] px-1.5 py-px text-[10.5px] font-semibold uppercase tracking-[0.04em]`,b.chip),children:n.severity[e.severity]}),(0,K.jsx)(`span`,{className:`rounded-[5px] px-1.5 py-px text-[10.5px] font-medium text-fg-3 ring-1 ring-inset ring-line`,children:n.category[e.category]}),v!=null&&(0,K.jsx)(`span`,{className:`tabular text-[11px] text-fg-3`,children:Y(v-s)}),e.confidence!==`high`&&(0,K.jsxs)(`span`,{className:`text-[11px] text-fg-3`,children:[`· `,e.confidence,` `,n.confidence]})]}),(0,K.jsx)(`h3`,{className:`mt-1.5 text-[14.5px] font-semibold leading-snug tracking-[-0.01em] text-fg`,children:e.title}),!f&&(0,K.jsx)(`p`,{className:`mt-1 line-clamp-1 text-[12.5px] text-fg-3`,children:at(e.what).prose})]}),g&&!f&&(0,K.jsx)(`img`,{src:a.shotUrl(g),alt:``,className:`h-12 w-20 shrink-0 rounded-[6px] object-cover object-top ring-1 ring-line`,loading:`lazy`}),(0,K.jsx)(c,{className:r(`mt-1 size-4 shrink-0 text-fg-3 transition-transform`,f&&`rotate-180`)})]}),f&&(0,K.jsxs)(`div`,{className:`grid gap-4 px-4 pb-4 md:grid-cols-[1fr_auto]`,children:[(0,K.jsxs)(`div`,{className:`min-w-0 space-y-3 text-[13px] leading-relaxed text-fg-2`,children:[l&&(0,K.jsxs)(`p`,{className:r(`rounded-[8px] px-2.5 py-1.5 text-[12.5px]`,J[l.verdict].chip),"data-verdict-why":!0,children:[(0,K.jsxs)(`span`,{className:`font-semibold`,children:[n.verdicts[l.verdict],`: `]}),d===`ar`?l.whyAr:l.why]}),(0,K.jsx)(ot,{text:e.what}),e.quote&&(0,K.jsxs)(`figure`,{className:`flex items-start gap-2 rounded-[10px] bg-human-soft px-3 py-2`,children:[(0,K.jsx)(Ze,{className:`mt-0.5 size-3.5 shrink-0 text-human-fg`}),(0,K.jsx)(`blockquote`,{dir:`auto`,className:`min-w-0 flex-1 text-[13px] font-medium text-fg`,children:e.quote}),_&&(0,K.jsx)(`button`,{"data-hand":!0,title:n.play,onClick:()=>a.play(_),className:`inline-flex size-6 shrink-0 items-center justify-center rounded-full bg-human text-[#1b1203] hover:brightness-105`,children:(0,K.jsx)(j,{className:`size-3 fill-current`})})]}),e.expected&&(0,K.jsxs)(`p`,{children:[(0,K.jsxs)(`span`,{className:`font-medium text-fg`,children:[n.expected,`: `]}),e.expected]}),(0,K.jsxs)(`div`,{className:`rounded-[10px] bg-ai-soft/60 px-3 py-2 ring-1 ring-inset ring-ai-line/25`,children:[(0,K.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-[11.5px] font-semibold text-ai-fg`,children:[(0,K.jsx)(le,{className:`size-3.5`}),n.howToFix]}),(0,K.jsx)(`p`,{className:`text-fg`,children:e.fix}),e.location&&(0,K.jsxs)(`div`,{className:`mt-2 inline-flex items-center gap-1.5 rounded-[6px] bg-raised px-2 py-0.5 font-mono text-[11.5px] text-fg-2 ring-1 ring-inset ring-line`,dir:`ltr`,title:n.where,children:[(0,K.jsx)(ne,{className:`size-3`}),e.location]}),e.shown&&e.shown!==e.location&&(0,K.jsxs)(`p`,{className:`mt-1.5 text-[11.5px] text-fg-3`,"data-shown":!0,children:[n.shownAt,`:`,` `,(0,K.jsx)(`span`,{className:`font-mono`,dir:`ltr`,children:e.shown})]})]}),e.steps.length>0&&(0,K.jsxs)(`details`,{className:`group/steps`,children:[(0,K.jsxs)(`summary`,{className:`cursor-default list-none text-[12px] font-medium text-fg-3 hover:text-fg-2`,children:[(0,K.jsx)(c,{className:`me-1 inline size-3 transition-transform group-open/steps:rotate-180`}),n.steps,` (`,e.steps.length,`)`]}),(0,K.jsx)(`ol`,{className:`mt-1.5 list-decimal space-y-0.5 ps-6 text-[12.5px]`,children:e.steps.map((e,t)=>(0,K.jsx)(`li`,{children:e},t))})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 pt-1`,children:[(0,K.jsx)(E,{size:`sm`,variant:`ai`,icon:(0,K.jsx)(i,{}),onClick:()=>a.fix(e),children:n.fixWith(m)}),(0,K.jsx)(E,{size:`sm`,icon:(0,K.jsx)(u,{}),onClick:()=>a.test(e),children:n.createTest}),v!=null&&(0,K.jsx)(E,{size:`sm`,variant:`ghost`,icon:(0,K.jsx)(ke,{}),onClick:()=>a.show(v),children:n.showMoment}),(0,K.jsx)(E,{size:`sm`,variant:`ghost`,icon:(0,K.jsx)(k,{}),onClick:()=>a.skip(e),"data-skip":!0,children:n.skip}),e.evidence.length>0&&(0,K.jsxs)(`span`,{className:`ms-auto text-[11px] text-fg-3`,dir:`ltr`,children:[n.evidence,`: `,e.evidence.slice(0,6).join(` `)]})]})]}),g&&(0,K.jsx)(`button`,{"data-hand":!0,onClick:()=>a.zoom(g),className:`block self-start overflow-hidden rounded-[10px] ring-1 ring-line transition hover:ring-line-strong md:w-[260px]`,children:(0,K.jsx)(`img`,{src:a.shotUrl(g),alt:`Screenshot at this moment`,className:`w-full object-cover object-top`,loading:`lazy`})})]})]})}function Y(e){let t=Math.max(0,Math.round(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}function ct({findings:e,skipped:t,analysis:n,t:a,act:o,start:s,verdicts:l,lang:u}){let[d,f]=(0,G.useState)(`all`),[p,m]=(0,G.useState)(!1),h=C(),g=e.filter(e=>!t.has(e.id)),_=e.filter(e=>t.has(e.id)),v=g.reduce((e,t)=>(e[t.severity]=(e[t.severity]??0)+1,e),{}),y=d===`all`?g:g.filter(e=>e.severity===d),b=l?g.filter(e=>l[e.id]?.verdict!==`fixed`):g;return(0,K.jsxs)(`section`,{className:`space-y-3`,"data-findings":!0,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`h2`,{className:`flex items-center gap-2 text-[15px] font-semibold text-fg`,children:[(0,K.jsx)(Re,{className:`size-4 text-fg-3`}),a.findings,(0,K.jsx)(`span`,{className:`tabular text-fg-3`,children:g.length})]}),b.length>1&&(0,K.jsx)(E,{size:`sm`,variant:`ai`,icon:(0,K.jsx)(i,{}),onClick:()=>o.fixAll(b),title:a.fixAllHint,"data-fix-all":!0,children:a.fixAll(b.length,h)}),(0,K.jsx)(`div`,{className:`ms-auto flex flex-wrap gap-1`,children:[`all`,`critical`,`high`,`medium`,`low`].map(e=>e===`all`||v[e]?(0,K.jsxs)(`button`,{"data-hand":!0,onClick:()=>f(e),className:r(`h-6 rounded-full px-2.5 text-[11.5px] font-medium ring-1 ring-inset ring-line`,d===e?`bg-fg text-inverse ring-fg`:`text-fg-2 hover:bg-hover`),children:[e===`all`?a.all:a.severity[e],` `,e!==`all`&&(0,K.jsx)(`span`,{className:`tabular opacity-70`,children:v[e]})]},e):null)})]}),!g.length&&(0,K.jsx)(`p`,{className:`rounded-[14px] bg-ok-soft px-4 py-3 text-[13px] text-ok`,children:a.noFindings}),(0,K.jsx)(`div`,{className:`space-y-2.5`,children:y.map((e,t)=>(0,K.jsx)(st,{f:e,a:n,t:a,act:o,index:t,start:s,verdict:l?.[e.id],lang:u},e.id))}),_.length>0&&(0,K.jsxs)(`div`,{className:`rounded-[14px] ring-1 ring-inset ring-line`,"data-skipped":!0,children:[(0,K.jsxs)(`button`,{"data-hand":!0,onClick:()=>m(!p),className:`flex w-full items-center gap-2 px-4 py-2.5 text-start text-[12.5px] font-medium text-fg-3 hover:text-fg-2`,children:[(0,K.jsx)(k,{className:`size-3.5`}),a.skippedTitle(_.length),(0,K.jsx)(c,{className:r(`ms-auto size-3.5 transition-transform`,p&&`rotate-180`)})]}),p&&(0,K.jsxs)(`div`,{className:`space-y-1 border-t border-line px-2 py-2`,children:[(0,K.jsx)(`p`,{className:`px-2 pb-1 text-[11.5px] text-fg-3`,children:a.skippedHint}),_.map(e=>(0,K.jsxs)(`div`,{className:`flex items-center gap-2 rounded-[8px] px-2 py-1.5 hover:bg-hover`,children:[(0,K.jsx)(`span`,{className:r(`rounded-[5px] px-1.5 py-px text-[10px] font-semibold uppercase`,q[e.severity].chip),children:a.severity[e.severity]}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12.5px] text-fg-3 line-through decoration-fg-3/40`,children:e.title}),(0,K.jsx)(E,{size:`xs`,variant:`ghost`,icon:(0,K.jsx)(ce,{}),onClick:()=>o.restore(e),children:a.restore})]},e.id))]})]})]})}function X({value:e,children:t}){return(0,K.jsx)(be,{value:e,"data-hand":!0,className:`relative h-8 px-1 text-[12.5px] font-medium text-fg-3 transition-colors hover:text-fg-2 data-[state=active]:text-fg data-[state=active]:after:absolute data-[state=active]:after:inset-x-0 data-[state=active]:after:-bottom-px data-[state=active]:after:h-0.5 data-[state=active]:after:bg-fg`,children:t})}var Z=50;function lt(e,t){let[n,r]=(0,G.useState)(Z),i=e.length-n,a=i>0?(0,K.jsx)(`button`,{"data-hand":!0,onClick:()=>r(n+Z),className:`block w-full rounded-[8px] px-2.5 py-2 text-center text-[12px] font-medium text-fg-2 hover:bg-hover`,"data-show-more":!0,children:t.showMore(Math.min(Z,i))}):null;return{shown:e.slice(0,n),more:a}}function ut({analysis:e,start:t,onPick:n,lang:i,t:a}){let o=e.issues.filter(e=>e.kind===`error`||e.kind===`console`),s=lt(o,a),c=lt(e.pages,a),l=(e.more?.issues.error??0)+(e.more?.issues.console??0);return(0,K.jsxs)(`section`,{className:`rounded-[14px] bg-raised ring-1 ring-inset ring-line`,children:[(0,K.jsxs)(Te,{defaultValue:`errors`,children:[(0,K.jsxs)(_e,{className:`flex gap-5 border-b border-line px-4`,children:[(0,K.jsxs)(X,{value:`errors`,children:[a.tabs.errors,` (`,o.length,`)`]}),(0,K.jsxs)(X,{value:`network`,children:[a.tabs.network,` (`,e.network.total,`)`]}),(0,K.jsx)(X,{value:`perf`,children:a.tabs.speed}),(0,K.jsxs)(X,{value:`pages`,children:[a.tabs.pages,` (`,e.pages.length,`)`]})]}),(0,K.jsxs)(M,{value:`errors`,className:`max-h-[420px] space-y-2 overflow-y-auto p-3 outline-none`,children:[!o.length&&(0,K.jsx)(`p`,{className:`p-4 text-center text-[12.5px] text-fg-3`,children:a.noErrors}),s.shown.map(e=>(0,K.jsxs)(`button`,{"data-hand":!0,onClick:()=>n(e.t),className:`block w-full rounded-[10px] bg-sunken p-3 text-start ring-1 ring-inset ring-line hover:ring-line-strong`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-[12.5px] font-medium text-bad`,children:[i===`ar`?e.titleAr??e.title:e.title,e.count>1&&(0,K.jsxs)(`span`,{className:`rounded-[4px] bg-bad-soft px-1 text-[10.5px]`,children:[`×`,e.count]})]}),e.src&&(0,K.jsx)(`div`,{className:`mt-1 font-mono text-[11px] text-fg-2`,children:e.src}),e.detail&&(0,K.jsx)(`pre`,{className:`mt-2 max-h-28 overflow-hidden whitespace-pre-wrap text-[11px] leading-relaxed text-fg-3`,dir:`ltr`,children:e.detail})]},e.id)),s.more,l>0&&(0,K.jsx)(`p`,{className:`px-2 py-1 text-center text-[11.5px] text-fg-3`,children:a.notListed(l)})]}),(0,K.jsxs)(M,{value:`network`,className:`max-h-[420px] overflow-y-auto p-2 outline-none`,children:[(0,K.jsxs)(`table`,{className:`w-full text-[12px]`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{className:`text-start text-[11px] text-fg-3`,children:[(0,K.jsx)(`th`,{className:`px-2 py-1.5 text-start font-medium`,children:a.cols.request}),(0,K.jsx)(`th`,{className:`px-2 py-1.5 text-start font-medium`,children:a.cols.calls}),(0,K.jsx)(`th`,{className:`px-2 py-1.5 text-start font-medium`,children:a.cols.avg}),(0,K.jsx)(`th`,{className:`px-2 py-1.5 text-start font-medium`,children:a.cols.status})]})}),(0,K.jsx)(`tbody`,{children:e.network.endpoints.map(e=>(0,K.jsxs)(`tr`,{className:`border-t border-line`,children:[(0,K.jsxs)(`td`,{className:`max-w-[340px] truncate px-2 py-1.5 font-mono text-[11.5px] text-fg`,dir:`ltr`,children:[(0,K.jsx)(`span`,{className:`text-fg-3`,children:e.method}),` `,e.url]}),(0,K.jsx)(`td`,{className:`tabular px-2 py-1.5 text-fg-2`,children:e.count}),(0,K.jsx)(`td`,{className:r(`tabular px-2 py-1.5`,e.avgMs>1500?`text-warn`:`text-fg-2`),children:h(e.avgMs)}),(0,K.jsx)(`td`,{className:`px-2 py-1.5`,children:e.statuses.map(e=>(0,K.jsx)(`span`,{className:r(`me-1 rounded-[4px] px-1 font-mono text-[10.5px]`,e===0||e>=400?`bg-bad-soft text-bad`:`bg-ok-soft text-ok`),children:e||`ERR`},e))})]},`${e.method} ${e.url}`))})]}),!e.network.endpoints.length&&(0,K.jsx)(`p`,{className:`p-4 text-center text-[12.5px] text-fg-3`,children:a.noRequests})]}),(0,K.jsx)(M,{value:`perf`,className:`grid grid-cols-2 gap-2 p-3 outline-none md:grid-cols-3`,children:[[i===`ar`?`أول رسم`:`First paint`,h(e.perf.fcp),e.perf.fcp!=null&&e.perf.fcp>1800],[i===`ar`?`المحتوى الرئيسي`:`Main content`,h(e.perf.lcp),e.perf.lcp!=null&&e.perf.lcp>2500],[i===`ar`?`إزاحة التخطيط`:`Layout shift`,e.perf.cls.toFixed(3),e.perf.cls>.1],[i===`ar`?`أبطأ تفاعل`:`Slowest interaction`,h(e.perf.slowestInteraction),(e.perf.slowestInteraction??0)>200],[i===`ar`?`عمل التطبيق الطويل`:`App busy (long tasks)`,`${e.perf.longTasks} · ${h(e.perf.longTaskMs)}`,e.perf.longTaskMs>2e3],[i===`ar`?`طلبات بطيئة`:`Slow requests`,String(e.network.slow),e.network.slow>0]].map(([e,t,n])=>(0,K.jsxs)(`div`,{className:`rounded-[10px] bg-sunken p-3 ring-1 ring-inset ring-line`,children:[(0,K.jsx)(`div`,{className:`text-[11.5px] text-fg-3`,children:e}),(0,K.jsx)(`div`,{className:r(`tabular mt-1 text-[17px] font-semibold`,n?`text-warn`:`text-fg`),children:t})]},String(e)))}),(0,K.jsxs)(M,{value:`pages`,className:`max-h-[420px] overflow-y-auto p-2 outline-none`,children:[c.shown.map((e,r)=>(0,K.jsxs)(`button`,{"data-hand":!0,onClick:()=>n(e.t),className:`flex w-full items-center gap-3 rounded-[8px] px-2.5 py-2 text-start hover:bg-hover`,children:[(0,K.jsx)(`span`,{className:`tabular w-10 text-[11.5px] text-fg-3`,children:Y(e.t-t)}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12.5px] text-fg`,children:e.title||e.url}),(0,K.jsx)(`span`,{className:`truncate font-mono text-[11px] text-fg-3`,dir:`ltr`,children:e.url}),(0,K.jsx)(`span`,{className:`tabular text-[11.5px] text-fg-2`,children:h(e.ms)})]},r)),c.more]})]}),(!!e.summarised||!!e.dropped)&&(0,K.jsx)(`p`,{className:`border-t border-line px-4 py-2 text-[11.5px] text-fg-3`,children:[e.summarised?a.summarised(e.summarised):``,e.dropped?a.dropped(e.dropped):``].filter(Boolean).join(` `)})]})}var Q={en:{back:`Back to the studio`,overall:`Overall`,stability:`Stability`,usability:`Ease of use`,performance:`Speed`,accessibility:`Accessibility`,vsPrevious:`vs previous`,findings:`Findings`,noFindings:`No errors, failed requests or friction were recorded.`,suggestions:`Suggestions`,fix:`Fix`,improve:`Improve`,add:`Add`,journey:`What the tester did`,positives:`What worked`,nextSteps:`Next steps`,expected:`Expected`,where:`Where to fix`,shownAt:`Where it showed`,howToFix:`How to fix`,steps:`Steps to reproduce`,evidence:`Evidence`,confidence:`confidence`,fixWith:e=>`Fix with ${e}`,createTest:`Create test`,showMoment:`Show moment`,play:`Play what was said`,verdict:{ship:`No serious problems found`,"fix-first":`Fix first`,blocked:`Blocked`},clean:`No technical problems found`,scope:`Saywright looks for errors, failed requests, slow responses and signs of frustration. It can’t tell whether the values on screen are right.`,addCheck:`Add a check`,addCheckHint:`Point at a value that must be right, like a total, and say what it should show: it becomes a test.`,tryAutopilot:`Let Autopilot try the main flows`,severity:{critical:`Critical`,high:`High`,medium:`Medium`,low:`Low`},category:{bug:`Bug`,usability:`Usability`,performance:`Performance`,accessibility:`Accessibility`,content:`Content`,reliability:`Reliability`},effort:{small:`small`,medium:`medium`,large:`large`},effortIs:e=>`Effort: ${e}`,writtenBy:(e,t)=>`Written by ${e}${t?` in ${t} s`:``}, from the evidence below.`,writtenLocally:`Written on this computer from what was recorded. Connect an AI in Settings → AI for root causes and fixes.`,all:`All`,tone:{good:`good`,fair:`fair`,poor:`poor`},skip:`Skip`,restore:`Restore`,skippedTitle:e=>`Skipped (${e})`,skippedHint:`Set aside: not counted and not fixed. Rewriting the report won’t raise them again.`,fixAll:(e,t)=>`Fix all with ${t} (${e})`,fixAllHint:`Every finding you didn’t skip, in one request, with its evidence.`,implementSelected:e=>`Implement selected (${e})`,selectAll:`Select all`,selectNone:`Clear`,pickHint:e=>`Tick the ones to implement, then send them to ${e} together.`,timeline:`Timeline`,transcript:`Transcript`,correct:`Correct`,save:`Save`,cancel:`Cancel`,corrected:`corrected`,heard:e=>`Heard: “${e}”`,correctHint:`Click a sentence to correct a word or spelling. The recording stays as it was.`,notInReport:e=>`${e} corrected sentence${e===1?` isn’t`:`s aren’t`} in this report yet.`,rewrite:`Rewrite the report`,noNarration:`No narration in this session.`,pointingAt:e=>`pointing at ${e}`,translating:`Translating…`,translate:`Translate`,translatedFrom:(e,t)=>`Translated by ${t??`AI`} from the ${e===`ar`?`Arabic`:`English`} report.`,notTranslated:`Not translated yet.`,tabs:{errors:`Errors`,network:`Network`,speed:`Speed`,pages:`Pages`},chips:{all:`All`,speech:`Said`,issues:`Issues`,actions:`Actions`,network:`Network`},noErrors:`No JavaScript errors or console errors.`,noRequests:`The app made no requests.`,summarised:e=>`${e.toLocaleString(`en`)} similar event${e===1?` was`:`s were`} summarised: each one is in the counts.`,dropped:e=>`${e.toLocaleString(`en`)} event${e===1?` wasn’t`:`s weren’t`} recorded: the app’s page couldn’t keep them while the studio wasn’t answering.`,nothingHere:`Nothing here.`,cols:{request:`Request`,calls:`Calls`,avg:`Avg`,status:`Status`},verify:`Verify fixes`,verifyHint:`Play this session’s steps again in your app, now, and check whether each finding still happens.`,verifying:`Comparing the replay with the session…`,verdicts:{fixed:`Fixed`,still:`Still happens`,unknown:`Couldn’t check`},replayed:(e,t)=>`Replayed ${e} of ${t} step${t===1?``:`s`}`,verifySummary:(e,t,n)=>[e&&`${e} fixed`,t&&`${t} still happen${t===1?`s`:``}`,n&&`${n} couldn’t be checked`].filter(Boolean).join(` · `),stoppedAt:(e,t)=>`Stopped at “${e}” (${t}).`,fresh:`New in the replay`,verifiedAgo:e=>`Checked ${e}`,againBtn:`Replay again`,verifyTitle:`Checked by a replay`,noSteps:`This session has no clicks or typing to replay.`,showMore:e=>`Show ${e} more`,notListed:e=>`${e.toLocaleString(`en-US`)} more like these aren’t listed.`,momentsNotListed:e=>`${e.toLocaleString(`en-US`)} repeated or routine moments aren’t listed.`},ar:{back:`العودة إلى الاستوديو`,overall:`التقييم العام`,stability:`الاستقرار`,usability:`سهولة الاستخدام`,performance:`السرعة`,accessibility:`إمكانية الوصول`,vsPrevious:`مقارنة بالسابقة`,findings:`الملاحظات`,noFindings:`لم تُسجَّل أخطاء ولا طلبات فاشلة ولا صعوبات.`,suggestions:`الاقتراحات`,fix:`إصلاح`,improve:`تحسين`,add:`إضافة`,journey:`ما قام به المختبِر`,positives:`ما نجح`,nextSteps:`الخطوات التالية`,expected:`المتوقع`,where:`مكان الإصلاح`,shownAt:`مكان ظهورها`,howToFix:`طريقة الإصلاح`,steps:`خطوات إعادة المشكلة`,evidence:`الأدلة`,confidence:`الثقة`,fixWith:e=>`أصلحها مع ${e===`AI`?`الذكاء الاصطناعي`:e}`,createTest:`أنشئ اختبارًا`,showMoment:`اعرض اللحظة`,play:`شغّل ما قيل`,verdict:{ship:`لا مشكلات خطيرة`,"fix-first":`يحتاج إصلاحًا أولًا`,blocked:`متوقف`},clean:`لم تُرصد مشكلات تقنية`,scope:`يبحث Saywright عن الأخطاء والطلبات الفاشلة والاستجابات البطيئة وعلامات التعثّر، لكنه لا يستطيع أن يعرف إن كانت القيم المعروضة صحيحة.`,addCheck:`أضف فحصًا`,addCheckHint:`أشر إلى قيمة يجب أن تكون صحيحة، كالإجمالي، وقل ما يجب أن تعرضه: تصبح اختبارًا.`,tryAutopilot:`دع Autopilot يجرّب المسارات الرئيسية`,severity:{critical:`حرج`,high:`مرتفع`,medium:`متوسط`,low:`منخفض`},category:{bug:`خلل`,usability:`سهولة الاستخدام`,performance:`الأداء`,accessibility:`إمكانية الوصول`,content:`المحتوى`,reliability:`الاعتمادية`},effort:{small:`صغير`,medium:`متوسط`,large:`كبير`},effortIs:e=>`الجهد: ${e}`,writtenBy:(e,t)=>`كتبه ${e}${t?` في ${t} ثانية`:``} اعتمادًا على الأدلة أدناه.`,writtenLocally:`كُتب على هذا الجهاز مما سُجّل. اربط ذكاءً اصطناعيًا في الإعدادات ← الذكاء الاصطناعي للحصول على الأسباب الجذرية وطرق الإصلاح.`,all:`الكل`,tone:{good:`جيد`,fair:`مقبول`,poor:`ضعيف`},skip:`تجاهل`,restore:`استعادة`,skippedTitle:e=>`المتجاهَلة (${e})`,skippedHint:`جُنّبت: لا تُحسب ولا تُصلَح، ولن يطرحها التقرير مجددًا عند إعادة كتابته.`,fixAll:(e,t)=>`أصلح الكل مع ${t===`AI`?`الذكاء الاصطناعي`:t} (${e})`,fixAllHint:`كل ملاحظة لم تتجاهلها، في طلب واحد، مع أدلتها.`,implementSelected:e=>`نفّذ المحدَّد (${e})`,selectAll:`تحديد الكل`,selectNone:`إلغاء التحديد`,pickHint:e=>`حدّد ما تريد تنفيذه، ثم أرسله إلى ${e===`AI`?`الذكاء الاصطناعي`:e} دفعة واحدة.`,timeline:`الخط الزمني`,transcript:`نص الكلام`,correct:`صحّح`,save:`حفظ`,cancel:`إلغاء`,corrected:`مُصحَّحة`,heard:e=>`سُمِع: «${e}»`,correctHint:`انقر جملة لتصحيح كلمة أو إملاء. يبقى التسجيل كما هو.`,notInReport:e=>e===1?`جملة مصحَّحة لم تدخل هذا التقرير بعد.`:e===2?`جملتان مصحَّحتان لم تدخلا هذا التقرير بعد.`:`${e} ${e<=10?`جمل مصحَّحة`:`جملة مصحَّحة`} لم تدخل هذا التقرير بعد.`,rewrite:`أعد كتابة التقرير`,noNarration:`لا كلام مسجَّل في هذه الجلسة.`,pointingAt:e=>`أثناء الإشارة إلى ${e}`,translating:`جارٍ الترجمة…`,translate:`ترجم`,translatedFrom:(e,t)=>`ترجمه ${t??`الذكاء الاصطناعي`} من التقرير ${e===`ar`?`العربي`:`الإنجليزي`}.`,notTranslated:`لم يُترجم بعد.`,tabs:{errors:`الأخطاء`,network:`الشبكة`,speed:`السرعة`,pages:`الصفحات`},chips:{all:`الكل`,speech:`ما قيل`,issues:`المشكلات`,actions:`الإجراءات`,network:`الشبكة`},noErrors:`لا أخطاء JavaScript ولا أخطاء في وحدة التحكم.`,noRequests:`لم يرسل التطبيق أي طلبات.`,summarised:e=>`لُخّصت أحداث متشابهة (${e}): كلٌّ منها محسوب في الأعداد.`,dropped:e=>`لم تُسجَّل بعض الأحداث (${e}): لم تستطع صفحة التطبيق الاحتفاظ بها بينما لم يكن الاستوديو يستجيب.`,nothingHere:`لا شيء هنا.`,cols:{request:`الطلب`,calls:`المرات`,avg:`المتوسط`,status:`الحالة`},verify:`تحقّق من الإصلاحات`,verifyHint:`أعد خطوات هذه الجلسة في تطبيقك الآن، وتحقّق هل ما زالت كل ملاحظة تحدث.`,verifying:`تجري مقارنة الإعادة بالجلسة…`,verdicts:{fixed:`أُصلحت`,still:`ما زالت تحدث`,unknown:`تعذّر التحقّق`},replayed:(e,t)=>`أُعيدت ${e} من ${t} خطوة`,verifySummary:(e,t,n)=>[e&&`${e} أُصلحت`,t&&`${t} ما زالت تحدث`,n&&`${n} تعذّر التحقّق منها`].filter(Boolean).join(` · `),stoppedAt:(e,t)=>`توقّفت عند «${e}» (${t}).`,fresh:`جديد في الإعادة`,verifiedAgo:e=>`آخر تحقّق ${e}`,againBtn:`أعد مرة أخرى`,verifyTitle:`التحقّق بإعادة الخطوات`,noSteps:`لا نقرات ولا كتابة في هذه الجلسة لإعادتها.`,showMore:e=>`اعرض ${e} أخرى`,notListed:e=>`${ge(e,Me.issue)} أخرى مشابهة غير مدرجة.`,momentsNotListed:e=>`${ge(e,[`لحظة واحدة`,`لحظتان`,`لحظات`,`لحظة`])} متكررة أو روتينية غير مدرجة.`}};function dt(e){return e?e.parts?.length?e.parts:[{startedAt:e.startedAt,bytes:e.bytes,file:`video.webm`}]:[]}var ft=(0,G.forwardRef)(function({id:e,video:t,shots:n,start:r,current:i,onTime:a,onZoom:o,lang:s=`en`},c){let l=(0,G.useRef)(null),u=(0,G.useRef)(!1),d=dt(t),[f,p]=(0,G.useState)(0),m=(0,G.useRef)(null),h=d[Math.min(f,d.length-1)];if((0,G.useImperativeHandle)(c,()=>({seek:e=>{if(!d.length)return;let t=0;for(let n=0;n<d.length;n++)d[n].startedAt<=e&&(t=n);let n=Math.max(0,(e-d[t].startedAt)/1e3-.5),r=l.current;t!==f||!r?(m.current={at:n,play:!1},p(t)):u.current?r.currentTime=n:m.current={at:n,play:!1}}})),(0,G.useEffect)(()=>{let e=l.current;if(!e)return;u.current=!1;let t=()=>{u.current=!0;let t=m.current;m.current=null,t&&(e.currentTime=t.at,t.play&&e.play().catch(()=>void 0))},n=()=>{e.duration===1/0||Number.isNaN(e.duration)?(e.currentTime=1e7,e.addEventListener(`timeupdate`,()=>{e.currentTime=0,t()},{once:!0})):t()};return e.addEventListener(`loadedmetadata`,n),()=>e.removeEventListener(`loadedmetadata`,n)},[t,f]),h){let t=d.indexOf(h);return(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(`div`,{className:`overflow-hidden rounded-[12px] bg-black ring-1 ring-line`,children:(0,K.jsx)(`video`,{ref:l,src:t===0?`/api/sessions/${e}/video.webm`:`/api/sessions/${e}/video/${t+1}`,controls:!0,preload:`auto`,className:`aspect-video w-full bg-black object-contain`,onTimeUpdate:e=>u.current&&a(h.startedAt+e.currentTarget.currentTime*1e3),onEnded:()=>{t+1>=d.length||(m.current={at:0,play:!0},p(t+1))}},t)}),d.length>1&&(0,K.jsx)(`div`,{role:`tablist`,"aria-label":`Screen recordings`,className:`flex flex-wrap gap-1`,children:d.map((e,n)=>(0,K.jsxs)(`button`,{role:`tab`,"aria-selected":n===t,"data-hand":!0,onClick:()=>{m.current={at:0,play:!1},p(n)},className:`tabular rounded-[6px] px-2 py-1 text-[11px] ring-1 ring-inset ${n===t?`bg-ai-soft text-ai-fg ring-ai-line/40`:`text-fg-3 ring-line hover:text-fg`}`,children:[`Recording `,n+1,` · `,Y(e.startedAt-r),e.ms?`–${Y(e.startedAt-r+e.ms)}`:``]},e.file))})]})}if(!n.length)return(0,K.jsxs)(`div`,{className:`flex aspect-video flex-col items-center justify-center gap-2 rounded-[12px] bg-sunken text-[12px] text-fg-3 ring-1 ring-inset ring-line`,children:[(0,K.jsx)(Ke,{className:`size-5`}),s===`ar`?`لا تسجيل للشاشة في هذه الجلسة`:`No screen recording for this session`]});let g=i??n[0].t,_=0;for(let e=0;e<n.length;e++)n[e].t<=g+1500&&(_=e);let v=n[_],y=e=>a(n[Math.max(0,Math.min(n.length-1,e))].t);return(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsxs)(`button`,{"data-hand":!0,onClick:()=>o(v.name),className:`relative block w-full overflow-hidden rounded-[12px] bg-sunken ring-1 ring-line`,children:[(0,K.jsx)(`img`,{src:`/api/sessions/${e}/shots/${v.name}`,alt:`Screen at ${Y(v.t-r)}`,className:`aspect-video w-full object-contain`}),(0,K.jsxs)(`span`,{className:`tabular absolute bottom-2 start-2 rounded-[6px] bg-black/60 px-1.5 py-0.5 text-[11px] text-white`,children:[Y(v.t-r),` · `,v.reason]})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,K.jsx)(S,{size:`sm`,onClick:()=>y(_-1),disabled:_===0,"aria-label":`Previous screenshot`,children:(0,K.jsx)(Be,{})}),(0,K.jsx)(`div`,{className:`flex min-w-0 flex-1 gap-1 overflow-x-auto py-0.5`,children:n.map((t,n)=>(0,K.jsx)(`button`,{"data-hand":!0,onClick:()=>a(t.t),className:`h-9 w-14 shrink-0 overflow-hidden rounded-[5px] ring-1 ${n===_?`ring-2 ring-ai`:`ring-line opacity-70 hover:opacity-100`}`,children:(0,K.jsx)(`img`,{src:`/api/sessions/${e}/shots/${t.name}`,alt:``,loading:`lazy`,className:`h-full w-full object-cover object-top`})},t.name))}),(0,K.jsx)(S,{size:`sm`,onClick:()=>y(_+1),disabled:_===n.length-1,"aria-label":`Next screenshot`,children:(0,K.jsx)(we,{})})]})]})});function pt(e,t){let n=0,r=e.length-2;for(;n<r;){let i=n+r>>1;e[i+1]<=t?n=i+1:r=i}return Math.max(0,n)}function mt({items:e,keyOf:t,estimate:n,render:r,className:i,reveal:a,overscan:o=500,empty:s}){let c=(0,G.useRef)(null),l=(0,G.useRef)(null),u=(0,G.useRef)(new Map),[d,f]=(0,G.useState)(0),[p,m]=(0,G.useState)({top:0,height:900}),h=(0,G.useRef)(0),g=(0,G.useMemo)(()=>{let r=Array(e.length+1);r[0]=0;for(let i=0;i<e.length;i++)r[i+1]=r[i]+(u.current.get(t(e[i]))??n(e[i]));return r},[e,d]),_=e.length?pt(g,p.top-o):0,v=_;for(;v<e.length-1&&g[v+1]<p.top+p.height+o;)v++;let y=e.slice(_,v+1);return(0,G.useLayoutEffect)(()=>{let e=l.current?.children;if(!e)return;let n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i.dataset.vkey==null)continue;let a=y[r];if(!a)continue;let o=i.offsetHeight,s=t(a);o&&u.current.get(s)!==o&&(u.current.set(s,o),n=!0)}n&&f(e=>e+1)}),(0,G.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=()=>m({top:e.scrollTop,height:e.clientHeight||900});t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect(),cancelAnimationFrame(h.current)}},[]),(0,G.useLayoutEffect)(()=>{if(a==null)return;let n=c.current,r=e.findIndex(e=>t(e)===a);if(!n||r<0)return;let i=g[r],o=g[r+1];i<n.scrollTop?n.scrollTop=Math.max(0,i-8):o>n.scrollTop+n.clientHeight&&(n.scrollTop=o-n.clientHeight+8)},[a]),(0,K.jsx)(`div`,{ref:c,className:i,onScroll:()=>{cancelAnimationFrame(h.current),h.current=requestAnimationFrame(()=>{let e=c.current;e&&m({top:e.scrollTop,height:e.clientHeight||900})})},children:e.length?(0,K.jsx)(`div`,{style:{position:`relative`,height:g[e.length]},children:(0,K.jsx)(`div`,{ref:l,style:{position:`absolute`,top:g[_],left:0,right:0},children:y.map(e=>{let n=t(e);return(0,K.jsx)(`div`,{"data-vkey":n,children:r(e)},n)})})}):s})}var ht={action:(0,K.jsx)(oe,{}),navigation:(0,K.jsx)(qe,{}),speech:(0,K.jsx)(re,{}),error:(0,K.jsx)(N,{}),network:(0,K.jsx)(We,{}),frustration:(0,K.jsx)(Pe,{}),performance:(0,K.jsx)(de,{}),mark:(0,K.jsx)(ae,{}),shot:(0,K.jsx)(O,{}),command:(0,K.jsx)(le,{}),console:(0,K.jsx)(tt,{})},gt={speech:`text-human-fg`,error:`text-bad`,frustration:`text-bad`,network:`text-warn`,performance:`text-warn`,mark:`text-ai-fg`,console:`text-warn`};function _t({items:e,omitted:t=0,start:n,current:i,onPick:a,lang:o,t:s}){let c=e=>o===`ar`?e.textAr??e.text:e.text,l=e=>o===`ar`?e.detailAr??e.detail:e.detail,[u,d]=(0,G.useState)(`all`),f=(0,G.useMemo)(()=>e.filter(e=>e.kind===`shot`?!1:u===`all`?!0:u===`speech`?e.kind===`speech`||e.kind===`mark`:u===`issues`?!!e.issue||e.kind===`error`||e.kind===`frustration`:u===`network`?e.kind===`network`:e.kind===`action`||e.kind===`navigation`||e.kind===`command`),[e,u]),p=i==null?null:f.reduce((e,t)=>t.t<=i+300?t:e,null),m={speech:e.filter(e=>e.kind===`speech`).length,issues:e.filter(e=>e.issue).length},h=[{id:`all`,label:s.chips.all},{id:`speech`,label:`${s.chips.speech} ${m.speech}`},{id:`issues`,label:`${s.chips.issues} ${m.issues}`},{id:`actions`,label:s.chips.actions},{id:`network`,label:s.chips.network}];return(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1 px-3 pb-2`,children:h.map(e=>(0,K.jsx)(`button`,{"data-hand":!0,onClick:()=>d(e.id),className:r(`h-6 rounded-full px-2.5 text-[11.5px] font-medium ring-1 ring-inset ring-line`,u===e.id?`bg-fg text-inverse ring-fg`:`text-fg-2 hover:bg-hover`),children:e.label},e.id))}),t>0&&(0,K.jsx)(`p`,{className:`px-3.5 pb-2 text-[11px] text-fg-3`,children:s.momentsNotListed(t)}),(0,K.jsx)(mt,{className:`min-h-0 flex-1 overflow-y-auto px-1.5 pb-3`,items:f,keyOf:e=>e.id,estimate:e=>e.kind===`speech`?56:e.src?48:32,reveal:p?.id??null,render:e=>(0,K.jsx)(vt,{x:e,start:n,active:p?.id===e.id,text:e.kind===`speech`?`“${e.text}”`:c(e),detail:e.kind===`speech`&&e.detail?l(e):void 0,onPick:a}),empty:(0,K.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-fg-3`,children:s.nothingHere})})]})}var vt=(0,G.memo)(function({x:e,start:t,active:n,text:i,detail:a,onPick:o}){return(0,K.jsxs)(`button`,{"data-tl":e.id,"data-hand":!0,onClick:()=>o(e),className:r(`flex w-full items-start gap-2 rounded-[8px] px-2 py-1.5 text-start transition-colors hover:bg-hover`,n&&`bg-active`,e.kind===`speech`&&`py-2`),children:[(0,K.jsx)(`span`,{className:`tabular w-9 shrink-0 pt-px text-[11px] text-fg-3`,children:Y(e.t-t)}),(0,K.jsx)(`span`,{className:r(`pt-[3px] text-fg-3 [&_svg]:size-[13px]`,gt[e.kind]),children:ht[e.kind]}),(0,K.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,K.jsx)(`span`,{dir:e.kind===`speech`?`auto`:void 0,className:r(`block text-[12.5px] leading-snug`,e.kind===`speech`?`font-medium text-fg`:`text-fg-2`,(e.kind===`error`||e.kind===`frustration`)&&`text-bad`),children:i}),a||e.src?(0,K.jsxs)(`span`,{className:`mt-0.5 flex flex-wrap items-center gap-1.5 text-[11px] text-fg-3`,children:[a&&(0,K.jsx)(`span`,{children:a}),e.src&&(0,K.jsx)(`span`,{className:`truncate font-mono`,dir:`ltr`,children:e.src})]}):null]}),e.issue&&(0,K.jsx)(`span`,{className:`mt-0.5 shrink-0 rounded-[4px] bg-bad-soft px-1 text-[10px] font-semibold text-bad`,children:e.issue})]})});function yt(e){if(e.description)return e.description;let t=e.label||e.text;return t?`the “${t.slice(0,40)}” ${e.role??e.name}`:e.name}function bt(e){let{meta:t,analysis:n,report:r}=e;if(!n||!r)return``;let i=Q[r.lang],a=new Set(e.decisions?.skipped??[]),o=new Set((e.report??r).findings.filter(e=>a.has(e.title)).map(e=>e.id)),s=r.findings.filter(e=>!o.has(e.id)),c=[],l=n.scores;c.push(`## ${r.title}`,``),c.push(`**${t.name}** · ${new Date(t.startedAt).toLocaleString()} · ${Y(n.durationMs)} · ${t.appUrl}${t.git?` · \`${t.git.branch}@${t.git.commit}\``:``}`,``),c.push(r.summary,``),c.push(`| ${i.overall} | ${i.stability} | ${i.usability} | ${i.performance} | ${i.accessibility} |`,`|---|---|---|---|---|`,`| **${l.overall}** | ${l.stability.score} | ${l.usability.score} | ${l.performance.score} | ${l.accessibility.score} |`,``);let u=e.verification,d=u?s.map(e=>u.findings[e.id]).filter(Boolean):[];if(u&&d.length){let e=e=>d.filter(t=>t.verdict===e).length,t=u.steps.failed;c.push(`**${i.verifyTitle}:** ${i.verifySummary(e(`fixed`),e(`still`),e(`unknown`))}. ${i.replayed(u.steps.done,u.steps.total)}.${t?` ${i.stoppedAt(r.lang===`ar`?t.descriptionAr??t.description:t.description,Oe(t.reason,r.lang))}`:``}`,``)}if(s.length&&(c.push(`### ${i.findings}`,``),s.forEach((e,t)=>{let n=u?.findings[e.id];c.push(`${t+1}. **[${i.severity[e.severity]}] ${e.title}**${n?` · ${n.verdict===`fixed`?`✅`:n.verdict===`still`?`❌`:`❔`} ${i.verdicts[n.verdict]}: ${r.lang===`ar`?n.whyAr:n.why}`:``}`),c.push(` ${e.what}`),e.quote&&c.push(` > “${e.quote}”`),e.expected&&c.push(` ${i.expected}: ${e.expected}`),e.location&&c.push(` ${i.where}: \`${e.location}\``),c.push(` ${i.howToFix}: ${e.fix}`),e.steps.length&&c.push(` ${i.steps}: ${e.steps.join(` → `)}`),c.push(``)})),r.suggestions.length){c.push(`### ${i.suggestions}`,``);for(let e of r.suggestions)c.push(`- **${i[e.kind]}** (${i.effort[e.effort]}): ${e.title}. ${e.why}`);c.push(``)}return r.nextSteps.length&&(c.push(`### ${i.nextSteps}`,``),r.nextSteps.forEach((e,t)=>c.push(`${t+1}. ${e}`)),c.push(``)),c.push(`_Recorded with ${Ee.name}${r.source===`local`?``:`; report by ${g(r.model)}`}._`),c.join(`
4
+ `)}function xt({segments:e,start:t,current:n,t:r,reportAt:i,onPlay:a,onCorrect:o,onRewrite:s}){let[c,l]=(0,G.useState)(null),u=i==null?0:e.filter(e=>e.editedAt&&e.editedAt>i).length,d=(0,G.useRef)(null),f=n==null?null:e.reduce((e,t)=>t.start<=n+300?t:e,null);return(0,G.useEffect)(()=>{f&&c==null&&d.current?.querySelector(`[data-seg="${f.id}"]`)?.scrollIntoView({block:`nearest`,behavior:`smooth`})},[f?.id]),(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[u>0&&(0,K.jsxs)(`div`,{className:`mx-3 mb-2 flex items-center gap-2 rounded-[10px] bg-ai-soft px-3 py-2 ring-1 ring-inset ring-ai-line/30`,"data-rewrite":!0,children:[(0,K.jsx)(`p`,{className:`min-w-0 flex-1 text-[12px] leading-snug text-ai-fg`,children:r.notInReport(u)}),(0,K.jsx)(E,{size:`xs`,variant:`ai`,icon:(0,K.jsx)(A,{}),onClick:s,children:r.rewrite})]}),e.length>0&&(0,K.jsx)(`p`,{className:`px-3.5 pb-2 text-[11.5px] leading-snug text-fg-3`,children:r.correctHint}),(0,K.jsxs)(`div`,{ref:d,className:`min-h-0 flex-1 overflow-y-auto px-2 pb-2`,"data-transcript":!0,children:[!e.length&&(0,K.jsx)(`p`,{className:`px-3 py-6 text-center text-[12px] text-fg-3`,children:r.noNarration}),e.map(e=>(0,K.jsx)(St,{s:e,start:t,t:r,active:f?.id===e.id,editing:c===e.id,onEdit:t=>l(t?e.id:null),onPlay:()=>a(e),onCorrect:t=>o(e,t)},e.id))]})]})}function St({s:e,start:t,t:n,active:i,editing:a,onEdit:o,onPlay:s,onCorrect:c}){let[l,u]=(0,G.useState)(e.text),[d,f]=(0,G.useState)(!1);(0,G.useEffect)(()=>u(e.text),[e.text,a]);let p=async()=>{let t=l.replace(/\s+/g,` `).trim();if(!t||t===e.text)return o(!1);f(!0);try{await c(t),o(!1)}finally{f(!1)}};return(0,K.jsxs)(`div`,{"data-seg":e.id,className:r(`group flex gap-2.5 rounded-[9px] px-2 py-2`,i&&!a?`bg-human-soft`:`hover:bg-hover`),children:[(0,K.jsxs)(`button`,{"data-hand":!0,onClick:s,title:`Play`,className:`mt-px flex shrink-0 flex-col items-center gap-1 text-fg-3 hover:text-fg`,children:[(0,K.jsx)(`span`,{className:`tabular text-[11px]`,children:Y(e.start-t)}),(0,K.jsx)(j,{className:`size-3 fill-current opacity-60 group-hover:opacity-100`})]}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[a?(0,K.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,K.jsx)(`textarea`,{autoFocus:!0,dir:`auto`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),p()):e.key===`Escape`&&(e.stopPropagation(),o(!1))},rows:Math.min(5,Math.max(2,Math.ceil(l.length/48))),className:`w-full resize-none rounded-[8px] bg-sunken px-2 py-1.5 text-[13px] leading-relaxed text-fg outline-none ring-1 ring-ai-line`,"aria-label":n.correct}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(E,{size:`xs`,variant:`ai`,icon:(0,K.jsx)(b,{}),onClick:()=>void p(),disabled:d,children:n.save}),(0,K.jsx)(E,{size:`xs`,variant:`ghost`,onClick:()=>o(!1),children:n.cancel}),e.original&&(0,K.jsx)(`span`,{className:`min-w-0 truncate text-[11px] text-fg-3`,dir:`auto`,children:n.heard(e.original)})]})]}):(0,K.jsx)(`button`,{"data-hand":!0,onClick:()=>o(!0),className:`block w-full text-start`,title:n.correct,children:(0,K.jsxs)(`span`,{dir:`auto`,className:`block text-[13px] leading-relaxed text-fg`,children:[e.text,(0,K.jsx)(Ye,{className:`ms-1.5 inline size-3 text-fg-3 opacity-0 group-hover:opacity-100`})]})}),(0,K.jsxs)(`div`,{className:`mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[11px] text-fg-3`,children:[(0,K.jsx)(`span`,{className:`rounded-[4px] bg-active px-1 text-[10px] uppercase`,children:e.lang}),e.original&&!a&&(0,K.jsx)(`span`,{className:`rounded-[4px] bg-ai-soft px-1 text-[10px] text-ai-fg`,title:n.heard(e.original),"data-corrected":!0,children:n.corrected}),e.el&&(0,K.jsx)(`span`,{className:`truncate`,children:n.pointingAt(yt(e.el))})]})]})]})}function Ct(e,t){let n=new Intl.RelativeTimeFormat(t,{numeric:`auto`}),r=Math.round((e-Date.now())/1e3);if(Math.abs(r)<45)return t===`ar`?`الآن`:`just now`;let i=Math.round(r/60);if(Math.abs(i)<60)return n.format(i,`minute`);let a=Math.round(i/60);return Math.abs(a)<24?n.format(a,`hour`):n.format(Math.round(a/24),`day`)}function wt({verification:e,verifying:t,findings:n,t:i,lang:a,canReplay:o,onReplay:c}){if(t)return(0,K.jsxs)(`section`,{className:`flex items-center gap-3 rounded-[14px] bg-raised px-4 py-3.5 ring-1 ring-inset ring-ai-line/40`,"data-verification":`pending`,children:[(0,K.jsx)(s,{className:`size-4 text-ai`}),(0,K.jsx)(`span`,{className:`shimmer-text text-[13px] font-medium`,children:i.verifying})]});if(!e)return null;let l=n.map(t=>e.findings[t.id]).filter(Boolean),u={fixed:0,still:0,unknown:0};for(let e of l)u[e.verdict]++;let d=e.steps.failed;return(0,K.jsxs)(`section`,{className:`rounded-[14px] bg-raised p-4 ring-1 ring-inset ring-line`,"data-verification":`done`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`h2`,{className:`flex items-center gap-2 text-[15px] font-semibold text-fg`,children:[(0,K.jsx)($e,{className:`size-4 text-ai`}),i.verifyTitle]}),(0,K.jsx)(`span`,{className:`text-[11.5px] text-fg-3`,children:i.verifiedAgo(Ct(e.at,a))}),(0,K.jsx)(E,{size:`sm`,variant:`ghost`,className:`ms-auto`,icon:(0,K.jsx)(U,{}),onClick:c,disabled:!o,"data-verify-again":!0,children:i.againBtn})]}),l.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:`mt-3 flex h-1.5 gap-0.5 overflow-hidden rounded-full bg-sunken`,"aria-hidden":!0,children:[`fixed`,`still`,`unknown`].map(e=>u[e]?(0,K.jsx)(`span`,{className:r(`h-full`,J[e].bar),style:{width:`${u[e]/l.length*100}%`}},e):null)}),(0,K.jsx)(`p`,{className:`mt-2 text-[13px] font-medium text-fg`,"data-verify-summary":!0,children:i.verifySummary(u.fixed,u.still,u.unknown)})]}),(0,K.jsxs)(`p`,{className:`mt-1 text-[12px] text-fg-3`,"data-verify-steps":!0,children:[i.replayed(e.steps.done,e.steps.total),d&&(0,K.jsxs)(K.Fragment,{children:[` · `,(0,K.jsx)(`span`,{className:`text-warn`,children:i.stoppedAt(a===`ar`?d.descriptionAr??d.description:d.description,Oe(d.reason,a))})]})]}),e.fresh.length>0&&(0,K.jsxs)(`div`,{className:`mt-3 rounded-[10px] bg-warn-soft px-3 py-2`,"data-verify-fresh":!0,children:[(0,K.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-[12px] font-semibold text-warn`,children:[(0,K.jsx)(N,{className:`size-3.5`}),i.fresh,` (`,e.fresh.length,`)`]}),(0,K.jsx)(`ul`,{className:`space-y-1 text-[12.5px] text-fg-2`,children:e.fresh.slice(0,8).map((e,t)=>(0,K.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:r(`shrink-0 rounded-[4px] px-1 text-[10px] font-semibold uppercase`,q[e.severity].chip),children:i.severity[e.severity]}),(0,K.jsx)(`span`,{className:`min-w-0 truncate`,dir:`auto`,children:a===`ar`?e.titleAr??e.title:e.title})]},t))})]})]})}function Tt(){let e=v(e=>e.open),t=v(e=>e.detail),n=v(e=>e.detailError),r=o(!!e,{onEscape:()=>!document.querySelector(`[data-lightbox]`)&&x.closeReport()});return(0,K.jsx)(te,{children:e&&(0,K.jsx)(ee.div,{ref:r,tabIndex:-1,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.18},className:`fixed inset-0 z-40 flex flex-col bg-bg outline-none`,role:`dialog`,"aria-modal":`true`,"aria-label":`Session report`,children:t&&t.meta.id===e?(0,K.jsx)(Ot,{detail:t}):(0,K.jsx)(Et,{error:n})},`report`)})}function Et({error:e}){return(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 text-[13px] text-fg-3`,children:[e?(0,K.jsx)(`span`,{className:`text-bad`,children:e}):(0,K.jsx)(s,{}),(0,K.jsx)(E,{size:`sm`,onClick:()=>x.closeReport(),children:`Back to the studio`})]})}function Dt(e,t){let n=e.report;return n?(t??n.lang)===n.lang?n:e.translation??n:null}function Ot({detail:e}){let{meta:t,analysis:n,decisions:r}=e,i=Dt(e,v(e=>e.reportLang)),a=i?.lang??`en`,o=Q[a],[s,c]=(0,G.useState)(null),[l,u]=(0,G.useState)(null),[d,f]=(0,G.useState)(`timeline`),p=(0,G.useRef)(null),h=(0,G.useRef)(null),g=t.startedAt,_=t.status===`processing`||t.status===`recording`,b=kt(e),C=e=>{c(e),p.current?.seek(e)},T=e=>{C(e.start);let t=h.current;if(!t||e.audioAt==null)return;t.currentTime=Math.max(0,e.audioAt-.2),t.play();let n=e.audioAt+(e.end-e.start)/1e3+.4,r=()=>{t.currentTime>=n?t.pause():t.paused||requestAnimationFrame(r)};requestAnimationFrame(r)},E=e=>{if(e.kind===`speech`){let t=n?.transcript.find(t=>t.start===e.t);if(t)return T(t)}C(e.t)},D=t=>e.report?.findings.find(e=>e.id===t)?.title,O=new Set((e.report?.findings??[]).filter(e=>r.skipped.includes(e.title)).map(e=>e.id)),k={show:C,play:T,shotUrl:e=>`/api/sessions/${t.id}/shots/${e}`,zoom:u,fix:e=>{n&&(x.closeReport(),m.fixFromReport(e,y(e,n),n))},fixAll:e=>{n&&(x.closeReport(),m.fixFindings(e.map(e=>({f:e,items:y(e,n)})),n))},test:e=>{n&&(x.closeReport(),m.testFromReport(e,y(e,n),n,t.appUrl))},skip:e=>{let n=D(e.id);n&&x.setSkipped(t.id,[...r.skipped,n])},restore:e=>{let n=D(e.id);x.setSkipped(t.id,r.skipped.filter(e=>e!==n))}};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Mt,{detail:e,report:i,t:o,replay:b}),(0,K.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,K.jsxs)(`div`,{className:`mx-auto grid max-w-[1480px] gap-6 px-5 py-6 xl:grid-cols-[minmax(0,1fr)_440px]`,dir:a===`ar`?`rtl`:`ltr`,children:[(0,K.jsxs)(`main`,{className:`min-w-0 space-y-6`,children:[(0,K.jsx)(Nt,{detail:e,report:i,t:o,busy:_,open:i?i.findings.filter(e=>!O.has(e.id)).length:0}),i&&(0,K.jsx)(wt,{verification:e.verification,verifying:e.verifying,findings:i.findings.filter(e=>!O.has(e.id)),t:o,lang:a,canReplay:b.can,onReplay:b.run}),n&&(0,K.jsx)(Se,{scores:n.scores,previous:e.previous?.scores??null,report:i,t:o}),i&&n&&(0,K.jsx)(ct,{findings:i.findings,skipped:O,analysis:n,t:o,act:k,start:g,verdicts:e.verification?.findings??null,lang:a}),i&&(0,K.jsx)(Ft,{report:i,t:o}),i&&(0,K.jsx)(It,{report:i,t:o}),n&&(0,K.jsx)(ut,{analysis:n,start:g,onPick:C,lang:a,t:o})]}),(0,K.jsx)(`aside`,{className:`min-w-0`,children:(0,K.jsxs)(`div`,{className:`space-y-3 xl:sticky xl:top-0 xl:flex xl:max-h-[calc(100vh-120px)] xl:flex-col`,children:[(0,K.jsx)(ft,{ref:p,id:t.id,video:t.video,shots:n?.shots??[],start:g,current:s,onTime:c,onZoom:u,lang:a}),t.audioSeconds>0&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 rounded-[10px] bg-raised px-2.5 py-1.5 ring-1 ring-inset ring-line`,children:[(0,K.jsx)(Ge,{className:`size-4 shrink-0 text-fg-3`}),(0,K.jsx)(`audio`,{ref:h,src:`/api/sessions/${t.id}/audio.wav`,controls:!0,preload:`metadata`,className:`h-8 w-full`})]}),n&&(0,K.jsxs)(`div`,{className:`flex min-h-[320px] flex-col rounded-[14px] bg-raised pt-2.5 ring-1 ring-inset ring-line xl:min-h-0 xl:flex-1`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-4 px-3.5 pb-2`,role:`tablist`,children:[(0,K.jsx)(At,{on:d===`timeline`,onClick:()=>f(`timeline`),children:o.timeline}),(0,K.jsxs)(At,{on:d===`transcript`,onClick:()=>f(`transcript`),children:[o.transcript,` `,(0,K.jsx)(`span`,{className:`tabular text-fg-3`,children:n.transcript.length})]}),(0,K.jsx)(`span`,{className:`tabular ms-auto text-[11.5px] text-fg-3`,children:Y(n.durationMs)})]}),d===`timeline`?(0,K.jsx)(_t,{items:n.timeline,omitted:n.more?.timeline,start:g,current:s,onPick:E,lang:a,t:o}):(0,K.jsx)(xt,{segments:n.transcript,start:g,current:s,t:o,reportAt:e.report?.at??null,onPlay:T,onCorrect:(e,n)=>x.correctSentence(t.id,e.id,n),onRewrite:()=>void x.regenerate(t.id,!0)})]})]})})]})}),(0,K.jsx)(te,{children:l&&(0,K.jsxs)(ee.div,{"data-lightbox":!0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-6`,onClick:()=>u(null),children:[(0,K.jsx)(`img`,{src:k.shotUrl(l),alt:``,className:`max-h-full max-w-full rounded-[10px] shadow-pop`}),(0,K.jsx)(S,{className:`absolute end-4 top-4 text-white hover:bg-white/10`,onClick:()=>u(null),"aria-label":`Close`,children:(0,K.jsx)(w,{})})]})})]})}function kt(e){let t=f(e=>!!e.replay),n=e.analysis?.steps.filter(e=>e.kind!==`navigate`&&e.locator).length??0;return{can:n>0&&e.meta.status===`ready`&&e.meta.source!==`replay`&&!e.verifying&&!t,steps:n,run:()=>void m.verifySession(e)}}function At({on:e,onClick:t,children:n}){return(0,K.jsx)(`button`,{"data-hand":!0,role:`tab`,"aria-selected":e,onClick:t,className:r(`relative h-7 text-[13px] font-semibold transition-colors`,e?`text-fg after:absolute after:inset-x-0 after:-bottom-[1px] after:h-0.5 after:bg-fg`:`text-fg-3 hover:text-fg-2`),children:n})}function jt({detail:e,report:t}){let n=e.report;if(!n)return null;let i=n.lang===`ar`?`en`:`ar`,a=!e.translation&&e.translating;return(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,"data-report-lang":t?.lang,children:[(0,K.jsx)(`div`,{className:`flex rounded-[8px] bg-sunken p-0.5 ring-1 ring-inset ring-line`,role:`radiogroup`,"aria-label":`Report language`,children:[`en`,`ar`].map(e=>(0,K.jsx)(`button`,{"data-hand":!0,role:`radio`,"aria-checked":t?.lang===e,onClick:()=>x.setReportLang(e),className:r(`h-6 rounded-[6px] px-2 text-[12px] font-medium transition-colors`,t?.lang===e?`bg-raised text-fg shadow-sm`:`text-fg-3 hover:text-fg-2`),children:e===`en`?`English`:`العربية`},e))}),a&&(0,K.jsxs)(`span`,{className:`flex items-center gap-1 text-[11.5px] text-fg-3`,children:[(0,K.jsx)(s,{className:`size-3`}),(0,K.jsx)(`bdi`,{lang:i,children:Q[i].translating})]}),!e.translation&&!e.translating&&n.source!==`local`&&(0,K.jsx)(E,{size:`xs`,variant:`ghost`,icon:(0,K.jsx)(L,{}),onClick:()=>void x.retranslate(e.meta.id),children:(0,K.jsx)(`bdi`,{lang:i,children:Q[i].translate})})]})}function Mt({detail:e,report:t,t:n,replay:a}){let{meta:o}=e,[s,c]=(0,G.useState)(!1),[u,f]=(0,G.useState)(o.name),[m,h]=(0,G.useState)(!1);(0,G.useEffect)(()=>f(o.name),[o.name]);let g=o.endedAt?ye(o.endedAt-o.startedAt):null,_=o.audioSeconds>0||!!e.analysis?.transcript.length,v=async()=>{e.analysis&&t&&(await navigator.clipboard.writeText(bt({...e,report:t})),c(!0),setTimeout(()=>c(!1),1600))};return(0,K.jsxs)(`header`,{className:`flex h-[54px] shrink-0 items-center gap-3 border-b border-line bg-panel px-3`,children:[(0,K.jsx)(S,{onClick:()=>x.closeReport(),"aria-label":n.back,children:(0,K.jsx)(D,{})}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m?(0,K.jsx)(`input`,{autoFocus:!0,value:u,onChange:e=>f(e.target.value),onBlur:()=>{h(!1),u.trim()&&u!==o.name&&x.rename(o.id,u.trim())},onKeyDown:e=>e.key===`Enter`&&e.target.blur(),className:`h-6 w-full max-w-[420px] rounded-[6px] bg-sunken px-1.5 text-[13.5px] font-semibold text-fg outline-none ring-1 ring-ai-line`}):(0,K.jsx)(`button`,{"data-hand":!0,onClick:()=>h(!0),className:`max-w-full truncate text-start text-[13.5px] font-semibold text-fg hover:underline hover:decoration-line-strong`,children:o.name}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 truncate text-[11.5px] text-fg-3`,children:[(0,K.jsx)(`span`,{children:new Date(o.startedAt).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})}),g&&(0,K.jsxs)(`span`,{children:[`· `,g]}),(0,K.jsxs)(`span`,{className:`truncate font-mono`,children:[`· `,p(o.appUrl)]}),o.git&&(0,K.jsxs)(`span`,{className:`font-mono`,children:[`· `,o.git.branch,`@`,o.git.commit,o.git.dirty?`*`:``]}),_&&(0,K.jsxs)(`span`,{children:[`· `,o.lang===`ar`?`العربية`:o.lang===`en`?`English`:`Arabic + English`]})]})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1`,children:[o.source!==`replay`&&(0,K.jsx)(E,{size:`sm`,variant:`ai`,icon:(0,K.jsx)(U,{}),disabled:!a.can,title:a.steps?n.verifyHint:n.noSteps,onClick:a.run,"data-verify":!0,children:n.verify}),(0,K.jsx)(`span`,{className:`mx-1 h-5 w-px bg-line`}),(0,K.jsx)(jt,{detail:e,report:t}),(0,K.jsx)(`span`,{className:`mx-1 h-5 w-px bg-line`}),(0,K.jsx)(E,{size:`sm`,icon:s?(0,K.jsx)(b,{}):(0,K.jsx)(He,{}),onClick:()=>void v(),disabled:!t,children:s?`Copied`:`Copy as Markdown`}),(0,K.jsxs)(`a`,{href:`/api/sessions/${o.id}/export.html?download=1&lang=${t?.lang??``}`,download:!0,"data-hand":!0,"aria-disabled":!t||void 0,className:r(`inline-flex h-7 shrink-0 select-none items-center gap-1.5 whitespace-nowrap rounded-[7px] bg-raised px-2.5 text-[12.5px] font-medium text-fg ring-1 ring-inset ring-line-strong transition-colors hover:bg-hover [&_svg]:size-[14px]`,!t&&`pointer-events-none opacity-45`),children:[(0,K.jsx)(fe,{}),`Export HTML`]}),(0,K.jsxs)(De,{children:[(0,K.jsx)(ue,{asChild:!0,children:(0,K.jsx)(S,{"aria-label":`More`,children:(0,K.jsx)(pe,{})})}),(0,K.jsx)(me,{children:(0,K.jsxs)(Ce,{align:`end`,sideOffset:6,className:`z-[60] min-w-[230px] rounded-[10px] bg-raised p-1 shadow-pop`,children:[(0,K.jsx)($,{icon:(0,K.jsx)(i,{}),onSelect:()=>void x.regenerate(o.id,!0),children:`Rewrite the report`}),o.audioSeconds>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)($,{icon:(0,K.jsx)(A,{}),onSelect:()=>void x.retranscribe(o.id),children:`Transcribe the narration again`}),(0,K.jsxs)(Ie,{children:[(0,K.jsxs)(Fe,{className:`flex h-8 cursor-default items-center gap-2 rounded-[7px] px-2 text-[12.5px] text-fg outline-none data-[highlighted]:bg-hover [&_svg]:size-[14px] [&_svg]:text-fg-3`,children:[(0,K.jsx)(L,{}),`Transcribe as…`]}),(0,K.jsx)(me,{children:(0,K.jsxs)(he,{className:`z-[61] min-w-[160px] rounded-[10px] bg-raised p-1 shadow-pop`,children:[(0,K.jsx)($,{onSelect:()=>void x.retranscribe(o.id,`en`),children:`English`}),(0,K.jsx)($,{onSelect:()=>void x.retranscribe(o.id,`ar`),children:`العربية`}),(0,K.jsx)($,{onSelect:()=>void x.retranscribe(o.id,`auto`),children:`Arabic + English`})]})})]})]}),(0,K.jsx)(`a`,{href:`/api/sessions/${o.id}/export.html?lang=${t?.lang??``}`,target:`_blank`,rel:`noreferrer`,children:(0,K.jsx)($,{icon:(0,K.jsx)(V,{}),children:`Open the printable report`})}),(0,K.jsx)(Ne,{className:`my-1 h-px bg-line`}),(0,K.jsx)($,{icon:(0,K.jsx)(d,{}),danger:!0,onSelect:async()=>{await l({title:`Delete this session?`,body:`Its recordings, screenshots and report are deleted from this computer.`,action:`Delete session`,danger:!0})&&x.remove(o.id)},children:`Delete session`})]})})]})]})]})}function $({icon:e,children:t,onSelect:n,danger:i}){return(0,K.jsxs)(xe,{onSelect:n,className:r(`flex h-8 cursor-default items-center gap-2 rounded-[7px] px-2 text-[12.5px] text-fg outline-none data-[highlighted]:bg-hover [&_svg]:size-[14px] [&_svg]:text-fg-3`,i&&`text-bad [&_svg]:text-bad`),children:[e,t]})}function Nt({detail:e,report:t,t:n,busy:a,open:o}){let{meta:c}=e;if(c.source===`replay`&&c.replayOf&&!a){let e=c.replayOf;return(0,K.jsxs)(`section`,{className:`flex items-center gap-3 rounded-[16px] bg-raised p-6 ring-1 ring-inset ring-line`,children:[(0,K.jsx)(U,{className:`size-5 text-ai`}),(0,K.jsx)(`div`,{className:`text-[13.5px] text-fg-2`,children:`A replay of another session’s steps, to check its fixes. Its results are in that session’s report.`}),(0,K.jsx)(E,{size:`sm`,className:`ms-auto`,onClick:()=>x.openReport(e),children:`Open that report`})]})}if(a||!t)return(0,K.jsx)(`section`,{className:`rounded-[16px] bg-raised p-6 ring-1 ring-inset ring-line`,children:(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[c.status===`failed`?(0,K.jsx)(w,{className:`size-5 text-bad`}):(0,K.jsx)(s,{className:`size-5 text-ai`}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`text-[15px] font-semibold text-fg`,children:c.status===`failed`?`The report couldn’t be finished`:c.status===`recording`?`Still recording…`:`Preparing the report`}),(0,K.jsx)(`div`,{className:r(`mt-0.5 text-[12.5px]`,c.status===`failed`?`text-bad`:`shimmer-text`),children:c.status===`failed`?c.error:c.stage||`Working`})]}),c.status===`failed`&&(0,K.jsx)(E,{size:`sm`,className:`ms-auto`,icon:(0,K.jsx)(A,{}),onClick:()=>void x.regenerate(c.id,!0),children:`Try again`})]})});let l={ship:`bg-ok-soft text-ok`,"fix-first":`bg-warn-soft text-warn`,blocked:`bg-bad-soft text-bad`}[t.verdict],u=t.ms?Math.round(t.ms/1e3):null;return(0,K.jsxs)(`section`,{className:`relative overflow-hidden rounded-[16px] bg-raised p-6 ring-1 ring-inset ring-line`,children:[(0,K.jsx)(`div`,{className:`pointer-events-none absolute -end-24 -top-24 size-72 rounded-full bg-ai-soft blur-3xl`}),(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(`span`,{className:r(`inline-flex h-6 items-center rounded-full px-2.5 text-[12px] font-semibold`,l),"data-verdict-badge":!0,children:t.verdict===`ship`&&!o?n.clean:n.verdict[t.verdict]}),(0,K.jsx)(`h1`,{className:`mt-3 text-[24px] font-semibold leading-tight tracking-[-0.02em] text-fg`,children:t.title}),(0,K.jsx)(`p`,{className:`mt-2 max-w-[78ch] text-[14px] leading-relaxed text-fg-2`,children:t.summary}),t.verdict===`ship`&&(0,K.jsx)(Pt,{detail:e,t:n}),(0,K.jsxs)(`p`,{className:`mt-3 flex items-center gap-1.5 text-[11.5px] text-fg-3`,children:[t.source===`local`?(0,K.jsx)(z,{className:`size-3.5`}):(0,K.jsx)(i,{className:`size-3.5 text-ai`}),t.source===`local`?n.writtenLocally:n.writtenBy(g(t.model),u),t.translatedFrom&&(0,K.jsxs)(`span`,{children:[`· `,n.translatedFrom(t.translatedFrom,t.translatedBy&&g(t.translatedBy))]})]})]})]})}function Pt({detail:e,t}){let n=e.analysis;return(0,K.jsxs)(`div`,{className:`mt-4 max-w-[78ch] rounded-[12px] bg-sunken px-3.5 py-3 ring-1 ring-inset ring-line`,"data-scope":!0,children:[(0,K.jsx)(`p`,{className:`text-[12.5px] leading-relaxed text-fg-2`,children:t.scope}),(0,K.jsxs)(`div`,{className:`mt-2.5 flex flex-wrap items-center gap-1.5`,children:[n&&(0,K.jsx)(E,{size:`sm`,icon:(0,K.jsx)(a,{}),title:t.addCheckHint,onClick:()=>(x.closeReport(),m.checkSession(n,e.meta.appUrl)),"data-add-check":!0,children:t.addCheck}),e.meta.source!==`autopilot`&&(0,K.jsx)(E,{size:`sm`,variant:`ghost`,icon:(0,K.jsx)(se,{}),onClick:()=>{x.closeReport(),T.getState().setUi({panelOpen:!0,panelTab:`sessions`}),setTimeout(()=>document.querySelector(`[data-autopilot-goal]`)?.focus(),250)},"data-try-autopilot":!0,children:t.tryAutopilot})]})]})}function Ft({report:e,t}){let[n,a]=(0,G.useState)(new Set),o=C();if(!e.suggestions.length)return null;let s=[`fix`,`improve`,`add`].map(t=>({k:t,items:e.suggestions.map((e,t)=>({s:e,i:t})).filter(({s:e})=>e.kind===t)})).filter(e=>e.items.length),c=e=>{let t=new Set(n);t.has(e)?t.delete(e):t.add(e),a(t)},l=()=>{let t=e.suggestions.filter((e,t)=>n.has(t));x.closeReport(),m.implementSuggestions(t,e)},u=n.size===e.suggestions.length;return(0,K.jsxs)(`section`,{className:`space-y-3`,"data-suggestions":!0,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`h2`,{className:`flex items-center gap-2 text-[15px] font-semibold text-fg`,children:[(0,K.jsx)(z,{className:`size-4 text-fg-3`}),t.suggestions]}),(0,K.jsx)(`span`,{className:`text-[11.5px] text-fg-3`,children:t.pickHint(o)}),(0,K.jsxs)(`div`,{className:`ms-auto flex items-center gap-1.5`,children:[(0,K.jsx)(E,{size:`sm`,variant:`ghost`,onClick:()=>a(u?new Set:new Set(e.suggestions.map((e,t)=>t))),children:u?t.selectNone:t.selectAll}),(0,K.jsx)(E,{size:`sm`,variant:`ai`,icon:(0,K.jsx)(i,{}),disabled:!n.size,onClick:l,"data-implement":!0,children:t.implementSelected(n.size)})]})]}),(0,K.jsx)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:s.map(e=>(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(`div`,{className:`text-[11.5px] font-semibold uppercase tracking-[0.06em] text-fg-3`,children:t[e.k]}),e.items.map(({s:e,i})=>(0,K.jsxs)(`label`,{"data-hand":!0,className:r(`flex cursor-default gap-2.5 rounded-[12px] bg-raised p-3 ring-1 ring-inset transition-shadow`,n.has(i)?`ring-ai-line`:`ring-line hover:ring-line-strong`),children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:n.has(i),onChange:()=>c(i),className:`mt-0.5 size-3.5 shrink-0 accent-[var(--ai)]`}),(0,K.jsxs)(`span`,{className:`min-w-0`,children:[(0,K.jsx)(`span`,{className:`block text-[13px] font-medium leading-snug text-fg`,children:e.title}),(0,K.jsx)(`span`,{className:`mt-1 block text-[12px] leading-relaxed text-fg-3`,children:e.why}),(0,K.jsx)(`span`,{className:`mt-2 inline-block rounded-[5px] bg-active px-1.5 text-[10.5px] text-fg-2`,children:t.effortIs(t.effort[e.effort])})]})]},i))]},e.k))})]})}function It({report:e,t}){let n=[{title:t.journey,items:e.journey,icon:(0,K.jsx)(V,{className:`size-4 text-fg-3`}),ordered:!0},{title:t.positives,items:e.positives,icon:(0,K.jsx)(ie,{className:`size-4 text-ok`}),ordered:!1},{title:t.nextSteps,items:e.nextSteps,icon:(0,K.jsx)(b,{className:`size-4 text-ai`}),ordered:!0}].filter(e=>e.items.length);return n.length?(0,K.jsx)(`section`,{className:`grid gap-3 md:grid-cols-3`,children:n.map(e=>(0,K.jsxs)(`div`,{className:`rounded-[14px] bg-raised p-4 ring-1 ring-inset ring-line`,children:[(0,K.jsxs)(`h3`,{className:`mb-2 flex items-center gap-2 text-[13px] font-semibold text-fg`,children:[e.icon,e.title]}),(0,K.jsx)(`ol`,{className:r(`space-y-1.5 text-[12.5px] leading-relaxed text-fg-2`,e.ordered?`list-decimal ps-4`:`list-disc ps-4`),children:e.items.map((e,t)=>(0,K.jsx)(`li`,{children:e},t))})]},e.title))}):null}export{Tt as ReportView};