@codeyam/codeyam-cli 0.1.8 → 0.1.10

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 (343) hide show
  1. package/analyzer-template/.build-info.json +8 -8
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +4 -4
  4. package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +0 -33
  5. package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +13 -7
  6. package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
  7. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +0 -98
  8. package/analyzer-template/packages/aws/package.json +1 -1
  9. package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +76 -0
  10. package/analyzer-template/packages/database/src/lib/loadEntities.ts +0 -6
  11. package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +0 -65
  12. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +7 -0
  13. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -1
  14. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +76 -0
  15. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  16. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
  17. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +0 -6
  18. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
  19. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
  20. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +0 -25
  21. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
  22. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  23. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  24. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
  25. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
  26. package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
  27. package/analyzer-template/packages/ui-components/package.json +1 -1
  28. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  29. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  30. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
  31. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
  32. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
  33. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
  34. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
  35. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
  36. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
  37. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
  38. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +45 -0
  39. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
  40. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +101 -47
  41. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
  42. package/codeyam-cli/src/commands/default.js +3 -46
  43. package/codeyam-cli/src/commands/default.js.map +1 -1
  44. package/codeyam-cli/src/commands/editor.js +1793 -257
  45. package/codeyam-cli/src/commands/editor.js.map +1 -1
  46. package/codeyam-cli/src/commands/init.js +67 -34
  47. package/codeyam-cli/src/commands/init.js.map +1 -1
  48. package/codeyam-cli/src/data/techStacks.js +77 -0
  49. package/codeyam-cli/src/data/techStacks.js.map +1 -0
  50. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +173 -0
  51. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
  52. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
  53. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
  54. package/codeyam-cli/src/utils/__tests__/devServerState.test.js +134 -0
  55. package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
  56. package/codeyam-cli/src/utils/__tests__/editorApi.test.js +137 -0
  57. package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
  58. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +742 -1
  59. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
  60. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
  61. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
  62. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +181 -3
  63. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -1
  64. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +121 -0
  65. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
  66. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
  67. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
  68. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +249 -2
  69. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -1
  70. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +520 -0
  71. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
  72. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +118 -1
  73. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -1
  74. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +209 -3
  75. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -1
  76. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
  77. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
  78. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
  79. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
  80. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +221 -0
  81. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
  82. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +985 -2
  83. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
  84. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +213 -0
  85. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
  86. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +1742 -0
  87. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
  88. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +107 -0
  89. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
  90. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +129 -0
  91. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
  92. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +227 -0
  93. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
  94. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +454 -0
  95. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
  96. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +25 -5
  97. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  98. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
  99. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
  100. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
  101. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
  102. package/codeyam-cli/src/utils/analyzer.js +9 -0
  103. package/codeyam-cli/src/utils/analyzer.js.map +1 -1
  104. package/codeyam-cli/src/utils/analyzerFinalization.js +100 -0
  105. package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
  106. package/codeyam-cli/src/utils/backgroundServer.js +94 -18
  107. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  108. package/codeyam-cli/src/utils/database.js +37 -2
  109. package/codeyam-cli/src/utils/database.js.map +1 -1
  110. package/codeyam-cli/src/utils/devServerState.js +71 -0
  111. package/codeyam-cli/src/utils/devServerState.js.map +1 -0
  112. package/codeyam-cli/src/utils/editorApi.js +79 -0
  113. package/codeyam-cli/src/utils/editorApi.js.map +1 -0
  114. package/codeyam-cli/src/utils/editorAudit.js +135 -7
  115. package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
  116. package/codeyam-cli/src/utils/editorCapture.js +102 -0
  117. package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
  118. package/codeyam-cli/src/utils/editorDevServer.js +100 -1
  119. package/codeyam-cli/src/utils/editorDevServer.js.map +1 -1
  120. package/codeyam-cli/src/utils/editorEntityChangeStatus.js +44 -0
  121. package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
  122. package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
  123. package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
  124. package/codeyam-cli/src/utils/editorJournal.js +92 -4
  125. package/codeyam-cli/src/utils/editorJournal.js.map +1 -1
  126. package/codeyam-cli/src/utils/editorLoaderHelpers.js +113 -0
  127. package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
  128. package/codeyam-cli/src/utils/editorMockState.js +1 -1
  129. package/codeyam-cli/src/utils/editorPreloadHelpers.js +72 -1
  130. package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -1
  131. package/codeyam-cli/src/utils/editorPreview.js +72 -1
  132. package/codeyam-cli/src/utils/editorPreview.js.map +1 -1
  133. package/codeyam-cli/src/utils/editorScenarioSwitch.js +112 -0
  134. package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
  135. package/codeyam-cli/src/utils/editorScenarios.js +331 -0
  136. package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
  137. package/codeyam-cli/src/utils/editorSeedAdapter.js +173 -0
  138. package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
  139. package/codeyam-cli/src/utils/entityChangeStatus.js +349 -0
  140. package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
  141. package/codeyam-cli/src/utils/entityChangeStatus.server.js +158 -0
  142. package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
  143. package/codeyam-cli/src/utils/install-skills.js +1 -1
  144. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  145. package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
  146. package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
  147. package/codeyam-cli/src/utils/progress.js +2 -2
  148. package/codeyam-cli/src/utils/progress.js.map +1 -1
  149. package/codeyam-cli/src/utils/scenarioCoverage.js +75 -0
  150. package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
  151. package/codeyam-cli/src/utils/scenariosManifest.js +241 -0
  152. package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
  153. package/codeyam-cli/src/utils/serverState.js +30 -0
  154. package/codeyam-cli/src/utils/serverState.js.map +1 -1
  155. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +46 -16
  156. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  157. package/codeyam-cli/src/utils/simulationGateMiddleware.js +8 -1
  158. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
  159. package/codeyam-cli/src/utils/slugUtils.js +25 -0
  160. package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
  161. package/codeyam-cli/src/utils/syncMocksMiddleware.js +2 -2
  162. package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
  163. package/codeyam-cli/src/utils/webappDetection.js +21 -0
  164. package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
  165. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +40 -0
  166. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
  167. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +567 -0
  168. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
  169. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +146 -0
  170. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -0
  171. package/codeyam-cli/src/webserver/app/lib/clientErrors.js +65 -0
  172. package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
  173. package/codeyam-cli/src/webserver/app/lib/git.js +397 -0
  174. package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
  175. package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-DmJveP3T.js → CopyButton-BPXZwM4t.js} +1 -1
  176. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-C76mRRiF.js → EntityItem-BcgbViKV.js} +3 -3
  177. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CobE682z.js → EntityTypeIcon-CQIG2qda.js} +9 -9
  178. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-djPLI-WV.js → ReportIssueModal-BzHcG7SE.js} +3 -3
  179. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-B76aig_2.js → ScenarioViewer-TSD3C211.js} +3 -3
  180. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +1 -0
  181. package/codeyam-cli/src/webserver/build/client/assets/{_index-C96V0n15.js → _index-DLxKhri3.js} +3 -3
  182. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BpKzcsJz.js → activity.(_tab)-BcY3q6nt.js} +6 -6
  183. package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
  184. package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
  185. package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
  186. package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-D9hemwl6.js → agent-transcripts-Bni3iiUj.js} +5 -5
  187. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
  188. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
  189. package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
  190. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
  191. package/codeyam-cli/src/webserver/build/client/assets/{book-open-D_nMCFmP.js → book-open-BYOypzCa.js} +2 -2
  192. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BH2h1Ea2.js → chevron-down-C_Pmso5S.js} +2 -2
  193. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-DyIKORY6.js → circle-check-BVMi9VA5.js} +2 -2
  194. package/codeyam-cli/src/webserver/build/client/assets/{copy-NDbZjXao.js → copy-n2FB0_Sw.js} +3 -3
  195. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CC6AbExI.js +41 -0
  196. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-Ii3inc0_.js +1 -0
  197. package/codeyam-cli/src/webserver/build/client/assets/editor-COWCNVyV.js +10 -0
  198. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-CNB06EIa.js +41 -0
  199. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-CrjR3zZW.js → entity._sha._-DwCV5__E.js} +3 -3
  200. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-CXSi2aeZ.js +6 -0
  201. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-CHMiAog3.js +6 -0
  202. package/codeyam-cli/src/webserver/build/client/assets/{files-DO4CZ16O.js → files-BZrlFE1F.js} +1 -1
  203. package/codeyam-cli/src/webserver/build/client/assets/git-DdZcvjGh.js +1 -0
  204. package/codeyam-cli/src/webserver/build/client/assets/globals-phvmGvat.css +1 -0
  205. package/codeyam-cli/src/webserver/build/client/assets/index-yHOVb4rc.js +15 -0
  206. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BAXYRVEO.js → loader-circle-DaAZ_H2w.js} +2 -2
  207. package/codeyam-cli/src/webserver/build/client/assets/manifest-6134dc40.js +1 -0
  208. package/codeyam-cli/src/webserver/build/client/assets/memory-9gnxSZlb.js +101 -0
  209. package/codeyam-cli/src/webserver/build/client/assets/{pause-DTAcYxBt.js → pause-f5-1lKBt.js} +3 -3
  210. package/codeyam-cli/src/webserver/build/client/assets/root-BWAyuj0r.js +67 -0
  211. package/codeyam-cli/src/webserver/build/client/assets/{search-fKo7v0Zo.js → search-Di64LWVb.js} +2 -2
  212. package/codeyam-cli/src/webserver/build/client/assets/{settings-DfuTtcJP.js → settings-0OrEMU6J.js} +1 -1
  213. package/codeyam-cli/src/webserver/build/client/assets/{simulations-B3aOzpCZ.js → simulations-DWT-CvLy.js} +1 -1
  214. package/codeyam-cli/src/webserver/build/client/assets/{terminal-BG4heKCG.js → terminal-Br7MOqts.js} +3 -3
  215. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DtSmdtM4.js → triangle-alert-BLdiCuG-.js} +2 -2
  216. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-C-_hOl_g.js +1 -0
  217. package/codeyam-cli/src/webserver/build/client/sound-test.html +98 -0
  218. package/codeyam-cli/src/webserver/build/server/assets/index-ChX0hPcu.js +1 -0
  219. package/codeyam-cli/src/webserver/build/server/assets/init-kSNsMjj8.js +10 -0
  220. package/codeyam-cli/src/webserver/build/server/assets/server-build-Bm2xIhmh.js +439 -0
  221. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  222. package/codeyam-cli/src/webserver/build-info.json +5 -5
  223. package/codeyam-cli/src/webserver/editorProxy.js +487 -50
  224. package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
  225. package/codeyam-cli/src/webserver/idleDetector.js +73 -0
  226. package/codeyam-cli/src/webserver/idleDetector.js.map +1 -0
  227. package/codeyam-cli/src/webserver/public/sound-test.html +98 -0
  228. package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +242 -3
  229. package/codeyam-cli/src/webserver/scripts/journalCapture.ts +94 -4
  230. package/codeyam-cli/src/webserver/server.js +90 -16
  231. package/codeyam-cli/src/webserver/server.js.map +1 -1
  232. package/codeyam-cli/src/webserver/terminalServer.js +71 -34
  233. package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
  234. package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
  235. package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
  236. package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
  237. package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
  238. package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
  239. package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
  240. package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
  241. package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
  242. package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
  243. package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
  244. package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
  245. package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
  246. package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
  247. package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
  248. package/codeyam-cli/templates/codeyam-editor-claude.md +84 -5
  249. package/codeyam-cli/templates/editor-step-hook.py +98 -8
  250. package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
  251. package/codeyam-cli/templates/expo-react-native/README.md +41 -0
  252. package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
  253. package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
  254. package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
  255. package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
  256. package/codeyam-cli/templates/expo-react-native/app.json +18 -0
  257. package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
  258. package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
  259. package/codeyam-cli/templates/expo-react-native/global.css +3 -0
  260. package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
  261. package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
  262. package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
  263. package/codeyam-cli/templates/expo-react-native/package.json +38 -0
  264. package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
  265. package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
  266. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
  267. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
  268. package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
  269. package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
  270. package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
  271. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
  272. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +9 -4
  273. package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
  274. package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +21 -0
  275. package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +5 -1
  276. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +4 -1
  277. package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +92 -0
  278. package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
  279. package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
  280. package/codeyam-cli/templates/{nextjs-prisma-sqlite/PRISMA_SETUP.md → nextjs-prisma-supabase/SUPABASE_SETUP.md} +37 -17
  281. package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
  282. package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
  283. package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
  284. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
  285. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
  286. package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
  287. package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
  288. package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
  289. package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
  290. package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
  291. package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
  292. package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
  293. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
  294. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
  295. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
  296. package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
  297. package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +2 -2
  298. package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +97 -17
  299. package/codeyam-cli/templates/skills/codeyam-memory/SKILL.md +10 -10
  300. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
  301. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
  302. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
  303. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
  304. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
  305. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
  306. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
  307. package/package.json +14 -9
  308. package/packages/ai/src/lib/generateExecutionFlows.js +0 -11
  309. package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
  310. package/packages/analyze/src/lib/ProjectAnalyzer.js +10 -4
  311. package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
  312. package/packages/analyze/src/lib/asts/index.js +4 -2
  313. package/packages/analyze/src/lib/asts/index.js.map +1 -1
  314. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +0 -40
  315. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
  316. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +76 -0
  317. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  318. package/packages/database/src/lib/loadEntities.js +0 -6
  319. package/packages/database/src/lib/loadEntities.js.map +1 -1
  320. package/packages/database/src/lib/updateCommitMetadata.js +0 -25
  321. package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
  322. package/packages/types/src/enums/ProjectFramework.js +2 -0
  323. package/packages/types/src/enums/ProjectFramework.js.map +1 -1
  324. package/codeyam-cli/src/webserver/build/client/assets/Terminal-Dnj5CY9R.js +0 -41
  325. package/codeyam-cli/src/webserver/build/client/assets/addon-fit-CUXOrorO.js +0 -1
  326. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CMT1jU2q.js +0 -21
  327. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BiM6z3Do.js +0 -1
  328. package/codeyam-cli/src/webserver/build/client/assets/editor-D1DAKXtT.js +0 -8
  329. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-DkzqFzFj.js +0 -6
  330. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C28BiQzt.js +0 -6
  331. package/codeyam-cli/src/webserver/build/client/assets/git-CFCTYk9I.js +0 -15
  332. package/codeyam-cli/src/webserver/build/client/assets/globals-B17TBSS6.css +0 -1
  333. package/codeyam-cli/src/webserver/build/client/assets/manifest-a632de18.js +0 -1
  334. package/codeyam-cli/src/webserver/build/client/assets/memory-Dg0mvYrI.js +0 -96
  335. package/codeyam-cli/src/webserver/build/client/assets/root-DUKqhFlb.js +0 -67
  336. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-ByhSyh0W.js +0 -1
  337. package/codeyam-cli/src/webserver/build/server/assets/index-HfLydfDq.js +0 -1
  338. package/codeyam-cli/src/webserver/build/server/assets/server-build-CUu_F-oo.js +0 -366
  339. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.sh +0 -108
  340. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.sh +0 -69
  341. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.sh +0 -12
  342. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter.jq +0 -45
  343. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.sh +0 -139
