@vostride/agent-qa-dashboard-ui 0.0.1 → 0.1.2

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 (180) hide show
  1. package/LICENSE.md +105 -0
  2. package/NOTICE.md +11 -0
  3. package/dist/assets/abap-tccnpReA.js +1 -0
  4. package/dist/assets/apex-BKVkKsbj.js +1 -0
  5. package/dist/assets/arrow-up-down-DyIZvSrC.js +1 -0
  6. package/dist/assets/azcli-BRcTI6AW.js +1 -0
  7. package/dist/assets/badge-BbhOGRC0.js +1 -0
  8. package/dist/assets/bat-CY1d4Jjr.js +1 -0
  9. package/dist/assets/batch-action-bar-CZxUcNFZ.js +1 -0
  10. package/dist/assets/bicep--LouBhCq.js +2 -0
  11. package/dist/assets/cameligo-DSekJmSA.js +1 -0
  12. package/dist/assets/chunk-CilyBKbf.js +1 -0
  13. package/dist/assets/circle-alert-pBH5T6su.js +1 -0
  14. package/dist/assets/circle-x-DLBotPS8.js +1 -0
  15. package/dist/assets/clojure-GBhsYY7r.js +1 -0
  16. package/dist/assets/codicon-ngg6Pgfi.ttf +0 -0
  17. package/dist/assets/coffee-9z_JJIkP.js +1 -0
  18. package/dist/assets/config-BfxB7vJt.js +10 -0
  19. package/dist/assets/copy-Gj5_oF-8.js +1 -0
  20. package/dist/assets/cpp-D7LwQw_o.js +1 -0
  21. package/dist/assets/csharp-Df6S3RJJ.js +1 -0
  22. package/dist/assets/csp-AyuN80rc.js +1 -0
  23. package/dist/assets/css-CYIs0S-t.js +3 -0
  24. package/dist/assets/css.worker-Wv5dxAWO.js +89 -0
  25. package/dist/assets/cssMode-BB-fH2D6.js +1 -0
  26. package/dist/assets/cypher-CWTgbj6F.js +1 -0
  27. package/dist/assets/dart-BkjNQt7D.js +1 -0
  28. package/dist/assets/display-step-CV3zilMS.js +1 -0
  29. package/dist/assets/dist-DFSjTjXY.js +1 -0
  30. package/dist/assets/dist-DZYW0-Ta.js +1 -0
  31. package/dist/assets/dist-o2A-YJGQ.js +1 -0
  32. package/dist/assets/dockerfile-jNxF4_km.js +1 -0
  33. package/dist/assets/ecl-CybE3oEZ.js +1 -0
  34. package/dist/assets/editor-Br_kD0ds.css +1 -0
  35. package/dist/assets/editor.api2-DEGvZ9jW.js +872 -0
  36. package/dist/assets/editor.worker-Bd9IXS8d.js +26 -0
  37. package/dist/assets/elixir-CdaOBnQZ.js +1 -0
  38. package/dist/assets/empty-state-Dluv5C1Q.js +1 -0
  39. package/dist/assets/external-link-BZ9gsZx_.js +1 -0
  40. package/dist/assets/eye-CZ7GiZXJ.js +1 -0
  41. package/dist/assets/file-code-GHpcb0ud.js +1 -0
  42. package/dist/assets/file-search-CIA16Vb8.js +1 -0
  43. package/dist/assets/filename-validation-BOmZP9gf.js +1 -0
  44. package/dist/assets/flow9-0HKoddfT.js +1 -0
  45. package/dist/assets/format-BpI4TiHn.js +1 -0
  46. package/dist/assets/freemarker2-BZ9nT_ca.js +3 -0
  47. package/dist/assets/fsharp-B4rCGS2D.js +1 -0
  48. package/dist/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
  49. package/dist/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
  50. package/dist/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
  51. package/dist/assets/geist-mono-cyrillic-wght-normal-BZdD_g9V.woff2 +0 -0
  52. package/dist/assets/geist-mono-latin-ext-wght-normal-b6lpi8_2.woff2 +0 -0
  53. package/dist/assets/geist-mono-latin-wght-normal-Cjtb1TV-.woff2 +0 -0
  54. package/dist/assets/go-BMkOAZO-.js +1 -0
  55. package/dist/assets/graphql-CT1i0Azo.js +1 -0
  56. package/dist/assets/grip-vertical-aDoBVncr.js +1 -0
  57. package/dist/assets/handlebars-CcFgORss.js +1 -0
  58. package/dist/assets/hcl-Dqo24S10.js +1 -0
  59. package/dist/assets/hook-editor-Dvrur2VR.js +1 -0
  60. package/dist/assets/hook-runtime-ChJ0-jZo.js +5 -0
  61. package/dist/assets/hook-viewer-DwQt3CRN.js +1 -0
  62. package/dist/assets/hooks-DcW2AVgE.js +1 -0
  63. package/dist/assets/html-C5cEOw4y.js +1 -0
  64. package/dist/assets/html.worker-CQP8QQsS.js +502 -0
  65. package/dist/assets/htmlMode-B54wW7aG.js +1 -0
  66. package/dist/assets/id-badge-Dzm7eQ9l.js +111 -0
  67. package/dist/assets/index-B3xPCIyH.js +57 -0
  68. package/dist/assets/index-cLLRFOsN.css +2 -0
  69. package/dist/assets/ini-B2qo6Bwi.js +1 -0
  70. package/dist/assets/insights-line-grid-G3ouKANt.js +39 -0
  71. package/dist/assets/insights-rNBE_Oot.js +1 -0
  72. package/dist/assets/java-BIPaikgB.js +1 -0
  73. package/dist/assets/javascript-jZJvS0Ev.js +1 -0
  74. package/dist/assets/json.worker-DzV-CpCQ.js +58 -0
  75. package/dist/assets/jsonMode-BJu_sWuN.js +7 -0
  76. package/dist/assets/julia-DaOMlCPl.js +1 -0
  77. package/dist/assets/kotlin-Bu1Cf0EE.js +1 -0
  78. package/dist/assets/less-CkzKMiAu.js +2 -0
  79. package/dist/assets/lexon-TKzNnbcT.js +1 -0
  80. package/dist/assets/lib-BPEPp1D-.js +4 -0
  81. package/dist/assets/liquid-B0Wk3SRC.js +1 -0
  82. package/dist/assets/live-run-C2WLFzlf.js +1 -0
  83. package/dist/assets/lspLanguageFeatures-Bn8JS-MZ.js +4 -0
  84. package/dist/assets/lua-6W3WJOvj.js +1 -0
  85. package/dist/assets/m3-B_B1XtJr.js +1 -0
  86. package/dist/assets/markdown-LT3qFBoR.js +1 -0
  87. package/dist/assets/marked.esm-Ba5AUJng.js +64 -0
  88. package/dist/assets/mdx-BE6dqG5T.js +1 -0
  89. package/dist/assets/memory-DcKox3BM.js +1 -0
  90. package/dist/assets/memory-product-oHTD8fqS.js +2 -0
  91. package/dist/assets/mips-BuZ0JnPP.js +1 -0
  92. package/dist/assets/monaco-editor-CDJrOpKK.js +2 -0
  93. package/dist/assets/monaco-editor-inner-Q9WqqJ52.js +6 -0
  94. package/dist/assets/monaco.contribution-DTHp-zXN.js +2 -0
  95. package/dist/assets/msdax-BHMmXeIF.js +1 -0
  96. package/dist/assets/mysql-B1RGnQ_F.js +1 -0
  97. package/dist/assets/objective-c-CFGQUdp0.js +1 -0
  98. package/dist/assets/observation-block-DdB7C1c0.js +1 -0
  99. package/dist/assets/observation-markdown-CvCuqq7R.js +1 -0
  100. package/dist/assets/pascal-Bunb0gdj.js +1 -0
  101. package/dist/assets/pascaligo-Ci9pazxY.js +1 -0
  102. package/dist/assets/pencil-BmkcPKBm.js +1 -0
  103. package/dist/assets/perl-Brcsz0QG.js +1 -0
  104. package/dist/assets/pgsql-BeM5icw2.js +1 -0
  105. package/dist/assets/php-D_0c0usD.js +1 -0
  106. package/dist/assets/pla-BXJXsrLp.js +1 -0
  107. package/dist/assets/plus-C6Zz9JLt.js +1 -0
  108. package/dist/assets/popover-CvQRjfg5.js +1 -0
  109. package/dist/assets/postiats-Bh7pQpS0.js +1 -0
  110. package/dist/assets/powerquery-17x2qNlN.js +1 -0
  111. package/dist/assets/powershell-BK7CP1HA.js +1 -0
  112. package/dist/assets/protobuf-BIk_BSvx.js +2 -0
  113. package/dist/assets/pug-AfVB1dqb.js +1 -0
  114. package/dist/assets/python-DYEP_Px-.js +1 -0
  115. package/dist/assets/qsharp-DdD7_Hjo.js +1 -0
  116. package/dist/assets/r-BGqTutCA.js +1 -0
  117. package/dist/assets/razor-BARiZmvH.js +1 -0
  118. package/dist/assets/redis-Dlp6Na1w.js +1 -0
  119. package/dist/assets/redshift-i2kKyIGQ.js +1 -0
  120. package/dist/assets/refresh-cw-v_0wwa0P.js +1 -0
  121. package/dist/assets/resizable-COfX_iMb.js +1 -0
  122. package/dist/assets/restructuredtext-LmY6AGSd.js +1 -0
  123. package/dist/assets/ruby-BxBoU2eR.js +1 -0
  124. package/dist/assets/run-detail-B6QhqCjq.js +1 -0
  125. package/dist/assets/runs-DO4LkmoV.js +1 -0
  126. package/dist/assets/rust-D9N2vQ1K.js +1 -0
  127. package/dist/assets/sb-BLTMTQei.js +1 -0
  128. package/dist/assets/scala-Ctl2an6m.js +1 -0
  129. package/dist/assets/scheme-DWYXU9Gm.js +1 -0
  130. package/dist/assets/scroll-area-DfPMtFw0.js +1 -0
  131. package/dist/assets/scss-Fo6PaAQp.js +3 -0
  132. package/dist/assets/select-B5gV6YUf.js +1 -0
  133. package/dist/assets/shell-gQZQk28C.js +1 -0
  134. package/dist/assets/shortcut-hints-CfVf0REF.js +1 -0
  135. package/dist/assets/solidity-np-sz1ji.js +1 -0
  136. package/dist/assets/sophia-Cpc3f9d7.js +1 -0
  137. package/dist/assets/sparql-BM_09I__.js +1 -0
  138. package/dist/assets/split-button-C7J0EKrF.js +1 -0
  139. package/dist/assets/sql-wg3M4gQ8.js +1 -0
  140. package/dist/assets/square-CvSqzenY.js +1 -0
  141. package/dist/assets/st-CRbYFk1r.js +1 -0
  142. package/dist/assets/step-name-pills-COKv64-4.js +1 -0
  143. package/dist/assets/suite-editor-CaMQ5mWb.js +5 -0
  144. package/dist/assets/suite-navbar-CnJmeIp-.js +1 -0
  145. package/dist/assets/suite-viewer-HsI0Pn4t.js +1 -0
  146. package/dist/assets/suites-Cbjz7uPI.js +1 -0
  147. package/dist/assets/swift-B8HA7HL5.js +1 -0
  148. package/dist/assets/switch-BOdp7A9U.js +1 -0
  149. package/dist/assets/systemverilog-Dm-upaoS.js +1 -0
  150. package/dist/assets/tab-console-CLKFTABo.js +1 -0
  151. package/dist/assets/table-DL0PmHAE.js +1 -0
  152. package/dist/assets/tabs-CfNQIHt-.js +1 -0
  153. package/dist/assets/tcl-BroSe0zp.js +1 -0
  154. package/dist/assets/test-editor-CIRL6zSb.js +9 -0
  155. package/dist/assets/test-navbar-CZhYoxgB.js +7 -0
  156. package/dist/assets/test-viewer-C6Rg-HeW.js +1 -0
  157. package/dist/assets/tests-C0Xhq39F.js +1 -0
  158. package/dist/assets/tests-suites-table-widths-tlOYaS72.js +1 -0
  159. package/dist/assets/textarea-ByegDm2e.js +1 -0
  160. package/dist/assets/trash-2-CawFHfTJ.js +1 -0
  161. package/dist/assets/ts.worker-METxwbDZ.js +67719 -0
  162. package/dist/assets/tsMode-DGJI_hpV.js +11 -0
  163. package/dist/assets/twig-C-LV7gG6.js +1 -0
  164. package/dist/assets/typescript-BrDOgG8S.js +1 -0
  165. package/dist/assets/typespec-DxaoVH5m.js +1 -0
  166. package/dist/assets/use-hook-run-session-Cjqu9VED.js +1 -0
  167. package/dist/assets/use-keyboard-shortcuts-BRF3cm7O.js +1 -0
  168. package/dist/assets/use-page-title-CK82kWb2.js +1 -0
  169. package/dist/assets/use-run-status-favicon-DoJZcfHz.js +1 -0
  170. package/dist/assets/use-selection-queue-CZ4rXNAT.js +1 -0
  171. package/dist/assets/vb-qvhMNncD.js +1 -0
  172. package/dist/assets/viewer-url-state-CZTYs75z.js +1 -0
  173. package/dist/assets/wgsl-CZM87x1c.js +298 -0
  174. package/dist/assets/workers-BbHjH3Kx.js +1 -0
  175. package/dist/assets/xml-6YL6VXLw.js +1 -0
  176. package/dist/assets/yaml-sHG1-XNr.js +1 -0
  177. package/dist/assets/zap-C7OZlYXQ.js +1 -0
  178. package/dist/favicon.svg +3 -0
  179. package/dist/index.html +37 -0
  180. package/package.json +81 -3