@@ -0,0 +1,58 @@
1
+ function Ee(ne,ve){for(var re=0;re<ve.length;re++){const Q=ve[re];if(typeof Q!="string"&&!Array.isArray(Q)){for(const V in Q)if(V!=="default"&&!(V in ne)){const oe=Object.getOwnPropertyDescriptor(Q,V);oe&&Object.defineProperty(ne,V,oe.get?oe:{enumerable:!0,get:()=>Q[V]})}}}return Object.freeze(Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"}))}var me={exports:{}},Me;function Se(){return Me||(Me=1,(function(ne,ve){(function(re,Q){ne.exports=Q()})(self,(()=>(()=>{var re={965:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphRenderer=void 0;const l=c(374),o=c(509),r=c(855),_=c(859),m=c(381),d=11,i=d*Float32Array.BYTES_PER_ELEMENT;let t,g=0,w=0,L=0;class M extends _.Disposable{constructor(a,C,u,h){super(),this._terminal=a,this._gl=C,this._dimensions=u,this._optionsService=h,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const s=this._gl;o.TextureAtlas.maxAtlasPages===void 0&&(o.TextureAtlas.maxAtlasPages=Math.min(32,(0,l.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS))),o.TextureAtlas.maxTextureSize=(0,l.throwIfFalsy)(s.getParameter(s.MAX_TEXTURE_SIZE))),this._program=(0,l.throwIfFalsy)((0,m.createProgram)(s,`#version 300 es
2
+ layout (location = 0) in vec2 a_unitquad;
3
+ layout (location = 1) in vec2 a_cellpos;
4
+ layout (location = 2) in vec2 a_offset;
5
+ layout (location = 3) in vec2 a_size;
6
+ layout (location = 4) in float a_texpage;
7
+ layout (location = 5) in vec2 a_texcoord;
8
+ layout (location = 6) in vec2 a_texsize;
9
+
10
+ uniform mat4 u_projection;
11
+ uniform vec2 u_resolution;
12
+
13
+ out vec2 v_texcoord;
14
+ flat out int v_texpage;
15
+
16
+ void main() {
17
+ vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
18
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
19
+ v_texpage = int(a_texpage);
20
+ v_texcoord = a_texcoord + a_unitquad * a_texsize;
21
+ }`,(function(y){let R="";for(let b=1;b<y;b++)R+=` else if (v_texpage == ${b}) { outColor = texture(u_texture[${b}], v_texcoord); }`;return`#version 300 es
22
+ precision lowp float;
23
+
24
+ in vec2 v_texcoord;
25
+ flat in int v_texpage;
26
+
27
+ uniform sampler2D u_texture[${y}];
28
+
29
+ out vec4 outColor;
30
+
31
+ void main() {
32
+ if (v_texpage == 0) {
33
+ outColor = texture(u_texture[0], v_texcoord);
34
+ } ${R}
35
+ }`})(o.TextureAtlas.maxAtlasPages))),this.register((0,_.toDisposable)((()=>s.deleteProgram(this._program)))),this._projectionLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,l.throwIfFalsy)(s.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);const v=new Float32Array([0,0,1,0,0,1,1,1]),n=s.createBuffer();this.register((0,_.toDisposable)((()=>s.deleteBuffer(n)))),s.bindBuffer(s.ARRAY_BUFFER,n),s.bufferData(s.ARRAY_BUFFER,v,s.STATIC_DRAW),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const p=new Uint8Array([0,1,2,3]),f=s.createBuffer();this.register((0,_.toDisposable)((()=>s.deleteBuffer(f)))),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,f),s.bufferData(s.ELEMENT_ARRAY_BUFFER,p,s.STATIC_DRAW),this._attributesBuffer=(0,l.throwIfFalsy)(s.createBuffer()),this.register((0,_.toDisposable)((()=>s.deleteBuffer(this._attributesBuffer)))),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,2,s.FLOAT,!1,i,0),s.vertexAttribDivisor(2,1),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,s.FLOAT,!1,i,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(3,1),s.enableVertexAttribArray(4),s.vertexAttribPointer(4,1,s.FLOAT,!1,i,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(4,1),s.enableVertexAttribArray(5),s.vertexAttribPointer(5,2,s.FLOAT,!1,i,5*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(5,1),s.enableVertexAttribArray(6),s.vertexAttribPointer(6,2,s.FLOAT,!1,i,7*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(6,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,i,9*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.useProgram(this._program);const A=new Int32Array(o.TextureAtlas.maxAtlasPages);for(let y=0;y<o.TextureAtlas.maxAtlasPages;y++)A[y]=y;s.uniform1iv(this._textureLocation,A),s.uniformMatrix4fv(this._projectionLocation,!1,m.PROJECTION_MATRIX),this._atlasTextures=[];for(let y=0;y<o.TextureAtlas.maxAtlasPages;y++){const R=new m.GLTexture((0,l.throwIfFalsy)(s.createTexture()));this.register((0,_.toDisposable)((()=>s.deleteTexture(R.texture)))),s.activeTexture(s.TEXTURE0+y),s.bindTexture(s.TEXTURE_2D,R.texture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[y]=R}s.enable(s.BLEND),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(a,C,u,h,s,v,n,p,f){this._updateCell(this._vertices.attributes,a,C,u,h,s,v,n,p,f)}_updateCell(a,C,u,h,s,v,n,p,f,A){g=(u*this._terminal.cols+C)*d,h!==r.NULL_CELL_CODE&&h!==void 0?this._atlas&&(t=p&&p.length>1?this._atlas.getRasterizedGlyphCombinedChar(p,s,v,n,!1):this._atlas.getRasterizedGlyph(h,s,v,n,!1),w=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),s!==A&&t.offset.x>w?(L=t.offset.x-w,a[g]=-(t.offset.x-L)+this._dimensions.device.char.left,a[g+1]=-t.offset.y+this._dimensions.device.char.top,a[g+2]=(t.size.x-L)/this._dimensions.device.canvas.width,a[g+3]=t.size.y/this._dimensions.device.canvas.height,a[g+4]=t.texturePage,a[g+5]=t.texturePositionClipSpace.x+L/this._atlas.pages[t.texturePage].canvas.width,a[g+6]=t.texturePositionClipSpace.y,a[g+7]=t.sizeClipSpace.x-L/this._atlas.pages[t.texturePage].canvas.width,a[g+8]=t.sizeClipSpace.y):(a[g]=-t.offset.x+this._dimensions.device.char.left,a[g+1]=-t.offset.y+this._dimensions.device.char.top,a[g+2]=t.size.x/this._dimensions.device.canvas.width,a[g+3]=t.size.y/this._dimensions.device.canvas.height,a[g+4]=t.texturePage,a[g+5]=t.texturePositionClipSpace.x,a[g+6]=t.texturePositionClipSpace.y,a[g+7]=t.sizeClipSpace.x,a[g+8]=t.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,l.allowRescaling)(h,f,t.size.x,this._dimensions.device.cell.width)&&(a[g+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):a.fill(0,g,g+d-1-2)}clear(){const a=this._terminal,C=a.cols*a.rows*d;this._vertices.count!==C?this._vertices.attributes=new Float32Array(C):this._vertices.attributes.fill(0);let u=0;for(;u<this._vertices.attributesBuffers.length;u++)this._vertices.count!==C?this._vertices.attributesBuffers[u]=new Float32Array(C):this._vertices.attributesBuffers[u].fill(0);this._vertices.count=C,u=0;for(let h=0;h<a.rows;h++)for(let s=0;s<a.cols;s++)this._vertices.attributes[u+9]=s/a.cols,this._vertices.attributes[u+10]=h/a.rows,u+=d}handleResize(){const a=this._gl;a.useProgram(this._program),a.viewport(0,0,a.canvas.width,a.canvas.height),a.uniform2f(this._resolutionLocation,a.canvas.width,a.canvas.height),this.clear()}render(a){if(!this._atlas)return;const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const u=this._vertices.attributesBuffers[this._activeBuffer];let h=0;for(let s=0;s<a.lineLengths.length;s++){const v=s*this._terminal.cols*d,n=this._vertices.attributes.subarray(v,v+a.lineLengths[s]*d);u.set(n,h),h+=n.length}C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,u.subarray(0,h),C.STREAM_DRAW);for(let s=0;s<this._atlas.pages.length;s++)this._atlas.pages[s].version!==this._atlasTextures[s].version&&this._bindAtlasPageTexture(C,this._atlas,s);C.drawElementsInstanced(C.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,h/d)}setAtlas(a){this._atlas=a;for(const C of this._atlasTextures)C.version=-1}_bindAtlasPageTexture(a,C,u){a.activeTexture(a.TEXTURE0+u),a.bindTexture(a.TEXTURE_2D,this._atlasTextures[u].texture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,C.pages[u].canvas),a.generateMipmap(a.TEXTURE_2D),this._atlasTextures[u].version=C.pages[u].version}setDimensions(a){this._dimensions=a}}e.GlyphRenderer=M},742:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RectangleRenderer=void 0;const l=c(374),o=c(859),r=c(310),_=c(381),m=8*Float32Array.BYTES_PER_ELEMENT;class d{constructor(){this.attributes=new Float32Array(160),this.count=0}}let i=0,t=0,g=0,w=0,L=0,M=0,x=0;class a extends o.Disposable{constructor(u,h,s,v){super(),this._terminal=u,this._gl=h,this._dimensions=s,this._themeService=v,this._vertices=new d,this._verticesCursor=new d;const n=this._gl;this._program=(0,l.throwIfFalsy)((0,_.createProgram)(n,`#version 300 es
36
+ layout (location = 0) in vec2 a_position;
37
+ layout (location = 1) in vec2 a_size;
38
+ layout (location = 2) in vec4 a_color;
39
+ layout (location = 3) in vec2 a_unitquad;
40
+
41
+ uniform mat4 u_projection;
42
+
43
+ out vec4 v_color;
44
+
45
+ void main() {
46
+ vec2 zeroToOne = a_position + (a_unitquad * a_size);
47
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
48
+ v_color = a_color;
49
+ }`,`#version 300 es
50
+ precision lowp float;
51
+
52
+ in vec4 v_color;
53
+
54
+ out vec4 outColor;
55
+
56
+ void main() {
57
+ outColor = v_color;
58
+ }`)),this.register((0,o.toDisposable)((()=>n.deleteProgram(this._program)))),this._projectionLocation=(0,l.throwIfFalsy)(n.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=n.createVertexArray(),n.bindVertexArray(this._vertexArrayObject);const p=new Float32Array([0,0,1,0,0,1,1,1]),f=n.createBuffer();this.register((0,o.toDisposable)((()=>n.deleteBuffer(f)))),n.bindBuffer(n.ARRAY_BUFFER,f),n.bufferData(n.ARRAY_BUFFER,p,n.STATIC_DRAW),n.enableVertexAttribArray(3),n.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const A=new Uint8Array([0,1,2,3]),y=n.createBuffer();this.register((0,o.toDisposable)((()=>n.deleteBuffer(y)))),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,y),n.bufferData(n.ELEMENT_ARRAY_BUFFER,A,n.STATIC_DRAW),this._attributesBuffer=(0,l.throwIfFalsy)(n.createBuffer()),this.register((0,o.toDisposable)((()=>n.deleteBuffer(this._attributesBuffer)))),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.enableVertexAttribArray(0),n.vertexAttribPointer(0,2,n.FLOAT,!1,m,0),n.vertexAttribDivisor(0,1),n.enableVertexAttribArray(1),n.vertexAttribPointer(1,2,n.FLOAT,!1,m,2*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(1,1),n.enableVertexAttribArray(2),n.vertexAttribPointer(2,4,n.FLOAT,!1,m,4*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(2,1),this._updateCachedColors(v.colors),this.register(this._themeService.onChangeColors((R=>{this._updateCachedColors(R),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(u){const h=this._gl;h.useProgram(this._program),h.bindVertexArray(this._vertexArrayObject),h.uniformMatrix4fv(this._projectionLocation,!1,_.PROJECTION_MATRIX),h.bindBuffer(h.ARRAY_BUFFER,this._attributesBuffer),h.bufferData(h.ARRAY_BUFFER,u.attributes,h.DYNAMIC_DRAW),h.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,h.UNSIGNED_BYTE,0,u.count)}handleResize(){this._updateViewportRectangle()}setDimensions(u){this._dimensions=u}_updateCachedColors(u){this._bgFloat=this._colorToFloat32Array(u.background),this._cursorFloat=this._colorToFloat32Array(u.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(u){const h=this._terminal,s=this._vertices;let v,n,p,f,A,y,R,b,S,E,O,B=1;for(v=0;v<h.rows;v++){for(p=-1,f=0,A=0,y=!1,n=0;n<h.cols;n++)R=(v*h.cols+n)*r.RENDER_MODEL_INDICIES_PER_CELL,b=u.cells[R+r.RENDER_MODEL_BG_OFFSET],S=u.cells[R+r.RENDER_MODEL_FG_OFFSET],E=!!(67108864&S),(b!==f||S!==A&&(y||E))&&((f!==0||y&&A!==0)&&(O=8*B++,this._updateRectangle(s,O,A,f,p,n,v)),p=n,f=b,A=S,y=E);(f!==0||y&&A!==0)&&(O=8*B++,this._updateRectangle(s,O,A,f,p,h.cols,v))}s.count=B}updateCursor(u){const h=this._verticesCursor,s=u.cursor;if(!s||s.style==="block")return void(h.count=0);let v,n=0;s.style!=="bar"&&s.style!=="outline"||(v=8*n++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.style==="bar"?s.dpr*s.cursorWidth:s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),s.style!=="underline"&&s.style!=="outline"||(v=8*n++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,(s.y+1)*this._dimensions.device.cell.height-s.dpr,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat)),s.style==="outline"&&(v=8*n++,this._addRectangleFloat(h.attributes,v,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat),v=8*n++,this._addRectangleFloat(h.attributes,v,(s.x+s.width)*this._dimensions.device.cell.width-s.dpr,s.y*this._dimensions.device.cell.height,s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),h.count=n}_updateRectangle(u,h,s,v,n,p,f){if(67108864&s)switch(50331648&s){case 16777216:case 33554432:i=this._themeService.colors.ansi[255&s].rgba;break;case 50331648:i=(16777215&s)<<8;break;default:i=this._themeService.colors.foreground.rgba}else switch(50331648&v){case 16777216:case 33554432:i=this._themeService.colors.ansi[255&v].rgba;break;case 50331648:i=(16777215&v)<<8;break;default:i=this._themeService.colors.background.rgba}u.attributes.length<h+4&&(u.attributes=(0,_.expandFloat32Array)(u.attributes,this._terminal.rows*this._terminal.cols*8)),t=n*this._dimensions.device.cell.width,g=f*this._dimensions.device.cell.height,w=(i>>24&255)/255,L=(i>>16&255)/255,M=(i>>8&255)/255,x=1,this._addRectangle(u.attributes,h,t,g,(p-n)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,w,L,M,x)}_addRectangle(u,h,s,v,n,p,f,A,y,R){u[h]=s/this._dimensions.device.canvas.width,u[h+1]=v/this._dimensions.device.canvas.height,u[h+2]=n/this._dimensions.device.canvas.width,u[h+3]=p/this._dimensions.device.canvas.height,u[h+4]=f,u[h+5]=A,u[h+6]=y,u[h+7]=R}_addRectangleFloat(u,h,s,v,n,p,f){u[h]=s/this._dimensions.device.canvas.width,u[h+1]=v/this._dimensions.device.canvas.height,u[h+2]=n/this._dimensions.device.canvas.width,u[h+3]=p/this._dimensions.device.canvas.height,u[h+4]=f[0],u[h+5]=f[1],u[h+6]=f[2],u[h+7]=f[3]}_colorToFloat32Array(u){return new Float32Array([(u.rgba>>24&255)/255,(u.rgba>>16&255)/255,(u.rgba>>8&255)/255,(255&u.rgba)/255])}}e.RectangleRenderer=a},310:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RenderModel=e.COMBINED_CHAR_BIT_MASK=e.RENDER_MODEL_EXT_OFFSET=e.RENDER_MODEL_FG_OFFSET=e.RENDER_MODEL_BG_OFFSET=e.RENDER_MODEL_INDICIES_PER_CELL=void 0;const l=c(296);e.RENDER_MODEL_INDICIES_PER_CELL=4,e.RENDER_MODEL_BG_OFFSET=1,e.RENDER_MODEL_FG_OFFSET=2,e.RENDER_MODEL_EXT_OFFSET=3,e.COMBINED_CHAR_BIT_MASK=2147483648,e.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,l.createSelectionRenderModel)()}resize(o,r){const _=o*r*e.RENDER_MODEL_INDICIES_PER_CELL;_!==this.cells.length&&(this.cells=new Uint32Array(_),this.lineLengths=new Uint32Array(r))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JoinedCellData=e.WebglRenderer=void 0;const l=c(820),o=c(274),r=c(627),_=c(457),m=c(56),d=c(374),i=c(345),t=c(859),g=c(147),w=c(782),L=c(855),M=c(965),x=c(742),a=c(310),C=c(733);class u extends t.Disposable{constructor(n,p,f,A,y,R,b,S,E){super(),this._terminal=n,this._characterJoinerService=p,this._charSizeService=f,this._coreBrowserService=A,this._coreService=y,this._decorationService=R,this._optionsService=b,this._themeService=S,this._cursorBlinkStateManager=new t.MutableDisposable,this._charAtlasDisposable=this.register(new t.MutableDisposable),this._observerDisposable=this.register(new t.MutableDisposable),this._model=new a.RenderModel,this._workCell=new w.CellData,this._workCell2=new w.CellData,this._rectangleRenderer=this.register(new t.MutableDisposable),this._glyphRenderer=this.register(new t.MutableDisposable),this._onChangeTextureAtlas=this.register(new i.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new i.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new i.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new i.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new i.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new o.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new C.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,b,this._themeService)],this.dimensions=(0,d.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(b.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const O={antialias:!1,depth:!1,preserveDrawingBuffer:E};if(this._gl=this._canvas.getContext("webgl2",O),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextlost",(B=>{console.log("webglcontextlost event received"),B.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(B)}),3e3)}))),this.register((0,l.addDisposableDomListener)(this._canvas,"webglcontextrestored",(B=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,r.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,m.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((B,W)=>this._setCanvasDevicePixelDimensions(B,W))),this.register(this._coreBrowserService.onWindowChange((B=>{this._observerDisposable.value=(0,m.observeDevicePixelDimensions)(this._canvas,B,((W,I)=>this._setCanvasDevicePixelDimensions(W,I)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,t.toDisposable)((()=>{var B;for(const W of this._renderLayers)W.dispose();(B=this._canvas.parentElement)==null||B.removeChild(this._canvas),(0,r.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var n;return(n=this._charAtlas)==null?void 0:n.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(n,p){var f,A,y,R;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const b of this._renderLayers)b.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(f=this._rectangleRenderer.value)==null||f.setDimensions(this.dimensions),(A=this._rectangleRenderer.value)==null||A.handleResize(),(y=this._glyphRenderer.value)==null||y.setDimensions(this.dimensions),(R=this._glyphRenderer.value)==null||R.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var n;for(const p of this._renderLayers)p.handleBlur(this._terminal);(n=this._cursorBlinkStateManager.value)==null||n.pause(),this._requestRedrawViewport()}handleFocus(){var n;for(const p of this._renderLayers)p.handleFocus(this._terminal);(n=this._cursorBlinkStateManager.value)==null||n.resume(),this._requestRedrawViewport()}handleSelectionChanged(n,p,f){for(const A of this._renderLayers)A.handleSelectionChanged(this._terminal,n,p,f);this._model.selection.update(this._core,n,p,f),this._requestRedrawViewport()}handleCursorMove(){var n;for(const p of this._renderLayers)p.handleCursorMove(this._terminal);(n=this._cursorBlinkStateManager.value)==null||n.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new M.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var p;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const n=(0,r.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==n&&(this._onChangeTextureAtlas.fire(n.pages[0].canvas),this._charAtlasDisposable.value=(0,t.getDisposeArrayDisposable)([(0,i.forwardEvent)(n.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,i.forwardEvent)(n.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=n,this._charAtlas.warmUp(),(p=this._glyphRenderer.value)==null||p.setAtlas(this._charAtlas)}_clearModel(n){var p;this._model.clear(),n&&((p=this._glyphRenderer.value)==null||p.clear())}clearTextureAtlas(){var n;(n=this._charAtlas)==null||n.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var n;this._clearModel(!0);for(const p of this._renderLayers)p.reset(this._terminal);(n=this._cursorBlinkStateManager.value)==null||n.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(n){return-1}deregisterCharacterJoiner(n){return!1}renderRows(n,p){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const f of this._renderLayers)f.handleGridChanged(this._terminal,n,p);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(n,p),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new _.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(n,p){const f=this._core;let A,y,R,b,S,E,O,B,W,I,Z,q,k,j,z=this._workCell;n=s(n,f.rows-1,0),p=s(p,f.rows-1,0);const Y=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,fe=Y-f.buffer.ydisp,ee=Math.min(this._terminal.buffer.active.cursorX,f.cols-1);let te=-1;const U=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let ie=!1;for(y=n;y<=p;y++)for(R=y+f.buffer.ydisp,b=f.buffer.lines.get(R),this._model.lineLengths[y]=0,S=this._characterJoinerService.getJoinedCharacters(R),k=0;k<f.cols;k++)if(A=this._cellColorResolver.result.bg,b.loadCell(k,z),k===0&&(A=this._cellColorResolver.result.bg),E=!1,O=k,S.length>0&&k===S[0][0]&&(E=!0,B=S.shift(),z=new h(z,b.translateToString(!0,B[0],B[1]),B[1]-B[0]),O=B[1]-1),W=z.getChars(),I=z.getCode(),q=(y*f.cols+k)*a.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(z,k,R,this.dimensions.device.cell.width),U&&R===Y&&(k===ee&&(this._model.cursor={x:ee,y:fe,width:z.getWidth(),style:this._coreBrowserService.isFocused?f.options.cursorStyle||"block":f.options.cursorInactiveStyle,cursorWidth:f.options.cursorWidth,dpr:this._devicePixelRatio},te=ee+z.getWidth()-1),k>=ee&&k<=te&&(this._coreBrowserService.isFocused&&(f.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&f.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),I!==L.NULL_CELL_CODE&&(this._model.lineLengths[y]=k+1),(this._model.cells[q]!==I||this._model.cells[q+a.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[q+a.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[q+a.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(ie=!0,W.length>1&&(I|=a.COMBINED_CHAR_BIT_MASK),this._model.cells[q]=I,this._model.cells[q+a.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[q+a.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[q+a.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,Z=z.getWidth(),this._glyphRenderer.value.updateCell(k,y,I,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,W,Z,A),E))for(z=this._workCell,k++;k<O;k++)j=(y*f.cols+k)*a.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(k,y,L.NULL_CELL_CODE,0,0,0,L.NULL_CELL_CHAR,0,0),this._model.cells[j]=L.NULL_CELL_CODE,this._model.cells[j+a.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[j+a.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[j+a.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;ie&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(n,p){this._canvas.width===n&&this._canvas.height===p||(this._canvas.width=n,this._canvas.height=p,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const n=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:n,end:n})}}e.WebglRenderer=u;class h extends g.AttributeData{constructor(n,p,f){super(),this.content=0,this.combinedData="",this.fg=n.fg,this.bg=n.bg,this.combinedData=p,this._width=f}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(n){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function s(v,n,p=0){return Math.max(Math.min(v,n),p)}e.JoinedCellData=h},381:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GLTexture=e.expandFloat32Array=e.createShader=e.createProgram=e.PROJECTION_MATRIX=void 0;const l=c(374);function o(r,_,m){const d=(0,l.throwIfFalsy)(r.createShader(_));if(r.shaderSource(d,m),r.compileShader(d),r.getShaderParameter(d,r.COMPILE_STATUS))return d;console.error(r.getShaderInfoLog(d)),r.deleteShader(d)}e.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),e.createProgram=function(r,_,m){const d=(0,l.throwIfFalsy)(r.createProgram());if(r.attachShader(d,(0,l.throwIfFalsy)(o(r,r.VERTEX_SHADER,_))),r.attachShader(d,(0,l.throwIfFalsy)(o(r,r.FRAGMENT_SHADER,m))),r.linkProgram(d),r.getProgramParameter(d,r.LINK_STATUS))return d;console.error(r.getProgramInfoLog(d)),r.deleteProgram(d)},e.createShader=o,e.expandFloat32Array=function(r,_){const m=Math.min(2*r.length,_),d=new Float32Array(m);for(let i=0;i<r.length;i++)d[i]=r[i];return d},e.GLTexture=class{constructor(r){this.texture=r,this.version=-1}}},592:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;const l=c(627),o=c(237),r=c(374),_=c(859);class m extends _.Disposable{constructor(i,t,g,w,L,M,x,a){super(),this._container=t,this._alpha=L,this._coreBrowserService=M,this._optionsService=x,this._themeService=a,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${g}-layer`),this._canvas.style.zIndex=w.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((C=>{this._refreshCharAtlas(i,C),this.reset(i)}))),this.register((0,_.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,r.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(i){}handleFocus(i){}handleCursorMove(i){}handleGridChanged(i,t,g){}handleSelectionChanged(i,t,g,w=!1){}_setTransparency(i,t){if(t===this._alpha)return;const g=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,g),this._refreshCharAtlas(i,this._themeService.colors),this.handleGridChanged(i,0,i.rows-1)}_refreshCharAtlas(i,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,l.acquireTextureAtlas)(i,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(i,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(i,this._themeService.colors)}_fillBottomLineAtCells(i,t,g=1){this._ctx.fillRect(i*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,g*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(i,t,g,w){this._alpha?this._ctx.clearRect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,w*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,w*this._deviceCellHeight))}_fillCharTrueColor(i,t,g,w){this._ctx.font=this._getFont(i,!1,!1),this._ctx.textBaseline=o.TEXT_BASELINE,this._clipCell(g,w,t.getWidth()),this._ctx.fillText(t.getChars(),g*this._deviceCellWidth+this._deviceCharLeft,w*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(i,t,g){this._ctx.beginPath(),this._ctx.rect(i*this._deviceCellWidth,t*this._deviceCellHeight,g*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(i,t,g){return`${g?"italic":""} ${t?i.options.fontWeightBold:i.options.fontWeight} ${i.options.fontSize*this._coreBrowserService.dpr}px ${i.options.fontFamily}`}}e.BaseRenderLayer=m},733:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;const l=c(197),o=c(237),r=c(592);class _ extends r.BaseRenderLayer{constructor(d,i,t,g,w,L,M){super(t,d,"link",i,!0,w,L,M),this.register(g.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(g.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(d,i){super.resize(d,i),this._state=void 0}reset(d){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const d=this._state.y2-this._state.y1-1;d>0&&this._clearCells(0,this._state.y1+1,this._state.cols,d),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(d){if(d.fg===o.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:d.fg!==void 0&&(0,l.is256Color)(d.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[d.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,d.y1===d.y2)this._fillBottomLineAtCells(d.x1,d.y1,d.x2-d.x1);else{this._fillBottomLineAtCells(d.x1,d.y1,d.cols-d.x1);for(let i=d.y1+1;i<d.y2;i++)this._fillBottomLineAtCells(0,i,d.cols);this._fillBottomLineAtCells(0,d.y2,d.x2)}this._state=d}_handleHideLinkUnderline(d){this._clearCurrentLink()}}e.LinkRenderLayer=_},820:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addDisposableDomListener=void 0,e.addDisposableDomListener=function(c,l,o,r){c.addEventListener(l,o,r);let _=!1;return{dispose:()=>{_||(_=!0,c.removeEventListener(l,o,r))}}}},274:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellColorResolver=void 0;const l=c(855),o=c(160),r=c(374);let _,m=0,d=0,i=!1,t=!1,g=!1,w=0;e.CellColorResolver=class{constructor(L,M,x,a,C,u){this._terminal=L,this._optionService=M,this._selectionRenderModel=x,this._decorationService=a,this._coreBrowserService=C,this._themeService=u,this.result={fg:0,bg:0,ext:0}}resolve(L,M,x,a){if(this.result.bg=L.bg,this.result.fg=L.fg,this.result.ext=268435456&L.bg?L.extended.ext:0,d=0,m=0,t=!1,i=!1,g=!1,_=this._themeService.colors,w=0,L.getCode()!==l.NULL_CELL_CODE&&L.extended.underlineStyle===4){const C=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));w=M*a%(2*Math.round(C))}if(this._decorationService.forEachDecorationAtCell(M,x,"bottom",(C=>{C.backgroundColorRGB&&(d=C.backgroundColorRGB.rgba>>8&16777215,t=!0),C.foregroundColorRGB&&(m=C.foregroundColorRGB.rgba>>8&16777215,i=!0)})),g=this._selectionRenderModel.isCellSelected(this._terminal,M,x),g){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:d=(16777215&this.result.fg)<<8|255;break;default:d=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:d=(16777215&this.result.bg)<<8|255}d=o.rgba.blend(d,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else d=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(t=!0,_.selectionForeground&&(m=_.selectionForeground.rgba>>8&16777215,i=!0),(0,r.treatGlyphAsBackgroundColor)(L.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)m=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:m=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:m=(16777215&this.result.fg)<<8|255;break;default:m=this._themeService.colors.foreground.rgba}m=o.rgba.blend(m,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}i=!0}}this._decorationService.forEachDecorationAtCell(M,x,"top",(C=>{C.backgroundColorRGB&&(d=C.backgroundColorRGB.rgba>>8&16777215,t=!0),C.foregroundColorRGB&&(m=C.foregroundColorRGB.rgba>>8&16777215,i=!0)})),t&&(d=g?-16777216&L.bg&-134217729|d|50331648:-16777216&L.bg|d|50331648),i&&(m=-16777216&L.fg&-67108865|m|50331648),67108864&this.result.fg&&(t&&!i&&(m=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&_.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,i=!0),!t&&i&&(d=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&_.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,t=!0)),_=void 0,this.result.bg=t?d:this.result.bg,this.result.fg=i?m:this.result.fg,this.result.ext&=536870911,this.result.ext|=w<<29&3758096384}}},627:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireTextureAtlas=void 0;const l=c(509),o=c(197),r=[];e.acquireTextureAtlas=function(_,m,d,i,t,g,w,L){const M=(0,o.generateConfig)(i,t,g,w,m,d,L);for(let C=0;C<r.length;C++){const u=r[C],h=u.ownedBy.indexOf(_);if(h>=0){if((0,o.configEquals)(u.config,M))return u.atlas;u.ownedBy.length===1?(u.atlas.dispose(),r.splice(C,1)):u.ownedBy.splice(h,1);break}}for(let C=0;C<r.length;C++){const u=r[C];if((0,o.configEquals)(u.config,M))return u.ownedBy.push(_),u.atlas}const x=_._core,a={atlas:new l.TextureAtlas(document,M,x.unicodeService),config:M,ownedBy:[_]};return r.push(a),a.atlas},e.removeTerminalFromCache=function(_){for(let m=0;m<r.length;m++){const d=r[m].ownedBy.indexOf(_);if(d!==-1){r[m].ownedBy.length===1?(r[m].atlas.dispose(),r.splice(m,1)):r[m].ownedBy.splice(d,1);break}}}},197:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;const l=c(160);e.generateConfig=function(o,r,_,m,d,i,t){const g={foreground:i.foreground,background:i.background,cursor:l.NULL_COLOR,cursorAccent:l.NULL_COLOR,selectionForeground:l.NULL_COLOR,selectionBackgroundTransparent:l.NULL_COLOR,selectionBackgroundOpaque:l.NULL_COLOR,selectionInactiveBackgroundTransparent:l.NULL_COLOR,selectionInactiveBackgroundOpaque:l.NULL_COLOR,ansi:i.ansi.slice(),contrastCache:i.contrastCache,halfContrastCache:i.halfContrastCache};return{customGlyphs:d.customGlyphs,devicePixelRatio:t,letterSpacing:d.letterSpacing,lineHeight:d.lineHeight,deviceCellWidth:o,deviceCellHeight:r,deviceCharWidth:_,deviceCharHeight:m,fontFamily:d.fontFamily,fontSize:d.fontSize,fontWeight:d.fontWeight,fontWeightBold:d.fontWeightBold,allowTransparency:d.allowTransparency,drawBoldTextInBrightColors:d.drawBoldTextInBrightColors,minimumContrastRatio:d.minimumContrastRatio,colors:g}},e.configEquals=function(o,r){for(let _=0;_<o.colors.ansi.length;_++)if(o.colors.ansi[_].rgba!==r.colors.ansi[_].rgba)return!1;return o.devicePixelRatio===r.devicePixelRatio&&o.customGlyphs===r.customGlyphs&&o.lineHeight===r.lineHeight&&o.letterSpacing===r.letterSpacing&&o.fontFamily===r.fontFamily&&o.fontSize===r.fontSize&&o.fontWeight===r.fontWeight&&o.fontWeightBold===r.fontWeightBold&&o.allowTransparency===r.allowTransparency&&o.deviceCharWidth===r.deviceCharWidth&&o.deviceCharHeight===r.deviceCharHeight&&o.drawBoldTextInBrightColors===r.drawBoldTextInBrightColors&&o.minimumContrastRatio===r.minimumContrastRatio&&o.colors.foreground.rgba===r.colors.foreground.rgba&&o.colors.background.rgba===r.colors.background.rgba},e.is256Color=function(o){return(50331648&o)==16777216||(50331648&o)==33554432}},237:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;const l=c(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=l.isFirefox||l.isLegacyEdge?"bottom":"ideographic"},457:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorBlinkStateManager=void 0,e.CursorBlinkStateManager=class{constructor(c,l){this._renderCallback=c,this._coreBrowserService=l,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(c=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,l>0)return void this._restartInterval(l)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const l=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(l)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),c)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.powerlineDefinitions=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;const l=c(374);e.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const o={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"║":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╒":{1:(i,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╓":{1:(i,t)=>`M${.5-i},1 L${.5-i},.5 L1,.5 M${.5+i},.5 L${.5+i},1`},"╔":{1:(i,t)=>`M1,${.5-t} L${.5-i},${.5-t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"╕":{1:(i,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"╖":{1:(i,t)=>`M${.5+i},1 L${.5+i},.5 L0,.5 M${.5-i},.5 L${.5-i},1`},"╗":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5+i},${.5-t} L${.5+i},1`},"╘":{1:(i,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"╙":{1:(i,t)=>`M1,.5 L${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"╚":{1:(i,t)=>`M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0 M1,${.5+t} L${.5-i},${.5+t} L${.5-i},0`},"╛":{1:(i,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"╜":{1:(i,t)=>`M0,.5 L${.5+i},.5 L${.5+i},0 M${.5-i},.5 L${.5-i},0`},"╝":{1:(i,t)=>`M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M0,${.5+t} L${.5+i},${.5+t} L${.5+i},0`},"╞":{1:(i,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╟":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1 M${.5+i},.5 L1,.5`},"╠":{1:(i,t)=>`M${.5-i},0 L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╡":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"╢":{1:(i,t)=>`M0,.5 L${.5-i},.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╣":{1:(i,t)=>`M${.5+i},0 L${.5+i},1 M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0`},"╤":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"╥":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},1 M${.5+i},.5 L${.5+i},1`},"╦":{1:(i,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1`},"╧":{1:(i,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╨":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"╩":{1:(i,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╪":{1:(i,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╫":{1:(i,t)=>`M0,.5 L1,.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╬":{1:(i,t)=>`M0,${.5+t} L${.5-i},${.5+t} L${.5-i},1 M1,${.5+t} L${.5+i},${.5+t} L${.5+i},1 M0,${.5-t} L${.5-i},${.5-t} L${.5-i},0 M1,${.5-t} L${.5+i},${.5-t} L${.5+i},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"╮":{1:(i,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"╯":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"╰":{1:(i,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},e.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},e.powerlineDefinitions[""]=e.powerlineDefinitions[""],e.powerlineDefinitions[""]=e.powerlineDefinitions[""],e.tryDrawCustomChar=function(i,t,g,w,L,M,x,a){const C=e.blockElementDefinitions[t];if(C)return(function(v,n,p,f,A,y){for(let R=0;R<n.length;R++){const b=n[R],S=A/8,E=y/8;v.fillRect(p+b.x*S,f+b.y*E,b.w*S,b.h*E)}})(i,C,g,w,L,M),!0;const u=o[t];if(u)return(function(v,n,p,f,A,y){let R=r.get(n);R||(R=new Map,r.set(n,R));const b=v.fillStyle;if(typeof b!="string")throw new Error(`Unexpected fillStyle type "${b}"`);let S=R.get(b);if(!S){const E=n[0].length,O=n.length,B=v.canvas.ownerDocument.createElement("canvas");B.width=E,B.height=O;const W=(0,l.throwIfFalsy)(B.getContext("2d")),I=new ImageData(E,O);let Z,q,k,j;if(b.startsWith("#"))Z=parseInt(b.slice(1,3),16),q=parseInt(b.slice(3,5),16),k=parseInt(b.slice(5,7),16),j=b.length>7&&parseInt(b.slice(7,9),16)||1;else{if(!b.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${b}" when drawing pattern glyph`);[Z,q,k,j]=b.substring(5,b.length-1).split(",").map((z=>parseFloat(z)))}for(let z=0;z<O;z++)for(let Y=0;Y<E;Y++)I.data[4*(z*E+Y)]=Z,I.data[4*(z*E+Y)+1]=q,I.data[4*(z*E+Y)+2]=k,I.data[4*(z*E+Y)+3]=n[z][Y]*(255*j);W.putImageData(I,0,0),S=(0,l.throwIfFalsy)(v.createPattern(B,null)),R.set(b,S)}v.fillStyle=S,v.fillRect(p,f,A,y)})(i,u,g,w,L,M),!0;const h=e.boxDrawingDefinitions[t];if(h)return(function(v,n,p,f,A,y,R){v.strokeStyle=v.fillStyle;for(const[b,S]of Object.entries(n)){let E;v.beginPath(),v.lineWidth=R*Number.parseInt(b),E=typeof S=="function"?S(.15,.15/y*A):S;for(const O of E.split(" ")){const B=O[0],W=m[B];if(!W){console.error(`Could not find drawing instructions for "${B}"`);continue}const I=O.substring(1).split(",");I[0]&&I[1]&&W(v,d(I,A,y,p,f,!0,R))}v.stroke(),v.closePath()}})(i,h,g,w,L,M,a),!0;const s=e.powerlineDefinitions[t];return!!s&&((function(v,n,p,f,A,y,R,b){const S=new Path2D;S.rect(p,f,A,y),v.clip(S),v.beginPath();const E=R/12;v.lineWidth=b*E;for(const O of n.d.split(" ")){const B=O[0],W=m[B];if(!W){console.error(`Could not find drawing instructions for "${B}"`);continue}const I=O.substring(1).split(",");I[0]&&I[1]&&W(v,d(I,A,y,p,f,!1,b,(n.leftPadding??0)*(E/2),(n.rightPadding??0)*(E/2)))}n.type===1?(v.strokeStyle=v.fillStyle,v.stroke()):v.fill(),v.closePath()})(i,s,g,w,L,M,x,a),!0)};const r=new Map;function _(i,t,g=0){return Math.max(Math.min(i,t),g)}const m={C:(i,t)=>i.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(i,t)=>i.lineTo(t[0],t[1]),M:(i,t)=>i.moveTo(t[0],t[1])};function d(i,t,g,w,L,M,x,a=0,C=0){const u=i.map((h=>parseFloat(h)||parseInt(h)));if(u.length<2)throw new Error("Too few arguments for instruction");for(let h=0;h<u.length;h+=2)u[h]*=t-a*x-C*x,M&&u[h]!==0&&(u[h]=_(Math.round(u[h]+.5)-.5,t,0)),u[h]+=w+a*x;for(let h=1;h<u.length;h+=2)u[h]*=g,M&&u[h]!==0&&(u[h]=_(Math.round(u[h]+.5)-.5,g,0)),u[h]+=L;return u}},56:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeDevicePixelDimensions=void 0;const l=c(859);e.observeDevicePixelDimensions=function(o,r,_){let m=new r.ResizeObserver((d=>{const i=d.find((w=>w.target===o));if(!i)return;if(!("devicePixelContentBoxSize"in i))return m==null||m.disconnect(),void(m=void 0);const t=i.devicePixelContentBoxSize[0].inlineSize,g=i.devicePixelContentBoxSize[0].blockSize;t>0&&g>0&&_(t,g)}));try{m.observe(o,{box:["device-pixel-content-box"]})}catch{m.disconnect(),m=void 0}return(0,l.toDisposable)((()=>m==null?void 0:m.disconnect()))}},374:(D,e)=>{function c(o){return 57508<=o&&o<=57558}function l(o){return o>=128512&&o<=128591||o>=127744&&o<=128511||o>=128640&&o<=128767||o>=9728&&o<=9983||o>=9984&&o<=10175||o>=65024&&o<=65039||o>=129280&&o<=129535||o>=127462&&o<=127487}Object.defineProperty(e,"__esModule",{value:!0}),e.computeNextVariantOffset=e.createRenderDimensions=e.treatGlyphAsBackgroundColor=e.allowRescaling=e.isEmoji=e.isRestrictedPowerlineGlyph=e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(o){if(!o)throw new Error("value must not be falsy");return o},e.isPowerlineGlyph=c,e.isRestrictedPowerlineGlyph=function(o){return 57520<=o&&o<=57527},e.isEmoji=l,e.allowRescaling=function(o,r,_,m){return r===1&&_>Math.ceil(1.5*m)&&o!==void 0&&o>255&&!l(o)&&!c(o)&&!(function(d){return 57344<=d&&d<=63743})(o)},e.treatGlyphAsBackgroundColor=function(o){return c(o)||(function(r){return 9472<=r&&r<=9631})(o)},e.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},e.computeNextVariantOffset=function(o,r,_=0){return(o-(2*Math.round(r)-_))%(2*Math.round(r))}},296:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(o,r,_,m=!1){if(this.selectionStart=r,this.selectionEnd=_,!r||!_||r[0]===_[0]&&r[1]===_[1])return void this.clear();const d=o.buffers.active.ydisp,i=r[1]-d,t=_[1]-d,g=Math.max(i,0),w=Math.min(t,o.rows-1);g>=o.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=i,this.viewportEndRow=t,this.viewportCappedStartRow=g,this.viewportCappedEndRow=w,this.startCol=r[0],this.endCol=_[0])}isCellSelected(o,r,_){return!!this.hasSelection&&(_-=o.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?r>=this.startCol&&_>=this.viewportCappedStartRow&&r<this.endCol&&_<=this.viewportCappedEndRow:r<this.startCol&&_>=this.viewportCappedStartRow&&r>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&r>=this.startCol&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&r<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&r>=this.startCol)}}e.createSelectionRenderModel=function(){return new c}},509:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextureAtlas=void 0;const l=c(237),o=c(860),r=c(374),_=c(160),m=c(345),d=c(485),i=c(385),t=c(147),g=c(855),w={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let L;class M{get pages(){return this._pages}constructor(h,s,v){this._document=h,this._config=s,this._unicodeService=v,this._didWarmUp=!1,this._cacheMap=new d.FourKeyMap,this._cacheMapCombined=new d.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new t.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new m.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new m.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=C(h,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,r.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const h of this.pages)h.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const h=new i.IdleTaskQueue;for(let s=33;s<126;s++)h.enqueue((()=>{if(!this._cacheMap.get(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT)){const v=this._drawToCache(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT);this._cacheMap.set(s,g.DEFAULT_COLOR,g.DEFAULT_COLOR,g.DEFAULT_EXT,v)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const h of this._pages)h.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(M.maxAtlasPages&&this._pages.length>=Math.max(4,M.maxAtlasPages)){const s=this._pages.filter((R=>2*R.canvas.width<=(M.maxTextureSize||4096))).sort(((R,b)=>b.canvas.width!==R.canvas.width?b.canvas.width-R.canvas.width:b.percentageUsed-R.percentageUsed));let v=-1,n=0;for(let R=0;R<s.length;R++)if(s[R].canvas.width!==n)v=R,n=s[R].canvas.width;else if(R-v==3)break;const p=s.slice(v,v+4),f=p.map((R=>R.glyphs[0].texturePage)).sort(((R,b)=>R>b?1:-1)),A=this.pages.length-p.length,y=this._mergePages(p,A);y.version++;for(let R=f.length-1;R>=0;R--)this._deletePage(f[R]);this.pages.push(y),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(y.canvas)}const h=new x(this._document,this._textureSize);return this._pages.push(h),this._activePages.push(h),this._onAddTextureAtlasCanvas.fire(h.canvas),h}_mergePages(h,s){const v=2*h[0].canvas.width,n=new x(this._document,v,h);for(const[p,f]of h.entries()){const A=p*f.canvas.width%v,y=Math.floor(p/2)*f.canvas.height;n.ctx.drawImage(f.canvas,A,y);for(const b of f.glyphs)b.texturePage=s,b.sizeClipSpace.x=b.size.x/v,b.sizeClipSpace.y=b.size.y/v,b.texturePosition.x+=A,b.texturePosition.y+=y,b.texturePositionClipSpace.x=b.texturePosition.x/v,b.texturePositionClipSpace.y=b.texturePosition.y/v;this._onRemoveTextureAtlasCanvas.fire(f.canvas);const R=this._activePages.indexOf(f);R!==-1&&this._activePages.splice(R,1)}return n}_deletePage(h){this._pages.splice(h,1);for(let s=h;s<this._pages.length;s++){const v=this._pages[s];for(const n of v.glyphs)n.texturePage--;v.version++}}getRasterizedGlyphCombinedChar(h,s,v,n,p){return this._getFromCacheMap(this._cacheMapCombined,h,s,v,n,p)}getRasterizedGlyph(h,s,v,n,p){return this._getFromCacheMap(this._cacheMap,h,s,v,n,p)}_getFromCacheMap(h,s,v,n,p,f=!1){return L=h.get(s,v,n,p),L||(L=this._drawToCache(s,v,n,p,f),h.set(s,v,n,p,L)),L}_getColorFromAnsiIndex(h){if(h>=this._config.colors.ansi.length)throw new Error("No color found for idx "+h);return this._config.colors.ansi[h]}_getBackgroundColor(h,s,v,n){if(this._config.allowTransparency)return _.NULL_COLOR;let p;switch(h){case 16777216:case 33554432:p=this._getColorFromAnsiIndex(s);break;case 50331648:const f=t.AttributeData.toColorRGB(s);p=_.channels.toColor(f[0],f[1],f[2]);break;default:p=v?_.color.opaque(this._config.colors.foreground):this._config.colors.background}return p}_getForegroundColor(h,s,v,n,p,f,A,y,R,b){const S=this._getMinimumContrastColor(h,s,v,n,p,f,A,R,y,b);if(S)return S;let E;switch(p){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&R&&f<8&&(f+=8),E=this._getColorFromAnsiIndex(f);break;case 50331648:const O=t.AttributeData.toColorRGB(f);E=_.channels.toColor(O[0],O[1],O[2]);break;default:E=A?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(E=_.color.opaque(E)),y&&(E=_.color.multiplyOpacity(E,l.DIM_OPACITY)),E}_resolveBackgroundRgba(h,s,v){switch(h){case 16777216:case 33554432:return this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return v?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(h,s,v,n){switch(h){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&n&&s<8&&(s+=8),this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return v?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(h,s,v,n,p,f,A,y,R,b){if(this._config.minimumContrastRatio===1||b)return;const S=this._getContrastCache(R),E=S.getColor(h,n);if(E!==void 0)return E||void 0;const O=this._resolveBackgroundRgba(s,v,A),B=this._resolveForegroundRgba(p,f,A,y),W=_.rgba.ensureContrastRatio(O,B,this._config.minimumContrastRatio/(R?2:1));if(!W)return void S.setColor(h,n,null);const I=_.channels.toColor(W>>24&255,W>>16&255,W>>8&255);return S.setColor(h,n,I),I}_getContrastCache(h){return h?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(h,s,v,n,p=!1){const f=typeof h=="number"?String.fromCharCode(h):h,A=Math.min(this._config.deviceCellWidth*Math.max(f.length,2)+4,this._textureSize);this._tmpCanvas.width<A&&(this._tmpCanvas.width=A);const y=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<y&&(this._tmpCanvas.height=y),this._tmpCtx.save(),this._workAttributeData.fg=v,this._workAttributeData.bg=s,this._workAttributeData.extended.ext=n,this._workAttributeData.isInvisible())return w;const R=!!this._workAttributeData.isBold(),b=!!this._workAttributeData.isInverse(),S=!!this._workAttributeData.isDim(),E=!!this._workAttributeData.isItalic(),O=!!this._workAttributeData.isUnderline(),B=!!this._workAttributeData.isStrikethrough(),W=!!this._workAttributeData.isOverline();let I=this._workAttributeData.getFgColor(),Z=this._workAttributeData.getFgColorMode(),q=this._workAttributeData.getBgColor(),k=this._workAttributeData.getBgColorMode();if(b){const T=I;I=q,q=T;const N=Z;Z=k,k=N}const j=this._getBackgroundColor(k,q,b,S);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=j.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const z=R?this._config.fontWeightBold:this._config.fontWeight,Y=E?"italic":"";this._tmpCtx.font=`${Y} ${z} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=l.TEXT_BASELINE;const fe=f.length===1&&(0,r.isPowerlineGlyph)(f.charCodeAt(0)),ee=f.length===1&&(0,r.isRestrictedPowerlineGlyph)(f.charCodeAt(0)),te=this._getForegroundColor(s,k,q,v,Z,I,b,S,R,(0,r.treatGlyphAsBackgroundColor)(f.charCodeAt(0)));this._tmpCtx.fillStyle=te.css;const U=ee?0:4;let ie=!1;this._config.customGlyphs!==!1&&(ie=(0,o.tryDrawCustomChar)(this._tmpCtx,f,U,U,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let ae,he=!fe;if(ae=typeof h=="number"?this._unicodeService.wcwidth(h):this._unicodeService.getStringCellWidth(h),O){this._tmpCtx.save();const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),N=T%2==1?.5:0;if(this._tmpCtx.lineWidth=T,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())he=!1,this._tmpCtx.strokeStyle=`rgb(${t.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{he=!1;let K=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&K<8&&(K+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(K).css}this._tmpCtx.beginPath();const J=U,G=Math.ceil(U+this._config.deviceCharHeight)-N-(p?2*T:0),le=G+T,ce=G+2*T;let se=this._workAttributeData.getUnderlineVariantOffset();for(let K=0;K<ae;K++){this._tmpCtx.save();const H=J+K*this._config.deviceCellWidth,X=J+(K+1)*this._config.deviceCellWidth,pe=H+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G),this._tmpCtx.moveTo(H,ce),this._tmpCtx.lineTo(X,ce);break;case 3:const _e=T<=1?ce:Math.ceil(U+this._config.deviceCharHeight-T/2)-N,ue=T<=1?G:Math.ceil(U+this._config.deviceCharHeight+T/2)-N,xe=new Path2D;xe.rect(H,G,this._config.deviceCellWidth,ce-G),this._tmpCtx.clip(xe),this._tmpCtx.moveTo(H-this._config.deviceCellWidth/2,le),this._tmpCtx.bezierCurveTo(H-this._config.deviceCellWidth/2,ue,H,ue,H,le),this._tmpCtx.bezierCurveTo(H,_e,pe,_e,pe,le),this._tmpCtx.bezierCurveTo(pe,ue,X,ue,X,le),this._tmpCtx.bezierCurveTo(X,_e,X+this._config.deviceCellWidth/2,_e,X+this._config.deviceCellWidth/2,le);break;case 4:const ge=se===0?0:se>=T?2*T-se:T-se;se>=T||ge===0?(this._tmpCtx.setLineDash([Math.round(T),Math.round(T)]),this._tmpCtx.moveTo(H+ge,G),this._tmpCtx.lineTo(X,G)):(this._tmpCtx.setLineDash([Math.round(T),Math.round(T)]),this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(H+ge,G),this._tmpCtx.moveTo(H+ge+T,G),this._tmpCtx.lineTo(X,G)),se=(0,r.computeNextVariantOffset)(X-H,T,se);break;case 5:const Re=.6,ye=.3,Ce=X-H,we=Math.floor(Re*Ce),be=Math.floor(ye*Ce),Ae=Ce-we-be;this._tmpCtx.setLineDash([we,be,Ae]),this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G);break;default:this._tmpCtx.moveTo(H,G),this._tmpCtx.lineTo(X,G)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ie&&this._config.fontSize>=12&&!this._config.allowTransparency&&f!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const K=this._tmpCtx.measureText(f);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in K&&K.actualBoundingBoxDescent>0){this._tmpCtx.save();const H=new Path2D;H.rect(J,G-Math.ceil(T/2),this._config.deviceCellWidth*ae,ce-G+Math.ceil(T/2)),this._tmpCtx.clip(H),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=j.css,this._tmpCtx.strokeText(f,U,U+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(W){const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),N=T%2==1?.5:0;this._tmpCtx.lineWidth=T,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+N),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*ae,U+N),this._tmpCtx.stroke()}if(ie||this._tmpCtx.fillText(f,U,U+this._config.deviceCharHeight),f==="_"&&!this._config.allowTransparency){let T=a(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),j,te,he);if(T)for(let N=1;N<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=j.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(f,U,U+this._config.deviceCharHeight-N),T=a(this._tmpCtx.getImageData(U,U,this._config.deviceCellWidth,this._config.deviceCellHeight),j,te,he),T);N++);}if(B){const T=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),N=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=T,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(U,U+Math.floor(this._config.deviceCharHeight/2)-N),this._tmpCtx.lineTo(U+this._config.deviceCharWidth*ae,U+Math.floor(this._config.deviceCharHeight/2)-N),this._tmpCtx.stroke()}this._tmpCtx.restore();const de=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Le;if(Le=this._config.allowTransparency?(function(T){for(let N=0;N<T.data.length;N+=4)if(T.data[N+3]>0)return!1;return!0})(de):a(de,j,te,he),Le)return w;const $=this._findGlyphBoundingBox(de,this._workBoundingBox,A,ee,ie,U);let F,P;for(;;){if(this._activePages.length===0){const T=this._createNewPage();F=T,P=T.currentRow,P.height=$.size.y;break}F=this._activePages[this._activePages.length-1],P=F.currentRow;for(const T of this._activePages)$.size.y<=T.currentRow.height&&(F=T,P=T.currentRow);for(let T=this._activePages.length-1;T>=0;T--)for(const N of this._activePages[T].fixedRows)N.height<=P.height&&$.size.y<=N.height&&(F=this._activePages[T],P=N);if(P.y+$.size.y>=F.canvas.height||P.height>$.size.y+2){let T=!1;if(F.currentRow.y+F.currentRow.height+$.size.y>=F.canvas.height){let N;for(const J of this._activePages)if(J.currentRow.y+J.currentRow.height+$.size.y<J.canvas.height){N=J;break}if(N)F=N;else if(M.maxAtlasPages&&this._pages.length>=M.maxAtlasPages&&P.y+$.size.y<=F.canvas.height&&P.height>=$.size.y&&P.x+$.size.x<=F.canvas.width)T=!0;else{const J=this._createNewPage();F=J,P=J.currentRow,P.height=$.size.y,T=!0}}T||(F.currentRow.height>0&&F.fixedRows.push(F.currentRow),P={x:0,y:F.currentRow.y+F.currentRow.height,height:$.size.y},F.fixedRows.push(P),F.currentRow={x:0,y:P.y+P.height,height:0})}if(P.x+$.size.x<=F.canvas.width)break;P===F.currentRow?(P.x=0,P.y+=P.height,P.height=0):F.fixedRows.splice(F.fixedRows.indexOf(P),1)}return $.texturePage=this._pages.indexOf(F),$.texturePosition.x=P.x,$.texturePosition.y=P.y,$.texturePositionClipSpace.x=P.x/F.canvas.width,$.texturePositionClipSpace.y=P.y/F.canvas.height,$.sizeClipSpace.x/=F.canvas.width,$.sizeClipSpace.y/=F.canvas.height,P.height=Math.max(P.height,$.size.y),P.x+=$.size.x,F.ctx.putImageData(de,$.texturePosition.x-this._workBoundingBox.left,$.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,$.size.x,$.size.y),F.addGlyph($),F.version++,$}_findGlyphBoundingBox(h,s,v,n,p,f){s.top=0;const A=n?this._config.deviceCellHeight:this._tmpCanvas.height,y=n?this._config.deviceCellWidth:v;let R=!1;for(let b=0;b<A;b++){for(let S=0;S<y;S++){const E=b*this._tmpCanvas.width*4+4*S+3;if(h.data[E]!==0){s.top=b,R=!0;break}}if(R)break}s.left=0,R=!1;for(let b=0;b<f+y;b++){for(let S=0;S<A;S++){const E=S*this._tmpCanvas.width*4+4*b+3;if(h.data[E]!==0){s.left=b,R=!0;break}}if(R)break}s.right=y,R=!1;for(let b=f+y-1;b>=f;b--){for(let S=0;S<A;S++){const E=S*this._tmpCanvas.width*4+4*b+3;if(h.data[E]!==0){s.right=b,R=!0;break}}if(R)break}s.bottom=A,R=!1;for(let b=A-1;b>=0;b--){for(let S=0;S<y;S++){const E=b*this._tmpCanvas.width*4+4*S+3;if(h.data[E]!==0){s.bottom=b,R=!0;break}}if(R)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:s.right-s.left+1,y:s.bottom-s.top+1},sizeClipSpace:{x:s.right-s.left+1,y:s.bottom-s.top+1},offset:{x:-s.left+f+(n||p?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-s.top+f+(n||p?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}e.TextureAtlas=M;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(h){this._glyphs.push(h),this._usedPixels+=h.size.x*h.size.y}constructor(h,s,v){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],v)for(const n of v)this._glyphs.push(...n.glyphs),this._usedPixels+=n._usedPixels;this.canvas=C(h,s,s),this.ctx=(0,r.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function a(u,h,s,v){const n=h.rgba>>>24,p=h.rgba>>>16&255,f=h.rgba>>>8&255,A=s.rgba>>>24,y=s.rgba>>>16&255,R=s.rgba>>>8&255,b=Math.floor((Math.abs(n-A)+Math.abs(p-y)+Math.abs(f-R))/12);let S=!0;for(let E=0;E<u.data.length;E+=4)u.data[E]===n&&u.data[E+1]===p&&u.data[E+2]===f||v&&Math.abs(u.data[E]-n)+Math.abs(u.data[E+1]-p)+Math.abs(u.data[E+2]-f)<b?u.data[E+3]=0:S=!1;return S}function C(u,h,s){const v=u.createElement("canvas");return v.width=h,v.height=s,v}},160:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contrastRatio=e.toPaddedHex=e.rgba=e.rgb=e.css=e.color=e.channels=e.NULL_COLOR=void 0;let c=0,l=0,o=0,r=0;var _,m,d,i,t;function g(L){const M=L.toString(16);return M.length<2?"0"+M:M}function w(L,M){return L<M?(M+.05)/(L+.05):(L+.05)/(M+.05)}e.NULL_COLOR={css:"#00000000",rgba:0},(function(L){L.toCss=function(M,x,a,C){return C!==void 0?`#${g(M)}${g(x)}${g(a)}${g(C)}`:`#${g(M)}${g(x)}${g(a)}`},L.toRgba=function(M,x,a,C=255){return(M<<24|x<<16|a<<8|C)>>>0},L.toColor=function(M,x,a,C){return{css:L.toCss(M,x,a,C),rgba:L.toRgba(M,x,a,C)}}})(_||(e.channels=_={})),(function(L){function M(x,a){return r=Math.round(255*a),[c,l,o]=t.toChannels(x.rgba),{css:_.toCss(c,l,o,r),rgba:_.toRgba(c,l,o,r)}}L.blend=function(x,a){if(r=(255&a.rgba)/255,r===1)return{css:a.css,rgba:a.rgba};const C=a.rgba>>24&255,u=a.rgba>>16&255,h=a.rgba>>8&255,s=x.rgba>>24&255,v=x.rgba>>16&255,n=x.rgba>>8&255;return c=s+Math.round((C-s)*r),l=v+Math.round((u-v)*r),o=n+Math.round((h-n)*r),{css:_.toCss(c,l,o),rgba:_.toRgba(c,l,o)}},L.isOpaque=function(x){return(255&x.rgba)==255},L.ensureContrastRatio=function(x,a,C){const u=t.ensureContrastRatio(x.rgba,a.rgba,C);if(u)return _.toColor(u>>24&255,u>>16&255,u>>8&255)},L.opaque=function(x){const a=(255|x.rgba)>>>0;return[c,l,o]=t.toChannels(a),{css:_.toCss(c,l,o),rgba:a}},L.opacity=M,L.multiplyOpacity=function(x,a){return r=255&x.rgba,M(x,r*a/255)},L.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(m||(e.color=m={})),(function(L){let M,x;try{const a=document.createElement("canvas");a.width=1,a.height=1;const C=a.getContext("2d",{willReadFrequently:!0});C&&(M=C,M.globalCompositeOperation="copy",x=M.createLinearGradient(0,0,1,1))}catch{}L.toColor=function(a){if(a.match(/#[\da-f]{3,8}/i))switch(a.length){case 4:return c=parseInt(a.slice(1,2).repeat(2),16),l=parseInt(a.slice(2,3).repeat(2),16),o=parseInt(a.slice(3,4).repeat(2),16),_.toColor(c,l,o);case 5:return c=parseInt(a.slice(1,2).repeat(2),16),l=parseInt(a.slice(2,3).repeat(2),16),o=parseInt(a.slice(3,4).repeat(2),16),r=parseInt(a.slice(4,5).repeat(2),16),_.toColor(c,l,o,r);case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}const C=a.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(C)return c=parseInt(C[1]),l=parseInt(C[2]),o=parseInt(C[3]),r=Math.round(255*(C[5]===void 0?1:parseFloat(C[5]))),_.toColor(c,l,o,r);if(!M||!x)throw new Error("css.toColor: Unsupported css format");if(M.fillStyle=x,M.fillStyle=a,typeof M.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(M.fillRect(0,0,1,1),[c,l,o,r]=M.getImageData(0,0,1,1).data,r!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,l,o,r),css:a}}})(d||(e.css=d={})),(function(L){function M(x,a,C){const u=x/255,h=a/255,s=C/255;return .2126*(u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4))+.7152*(h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4))+.0722*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))}L.relativeLuminance=function(x){return M(x>>16&255,x>>8&255,255&x)},L.relativeLuminance2=M})(i||(e.rgb=i={})),(function(L){function M(a,C,u){const h=a>>24&255,s=a>>16&255,v=a>>8&255;let n=C>>24&255,p=C>>16&255,f=C>>8&255,A=w(i.relativeLuminance2(n,p,f),i.relativeLuminance2(h,s,v));for(;A<u&&(n>0||p>0||f>0);)n-=Math.max(0,Math.ceil(.1*n)),p-=Math.max(0,Math.ceil(.1*p)),f-=Math.max(0,Math.ceil(.1*f)),A=w(i.relativeLuminance2(n,p,f),i.relativeLuminance2(h,s,v));return(n<<24|p<<16|f<<8|255)>>>0}function x(a,C,u){const h=a>>24&255,s=a>>16&255,v=a>>8&255;let n=C>>24&255,p=C>>16&255,f=C>>8&255,A=w(i.relativeLuminance2(n,p,f),i.relativeLuminance2(h,s,v));for(;A<u&&(n<255||p<255||f<255);)n=Math.min(255,n+Math.ceil(.1*(255-n))),p=Math.min(255,p+Math.ceil(.1*(255-p))),f=Math.min(255,f+Math.ceil(.1*(255-f))),A=w(i.relativeLuminance2(n,p,f),i.relativeLuminance2(h,s,v));return(n<<24|p<<16|f<<8|255)>>>0}L.blend=function(a,C){if(r=(255&C)/255,r===1)return C;const u=C>>24&255,h=C>>16&255,s=C>>8&255,v=a>>24&255,n=a>>16&255,p=a>>8&255;return c=v+Math.round((u-v)*r),l=n+Math.round((h-n)*r),o=p+Math.round((s-p)*r),_.toRgba(c,l,o)},L.ensureContrastRatio=function(a,C,u){const h=i.relativeLuminance(a>>8),s=i.relativeLuminance(C>>8);if(w(h,s)<u){if(s<h){const p=M(a,C,u),f=w(h,i.relativeLuminance(p>>8));if(f<u){const A=x(a,C,u);return f>w(h,i.relativeLuminance(A>>8))?p:A}return p}const v=x(a,C,u),n=w(h,i.relativeLuminance(v>>8));if(n<u){const p=M(a,C,u);return n>w(h,i.relativeLuminance(p>>8))?v:p}return v}},L.reduceLuminance=M,L.increaseLuminance=x,L.toChannels=function(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]}})(t||(e.rgba=t={})),e.toPaddedHex=g,e.contrastRatio=w},345:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.runAndSubscribe=e.forwardEvent=e.EventEmitter=void 0,e.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let l=0;l<this._listeners.length;l++)if(this._listeners[l]===c)return void this._listeners.splice(l,1)}}})),this._event}fire(c,l){const o=[];for(let r=0;r<this._listeners.length;r++)o.push(this._listeners[r]);for(let r=0;r<o.length;r++)o[r].call(void 0,c,l)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},e.forwardEvent=function(c,l){return c((o=>l.fire(o)))},e.runAndSubscribe=function(c,l){return l(void 0),c((o=>l(o)))}},859:(D,e)=>{function c(l){for(const o of l)o.dispose();l.length=0}Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.toDisposable=e.MutableDisposable=e.Disposable=void 0,e.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const l of this._disposables)l.dispose();this._disposables.length=0}register(l){return this._disposables.push(l),l}unregister(l){const o=this._disposables.indexOf(l);o!==-1&&this._disposables.splice(o,1)}},e.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(l){var o;this._isDisposed||l===this._value||((o=this._value)==null||o.dispose(),this._value=l)}clear(){this.value=void 0}dispose(){var l;this._isDisposed=!0,(l=this._value)==null||l.dispose(),this._value=void 0}},e.toDisposable=function(l){return{dispose:l}},e.disposeArray=c,e.getDisposeArrayDisposable=function(l){return{dispose:()=>c(l)}}},485:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FourKeyMap=e.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(o,r,_){this._data[o]||(this._data[o]={}),this._data[o][r]=_}get(o,r){return this._data[o]?this._data[o][r]:void 0}clear(){this._data={}}}e.TwoKeyMap=c,e.FourKeyMap=class{constructor(){this._data=new c}set(l,o,r,_,m){this._data.get(l,o)||this._data.set(l,o,new c),this._data.get(l,o).set(r,_,m)}get(l,o,r,_){var m;return(m=this._data.get(l,o))==null?void 0:m.get(r,_)}clear(){this._data.clear()}}},399:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isChromeOS=e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.getSafariVersion=e.isSafari=e.isLegacyEdge=e.isFirefox=e.isNode=void 0,e.isNode=typeof process<"u"&&"title"in process;const c=e.isNode?"node":navigator.userAgent,l=e.isNode?"node":navigator.platform;e.isFirefox=c.includes("Firefox"),e.isLegacyEdge=c.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(c),e.getSafariVersion=function(){if(!e.isSafari)return 0;const o=c.match(/Version\/(\d+)/);return o===null||o.length<2?0:parseInt(o[1])},e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),e.isIpad=l==="iPad",e.isIphone=l==="iPhone",e.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),e.isLinux=l.indexOf("Linux")>=0,e.isChromeOS=/\bCrOS\b/.test(c)},385:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DebouncedIdleTask=e.IdleTaskQueue=e.PriorityTaskQueue=void 0;const l=c(399);class o{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(m){this._idleCallback=void 0;let d=0,i=0,t=m.timeRemaining(),g=0;for(;this._i<this._tasks.length;){if(d=Date.now(),this._tasks[this._i]()||this._i++,d=Math.max(1,Date.now()-d),i=Math.max(d,i),g=m.timeRemaining(),1.5*i>g)return t-d<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(t-d))}ms`),void this._start();t=g}this.clear()}}class r extends o{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const d=Date.now()+m;return{timeRemaining:()=>Math.max(0,d-Date.now())}}}e.PriorityTaskQueue=r,e.IdleTaskQueue=!l.isNode&&"requestIdleCallback"in window?class extends o{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:r,e.DebouncedIdleTask=class{constructor(){this._queue=new e.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},147:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new l}static toColorRGB(r){return[r>>>16&255,r>>>8&255,255&r]}static fromColorRGB(r){return(255&r[0])<<16|(255&r[1])<<8|255&r[2]}clone(){const r=new c;return r.fg=this.fg,r.bg=this.bg,r.extended=this.extended.clone(),r}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}e.AttributeData=c;class l{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(r){this._ext=r}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(r){this._ext&=-469762049,this._ext|=r<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(r){this._ext&=-67108864,this._ext|=67108863&r}get urlId(){return this._urlId}set urlId(r){this._urlId=r}get underlineVariantOffset(){const r=(3758096384&this._ext)>>29;return r<0?4294967288^r:r}set underlineVariantOffset(r){this._ext&=536870911,this._ext|=r<<29&3758096384}constructor(r=0,_=0){this._ext=0,this._urlId=0,this._ext=r,this._urlId=_}clone(){return new l(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}e.ExtendedAttrs=l},782:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;const l=c(133),o=c(855),r=c(147);class _ extends r.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new r.ExtendedAttrs,this.combinedData=""}static fromCharData(d){const i=new _;return i.setFromCharData(d),i}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,l.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(d){this.fg=d[o.CHAR_DATA_ATTR_INDEX],this.bg=0;let i=!1;if(d[o.CHAR_DATA_CHAR_INDEX].length>2)i=!0;else if(d[o.CHAR_DATA_CHAR_INDEX].length===2){const t=d[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){const g=d[o.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=g&&g<=57343?this.content=1024*(t-55296)+g-56320+65536|d[o.CHAR_DATA_WIDTH_INDEX]<<22:i=!0}else i=!0}else this.content=d[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|d[o.CHAR_DATA_WIDTH_INDEX]<<22;i&&(this.combinedData=d[o.CHAR_DATA_CHAR_INDEX],this.content=2097152|d[o.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.CellData=_},855:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WHITESPACE_CELL_CODE=e.WHITESPACE_CELL_WIDTH=e.WHITESPACE_CELL_CHAR=e.NULL_CELL_CODE=e.NULL_CELL_WIDTH=e.NULL_CELL_CHAR=e.CHAR_DATA_CODE_INDEX=e.CHAR_DATA_WIDTH_INDEX=e.CHAR_DATA_CHAR_INDEX=e.CHAR_DATA_ATTR_INDEX=e.DEFAULT_EXT=e.DEFAULT_ATTR=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=0,e.DEFAULT_ATTR=256|e.DEFAULT_COLOR<<9,e.DEFAULT_EXT=0,e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.NULL_CELL_CHAR="",e.NULL_CELL_WIDTH=1,e.NULL_CELL_CODE=0,e.WHITESPACE_CELL_CHAR=" ",e.WHITESPACE_CELL_WIDTH=1,e.WHITESPACE_CELL_CODE=32},133:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},e.utf32ToString=function(c,l=0,o=c.length){let r="";for(let _=l;_<o;++_){let m=c[_];m>65535?(m-=65536,r+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):r+=String.fromCharCode(m)}return r},e.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,l){const o=c.length;if(!o)return 0;let r=0,_=0;if(this._interim){const m=c.charCodeAt(_++);56320<=m&&m<=57343?l[r++]=1024*(this._interim-55296)+m-56320+65536:(l[r++]=this._interim,l[r++]=m),this._interim=0}for(let m=_;m<o;++m){const d=c.charCodeAt(m);if(55296<=d&&d<=56319){if(++m>=o)return this._interim=d,r;const i=c.charCodeAt(m);56320<=i&&i<=57343?l[r++]=1024*(d-55296)+i-56320+65536:(l[r++]=d,l[r++]=i)}else d!==65279&&(l[r++]=d)}return r}},e.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,l){const o=c.length;if(!o)return 0;let r,_,m,d,i=0,t=0,g=0;if(this.interim[0]){let M=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let a,C=0;for(;(a=63&this.interim[++C])&&C<4;)x<<=6,x|=a;const u=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,h=u-C;for(;g<h;){if(g>=o)return 0;if(a=c[g++],(192&a)!=128){g--,M=!0;break}this.interim[C++]=a,x<<=6,x|=63&a}M||(u===2?x<128?g--:l[i++]=x:u===3?x<2048||x>=55296&&x<=57343||x===65279||(l[i++]=x):x<65536||x>1114111||(l[i++]=x)),this.interim.fill(0)}const w=o-4;let L=g;for(;L<o;){for(;!(!(L<w)||128&(r=c[L])||128&(_=c[L+1])||128&(m=c[L+2])||128&(d=c[L+3]));)l[i++]=r,l[i++]=_,l[i++]=m,l[i++]=d,L+=4;if(r=c[L++],r<128)l[i++]=r;else if((224&r)==192){if(L>=o)return this.interim[0]=r,i;if(_=c[L++],(192&_)!=128){L--;continue}if(t=(31&r)<<6|63&_,t<128){L--;continue}l[i++]=t}else if((240&r)==224){if(L>=o)return this.interim[0]=r,i;if(_=c[L++],(192&_)!=128){L--;continue}if(L>=o)return this.interim[0]=r,this.interim[1]=_,i;if(m=c[L++],(192&m)!=128){L--;continue}if(t=(15&r)<<12|(63&_)<<6|63&m,t<2048||t>=55296&&t<=57343||t===65279)continue;l[i++]=t}else if((248&r)==240){if(L>=o)return this.interim[0]=r,i;if(_=c[L++],(192&_)!=128){L--;continue}if(L>=o)return this.interim[0]=r,this.interim[1]=_,i;if(m=c[L++],(192&m)!=128){L--;continue}if(L>=o)return this.interim[0]=r,this.interim[1]=_,this.interim[2]=m,i;if(d=c[L++],(192&d)!=128){L--;continue}if(t=(7&r)<<18|(63&_)<<12|(63&m)<<6|63&d,t<65536||t>1114111)continue;l[i++]=t}}return i}}},776:function(D,e,c){var l=this&&this.__decorate||function(t,g,w,L){var M,x=arguments.length,a=x<3?g:L===null?L=Object.getOwnPropertyDescriptor(g,w):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,g,w,L);else for(var C=t.length-1;C>=0;C--)(M=t[C])&&(a=(x<3?M(a):x>3?M(g,w,a):M(g,w))||a);return x>3&&a&&Object.defineProperty(g,w,a),a},o=this&&this.__param||function(t,g){return function(w,L){g(w,L,t)}};Object.defineProperty(e,"__esModule",{value:!0}),e.traceCall=e.setTraceLogger=e.LogService=void 0;const r=c(859),_=c(97),m={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let d,i=e.LogService=class extends r.Disposable{get logLevel(){return this._logLevel}constructor(t){super(),this._optionsService=t,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),d=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let g=0;g<t.length;g++)typeof t[g]=="function"&&(t[g]=t[g]())}_log(t,g,w){this._evalLazyOptionalParams(w),t.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+g,...w)}trace(t,...g){var w;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.trace.bind(this._optionsService.options.logger))??console.log,t,g)}debug(t,...g){var w;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.debug.bind(this._optionsService.options.logger))??console.log,t,g)}info(t,...g){var w;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.info.bind(this._optionsService.options.logger))??console.info,t,g)}warn(t,...g){var w;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.warn.bind(this._optionsService.options.logger))??console.warn,t,g)}error(t,...g){var w;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.error.bind(this._optionsService.options.logger))??console.error,t,g)}};e.LogService=i=l([o(0,_.IOptionsService)],i),e.setTraceLogger=function(t){d=t},e.traceCall=function(t,g,w){if(typeof w.value!="function")throw new Error("not supported");const L=w.value;w.value=function(...M){if(d.logLevel!==_.LogLevelEnum.TRACE)return L.apply(this,M);d.trace(`GlyphRenderer#${L.name}(${M.map((a=>JSON.stringify(a))).join(", ")})`);const x=L.apply(this,M);return d.trace(`GlyphRenderer#${L.name} return`,x),x}}},726:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.getServiceDependencies=e.serviceRegistry=void 0;const c="di$target",l="di$dependencies";e.serviceRegistry=new Map,e.getServiceDependencies=function(o){return o[l]||[]},e.createDecorator=function(o){if(e.serviceRegistry.has(o))return e.serviceRegistry.get(o);const r=function(_,m,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(i,t,g){t[c]===t?t[l].push({id:i,index:g}):(t[l]=[{id:i,index:g}],t[c]=t)})(r,_,d)};return r.toString=()=>o,e.serviceRegistry.set(o,r),r}},97:(D,e,c)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationService=e.IUnicodeService=e.IOscLinkService=e.IOptionsService=e.ILogService=e.LogLevelEnum=e.IInstantiationService=e.ICharsetService=e.ICoreService=e.ICoreMouseService=e.IBufferService=void 0;const l=c(726);var o;e.IBufferService=(0,l.createDecorator)("BufferService"),e.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),e.ICoreService=(0,l.createDecorator)("CoreService"),e.ICharsetService=(0,l.createDecorator)("CharsetService"),e.IInstantiationService=(0,l.createDecorator)("InstantiationService"),(function(r){r[r.TRACE=0]="TRACE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.OFF=5]="OFF"})(o||(e.LogLevelEnum=o={})),e.ILogService=(0,l.createDecorator)("LogService"),e.IOptionsService=(0,l.createDecorator)("OptionsService"),e.IOscLinkService=(0,l.createDecorator)("OscLinkService"),e.IUnicodeService=(0,l.createDecorator)("UnicodeService"),e.IDecorationService=(0,l.createDecorator)("DecorationService")}},Q={};function V(D){var e=Q[D];if(e!==void 0)return e.exports;var c=Q[D]={exports:{}};return re[D].call(c.exports,c,c.exports,V),c.exports}var oe={};return(()=>{var D=oe;Object.defineProperty(D,"__esModule",{value:!0}),D.WebglAddon=void 0;const e=V(345),c=V(859),l=V(399),o=V(666),r=V(776);class _ extends c.Disposable{constructor(d){if(l.isSafari&&(0,l.getSafariVersion)()<16){const i={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",i))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=d,this._onChangeTextureAtlas=this.register(new e.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new e.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new e.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new e.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(d){const i=d._core;if(!d.element)return void this.register(i.onWillOpen((()=>this.activate(d))));this._terminal=d;const t=i.coreService,g=i.optionsService,w=i,L=w._renderService,M=w._characterJoinerService,x=w._charSizeService,a=w._coreBrowserService,C=w._decorationService,u=w._logService,h=w._themeService;(0,r.setTraceLogger)(u),this._renderer=this.register(new o.WebglRenderer(d,M,x,a,t,C,g,h,this._preserveDrawingBuffer)),this.register((0,e.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,e.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,e.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,e.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),L.setRenderer(this._renderer),this.register((0,c.toDisposable)((()=>{const s=this._terminal._core._renderService;s.setRenderer(this._terminal._core._createRenderer()),s.handleResize(d.cols,d.rows)})))}get textureAtlas(){var d;return(d=this._renderer)==null?void 0:d.textureAtlas}clearTextureAtlas(){var d;(d=this._renderer)==null||d.clearTextureAtlas()}}D.WebglAddon=_})(),oe})()))})(me)),me.exports}var Te=Se();const De=Ee({__proto__:null},[Te]);export{De as a};
@@ -1,20 +1,20 @@
1
- import{w as O,u as P,a as I,i as B,r as m,j as e,L as D}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{u as U}from"./useReportContext-O-jkvSPx.js";import{c as w}from"./createLucideIcon-CMT1jU2q.js";import{T as F,C as N}from"./terminal-BG4heKCG.js";import{S as V}from"./search-fKo7v0Zo.js";import{C as _}from"./chevron-down-BH2h1Ea2.js";import{B as A}from"./book-open-D_nMCFmP.js";import{T as H}from"./triangle-alert-DtSmdtM4.js";import{C as q,a as z}from"./copy-NDbZjXao.js";/**
2
- * @license lucide-react v0.556.0 - ISC
1
+ import{w as O,u as P,a as I,i as B,r as m,j as e,L as D}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{u as U}from"./useReportContext-O-jkvSPx.js";import{c as w}from"./createLucideIcon-CC6AbExI.js";import{T as F,C as N}from"./terminal-Br7MOqts.js";import{S as V}from"./search-Di64LWVb.js";import{C as _}from"./chevron-down-C_Pmso5S.js";import{B as A}from"./book-open-BYOypzCa.js";import{T as H}from"./triangle-alert-BLdiCuG-.js";import{C as q,a as z}from"./copy-n2FB0_Sw.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
6
  */const J=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],K=w("arrow-left",J);/**
7
- * @license lucide-react v0.556.0 - ISC
7
+ * @license lucide-react v0.577.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */const W=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],X=w("chevron-left",W);/**
12
- * @license lucide-react v0.556.0 - ISC
12
+ * @license lucide-react v0.577.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
16
  */const Y=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],G=w("message-square",Y);/**
17
- * @license lucide-react v0.556.0 - ISC
17
+ * @license lucide-react v0.577.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- import{c as o}from"./createLucideIcon-CMT1jU2q.js";/**
2
- * @license lucide-react v0.556.0 - ISC
1
+ import{c as o}from"./createLucideIcon-CC6AbExI.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- import{c as o}from"./createLucideIcon-CMT1jU2q.js";/**
2
- * @license lucide-react v0.556.0 - ISC
1
+ import{c as o}from"./createLucideIcon-CC6AbExI.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
- import{c}from"./createLucideIcon-CMT1jU2q.js";/**
2
- * @license lucide-react v0.556.0 - ISC
1
+ import{c}from"./createLucideIcon-CC6AbExI.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
@@ -1,10 +1,10 @@
1
- import{c}from"./createLucideIcon-CMT1jU2q.js";/**
2
- * @license lucide-react v0.556.0 - ISC
1
+ import{c}from"./createLucideIcon-CC6AbExI.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
6
  */const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],a=c("check",e);/**
7
- * @license lucide-react v0.556.0 - ISC
7
+ * @license lucide-react v0.577.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
@@ -0,0 +1,41 @@
1
+ import{r as s}from"./chunk-JZWAC4HX-C4pqxYJB.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim();/**
7
+ * @license lucide-react v0.577.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const C=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
12
+ * @license lucide-react v0.577.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const f=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase());/**
17
+ * @license lucide-react v0.577.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const i=t=>{const e=f(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
22
+ * @license lucide-react v0.577.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */var w={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
27
+ * @license lucide-react v0.577.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const h=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};/**
32
+ * @license lucide-react v0.577.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const g=s.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:u,...c},p)=>s.createElement("svg",{ref:p,...w,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",n),...!a&&!h(c)&&{"aria-hidden":"true"},...c},[...u.map(([m,d])=>s.createElement(m,d)),...Array.isArray(a)?a:[a]]));/**
37
+ * @license lucide-react v0.577.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const b=(t,e)=>{const r=s.forwardRef(({className:o,...n},a)=>s.createElement(g,{ref:a,iconNode:e,className:l(`lucide-${C(i(t))}`,`lucide-${t}`,o),...n}));return r.displayName=i(t),r};export{b as c};
@@ -0,0 +1 @@
1
+ import{w as t,d as r,j as e}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{S as i}from"./ScenarioViewer-TSD3C211.js";import{W as n}from"./InteractivePreview-DYFW3lDD.js";import"./ViewportInspectBar-oAf2Kqsf.js";import"./useCustomSizes-C-_hOl_g.js";import"./LogViewer-ceAyBX-H.js";import"./SafeScreenshot-BED4B6sP.js";import"./useLastLogLine-C14nCb1q.js";import"./Spinner-Bb5uFQ5V.js";import"./preload-helper-ckwbz45p.js";import"./ReportIssueModal-BzHcG7SE.js";import"./createLucideIcon-CC6AbExI.js";import"./circle-check-BVMi9VA5.js";import"./triangle-alert-BLdiCuG-.js";import"./copy-n2FB0_Sw.js";import"./scenarioStatus-B_8jpV3e.js";import"./InlineSpinner-Bu6c6aDe.js";const k=()=>[{title:"Empty State - CodeYam"},{name:"description",content:"Simulations empty state development view"}],S=t(function(){r();const s={sha:"mock-sha",name:"Dashboard",filePath:"codeyam-cli/src/webserver/app/routes/_index.tsx",entityType:"visual"};return e.jsx(n,{children:e.jsxs("div",{className:"h-screen bg-[#F8F7F6] flex flex-col overflow-hidden",children:[e.jsx("header",{className:"bg-white border-b border-gray-200 shrink-0 relative h-[54px]",children:e.jsxs("div",{className:"flex items-center h-full px-6 gap-6",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",className:"shrink-0",children:e.jsx("path",{d:"M13 8.5H4M4 8.5L8.5 4M4 8.5L8.5 13",stroke:"#005c75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsx("h1",{className:"text-lg font-semibold text-black m-0 leading-[26px] shrink-0",children:"Dashboard"}),e.jsx("span",{className:"text-xs text-[#626262] font-mono whitespace-nowrap overflow-hidden text-ellipsis min-w-0",children:"codeyam-cli/src/webserver/app/routes/_index.tsx"})]}),e.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 px-[15px] py-0 h-[26px] bg-[#efefef] border border-[#e1e1e1] rounded",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-[#626262]"}),e.jsx("span",{className:"text-xs font-semibold text-[#626262]",children:"Not analyzed"})]}),e.jsx("button",{className:"px-[15px] py-0 h-[26px] bg-[#005c75] text-white rounded text-xs font-semibold border-none cursor-pointer hover:bg-[#004a5e] transition-colors",children:"Analyze"})]}),e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-[#626262] ml-auto",children:[e.jsx("span",{className:"leading-[22px]",children:"Next Entity"}),e.jsx("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",className:"shrink-0",children:e.jsx("path",{d:"M4 8.5H13M13 8.5L8.5 4M13 8.5L8.5 13",stroke:"#005c75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})}),e.jsx("div",{className:"bg-[#efefef] border-b border-[#efefef] shrink-0",children:e.jsxs("div",{className:"flex items-center gap-3 h-11 px-[15px]",children:[e.jsxs("div",{className:"px-4 flex items-center justify-center gap-3 shrink-0 text-sm rounded bg-[#343434] text-[#efefef] font-semibold h-8",children:["Scenarios",e.jsx("span",{className:"px-2 py-0.5 rounded-[9px] text-xs font-semibold bg-[#cbf3fa] text-[#005c75] min-w-[25px] text-center",children:"0"})]}),e.jsxs("div",{className:"px-4 flex items-center justify-center gap-3 shrink-0 text-sm rounded-[9px] text-[#3e3e3e] font-normal",children:["Related Entities",e.jsx("span",{className:"px-2 py-0.5 rounded-[9px] text-xs font-semibold bg-[#e1e1e1] text-[#3e3e3e] min-w-[25px] text-center",children:"5"})]}),e.jsx("div",{className:"px-4 shrink-0 text-sm text-[#3e3e3e] font-normal",children:"Code"}),e.jsx("div",{className:"px-4 shrink-0 text-sm text-[#3e3e3e] font-normal",children:"Data Structure"}),e.jsx("div",{className:"px-4 shrink-0 text-sm text-[#3e3e3e] font-normal",children:"History"})]})}),e.jsxs("div",{className:"flex flex-1 gap-0 min-h-0",children:[e.jsx("div",{className:"w-[165px] bg-[#e1e1e1] border-r border-[#c7c7c7] flex items-center justify-center shrink-0",children:e.jsx("span",{className:"text-xs font-medium text-[#8e8e8e] leading-5",children:"No Scenarios"})}),e.jsx(i,{selectedScenario:null,analysis:void 0,entity:s,viewMode:"screenshot",cacheBuster:Date.now(),hasScenarios:!1,isAnalyzing:!1,projectSlug:null,hasAnApiKey:!0})]})]})})});export{S as default,k as meta};