@@ -0,0 +1,11 @@
1
+ import{a as e,c as t,i as n,o as r,s as i,u as a}from"./editor.api2-DEGvZ9jW.js";import{t as o}from"./workers-BbHjH3Kx.js";import{n as s}from"./monaco.contribution-DTHp-zXN.js";var c=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=o({moduleId:`vs/language/typescript/tsWorker`,createWorker:()=>new Worker(new URL(`/assets/ts.worker-METxwbDZ.js`,``+import.meta.url),{type:`module`}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(t.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},l={};l[`lib.d.ts`]=!0,l[`lib.decorators.d.ts`]=!0,l[`lib.decorators.legacy.d.ts`]=!0,l[`lib.dom.asynciterable.d.ts`]=!0,l[`lib.dom.d.ts`]=!0,l[`lib.dom.iterable.d.ts`]=!0,l[`lib.es2015.collection.d.ts`]=!0,l[`lib.es2015.core.d.ts`]=!0,l[`lib.es2015.d.ts`]=!0,l[`lib.es2015.generator.d.ts`]=!0,l[`lib.es2015.iterable.d.ts`]=!0,l[`lib.es2015.promise.d.ts`]=!0,l[`lib.es2015.proxy.d.ts`]=!0,l[`lib.es2015.reflect.d.ts`]=!0,l[`lib.es2015.symbol.d.ts`]=!0,l[`lib.es2015.symbol.wellknown.d.ts`]=!0,l[`lib.es2016.array.include.d.ts`]=!0,l[`lib.es2016.d.ts`]=!0,l[`lib.es2016.full.d.ts`]=!0,l[`lib.es2016.intl.d.ts`]=!0,l[`lib.es2017.arraybuffer.d.ts`]=!0,l[`lib.es2017.d.ts`]=!0,l[`lib.es2017.date.d.ts`]=!0,l[`lib.es2017.full.d.ts`]=!0,l[`lib.es2017.intl.d.ts`]=!0,l[`lib.es2017.object.d.ts`]=!0,l[`lib.es2017.sharedmemory.d.ts`]=!0,l[`lib.es2017.string.d.ts`]=!0,l[`lib.es2017.typedarrays.d.ts`]=!0,l[`lib.es2018.asyncgenerator.d.ts`]=!0,l[`lib.es2018.asynciterable.d.ts`]=!0,l[`lib.es2018.d.ts`]=!0,l[`lib.es2018.full.d.ts`]=!0,l[`lib.es2018.intl.d.ts`]=!0,l[`lib.es2018.promise.d.ts`]=!0,l[`lib.es2018.regexp.d.ts`]=!0,l[`lib.es2019.array.d.ts`]=!0,l[`lib.es2019.d.ts`]=!0,l[`lib.es2019.full.d.ts`]=!0,l[`lib.es2019.intl.d.ts`]=!0,l[`lib.es2019.object.d.ts`]=!0,l[`lib.es2019.string.d.ts`]=!0,l[`lib.es2019.symbol.d.ts`]=!0,l[`lib.es2020.bigint.d.ts`]=!0,l[`lib.es2020.d.ts`]=!0,l[`lib.es2020.date.d.ts`]=!0,l[`lib.es2020.full.d.ts`]=!0,l[`lib.es2020.intl.d.ts`]=!0,l[`lib.es2020.number.d.ts`]=!0,l[`lib.es2020.promise.d.ts`]=!0,l[`lib.es2020.sharedmemory.d.ts`]=!0,l[`lib.es2020.string.d.ts`]=!0,l[`lib.es2020.symbol.wellknown.d.ts`]=!0,l[`lib.es2021.d.ts`]=!0,l[`lib.es2021.full.d.ts`]=!0,l[`lib.es2021.intl.d.ts`]=!0,l[`lib.es2021.promise.d.ts`]=!0,l[`lib.es2021.string.d.ts`]=!0,l[`lib.es2021.weakref.d.ts`]=!0,l[`lib.es2022.array.d.ts`]=!0,l[`lib.es2022.d.ts`]=!0,l[`lib.es2022.error.d.ts`]=!0,l[`lib.es2022.full.d.ts`]=!0,l[`lib.es2022.intl.d.ts`]=!0,l[`lib.es2022.object.d.ts`]=!0,l[`lib.es2022.regexp.d.ts`]=!0,l[`lib.es2022.string.d.ts`]=!0,l[`lib.es2023.array.d.ts`]=!0,l[`lib.es2023.collection.d.ts`]=!0,l[`lib.es2023.d.ts`]=!0,l[`lib.es2023.full.d.ts`]=!0,l[`lib.es2023.intl.d.ts`]=!0,l[`lib.es2024.arraybuffer.d.ts`]=!0,l[`lib.es2024.collection.d.ts`]=!0,l[`lib.es2024.d.ts`]=!0,l[`lib.es2024.full.d.ts`]=!0,l[`lib.es2024.object.d.ts`]=!0,l[`lib.es2024.promise.d.ts`]=!0,l[`lib.es2024.regexp.d.ts`]=!0,l[`lib.es2024.sharedmemory.d.ts`]=!0,l[`lib.es2024.string.d.ts`]=!0,l[`lib.es5.d.ts`]=!0,l[`lib.es6.d.ts`]=!0,l[`lib.esnext.array.d.ts`]=!0,l[`lib.esnext.collection.d.ts`]=!0,l[`lib.esnext.d.ts`]=!0,l[`lib.esnext.decorators.d.ts`]=!0,l[`lib.esnext.disposable.d.ts`]=!0,l[`lib.esnext.error.d.ts`]=!0,l[`lib.esnext.float16.d.ts`]=!0,l[`lib.esnext.full.d.ts`]=!0,l[`lib.esnext.intl.d.ts`]=!0,l[`lib.esnext.iterator.d.ts`]=!0,l[`lib.esnext.promise.d.ts`]=!0,l[`lib.esnext.sharedmemory.d.ts`]=!0,l[`lib.scripthost.d.ts`]=!0,l[`lib.webworker.asynciterable.d.ts`]=!0,l[`lib.webworker.d.ts`]=!0,l[`lib.webworker.importscripts.d.ts`]=!0,l[`lib.webworker.iterable.d.ts`]=!0;function u(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;e<n;e++)r+=` `}if(r+=e.messageText,n++,e.next)for(let i of e.next)r+=u(i,t,n);return r}function d(e){return e?e.map(e=>e.text).join(``):``}var f=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},p=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf(`/lib.`)===0?!!l[e.path.slice(1)]:!1}getOrCreateModel(e){let n=i.parse(e),r=t.getModel(n);if(r)return r;if(this.isLibFile(n)&&this._hasFetchedLibFiles)return t.createModel(this._libFiles[n.path.slice(1)],`typescript`,n);let a=s.getExtraLibs()[e];return a?t.createModel(a.content,`typescript`,n):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},m=class extends f{constructor(e,n,r,i){super(i),this._libFiles=e,this._defaults=n,this._selector=r,this._disposables=[],this._listener=Object.create(null);let a=e=>{if(e.getLanguageId()!==r)return;let n=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},i,a=e.onDidChangeContent(()=>{clearTimeout(i),i=window.setTimeout(n,500)}),o=e.onDidChangeAttached(()=>{let{onlyVisible:r}=this._defaults.getDiagnosticsOptions();r&&(e.isAttachedToEditor()?n():t.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){a.dispose(),o.dispose(),clearTimeout(i)}},n()},o=e=>{t.setModelMarkers(e,this._selector,[]);let n=e.uri.toString();this._listener[n]&&(this._listener[n].dispose(),delete this._listener[n])};this._disposables.push(t.onDidCreateModel(e=>a(e))),this._disposables.push(t.onWillDisposeModel(o)),this._disposables.push(t.onDidChangeModelLanguage(e=>{o(e.model),a(e.model)})),this._disposables.push({dispose(){for(let e of t.getModels())o(e)}});let s=()=>{for(let e of t.getModels())o(e),a(e)};this._disposables.push(this._defaults.onDidChange(s)),this._disposables.push(this._defaults.onDidExtraLibsChange(s)),t.getModels().forEach(e=>a(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let n=await this._worker(e.uri);if(e.isDisposed())return;let r=[],{noSyntaxValidation:a,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();a||r.push(n.getSyntacticDiagnostics(e.uri.toString())),o||r.push(n.getSemanticDiagnostics(e.uri.toString())),s||r.push(n.getSuggestionDiagnostics(e.uri.toString()));let c=await Promise.all(r);if(!c||e.isDisposed())return;let l=c.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),u=l.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?i.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&t.setModelMarkers(e,this._selector,l.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(t,n){let r=n.start||0,i=n.length||1,{lineNumber:a,column:o}=t.getPositionAt(r),{lineNumber:s,column:c}=t.getPositionAt(r+i),l=[];return n.reportsUnnecessary&&l.push(e.Unnecessary),n.reportsDeprecated&&l.push(e.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(n.category),startLineNumber:a,startColumn:o,endLineNumber:s,endColumn:c,message:u(n.messageText,`
2
+ `),code:n.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(t,n.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];let n=[];return t.forEach(t=>{let r=e;if(t.file&&(r=this._libFiles.getOrCreateModel(t.file.fileName)),!r)return;let i=t.start||0,a=t.length||1,{lineNumber:o,column:s}=r.getPositionAt(i),{lineNumber:c,column:l}=r.getPositionAt(i+a);n.push({resource:r.uri,startLineNumber:o,startColumn:s,endLineNumber:c,endColumn:l,message:u(t.messageText,`
3
+ `)})}),n}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return n.Error;case 3:return n.Info;case 0:return n.Warning;case 2:return n.Hint}return n.Info}},h=class e extends f{get triggerCharacters(){return[`.`]}async provideCompletionItems(t,n,i,o){let s=t.getWordUntilPosition(n),c=new r(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn),l=t.uri,u=t.getOffsetAt(n),d=await this._worker(l);if(t.isDisposed())return;let f=await d.getCompletionsAtPosition(l.toString(),u);if(!(!f||t.isDisposed()))return{suggestions:f.entries.map(i=>{let o=c;if(i.replacementSpan){let e=t.getPositionAt(i.replacementSpan.start),n=t.getPositionAt(i.replacementSpan.start+i.replacementSpan.length);o=new r(e.lineNumber,e.column,n.lineNumber,n.column)}let s=[];return i.kindModifiers!==void 0&&i.kindModifiers.indexOf(`deprecated`)!==-1&&s.push(a.CompletionItemTag.Deprecated),{uri:l,position:n,offset:u,range:o,label:i.name,insertText:i.name,sortText:i.sortText,kind:e.convertKind(i.kind),tags:s}})}}async resolveCompletionItem(t,n){let r=t,i=r.uri,a=r.position,o=r.offset,s=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),o,r.label);return s?{uri:i,position:a,label:s.name,kind:e.convertKind(s.kind),detail:d(s.displayParts),documentation:{value:e.createDocumentationString(s)}}:r}static convertKind(e){switch(e){case C.primitiveType:case C.keyword:return a.CompletionItemKind.Keyword;case C.variable:case C.localVariable:return a.CompletionItemKind.Variable;case C.memberVariable:case C.memberGetAccessor:case C.memberSetAccessor:return a.CompletionItemKind.Field;case C.function:case C.memberFunction:case C.constructSignature:case C.callSignature:case C.indexSignature:return a.CompletionItemKind.Function;case C.enum:return a.CompletionItemKind.Enum;case C.module:return a.CompletionItemKind.Module;case C.class:return a.CompletionItemKind.Class;case C.interface:return a.CompletionItemKind.Interface;case C.warning:return a.CompletionItemKind.File}return a.CompletionItemKind.Property}static createDocumentationString(e){let t=d(e.documentation);if(e.tags)for(let n of e.tags)t+=`
4
+
5
+ ${g(n)}`;return t}};function g(e){let t=`*@${e.name}*`;if(e.name===`param`&&e.text){let[n,...r]=e.text;t+=`\`${n.text}\``,r.length>0&&(t+=` \u2014 ${r.map(e=>e.text).join(` `)}`)}else Array.isArray(e.text)?t+=` \u2014 ${e.text.map(e=>e.text).join(` `)}`:e.text&&(t+=` \u2014 ${e.text}`);return t}var _=class e extends f{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=[`(`,`,`]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case a.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:`retrigger`,triggerCharacter:e.triggerCharacter}:{kind:`characterTyped`,triggerCharacter:e.triggerCharacter}:{kind:`invoked`};case a.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:`retrigger`}:{kind:`invoked`};case a.SignatureHelpTriggerKind.Invoke:default:return{kind:`invoked`}}}async provideSignatureHelp(t,n,r,i){let a=t.uri,o=t.getOffsetAt(n),s=await this._worker(a);if(t.isDisposed())return;let c=await s.getSignatureHelpItems(a.toString(),o,{triggerReason:e._toSignatureHelpTriggerReason(i)});if(!c||t.isDisposed())return;let l={activeSignature:c.selectedItemIndex,activeParameter:c.argumentIndex,signatures:[]};return c.items.forEach(e=>{let t={label:``,parameters:[]};t.documentation={value:d(e.documentation)},t.label+=d(e.prefixDisplayParts),e.parameters.forEach((n,r,i)=>{let a=d(n.displayParts),o={label:a,documentation:{value:d(n.documentation)}};t.label+=a,t.parameters.push(o),r<i.length-1&&(t.label+=d(e.separatorDisplayParts))}),t.label+=d(e.suffixDisplayParts),l.signatures.push(t)}),{value:l,dispose(){}}}},v=class extends f{async provideHover(e,t,n){let r=e.uri,i=e.getOffsetAt(t),a=await this._worker(r);if(e.isDisposed())return;let o=await a.getQuickInfoAtPosition(r.toString(),i);if(!o||e.isDisposed())return;let s=d(o.documentation),c=o.tags?o.tags.map(e=>g(e)).join(`
6
+
7
+ `):``,l=d(o.displayParts);return{range:this._textSpanToRange(e,o.textSpan),contents:[{value:"```typescript\n"+l+"\n```\n"},{value:s+(c?`
8
+
9
+ `+c:``)}]}}},y=class extends f{async provideDocumentHighlights(e,t,n){let r=e.uri,i=e.getOffsetAt(t),o=await this._worker(r);if(e.isDisposed())return;let s=await o.getDocumentHighlights(r.toString(),i,[r.toString()]);if(!(!s||e.isDisposed()))return s.flatMap(t=>t.highlightSpans.map(t=>({range:this._textSpanToRange(e,t.textSpan),kind:t.kind===`writtenReference`?a.DocumentHighlightKind.Write:a.DocumentHighlightKind.Text})))}},b=class extends f{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,n){let r=e.uri,a=e.getOffsetAt(t),o=await this._worker(r);if(e.isDisposed())return;let s=await o.getDefinitionAtPosition(r.toString(),a);if(!s||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(s.map(e=>i.parse(e.fileName))),e.isDisposed()))return;let c=[];for(let e of s){let t=this._libFiles.getOrCreateModel(e.fileName);t&&c.push({uri:t.uri,range:this._textSpanToRange(t,e.textSpan)})}return c}},x=class extends f{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,n,r){let a=e.uri,o=e.getOffsetAt(t),s=await this._worker(a);if(e.isDisposed())return;let c=await s.getReferencesAtPosition(a.toString(),o);if(!c||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(c.map(e=>i.parse(e.fileName))),e.isDisposed()))return;let l=[];for(let e of c){let t=this._libFiles.getOrCreateModel(e.fileName);t&&l.push({uri:t.uri,range:this._textSpanToRange(t,e.textSpan)})}return l}},S=class extends f{async provideDocumentSymbols(e,t){let n=e.uri,r=await this._worker(n);if(e.isDisposed())return;let i=await r.getNavigationTree(n.toString());if(!i||e.isDisposed())return;let o=(t,n)=>({name:t.text,detail:``,kind:w[t.kind]||a.SymbolKind.Variable,range:this._textSpanToRange(e,t.spans[0]),selectionRange:this._textSpanToRange(e,t.spans[0]),tags:[],children:t.childItems?.map(e=>o(e,t.text)),containerName:n});return i.childItems?i.childItems.map(e=>o(e)):[]}},C=class{};C.unknown=``,C.keyword=`keyword`,C.script=`script`,C.module=`module`,C.class=`class`,C.interface=`interface`,C.type=`type`,C.enum=`enum`,C.variable=`var`,C.localVariable=`local var`,C.function=`function`,C.localFunction=`local function`,C.memberFunction=`method`,C.memberGetAccessor=`getter`,C.memberSetAccessor=`setter`,C.memberVariable=`property`,C.constructorImplementation=`constructor`,C.callSignature=`call`,C.indexSignature=`index`,C.constructSignature=`construct`,C.parameter=`parameter`,C.typeParameter=`type parameter`,C.primitiveType=`primitive type`,C.label=`label`,C.alias=`alias`,C.const=`const`,C.let=`let`,C.warning=`warning`;var w=Object.create(null);w[C.module]=a.SymbolKind.Module,w[C.class]=a.SymbolKind.Class,w[C.enum]=a.SymbolKind.Enum,w[C.interface]=a.SymbolKind.Interface,w[C.memberFunction]=a.SymbolKind.Method,w[C.memberVariable]=a.SymbolKind.Property,w[C.memberGetAccessor]=a.SymbolKind.Property,w[C.memberSetAccessor]=a.SymbolKind.Property,w[C.variable]=a.SymbolKind.Variable,w[C.const]=a.SymbolKind.Variable,w[C.localVariable]=a.SymbolKind.Variable,w[C.variable]=a.SymbolKind.Variable,w[C.function]=a.SymbolKind.Function,w[C.localFunction]=a.SymbolKind.Function;var T=class extends f{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:`
10
+ `,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}},E=class extends T{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,n,r){let i=e.uri,a=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),o=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(i);if(e.isDisposed())return;let c=await s.getFormattingEditsForRange(i.toString(),a,o,T._convertOptions(n));if(!(!c||e.isDisposed()))return c.map(t=>this._convertTextChanges(e,t))}},D=class extends T{get autoFormatTriggerCharacters(){return[`;`,`}`,`
11
+ `]}async provideOnTypeFormattingEdits(e,t,n,r,i){let a=e.uri,o=e.getOffsetAt(t),s=await this._worker(a);if(e.isDisposed())return;let c=await s.getFormattingEditsAfterKeystroke(a.toString(),o,n,T._convertOptions(r));if(!(!c||e.isDisposed()))return c.map(t=>this._convertTextChanges(e,t))}},O=class extends T{async provideCodeActions(e,t,n,r){let i=e.uri,a=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),o=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=T._convertOptions(e.getOptions()),c=n.markers.filter(e=>e.code).map(e=>e.code).map(Number),l=await this._worker(i);if(e.isDisposed())return;let u=await l.getCodeFixesAtPosition(i.toString(),a,o,c,s);return!u||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:u.filter(e=>e.changes.filter(e=>e.isNewFile).length===0).map(t=>this._tsCodeFixActionToMonacoCodeAction(e,n,t)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,n){let r=[];for(let t of n.changes)for(let n of t.textChanges)r.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,n.span),text:n.newText}});return{title:n.description,edit:{edits:r},diagnostics:t.markers,kind:`quickfix`}}},k=class extends f{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,n,r){let i=e.uri,a=i.toString(),o=e.getOffsetAt(t),s=await this._worker(i);if(e.isDisposed())return;let c=await s.getRenameInfo(a,o,{allowRenameOfImportPath:!1});if(c.canRename===!1)return{edits:[],rejectReason:c.localizedErrorMessage};if(c.fileToRename!==void 0)throw Error(`Renaming files is not supported.`);let l=await s.findRenameLocations(a,o,!1,!1,!1);if(!l||e.isDisposed())return;let u=[];for(let e of l){let t=this._libFiles.getOrCreateModel(e.fileName);if(t)u.push({resource:t.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(t,e.textSpan),text:n}});else throw Error(`Unknown file ${e.fileName}.`)}return{edits:u}}},A=class extends f{async provideInlayHints(e,t,n){let r=e.uri,i=r.toString(),a=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),o=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(r);return e.isDisposed()?null:{hints:(await s.provideInlayHints(i,a,o)).map(t=>({...t,label:t.text,position:e.getPositionAt(t.position),kind:this._convertHintKind(t.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case`Parameter`:return a.InlayHintKind.Parameter;case`Type`:return a.InlayHintKind.Type;default:return a.InlayHintKind.Type}}},j,M;function N(e){M=L(e,`typescript`)}function P(e){j=L(e,`javascript`)}function F(){return new Promise((e,t)=>{if(!j)return t(`JavaScript not registered!`);e(j)})}function I(){return new Promise((e,t)=>{if(!M)return t(`TypeScript not registered!`);e(M)})}function L(e,t){let n=[],r=new c(t,e),i=(...e)=>r.getLanguageServiceWorker(...e),o=new p(i);function s(){let{modeConfiguration:r}=e;R(n),r.completionItems&&n.push(a.registerCompletionItemProvider(t,new h(i))),r.signatureHelp&&n.push(a.registerSignatureHelpProvider(t,new _(i))),r.hovers&&n.push(a.registerHoverProvider(t,new v(i))),r.documentHighlights&&n.push(a.registerDocumentHighlightProvider(t,new y(i))),r.definitions&&n.push(a.registerDefinitionProvider(t,new b(o,i))),r.references&&n.push(a.registerReferenceProvider(t,new x(o,i))),r.documentSymbols&&n.push(a.registerDocumentSymbolProvider(t,new S(i))),r.rename&&n.push(a.registerRenameProvider(t,new k(o,i))),r.documentRangeFormattingEdits&&n.push(a.registerDocumentRangeFormattingEditProvider(t,new E(i))),r.onTypeFormattingEdits&&n.push(a.registerOnTypeFormattingEditProvider(t,new D(i))),r.codeActions&&n.push(a.registerCodeActionProvider(t,new O(i))),r.inlayHints&&n.push(a.registerInlayHintsProvider(t,new A(i))),r.diagnostics&&n.push(new m(o,e,t,i))}return s(),i}function R(e){for(;e.length;)e.pop().dispose()}export{f as Adapter,O as CodeActionAdaptor,b as DefinitionAdapter,m as DiagnosticsAdapter,y as DocumentHighlightAdapter,E as FormatAdapter,T as FormatHelper,D as FormatOnTypeAdapter,A as InlayHintsAdapter,C as Kind,p as LibFiles,S as OutlineAdapter,v as QuickInfoAdapter,x as ReferenceAdapter,k as RenameAdapter,_ as SignatureHelpAdapter,h as SuggestAdapter,c as WorkerManager,u as flattenDiagnosticMessageText,F as getJavaScriptWorker,I as getTypeScriptWorker,P as setupJavaScript,N as setupTypeScript};
@@ -0,0 +1 @@
1
+ var e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`{#`,`#}`]},brackets:[[`{#`,`#}`],[`{%`,`%}`],[`{{`,`}}`],[`(`,`)`],[`[`,`]`],[`<!--`,`-->`],[`<`,`>`]],autoClosingPairs:[{open:`{# `,close:` #}`},{open:`{% `,close:` %}`},{open:`{{ `,close:` }}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`<`,close:`>`}]},t={defaultToken:``,tokenPostfix:``,ignoreCase:!0,keywords:`apply.autoescape.block.deprecated.do.embed.extends.flush.for.from.if.import.include.macro.sandbox.set.use.verbatim.with.endapply.endautoescape.endblock.endembed.endfor.endif.endmacro.endsandbox.endset.endwith.true.false`.split(`.`),tokenizer:{root:[[/\s+/],[/{#/,`comment.twig`,`@commentState`],[/{%[-~]?/,`delimiter.twig`,`@blockState`],[/{{[-~]?/,`delimiter.twig`,`@variableState`],[/<!DOCTYPE/,`metatag.html`,`@doctype`],[/<!--/,`comment.html`,`@comment`],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,[`delimiter.html`,`tag.html`,``,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/</,`delimiter.html`],[/[^<{]+/]],commentState:[[/#}/,`comment.twig`,`@pop`],[/./,`comment.twig`]],blockState:[[/[-~]?%}/,`delimiter.twig`,`@pop`],[/\s+/],[/(verbatim)(\s*)([-~]?%})/,[`keyword.twig`,``,{token:`delimiter.twig`,next:`@rawDataState`}]],{include:`expression`}],rawDataState:[[/({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/,[`delimiter.twig`,``,`keyword.twig`,``,{token:`delimiter.twig`,next:`@popall`}]],[/./,`string.twig`]],variableState:[[/[-~]?}}/,`delimiter.twig`,`@pop`],{include:`expression`}],stringState:[[/"/,`string.twig`,`@pop`],[/#{\s*/,`string.twig`,`@interpolationState`],[/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/,`string.twig`]],interpolationState:[[/}/,`string.twig`,`@pop`],{include:`expression`}],expression:[[/\s+/],[/\+|-|\/{1,2}|%|\*{1,2}/,`operators.twig`],[/(and|or|not|b-and|b-xor|b-or)(\s+)/,[`operators.twig`,``]],[/==|!=|<|>|>=|<=/,`operators.twig`],[/(starts with|ends with|matches)(\s+)/,[`operators.twig`,``]],[/(in)(\s+)/,[`operators.twig`,``]],[/(is)(\s+)/,[`operators.twig`,``]],[/\||~|:|\.{1,2}|\?{1,2}/,`operators.twig`],[/[^\W\d][\w]*/,{cases:{"@keywords":`keyword.twig`,"@default":`variable.twig`}}],[/\d+(\.\d+)?/,`number.twig`],[/\(|\)|\[|\]|{|}|,/,`delimiter.twig`],[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/,`string.twig`],[/"/,`string.twig`,`@stringState`],[/=>/,`operators.twig`],[/=/,`operators.twig`]],doctype:[[/[^>]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value.html`],[/'([^']*)'/,`attribute.value.html`],[/[\w\-]+/,`attribute.name.html`],[/=/,`delimiter.html`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name.html`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value.html`],[/'([^']*)'/,`attribute.value.html`],[/[\w\-]+/,`attribute.name.html`],[/=/,`delimiter.html`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter.html`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value.html`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value.html`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value.html`],[/'([^']*)'/,`attribute.value.html`],[/[\w\-]+/,`attribute.name.html`],[/=/,`delimiter.html`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name.html`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value.html`],[/'([^']*)'/,`attribute.value.html`],[/[\w\-]+/,`attribute.name.html`],[/=/,`delimiter.html`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter.html`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value.html`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value.html`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value.html`],[/'([^']*)'/,`attribute.value.html`],[/[\w\-]+/,`attribute.name.html`],[/=/,`delimiter.html`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{e as conf,t as language};
@@ -0,0 +1 @@
1
+ import{u as e}from"./editor.api2-DEGvZ9jW.js";var t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:` * `}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:` * `}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:`* `}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]},{open:"`",close:"`",notIn:[`string`,`comment`]},{open:`/**`,close:` */`,notIn:[`string`]}],folding:{markers:{start:RegExp(`^\\s*//\\s*#?region\\b`),end:RegExp(`^\\s*//\\s*#?endregion\\b`)}}},n={defaultToken:`invalid`,tokenPostfix:`.ts`,keywords:`abstract.any.as.asserts.bigint.boolean.break.case.catch.class.continue.const.constructor.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.infer.instanceof.interface.is.keyof.let.module.namespace.never.new.null.number.object.out.package.private.protected.public.override.readonly.require.global.return.satisfies.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.undefined.unique.unknown.var.void.while.with.yield.async.await.of`.split(`.`),operators:`<=.>=.==.!=.===.!==.=>.+.-.**.*./.%.++.--.<<.</.>>.>>>.&.|.^.!.~.&&.||.??.?.:.=.+=.-=.*=.**=./=.%=.<<=.>>=.>>>=.&=.|=.^=.@`.split(`.`),symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,`delimiter.bracket`],{include:`common`}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":`keyword`,"@default":`identifier`}}],[/[A-Z][\w\$]*/,`type.identifier`],{include:`@whitespace`},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:`regexp`,bracket:`@open`,next:`@regexp`}],[/[()\[\]]/,`@brackets`],[/[<>](?!@symbols)/,`@brackets`],[/!(?=([^=]|$))/,`delimiter`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/(@digits)[eE]([\-+]?(@digits))?/,`number.float`],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,`number.float`],[/0[xX](@hexdigits)n?/,`number.hex`],[/0[oO]?(@octaldigits)n?/,`number.octal`],[/0[bB](@binarydigits)n?/,`number.binary`],[/(@digits)n?/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string_double`],[/'/,`string`,`@string_single`],[/`/,`string`,`@string_backtick`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*\*(?!\/)/,`comment.doc`,`@jsdoc`],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],jsdoc:[[/[^\/*]+/,`comment.doc`],[/\*\//,`comment.doc`,`@pop`],[/[\/*]/,`comment.doc`]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,[`regexp.escape.control`,`regexp.escape.control`,`regexp.escape.control`]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[`regexp.escape.control`,{token:`regexp.escape.control`,next:`@regexrange`}]],[/(\()(\?:|\?=|\?!)/,[`regexp.escape.control`,`regexp.escape.control`]],[/[()]/,`regexp.escape.control`],[/@regexpctl/,`regexp.escape.control`],[/[^\\\/]/,`regexp`],[/@regexpesc/,`regexp.escape`],[/\\\./,`regexp.invalid`],[/(\/)([dgimsuy]*)/,[{token:`regexp`,bracket:`@close`,next:`@pop`},`keyword.other`]]],regexrange:[[/-/,`regexp.escape.control`],[/\^/,`regexp.invalid`],[/@regexpesc/,`regexp.escape`],[/[^\]]/,`regexp`],[/\]/,{token:`regexp.escape.control`,next:`@pop`,bracket:`@close`}]],string_double:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],string_single:[[/[^\\']+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/'/,`string`,`@pop`]],string_backtick:[[/\$\{/,{token:`delimiter.bracket`,next:`@bracketCounting`}],[/[^\\`$]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/`/,`string`,`@pop`]],bracketCounting:[[/\{/,`delimiter.bracket`,`@bracketCounting`],[/\}/,`delimiter.bracket`,`@pop`],{include:`common`}]}};export{t as conf,n as language};
@@ -0,0 +1 @@
1
+ var e=e=>`\\b${e}\\b`,t=e=>`(?!${e})`,n=e(`[_a-zA-Z][_a-zA-Z0-9]*`),r=e(`[_a-zA-Z-0-9]+`),i=[`import`,`model`,`scalar`,`namespace`,`op`,`interface`,`union`,`using`,`is`,`extends`,`enum`,`alias`,`return`,`void`,`if`,`else`,`projection`,`dec`,`extern`,`fn`],a=[`true`,`false`,`null`,`unknown`,`never`],o=`[ \\t\\r\\n]`,s=`[0-9]+`,c={comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`/**`,close:` */`,notIn:[`string`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`}],indentationRules:{decreaseIndentPattern:RegExp(`^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$`),increaseIndentPattern:RegExp(`^((?!//).)*(\\{([^}"'\`/]*|(\\t|[ ])*//.*)|\\([^)"'\`/]*|\\[[^\\]"'\`/]*)$`),unIndentedLinePattern:RegExp(`^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$`)}},l={defaultToken:``,tokenPostfix:`.tsp`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`}],symbols:/[=:;<>]+/,keywords:i,namedLiterals:a,escapes:'\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|"|\\${)',tokenizer:{root:[{include:`@expression`},{include:`@whitespace`}],stringVerbatim:[{regex:`(|"|"")[^"]`,action:{token:`string`}},{regex:`"""${t(`"`)}`,action:{token:`string`,next:`@pop`}}],stringLiteral:[{regex:"\\${",action:{token:`delimiter.bracket`,next:`@bracketCounting`}},{regex:`[^\\\\"$]+`,action:{token:`string`}},{regex:`@escapes`,action:{token:`string.escape`}},{regex:`\\\\.`,action:{token:`string.escape.invalid`}},{regex:`"`,action:{token:`string`,next:`@pop`}}],bracketCounting:[{regex:`{`,action:{token:`delimiter.bracket`,next:`@bracketCounting`}},{regex:`}`,action:{token:`delimiter.bracket`,next:`@pop`}},{include:`@expression`}],comment:[{regex:`[^\\*]+`,action:{token:`comment`}},{regex:`\\*\\/`,action:{token:`comment`,next:`@pop`}},{regex:`[\\/*]`,action:{token:`comment`}}],whitespace:[{regex:o},{regex:`\\/\\*`,action:{token:`comment`,next:`@comment`}},{regex:`\\/\\/.*$`,action:{token:`comment`}}],expression:[{regex:`"""`,action:{token:`string`,next:`@stringVerbatim`}},{regex:`"${t(`""`)}`,action:{token:`string`,next:`@stringLiteral`}},{regex:s,action:{token:`number`}},{regex:n,action:{cases:{"@keywords":{token:`keyword`},"@namedLiterals":{token:`keyword`},"@default":{token:`identifier`}}}},{regex:`@${n}`,action:{token:`tag`}},{regex:`#${r}`,action:{token:`directive`}}]}};export{c as conf,l as language};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{n as t,r as n}from"./monaco-editor-CDJrOpKK.js";import{n as r,r as i,t as a}from"./shortcut-hints-CfVf0REF.js";import{t as o}from"./pencil-BmkcPKBm.js";import{t as s}from"./plus-C6Zz9JLt.js";import{t as c}from"./trash-2-CawFHfTJ.js";import{n as l,r as u,t as d}from"./popover-CvQRjfg5.js";import{t as f}from"./scroll-area-DfPMtFw0.js";import{i as p,n as m,r as h,t as g}from"./tabs-CfNQIHt-.js";import{At as _,Ht as v,Kt as y,Nt as b,Pn as x,S,Un as C,Ut as w,Vt as T,Zn as E,_ as D,f as O,fr as k,g as A,gt as j,h as M,jt as N,m as P,or as F,p as I,pt as L}from"./index-B3xPCIyH.js";import{t as R}from"./badge-BbhOGRC0.js";import{r as z}from"./hook-runtime-ChJ0-jZo.js";import{n as B,r as V,t as H}from"./resizable-COfX_iMb.js";var U=E();function W({label:e,value:t,mono:n=!1}){return(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:e}),(0,U.jsx)(`div`,{className:n?`font-mono text-xs text-foreground break-all`:`text-sm text-foreground`,children:t})]})}function G({open:e,onOpenChange:t,hook:n,isDeleting:r,deleteError:i,blockedReferences:a,onDelete:o,onForceDelete:s}){let l=z(n.runtime),u=a.length>0;return(0,U.jsx)(O,{open:e,onOpenChange:t,children:(0,U.jsxs)(I,{className:`sm:max-w-xl`,children:[(0,U.jsxs)(A,{children:[(0,U.jsx)(D,{children:u?`Hook is still in use`:`Delete hook?`}),(0,U.jsx)(P,{children:u?`These references will break if you force delete this hook.`:`This removes the hook record from the dashboard. If the hook is still referenced, those references will be shown here before force delete is allowed.`})]}),(0,U.jsxs)(`div`,{className:`grid gap-4 rounded-sm border px-4 py-3 sm:grid-cols-2`,children:[(0,U.jsx)(W,{label:`Hook`,value:n.name}),(0,U.jsx)(W,{label:`Runtime`,value:l.label}),(0,U.jsx)(W,{label:`Hook ID`,value:n.id,mono:!0}),(0,U.jsx)(W,{label:`File`,value:n.file,mono:!0})]}),i?(0,U.jsx)(`div`,{className:`rounded-sm border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-foreground`,children:i}):null,u?(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-start gap-3 rounded-sm border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm`,children:[(0,U.jsx)(x,{className:`mt-0.5 h-4 w-4 shrink-0 text-amber-600`}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`font-medium text-foreground`,children:`Force delete only if you will fix these references immediately.`}),(0,U.jsx)(`div`,{className:`text-muted-foreground`,children:`Remove or replace these hook usages first when possible.`})]})]}),(0,U.jsx)(`div`,{className:`max-h-64 space-y-2 overflow-y-auto pr-1`,children:a.map(e=>(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2`,children:[(0,U.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:e.label}),(0,U.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[e.kind,` · `,e.context]}),(0,U.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground break-all`,children:e.path})]},`${e.kind}-${e.path}-${e.context}`))})]}):null,(0,U.jsxs)(M,{children:[(0,U.jsx)(v,{variant:`outline`,onClick:()=>t(!1),children:u?`Close`:`Cancel`}),(0,U.jsxs)(v,{variant:`destructive`,onClick:u?s:o,disabled:r,children:[(0,U.jsx)(c,{className:`h-4 w-4`}),r?`Deleting...`:u?`Force Delete`:`Delete Hook`]})]})]})})}function K({hookName:e,isCreateMode:s,mode:f=`view`,hookHref:p,editHref:m,unsaved:h=!1,isSaving:g=!1,isRunning:y=!1,isDeleting:x=!1,onSave:S,onRun:w,runDisabled:T=!1,onDelete:E,shortcutsOpen:D=!1,onToggleShortcuts:O}){let k=f===`view`&&!s,A=!s&&!k&&f===`edit`,j=!s&&!!w,M=!s&&!!E;return(0,U.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center justify-between border-b px-4 min-w-0`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(F,{to:`/hooks`,className:`shrink-0 text-sm text-muted-foreground transition-colors hover:text-foreground`,children:`Hooks`}),(0,U.jsx)(C,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),s?(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:`New Hook`}):p&&!k?(0,U.jsx)(F,{to:p,className:`truncate text-sm font-medium transition-colors hover:text-primary`,children:e}):(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e}),A&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(C,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`truncate text-sm font-medium`,children:`Edit`})]}),h&&(0,U.jsx)(R,{variant:`outline`,className:`text-xs`,children:`Unsaved`})]}),(0,U.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:k?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(v,{variant:`outline`,size:`sm`,asChild:!0,children:(0,U.jsxs)(F,{to:m??p??`/hooks`,children:[(0,U.jsx)(o,{className:`h-3.5 w-3.5`}),`Edit`,(0,U.jsx)(a,{shortcut:`E`})]})}),j?(0,U.jsxs)(v,{size:`sm`,onClick:w,disabled:y||T,children:[(0,U.jsx)(n,{className:`h-3.5 w-3.5`}),y?`Running...`:`Run Hook`,(0,U.jsx)(a,{shortcut:`R`,className:`border-primary-foreground/20 bg-primary-foreground/10 text-primary-foreground`})]}):null,M?(0,U.jsxs)(v,{variant:`ghost`,size:`sm`,onClick:E,disabled:x,className:`text-muted-foreground hover:bg-destructive/10 hover:text-destructive`,children:[(0,U.jsx)(c,{className:`h-3.5 w-3.5`}),x?`Deleting...`:`Delete`]}):null,!s&&O?(0,U.jsxs)(d,{open:D,onOpenChange:e=>{e||O()},children:[(0,U.jsxs)(_,{children:[(0,U.jsx)(b,{asChild:!0,children:(0,U.jsx)(u,{asChild:!0,children:(0,U.jsx)(v,{variant:`ghost`,size:`icon-sm`,onClick:O,"aria-label":`Shortcuts`,children:(0,U.jsx)(i,{className:`h-3.5 w-3.5`})})})}),(0,U.jsx)(N,{children:`Shortcuts`})]}),(0,U.jsx)(l,{align:`end`,sideOffset:8,className:`w-72 p-4`,children:(0,U.jsx)(`div`,{className:`space-y-3`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Actions`}),(0,U.jsx)(r,{hints:[{key:`E`,label:`Edit`},{key:`R`,label:`Run Hook`},{key:`?`,label:`Toggle shortcuts`}]})]})})})]}):null]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(v,{variant:`ghost`,size:`sm`,onClick:S,disabled:g||!S,children:[(0,U.jsx)(t,{className:`h-3.5 w-3.5`}),g?`Saving...`:`Save`]}),j?(0,U.jsxs)(v,{size:`sm`,onClick:w,disabled:y||T,children:[(0,U.jsx)(n,{className:`h-3.5 w-3.5`}),y?`Running...`:`Run Hook`]}):null,M?(0,U.jsxs)(v,{variant:`ghost`,size:`sm`,onClick:E,disabled:x,className:`text-muted-foreground hover:bg-destructive/10 hover:text-destructive`,children:[(0,U.jsx)(c,{className:`h-3.5 w-3.5`}),x?`Deleting...`:`Delete`]}):null]})})]})}var q=e(k(),1);function J(e){if(!e)return`just now`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Y({status:e}){return e===`passed`?(0,U.jsx)(R,{className:`border-emerald-500/20 bg-emerald-500/15 text-emerald-500`,children:`Passed`}):(0,U.jsx)(R,{variant:`destructive`,children:`Failed`})}function X(){return(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center px-6`,children:(0,U.jsxs)(`div`,{className:`max-w-sm text-center`,children:[(0,U.jsx)(`div`,{className:`text-base font-semibold text-foreground`,children:`No run selected`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm text-muted-foreground`,children:`Run this hook or pick a recent local result to inspect.`})]})})}function Z({rows:e}){return e.length===0?(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`None`}):(0,U.jsx)(`div`,{className:`rounded-sm border`,children:(0,U.jsx)(`table`,{className:`w-full text-sm`,children:(0,U.jsx)(`tbody`,{children:e.map(([e,t])=>(0,U.jsxs)(`tr`,{className:`border-b last:border-b-0`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-muted-foreground`,children:e}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground break-all`,children:t})]},e))})})})}function Q({selectedRun:e}){let[t,n]=(0,q.useState)(`overview`),r=e?.result??null,i=r?.sandbox.networkLogs??[],a=r?.sandbox.networkLogsAvailable===!0&&i.length>0;if((0,q.useEffect)(()=>{n(`overview`)},[e?.id]),(0,q.useEffect)(()=>{!a&&t===`network`&&n(`overview`)},[t,a]),!e)return(0,U.jsx)(X,{});let o=e.result,s=Object.entries(o.variables),c=Object.entries(e.overrideSnapshot);return(0,U.jsxs)(g,{value:t,onValueChange:e=>n(e),className:`flex h-full min-h-0 flex-col gap-0`,children:[o.status===`failed`?null:(0,U.jsx)(`div`,{className:`border-b px-4 py-3`,children:(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,U.jsx)(Y,{status:o.status}),(0,U.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Latest hook result`}),(0,U.jsxs)(`div`,{className:`ml-auto flex items-center gap-3 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{children:y(o.duration)}),(0,U.jsx)(`span`,{children:J(o.executedAt)})]})]})}),(0,U.jsxs)(h,{variant:`line`,className:`h-10 w-full justify-start rounded-none border-b px-4`,children:[(0,U.jsx)(p,{value:`overview`,className:`flex-initial rounded-none text-xs`,children:`Overview`}),(0,U.jsx)(p,{value:`output`,className:`flex-initial rounded-none text-xs`,children:`Output`}),(0,U.jsx)(p,{value:`env`,className:`flex-initial rounded-none text-xs`,children:`Env`}),(0,U.jsx)(p,{value:`sandbox`,className:`flex-initial rounded-none text-xs`,children:`Sandbox`}),a?(0,U.jsx)(p,{value:`network`,className:`flex-initial rounded-none text-xs`,children:`Network`}):null]}),(0,U.jsx)(m,{value:`overview`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Status`}),(0,U.jsx)(`div`,{className:`mt-2`,children:(0,U.jsx)(Y,{status:o.status})})]}),(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Duration`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm text-foreground`,children:y(o.duration)})]}),(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Executed`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm text-foreground`,children:new Date(o.executedAt).toLocaleString()})]}),(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Recency`}),(0,U.jsx)(`div`,{className:`mt-2 text-sm text-foreground`,children:J(o.executedAt)})]})]}),o.status===`failed`?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Failure summary`}),(0,U.jsx)(`div`,{className:`rounded-sm border border-destructive/30 bg-destructive/10 px-3 py-2.5 text-sm text-foreground`,children:o.error??o.stderr??`Hook run failed.`})]}):null]})})}),(0,U.jsx)(m,{value:`output`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`stdout`}),(0,U.jsx)(`div`,{className:`rounded-sm border bg-muted/20 p-3 font-mono text-xs text-foreground whitespace-pre-wrap break-all`,children:o.stdout||`No stdout captured.`})]}),(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`stderr`}),(0,U.jsx)(`div`,{className:`rounded-sm border bg-destructive/5 p-3 font-mono text-xs text-foreground whitespace-pre-wrap break-all`,children:o.stderr||`No stderr captured.`})]})]})})}),(0,U.jsx)(m,{value:`env`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Emitted variables`}),(0,U.jsx)(Z,{rows:s})]}),(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Applied override snapshot`}),(0,U.jsx)(Z,{rows:c})]})]})})}),(0,U.jsx)(m,{value:`sandbox`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,U.jsx)(`div`,{className:`rounded-sm border`,children:(0,U.jsx)(`table`,{className:`w-full text-sm`,children:(0,U.jsxs)(`tbody`,{children:[(0,U.jsxs)(`tr`,{className:`border-b`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Runtime`}),(0,U.jsx)(`td`,{className:`px-3 py-2 text-sm text-foreground`,children:z(o.sandbox.runtime).label})]}),(0,U.jsxs)(`tr`,{className:`border-b`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Image`}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground break-all`,children:o.sandbox.image})]}),(0,U.jsxs)(`tr`,{className:`border-b`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Docker version`}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground break-all`,children:o.sandbox.dockerVersion??`Not available`})]}),(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{className:`px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Network`}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground`,children:o.sandbox.networkMode})]})]})})}),a?null:(0,U.jsx)(`div`,{className:`rounded-sm border bg-muted/20 px-3 py-2.5 text-sm text-muted-foreground`,children:`Network logs aren't available for this runtime yet.`})]})})}),a?(0,U.jsx)(m,{value:`network`,className:`min-h-0 flex-1`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsx)(`div`,{className:`p-4`,children:(0,U.jsx)(`div`,{className:`overflow-hidden rounded-sm border`,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`border-b bg-muted/30`,children:[(0,U.jsx)(`th`,{className:`px-3 py-2 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Method`}),(0,U.jsx)(`th`,{className:`px-3 py-2 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`URL`}),(0,U.jsx)(`th`,{className:`px-3 py-2 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Status`}),(0,U.jsx)(`th`,{className:`px-3 py-2 text-left text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Duration`})]})}),(0,U.jsx)(`tbody`,{children:i.map(e=>(0,U.jsxs)(`tr`,{className:`border-b last:border-b-0`,children:[(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground`,children:e.method}),(0,U.jsxs)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground break-all`,children:[(0,U.jsx)(`div`,{children:e.url}),e.error?(0,U.jsx)(`div`,{className:`mt-1 text-destructive`,children:e.error}):null]}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground`,children:e.statusCode??`—`}),(0,U.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-foreground`,children:e.durationMs==null?`—`:y(e.durationMs)})]},e.id))})]})})})})}):null]})}function $(e){if(!e)return`just now`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function ee({baselineCount:e,baselineFilePath:t,baselineInfo:n,isBaselineLoading:r,overrideRows:i,overridingRowIds:a,recentRuns:o,selectedRunId:l,isRunning:u,runDisabledReason:d,runError:_,onAddOverride:b,onUpdateOverride:x,onRemoveOverride:S,onRun:C,onSelectRun:E}){return(0,U.jsxs)(g,{defaultValue:`inputs`,className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,U.jsx)(`div`,{className:`border-b px-4 py-1.5`,children:(0,U.jsxs)(h,{variant:`line`,className:`h-7 w-auto justify-start rounded-none p-0`,children:[(0,U.jsx)(p,{value:`inputs`,className:`flex-initial rounded-none px-2.5 text-xs`,children:`Input`}),(0,U.jsx)(p,{value:`logs`,className:`flex-initial rounded-none px-2.5 text-xs`,children:`Run logs`})]})}),(0,U.jsx)(m,{value:`inputs`,className:`min-h-0 flex-1 overflow-hidden`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[d?(0,U.jsxs)(`div`,{className:`rounded-sm border border-amber-500/30 bg-amber-500/10 px-3 py-2.5 text-sm`,children:[(0,U.jsx)(`div`,{className:`font-medium text-foreground`,children:d===`Save this hook to run the latest changes.`?`Save required`:`Hook couldn't be executed`}),(0,U.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:d})]}):null,(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Workspace env`}),(0,U.jsxs)(`div`,{className:`rounded-sm border bg-muted/20 px-3 py-2.5`,children:[(0,U.jsx)(`div`,{className:`text-sm text-foreground`,children:r?`Loading workspace variables...`:t?`${e} variable${e===1?``:`s`} available from ${t}`:`No workspace .env file is configured for this project.`}),n?(0,U.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:n}):(0,U.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:`Inherited workspace variables are included automatically for each run.`})]})]}),(0,U.jsxs)(`section`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Runtime variables`}),(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Variables added for this run only. They override inherited workspace values and can model env handoff between hooks.`})]}),(0,U.jsxs)(v,{variant:`outline`,size:`sm`,onClick:b,children:[(0,U.jsx)(s,{className:`h-3.5 w-3.5`}),`Add variable`]})]}),i.length===0?(0,U.jsx)(`div`,{className:`rounded-sm border border-dashed px-3 py-4 text-sm text-muted-foreground`,children:`No runtime variables yet.`}):(0,U.jsx)(`div`,{className:`space-y-2`,children:i.map(e=>{let t=a.has(e.id);return(0,U.jsxs)(`div`,{className:`rounded-sm border px-3 py-2.5`,children:[(0,U.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)_auto]`,children:[(0,U.jsx)(T,{value:e.key,placeholder:`KEY`,onChange:t=>x(e.id,{key:t.target.value})}),(0,U.jsx)(T,{value:e.value,placeholder:`Value`,onChange:t=>x(e.id,{value:t.target.value})}),(0,U.jsx)(v,{variant:`ghost`,size:`icon-sm`,"aria-label":`Remove variable`,onClick:()=>S(e.id),children:(0,U.jsx)(c,{className:`h-3.5 w-3.5`})})]}),t?(0,U.jsx)(`div`,{className:`mt-2 text-xs text-primary`,children:`Overrides .env`}):null]},e.id)})})]})]})})}),(0,U.jsx)(m,{value:`logs`,className:`min-h-0 flex-1 overflow-hidden`,children:(0,U.jsx)(f,{className:`h-full`,children:(0,U.jsxs)(`div`,{className:`space-y-4 p-4`,children:[_?(0,U.jsxs)(`div`,{className:`rounded-sm border border-destructive/30 bg-destructive/10 px-3 py-2.5 text-sm`,children:[(0,U.jsx)(`div`,{className:`font-medium text-foreground`,children:`Hook couldn't be executed`}),(0,U.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`Review stderr or sandbox details, adjust runtime variables, and run again.`}),(0,U.jsx)(`div`,{className:`mt-3 font-mono text-xs text-foreground`,children:_})]}):null,(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Local runs`}),(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Recent hook runs stay in this browser and are not added to dashboard history.`}),o.length===0?(0,U.jsx)(`div`,{className:`rounded-sm border border-dashed px-3 py-4 text-sm text-muted-foreground`,children:`No run logs in this browser session yet.`}):(0,U.jsx)(`div`,{className:`space-y-2`,children:o.map(e=>(0,U.jsxs)(`button`,{type:`button`,onClick:()=>E(e.id),className:w(`flex w-full items-center justify-between rounded-sm border px-3 py-2.5 text-left transition-colors`,`hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50`,(l??o[0]?.id)===e.id&&`border-primary/50 bg-primary/10`),children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:e.result.status===`passed`?`Passed`:`Failed`}),(0,U.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:$(e.result.executedAt)})]}),(0,U.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:y(e.result.duration)})]},e.id))})]})]})})})]})}function te({isMobile:e,leftPane:t,rightTopPane:n,rightBottomPane:r,className:i}){return e?(0,U.jsxs)(`div`,{className:w(`flex min-h-0 flex-1 flex-col overflow-auto`,i),children:[(0,U.jsx)(`section`,{"data-slot":`leftPane`,className:`min-h-0`,children:t}),(0,U.jsx)(`section`,{"data-slot":`rightTopPane`,className:`border-t`,children:n}),(0,U.jsx)(`section`,{"data-slot":`rightBottomPane`,className:`min-h-[360px] border-t`,children:r})]}):(0,U.jsxs)(V,{orientation:`horizontal`,className:w(`min-h-0 flex-1`,i),children:[(0,U.jsx)(B,{defaultSize:46,minSize:30,children:(0,U.jsx)(`div`,{"data-slot":`leftPane`,className:`h-full min-h-0 overflow-hidden`,children:t})}),(0,U.jsx)(H,{withHandle:!0}),(0,U.jsx)(B,{defaultSize:54,minSize:30,children:(0,U.jsxs)(V,{orientation:`vertical`,className:`h-full min-h-0`,children:[(0,U.jsx)(B,{defaultSize:42,minSize:24,children:(0,U.jsx)(`div`,{"data-slot":`rightTopPane`,className:`h-full min-h-0 overflow-hidden border-b`,children:n})}),(0,U.jsx)(H,{withHandle:!0}),(0,U.jsx)(B,{defaultSize:58,minSize:28,children:(0,U.jsx)(`div`,{"data-slot":`rightBottomPane`,className:`h-full min-h-0 overflow-hidden`,children:r})})]})})]})}function ne(e={}){return{id:`override-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,key:e.key??``,value:e.value??``}}function re(e){return e.map(e=>({key:e.key.trim(),value:e.value})).filter(e=>e.key.length>0)}function ie({hookId:e}){let[t,n]=(0,q.useState)([]),[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)(null),[s,c]=(0,q.useState)(!0),[l,u]=(0,q.useState)([]),[d,f]=(0,q.useState)([]),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(!1),[_,v]=(0,q.useState)(null),y=(0,q.useRef)(0);(0,q.useEffect)(()=>{u([]),f([]),m(null),v(null)},[e]),(0,q.useEffect)(()=>{let e=!1;return c(!0),L().then(t=>{e||(n(t.variables),i(t.filePath),o(t.error??null))}).catch(t=>{e||(n([]),i(null),o(t instanceof Error?t.message:`Failed to load workspace variables`))}).finally(()=>{e||c(!1)}),()=>{e=!0}},[e]);let b=(0,q.useMemo)(()=>new Set(t.map(e=>e.key)),[t]),x=(0,q.useMemo)(()=>re(l),[l]),C=(0,q.useMemo)(()=>{let e=new Set;for(let t of l){let n=t.key.trim();n&&b.has(n)&&e.add(t.id)}return e},[b,l]),w=(0,q.useMemo)(()=>d.find(e=>e.id===p)??d[0]??null,[d,p]);function T(e={}){u(t=>[...t,ne(e)])}function E(e,t){u(n=>n.map(n=>n.id===e?{...n,...t}:n))}function D(e){u(t=>t.filter(t=>t.id!==e))}async function O(){if(!e||h)return null;g(!0),v(null);let t=Object.fromEntries(x.map(e=>[e.key,e.value]));try{let n=await j(e,{overrides:x});y.current+=1;let r={id:`hook-run-${y.current}`,result:n,overrideSnapshot:t};return f(e=>[r,...e].slice(0,6)),m(r.id),r}catch(e){return e instanceof S?v(e.message):v(e instanceof Error?e.message:`Hook run failed`),null}finally{g(!1)}}return{baselineVariables:t,baselineFilePath:r,baselineInfo:a,isBaselineLoading:s,overrideRows:l,normalizedOverrides:x,overridingRowIds:C,recentRuns:d,selectedRunId:p,selectedRun:w,isRunning:h,runError:_,addOverrideRow:T,updateOverrideRow:E,removeOverrideRow:D,selectRun:m,clearRunError:()=>v(null),submitRun:O}}export{K as a,Q as i,te as n,G as o,ee as r,ie as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{fr as t}from"./index-B3xPCIyH.js";var n=e(t(),1);function r(e){let t=(0,n.useRef)(e);(0,n.useLayoutEffect)(()=>{t.current=e},[e]),(0,n.useEffect)(()=>{function e(e){let n=e.target,r=n.tagName;if((r===`INPUT`||r===`TEXTAREA`||r===`SELECT`||n.isContentEditable)&&!(r===`TEXTAREA`&&n.getAttribute(`aria-readonly`)===`true`&&n.closest(`.monaco-editor`))){e.key===`Escape`&&n.blur();return}let i=e.key.toLowerCase();if(e.shiftKey&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let n=`shift+${i}`,r=t.current[n];if(r){e.preventDefault(),r(e);return}}if(e.key!==`Escape`&&(e.ctrlKey||e.metaKey||e.altKey)&&!((e.metaKey||e.ctrlKey)&&i===`enter`)||e.shiftKey&&e.key!==`Escape`)return;let a=t.current[i];a&&(e.preventDefault(),a(e))}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[])}export{r as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{Zn as t,fr as n}from"./index-B3xPCIyH.js";var r=e(n(),1);t();var i=r.createContext(void 0);function a(e){let t=r.useContext(i);return e||t||`ltr`}function o(e,[t,n]){return Math.min(n,Math.max(t,e))}function s(e){return e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`)?e.slice(1,-1):e}function c(e){(0,r.useEffect)(()=>(document.title=`${s(e)} | agent-qa`,()=>{document.title=`agent-qa`}),[e])}export{o as n,a as r,c as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{a as t,f as n,i as r,n as i,r as a,t as o,u as s}from"./tab-console-CLKFTABo.js";import{u as c}from"./select-B5gV6YUf.js";import{t as l}from"./circle-x-DLBotPS8.js";import{t as u}from"./copy-Gj5_oF-8.js";import{t as d}from"./eye-CZ7GiZXJ.js";import{t as f}from"./refresh-cw-v_0wwa0P.js";import{t as p}from"./zap-C7OZlYXQ.js";import{n as m,r as h,t as g}from"./popover-CvQRjfg5.js";import{t as _}from"./scroll-area-DfPMtFw0.js";import{i as v,n as y,r as b,t as x}from"./tabs-CfNQIHt-.js";import{At as S,Hn as C,Ht as w,In as ee,Kt as T,Ln as E,Mn as te,Nn as D,Nt as ne,Pt as O,Rn as re,Ut as k,Zn as A,fr as j,ir as M,jt as N,qn as P,rt as F}from"./index-B3xPCIyH.js";import{t as I}from"./badge-BbhOGRC0.js";import{n as L}from"./step-name-pills-COKv64-4.js";var R=P(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),ie=P(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),z=P(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),B=P(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),ae=P(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),oe=P(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),V=A();function H({log:e}){return(0,V.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,V.jsx)(`div`,{className:`shrink-0 border-b px-4 py-3`,children:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`text-sm font-medium`,children:e.name}),(0,V.jsx)(I,{className:k(`px-1.5 py-0 text-[10px]`,e.status===`passed`?`border-emerald-500/20 bg-emerald-500/15 text-emerald-500`:e.status===`running`?`border-blue-500/20 bg-blue-500/15 text-blue-500`:`border-red-500/20 bg-red-500/15 text-red-500`),children:e.status}),(0,V.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:e.phase}),(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:T(e.duration)})]})}),(0,V.jsx)(_,{className:`flex-1`,children:(0,V.jsxs)(`div`,{className:`space-y-4 p-4`,children:[e.stdout&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`stdout`}),(0,V.jsx)(`pre`,{className:`rounded-md bg-muted/50 p-2 font-mono text-xs whitespace-pre-wrap break-all`,children:e.stdout})]}),e.stderr&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`stderr`}),(0,V.jsx)(`pre`,{className:`rounded-md bg-red-500/5 p-2 font-mono text-xs whitespace-pre-wrap break-all text-red-400`,children:e.stderr})]}),e.variables&&Object.keys(e.variables).length>0&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`Emitted Variables`}),(0,V.jsx)(`table`,{className:`w-full text-sm`,children:(0,V.jsx)(`tbody`,{children:Object.entries(e.variables).map(([e,t])=>(0,V.jsxs)(`tr`,{className:`border-b border-border/50`,children:[(0,V.jsx)(`td`,{className:`px-2 py-1 font-mono text-xs text-muted-foreground`,children:e}),(0,V.jsx)(`td`,{className:`px-2 py-1 font-mono text-xs break-all`,children:t})]},e))})})]}),e.returnData!=null&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h4`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`Return Data`}),(0,V.jsx)(`pre`,{className:`rounded-md bg-muted/50 p-2 font-mono text-xs whitespace-pre-wrap break-all`,children:typeof e.returnData==`string`?e.returnData:JSON.stringify(e.returnData,null,2)})]})]})})]})}var U=e(j(),1);function W({children:e,marker:t,state:n,tone:r,label:i}){let a=r===`primary`?`text-primary`:`text-amber-500`;return(0,V.jsxs)(S,{children:[(0,V.jsx)(ne,{asChild:!0,children:(0,V.jsxs)(`span`,{className:`relative inline-flex shrink-0 cursor-default`,children:[e,(0,V.jsx)(`span`,{"data-cache-marker":t,"data-cache-state":n,"aria-label":i,className:k(`absolute -bottom-px -right-px inline-flex size-2 items-center justify-center rounded-full border border-background/90 bg-background/70 shadow-[0_0_0_1px_color-mix(in_srgb,var(--border)_70%,transparent)]`,a),children:(0,V.jsx)(p,{className:k(`size-1.5 fill-current stroke-[2.5]`,a)})})]})}),(0,V.jsx)(N,{children:i})]})}function se(e){if(!e)return null;try{let t=typeof e==`string`?JSON.parse(e):e;if(t&&typeof t==`object`)return[t.type||t.action||``,t.target||t.selector||``].filter(Boolean).join(` `)}catch{return String(e)}return null}function ce({sub:e,index:t,stepId:n,isSelected:r,onSelect:i}){let a=se(e.plannedAction),o=e.phaseDurations?(e.phaseDurations.observe??0)+(e.phaseDurations.plan??0)+(e.phaseDurations.execute??0)+(e.phaseDurations.verify??0):null,s=(0,V.jsx)(`span`,{className:`relative inline-flex h-4 w-4 shrink-0 items-center justify-center`,children:e.result===`in-progress`?(0,V.jsx)(re,{className:`h-3 w-3 text-blue-500 animate-spin shrink-0`}):e.result===`success`?(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-emerald-500 shrink-0`}):(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-red-500 shrink-0`})});return(0,V.jsx)(`li`,{role:`treeitem`,"aria-level":2,"aria-selected":r,"data-sub-action-id":`${n}-${t}`,children:(0,V.jsxs)(`button`,{className:k(`flex w-full items-center gap-2 py-1.5 px-3 text-left rounded-[2px] text-sm`,`hover:bg-muted/50 transition-colors`,r&&`bg-primary/10 ring-1 ring-primary/30`),onClick:i,children:[e.cached?(0,V.jsx)(W,{marker:`sub-action-status`,state:`cached`,tone:`primary`,label:`Cached action`,children:s}):s,(0,V.jsxs)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:[`#`,t+1]}),a&&(0,V.jsx)(`span`,{className:`flex-1 min-w-0 text-xs truncate text-muted-foreground`,children:a}),o!=null&&(0,V.jsx)(`span`,{className:`text-[10px] text-muted-foreground shrink-0`,children:T(o)})]})})}function G({log:e,isSelected:t,onSelect:n}){let r=e.type===`runjs`?B:D;return(0,V.jsx)(`li`,{role:`treeitem`,"aria-level":2,"aria-selected":t,"data-execution-id":e.id,children:(0,V.jsxs)(`button`,{className:k(`flex w-full items-start gap-2 py-1.5 px-3 text-left rounded-[2px] text-sm`,`hover:bg-muted/50 transition-colors`,t&&`bg-primary/10 ring-1 ring-primary/30`),onClick:n,children:[e.status===`passed`?(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-emerald-500 shrink-0 mx-[5px]`}):(0,V.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-red-500 shrink-0 mx-[5px]`}),(0,V.jsx)(r,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0 mt-0.5`}),e.phase===`inline`&&(0,V.jsx)(`span`,{className:`text-[9px] px-1 py-0 rounded bg-amber-500/15 text-amber-400 border border-amber-500/20 font-medium shrink-0`,children:`pre`}),(0,V.jsx)(`span`,{className:`flex-1 min-w-0 text-xs break-all text-muted-foreground`,children:e.name}),(0,V.jsx)(`span`,{className:`text-[10px] text-muted-foreground shrink-0`,children:T(e.duration)})]})})}function K({status:e}){switch(e){case`passed`:return(0,V.jsx)(C,{className:`h-4 w-4 text-emerald-500 shrink-0 mt-0.5`});case`failed`:return(0,V.jsx)(l,{className:`h-4 w-4 text-red-500 shrink-0 mt-0.5`});case`healed`:case`flaky`:return(0,V.jsx)(f,{className:`h-4 w-4 text-amber-500 shrink-0 mt-0.5`});default:return(0,V.jsx)(z,{className:`h-4 w-4 text-muted-foreground shrink-0 mt-0.5`})}}function q({step:e,isSelected:t,isExpanded:n,selection:r,onSelect:i,inlineLogs:a=[],embedded:o=!1}){let s=e.subActionsData??[],c=s.length>0,l=s.filter(e=>e.cached).length,u=s.length===0?`none`:l===s.length?`all`:l>0?`some`:`none`,d=c||a.length>0,f=(0,V.jsx)(K,{status:e.status}),p=u===`all`?(0,V.jsx)(W,{marker:`step-status`,state:`all`,tone:`primary`,label:`All actions cached`,children:f}):u===`some`?(0,V.jsx)(W,{marker:`step-status`,state:`some`,tone:`amber`,label:`${l} of ${s.length} actions cached`,children:f}):f;return(0,V.jsxs)(`li`,{role:`treeitem`,"aria-expanded":d?n:void 0,"aria-selected":t&&r?.type===`step`,"aria-level":1,"data-step-id":e.id,className:k(!o&&`mx-2 mb-1.5 rounded-[2px]`,d&&n&&!o&&`border border-border/70 bg-muted/15 relative before:absolute before:left-[19.5px] before:w-px before:bg-border/60 before:top-[19px] before:bottom-[13px]`,d&&n&&o&&`relative before:absolute before:left-[19.5px] before:w-px before:bg-border/60 before:top-[19px] before:bottom-[13px]`),children:[(0,V.jsxs)(`button`,{className:k(`flex w-full items-start gap-2 py-2 px-3 text-left rounded-[2px]`,`hover:bg-muted/50 transition-colors`,t&&r?.type===`step`&&`bg-primary/10 ring-1 ring-primary/30`),onClick:()=>i({type:`step`,stepId:e.id}),children:[p,(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[e.displayStepTotal?(0,V.jsxs)(`div`,{className:`text-[10px] font-medium uppercase tracking-wide text-muted-foreground/70`,children:[`Step `,e.displayStepOrder,` of `,e.displayStepTotal]}):null,(0,V.jsx)(L,{step:e})]}),(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0 pt-0.5`,children:T(e.duration)})]}),n&&d&&(0,V.jsxs)(`ul`,{role:`group`,children:[a.map(t=>(0,V.jsx)(G,{log:t,isSelected:r?.type===`execution`&&r.logId===t.id,onSelect:()=>i({type:`execution`,stepId:e.id,logId:t.id})},t.id)),s.map((t,n)=>(0,V.jsx)(ce,{sub:t,index:n,stepId:e.id,isSelected:r?.type===`subaction`&&r.stepId===e.id&&r.subIndex===n,onSelect:()=>i({type:`subaction`,stepId:e.id,subIndex:n})},n))]})]})}function J(e){return e?.type===`step`||e?.type===`subaction`||e?.type===`execution`}function Y(e){return e?.type===`subaction`}function le({log:e,isSelected:t,onSelect:n}){return(0,V.jsx)(`li`,{role:`treeitem`,"aria-level":1,"aria-selected":t,children:(0,V.jsxs)(`button`,{className:k(`flex w-full items-center gap-2 py-1.5 px-3 text-left rounded-[2px] text-sm`,`hover:bg-muted/50 transition-colors`,t&&`bg-primary/10 ring-1 ring-primary/30`),onClick:n,children:[e.status===`passed`?(0,V.jsx)(C,{className:`h-3 w-3 text-emerald-500 shrink-0`}):e.status===`running`?(0,V.jsx)(z,{className:`h-3 w-3 text-blue-500 shrink-0`}):(0,V.jsx)(l,{className:`h-3 w-3 text-red-500 shrink-0`}),(0,V.jsx)(D,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,V.jsx)(`span`,{className:`flex-1 min-w-0 text-xs truncate`,children:e.name}),(0,V.jsx)(`span`,{className:`text-[10px] text-muted-foreground shrink-0`,children:T(e.duration)})]})})}function X({title:e}){return(0,V.jsx)(`div`,{className:`px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60`,children:e})}function Z({title:e,hooks:t,selection:n,onSelect:r}){return t.length===0?null:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(X,{title:e}),(0,V.jsx)(`div`,{className:`mx-2 mb-1.5 rounded-[2px] border border-border/70 bg-muted/15`,children:(0,V.jsx)(`ul`,{role:`group`,children:t.map(e=>(0,V.jsx)(le,{log:e,isSelected:n?.type===`hook`&&n.hookId===e.id,onSelect:()=>r({type:`hook`,hookId:e.id})},e.id))})})]})}function ue({steps:e,selection:t,onSelect:n,suiteTests:r,suiteSelectedView:i,setupHooks:a=[],teardownHooks:o=[],inlineLogs:s=[]}){J(t)&&t.stepId;let c=(0,U.useMemo)(()=>{let t=new Map;for(let n of s){if(!n.stepId)continue;let r=Number(n.stepId),i=e.find(e=>e.rawRunId&&n.runId&&e.rawRunId!==n.runId?!1:e.rawStepOrder===r)?.id??n.stepId,a=t.get(i)??[];a.push(n),t.set(i,a)}return t},[s,e]);if(e.length===0)return a.length>0||o.length>0?(0,V.jsx)(_,{className:`flex-1`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Z,{title:`Setup`,hooks:a,selection:t,onSelect:n}),(0,V.jsx)(Z,{title:`Teardown`,hooks:o,selection:t,onSelect:n})]})}):(0,V.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-muted-foreground text-sm`,children:`No steps were executed.`});if(r&&r.length>0&&i===`all`){let i=new Map;for(let t of e){let e=t.runId??t.id,n=i.get(e)??[];n.push(t),i.set(e,n)}let s=new Set(r.map(e=>e.id)),l=a.filter(e=>!s.has(e.runId)),u=o.filter(e=>!s.has(e.runId));return(0,V.jsx)(_,{className:`flex-1`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Z,{title:`Setup`,hooks:l,selection:t,onSelect:n}),(0,V.jsx)(X,{title:`Steps`}),(0,V.jsx)(`ul`,{role:`tree`,"aria-label":`Test steps`,className:`py-1`,children:r.map(e=>{let r=e.id,s=i.get(r)??[],l=e.name??`Unknown Test`,u=a.filter(e=>e.runId===r),d=o.filter(e=>e.runId===r);return(0,V.jsxs)(`li`,{role:`none`,children:[(0,V.jsxs)(`div`,{className:`mt-3 mb-1 flex items-center justify-between bg-muted/30 px-3 py-1.5 text-xs font-medium text-muted-foreground first:mt-0`,children:[(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:l}),(0,V.jsx)(`span`,{className:`ml-2 shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground/70`,children:e.status})]}),u.length>0&&(0,V.jsx)(Z,{title:`Setup`,hooks:u,selection:t,onSelect:n}),s.length>0?(0,V.jsx)(`ul`,{role:`group`,children:s.map(e=>(0,V.jsx)(q,{step:e,isSelected:J(t)&&t.stepId===e.id,isExpanded:!0,selection:t,onSelect:n,inlineLogs:c.get(e.id)??[]},e.id))}):(0,V.jsx)(`div`,{className:`mx-2 mb-1.5 rounded-[2px] border border-border/60 bg-muted/10 px-3 py-2 text-xs text-muted-foreground`,children:e.status===`skipped`?`Skipped`:e.status===`cancelled`?`Cancelled`:`Pending`}),d.length>0&&(0,V.jsx)(Z,{title:`Teardown`,hooks:d,selection:t,onSelect:n})]},r)})}),(0,V.jsx)(Z,{title:`Teardown`,hooks:u,selection:t,onSelect:n})]})})}return(0,V.jsx)(_,{className:`flex-1`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Z,{title:`Setup`,hooks:a,selection:t,onSelect:n}),(0,V.jsx)(X,{title:`Steps`}),(0,V.jsx)(`ul`,{role:`tree`,"aria-label":`Test steps`,className:`py-1`,children:e.map(e=>(0,V.jsx)(q,{step:e,isSelected:J(t)&&t.stepId===e.id,isExpanded:!0,selection:t,onSelect:n,inlineLogs:c.get(e.id)??[]},e.id))}),(0,V.jsx)(Z,{title:`Teardown`,hooks:o,selection:t,onSelect:n})]})})}var de=[`data:image/`,`blob:`,`http://`,`https://`];function fe(e){return e.replace(/\\/g,`/`)}function pe(e){return e.startsWith(`http://`)||e.startsWith(`https://`)}function me(e){return e.startsWith(`/`)||/^[A-Za-z]:[\\/]/.test(e)}function he(e){if(de.some(t=>e.startsWith(t)))return e;let t=fe(e),n=t.split(`/`).filter(Boolean);if(n.length>=2){let e=n[n.length-1];return`/api/screenshots/${n[n.length-2]}/${e}`}return`/api/screenshots/${t}`}function ge(e,t){let n=t?.trim();if(!n)return null;if(pe(n))return n;if(me(n))return null;let r=fe(n),i=r.split(`/`).filter(Boolean);return i.length===0?null:r.startsWith(`${e}/`)?`/api/videos/${r}`:i.length===1?`/api/videos/${e}/${i[0]}`:`/api/videos/${r}`}function _e({screenshotPath:e,annotation:t,refLabel:n,className:r}){let i=(0,U.useRef)(null),[a]=(0,U.useState)(()=>Math.random().toString(36).slice(2,8)),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(!1),[u,d]=(0,U.useState)({width:0,height:0}),[f,p]=(0,U.useState)({width:0,height:0}),[m,h]=(0,U.useState)(!1),[g,_]=(0,U.useState)({x:0,y:0}),[v,y]=(0,U.useState)(!1),[b,x]=(0,U.useState)(!1),[S,C]=(0,U.useState)(!0),T=he(e);(0,U.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e)d({width:t.contentRect.width,height:t.contentRect.height})});return t.observe(e),()=>t.disconnect()},[]),(0,U.useEffect)(()=>{if(!b)return;let e=e=>{e.key===`Escape`&&x(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b]);let E=(0,U.useCallback)(e=>{let t=e.currentTarget;p({width:t.naturalWidth,height:t.naturalHeight}),s(!0)},[]),D=(0,U.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect();_({x:e.clientX-t.left,y:e.clientY-t.top})},[]),ne=t?.viewport?.width||f.width||1,re=t?.viewport?.height||f.height||1,A=u.width,j=u.height,M=f.width/(f.height||1),N=A/(j||1),P=A,F=j,I=0,L=0;o&&f.width>0&&(M>N?(P=A,F=A/M,L=(j-F)/2):(F=j,P=j*M,I=(A-P)/2));let R=P/ne,z=F/re,B=2.5,H=P*B,W=F*B,se=-((g.x-I)*B-150/2),ce=-((g.y-L)*B-150/2),G=g.x+20,K=g.y+20;G+150>A&&(G=g.x-150-10),K+150>j&&(K=g.y-150-10),G<0&&(G=0),K<0&&(K=0);let q=v&&m&&o;if(c)return(0,V.jsx)(`div`,{className:k(`relative rounded-lg border bg-muted/20 flex items-center justify-center`,r),style:{aspectRatio:`16 / 9`,maxHeight:`50vh`},children:(0,V.jsxs)(`div`,{className:`text-muted-foreground flex flex-col items-center gap-2`,children:[(0,V.jsx)(ie,{className:`h-8 w-8`}),(0,V.jsx)(`span`,{className:`text-sm`,children:`Screenshot unavailable`})]})});let J=!!(t?.clickPoint||t?.boundingBox||t?.failureHighlight||t?.startPoint||t?.endPoint||t?.direction||t?.pinchScale),Y=o&&t&&S&&(0,V.jsxs)(V.Fragment,{children:[t.failureHighlight&&(0,V.jsx)(`div`,{className:`absolute border-2 border-red-500/70 rounded-sm bg-red-500/15 animate-pulse pointer-events-none`,style:{left:I+t.failureHighlight.x*R,top:L+t.failureHighlight.y*z,width:t.failureHighlight.width*R,height:t.failureHighlight.height*z}}),t.boundingBox&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`absolute border-2 border-emerald-500/70 rounded-sm bg-emerald-500/10 pointer-events-none`,style:{left:I+t.boundingBox.x*R,top:L+t.boundingBox.y*z,width:t.boundingBox.width*R,height:t.boundingBox.height*z}}),n&&(0,V.jsx)(`div`,{className:`absolute text-[10px] font-mono font-bold text-white bg-emerald-600/90 px-1 rounded-sm pointer-events-none leading-tight`,style:{left:I+t.boundingBox.x*R,top:L+t.boundingBox.y*z-14},children:n})]}),t.clickPoint&&(0,V.jsx)(`div`,{className:`absolute pointer-events-none`,style:{left:I+t.clickPoint.x*R,top:L+t.clickPoint.y*z,transform:`translate(-50%, -50%)`,zIndex:1},children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full bg-turquoise-500 border-[1.5px] border-black/60 shadow-[0_0_0_1px_rgba(255,255,255,0.4)]`}),(0,V.jsx)(`div`,{className:`absolute rounded-full border-2 border-turquoise-500/50 animate-ping`,style:{width:22,height:22,left:-8.5,top:-8.5}})]})}),t.startPoint&&t.endPoint&&(()=>{let e=t.type===`drag`?`oklch(0.65 0.19 150)`:`oklch(0.65 0.19 210)`,n=t.type===`drag`?`oklch(0.65 0.19 150 / 0.4)`:`oklch(0.65 0.19 210 / 0.4)`,r=I+t.startPoint.x*R,i=L+t.startPoint.y*z,a=I+t.endPoint.x*R,o=L+t.endPoint.y*z;return(0,V.jsxs)(V.Fragment,{children:[Array.from({length:4},(e,t)=>{let s=(t+1)/5;return(0,V.jsx)(`div`,{className:`absolute pointer-events-none animate-gesture-trail`,style:{left:r+(a-r)*s,top:i+(o-i)*s,transform:`translate(-50%, -50%)`,zIndex:1,animationDelay:`${t*.15}s`},children:(0,V.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full`,style:{backgroundColor:n}})},`trail-${t}`)}),(0,V.jsx)(`div`,{className:`absolute pointer-events-none`,style:{left:r,top:i,transform:`translate(-50%, -50%)`,zIndex:1},children:(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full border-[1.5px] border-black/50 shadow-[0_0_0_1px_rgba(255,255,255,0.3)]`,style:{backgroundColor:e}})}),(0,V.jsx)(`div`,{className:`absolute pointer-events-none`,style:{left:a,top:o,transform:`translate(-50%, -50%)`,zIndex:1},children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`w-2 h-2 rounded-full border-[1.5px] border-black/50 shadow-[0_0_0_1px_rgba(255,255,255,0.3)]`,style:{backgroundColor:e}}),(0,V.jsx)(`div`,{className:`absolute rounded-full border-[1.5px] animate-ping`,style:{borderColor:n,width:18,height:18,left:-7,top:-7}})]})})]})})(),t.direction&&!t.startPoint&&(()=>{let e=t.clickPoint?I+t.clickPoint.x*R:I+P/2,n=t.clickPoint?L+t.clickPoint.y*z:L+F/2,r=Math.min(F,P)*.35,[i,o]={up:[0,-r],down:[0,r],left:[-r,0],right:[r,0]}[t.direction]||[0,0];return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`svg`,{className:`absolute pointer-events-none`,style:{left:I,top:L,zIndex:1},width:P,height:F,children:[(0,V.jsxs)(`defs`,{children:[(0,V.jsx)(`marker`,{id:`scroll-arrow-border-${a}`,markerWidth:`16`,markerHeight:`14`,refX:`14`,refY:`7`,orient:`auto`,markerUnits:`userSpaceOnUse`,children:(0,V.jsx)(`path`,{d:`M1 1 L14 7 L1 13`,fill:`none`,stroke:`oklch(0 0 0 / 0.5)`,strokeWidth:`3`,strokeLinejoin:`round`,strokeLinecap:`round`})}),(0,V.jsx)(`marker`,{id:`scroll-arrow-${a}`,markerWidth:`16`,markerHeight:`14`,refX:`14`,refY:`7`,orient:`auto`,markerUnits:`userSpaceOnUse`,children:(0,V.jsx)(`path`,{d:`M1 1 L14 7 L1 13`,fill:`none`,stroke:`oklch(0.719 0.119 209.8)`,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`})})]}),(0,V.jsx)(`line`,{x1:e-I,y1:n-L,x2:e-I+i,y2:n-L+o,stroke:`oklch(0 0 0 / 0.5)`,strokeWidth:4,strokeLinecap:`round`,markerEnd:`url(#scroll-arrow-border-${a})`}),(0,V.jsx)(`line`,{x1:e-I,y1:n-L,x2:e-I+i,y2:n-L+o,stroke:`oklch(0.719 0.119 209.8 / 0.8)`,strokeWidth:2.5,strokeLinecap:`round`,markerEnd:`url(#scroll-arrow-${a})`})]}),(0,V.jsx)(`div`,{className:`absolute pointer-events-none`,style:{left:e,top:n,transform:`translate(-50%, -50%)`,zIndex:2},children:(0,V.jsxs)(`div`,{className:`relative flex items-center justify-center`,style:{width:22,height:22},children:[(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full bg-turquoise-500 border-[1.5px] border-black/60 shadow-[0_0_0_1px_rgba(255,255,255,0.4)]`}),(0,V.jsx)(`div`,{className:`absolute inset-0 rounded-full border-2 border-turquoise-500/50 animate-ping`})]})})]})})(),t.pinchScale&&(()=>{let e=t.startPoint?I+t.startPoint.x*R:I+P/2,n=t.startPoint?L+t.startPoint.y*z:L+F/2,r=t.pinchScale===`out`?`animate-gesture-pinch-out`:`animate-gesture-pinch-in`;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`absolute pointer-events-none ${r}`,style:{left:e-24,top:n,transform:`translate(-50%, -50%)`,zIndex:1},children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full bg-turquoise-500 border-[1.5px] border-black/50 shadow-[0_0_0_1px_rgba(255,255,255,0.3)]`}),(0,V.jsx)(`div`,{className:`absolute rounded-full border-[1.5px] border-turquoise-500/40 animate-ping`,style:{width:18,height:18,left:-6.5,top:-6.5}})]})}),(0,V.jsx)(`div`,{className:`absolute pointer-events-none ${r}`,style:{left:e+24,top:n,transform:`translate(-50%, -50%)`,zIndex:1,animationDirection:`reverse`},children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full bg-turquoise-500 border-[1.5px] border-black/50 shadow-[0_0_0_1px_rgba(255,255,255,0.3)]`}),(0,V.jsx)(`div`,{className:`absolute rounded-full border-[1.5px] border-turquoise-500/40 animate-ping`,style:{width:18,height:18,left:-6.5,top:-6.5}})]})})]})})()]});return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{ref:i,className:k(`relative overflow-hidden rounded-lg border bg-muted/20 group w-full`,r),style:{aspectRatio:o&&f.width>0?`${f.width} / ${f.height}`:`16 / 9`,maxHeight:`50vh`},onMouseMove:v?D:void 0,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[!o&&(0,V.jsx)(O,{className:`absolute inset-0 rounded-lg`}),(0,V.jsx)(`img`,{src:T,alt:`Step screenshot`,className:k(`w-full h-full object-contain`,!o&&`opacity-0`),onLoad:E,onError:()=>l(!0)}),Y,q&&(0,V.jsx)(`div`,{className:`absolute rounded-full border-2 border-primary/50 shadow-lg pointer-events-none z-10`,style:{width:150,height:150,left:G,top:K,backgroundImage:`url(${T})`,backgroundSize:`${H}px ${W}px`,backgroundPosition:`${se}px ${ce}px`,backgroundRepeat:`no-repeat`}}),o&&(0,V.jsxs)(`div`,{className:`absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-20`,children:[J&&(0,V.jsx)(w,{variant:`secondary`,size:`icon-sm`,className:`h-7 w-7 bg-background/80 backdrop-blur-sm`,onClick:e=>{e.stopPropagation(),C(!S)},title:S?`Hide annotations`:`Show annotations`,children:(0,V.jsx)(ae,{className:k(`h-3.5 w-3.5`,S&&`text-primary`)})}),(0,V.jsx)(w,{variant:`secondary`,size:`icon-sm`,className:`h-7 w-7 bg-background/80 backdrop-blur-sm`,onClick:e=>{e.stopPropagation(),y(!v)},title:v?`Disable magnifier`:`Enable magnifier`,children:(0,V.jsx)(ee,{className:k(`h-3.5 w-3.5`,v&&`text-primary`)})}),(0,V.jsx)(w,{variant:`secondary`,size:`icon-sm`,className:`h-7 w-7 bg-background/80 backdrop-blur-sm`,onClick:e=>{e.stopPropagation(),x(!0)},title:`View full size`,children:(0,V.jsx)(oe,{className:`h-3.5 w-3.5`})})]})]}),b&&(0,V.jsxs)(`div`,{className:`fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center`,onClick:()=>x(!1),children:[(0,V.jsx)(w,{variant:`secondary`,size:`icon-sm`,className:`absolute top-4 right-4 h-8 w-8 bg-background/80 backdrop-blur-sm z-10`,onClick:()=>x(!1),children:(0,V.jsx)(te,{className:`h-4 w-4`})}),(0,V.jsx)(`img`,{src:T,alt:`Step screenshot (full size)`,className:`object-contain rounded-lg`,style:{maxWidth:`90vw`,maxHeight:`90vh`},onClick:e=>e.stopPropagation()})]})]})}var ve=`rounded-sm border border-border/60 bg-muted/20 p-1`,ye=`rounded-sm px-3 py-1 text-xs font-medium transition-colors`,be=`bg-primary/10 text-foreground ring-1 ring-primary/30`,xe=`text-muted-foreground hover:bg-muted hover:text-foreground`;function Se(e){if(!e)return null;try{let t=typeof e==`string`?JSON.parse(e):e;if(t&&typeof t==`object`)return{type:t.type||t.action||`unknown`,target:t.target||t.selector||``}}catch{return{type:String(e),target:``}}return null}function Ce(e){let t=[];return e.observation&&t.push({key:`observation`,label:`Observation`,icon:d,content:e.observation,duration:e.phaseDurations?.observe??null}),e.reasoning&&t.push({key:`reasoning`,label:`Reasoning`,icon:n,content:e.reasoning,duration:e.phaseDurations?.plan??null}),e.plannedAction!=null&&t.push({key:`plannedAction`,label:`Planned Action`,icon:E,content:null,duration:e.phaseDurations?.execute??null,children:(0,V.jsx)(`pre`,{className:`max-w-full min-w-0 text-[10px] font-mono bg-muted/30 rounded-sm p-2 overflow-x-auto whitespace-pre-wrap break-words`,children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})}),e.verifierReasoning&&t.push({key:`verifier`,label:`Verifier`,icon:s,content:e.verifierReasoning,duration:e.phaseDurations?.verify??null}),t}function we(e){let t=[];return e.observation&&t.push({key:`observation`,label:`Observation`,icon:d,content:e.observation,duration:null}),e.reasoning&&t.push({key:`reasoning`,label:`Reasoning`,icon:n,content:e.reasoning,duration:null}),e.plannedAction!=null&&t.push({key:`plannedAction`,label:`Planned Action`,icon:E,content:null,duration:null,children:(0,V.jsx)(`pre`,{className:`max-w-full min-w-0 text-[10px] font-mono bg-muted/30 rounded-sm p-2 overflow-x-auto whitespace-pre-wrap break-words`,children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})}),t}function Te({step:e,subAction:n,runId:i,screenshotSide:a,onScreenshotSideChange:o,pipelineRef:s}){let c=(e.subActionsData?.length??0)>1;if(n){let e=n.screenshotBeforePath,t=n.screenshotAfterPath;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(De,{beforePath:e??null,afterPath:t??null,annotation:n.annotation,refLabel:n.plannedAction&&typeof n.plannedAction==`object`&&n.plannedAction!==null&&`ref`in n.plannedAction?n.plannedAction.ref:void 0,screenContextBefore:n.screenContextBefore,screenContextAfter:n.screenContextAfter,screenshotSide:a,onScreenshotSideChange:o}),(0,V.jsx)(`div`,{className:`border-t`,children:(0,V.jsxs)(`div`,{className:`p-3 space-y-3 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsxs)(`span`,{className:`font-medium`,children:[`Sub-action #`,n.index+1]}),(0,V.jsx)(`span`,{className:`text-xs font-medium ${n.result===`success`?`text-emerald-500`:`text-red-500`}`,children:n.result}),n.confidence!=null&&(0,V.jsxs)(`span`,{className:`text-xs ${n.confidence>=.8?`text-emerald-500`:n.confidence>=.5?`text-amber-500`:`text-red-500`}`,children:[Math.round(n.confidence*100),`%`]})]}),(0,V.jsx)(r,{ref:s,mode:`static`,sections:Ce(n)}),n.error&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Error`}),(0,V.jsx)(`div`,{className:`bg-destructive/10 text-destructive rounded-sm p-2 text-xs break-words [overflow-wrap:anywhere]`,children:n.error})]})]})})]})}let l=e.screenshotBeforePath,u=e.screenshotPath,d=c?null:e.annotationData,f=c?void 0:e.action&&typeof e.action==`object`&&e.action!==null&&`ref`in e.action?e.action.ref:void 0,p=Se(e.action);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(De,{beforePath:l,afterPath:u,annotation:d,refLabel:f,screenContextBefore:e.screenContextBefore,screenContextAfter:e.screenContextAfter,screenshotSide:a,onScreenshotSideChange:o}),(0,V.jsx)(`div`,{className:`border-t`,children:(0,V.jsxs)(`div`,{className:`p-3 space-y-3 min-w-0`,children:[i?(0,V.jsx)(r,{ref:s,runId:i,stepOrder:e.rawStepOrder,stepData:e}):(0,V.jsx)(r,{ref:s,mode:`static`,sections:we(e)}),p&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Action`}),(0,V.jsxs)(`p`,{className:`text-sm`,children:[p.type,p.target&&(0,V.jsx)(`span`,{className:`text-muted-foreground ml-1`,children:p.target})]})]}),e.plannedAction!=null&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Planned Action`}),(0,V.jsx)(`pre`,{className:`max-w-full min-w-0 text-[10px] font-mono bg-muted/30 rounded-sm p-2 overflow-x-auto whitespace-pre-wrap break-words`,style:{maxHeight:`12rem`},children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})]}),e.error&&(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Error`}),(0,V.jsx)(`div`,{className:`bg-destructive/10 text-destructive rounded-sm p-2 text-sm break-words [overflow-wrap:anywhere]`,children:e.error})]}),e.healingAttempts&&e.healingAttempts.length>0&&(0,V.jsx)(t,{attempts:e.healingAttempts})]})})]})}function Ee({url:e}){let[t,n]=(0,U.useState)(!1);return e?(0,V.jsxs)(`div`,{className:`w-0 flex-1 flex items-center gap-1`,children:[(0,V.jsx)(`div`,{className:`flex-1 min-w-0 overflow-hidden bg-muted/50 rounded-sm px-2 py-0.5 text-xs font-mono truncate text-muted-foreground`,children:e}),(0,V.jsxs)(g,{children:[(0,V.jsx)(h,{asChild:!0,children:(0,V.jsx)(`button`,{className:`shrink-0 p-1 rounded-sm hover:bg-muted transition-colors`,children:(0,V.jsx)(R,{className:`h-3 w-3 text-muted-foreground`})})}),(0,V.jsx)(m,{align:`end`,className:`w-auto max-w-md p-3`,children:(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`text-xs font-mono break-all select-text`,children:e}),(0,V.jsxs)(`button`,{onClick:()=>{navigator.clipboard.writeText(e).catch(()=>{}),n(!0),setTimeout(()=>n(!1),2e3)},className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[t?(0,V.jsx)(c,{className:`h-3 w-3`}):(0,V.jsx)(u,{className:`h-3 w-3`}),t?`Copied`:`Copy URL`]})]})})]})]}):null}function De({beforePath:e,afterPath:t,annotation:n,refLabel:r,screenContextBefore:i,screenContextAfter:a,screenshotSide:o,onScreenshotSideChange:s}){let c=!!e,l=!!t,u=c?`before`:`after`,[d,f]=(0,U.useState)(u);(0,U.useEffect)(()=>{f(u)},[e,t,u]);let p=o??d,m=p===`before`&&c?`before`:p===`after`&&l?`after`:u,h=e=>{if(!(e===`before`&&!c)&&!(e===`after`&&!l)){if(s){s(e);return}f(e)}};return!c&&!l?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-muted-foreground gap-2 py-12`,children:[(0,V.jsx)(ie,{className:`h-8 w-8`}),(0,V.jsx)(`span`,{className:`text-sm`,children:`No screenshot for this step`})]}):(0,V.jsxs)(`div`,{className:`p-3 space-y-2 min-w-0`,children:[c&&l&&(0,V.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,V.jsxs)(`div`,{className:`flex gap-1 shrink-0 ${ve}`,children:[(0,V.jsx)(`button`,{onClick:()=>h(`before`),className:`${ye} ${m===`before`?be:xe}`,children:`Before`}),(0,V.jsx)(`button`,{onClick:()=>h(`after`),className:`${ye} ${m===`after`?be:xe}`,children:`After`})]}),(i||a)&&(0,V.jsx)(Ee,{url:m===`before`?i:a})]}),m===`before`&&c&&(0,V.jsx)(_e,{screenshotPath:e,annotation:n,refLabel:r,className:`w-full rounded-sm overflow-hidden`}),m===`after`&&l&&(0,V.jsx)(_e,{screenshotPath:t,annotation:c?null:n,refLabel:c?void 0:r,className:`w-full rounded-sm overflow-hidden`})]})}var Oe=`rounded-sm border border-border/60 bg-muted/20 p-1`,Q=`rounded-sm px-3 py-1 text-xs font-medium transition-colors`,ke=`bg-primary/10 text-foreground ring-1 ring-primary/30`,Ae=`text-muted-foreground hover:bg-muted hover:text-foreground`;function je({step:e,subAction:t,runId:n}){let[r,i]=(0,U.useState)(`before`);if(t){let e=t.screenStateBefore,n=t.screenStateAfter;return!e&&!n?(0,V.jsx)(Pe,{}):(0,V.jsx)(Ne,{before:e??null,after:n??null,tab:r,setTab:i})}return(0,V.jsx)(Me,{step:e,runId:n,tab:r,setTab:i})}function Me({step:e,runId:t,tab:n,setTab:r}){let[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(!0);return(0,U.useEffect)(()=>{let n=!1;return l(!0),F(t,e.rawStepOrder).then(e=>{n||(a(e.trace.screenStateBefore),s(e.trace.screenStateAfter),l(!1))}).catch(()=>{n||l(!1)}),()=>{n=!0}},[t,e.rawStepOrder]),c?(0,V.jsxs)(`div`,{className:`p-3 space-y-2`,children:[(0,V.jsx)(O,{className:`h-4 w-3/4`}),(0,V.jsx)(O,{className:`h-4 w-1/2`}),(0,V.jsx)(O,{className:`h-4 w-2/3`})]}):!i&&!o?(0,V.jsx)(Pe,{}):(0,V.jsx)(Ne,{before:i,after:o,tab:n,setTab:r})}function Ne({before:e,after:t,tab:n,setTab:r}){let i=!!e,a=!!t;return(0,V.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-2 overflow-hidden p-3`,children:[i&&a&&(0,V.jsxs)(`div`,{className:`flex gap-1 ${Oe}`,children:[(0,V.jsx)(`button`,{onClick:()=>r(`before`),className:`${Q} ${n===`before`?ke:Ae}`,children:`Before`}),(0,V.jsx)(`button`,{onClick:()=>r(`after`),className:`${Q} ${n===`after`?ke:Ae}`,children:`After`})]}),(0,V.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-sm border border-border/60 bg-muted/20`,children:(0,V.jsx)(`div`,{className:`h-full overflow-auto overscroll-contain`,children:(0,V.jsx)(`pre`,{className:`min-w-full p-3 text-xs font-mono whitespace-pre`,children:n===`before`&&i?e:a?t:e})})})]})}function Pe(){return(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm py-12`,children:`No ARIA tree snapshot available for this step`})}function Fe(e){switch(e){case`critical`:return`bg-red-500/15 text-red-500 border-red-500/20`;case`serious`:return`bg-orange-500/15 text-orange-500 border-orange-500/20`;case`moderate`:return`bg-amber-500/15 text-amber-500 border-amber-500/20`;case`minor`:return`bg-blue-500/15 text-blue-500 border-blue-500/20`;default:return`bg-muted text-muted-foreground`}}function Ie({step:e}){let t=e.accessibilityViolations;return!t||t.length===0?(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm py-12`,children:`No accessibility violations detected`}):(0,V.jsx)(`div`,{className:`p-3 space-y-3`,children:t.map((e,t)=>(0,V.jsxs)(`div`,{className:`border border-border/50 rounded-sm p-3 space-y-1.5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(I,{className:k(`text-[10px] px-1.5 py-0`,Fe(e.impact)),children:e.impact}),(0,V.jsx)(`span`,{className:`text-sm font-medium`,children:e.help})]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}),e.nodes.length>0&&(0,V.jsx)(`div`,{className:`space-y-1 mt-1`,children:e.nodes.map((e,t)=>(0,V.jsx)(`pre`,{className:`text-[10px] font-mono bg-muted/30 rounded p-1.5 overflow-x-auto whitespace-pre-wrap break-words`,children:e.html},t))}),(0,V.jsx)(`a`,{href:e.helpUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-[10px] text-blue-500 hover:underline`,children:`Learn more`})]},t))})}function Le({activeTab:e,onTabChange:t,step:n,subAction:r,runId:s,allSteps:c,executionLogs:l=[],platform:u,screenshotSide:d,onScreenshotSideChange:f,pipelineRef:p}){let m=l.length>0,h=(0,U.useRef)(null),g=(0,U.useRef)(null);return(0,U.useEffect)(()=>{if(e!==`console`&&e!==`network`)return;let t=e===`console`?h:g;requestAnimationFrame(()=>{let e=t.current?.querySelector(`[data-slot="scroll-area-viewport"]`);e&&(e.scrollTop=e.scrollHeight)})},[e,n?.id]),n?(0,V.jsxs)(x,{value:e,onValueChange:t,className:`flex h-full min-h-0 flex-col overflow-hidden gap-0`,children:[(0,V.jsxs)(b,{variant:`line`,className:`w-full justify-start border-b px-3 h-9 shrink-0 rounded-none`,children:[(0,V.jsx)(v,{value:`overview`,className:`text-xs rounded-none flex-initial`,children:`Overview`}),(0,V.jsx)(v,{value:`env`,className:`text-xs rounded-none flex-initial`,children:`Variables`}),(0,V.jsx)(v,{value:`network`,className:`text-xs rounded-none flex-initial`,children:`Network`}),(0,V.jsx)(v,{value:`console`,className:`text-xs rounded-none flex-initial`,children:m?`stdout`:`Console`}),(0,V.jsx)(v,{value:`aria`,className:`text-xs rounded-none flex-initial`,children:`ARIA Tree`}),(0,V.jsx)(v,{value:`a11y`,className:`text-xs rounded-none flex-initial`,children:`A11y`})]}),(0,V.jsx)(y,{value:`overview`,className:`flex-1 min-h-0`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(Te,{step:n,subAction:r,runId:s,screenshotSide:d,onScreenshotSideChange:f,pipelineRef:p})})}),(0,V.jsx)(y,{value:`env`,className:`flex-1 min-h-0`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(a,{step:n,executionLogs:l})})}),(0,V.jsx)(y,{value:`network`,className:`flex-1 min-h-0`,children:(0,V.jsx)(`div`,{ref:g,className:`h-full`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(i,{step:n,allSteps:c,platform:u})})})}),(0,V.jsx)(y,{value:`console`,className:`flex-1 min-h-0`,children:(0,V.jsx)(`div`,{ref:h,className:`h-full`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(o,{step:n,allSteps:c,executionLogs:l,isHookStep:m})})})}),(0,V.jsx)(y,{value:`aria`,className:`flex flex-1 min-h-0 overflow-hidden`,children:(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:(0,V.jsx)(je,{step:n,subAction:r,runId:s??``})})}),(0,V.jsx)(y,{value:`a11y`,className:`flex-1 min-h-0`,children:(0,V.jsx)(_,{className:`h-full`,children:(0,V.jsx)(Ie,{step:n})})})]}):(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm`,children:`Select a step to view details`})}var $=`/favicon.svg`,Re=`link[rel="icon"][type="image/svg+xml"]`,ze=`data:image/svg+xml,`,Be=`#1BA8A4`,Ve={running:`#3B82F6`,passed:`#10B981`,failed:`#EF4444`,cancelled:`#737373`},He=`M323.737 74.0036C321.678 45.7468 307.367 20.4603 274.355 7.62753C237.635 -6.64743 193.906 0.707226 159.595 16.555C123.709 33.1301 79.4877 66.4329 68.7041 107.674C64.4889 123.793 65.8966 141.625 74.0475 156.147C84.524 174.812 105.284 186.34 126.509 188.709C155.758 191.973 186.212 179.951 208.798 161.766C221.672 151.401 233.416 137.876 240.032 122.593C245.968 108.883 247.372 92.6358 241.051 79.1C232.452 60.686 212.101 52.6385 192.81 55.6667C190.276 56.0569 187.867 56.6097 185.58 57.2681C183.292 57.9233 181.123 58.6816 179.071 59.528C174.96 61.1995 171.314 63.2018 168.074 65.329C164.839 67.4688 162.013 69.7616 159.591 72.0974C159.042 72.6512 158.503 73.1949 157.975 73.728C157.403 74.2983 156.905 74.8399 156.405 75.3741C155.412 76.4424 154.506 77.4954 153.649 78.4973C151.95 80.5145 150.496 82.3772 149.251 84.0721C146.746 87.4439 144.991 90.0845 143.806 91.8622C143.224 92.7564 142.783 93.4344 142.486 93.889C142.195 94.3472 142.047 94.5798 142.047 94.5798C141.56 95.3492 141.534 96.3676 142.066 97.1784C142.789 98.2807 144.267 98.5866 145.366 97.8607C145.366 97.8607 145.595 97.7094 146.048 97.4115C146.496 97.1104 147.164 96.6612 148.045 96.0686C149.796 94.8803 152.379 93.101 155.711 90.89C159.064 88.6975 163.129 86.0856 168.019 83.6181C169.17 83.0505 170.364 82.5052 171.643 82.0103C172.913 81.508 174.233 81.0227 175.625 80.6096C178.393 79.7611 181.387 79.0894 184.521 78.7039C186.088 78.517 187.686 78.3869 189.3 78.3476C190.915 78.312 192.544 78.3635 194.161 78.5064C199.857 79.0389 206.946 80.8278 210.393 85.7883C212.64 89.023 212.942 93.2873 212.188 97.1561C210.88 103.87 206.746 109.679 202.191 114.771C186.162 132.688 162.952 145.008 138.913 147.011C118.893 148.576 100.226 139.353 97.5544 117.418C95.6448 101.742 102.982 86.1918 113.092 74.0838C127.362 56.9936 145.131 42.6953 165.374 33.7232C172.833 30.4168 180.568 27.6382 188.491 25.5933C209.564 20.1131 234.474 18.5074 254.87 27.3737C274.418 35.8716 286.877 55.0613 286.483 76.4807C286.365 82.7505 285.206 89.1452 283.246 95.5313C281.308 101.923 278.484 108.284 275.041 114.413C271.579 120.542 267.503 126.447 262.989 132.001C240.471 159.732 205.211 180.858 172.707 194.714C133.472 211.439 58.5315 231.21 30.5129 185.239C15.9075 161.276 21.2651 130.621 29.1883 105.347C29.4747 104.433 29.1915 103.391 28.3958 102.763C27.3676 101.951 25.8789 102.129 25.07 103.16C25.07 103.16 24.3939 104.021 23.0836 105.69C22.7533 106.097 22.4023 106.602 22.0042 107.145C21.6092 107.69 21.1767 108.288 20.7066 108.937C9.05634 125.023 1.26869 144.477 0.139985 164.406C-0.898721 182.75 3.84163 201.559 14.4087 216.568C27.0823 234.568 47.3503 246.191 68.6072 251.765C102.301 260.599 139.556 257.617 172.626 247.578C180.417 245.213 188.18 242.456 195.864 239.289C203.543 236.112 211.124 232.493 218.604 228.502C245.711 214.042 271.483 194.467 290.821 170.385C311.713 144.368 326.151 107.143 323.737 74.0036Z`;function Ue(){let e=document.querySelector(Re);if(e)return e;let t=document.createElement(`link`);return t.setAttribute(`rel`,`icon`),t.setAttribute(`type`,`image/svg+xml`),t.setAttribute(`href`,$),document.head.appendChild(t),t}function We(e){return e===`failed`?`<path d="M208 142L310 244M310 142L208 244" stroke="#EF4444" stroke-width="26" stroke-linecap="round"/>`:`<circle cx="258" cy="192" r="61" fill="${Ve[e]}"/>`}function Ge(e){switch(M(e)){case`running`:case`pending`:case`queued`:return`running`;case`passed`:case`flaky`:case`healed`:return`passed`;case`failed`:case`timeout`:return`failed`;case`cancelled`:return`cancelled`;case`skipped`:case`unknown`:return`default`}}function Ke(e){if(e===`default`)return $;let t=[`<svg width="324" height="257" viewBox="0 0 324 257" fill="none" xmlns="http://www.w3.org/2000/svg">`,`<path d="${He}" fill="${Be}"/>`,We(e),`</svg>`].join(``);return`${ze}${encodeURIComponent(t)}`}function qe(e){(0,U.useEffect)(()=>(Ue().setAttribute(`href`,Ke(e)),()=>{Ue().setAttribute(`href`,$)}),[e])}export{ue as a,H as c,ge as i,R as l,qe as n,J as o,Le as r,Y as s,Ge as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{l as t}from"./select-B5gV6YUf.js";import{a as n,c as r,i,o as a,r as o,s}from"./split-button-C7J0EKrF.js";import{n as c}from"./batch-action-bar-CZxUcNFZ.js";import{n as l,r as u,t as d}from"./popover-CvQRjfg5.js";import{Bt as f,Ht as p,Ln as m,Zn as h,fr as g}from"./index-B3xPCIyH.js";var _=h();function v({selectedCount:e,hiddenCount:h,useCache:g,useMemory:v,browserStackAvailable:y,open:b,onOpenChange:x,onUseCacheChange:S,onUseMemoryChange:C,onRunLocal:w,onRunBrowserStack:T,disabled:E=!1}){return(0,_.jsxs)(d,{open:b,onOpenChange:x,children:[(0,_.jsx)(u,{asChild:!0,children:(0,_.jsx)(p,{size:`sm`,disabled:E,children:`Run`})}),(0,_.jsxs)(l,{side:`top`,sideOffset:8,className:`w-[280px] max-w-[calc(100vw-2rem)] space-y-4`,children:[(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsxs)(`p`,{className:`text-sm font-medium`,children:[e,` selected`]}),h>0?(0,_.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[h,` hidden by filters`]}):null]}),(0,_.jsx)(f,{}),(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsxs)(`label`,{className:`flex items-center justify-between gap-3 text-sm`,children:[(0,_.jsx)(`span`,{children:`Use cache`}),(0,_.jsx)(c,{checked:g,onCheckedChange:e=>S(e===!0),disabled:E})]}),(0,_.jsxs)(`label`,{className:`flex items-center justify-between gap-3 text-sm`,children:[(0,_.jsx)(`span`,{children:`Use memory`}),(0,_.jsx)(c,{checked:v,onCheckedChange:e=>C(e===!0),disabled:E})]})]}),(0,_.jsx)(f,{}),(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsxs)(o,{children:[(0,_.jsx)(a,{asChild:!0,children:(0,_.jsxs)(p,{size:`sm`,className:`w-full justify-between`,disabled:E,children:[(0,_.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,_.jsx)(m,{className:`size-4`}),`Run`]}),(0,_.jsx)(t,{className:`size-4`})]})}),(0,_.jsxs)(i,{align:`end`,className:`w-[240px]`,children:[(0,_.jsxs)(n,{onClick:()=>{E||(w(),x(!1))},children:[(0,_.jsx)(s,{className:`size-4`}),`Run Local`]}),(0,_.jsxs)(n,{onClick:()=>{E||!y||(T(),x(!1))},disabled:!y,children:[(0,_.jsx)(r,{className:`size-4`}),`Run on BrowserStack`]})]})]}),y?null:(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`BrowserStack is unavailable in the current config.`})]})]})]})}var y=e(g(),1);function b(e,t){return e===0?!1:e===t?!0:`indeterminate`}function x({items:e,getId:t,visibleIds:n}){let[r,i]=(0,y.useState)({ids:[],itemsById:new Map});(0,y.useEffect)(()=>{i(n=>{let r=!1,i=new Map(n.itemsById);for(let n of e){let e=t(n);i.has(e)&&i.get(e)!==n&&(i.set(e,n),r=!0)}return r?{ids:n.ids,itemsById:i}:n})},[t,e]);let a=r.ids,o=(0,y.useMemo)(()=>new Set(a),[a]),s=(0,y.useMemo)(()=>a.map(e=>r.itemsById.get(e)).filter(e=>e!==void 0),[a,r.itemsById]),c=(0,y.useMemo)(()=>n??e.map(e=>t(e)),[t,e,n]),l=(0,y.useMemo)(()=>new Set(c),[c]),u=(0,y.useMemo)(()=>a.filter(e=>!l.has(e)).length,[a,l]),d=(0,y.useCallback)(e=>o.has(e),[o]),f=(0,y.useCallback)((e,n)=>{let r=t(e);i(t=>{let i=t.ids.includes(r);if(n&&i){if(t.itemsById.get(r)===e)return t;let n=new Map(t.itemsById);return n.set(r,e),{ids:t.ids,itemsById:n}}if(!n&&!i)return t;let a=new Map(t.itemsById);return n?(a.set(r,e),{ids:[...t.ids,r],itemsById:a}):(a.delete(r),{ids:t.ids.filter(e=>e!==r),itemsById:a})})},[t]),p=(0,y.useCallback)((e,n)=>{e.length!==0&&i(r=>{let i=new Map(r.itemsById),a=[...r.ids],o=!1;for(let r of e){let e=t(r),s=a.includes(e);if(n){s||(a.push(e),o=!0),i.get(e)!==r&&(i.set(e,r),o=!0);continue}s&&(o=!0,i.delete(e),a.splice(a.indexOf(e),1))}return o?{ids:a,itemsById:i}:r})},[t]),m=(0,y.useCallback)(()=>{i(e=>e.ids.length===0?e:{ids:[],itemsById:new Map})},[]),h=(0,y.useCallback)(e=>{let t=e.filter(e=>o.has(e)).length;return b(t,e.length)},[o]);return{selectedIds:a,selectedIdSet:o,selectedItems:s,selectedCount:a.length,hiddenCount:u,isSelected:d,setItemSelected:f,setItemsSelected:p,clearSelection:m,getVisibleSelectionState:h}}export{v as n,x as t};
@@ -0,0 +1 @@
1
+ var e={comments:{lineComment:`'`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`],[`<`,`>`],[`addhandler`,`end addhandler`],[`class`,`end class`],[`enum`,`end enum`],[`event`,`end event`],[`function`,`end function`],[`get`,`end get`],[`if`,`end if`],[`interface`,`end interface`],[`module`,`end module`],[`namespace`,`end namespace`],[`operator`,`end operator`],[`property`,`end property`],[`raiseevent`,`end raiseevent`],[`removehandler`,`end removehandler`],[`select`,`end select`],[`set`,`end set`],[`structure`,`end structure`],[`sub`,`end sub`],[`synclock`,`end synclock`],[`try`,`end try`],[`while`,`end while`],[`with`,`end with`],[`using`,`end using`],[`do`,`loop`],[`for`,`next`]],autoClosingPairs:[{open:`{`,close:`}`,notIn:[`string`,`comment`]},{open:`[`,close:`]`,notIn:[`string`,`comment`]},{open:`(`,close:`)`,notIn:[`string`,`comment`]},{open:`"`,close:`"`,notIn:[`string`,`comment`]},{open:`<`,close:`>`,notIn:[`string`,`comment`]}],folding:{markers:{start:RegExp(`^\\s*#Region\\b`),end:RegExp(`^\\s*#End Region\\b`)}}},t={defaultToken:``,tokenPostfix:`.vb`,ignoreCase:!0,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.array`,open:`[`,close:`]`},{token:`delimiter.parenthesis`,open:`(`,close:`)`},{token:`delimiter.angle`,open:`<`,close:`>`},{token:`keyword.tag-addhandler`,open:`addhandler`,close:`end addhandler`},{token:`keyword.tag-class`,open:`class`,close:`end class`},{token:`keyword.tag-enum`,open:`enum`,close:`end enum`},{token:`keyword.tag-event`,open:`event`,close:`end event`},{token:`keyword.tag-function`,open:`function`,close:`end function`},{token:`keyword.tag-get`,open:`get`,close:`end get`},{token:`keyword.tag-if`,open:`if`,close:`end if`},{token:`keyword.tag-interface`,open:`interface`,close:`end interface`},{token:`keyword.tag-module`,open:`module`,close:`end module`},{token:`keyword.tag-namespace`,open:`namespace`,close:`end namespace`},{token:`keyword.tag-operator`,open:`operator`,close:`end operator`},{token:`keyword.tag-property`,open:`property`,close:`end property`},{token:`keyword.tag-raiseevent`,open:`raiseevent`,close:`end raiseevent`},{token:`keyword.tag-removehandler`,open:`removehandler`,close:`end removehandler`},{token:`keyword.tag-select`,open:`select`,close:`end select`},{token:`keyword.tag-set`,open:`set`,close:`end set`},{token:`keyword.tag-structure`,open:`structure`,close:`end structure`},{token:`keyword.tag-sub`,open:`sub`,close:`end sub`},{token:`keyword.tag-synclock`,open:`synclock`,close:`end synclock`},{token:`keyword.tag-try`,open:`try`,close:`end try`},{token:`keyword.tag-while`,open:`while`,close:`end while`},{token:`keyword.tag-with`,open:`with`,close:`end with`},{token:`keyword.tag-using`,open:`using`,close:`end using`},{token:`keyword.tag-do`,open:`do`,close:`loop`},{token:`keyword.tag-for`,open:`for`,close:`next`}],keywords:`AddHandler.AddressOf.Alias.And.AndAlso.As.Async.Boolean.ByRef.Byte.ByVal.Call.Case.Catch.CBool.CByte.CChar.CDate.CDbl.CDec.Char.CInt.Class.CLng.CObj.Const.Continue.CSByte.CShort.CSng.CStr.CType.CUInt.CULng.CUShort.Date.Decimal.Declare.Default.Delegate.Dim.DirectCast.Do.Double.Each.Else.ElseIf.End.EndIf.Enum.Erase.Error.Event.Exit.False.Finally.For.Friend.Function.Get.GetType.GetXMLNamespace.Global.GoSub.GoTo.Handles.If.Implements.Imports.In.Inherits.Integer.Interface.Is.IsNot.Let.Lib.Like.Long.Loop.Me.Mod.Module.MustInherit.MustOverride.MyBase.MyClass.NameOf.Namespace.Narrowing.New.Next.Not.Nothing.NotInheritable.NotOverridable.Object.Of.On.Operator.Option.Optional.Or.OrElse.Out.Overloads.Overridable.Overrides.ParamArray.Partial.Private.Property.Protected.Public.RaiseEvent.ReadOnly.ReDim.RemoveHandler.Resume.Return.SByte.Select.Set.Shadows.Shared.Short.Single.Static.Step.Stop.String.Structure.Sub.SyncLock.Then.Throw.To.True.Try.TryCast.TypeOf.UInteger.ULong.UShort.Using.Variant.Wend.When.While.Widening.With.WithEvents.WriteOnly.Xor`.split(`.`),tagwords:`If.Sub.Select.Try.Class.Enum.Function.Get.Interface.Module.Namespace.Operator.Set.Structure.Using.While.With.Do.Loop.For.Next.Property.Continue.AddHandler.RemoveHandler.Event.RaiseEvent.SyncLock`.split(`.`),symbols:/[=><!~?;\.,:&|+\-*\/\^%]+/,integersuffix:/U?[DI%L&S@]?/,floatsuffix:/[R#F!]?/,tokenizer:{root:[{include:`@whitespace`},[/next(?!\w)/,{token:`keyword.tag-for`}],[/loop(?!\w)/,{token:`keyword.tag-do`}],[/end\s+(?!for|do)(addhandler|class|enum|event|function|get|if|interface|module|namespace|operator|property|raiseevent|removehandler|select|set|structure|sub|synclock|try|while|with|using)/,{token:`keyword.tag-$1`}],[/[a-zA-Z_]\w*/,{cases:{"@tagwords":{token:`keyword.tag-$0`},"@keywords":{token:`keyword.$0`},"@default":`identifier`}}],[/^\s*#\w+/,`keyword`],[/\d*\d+e([\-+]?\d+)?(@floatsuffix)/,`number.float`],[/\d*\.\d+(e[\-+]?\d+)?(@floatsuffix)/,`number.float`],[/&H[0-9a-f]+(@integersuffix)/,`number.hex`],[/&0[0-7]+(@integersuffix)/,`number.octal`],[/\d+(@integersuffix)/,`number`],[/#.*#/,`number`],[/[{}()\[\]]/,`@brackets`],[/@symbols/,`delimiter`],[/["\u201c\u201d]/,{token:`string.quote`,next:`@string`}]],whitespace:[[/[ \t\r\n]+/,``],[/(\'|REM(?!\w)).*$/,`comment`]],string:[[/[^"\u201c\u201d]+/,`string`],[/["\u201c\u201d]{2}/,`string.escape`],[/["\u201c\u201d]C?/,{token:`string.quote`,next:`@pop`}]]}};export{e as conf,t as language};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./observation-block-DdB7C1c0.js";import{Kn as n,Pt as r,Y as i,Zn as a,fr as o}from"./index-B3xPCIyH.js";import{t as s}from"./empty-state-Dluv5C1Q.js";var c=e(o(),1),l=a();function u({scope:e,scopeId:a,emptyTitle:o=`No ${e} memory yet`,emptyDescription:u=`This ${e} doesn't have cataloged observations in this workspace yet. Run the ${e} with memory enabled, then reopen this tab.`}){let[f,p]=(0,c.useState)([]),[m,h]=(0,c.useState)([]),[g,_]=(0,c.useState)(!0),[v,y]=(0,c.useState)(null),b=(0,c.useCallback)(()=>{let t=!1;return _(!0),y(null),h([]),i(e,a).then(e=>{t||(p(e.observations),h(e.invalidFiles),_(!1))}).catch(e=>{t||(p([]),h([]),y(e instanceof Error?e.message:`Failed to load memory`),_(!1))}),()=>{t=!0}},[e,a]);(0,c.useEffect)(()=>b(),[b]);let x=e===`test`?`Test memory`:`Suite memory`;return g?(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsx)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:(0,l.jsxs)(`div`,{className:`space-y-5`,children:[(0,l.jsx)(r,{className:`h-7 w-32`}),(0,l.jsxs)(`div`,{className:`space-y-3`,children:[(0,l.jsx)(r,{className:`h-20 w-full`}),(0,l.jsx)(r,{className:`h-20 w-full`}),(0,l.jsx)(r,{className:`h-20 w-full`})]})]})})}):v?(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsx)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:(0,l.jsxs)(`div`,{className:`rounded-md border border-border/70 bg-muted/20 px-4 py-3 text-sm text-muted-foreground`,children:[`Couldn't load this `,e,` memory. Refresh the page. If it continues, verify the dashboard server can read the workspace memory directory.`]})})}):(0,l.jsx)(`div`,{"data-shared-scope-memory-reader":`true`,className:`min-h-full w-full`,children:(0,l.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl px-4 py-6 sm:px-5 sm:py-8`,children:[m.length>0?(0,l.jsx)(d,{invalidFiles:m}):null,(0,l.jsx)(`h2`,{className:`text-base font-medium tracking-tight text-foreground`,children:x}),f.length===0?(0,l.jsx)(`div`,{className:`pt-4`,children:(0,l.jsx)(s,{icon:n,title:o,description:u})}):(0,l.jsx)(`article`,{className:`mt-6 divide-y divide-border/60`,children:f.map(e=>(0,l.jsx)(`section`,{className:`py-6 first:pt-0 last:pb-0`,children:(0,l.jsx)(t,{observation:e,query:``})},e.id))})]})})}function d({invalidFiles:e}){return(0,l.jsxs)(`div`,{className:`mb-4 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm text-amber-950 dark:text-amber-200`,children:[(0,l.jsxs)(`p`,{className:`font-medium`,children:[e.length,` invalid memory file`,e.length===1?``:`s`,` hidden from this reader.`]}),(0,l.jsx)(`p`,{className:`mt-1 text-xs text-amber-900/80 dark:text-amber-200/80`,children:e.map(e=>e.filename).join(`, `)})]})}var f=[`overview`,`insights`];function p(e,t){return e!==null&&t.includes(e)}function m(e,t,n={}){let r=n.defaultTab??`overview`,i=n.defaultView??t[0],a=e.get(`tab`),o=e.get(`view`);return{tab:p(a,f)?a:r,view:p(o,t)?o:i}}function h(e,t){let n=new URLSearchParams;if(n.set(`tab`,e.tab),n.set(`view`,e.view),t)for(let[e,r]of t.entries())e===`tab`||e===`view`||e===`sub`||n.append(e,r);return n}export{h as n,u as r,m as t};
@@ -0,0 +1,298 @@
1
+ var e={comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`[`,close:`]`},{open:`{`,close:`}`},{open:`(`,close:`)`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`}]};function t(e){let t=[],n=e.split(/\t+|\r+|\n+| +/);for(let e=0;e<n.length;++e)n[e].length>0&&t.push(n[e]);return t}var n=t(`true false`),r=t(`
2
+ alias
3
+ break
4
+ case
5
+ const
6
+ const_assert
7
+ continue
8
+ continuing
9
+ default
10
+ diagnostic
11
+ discard
12
+ else
13
+ enable
14
+ fn
15
+ for
16
+ if
17
+ let
18
+ loop
19
+ override
20
+ requires
21
+ return
22
+ struct
23
+ switch
24
+ var
25
+ while
26
+ `),i=t(`
27
+ NULL
28
+ Self
29
+ abstract
30
+ active
31
+ alignas
32
+ alignof
33
+ as
34
+ asm
35
+ asm_fragment
36
+ async
37
+ attribute
38
+ auto
39
+ await
40
+ become
41
+ binding_array
42
+ cast
43
+ catch
44
+ class
45
+ co_await
46
+ co_return
47
+ co_yield
48
+ coherent
49
+ column_major
50
+ common
51
+ compile
52
+ compile_fragment
53
+ concept
54
+ const_cast
55
+ consteval
56
+ constexpr
57
+ constinit
58
+ crate
59
+ debugger
60
+ decltype
61
+ delete
62
+ demote
63
+ demote_to_helper
64
+ do
65
+ dynamic_cast
66
+ enum
67
+ explicit
68
+ export
69
+ extends
70
+ extern
71
+ external
72
+ fallthrough
73
+ filter
74
+ final
75
+ finally
76
+ friend
77
+ from
78
+ fxgroup
79
+ get
80
+ goto
81
+ groupshared
82
+ highp
83
+ impl
84
+ implements
85
+ import
86
+ inline
87
+ instanceof
88
+ interface
89
+ layout
90
+ lowp
91
+ macro
92
+ macro_rules
93
+ match
94
+ mediump
95
+ meta
96
+ mod
97
+ module
98
+ move
99
+ mut
100
+ mutable
101
+ namespace
102
+ new
103
+ nil
104
+ noexcept
105
+ noinline
106
+ nointerpolation
107
+ noperspective
108
+ null
109
+ nullptr
110
+ of
111
+ operator
112
+ package
113
+ packoffset
114
+ partition
115
+ pass
116
+ patch
117
+ pixelfragment
118
+ precise
119
+ precision
120
+ premerge
121
+ priv
122
+ protected
123
+ pub
124
+ public
125
+ readonly
126
+ ref
127
+ regardless
128
+ register
129
+ reinterpret_cast
130
+ require
131
+ resource
132
+ restrict
133
+ self
134
+ set
135
+ shared
136
+ sizeof
137
+ smooth
138
+ snorm
139
+ static
140
+ static_assert
141
+ static_cast
142
+ std
143
+ subroutine
144
+ super
145
+ target
146
+ template
147
+ this
148
+ thread_local
149
+ throw
150
+ trait
151
+ try
152
+ type
153
+ typedef
154
+ typeid
155
+ typename
156
+ typeof
157
+ union
158
+ unless
159
+ unorm
160
+ unsafe
161
+ unsized
162
+ use
163
+ using
164
+ varying
165
+ virtual
166
+ volatile
167
+ wgsl
168
+ where
169
+ with
170
+ writeonly
171
+ yield
172
+ `),a=t(`
173
+ read write read_write
174
+ function private workgroup uniform storage
175
+ perspective linear flat
176
+ center centroid sample
177
+ vertex_index instance_index position front_facing frag_depth
178
+ local_invocation_id local_invocation_index
179
+ global_invocation_id workgroup_id num_workgroups
180
+ sample_index sample_mask
181
+ rgba8unorm
182
+ rgba8snorm
183
+ rgba8uint
184
+ rgba8sint
185
+ rgba16uint
186
+ rgba16sint
187
+ rgba16float
188
+ r32uint
189
+ r32sint
190
+ r32float
191
+ rg32uint
192
+ rg32sint
193
+ rg32float
194
+ rgba32uint
195
+ rgba32sint
196
+ rgba32float
197
+ bgra8unorm
198
+ `),o=t(`
199
+ bool
200
+ f16
201
+ f32
202
+ i32
203
+ sampler sampler_comparison
204
+ texture_depth_2d
205
+ texture_depth_2d_array
206
+ texture_depth_cube
207
+ texture_depth_cube_array
208
+ texture_depth_multisampled_2d
209
+ texture_external
210
+ texture_external
211
+ u32
212
+ `),s=t(`
213
+ array
214
+ atomic
215
+ mat2x2
216
+ mat2x3
217
+ mat2x4
218
+ mat3x2
219
+ mat3x3
220
+ mat3x4
221
+ mat4x2
222
+ mat4x3
223
+ mat4x4
224
+ ptr
225
+ texture_1d
226
+ texture_2d
227
+ texture_2d_array
228
+ texture_3d
229
+ texture_cube
230
+ texture_cube_array
231
+ texture_multisampled_2d
232
+ texture_storage_1d
233
+ texture_storage_2d
234
+ texture_storage_2d_array
235
+ texture_storage_3d
236
+ vec2
237
+ vec3
238
+ vec4
239
+ `),c=t(`
240
+ vec2i vec3i vec4i
241
+ vec2u vec3u vec4u
242
+ vec2f vec3f vec4f
243
+ vec2h vec3h vec4h
244
+ mat2x2f mat2x3f mat2x4f
245
+ mat3x2f mat3x3f mat3x4f
246
+ mat4x2f mat4x3f mat4x4f
247
+ mat2x2h mat2x3h mat2x4h
248
+ mat3x2h mat3x3h mat3x4h
249
+ mat4x2h mat4x3h mat4x4h
250
+ `),l=t(`
251
+ bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2
252
+ ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross
253
+ degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit
254
+ firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length
255
+ log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract
256
+ reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose
257
+ trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine
258
+ textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers
259
+ textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare
260
+ textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge
261
+ textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin
262
+ atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm
263
+ pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm
264
+ unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier
265
+ workgroupUniformLoad
266
+ `),u=t(`
267
+ &
268
+ &&
269
+ ->
270
+ /
271
+ =
272
+ ==
273
+ !=
274
+ >
275
+ >=
276
+ <
277
+ <=
278
+ %
279
+ -
280
+ --
281
+ +
282
+ ++
283
+ |
284
+ ||
285
+ *
286
+ <<
287
+ >>
288
+ +=
289
+ -=
290
+ *=
291
+ /=
292
+ %=
293
+ &=
294
+ |=
295
+ ^=
296
+ >>=
297
+ <<=
298
+ `),d=/enable|requires|diagnostic/,f=/[_\p{XID_Start}]\p{XID_Continue}*/u,p=`variable.predefined`,m={tokenPostfix:`.wgsl`,defaultToken:`invalid`,unicode:!0,atoms:n,keywords:r,reserved:i,predeclared_enums:a,predeclared_types:o,predeclared_type_generators:s,predeclared_type_aliases:c,predeclared_intrinsics:l,operators:u,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[d,`keyword`,`@directive`],[f,{cases:{"@atoms":p,"@keywords":`keyword`,"@reserved":`invalid`,"@predeclared_enums":p,"@predeclared_types":p,"@predeclared_type_generators":p,"@predeclared_type_aliases":p,"@predeclared_intrinsics":p,"@default":`identifier`}}],{include:`@commentOrSpace`},{include:`@numbers`},[/[{}()\[\]]/,`@brackets`],[`@`,`annotation`,`@attribute`],[/@symbols/,{cases:{"@operators":`operator`,"@default":`delimiter`}}],[/./,`invalid`]],commentOrSpace:[[/\s+/,`white`],[/\/\*/,`comment`,`@blockComment`],[/\/\/.*$/,`comment`]],blockComment:[[/[^\/*]+/,`comment`],[/\/\*/,`comment`,`@push`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],attribute:[{include:`@commentOrSpace`},[/\w+/,`annotation`,`@pop`]],directive:[{include:`@commentOrSpace`},[/[()]/,`@brackets`],[/,/,`delimiter`],[f,`meta.content`],[/;/,`delimiter`,`@pop`]],numbers:[[/0[fh]/,`number.float`],[/[1-9][0-9]*[fh]/,`number.float`],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,`number.float`],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,`number.float`],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,`number.float`],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,`number.hex`],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,`number.hex`],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,`number.hex`],[/0[xX][0-9a-fA-F]+[iu]?/,`number.hex`],[/[1-9][0-9]*[iu]?/,`number`],[/0[iu]?/,`number`]]}};export{e as conf,m as language};
@@ -0,0 +1 @@
1
+ import{c as e}from"./editor.api2-DEGvZ9jW.js";function t(e,t){let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}var n=typeof self==`object`&&self.constructor&&self.constructor.name===`DedicatedWorkerGlobalScope`&&globalThis.workerttPolicy!==void 0?globalThis.workerttPolicy:t(`defaultWorkerFactory`,{createScriptURL:e=>e});function r(e){let t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker==`function`)return r.getWorker(`workerMain.js`,t);if(typeof r.getWorkerUrl==`function`){let e=r.getWorkerUrl(`workerMain.js`,t);return new Worker(n?n.createScriptURL(e):e,{name:t,type:`module`})}}if(e.createWorker)return e.createWorker();throw Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function i(t){let n=Promise.resolve(r({label:t.label??`monaco-editor-worker`,moduleId:t.moduleId,createWorker:t.createWorker})).then(e=>(e.postMessage(`ignore`),e.postMessage(t.createData),e));return e.createWebWorker({worker:n,host:t.host,keepIdleModels:t.keepIdleModels})}export{i as t};
@@ -0,0 +1 @@
1
+ import{u as e}from"./editor.api2-DEGvZ9jW.js";var t={comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/<!--/,{token:`comment`,next:`@comment`}]],comment:[[/[^<\-]+/,`comment.content`],[/-->/,{token:`comment`,next:`@pop`}],[/<!--/,`comment.content.invalid`],[/[<\-]/,`comment.content`]]}};export{t as conf,n as language};