@kern0x1b/penstock-cli 26.10.4 → 26.10.6

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 (175) hide show
  1. package/dist/chunk-account-CMvFjqGw.js +1 -0
  2. package/dist/chunk-agentFailure-BiU8hJ-k.js +1 -0
  3. package/dist/chunk-agentLaunch-CRWlfuXv.js +1 -0
  4. package/dist/chunk-agentServe-M3jzEiHj.js +10 -0
  5. package/dist/chunk-analyze-CCZJQpbU.js +1 -0
  6. package/dist/chunk-analyze-D_2dPr5n.js +1 -0
  7. package/dist/chunk-apply-Dmo_XdOA.js +1 -0
  8. package/dist/chunk-atomicWrite-C6J1gDtO.js +1 -0
  9. package/dist/chunk-bot-51CfGKVL.js +11 -0
  10. package/dist/chunk-cacheDirectory-7sa0970e.js +1 -0
  11. package/dist/chunk-codeFactSet-BqEOkvBS.js +1 -0
  12. package/dist/chunk-codeIndex-olvCG85q.js +1 -0
  13. package/dist/chunk-codeLinks-DW721PAt.js +1 -0
  14. package/dist/chunk-codeLinks-S_BEJVPa.js +1 -0
  15. package/dist/chunk-command-B-7DfFou.js +5 -0
  16. package/dist/chunk-command-CyUljAAc.js +1 -0
  17. package/dist/chunk-command-D7WS1aRl.js +1 -0
  18. package/dist/chunk-commands-CMEkVxle.js +1 -0
  19. package/dist/chunk-compose-DCAQQndd.js +4 -0
  20. package/dist/chunk-connectors-DG6IqkGl.js +1 -0
  21. package/dist/chunk-connectors-UpMjbdpU.js +2 -0
  22. package/dist/chunk-context-B-5CZFAT.js +1 -0
  23. package/dist/chunk-convert-B7srqZpZ.js +1 -0
  24. package/dist/chunk-deploy-CGLF2dB1.js +1 -0
  25. package/dist/chunk-deploy-Clj9f2y-.js +2 -0
  26. package/dist/chunk-diagram-CIy-F5iz.js +1 -0
  27. package/dist/chunk-diagram-DYoeuAJx.js +1 -0
  28. package/dist/chunk-diagramDefects-DlVCfZci.js +1 -0
  29. package/dist/chunk-diagrams-wnFsPOKv.js +1 -0
  30. package/dist/chunk-diff-BJ2sJwcs.js +1 -0
  31. package/dist/chunk-diff-BelMuQhT.js +1 -0
  32. package/dist/chunk-diffModels-DYtf3au1.js +3 -0
  33. package/dist/chunk-dispatch-CescmVW-.js +6 -0
  34. package/dist/chunk-docs-CY6ICsip.js +1 -0
  35. package/dist/chunk-docs-DzOiA9zg.js +30 -0
  36. package/dist/chunk-doctor-GDNwRCg3.js +1 -0
  37. package/dist/chunk-drawing-C2qewK8L.js +8 -0
  38. package/dist/chunk-editPreview-DGu4slO6.js +1 -0
  39. package/dist/chunk-engine-CxgdJ2wO.js +1 -0
  40. package/dist/chunk-export-CDFdw7Eh.js +1 -0
  41. package/dist/chunk-export-DP1Hab-_.js +20 -0
  42. package/dist/chunk-facts-CfA8qH5b.js +1 -0
  43. package/dist/chunk-failure-BK7fu4Yo.js +1 -0
  44. package/dist/chunk-features-CiC2Yoej.js +1 -0
  45. package/dist/chunk-features-Dq1Gvqp3.js +1 -0
  46. package/dist/chunk-folders-BO8qUHUV.js +1 -0
  47. package/dist/chunk-folders-yTMgOqLo.js +1 -0
  48. package/dist/chunk-formChecks-BOiD8Idv.js +1 -0
  49. package/dist/chunk-git-BOKyPQj7.js +3 -0
  50. package/dist/chunk-help-DKtpVSxI.js +85 -0
  51. package/dist/chunk-importCommand-_CnKIoNk.js +1 -0
  52. package/dist/chunk-init-3zEab7KI.js +227 -0
  53. package/dist/chunk-license-Cvnp1Aee.js +1 -0
  54. package/dist/chunk-license-DU4P8P8A.js +1 -0
  55. package/dist/chunk-lint-Df2davEY.js +1 -0
  56. package/dist/chunk-load-CRmIvn7e.js +5 -0
  57. package/dist/chunk-main-BY7JEoe1.js +1 -0
  58. package/dist/chunk-mcp-DKX2xT8d.js +77 -0
  59. package/dist/chunk-mcpLaunch-DpDE0hW-.js +592 -0
  60. package/dist/chunk-migrate-BaNzQNyD.js +2 -0
  61. package/dist/chunk-migrate-DcxIkacG.js +1 -0
  62. package/dist/chunk-moddle-AjPH0QEc.js +1 -0
  63. package/dist/chunk-moddle-Dlk0NR-u.js +1 -0
  64. package/dist/chunk-own-CX-3lIbf.js +1 -0
  65. package/dist/chunk-penstockCli-B0_wWDGy.js +1 -0
  66. package/dist/chunk-placeholderLayout-B18ekWmh.js +1 -0
  67. package/dist/chunk-plural-Di3FH8HP.js +1 -0
  68. package/dist/chunk-pr-DXs1coaS.js +1 -0
  69. package/dist/chunk-preferencesFile-F6bAlNrk.js +1 -0
  70. package/dist/chunk-project-BS-4dy5o.js +1 -0
  71. package/dist/chunk-report-CtkTRSGT.js +1 -0
  72. package/dist/chunk-review-WIpFGKkc.js +1 -0
  73. package/dist/chunk-rules-CoJAmvwu.js +1 -0
  74. package/dist/chunk-security-BKVRwb6V.js +18 -0
  75. package/dist/chunk-share-B3W30sbt.js +239 -0
  76. package/dist/chunk-src-CxTpK8wk.js +890 -0
  77. package/dist/chunk-stages-Gm5BZUp5.js +3 -0
  78. package/dist/chunk-status-X9Ny-Nu8.js +1 -0
  79. package/dist/chunk-systemError-F6bMRwXU.js +1 -0
  80. package/dist/chunk-systemError-cGwrYkmo.js +1 -0
  81. package/dist/chunk-table-B2WTbpMl.js +1 -0
  82. package/dist/chunk-taskTest-B3gfOti1.js +1 -0
  83. package/dist/chunk-taskTest-D-WDCLD5.js +2 -0
  84. package/dist/chunk-templates-BdsiNRJ3.js +1 -0
  85. package/dist/chunk-testCases-ba8k3BJD.js +4 -0
  86. package/dist/chunk-testCases-gXzkCxF5.js +1 -0
  87. package/dist/chunk-tests-BLBZ1eh2.js +1 -0
  88. package/dist/chunk-tests-DxL0JMtB.js +23 -0
  89. package/dist/chunk-translator-BAjzyPKE.js +22 -0
  90. package/dist/chunk-trust-Ci9pDa27.js +1 -0
  91. package/dist/chunk-trust-DlJIoKs8.js +1 -0
  92. package/dist/chunk-version-CdS8_QQd.js +1 -0
  93. package/dist/chunk-workerVariables-BnLSud8o.js +1 -0
  94. package/dist/chunk-wrapper-DqqRt0FZ.js +3 -0
  95. package/dist/chunk-wrapper-E_u1_-Db.js +1 -0
  96. package/dist/locales/de.json +9277 -0
  97. package/dist/locales/es.json +9277 -0
  98. package/dist/locales/fr.json +9277 -0
  99. package/dist/locales/ja.json +9124 -0
  100. package/dist/locales/ko.json +9124 -0
  101. package/dist/locales/pt-BR.json +9277 -0
  102. package/dist/locales/ru.json +9583 -0
  103. package/dist/locales/zh.json +9124 -0
  104. package/dist/penstock.js +1 -2363
  105. package/dist/web/assets/{AgentSettings-BvzT4Itb.js → AgentSettings-4B4hSxBk.js} +1 -1
  106. package/dist/web/assets/{AgentsDialog-BqY3wKcV.js → AgentsDialog-C32ALLtE.js} +1 -1
  107. package/dist/web/assets/{BpmnCanvas-BTdM1l9l.js → BpmnCanvas-CZOJiq6t.js} +3 -3
  108. package/dist/web/assets/{BpmnDocument-uifU3NGG.js → BpmnDocument-BNLfXWLG.js} +4 -4
  109. package/dist/web/assets/{ConflictDialog-C4A9-Psr.js → ConflictDialog-mUJYs1zz.js} +1 -1
  110. package/dist/web/assets/{DiffDocument-BMTSevd7.js → DiffDocument-C7csJl3x.js} +1 -1
  111. package/dist/web/assets/{DmnDocument-B8wWuhfX.js → DmnDocument-B2dyX49k.js} +1 -1
  112. package/dist/web/assets/{FormDocument-bQ5VRsrh.js → FormDocument-ChSqEPE5.js} +1 -1
  113. package/dist/web/assets/{FormStepView-DbMCFSO1.js → FormStepView-j4C0Qovo.js} +1 -1
  114. package/dist/web/assets/GraphAwareLayoutService-DD2iXfXi.js +21 -0
  115. package/dist/web/assets/NewFileDialog-eeIqqmXc.js +47 -0
  116. package/dist/web/assets/{QuickOpen-mzlfRqvG.js → QuickOpen-C0I0FRt2.js} +1 -1
  117. package/dist/web/assets/{ScriptPane-C9q5wLfO.js → ScriptPane-BAvcgLWX.js} +2 -2
  118. package/dist/web/assets/{ScriptRunDialog-Dm-_0H1Z.js → ScriptRunDialog-DLlMiJiK.js} +1 -1
  119. package/dist/web/assets/{SettingsDialog-Bhwwtyg7.js → SettingsDialog-C3ts5aiN.js} +1 -1
  120. package/dist/web/assets/{ShortcutsDialog-BXP0h7Tp.js → ShortcutsDialog-DVV504pS.js} +1 -1
  121. package/dist/web/assets/{SourceDocument-DgrNCprS.js → SourceDocument-DRgUPazk.js} +1 -1
  122. package/dist/web/assets/{TextDocument-D8N0uaQa.js → TextDocument-Bm0sPjft.js} +1 -1
  123. package/dist/web/assets/{UnreadableFileLayer-D2Rcxnt7.js → UnreadableFileLayer-DbW33CnE.js} +1 -1
  124. package/dist/web/assets/{UploadDialog-Dinga4TP.js → UploadDialog-BSl3zFNn.js} +1 -1
  125. package/dist/web/assets/{apply-CzXxiRWK.js → apply-B3FkgxjU.js} +1 -1
  126. package/dist/web/assets/{bpmnTheme-db4tYvop.js → bpmnTheme-C3HdVV1D.js} +1 -1
  127. package/dist/web/assets/bridgeInstance-BZBhe5hF.js +851 -0
  128. package/dist/web/assets/{commands-BAnBjEk3.js → commands-DHPxsavW.js} +1 -1
  129. package/dist/web/assets/de-BH_bnU4H.js +1 -0
  130. package/dist/web/assets/{dialog-KVjfqSrB.js → dialog-LcHsiQKJ.js} +1 -1
  131. package/dist/web/assets/{diff-Cw0ENHJR.js → diff-bpdDl0KE.js} +1 -1
  132. package/dist/web/assets/{documentBridge-D5SaBThP.js → documentBridge-4fZNBdp4.js} +2 -2
  133. package/dist/web/assets/{documents-Dkor36oS.js → documents-FOVGbYYF.js} +1 -1
  134. package/dist/web/assets/{duplicate-ud-StKuO.js → duplicate-CdCuOnUl.js} +1 -1
  135. package/dist/web/assets/{engines-BQRXHtW8.js → engines-C884tl-T.js} +1 -1
  136. package/dist/web/assets/es-D7v7zkxC.js +1 -0
  137. package/dist/web/assets/{formChecks-DFrCuO4I.js → formChecks-Bvuzw2sb.js} +1 -1
  138. package/dist/web/assets/fr-CuzAJTai.js +1 -0
  139. package/dist/web/assets/frontend-Y1MvD_Uo.js +1 -0
  140. package/dist/web/assets/httpHost-CnF86WJB.js +1 -0
  141. package/dist/web/assets/{index.es-dFUgH_-g.js → index.es-0rLw__5_.js} +1 -1
  142. package/dist/web/assets/{index.es-DR-czZl7.js → index.es-BP1Cc_0e.js} +1 -1
  143. package/dist/web/assets/{intelligence-BkxcJMU_.js → intelligence-E2EBYhHr.js} +1 -1
  144. package/dist/web/assets/ja-BgElyPpa.js +1 -0
  145. package/dist/web/assets/{jspdf.es.min-BMfOi0te.js → jspdf.es.min-BSRrqhq_.js} +3 -3
  146. package/dist/web/assets/ko-j1Oi9MKH.js +1 -0
  147. package/dist/web/assets/{lib-C3uYnGWx.js → lib-De3fPoUi.js} +1 -1
  148. package/dist/web/assets/{platform-zEAtGnYc.js → platform-CjEV0T5t.js} +1 -1
  149. package/dist/web/assets/{preferences-K6VRM9Ah.js → preferences-CmXdxfFo.js} +1 -1
  150. package/dist/web/assets/pt-BR-CRWG2th4.js +1 -0
  151. package/dist/web/assets/ru-KJyuYSUL.js +1 -0
  152. package/dist/web/assets/{run-fV7AmV4q.js → run-B9EUa035.js} +1 -1
  153. package/dist/web/assets/{samples-D-3Bquy_.js → samples-03zukOEM.js} +1 -1
  154. package/dist/web/assets/{testCaseRuns-C-0blM3d.js → testCaseRuns-BYhJPipg.js} +1 -1
  155. package/dist/web/assets/translator-OIpY8kTG.js +1 -0
  156. package/dist/web/assets/{ui-TBzvKaKQ.js → ui-BLMlfdD3.js} +1 -1
  157. package/dist/web/assets/{useTrace-BgpeAcQR.js → useTrace-Cr28sh4A.js} +1 -1
  158. package/dist/web/assets/{web-qJCedJJw.js → web-Q9VZNxQi.js} +5 -5
  159. package/dist/web/assets/zh-CukDLcVz.js +1 -0
  160. package/dist/web/index.html +19 -19
  161. package/package.json +1 -1
  162. package/dist/web/assets/GraphAwareLayoutService-CePcz6pL.js +0 -21
  163. package/dist/web/assets/NewFileDialog-DsoFURD9.js +0 -47
  164. package/dist/web/assets/bridgeInstance-BPwbITOf.js +0 -850
  165. package/dist/web/assets/de-Cd75cvcZ.js +0 -1
  166. package/dist/web/assets/es-D2PUEg_Z.js +0 -1
  167. package/dist/web/assets/fr-DkGYGarc.js +0 -1
  168. package/dist/web/assets/frontend-B05iyhCp.js +0 -1
  169. package/dist/web/assets/httpHost-DX-P_FDg.js +0 -1
  170. package/dist/web/assets/ja-De4NAvK-.js +0 -1
  171. package/dist/web/assets/ko-Ci27KQ5n.js +0 -1
  172. package/dist/web/assets/pt-BR-CNmIseZJ.js +0 -1
  173. package/dist/web/assets/ru-BtK7W4xW.js +0 -1
  174. package/dist/web/assets/translator-Dvvasoz-.js +0 -1
  175. package/dist/web/assets/zh-DxI_A5kC.js +0 -1
@@ -1 +0,0 @@
1
- import"./rolldown-runtime-B8BYMn-z.js";var e=`https://local.bpmn`.replace(/\/+$/,``),Configuration=class{configuration;constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath==null?e:this.configuration.basePath}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||querystring}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){let e=this.configuration.apiKey;if(e)return typeof e==`function`?e:()=>e}get accessToken(){let e=this.configuration.accessToken;if(e)return typeof e==`function`?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},t=new Configuration,n=class BaseAPI{configuration;static jsonRegex=/^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;middleware;constructor(e=t){this.configuration=e,this.middleware=e.middleware}withMiddleware(...e){let t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){let t=e.map(e=>({pre:e}));return this.withMiddleware(...t)}withPostMiddleware(...e){let t=e.map(e=>({post:e}));return this.withMiddleware(...t)}isJsonMime(e){return e?BaseAPI.jsonRegex.test(e):!1}async request(e,t){let{url:n,init:r}=await this.createFetchParams(e,t),i=await this.fetchApi(n,r);if(i&&i.status>=200&&i.status<300)return i;throw new ResponseError(i,`Response returned an error code`)}async createFetchParams(e,t){let n=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(n+=`?`+this.configuration.queryParamsStringify(e.query));let r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(e=>r[e]===void 0?delete r[e]:{});let i=typeof t==`function`?t:async()=>t,a={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},o={...a,...await i({init:a,context:e})},s;s=isFormData(o.body)||o.body instanceof URLSearchParams||isBlob(o.body)?o.body:this.isJsonMime(r[`Content-Type`])?JSON.stringify(o.body):o.body;let c={...o,body:s};return{url:n,init:c}}fetchApi=async(e,t)=>{let n={url:e,init:t};for(let e of this.middleware)e.pre&&(n=await e.pre({fetch:this.fetchApi,...n})||n);let r;try{r=await(this.configuration.fetchApi||fetch)(n.url,n.init)}catch(e){for(let t of this.middleware)t.onError&&(r=await t.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:e,response:r?r.clone():void 0})||r);if(r===void 0)throw e instanceof Error?new FetchError(e,`The request failed and the interceptors did not return an alternative response`):e}for(let e of this.middleware)e.post&&(r=await e.post({fetch:this.fetchApi,url:n.url,init:n.init,response:r.clone()})||r);return r};clone(){let e=this.constructor,t=new e(this.configuration);return t.middleware=this.middleware.slice(),t}};function isBlob(e){return typeof Blob<`u`&&e instanceof Blob}function isFormData(e){return typeof FormData<`u`&&e instanceof FormData}var ResponseError=class extends Error{response;name=`ResponseError`;constructor(e,t){super(t),this.response=e;let n=new.target.prototype;Object.setPrototypeOf&&Object.setPrototypeOf(this,n)}},FetchError=class extends Error{cause;name=`FetchError`;constructor(e,t){super(t),this.cause=e;let n=new.target.prototype;Object.setPrototypeOf&&Object.setPrototypeOf(this,n)}},RequiredError=class extends Error{field;name=`RequiredError`;constructor(e,t){super(t),this.field=e;let n=new.target.prototype;Object.setPrototypeOf&&Object.setPrototypeOf(this,n)}};function querystring(e,t=``){return Object.keys(e).map(n=>querystringSingleKey(n,e[n],t)).filter(e=>e.length>0).join(`&`)}function querystringSingleKey(e,t,n=``){let r=n+(n.length?`[${e}]`:e);if(t instanceof Array){let e=t.map(e=>encodeURIComponent(String(e))).join(`&${encodeURIComponent(r)}=`);return`${encodeURIComponent(r)}=${e}`}return t instanceof Set?querystringSingleKey(e,Array.from(t),n):t instanceof Date?`${encodeURIComponent(r)}=${encodeURIComponent(serializeDateTime(t))}`:t instanceof Object?querystring(t,r):`${encodeURIComponent(r)}=${encodeURIComponent(String(t))}`}function serializeDateTime(e){return e.toISOString()}function parseDateTime(e){return new Date(e)}function mapValues(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r]);return n}var JSONApiResponse=class{raw;transformer;constructor(e,t=e=>e){this.raw=e,this.transformer=t}async value(){return this.transformer(await this.raw.json())}},VoidApiResponse=class{raw;constructor(e){this.raw=e}async value(){}},BlobApiResponse=class{raw;constructor(e){this.raw=e}async value(){return await this.raw.blob()}};function PublishedActionToJSON(e){return PublishedActionToJSONTyped(e,!1)}function PublishedActionToJSONTyped(e,t=!1){return e==null?e:{id:e.id,title:e.title,section:e.section,enabled:e.enabled,checked:e.checked,shortcut:e.shortcut}}function PublishedActionsToJSON(e){return PublishedActionsToJSONTyped(e,!1)}function PublishedActionsToJSONTyped(e,t=!1){return e==null?e:{actions:e.actions.map(PublishedActionToJSON)}}var ActionsApi=class extends n{async publishActionsRequestOpts(e){if(e.publishedActions==null)throw new RequiredError(`publishedActions`,`Required parameter "publishedActions" was null or undefined when calling publishActions().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/actions`,method:`POST`,headers:n,query:t,body:PublishedActionsToJSON(e.publishedActions)}}async publishActionsRaw(e,t){let n=await this.publishActionsRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async publishActions(e,t){await this.publishActionsRaw(e,t)}};function AgentOfferedValueDtoFromJSON(e){return AgentOfferedValueDtoFromJSONTyped(e,!1)}function AgentOfferedValueDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,name:e.name}}function AgentOfferedOptionDtoFromJSON(e){return AgentOfferedOptionDtoFromJSONTyped(e,!1)}function AgentOfferedOptionDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,name:e.name,category:e.category===void 0?void 0:e.category===null?null:e.category,current:e.current,values:e.values.map(AgentOfferedValueDtoFromJSON)}}function AgentOfferedOptionsDtoFromJSON(e){return AgentOfferedOptionsDtoFromJSONTyped(e,!1)}function AgentOfferedOptionsDtoFromJSONTyped(e,t){return e==null?e:{readAt:e.readAt,options:e.options.map(AgentOfferedOptionDtoFromJSON)}}function AgentJobErrorDtoFromJSON(e){return AgentJobErrorDtoFromJSONTyped(e,!1)}function AgentJobErrorDtoFromJSONTyped(e,t){return e==null?e:{key:e.key,params:e.params==null?void 0:e.params,detail:e.detail}}function AgentJobDtoFromJSON(e){return AgentJobDtoFromJSONTyped(e,!1)}function AgentJobDtoFromJSONTyped(e,t){return e==null?e:{kind:e.kind,state:e.state,percent:e.percent===void 0?void 0:e.percent===null?null:e.percent,error:e.error===void 0?void 0:e.error===null?null:AgentJobErrorDtoFromJSON(e.error)}}function AgentCatalogEntryDtoFromJSON(e){return AgentCatalogEntryDtoFromJSONTyped(e,!1)}function AgentCatalogEntryDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,name:e.name,version:e.version===void 0?void 0:e.version===null?null:e.version,description:e.description,website:e.website===void 0?void 0:e.website===null?null:e.website,repository:e.repository===void 0?void 0:e.repository===null?null:e.repository,license:e.license===void 0?void 0:e.license===null?null:e.license,icon:e.icon===void 0?void 0:e.icon===null?null:e.icon,source:e.source,installed:e.installed,installedVia:e.installedVia===void 0?void 0:e.installedVia===null?null:e.installedVia,installedVersion:e.installedVersion===void 0?void 0:e.installedVersion===null?null:e.installedVersion,updateAvailable:e.updateAvailable,enabled:e.enabled,how:e.how,blocked:e.blocked===void 0?void 0:e.blocked===null?null:e.blocked,install:e.install===void 0?void 0:e.install===null?null:e.install,job:e.job===void 0?void 0:e.job===null?null:AgentJobDtoFromJSON(e.job),options:e.options===void 0?void 0:e.options===null?null:AgentOfferedOptionsDtoFromJSON(e.options),chosen:e.chosen}}function AgentCatalogDtoFromJSON(e){return AgentCatalogDtoFromJSONTyped(e,!1)}function AgentCatalogDtoFromJSONTyped(e,t){return e==null?e:{agents:e.agents.map(AgentCatalogEntryDtoFromJSON),updated:e.updated===void 0?void 0:e.updated===null?null:e.updated,source:e.source,stale:e.stale,node:e.node,uv:e.uv,busy:e.busy,refreshError:e.refreshError===void 0?void 0:e.refreshError===null?null:AgentJobErrorDtoFromJSON(e.refreshError)}}function AgentQueuedDtoFromJSON(e){return AgentQueuedDtoFromJSONTyped(e,!1)}function AgentQueuedDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,text:e.text}}function AgentErrorDtoFromJSON(e){return AgentErrorDtoFromJSONTyped(e,!1)}function AgentErrorDtoFromJSONTyped(e,t){return e==null?e:{key:e.key,detail:e.detail,signIn:e.signIn==null?void 0:e.signIn}}function AgentPermissionOptionDtoFromJSON(e){return AgentPermissionOptionDtoFromJSONTyped(e,!1)}function AgentPermissionOptionDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,label:e.label,kind:e.kind}}function AgentLocationDtoFromJSON(e){return AgentLocationDtoFromJSONTyped(e,!1)}function AgentLocationDtoFromJSONTyped(e,t){return e==null?e:{path:e.path,line:e.line===void 0?void 0:e.line===null?null:e.line}}function AgentDiffDtoFromJSON(e){return AgentDiffDtoFromJSONTyped(e,!1)}function AgentDiffDtoFromJSONTyped(e,t){return e==null?e:{path:e.path,oldText:e.oldText===void 0?void 0:e.oldText===null?null:e.oldText,newText:e.newText}}function AgentToolDtoFromJSON(e){return AgentToolDtoFromJSONTyped(e,!1)}function AgentToolDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,title:e.title,kind:e.kind,status:e.status,diffs:e.diffs.map(AgentDiffDtoFromJSON),paths:e.paths,locations:e.locations.map(AgentLocationDtoFromJSON),raw:e.raw==null?void 0:e.raw}}function AgentPermissionDtoFromJSON(e){return AgentPermissionDtoFromJSONTyped(e,!1)}function AgentPermissionDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,tool:AgentToolDtoFromJSON(e.tool),options:e.options.map(AgentPermissionOptionDtoFromJSON)}}function AgentPlanItemDtoFromJSON(e){return AgentPlanItemDtoFromJSONTyped(e,!1)}function AgentPlanItemDtoFromJSONTyped(e,t){return e==null?e:{text:e.text,status:e.status}}function AgentEntryDtoFromJSON(e){return AgentEntryDtoFromJSONTyped(e,!1)}function AgentEntryDtoFromJSONTyped(e,t){return e==null?e:{kind:e.kind,id:e.id,text:e.text==null?void 0:e.text,tool:e.tool==null?void 0:AgentToolDtoFromJSON(e.tool),items:e.items==null?void 0:e.items.map(AgentPlanItemDtoFromJSON)}}function AgentChatStateFromJSON(e){return AgentChatStateFromJSONTyped(e,!1)}function AgentChatStateFromJSONTyped(e,t){return e}function AgentChatDtoFromJSON(e){return AgentChatDtoFromJSONTyped(e,!1)}function AgentChatDtoFromJSONTyped(e,t){return e==null?e:{files:e.files,id:e.id,title:e.title,state:AgentChatStateFromJSON(e.state),agentId:e.agentId,updated:e.updated==null?e.updated:parseDateTime(e.updated),detail:e.detail===void 0?void 0:e.detail===null?null:e.detail}}function AgentConfigValueDtoFromJSON(e){return AgentConfigValueDtoFromJSONTyped(e,!1)}function AgentConfigValueDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,name:e.name,description:e.description===void 0?void 0:e.description===null?null:e.description,group:e.group===void 0?void 0:e.group===null?null:e.group}}function AgentConfigOptionDtoFromJSON(e){return AgentConfigOptionDtoFromJSONTyped(e,!1)}function AgentConfigOptionDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,name:e.name,description:e.description===void 0?void 0:e.description===null?null:e.description,category:e.category,current:e.current,values:e.values.map(AgentConfigValueDtoFromJSON)}}function AgentChatDetailDtoFromJSON(e){return AgentChatDetailDtoFromJSONTyped(e,!1)}function AgentChatDetailDtoFromJSONTyped(e,t){return e==null?e:{chat:AgentChatDtoFromJSON(e.chat),entries:e.entries.map(AgentEntryDtoFromJSON),queue:e.queue.map(AgentQueuedDtoFromJSON),permission:e.permission==null?void 0:AgentPermissionDtoFromJSON(e.permission),error:e.error==null?void 0:AgentErrorDtoFromJSON(e.error),options:e.options==null?void 0:e.options.map(AgentConfigOptionDtoFromJSON)}}function AgentChatsResponseFromJSON(e){return AgentChatsResponseFromJSONTyped(e,!1)}function AgentChatsResponseFromJSONTyped(e,t){return e==null?e:{chats:e.chats.map(AgentChatDtoFromJSON),enabled:e.enabled}}function AgentChoiceDtoFromJSON(e){return AgentChoiceDtoFromJSONTyped(e,!1)}function AgentChoiceDtoFromJSONTyped(e,t){return e==null?e:{id:e.id,name:e.name,available:e.available,source:e.source,icon:e.icon===void 0?void 0:e.icon===null?null:e.icon,install:e.install===void 0?void 0:e.install===null?null:e.install,options:e.options==null?void 0:e.options.map(AgentConfigOptionDtoFromJSON)}}function AgentChoicesResponseFromJSON(e){return AgentChoicesResponseFromJSONTyped(e,!1)}function AgentChoicesResponseFromJSONTyped(e,t){return e==null?e:{agents:e.agents.map(AgentChoiceDtoFromJSON)}}function AgentEventFromJSON(e){return AgentEventFromJSONTyped(e,!1)}function AgentEventFromJSONTyped(e,t){return e==null?e:{type:e.type,chatId:e.chatId===void 0?void 0:e.chatId===null?null:e.chatId,chats:e.chats==null?void 0:e.chats.map(AgentChatDtoFromJSON),enabled:e.enabled==null?void 0:e.enabled,entry:e.entry==null?void 0:AgentEntryDtoFromJSON(e.entry),tool:e.tool==null?void 0:AgentToolDtoFromJSON(e.tool),items:e.items==null?void 0:e.items.map(AgentPlanItemDtoFromJSON),queue:e.queue==null?void 0:e.queue.map(AgentQueuedDtoFromJSON),permission:e.permission==null?void 0:AgentPermissionDtoFromJSON(e.permission),error:e.error==null?void 0:AgentErrorDtoFromJSON(e.error),options:e.options==null?void 0:e.options.map(AgentConfigOptionDtoFromJSON)}}function AnswerAgentPermissionRequestToJSON(e){return AnswerAgentPermissionRequestToJSONTyped(e,!1)}function AnswerAgentPermissionRequestToJSONTyped(e,t=!1){return e==null?e:{permissionId:e.permissionId,optionId:e.optionId}}function ChooseAgentOptionRequestToJSON(e){return ChooseAgentOptionRequestToJSONTyped(e,!1)}function ChooseAgentOptionRequestToJSONTyped(e,t=!1){return e==null?e:{category:e.category,value:e.value}}function CreateAgentChatRequestToJSON(e){return CreateAgentChatRequestToJSONTyped(e,!1)}function CreateAgentChatRequestToJSONTyped(e,t=!1){return e==null?e:{agentId:e.agentId}}function AgentContextDtoToJSON(e){return AgentContextDtoToJSONTyped(e,!1)}function AgentContextDtoToJSONTyped(e,t=!1){return e==null?e:{file:e.file,elementIds:e.elementIds}}function PromptAgentRequestToJSON(e){return PromptAgentRequestToJSONTyped(e,!1)}function PromptAgentRequestToJSONTyped(e,t=!1){return e==null?e:{text:e.text,context:AgentContextDtoToJSON(e.context)}}function PromptAgentResponseFromJSON(e){return PromptAgentResponseFromJSONTyped(e,!1)}function PromptAgentResponseFromJSONTyped(e,t){return e==null?e:{queued:e.queued,queueId:e.queueId===void 0?void 0:e.queueId===null?null:e.queueId}}function RenameAgentChatRequestToJSON(e){return RenameAgentChatRequestToJSONTyped(e,!1)}function RenameAgentChatRequestToJSONTyped(e,t=!1){return e==null?e:{title:e.title}}function SetAgentConfigOptionRequestToJSON(e){return SetAgentConfigOptionRequestToJSONTyped(e,!1)}function SetAgentConfigOptionRequestToJSONTyped(e,t=!1){return e==null?e:{optionId:e.optionId,valueId:e.valueId}}function TurnAgentRequestToJSON(e){return TurnAgentRequestToJSONTyped(e,!1)}function TurnAgentRequestToJSONTyped(e,t=!1){return e==null?e:{enabled:e.enabled}}var AgentApi=class extends n{async answerAgentPermissionRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling answerAgentPermission().`);if(e.answerAgentPermissionRequest==null)throw new RequiredError(`answerAgentPermissionRequest`,`Required parameter "answerAgentPermissionRequest" was null or undefined when calling answerAgentPermission().`);let t={},n={};n[`Content-Type`]=`application/json`;let r=`/api/agent/chats/{chatId}/permission`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),{path:r,method:`POST`,headers:n,query:t,body:AnswerAgentPermissionRequestToJSON(e.answerAgentPermissionRequest)}}async answerAgentPermissionRaw(e,t){let n=await this.answerAgentPermissionRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async answerAgentPermission(e,t){await this.answerAgentPermissionRaw(e,t)}async chooseAgentOptionRequestOpts(e){if(e.agentId==null)throw new RequiredError(`agentId`,`Required parameter "agentId" was null or undefined when calling chooseAgentOption().`);if(e.chooseAgentOptionRequest==null)throw new RequiredError(`chooseAgentOptionRequest`,`Required parameter "chooseAgentOptionRequest" was null or undefined when calling chooseAgentOption().`);let t={},n={};n[`Content-Type`]=`application/json`;let r=`/api/agent/agents/{agentId}/options`;return r=r.replace(`{agentId}`,encodeURIComponent(String(e.agentId))),{path:r,method:`PUT`,headers:n,query:t,body:ChooseAgentOptionRequestToJSON(e.chooseAgentOptionRequest)}}async chooseAgentOptionRaw(e,t){let n=await this.chooseAgentOptionRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentCatalogEntryDtoFromJSON(e))}async chooseAgentOption(e,t){return await(await this.chooseAgentOptionRaw(e,t)).value()}async createAgentChatRequestOpts(e){let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/agent/chats`,method:`POST`,headers:n,query:t,body:CreateAgentChatRequestToJSON(e.createAgentChatRequest)}}async createAgentChatRaw(e,t){let n=await this.createAgentChatRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentChatDtoFromJSON(e))}async createAgentChat(e={},t){return await(await this.createAgentChatRaw(e,t)).value()}async deleteAgentChatRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling deleteAgentChat().`);let t={},n={},r=`/api/agent/chats/{chatId}`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),{path:r,method:`DELETE`,headers:n,query:t}}async deleteAgentChatRaw(e,t){let n=await this.deleteAgentChatRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async deleteAgentChat(e,t){await this.deleteAgentChatRaw(e,t)}async getAgentCatalogRequestOpts(){return{path:`/api/agent/catalog`,method:`GET`,headers:{},query:{}}}async getAgentCatalogRaw(e){let t=await this.getAgentCatalogRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>AgentCatalogDtoFromJSON(e))}async getAgentCatalog(e){return await(await this.getAgentCatalogRaw(e)).value()}async getAgentChatRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling getAgentChat().`);let t={},n={},r=`/api/agent/chats/{chatId}`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),{path:r,method:`GET`,headers:n,query:t}}async getAgentChatRaw(e,t){let n=await this.getAgentChatRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentChatDetailDtoFromJSON(e))}async getAgentChat(e,t){return await(await this.getAgentChatRaw(e,t)).value()}async getAgentChoicesRequestOpts(){return{path:`/api/agent/choices`,method:`GET`,headers:{},query:{}}}async getAgentChoicesRaw(e){let t=await this.getAgentChoicesRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>AgentChoicesResponseFromJSON(e))}async getAgentChoices(e){return await(await this.getAgentChoicesRaw(e)).value()}async installAgentRequestOpts(e){if(e.agentId==null)throw new RequiredError(`agentId`,`Required parameter "agentId" was null or undefined when calling installAgent().`);let t={},n={},r=`/api/agent/agents/{agentId}/install`;return r=r.replace(`{agentId}`,encodeURIComponent(String(e.agentId))),{path:r,method:`POST`,headers:n,query:t}}async installAgentRaw(e,t){let n=await this.installAgentRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentCatalogEntryDtoFromJSON(e))}async installAgent(e,t){return await(await this.installAgentRaw(e,t)).value()}async listAgentChatsRequestOpts(){return{path:`/api/agent/chats`,method:`GET`,headers:{},query:{}}}async listAgentChatsRaw(e){let t=await this.listAgentChatsRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>AgentChatsResponseFromJSON(e))}async listAgentChats(e){return await(await this.listAgentChatsRaw(e)).value()}async nextAgentEventRequestOpts(e){let t={};return e.client!=null&&(t.client=e.client),{path:`/api/agent/events`,method:`GET`,headers:{},query:t}}async nextAgentEventRaw(e,t){let n=await this.nextAgentEventRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentEventFromJSON(e))}async nextAgentEvent(e={},t){let n=await this.nextAgentEventRaw(e,t);switch(n.raw.status){case 200:return await n.value();case 204:return null;default:return await n.value()}}async openAgentSettingsRequestOpts(){return{path:`/api/agent/settings/open`,method:`POST`,headers:{},query:{}}}async openAgentSettingsRaw(e){let t=await this.openAgentSettingsRequestOpts();return new VoidApiResponse(await this.request(t,e))}async openAgentSettings(e){await this.openAgentSettingsRaw(e)}async promptAgentRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling promptAgent().`);if(e.promptAgentRequest==null)throw new RequiredError(`promptAgentRequest`,`Required parameter "promptAgentRequest" was null or undefined when calling promptAgent().`);let t={},n={};n[`Content-Type`]=`application/json`;let r=`/api/agent/chats/{chatId}/prompt`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),{path:r,method:`POST`,headers:n,query:t,body:PromptAgentRequestToJSON(e.promptAgentRequest)}}async promptAgentRaw(e,t){let n=await this.promptAgentRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>PromptAgentResponseFromJSON(e))}async promptAgent(e,t){return await(await this.promptAgentRaw(e,t)).value()}async refreshAgentCatalogRequestOpts(){return{path:`/api/agent/catalog/refresh`,method:`POST`,headers:{},query:{}}}async refreshAgentCatalogRaw(e){let t=await this.refreshAgentCatalogRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>AgentCatalogDtoFromJSON(e))}async refreshAgentCatalog(e){return await(await this.refreshAgentCatalogRaw(e)).value()}async refreshAgentModelsRequestOpts(e){if(e.agentId==null)throw new RequiredError(`agentId`,`Required parameter "agentId" was null or undefined when calling refreshAgentModels().`);let t={},n={},r=`/api/agent/agents/{agentId}/models/refresh`;return r=r.replace(`{agentId}`,encodeURIComponent(String(e.agentId))),{path:r,method:`POST`,headers:n,query:t}}async refreshAgentModelsRaw(e,t){let n=await this.refreshAgentModelsRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentCatalogEntryDtoFromJSON(e))}async refreshAgentModels(e,t){return await(await this.refreshAgentModelsRaw(e,t)).value()}async renameAgentChatRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling renameAgentChat().`);if(e.renameAgentChatRequest==null)throw new RequiredError(`renameAgentChatRequest`,`Required parameter "renameAgentChatRequest" was null or undefined when calling renameAgentChat().`);let t={},n={};n[`Content-Type`]=`application/json`;let r=`/api/agent/chats/{chatId}`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),{path:r,method:`PATCH`,headers:n,query:t,body:RenameAgentChatRequestToJSON(e.renameAgentChatRequest)}}async renameAgentChatRaw(e,t){let n=await this.renameAgentChatRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentChatDtoFromJSON(e))}async renameAgentChat(e,t){return await(await this.renameAgentChatRaw(e,t)).value()}async setAgentConfigOptionRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling setAgentConfigOption().`);if(e.setAgentConfigOptionRequest==null)throw new RequiredError(`setAgentConfigOptionRequest`,`Required parameter "setAgentConfigOptionRequest" was null or undefined when calling setAgentConfigOption().`);let t={},n={};n[`Content-Type`]=`application/json`;let r=`/api/agent/chats/{chatId}/options`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),{path:r,method:`POST`,headers:n,query:t,body:SetAgentConfigOptionRequestToJSON(e.setAgentConfigOptionRequest)}}async setAgentConfigOptionRaw(e,t){let n=await this.setAgentConfigOptionRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>e.map(AgentConfigOptionDtoFromJSON))}async setAgentConfigOption(e,t){return await(await this.setAgentConfigOptionRaw(e,t)).value()}async signInAgentRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling signInAgent().`);let t={},n={},r=`/api/agent/chats/{chatId}/sign-in`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),{path:r,method:`POST`,headers:n,query:t}}async signInAgentRaw(e,t){let n=await this.signInAgentRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async signInAgent(e,t){await this.signInAgentRaw(e,t)}async stopAgentTurnRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling stopAgentTurn().`);let t={},n={},r=`/api/agent/chats/{chatId}/stop`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),{path:r,method:`POST`,headers:n,query:t}}async stopAgentTurnRaw(e,t){let n=await this.stopAgentTurnRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async stopAgentTurn(e,t){await this.stopAgentTurnRaw(e,t)}async turnAgentRequestOpts(e){if(e.agentId==null)throw new RequiredError(`agentId`,`Required parameter "agentId" was null or undefined when calling turnAgent().`);if(e.turnAgentRequest==null)throw new RequiredError(`turnAgentRequest`,`Required parameter "turnAgentRequest" was null or undefined when calling turnAgent().`);let t={},n={};n[`Content-Type`]=`application/json`;let r=`/api/agent/agents/{agentId}/turn`;return r=r.replace(`{agentId}`,encodeURIComponent(String(e.agentId))),{path:r,method:`POST`,headers:n,query:t,body:TurnAgentRequestToJSON(e.turnAgentRequest)}}async turnAgentRaw(e,t){let n=await this.turnAgentRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentCatalogEntryDtoFromJSON(e))}async turnAgent(e,t){return await(await this.turnAgentRaw(e,t)).value()}async uninstallAgentRequestOpts(e){if(e.agentId==null)throw new RequiredError(`agentId`,`Required parameter "agentId" was null or undefined when calling uninstallAgent().`);let t={},n={},r=`/api/agent/agents/{agentId}/uninstall`;return r=r.replace(`{agentId}`,encodeURIComponent(String(e.agentId))),{path:r,method:`POST`,headers:n,query:t}}async uninstallAgentRaw(e,t){let n=await this.uninstallAgentRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>AgentCatalogEntryDtoFromJSON(e))}async uninstallAgent(e,t){return await(await this.uninstallAgentRaw(e,t)).value()}async unqueueAgentPromptRequestOpts(e){if(e.chatId==null)throw new RequiredError(`chatId`,`Required parameter "chatId" was null or undefined when calling unqueueAgentPrompt().`);if(e.queueId==null)throw new RequiredError(`queueId`,`Required parameter "queueId" was null or undefined when calling unqueueAgentPrompt().`);let t={},n={},r=`/api/agent/chats/{chatId}/queue/{queueId}`;return r=r.replace(`{chatId}`,encodeURIComponent(String(e.chatId))),r=r.replace(`{queueId}`,encodeURIComponent(String(e.queueId))),{path:r,method:`DELETE`,headers:n,query:t}}async unqueueAgentPromptRaw(e,t){let n=await this.unqueueAgentPromptRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async unqueueAgentPrompt(e,t){await this.unqueueAgentPromptRaw(e,t)}};function ClipboardDtoFromJSON(e){return ClipboardDtoFromJSONTyped(e,!1)}function ClipboardDtoFromJSONTyped(e,t){return e==null?e:{text:e.text}}function ClipboardDtoToJSON(e){return ClipboardDtoToJSONTyped(e,!1)}function ClipboardDtoToJSONTyped(e,t=!1){return e==null?e:{text:e.text}}function ClipboardImageDtoToJSON(e){return ClipboardImageDtoToJSONTyped(e,!1)}function ClipboardImageDtoToJSONTyped(e,t=!1){return e==null?e:{png:e.png}}var ClipboardApi=class extends n{async getClipboardRequestOpts(){return{path:`/api/clipboard`,method:`GET`,headers:{},query:{}}}async getClipboardRaw(e){let t=await this.getClipboardRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>ClipboardDtoFromJSON(e))}async getClipboard(e){return await(await this.getClipboardRaw(e)).value()}async saveClipboardRequestOpts(e){if(e.clipboardDto==null)throw new RequiredError(`clipboardDto`,`Required parameter "clipboardDto" was null or undefined when calling saveClipboard().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/clipboard`,method:`POST`,headers:n,query:t,body:ClipboardDtoToJSON(e.clipboardDto)}}async saveClipboardRaw(e,t){let n=await this.saveClipboardRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async saveClipboard(e,t){await this.saveClipboardRaw(e,t)}async saveClipboardImageRequestOpts(e){if(e.clipboardImageDto==null)throw new RequiredError(`clipboardImageDto`,`Required parameter "clipboardImageDto" was null or undefined when calling saveClipboardImage().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/clipboard/image`,method:`POST`,headers:n,query:t,body:ClipboardImageDtoToJSON(e.clipboardImageDto)}}async saveClipboardImageRaw(e,t){let n=await this.saveClipboardImageRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async saveClipboardImage(e,t){await this.saveClipboardImageRaw(e,t)}},r=function(e){return e.SYSTEM=`SYSTEM`,e.LIGHT=`LIGHT`,e.DARK=`DARK`,e.DRACULA=`DRACULA`,e}({});function ThemeFromJSON(e){return ThemeFromJSONTyped(e,!1)}function ThemeFromJSONTyped(e,t){return e}function BpmnLintFromJSON(e){return BpmnLintFromJSONTyped(e,!1)}function BpmnLintFromJSONTyped(e,t){return e==null?e:{configPath:e.configPath===void 0?void 0:e.configPath===null?null:e.configPath,clientBundlePath:e.clientBundlePath===void 0?void 0:e.clientBundlePath===null?null:e.clientBundlePath}}function ElementTemplateGroupsInnerFromJSON(e){return ElementTemplateGroupsInnerFromJSONTyped(e,!1)}function ElementTemplateGroupsInnerFromJSONTyped(e,t){return e==null?e:{id:e.id,label:e.label,tooltip:e.tooltip===void 0?void 0:e.tooltip===null?null:e.tooltip,openByDefault:e.openByDefault===void 0?void 0:e.openByDefault===null?null:e.openByDefault}}function ElementTemplateFromJSON(e){return ElementTemplateFromJSONTyped(e,!1)}function ElementTemplateFromJSONTyped(e,t){return e==null?e:{$schema:e.$schema===void 0?void 0:e.$schema===null?null:e.$schema,id:e.id,name:e.name,description:e.description===void 0?void 0:e.description===null?null:e.description,version:e.version===void 0?void 0:e.version===null?null:e.version,isDefault:e.isDefault===void 0?void 0:e.isDefault===null?null:e.isDefault,appliesTo:e.appliesTo,elementType:e.elementType===void 0?void 0:e.elementType===null?null:e.elementType,properties:e.properties,groups:e.groups===void 0?void 0:e.groups===null?null:e.groups.map(ElementTemplateGroupsInnerFromJSON),documentationRef:e.documentationRef===void 0?void 0:e.documentationRef===null?null:e.documentationRef,metadata:e.metadata===void 0?void 0:e.metadata===null?null:e.metadata,deprecated:e.deprecated===void 0?void 0:e.deprecated===null?null:e.deprecated,category:e.category===void 0?void 0:e.category===null?null:e.category,icon:e.icon===void 0?void 0:e.icon===null?null:e.icon,engines:e.engines===void 0?void 0:e.engines===null?null:e.engines,keywords:e.keywords===void 0?void 0:e.keywords===null?null:e.keywords,entriesVisible:e.entriesVisible===void 0?void 0:e.entriesVisible===null?null:e.entriesVisible}}function EngineFromJSON(e){return EngineFromJSONTyped(e,!1)}function EngineFromJSONTyped(e,t){return e}function EngineToJSON(e){return e}function ConfigResponseFromJSON(e){return ConfigResponseFromJSONTyped(e,!1)}function ConfigResponseFromJSONTyped(e,t){return e==null?e:{theme:e.theme===void 0?void 0:e.theme===null?null:ThemeFromJSON(e.theme),locale:e.locale===void 0?void 0:e.locale===null?null:e.locale,engine:e.engine===void 0?void 0:e.engine===null?null:EngineFromJSON(e.engine),scriptType:e.scriptType==null?void 0:e.scriptType,bpmnLint:e.bpmnLint===void 0?void 0:e.bpmnLint===null?null:BpmnLintFromJSON(e.bpmnLint),elementTemplates:e.elementTemplates,elementTemplatesContent:e.elementTemplatesContent===void 0?void 0:e.elementTemplatesContent===null?null:e.elementTemplatesContent.map(ElementTemplateFromJSON),elementTemplatesFolder:e.elementTemplatesFolder===void 0?void 0:e.elementTemplatesFolder===null?null:e.elementTemplatesFolder,project:e.project,bpmnFilePath:e.bpmnFilePath,bpmnXml:e.bpmnXml,conventions:e.conventions===void 0?void 0:e.conventions===null?null:e.conventions,pluginVersion:e.pluginVersion===void 0?void 0:e.pluginVersion===null?null:e.pluginVersion,gitUserName:e.gitUserName===void 0?void 0:e.gitUserName===null?null:e.gitUserName}}function ScriptTypeToJSON(e){return e}function ConfigSaveRequestToJSON(e){return ConfigSaveRequestToJSONTyped(e,!1)}function ConfigSaveRequestToJSONTyped(e,t=!1){return e==null?e:{engine:EngineToJSON(e.engine),scriptType:ScriptTypeToJSON(e.scriptType),elementTemplates:e.elementTemplates}}var ConfigApi=class extends n{async getConfigRequestOpts(){return{path:`/api/config`,method:`GET`,headers:{},query:{}}}async getConfigRaw(e){let t=await this.getConfigRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>ConfigResponseFromJSON(e))}async getConfig(e){return await(await this.getConfigRaw(e)).value()}async saveConfigRequestOpts(e){if(e.configSaveRequest==null)throw new RequiredError(`configSaveRequest`,`Required parameter "configSaveRequest" was null or undefined when calling saveConfig().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/config`,method:`POST`,headers:n,query:t,body:ConfigSaveRequestToJSON(e.configSaveRequest)}}async saveConfigRaw(e,t){let n=await this.saveConfigRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async saveConfig(e,t){await this.saveConfigRaw(e,t)}};function ConnectorFetchRequestToJSON(e){return ConnectorFetchRequestToJSONTyped(e,!1)}function ConnectorFetchRequestToJSONTyped(e,t=!1){return e==null?e:{url:e.url}}function ConnectorFetchResponseFromJSON(e){return ConnectorFetchResponseFromJSONTyped(e,!1)}function ConnectorFetchResponseFromJSONTyped(e,t){return e==null?e:{status:e.status,body:e.body,failure:e.failure===void 0?void 0:e.failure===null?null:e.failure}}function ConnectorFileRequestToJSON(e){return ConnectorFileRequestToJSONTyped(e,!1)}function ConnectorFileRequestToJSONTyped(e,t=!1){return e==null?e:{op:e.op,path:e.path,content:e.content,dest:e.dest}}function ConnectorFileResponseFromJSON(e){return ConnectorFileResponseFromJSONTyped(e,!1)}function ConnectorFileResponseFromJSONTyped(e,t){return e==null?e:{content:e.content===void 0?void 0:e.content===null?null:e.content,entries:e.entries===void 0?void 0:e.entries===null?null:e.entries,pathExists:e.pathExists===void 0?void 0:e.pathExists===null?null:e.pathExists}}var ConnectorsApi=class extends n{async connectorFileRequestOpts(e){if(e.connectorFileRequest==null)throw new RequiredError(`connectorFileRequest`,`Required parameter "connectorFileRequest" was null or undefined when calling connectorFile().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/connectors/file`,method:`POST`,headers:n,query:t,body:ConnectorFileRequestToJSON(e.connectorFileRequest)}}async connectorFileRaw(e,t){let n=await this.connectorFileRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>ConnectorFileResponseFromJSON(e))}async connectorFile(e,t){return await(await this.connectorFileRaw(e,t)).value()}async fetchConnectorUrlRequestOpts(e){if(e.connectorFetchRequest==null)throw new RequiredError(`connectorFetchRequest`,`Required parameter "connectorFetchRequest" was null or undefined when calling fetchConnectorUrl().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/connectors/fetch`,method:`POST`,headers:n,query:t,body:ConnectorFetchRequestToJSON(e.connectorFetchRequest)}}async fetchConnectorUrlRaw(e,t){let n=await this.fetchConnectorUrlRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>ConnectorFetchResponseFromJSON(e))}async fetchConnectorUrl(e,t){return await(await this.fetchConnectorUrlRaw(e,t)).value()}};function DeploymentMetaFromJSON(e){return DeploymentMetaFromJSONTyped(e,!1)}function DeploymentMetaFromJSONTyped(e,t){return e==null?e:{name:e.name,source:e.source,tenantId:e.tenantId===void 0?void 0:e.tenantId===null?null:e.tenantId,changedOnly:e.changedOnly,forTests:e.forTests===void 0?void 0:e.forTests===null?null:e.forTests,activationTime:e.activationTime===void 0?void 0:e.activationTime===null?null:e.activationTime}}function DeployTargetFromJSON(e){return DeployTargetFromJSONTyped(e,!1)}function DeployTargetFromJSONTyped(e,t){return e==null?e:{profile:e.profile===void 0?void 0:e.profile===null?null:e.profile,url:e.url===void 0?void 0:e.url===null?null:e.url,ready:e.ready,engine:e.engine==null?void 0:EngineFromJSON(e.engine),deployment:e.deployment==null?void 0:DeploymentMetaFromJSON(e.deployment),lastDeploy:e.lastDeploy==null?void 0:e.lastDeploy}}function DeployTargetsFromJSON(e){return DeployTargetsFromJSONTyped(e,!1)}function DeployTargetsFromJSONTyped(e,t){return e==null?e:{active:e.active===void 0?void 0:e.active===null?null:e.active,targets:e.targets.map(DeployTargetFromJSON)}}var i=function(e){return e.NONE=`none`,e.BASIC=`basic`,e.OAUTH=`oauth`,e}({});function DeploymentSettingsFromJSON(e){return DeploymentSettingsFromJSONTyped(e,!1)}function DeploymentSettingsFromJSONTyped(e,t){return e==null?e:{profile:e.profile===void 0?void 0:e.profile===null?null:e.profile,url:e.url===void 0?void 0:e.url===null?null:e.url,authType:e.authType===void 0?void 0:e.authType===null?null:e.authType,username:e.username===void 0?void 0:e.username===null?null:e.username,clientId:e.clientId===void 0?void 0:e.clientId===null?null:e.clientId,tokenUrl:e.tokenUrl===void 0?void 0:e.tokenUrl===null?null:e.tokenUrl,audience:e.audience===void 0?void 0:e.audience===null?null:e.audience,password:e.password===void 0?void 0:e.password===null?null:e.password,clientSecret:e.clientSecret===void 0?void 0:e.clientSecret===null?null:e.clientSecret,passwordSaved:e.passwordSaved===void 0?void 0:e.passwordSaved===null?null:e.passwordSaved,clientSecretSaved:e.clientSecretSaved===void 0?void 0:e.clientSecretSaved===null?null:e.clientSecretSaved}}function DeploymentSettingsToJSON(e){return DeploymentSettingsToJSONTyped(e,!1)}function DeploymentSettingsToJSONTyped(e,t=!1){return e==null?e:{profile:e.profile,url:e.url,authType:e.authType,username:e.username,clientId:e.clientId,tokenUrl:e.tokenUrl,audience:e.audience,password:e.password,clientSecret:e.clientSecret}}var DeploymentApi=class extends n{async getDeployTargetsRequestOpts(e){let t={};return e.resource!=null&&(t.resource=e.resource),{path:`/api/deploy/targets`,method:`GET`,headers:{},query:t}}async getDeployTargetsRaw(e,t){let n=await this.getDeployTargetsRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>DeployTargetsFromJSON(e))}async getDeployTargets(e={},t){return await(await this.getDeployTargetsRaw(e,t)).value()}async getDeploymentSettingsRequestOpts(e){let t={};return e.profile!=null&&(t.profile=e.profile),{path:`/api/deploy/settings`,method:`GET`,headers:{},query:t}}async getDeploymentSettingsRaw(e,t){let n=await this.getDeploymentSettingsRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>DeploymentSettingsFromJSON(e))}async getDeploymentSettings(e={},t){return await(await this.getDeploymentSettingsRaw(e,t)).value()}async saveDeploymentSettingsRequestOpts(e){if(e.deploymentSettings==null)throw new RequiredError(`deploymentSettings`,`Required parameter "deploymentSettings" was null or undefined when calling saveDeploymentSettings().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/deploy/settings`,method:`POST`,headers:n,query:t,body:DeploymentSettingsToJSON(e.deploymentSettings)}}async saveDeploymentSettingsRaw(e,t){let n=await this.saveDeploymentSettingsRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async saveDeploymentSettings(e,t){await this.saveDeploymentSettingsRaw(e,t)}};function OpenDiffRequestToJSON(e){return OpenDiffRequestToJSONTyped(e,!1)}function OpenDiffRequestToJSONTyped(e,t=!1){return e==null?e:{title:e.title,path:e.path,before:e.before,after:e.after}}var DiffApi=class extends n{async openDiffRequestOpts(e){if(e.openDiffRequest==null)throw new RequiredError(`openDiffRequest`,`Required parameter "openDiffRequest" was null or undefined when calling openDiff().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/diff/open`,method:`POST`,headers:n,query:t,body:OpenDiffRequestToJSON(e.openDiffRequest)}}async openDiffRaw(e,t){let n=await this.openDiffRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async openDiff(e,t){await this.openDiffRaw(e,t)}},a=function(e){return e.OPEN=`OPEN`,e.SAVE=`SAVE`,e}({});function FileChooserModeToJSON(e){return e}function FileChooserRequestToJSON(e){return FileChooserRequestToJSONTyped(e,!1)}function FileChooserRequestToJSONTyped(e,t=!1){return e==null?e:{title:e.title,description:e.description,extension:e.extension,mode:FileChooserModeToJSON(e.mode),selectFiles:e.selectFiles,selectFolders:e.selectFolders,multiSelect:e.multiSelect,defaultFileName:e.defaultFileName,defaultDirectory:e.defaultDirectory,recursive:e.recursive}}function FileChooserResponseFromJSON(e){return FileChooserResponseFromJSONTyped(e,!1)}function FileChooserResponseFromJSONTyped(e,t){return e==null?e:{success:e.success,paths:e.paths}}var FileChooserApi=class extends n{async chooseFileRequestOpts(e){if(e.fileChooserRequest==null)throw new RequiredError(`fileChooserRequest`,`Required parameter "fileChooserRequest" was null or undefined when calling chooseFile().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/file/choose`,method:`POST`,headers:n,query:t,body:FileChooserRequestToJSON(e.fileChooserRequest)}}async chooseFileRaw(e,t){let n=await this.chooseFileRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>FileChooserResponseFromJSON(e))}async chooseFile(e,t){return await(await this.chooseFileRaw(e,t)).value()}};function FileReadRequestToJSON(e){return FileReadRequestToJSONTyped(e,!1)}function FileReadRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,asBase64:e.asBase64}}function FileReadResponseFromJSON(e){return FileReadResponseFromJSONTyped(e,!1)}function FileReadResponseFromJSONTyped(e,t){return e==null?e:{content:e.content,isBase64:e.isBase64===void 0?void 0:e.isBase64===null?null:e.isBase64}}var FileReaderApi=class extends n{async readFileRequestOpts(e){if(e.fileReadRequest==null)throw new RequiredError(`fileReadRequest`,`Required parameter "fileReadRequest" was null or undefined when calling readFile().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/file/read`,method:`POST`,headers:n,query:t,body:FileReadRequestToJSON(e.fileReadRequest)}}async readFileRaw(e,t){let n=await this.readFileRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>FileReadResponseFromJSON(e))}async readFile(e,t){return await(await this.readFileRaw(e,t)).value()}};function NewProjectFileToJSON(e){return NewProjectFileToJSONTyped(e,!1)}function NewProjectFileToJSONTyped(e,t=!1){return e==null?e:{path:e.path,content:e.content}}function CreateProjectFilesRequestToJSON(e){return CreateProjectFilesRequestToJSONTyped(e,!1)}function CreateProjectFilesRequestToJSONTyped(e,t=!1){return e==null?e:{root:e.root,files:e.files.map(NewProjectFileToJSON)}}function FileSaveRequestToJSON(e){return FileSaveRequestToJSONTyped(e,!1)}function FileSaveRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,content:e.content,isBase64:e.isBase64}}var FileSaverApi=class extends n{async createProjectFilesRequestOpts(e){if(e.createProjectFilesRequest==null)throw new RequiredError(`createProjectFilesRequest`,`Required parameter "createProjectFilesRequest" was null or undefined when calling createProjectFiles().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/file/create-project-files`,method:`POST`,headers:n,query:t,body:CreateProjectFilesRequestToJSON(e.createProjectFilesRequest)}}async createProjectFilesRaw(e,t){let n=await this.createProjectFilesRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async createProjectFiles(e,t){await this.createProjectFilesRaw(e,t)}async saveFileRequestOpts(e){if(e.fileSaveRequest==null)throw new RequiredError(`fileSaveRequest`,`Required parameter "fileSaveRequest" was null or undefined when calling saveFile().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/file/save`,method:`POST`,headers:n,query:t,body:FileSaveRequestToJSON(e.fileSaveRequest)}}async saveFileRaw(e,t){let n=await this.saveFileRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async saveFile(e,t){await this.saveFileRaw(e,t)}};function CodeHandlesToJSON(e){return CodeHandlesToJSONTyped(e,!1)}function CodeHandlesToJSONTyped(e,t=!1){return e==null?e:{handles:e.handles,title:e.title,usages:e.usages}}function DebugPositionDtoFromJSON(e){return DebugPositionDtoFromJSONTyped(e,!1)}function DebugPositionDtoFromJSONTyped(e,t){return e==null?e:{path:e.path,processId:e.processId==null?void 0:e.processId,current:e.current,active:e.active,instance:e.instance==null?void 0:e.instance,source:e.source}}function DebugStateFromJSON(e){return DebugStateFromJSONTyped(e,!1)}function DebugStateFromJSONTyped(e,t){return e==null?e:{positions:e.positions.map(DebugPositionDtoFromJSON)}}function DeploymentRecordToJSON(e){return DeploymentRecordToJSONTyped(e,!1)}function DeploymentRecordToJSONTyped(e,t=!1){return e==null?e:{profile:e.profile,resources:e.resources}}function DialogButtonOrderFromJSON(e){return DialogButtonOrderFromJSONTyped(e,!1)}function DialogButtonOrderFromJSONTyped(e,t){return e==null?e:{primary:e.primary}}function EnginePartToJSON(e){return EnginePartToJSONTyped(e,!1)}function EnginePartToJSONTyped(e,t=!1){return e==null?e:{name:e.name,filename:e.filename,contentType:e.contentType,content:e.content}}var o=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.PATCH=`PATCH`,e.DELETE=`DELETE`,e}({});function EngineRequestToJSON(e){return EngineRequestToJSONTyped(e,!1)}function EngineRequestToJSONTyped(e,t=!1){return e==null?e:{profile:e.profile,resource:e.resource,parts:e.parts==null?void 0:e.parts.map(EnginePartToJSON),method:e.method,path:e.path,body:e.body,testRun:e.testRun}}function EngineResponseFromJSON(e){return EngineResponseFromJSONTyped(e,!1)}function EngineResponseFromJSONTyped(e,t){return e==null?e:{status:e.status,body:e.body,url:e.url}}function ExternalLinkToJSON(e){return ExternalLinkToJSONTyped(e,!1)}function ExternalLinkToJSONTyped(e,t=!1){return e==null?e:{url:e.url}}var s=function(e){return e.PRE_DEPLOY=`preDeploy`,e.POST_DEPLOY=`postDeploy`,e}({});function HookRequestToJSON(e){return HookRequestToJSONTyped(e,!1)}function HookRequestToJSONTyped(e,t=!1){return e==null?e:{stage:e.stage,resources:e.resources,profile:e.profile,resource:e.resource}}function HookStartedFromJSON(e){return HookStartedFromJSONTyped(e,!1)}function HookStartedFromJSONTyped(e,t){return e==null?e:{run:e.run}}var c=function(e){return e.RUNNING=`running`,e.FINISHED=`finished`,e.CANCELLED=`cancelled`,e}({});function HookStateFromJSON(e){return HookStateFromJSONTyped(e,!1)}function HookStateFromJSONTyped(e,t){return e==null?e:{run:e.run,status:e.status,ok:e.ok,lines:e.lines}}function HostAnswerFromJSON(e){return HostAnswerFromJSONTyped(e,!1)}function HostAnswerFromJSONTyped(e,t){return e==null?e:{accepted:e.accepted}}function HostMessageToJSON(e){return HostMessageToJSONTyped(e,!1)}function HostMessageToJSONTyped(e,t=!1){return e==null?e:{text:e.text,error:e.error}}function HostQuestionToJSON(e){return HostQuestionToJSONTyped(e,!1)}function HostQuestionToJSONTyped(e,t=!1){return e==null?e:{title:e.title,text:e.text,accept:e.accept,decline:e.decline,warning:e.warning}}var l=function(e){return e.PROCESS=`PROCESS`,e.JOB_TYPE=`JOB_TYPE`,e.TOPIC=`TOPIC`,e.MESSAGE=`MESSAGE`,e.SIGNAL=`SIGNAL`,e.DECISION=`DECISION`,e.FORM=`FORM`,e.CLASS=`CLASS`,e.BEAN=`BEAN`,e.ERROR=`ERROR`,e}({});function LinkedRenameKindToJSON(e){return e}function LinkedRenameOfferToJSON(e){return LinkedRenameOfferToJSONTyped(e,!1)}function LinkedRenameOfferToJSONTyped(e,t=!1){return e==null?e:{kind:LinkedRenameKindToJSON(e.kind),from:e.from,to:e.to,path:e.path}}function LinkedRenamePlacesFromJSON(e){return LinkedRenamePlacesFromJSONTyped(e,!1)}function LinkedRenamePlacesFromJSONTyped(e,t){return e==null?e:{places:e.places,offered:e.offered,summary:e.summary==null?void 0:e.summary,detail:e.detail==null?void 0:e.detail}}function MigrationAnswerFromJSON(e){return MigrationAnswerFromJSONTyped(e,!1)}function MigrationAnswerFromJSONTyped(e,t){return e==null?e:{answer:e.answer,folder:e.folder===void 0?void 0:e.folder===null?null:e.folder,replace:e.replace===void 0?void 0:e.replace===null?null:e.replace}}function MigrationChangeToJSON(e){return MigrationChangeToJSONTyped(e,!1)}function MigrationChangeToJSONTyped(e,t=!1){return e==null?e:{where:e.where,before:e.before,after:e.after,plain:e.plain}}function MigrationOpenToJSON(e){return MigrationOpenToJSONTyped(e,!1)}function MigrationOpenToJSONTyped(e,t=!1){return e==null?e:{where:e.where,title:e.title,action:e.action,manual:e.manual}}function MigrationPreviewToJSON(e){return MigrationPreviewToJSONTyped(e,!1)}function MigrationPreviewToJSONTyped(e,t=!1){return e==null?e:{name:e.name,kind:e.kind,beforeText:e.beforeText,afterText:e.afterText,folder:e.folder,files:e.files,target:e.target,changes:e.changes.map(MigrationChangeToJSON),open:e.open.map(MigrationOpenToJSON)}}function RevealRequestToJSON(e){return RevealRequestToJSONTyped(e,!1)}function RevealRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,elementId:e.elementId,text:e.text,line:e.line}}function RunTraceToJSON(e){return RunTraceToJSONTyped(e,!1)}function RunTraceToJSONTyped(e,t=!1){return e==null?e:{runId:e.runId,name:e.name,content:e.content}}function RunTraceSavedFromJSON(e){return RunTraceSavedFromJSONTyped(e,!1)}function RunTraceSavedFromJSONTyped(e,t){return e==null?e:{path:e.path}}function TestHandlesToJSON(e){return TestHandlesToJSONTyped(e,!1)}function TestHandlesToJSONTyped(e,t=!1){return e==null?e:{handles:e.handles,title:e.title,debug:e.debug}}function TestOutputToJSON(e){return TestOutputToJSONTyped(e,!1)}function TestOutputToJSONTyped(e,t=!1){return e==null?e:{run:e.run,lines:e.lines,finished:e.finished}}var HostApi=class extends n{async askEngineRequestOpts(e){if(e.engineRequest==null)throw new RequiredError(`engineRequest`,`Required parameter "engineRequest" was null or undefined when calling askEngine().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/engine`,method:`POST`,headers:n,query:t,body:EngineRequestToJSON(e.engineRequest)}}async askEngineRaw(e,t){let n=await this.askEngineRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>EngineResponseFromJSON(e))}async askEngine(e,t){return await(await this.askEngineRaw(e,t)).value()}async cancelHookRequestOpts(e){if(e.run==null)throw new RequiredError(`run`,`Required parameter "run" was null or undefined when calling cancelHook().`);let t={},n={},r=`/api/host/hook/{run}`;return r=r.replace(`{run}`,encodeURIComponent(String(e.run))),{path:r,method:`DELETE`,headers:n,query:t}}async cancelHookRaw(e,t){let n=await this.cancelHookRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async cancelHook(e,t){await this.cancelHookRaw(e,t)}async confirmWithUserRequestOpts(e){if(e.hostQuestion==null)throw new RequiredError(`hostQuestion`,`Required parameter "hostQuestion" was null or undefined when calling confirmWithUser().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/confirm`,method:`POST`,headers:n,query:t,body:HostQuestionToJSON(e.hostQuestion)}}async confirmWithUserRaw(e,t){let n=await this.confirmWithUserRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>HostAnswerFromJSON(e))}async confirmWithUser(e,t){return await(await this.confirmWithUserRaw(e,t)).value()}async getDebugStateRequestOpts(){return{path:`/api/debug/state`,method:`GET`,headers:{},query:{}}}async getDebugStateRaw(e){let t=await this.getDebugStateRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>DebugStateFromJSON(e))}async getDebugState(e){return await(await this.getDebugStateRaw(e)).value()}async getDialogButtonOrderRequestOpts(){return{path:`/api/host/dialog-order`,method:`GET`,headers:{},query:{}}}async getDialogButtonOrderRaw(e){let t=await this.getDialogButtonOrderRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>DialogButtonOrderFromJSON(e))}async getDialogButtonOrder(e){return await(await this.getDialogButtonOrderRaw(e)).value()}async getMigrationAnswerRequestOpts(){return{path:`/api/host/migration-answer`,method:`GET`,headers:{},query:{}}}async getMigrationAnswerRaw(e){let t=await this.getMigrationAnswerRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>MigrationAnswerFromJSON(e))}async getMigrationAnswer(e){return await(await this.getMigrationAnswerRaw(e)).value()}async hookStateRequestOpts(e){if(e.run==null)throw new RequiredError(`run`,`Required parameter "run" was null or undefined when calling hookState().`);let t={},n={},r=`/api/host/hook/{run}`;return r=r.replace(`{run}`,encodeURIComponent(String(e.run))),{path:r,method:`GET`,headers:n,query:t}}async hookStateRaw(e,t){let n=await this.hookStateRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>HookStateFromJSON(e))}async hookState(e,t){return await(await this.hookStateRaw(e,t)).value()}async notifyUserRequestOpts(e){if(e.hostMessage==null)throw new RequiredError(`hostMessage`,`Required parameter "hostMessage" was null or undefined when calling notifyUser().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/notify`,method:`POST`,headers:n,query:t,body:HostMessageToJSON(e.hostMessage)}}async notifyUserRaw(e,t){let n=await this.notifyUserRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async notifyUser(e,t){await this.notifyUserRaw(e,t)}async offerLinkedRenameRequestOpts(e){if(e.linkedRenameOffer==null)throw new RequiredError(`linkedRenameOffer`,`Required parameter "linkedRenameOffer" was null or undefined when calling offerLinkedRename().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/linked-rename`,method:`POST`,headers:n,query:t,body:LinkedRenameOfferToJSON(e.linkedRenameOffer)}}async offerLinkedRenameRaw(e,t){let n=await this.offerLinkedRenameRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>LinkedRenamePlacesFromJSON(e))}async offerLinkedRename(e,t){return await(await this.offerLinkedRenameRaw(e,t)).value()}async openCodeRequestOpts(e){if(e.codeHandles==null)throw new RequiredError(`codeHandles`,`Required parameter "codeHandles" was null or undefined when calling openCode().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/open-code`,method:`POST`,headers:n,query:t,body:CodeHandlesToJSON(e.codeHandles)}}async openCodeRaw(e,t){let n=await this.openCodeRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async openCode(e,t){await this.openCodeRaw(e,t)}async openExternalLinkRequestOpts(e){if(e.externalLink==null)throw new RequiredError(`externalLink`,`Required parameter "externalLink" was null or undefined when calling openExternalLink().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/open-link`,method:`POST`,headers:n,query:t,body:ExternalLinkToJSON(e.externalLink)}}async openExternalLinkRaw(e,t){let n=await this.openExternalLinkRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async openExternalLink(e,t){await this.openExternalLinkRaw(e,t)}async previewMigrationRequestOpts(e){if(e.migrationPreview==null)throw new RequiredError(`migrationPreview`,`Required parameter "migrationPreview" was null or undefined when calling previewMigration().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/migration-preview`,method:`POST`,headers:n,query:t,body:MigrationPreviewToJSON(e.migrationPreview)}}async previewMigrationRaw(e,t){let n=await this.previewMigrationRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>MigrationAnswerFromJSON(e))}async previewMigration(e,t){return await(await this.previewMigrationRaw(e,t)).value()}async recordDeploymentRequestOpts(e){if(e.deploymentRecord==null)throw new RequiredError(`deploymentRecord`,`Required parameter "deploymentRecord" was null or undefined when calling recordDeployment().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/deployed`,method:`POST`,headers:n,query:t,body:DeploymentRecordToJSON(e.deploymentRecord)}}async recordDeploymentRaw(e,t){let n=await this.recordDeploymentRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async recordDeployment(e,t){await this.recordDeploymentRaw(e,t)}async revealElementRequestOpts(e){if(e.revealRequest==null)throw new RequiredError(`revealRequest`,`Required parameter "revealRequest" was null or undefined when calling revealElement().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/reveal`,method:`POST`,headers:n,query:t,body:RevealRequestToJSON(e.revealRequest)}}async revealElementRaw(e,t){let n=await this.revealElementRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async revealElement(e,t){await this.revealElementRaw(e,t)}async runHookRequestOpts(e){if(e.hookRequest==null)throw new RequiredError(`hookRequest`,`Required parameter "hookRequest" was null or undefined when calling runHook().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/hook`,method:`POST`,headers:n,query:t,body:HookRequestToJSON(e.hookRequest)}}async runHookRaw(e,t){let n=await this.runHookRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>HookStartedFromJSON(e))}async runHook(e,t){return await(await this.runHookRaw(e,t)).value()}async runTestHandlesRequestOpts(e){if(e.testHandles==null)throw new RequiredError(`testHandles`,`Required parameter "testHandles" was null or undefined when calling runTestHandles().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/run-tests`,method:`POST`,headers:n,query:t,body:TestHandlesToJSON(e.testHandles)}}async runTestHandlesRaw(e,t){let n=await this.runTestHandlesRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async runTestHandles(e,t){await this.runTestHandlesRaw(e,t)}async saveRunTraceRequestOpts(e){if(e.runTrace==null)throw new RequiredError(`runTrace`,`Required parameter "runTrace" was null or undefined when calling saveRunTrace().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/run-trace`,method:`POST`,headers:n,query:t,body:RunTraceToJSON(e.runTrace)}}async saveRunTraceRaw(e,t){let n=await this.saveRunTraceRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>RunTraceSavedFromJSON(e))}async saveRunTrace(e,t){return await(await this.saveRunTraceRaw(e,t)).value()}async sendTestOutputRequestOpts(e){if(e.testOutput==null)throw new RequiredError(`testOutput`,`Required parameter "testOutput" was null or undefined when calling sendTestOutput().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/host/test-output`,method:`POST`,headers:n,query:t,body:TestOutputToJSON(e.testOutput)}}async sendTestOutputRaw(e,t){let n=await this.sendTestOutputRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async sendTestOutput(e,t){await this.sendTestOutputRaw(e,t)}},u=function(e){return e.AUTO_LAYOUT=`AUTO_LAYOUT`,e.CODE_LINKS=`CODE_LINKS`,e.CONVENTIONS=`CONVENTIONS`,e.FLOW_ANALYSIS=`FLOW_ANALYSIS`,e.MIGRATION=`MIGRATION`,e.TEST_RUNS=`TEST_RUNS`,e.AI_CHAT=`AI_CHAT`,e.VARIABLE_CHECKS=`VARIABLE_CHECKS`,e}({});function PaidFeatureToJSON(e){return e}function FeatureRequestToJSON(e){return FeatureRequestToJSONTyped(e,!1)}function FeatureRequestToJSONTyped(e,t=!1){return e==null?e:{feature:PaidFeatureToJSON(e.feature)}}function FeatureResponseFromJSON(e){return FeatureResponseFromJSONTyped(e,!1)}function FeatureResponseFromJSONTyped(e,t){return e==null?e:{allowed:e.allowed,token:e.token===void 0?void 0:e.token===null?null:e.token}}function LicenceOfferRequestToJSON(e){return LicenceOfferRequestToJSONTyped(e,!1)}function LicenceOfferRequestToJSONTyped(e,t=!1){return e==null?e:{reason:e.reason,surface:e.surface}}function LicenceOfferResponseFromJSON(e){return LicenceOfferResponseFromJSONTyped(e,!1)}function LicenceOfferResponseFromJSONTyped(e,t){return e==null?e:{opened:e.opened}}function LicenseTierFromJSON(e){return LicenseTierFromJSONTyped(e,!1)}function LicenseTierFromJSONTyped(e,t){return e}function LicenseStatusFromJSON(e){return LicenseStatusFromJSONTyped(e,!1)}function LicenseStatusFromJSONTyped(e,t){return e==null?e:{tier:LicenseTierFromJSON(e.tier),detail:e.detail,trialDaysLeft:e.trialDaysLeft===void 0?void 0:e.trialDaysLeft===null?null:e.trialDaysLeft,trialEndsAt:e.trialEndsAt===void 0?void 0:e.trialEndsAt===null?null:parseDateTime(e.trialEndsAt),token:e.token===void 0?void 0:e.token===null?null:e.token,machine:e.machine}}var LicenseApi=class extends n{async getLicenseRequestOpts(){return{path:`/api/license`,method:`GET`,headers:{},query:{}}}async getLicenseRaw(e){let t=await this.getLicenseRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>LicenseStatusFromJSON(e))}async getLicense(e){return await(await this.getLicenseRaw(e)).value()}async requestFeatureRequestOpts(e){if(e.featureRequest==null)throw new RequiredError(`featureRequest`,`Required parameter "featureRequest" was null or undefined when calling requestFeature().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/license/feature`,method:`POST`,headers:n,query:t,body:FeatureRequestToJSON(e.featureRequest)}}async requestFeatureRaw(e,t){let n=await this.requestFeatureRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>FeatureResponseFromJSON(e))}async requestFeature(e,t){return await(await this.requestFeatureRaw(e,t)).value()}async showLicenceOfferRequestOpts(e){if(e.licenceOfferRequest==null)throw new RequiredError(`licenceOfferRequest`,`Required parameter "licenceOfferRequest" was null or undefined when calling showLicenceOffer().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/license/offer`,method:`POST`,headers:n,query:t,body:LicenceOfferRequestToJSON(e.licenceOfferRequest)}}async showLicenceOfferRaw(e,t){let n=await this.showLicenceOfferRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>LicenceOfferResponseFromJSON(e))}async showLicenceOffer(e,t){return await(await this.showLicenceOfferRaw(e,t)).value()}};function ReferenceKindToJSON(e){return e}function ClassNavigationRequestToJSON(e){return ClassNavigationRequestToJSONTyped(e,!1)}function ClassNavigationRequestToJSONTyped(e,t=!1){return e==null?e:{reference:e.reference,kind:ReferenceKindToJSON(e.kind)}}var NavigationApi=class extends n{async navigateToClassRequestOpts(e){if(e.classNavigationRequest==null)throw new RequiredError(`classNavigationRequest`,`Required parameter "classNavigationRequest" was null or undefined when calling navigateToClass().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/navigate/class`,method:`POST`,headers:n,query:t,body:ClassNavigationRequestToJSON(e.classNavigationRequest)}}async navigateToClassRaw(e,t){let n=await this.navigateToClassRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async navigateToClass(e,t){await this.navigateToClassRaw(e,t)}};function NudgesFromJSON(e){return NudgesFromJSONTyped(e,!1)}function NudgesFromJSONTyped(e,t){return e==null?e:{off:e.off===void 0?void 0:e.off===null?null:e.off,existingUser:e.existingUser===void 0?void 0:e.existingUser===null?null:e.existingUser,shown:e.shown==null?void 0:e.shown,dismissed:e.dismissed==null?void 0:e.dismissed,snoozedUntil:e.snoozedUntil==null?void 0:e.snoozedUntil}}function NudgesToJSON(e){return NudgesToJSONTyped(e,!1)}function NudgesToJSONTyped(e,t=!1){return e==null?e:{off:e.off,existingUser:e.existingUser,shown:e.shown,dismissed:e.dismissed,snoozedUntil:e.snoozedUntil}}function WebSessionFromJSON(e){return WebSessionFromJSONTyped(e,!1)}function WebSessionFromJSONTyped(e,t){return e==null?e:{tabs:e.tabs==null?void 0:e.tabs,active:e.active===void 0?void 0:e.active===null?null:e.active,split:e.split===void 0?void 0:e.split===null?null:e.split,ratio:e.ratio===void 0?void 0:e.ratio===null?null:e.ratio,expanded:e.expanded==null?void 0:e.expanded,recent:e.recent==null?void 0:e.recent,dock:e.dock===void 0?void 0:e.dock===null?null:e.dock,toolOpen:e.toolOpen==null?void 0:e.toolOpen,toolShut:e.toolShut==null?void 0:e.toolShut}}function WebSessionToJSON(e){return WebSessionToJSONTyped(e,!1)}function WebSessionToJSONTyped(e,t=!1){return e==null?e:{tabs:e.tabs,active:e.active,split:e.split,ratio:e.ratio,expanded:e.expanded,recent:e.recent,dock:e.dock,toolOpen:e.toolOpen,toolShut:e.toolShut}}function EditorSidebarFromJSON(e){return EditorSidebarFromJSONTyped(e,!1)}function EditorSidebarFromJSONTyped(e,t){return e==null?e:{tab:e.tab===void 0?void 0:e.tab===null?null:e.tab,hidden:e.hidden===void 0?void 0:e.hidden===null?null:e.hidden,collapsed:e.collapsed===void 0?void 0:e.collapsed===null?null:e.collapsed}}function EditorSidebarToJSON(e){return EditorSidebarToJSONTyped(e,!1)}function EditorSidebarToJSONTyped(e,t=!1){return e==null?e:{tab:e.tab,hidden:e.hidden,collapsed:e.collapsed}}function PreferencesSidebarByEditorFromJSON(e){return PreferencesSidebarByEditorFromJSONTyped(e,!1)}function PreferencesSidebarByEditorFromJSONTyped(e,t){return e==null?e:{bpmn:e.bpmn===void 0?void 0:e.bpmn===null?null:EditorSidebarFromJSON(e.bpmn),dmn:e.dmn===void 0?void 0:e.dmn===null?null:EditorSidebarFromJSON(e.dmn),form:e.form===void 0?void 0:e.form===null?null:EditorSidebarFromJSON(e.form)}}function PreferencesSidebarByEditorToJSON(e){return PreferencesSidebarByEditorToJSONTyped(e,!1)}function PreferencesSidebarByEditorToJSONTyped(e,t=!1){return e==null?e:{bpmn:EditorSidebarToJSON(e.bpmn),dmn:EditorSidebarToJSON(e.dmn),form:EditorSidebarToJSON(e.form)}}function LanguageServerConfigFromJSON(e){return LanguageServerConfigFromJSONTyped(e,!1)}function LanguageServerConfigFromJSONTyped(e,t){return e==null?e:{id:e.id,languages:e.languages,command:e.command,args:e.args===void 0?void 0:e.args===null?null:e.args,env:e.env===void 0?void 0:e.env===null?null:e.env}}function LanguageServerConfigToJSON(e){return LanguageServerConfigToJSONTyped(e,!1)}function LanguageServerConfigToJSONTyped(e,t=!1){return e==null?e:{id:e.id,languages:e.languages,command:e.command,args:e.args,env:e.env}}function CustomAgentFromJSON(e){return CustomAgentFromJSONTyped(e,!1)}function CustomAgentFromJSONTyped(e,t){return e==null?e:{id:e.id,name:e.name,command:e.command,args:e.args==null?void 0:e.args,env:e.env==null?void 0:e.env}}function CustomAgentToJSON(e){return CustomAgentToJSONTyped(e,!1)}function CustomAgentToJSONTyped(e,t=!1){return e==null?e:{id:e.id,name:e.name,command:e.command,args:e.args,env:e.env}}var d=function(e){return e.OFF=`off`,e.BOTTOM=`bottom`,e.SIDEBAR=`sidebar`,e}({});function PreferencesFromJSON(e){return PreferencesFromJSONTyped(e,!1)}function PreferencesFromJSONTyped(e,t){return e==null?e:{recentActions:e.recentActions==null?void 0:e.recentActions,toolbarPinned:e.toolbarPinned==null?void 0:e.toolbarPinned,toolbarUnpinned:e.toolbarUnpinned==null?void 0:e.toolbarUnpinned,rendering:e.rendering===void 0?void 0:e.rendering===null?null:e.rendering,theme:e.theme===void 0?void 0:e.theme===null?null:e.theme,toolWindowTree:e.toolWindowTree===void 0?void 0:e.toolWindowTree===null?null:e.toolWindowTree,toolWindowGroupByFiles:e.toolWindowGroupByFiles===void 0?void 0:e.toolWindowGroupByFiles===null?null:e.toolWindowGroupByFiles,tourSeen:e.tourSeen===void 0?void 0:e.tourSeen===null?null:e.tourSeen,nudges:e.nudges==null?void 0:NudgesFromJSON(e.nudges),sidebarWidth:e.sidebarWidth===void 0?void 0:e.sidebarWidth===null?null:e.sidebarWidth,projectTreeWidth:e.projectTreeWidth===void 0?void 0:e.projectTreeWidth===null?null:e.projectTreeWidth,projectTreeHidden:e.projectTreeHidden===void 0?void 0:e.projectTreeHidden===null?null:e.projectTreeHidden,paletteCollapsed:e.paletteCollapsed===void 0?void 0:e.paletteCollapsed===null?null:e.paletteCollapsed,webSessions:e.webSessions===void 0?void 0:e.webSessions===null?null:mapValues(e.webSessions,WebSessionFromJSON),webAutosaveSeconds:e.webAutosaveSeconds===void 0?void 0:e.webAutosaveSeconds===null?null:e.webAutosaveSeconds,languageServers:e.languageServers===void 0?void 0:e.languageServers===null?null:e.languageServers.map(LanguageServerConfigFromJSON),sidebarByEditor:e.sidebarByEditor==null?void 0:PreferencesSidebarByEditorFromJSON(e.sidebarByEditor),showCommentBadges:e.showCommentBadges===void 0?void 0:e.showCommentBadges===null?null:e.showCommentBadges,showCodeBadges:e.showCodeBadges===void 0?void 0:e.showCodeBadges===null?null:e.showCodeBadges,suggestNextBlock:e.suggestNextBlock===void 0?void 0:e.suggestNextBlock===null?null:e.suggestNextBlock,suggestions:e.suggestions===void 0?void 0:e.suggestions===null?null:e.suggestions,locale:e.locale===void 0?void 0:e.locale===null?null:e.locale,agents:e.agents==null?void 0:e.agents.map(CustomAgentFromJSON),agentSelected:e.agentSelected===void 0?void 0:e.agentSelected===null?null:e.agentSelected,aiChat:e.aiChat===void 0?void 0:e.aiChat===null?null:e.aiChat,agentsEnabled:e.agentsEnabled===void 0?void 0:e.agentsEnabled===null?null:e.agentsEnabled,agentOptions:e.agentOptions===void 0?void 0:e.agentOptions===null?null:e.agentOptions}}function PreferencesToJSON(e){return PreferencesToJSONTyped(e,!1)}function PreferencesToJSONTyped(e,t=!1){return e==null?e:{recentActions:e.recentActions,toolbarPinned:e.toolbarPinned,toolbarUnpinned:e.toolbarUnpinned,rendering:e.rendering,theme:e.theme,toolWindowTree:e.toolWindowTree,toolWindowGroupByFiles:e.toolWindowGroupByFiles,tourSeen:e.tourSeen,nudges:NudgesToJSON(e.nudges),sidebarWidth:e.sidebarWidth,projectTreeWidth:e.projectTreeWidth,projectTreeHidden:e.projectTreeHidden,paletteCollapsed:e.paletteCollapsed,webSessions:e.webSessions==null?void 0:mapValues(e.webSessions,WebSessionToJSON),webAutosaveSeconds:e.webAutosaveSeconds,languageServers:e.languageServers==null?void 0:e.languageServers.map(LanguageServerConfigToJSON),sidebarByEditor:PreferencesSidebarByEditorToJSON(e.sidebarByEditor),showCommentBadges:e.showCommentBadges,showCodeBadges:e.showCodeBadges,suggestNextBlock:e.suggestNextBlock,suggestions:e.suggestions,locale:e.locale,agents:e.agents==null?void 0:e.agents.map(CustomAgentToJSON),agentSelected:e.agentSelected,aiChat:e.aiChat,agentsEnabled:e.agentsEnabled,agentOptions:e.agentOptions}}var PreferencesApi=class extends n{async getPreferencesRequestOpts(){return{path:`/api/preferences`,method:`GET`,headers:{},query:{}}}async getPreferencesRaw(e){let t=await this.getPreferencesRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>PreferencesFromJSON(e))}async getPreferences(e){return await(await this.getPreferencesRaw(e)).value()}async savePreferencesRequestOpts(e){if(e.preferences==null)throw new RequiredError(`preferences`,`Required parameter "preferences" was null or undefined when calling savePreferences().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/preferences`,method:`PUT`,headers:n,query:t,body:PreferencesToJSON(e.preferences)}}async savePreferencesRaw(e,t){let n=await this.savePreferencesRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>PreferencesFromJSON(e))}async savePreferences(e,t){return await(await this.savePreferencesRaw(e,t)).value()}};function PreviewDiffResponseFromJSON(e){return PreviewDiffResponseFromJSONTyped(e,!1)}function PreviewDiffResponseFromJSONTyped(e,t){return e==null?e:{beforeXml:e.beforeXml,afterXml:e.afterXml}}var PreviewApi=class extends n{async getPreviewDiffRequestOpts(){return{path:`/api/preview-diff`,method:`GET`,headers:{},query:{}}}async getPreviewDiffRaw(e){let t=await this.getPreviewDiffRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>PreviewDiffResponseFromJSON(e))}async getPreviewDiff(e){return await(await this.getPreviewDiffRaw(e)).value()}};function CamundaImportsFromJSON(e){return CamundaImportsFromJSONTyped(e,!1)}function CamundaImportsFromJSONTyped(e,t){return e==null?e:{path:e.path,names:e.names}}function DelegateErrorFromJSON(e){return DelegateErrorFromJSONTyped(e,!1)}function DelegateErrorFromJSONTyped(e,t){return e==null?e:{code:e.code,message:e.message==null?void 0:e.message}}function ClassFactsFromJSON(e){return ClassFactsFromJSONTyped(e,!1)}function ClassFactsFromJSONTyped(e,t){return e==null?e:{path:e.path,offset:e.offset,end:e.end,line:e.line,className:e.className,packageName:e.packageName===void 0?void 0:e.packageName===null?null:e.packageName,shape:e.shape,reads:e.reads,writes:e.writes,errors:e.errors.map(DelegateErrorFromJSON),usesBusinessKey:e.usesBusinessKey,usesEngineServices:e.usesEngineServices,readsAllVariables:e.readsAllVariables}}function WorkerInputFromJSON(e){return WorkerInputFromJSONTyped(e,!1)}function WorkerInputFromJSONTyped(e,t){return e==null?e:{name:e.name,type:e.type,choices:e.choices==null?void 0:e.choices}}function WorkerContractFromJSON(e){return WorkerContractFromJSONTyped(e,!1)}function WorkerContractFromJSONTyped(e,t){return e==null?e:{binding:e.binding,value:e.value,engine:e.engine,source:e.source,name:e.name,className:e.className===void 0?void 0:e.className===null?null:e.className,packageName:e.packageName===void 0?void 0:e.packageName===null?null:e.packageName,inputs:e.inputs.map(WorkerInputFromJSON),outputs:e.outputs.map(WorkerInputFromJSON),errors:e.errors,file:e.file,line:e.line,offset:e.offset,end:e.end}}function CodeFactSetFromJSON(e){return CodeFactSetFromJSONTyped(e,!1)}function CodeFactSetFromJSONTyped(e,t){return e==null?e:{workers:e.workers.map(WorkerContractFromJSON),classes:e.classes.map(ClassFactsFromJSON),camunda7Imports:e.camunda7Imports.map(CamundaImportsFromJSON)}}function ProjectNameFromJSON(e){return ProjectNameFromJSONTyped(e,!1)}function ProjectNameFromJSONTyped(e,t){return e==null?e:{kind:e.kind,value:e.value,origin:e.origin}}var f=function(e){return e.PROCESS=`PROCESS`,e.ELEMENT=`ELEMENT`,e.JOB_TYPE=`JOB_TYPE`,e.TOPIC=`TOPIC`,e.MESSAGE=`MESSAGE`,e.SIGNAL=`SIGNAL`,e.DECISION=`DECISION`,e.FORM=`FORM`,e.CLASS=`CLASS`,e.BEAN=`BEAN`,e.VARIABLE=`VARIABLE`,e.ERROR=`ERROR`,e}({});function ModelTargetKindFromJSON(e){return ModelTargetKindFromJSONTyped(e,!1)}function ModelTargetKindFromJSONTyped(e,t){return e}function ModelTargetKindToJSON(e){return e}function CodeSiteFromJSON(e){return CodeSiteFromJSONTyped(e,!1)}function CodeSiteFromJSONTyped(e,t){return e==null?e:{path:e.path,line:e.line,offset:e.offset}}function CodeLinkFromJSON(e){return CodeLinkFromJSONTyped(e,!1)}function CodeLinkFromJSONTyped(e,t){return e==null?e:{handle:e.handle,label:e.label,icon:e.icon,implementation:e.implementation,test:e.test,declaration:e.declaration==null?void 0:e.declaration}}function CodeResultFromJSON(e){return CodeResultFromJSONTyped(e,!1)}function CodeResultFromJSONTyped(e,t){return e==null?e:{kind:ModelTargetKindFromJSON(e.kind),value:e.value,links:e.links.map(CodeLinkFromJSON),places:e.places.map(CodeSiteFromJSON)}}var p=function(e){return e.READY=`ready`,e.NOT_FOUND=`notFound`,e.INCOMPATIBLE=`incompatible`,e.UNTRUSTED=`untrusted`,e.FAILED=`failed`,e.TIMED_OUT=`timedOut`,e.TOO_LARGE=`tooLarge`,e}({});function ClientFactsFromJSON(e){return ClientFactsFromJSONTyped(e,!1)}function ClientFactsFromJSONTyped(e,t){return e==null?e:{status:e.status,reason:e.reason===void 0?void 0:e.reason===null?null:e.reason,files:e.files}}function CodeAnswerFromJSON(e){return CodeAnswerFromJSONTyped(e,!1)}function CodeAnswerFromJSONTyped(e,t){return e==null?e:{precise:e.precise,results:e.results.map(CodeResultFromJSON),names:e.names==null?void 0:e.names.map(ProjectNameFromJSON),facts:e.facts==null?void 0:CodeFactSetFromJSON(e.facts),clientFacts:e.clientFacts==null?void 0:ClientFactsFromJSON(e.clientFacts)}}function CodeSubjectToJSON(e){return CodeSubjectToJSONTyped(e,!1)}function CodeSubjectToJSONTyped(e,t=!1){return e==null?e:{kind:ModelTargetKindToJSON(e.kind),value:e.value}}function CodeQueryToJSON(e){return CodeQueryToJSONTyped(e,!1)}function CodeQueryToJSONTyped(e,t=!1){return e==null?e:{subjects:e.subjects.map(CodeSubjectToJSON),names:e.names,facts:e.facts}}function ProjectFileStampFromJSON(e){return ProjectFileStampFromJSONTyped(e,!1)}function ProjectFileStampFromJSONTyped(e,t){return e==null?e:{path:e.path,stamp:e.stamp}}function ProjectFilesFromJSON(e){return ProjectFilesFromJSONTyped(e,!1)}function ProjectFilesFromJSONTyped(e,t){return e==null?e:{root:e.root,files:e.files.map(ProjectFileStampFromJSON),reports:e.reports.map(ProjectFileStampFromJSON),sources:e.sources==null?void 0:e.sources.map(ProjectFileStampFromJSON),testCases:e.testCases==null?void 0:e.testCases.map(ProjectFileStampFromJSON),templates:e.templates==null?void 0:e.templates.map(ProjectFileStampFromJSON),folders:e.folders==null?void 0:e.folders}}var m=function(e){return e.DRAWING=`drawing`,e.BPMNLINT=`bpmnlint`,e.COMPAT=`compat`,e.ENGINE=`engine`,e.TABLE=`table`,e.FORM=`form`,e.FILE=`file`,e}({}),h=function(e){return e.ERROR=`error`,e.WARNING=`warning`,e}({});function DiagramFindingToJSON(e){return DiagramFindingToJSONTyped(e,!1)}function DiagramFindingToJSONTyped(e,t=!1){return e==null?e:{family:e.family,rule:e.rule,severity:e.severity,title:e.title,message:e.message,where:e.where,elements:e.elements}}function CheckedFileToJSON(e){return CheckedFileToJSONTyped(e,!1)}function CheckedFileToJSONTyped(e,t=!1){return e==null?e:{path:e.path,stamp:e.stamp,findings:e.findings.map(DiagramFindingToJSON)}}function ProjectFindingsToJSON(e){return ProjectFindingsToJSONTyped(e,!1)}function ProjectFindingsToJSONTyped(e,t=!1){return e==null?e:{checked:e.checked.map(CheckedFileToJSON)}}function ModelTargetToJSON(e){return ModelTargetToJSONTyped(e,!1)}function ModelTargetToJSONTyped(e,t=!1){return e==null?e:{kind:ModelTargetKindToJSON(e.kind),value:e.value,path:e.path,label:e.label,elementId:e.elementId,elementType:e.elementType,writes:e.writes,where:e.where}}function ProjectSnapshotToJSON(e){return ProjectSnapshotToJSONTyped(e,!1)}function ProjectSnapshotToJSONTyped(e,t=!1){return e==null?e:{targets:e.targets.map(ModelTargetToJSON)}}function ImplicitJobTypeFromJSON(e){return ImplicitJobTypeFromJSONTyped(e,!1)}function ImplicitJobTypeFromJSONTyped(e,t){return e==null?e:{elementId:e.elementId,jobType:e.jobType,method:e.method,path:e.path,line:e.line,offset:e.offset}}function WorkerVariableUseFromJSON(e){return WorkerVariableUseFromJSONTyped(e,!1)}function WorkerVariableUseFromJSONTyped(e,t){return e==null?e:{elementId:e.elementId,name:e.name,writes:e.writes,type:e.type==null?void 0:e.type,where:e.where,path:e.path,line:e.line,offset:e.offset}}function WorkerFetchListFromJSON(e){return WorkerFetchListFromJSONTyped(e,!1)}function WorkerFetchListFromJSONTyped(e,t){return e==null?e:{elementId:e.elementId,names:e.names,declared:e.declared,path:e.path,line:e.line}}function DeclaredFieldFromJSON(e){return DeclaredFieldFromJSONTyped(e,!1)}function DeclaredFieldFromJSONTyped(e,t){return e==null?e:{name:e.name,type:e.type===void 0?void 0:e.type===null?null:e.type,serialised:e.serialised}}var g=function(e){return e.CLASS=`class`,e.ENUM=`enum`,e}({});function TypeDeclarationFromJSON(e){return TypeDeclarationFromJSONTyped(e,!1)}function TypeDeclarationFromJSONTyped(e,t){return e==null?e:{name:e.name,kind:e.kind,fields:e.fields.map(DeclaredFieldFromJSON),constants:e.constants,_extends:e.extends===void 0?void 0:e.extends===null?null:e.extends,open:e.open}}function VariableChecksFromJSON(e){return VariableChecksFromJSONTyped(e,!1)}function VariableChecksFromJSONTyped(e,t){return e==null?e:{check:e.check,inputs:e.inputs,entitled:e.entitled}}function WorkerVariablesFromJSON(e){return WorkerVariablesFromJSONTyped(e,!1)}function WorkerVariablesFromJSONTyped(e,t){return e==null?e:{variables:e.variables.map(WorkerVariableUseFromJSON),fetches:e.fetches.map(WorkerFetchListFromJSON),implicitJobTypes:e.implicitJobTypes.map(ImplicitJobTypeFromJSON),types:e.types.map(TypeDeclarationFromJSON),variableChecks:VariableChecksFromJSON(e.variableChecks),clientFacts:e.clientFacts==null?void 0:ClientFactsFromJSON(e.clientFacts)}}var ProjectApi=class extends n{async findCodeRequestOpts(e){if(e.codeQuery==null)throw new RequiredError(`codeQuery`,`Required parameter "codeQuery" was null or undefined when calling findCode().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/project/code`,method:`POST`,headers:n,query:t,body:CodeQueryToJSON(e.codeQuery)}}async findCodeRaw(e,t){let n=await this.findCodeRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>CodeAnswerFromJSON(e))}async findCode(e,t){return await(await this.findCodeRaw(e,t)).value()}async findWorkerVariablesRequestOpts(){return{path:`/api/project/worker-variables`,method:`POST`,headers:{},query:{}}}async findWorkerVariablesRaw(e){let t=await this.findWorkerVariablesRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>WorkerVariablesFromJSON(e))}async findWorkerVariables(e){return await(await this.findWorkerVariablesRaw(e)).value()}async getProjectFilesRequestOpts(){return{path:`/api/project/files`,method:`GET`,headers:{},query:{}}}async getProjectFilesRaw(e){let t=await this.getProjectFilesRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>ProjectFilesFromJSON(e))}async getProjectFiles(e){return await(await this.getProjectFilesRaw(e)).value()}async reportFindingsRequestOpts(e){if(e.projectFindings==null)throw new RequiredError(`projectFindings`,`Required parameter "projectFindings" was null or undefined when calling reportFindings().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/project/findings`,method:`POST`,headers:n,query:t,body:ProjectFindingsToJSON(e.projectFindings)}}async reportFindingsRaw(e,t){let n=await this.reportFindingsRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async reportFindings(e,t){await this.reportFindingsRaw(e,t)}async reportSnapshotRequestOpts(e){if(e.projectSnapshot==null)throw new RequiredError(`projectSnapshot`,`Required parameter "projectSnapshot" was null or undefined when calling reportSnapshot().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/project/snapshot`,method:`POST`,headers:n,query:t,body:ProjectSnapshotToJSON(e.projectSnapshot)}}async reportSnapshotRaw(e,t){let n=await this.reportSnapshotRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async reportSnapshot(e,t){await this.reportSnapshotRaw(e,t)}};function ScriptVariableWriterFromJSON(e){return ScriptVariableWriterFromJSONTyped(e,!1)}function ScriptVariableWriterFromJSONTyped(e,t){return e==null?e:{label:e.label,elementId:e.elementId==null?void 0:e.elementId,diagramPath:e.diagramPath==null?void 0:e.diagramPath,path:e.path==null?void 0:e.path,line:e.line==null?void 0:e.line,offset:e.offset==null?void 0:e.offset,sample:e.sample==null?void 0:e.sample}}function ScriptVariableWriterToJSON(e){return ScriptVariableWriterToJSONTyped(e,!1)}function ScriptVariableWriterToJSONTyped(e,t=!1){return e==null?e:{label:e.label,elementId:e.elementId,diagramPath:e.diagramPath,path:e.path,line:e.line,offset:e.offset,sample:e.sample}}function ScriptContextVariableFromJSON(e){return ScriptContextVariableFromJSONTyped(e,!1)}function ScriptContextVariableFromJSONTyped(e,t){return e==null?e:{name:e.name,type:e.type==null?void 0:e.type,declaredByScript:e.declaredByScript,writers:e.writers.map(ScriptVariableWriterFromJSON)}}function ScriptContextVariableToJSON(e){return ScriptContextVariableToJSONTyped(e,!1)}function ScriptContextVariableToJSONTyped(e,t=!1){return e==null?e:{name:e.name,type:e.type,declaredByScript:e.declaredByScript,writers:e.writers.map(ScriptVariableWriterToJSON)}}var _=function(e){return e.TASK_BODY=`TASK_BODY`,e.EXECUTION_LISTENER=`EXECUTION_LISTENER`,e.TASK_LISTENER=`TASK_LISTENER`,e.PARAMETER=`PARAMETER`,e.CONDITION=`CONDITION`,e.FEEL_CONDITION=`FEEL_CONDITION`,e.INPUT_MAPPING=`INPUT_MAPPING`,e.OUTPUT_MAPPING=`OUTPUT_MAPPING`,e}({});function ScriptOwnerFromJSON(e){return ScriptOwnerFromJSONTyped(e,!1)}function ScriptOwnerFromJSONTyped(e,t){return e}function ScriptOwnerToJSON(e){return e}function ScriptSlotFromJSON(e){return ScriptSlotFromJSONTyped(e,!1)}function ScriptSlotFromJSONTyped(e,t){return e==null?e:{elementId:e.elementId,owner:ScriptOwnerFromJSON(e.owner),index:e.index}}function ScriptSlotToJSON(e){return ScriptSlotToJSONTyped(e,!1)}function ScriptSlotToJSONTyped(e,t=!1){return e==null?e:{elementId:e.elementId,owner:ScriptOwnerToJSON(e.owner),index:e.index}}function ScriptCreateRequestToJSON(e){return ScriptCreateRequestToJSONTyped(e,!1)}function ScriptCreateRequestToJSONTyped(e,t=!1){return e==null?e:{scriptValue:e.scriptValue,scriptFormat:e.scriptFormat,slot:ScriptSlotToJSON(e.slot),diagramPath:e.diagramPath,title:e.title,variables:e.variables==null?void 0:e.variables.map(ScriptContextVariableToJSON)}}function ScriptSlotValueToJSON(e){return ScriptSlotValueToJSONTyped(e,!1)}function ScriptSlotValueToJSONTyped(e,t=!1){return e==null?e:{slot:ScriptSlotToJSON(e.slot),value:e.value}}var ScriptApi=class extends n{async createScriptRequestOpts(e){if(e.scriptCreateRequest==null)throw new RequiredError(`scriptCreateRequest`,`Required parameter "scriptCreateRequest" was null or undefined when calling createScript().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/script`,method:`POST`,headers:n,query:t,body:ScriptCreateRequestToJSON(e.scriptCreateRequest)}}async createScriptRaw(e,t){let n=await this.createScriptRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async createScript(e,t){await this.createScriptRaw(e,t)}async reportScriptSlotRequestOpts(e){if(e.scriptSlotValue==null)throw new RequiredError(`scriptSlotValue`,`Required parameter "scriptSlotValue" was null or undefined when calling reportScriptSlot().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/script/slot`,method:`POST`,headers:n,query:t,body:ScriptSlotValueToJSON(e.scriptSlotValue)}}async reportScriptSlotRaw(e,t){let n=await this.reportScriptSlotRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async reportScriptSlot(e,t){await this.reportScriptSlotRaw(e,t)}};function ThemePaletteFromJSON(e){return ThemePaletteFromJSONTyped(e,!1)}function ThemePaletteFromJSONTyped(e,t){return e==null?e:{theme:ThemeFromJSON(e.theme),dark:e.dark,tokens:e.tokens}}var ThemeApi=class extends n{async getThemeRequestOpts(){return{path:`/api/theme`,method:`GET`,headers:{},query:{}}}async getThemeRaw(e){let t=await this.getThemeRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>ThemePaletteFromJSON(e))}async getTheme(e){return await(await this.getThemeRaw(e)).value()}};function TestLensToJSON(e){return TestLensToJSONTyped(e,!1)}function TestLensToJSONTyped(e,t=!1){return e==null?e:{name:e.name,text:e.text}}function ProcessLensToJSON(e){return ProcessLensToJSONTyped(e,!1)}function ProcessLensToJSONTyped(e,t=!1){return e==null?e:{processId:e.processId,text:e.text,tests:e.tests==null?void 0:e.tests.map(TestLensToJSON)}}function WorkerLensToJSON(e){return WorkerLensToJSONTyped(e,!1)}function WorkerLensToJSONTyped(e,t=!1){return e==null?e:{kind:ModelTargetKindToJSON(e.kind),value:e.value,text:e.text}}function CodeLensesToJSON(e){return CodeLensesToJSONTyped(e,!1)}function CodeLensesToJSONTyped(e,t=!1){return e==null?e:{workers:e.workers==null?void 0:e.workers.map(WorkerLensToJSON),processes:e.processes==null?void 0:e.processes.map(ProcessLensToJSON)}}var v=function(e){return e.FIND_USAGES=`FIND_USAGES`,e.COPY=`COPY`,e.GO_TO_IMPLEMENTATION=`GO_TO_IMPLEMENTATION`,e}({});function ViewActionFromJSON(e){return ViewActionFromJSONTyped(e,!1)}function ViewActionFromJSONTyped(e,t){return e==null?e:{id:e.id,label:e.label,icon:e.icon==null?void 0:e.icon,keys:e.keys==null?void 0:e.keys,selected:e.selected==null?void 0:e.selected}}function ViewActionToJSON(e){return ViewActionToJSONTyped(e,!1)}function ViewActionToJSONTyped(e,t=!1){return e==null?e:{id:e.id,label:e.label,icon:e.icon,keys:e.keys,selected:e.selected}}var y=function(e){return e.ALWAYS=`ALWAYS`,e.SINGLE_CHILD=`SINGLE_CHILD`,e.NONE=`NONE`,e}({});function ViewNodeFromJSON(e){return ViewNodeFromJSONTyped(e,!1)}function ViewNodeFromJSONTyped(e,t){return e==null?e:{id:e.id,label:e.label,detail:e.detail==null?void 0:e.detail,icon:e.icon==null?void 0:e.icon,warning:e.warning==null?void 0:e.warning,tooltip:e.tooltip==null?void 0:e.tooltip,path:e.path==null?void 0:e.path,expand:e.expand==null?void 0:e.expand,open:e.open==null?void 0:e.open,actions:e.actions==null?void 0:e.actions.map(ViewActionFromJSON),children:e.children==null?void 0:e.children.map(ViewNodeFromJSON)}}function ViewNodeToJSON(e){return ViewNodeToJSONTyped(e,!1)}function ViewNodeToJSONTyped(e,t=!1){return e==null?e:{id:e.id,label:e.label,detail:e.detail,icon:e.icon,warning:e.warning,tooltip:e.tooltip,path:e.path,expand:e.expand,open:e.open,actions:e.actions==null?void 0:e.actions.map(ViewActionToJSON),children:e.children==null?void 0:e.children.map(ViewNodeToJSON)}}function ToolWindowModelToJSON(e){return ToolWindowModelToJSONTyped(e,!1)}function ToolWindowModelToJSONTyped(e,t=!1){return e==null?e:{roots:e.roots.map(ViewNodeToJSON),toolbar:e.toolbar.map(ViewActionToJSON)}}var ViewApi=class extends n{async publishCodeLensesRequestOpts(e){if(e.codeLenses==null)throw new RequiredError(`codeLenses`,`Required parameter "codeLenses" was null or undefined when calling publishCodeLenses().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/view/code-lenses`,method:`POST`,headers:n,query:t,body:CodeLensesToJSON(e.codeLenses)}}async publishCodeLensesRaw(e,t){let n=await this.publishCodeLensesRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async publishCodeLenses(e,t){await this.publishCodeLensesRaw(e,t)}async publishToolWindowRequestOpts(e){if(e.toolWindowModel==null)throw new RequiredError(`toolWindowModel`,`Required parameter "toolWindowModel" was null or undefined when calling publishToolWindow().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/api/view/tool-window`,method:`POST`,headers:n,query:t,body:ToolWindowModelToJSON(e.toolWindowModel)}}async publishToolWindowRaw(e,t){let n=await this.publishToolWindowRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async publishToolWindow(e,t){await this.publishToolWindowRaw(e,t)}};function DocumentTextToJSON(e){return DocumentTextToJSONTyped(e,!1)}function DocumentTextToJSONTyped(e,t=!1){return e==null?e:{xml:e.xml}}function CodeChangedEventFromJSONTyped(e,t){return e==null?e:{type:e.type}}function DebugClearedEventFromJSONTyped(e,t){return e==null?e:{type:e.type}}function DebugPositionEventFromJSONTyped(e,t){return e==null?e:{type:e.type,current:e.current,active:e.active,instance:e.instance==null?void 0:e.instance,source:e.source==null?void 0:e.source}}function DocumentReloadEventFromJSONTyped(e,t){return e==null?e:{type:e.type,xml:e.xml}}function OpenChatEventFromJSONTyped(e,t){return e==null?e:{type:e.type,chatId:e.chatId}}function OpenRunTraceEventFromJSONTyped(e,t){return e==null?e:{type:e.type,path:e.path}}function ProjectChangedEventFromJSONTyped(e,t){return e==null?e:{type:e.type}}function RevealElementEventFromJSONTyped(e,t){return e==null?e:{type:e.type,elementId:e.elementId}}function RunActionEventFromJSONTyped(e,t){return e==null?e:{type:e.type,id:e.id}}function ScriptSlotChangedEventFromJSONTyped(e,t){return e==null?e:{type:e.type,slot:ScriptSlotFromJSON(e.slot),value:e.value}}function ScriptTabsChangedEventFromJSONTyped(e,t){return e==null?e:{type:e.type,slots:e.slots.map(ScriptSlotFromJSON)}}function HostEventFromJSON(e){return HostEventFromJSONTyped(e,!1)}function HostEventFromJSONTyped(e,t){if(e==null)return e;switch(e.type){case`codeChanged`:return Object.assign({},CodeChangedEventFromJSONTyped(e,!0),{type:`codeChanged`});case`debugCleared`:return Object.assign({},DebugClearedEventFromJSONTyped(e,!0),{type:`debugCleared`});case`debugPosition`:return Object.assign({},DebugPositionEventFromJSONTyped(e,!0),{type:`debugPosition`});case`documentReload`:return Object.assign({},DocumentReloadEventFromJSONTyped(e,!0),{type:`documentReload`});case`openChat`:return Object.assign({},OpenChatEventFromJSONTyped(e,!0),{type:`openChat`});case`openRunTrace`:return Object.assign({},OpenRunTraceEventFromJSONTyped(e,!0),{type:`openRunTrace`});case`projectChanged`:return Object.assign({},ProjectChangedEventFromJSONTyped(e,!0),{type:`projectChanged`});case`revealElement`:return Object.assign({},RevealElementEventFromJSONTyped(e,!0),{type:`revealElement`});case`runAction`:return Object.assign({},RunActionEventFromJSONTyped(e,!0),{type:`runAction`});case`scriptSlotChanged`:return Object.assign({},ScriptSlotChangedEventFromJSONTyped(e,!0),{type:`scriptSlotChanged`});case`scriptTabsChanged`:return Object.assign({},ScriptTabsChangedEventFromJSONTyped(e,!0),{type:`scriptTabsChanged`});default:return e}}var VscodeApi=class extends n{async nextHostEventRequestOpts(){return{path:`/vscode/events`,method:`GET`,headers:{},query:{}}}async nextHostEventRaw(e){let t=await this.nextHostEventRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>HostEventFromJSON(e))}async nextHostEvent(e){return await(await this.nextHostEventRaw(e)).value()}async redoRequestOpts(){return{path:`/vscode/redo`,method:`POST`,headers:{},query:{}}}async redoRaw(e){let t=await this.redoRequestOpts();return new VoidApiResponse(await this.request(t,e))}async redo(e){await this.redoRaw(e)}async saveDocumentTextRequestOpts(e){if(e.documentText==null)throw new RequiredError(`documentText`,`Required parameter "documentText" was null or undefined when calling saveDocumentText().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/vscode/document`,method:`PUT`,headers:n,query:t,body:DocumentTextToJSON(e.documentText)}}async saveDocumentTextRaw(e,t){let n=await this.saveDocumentTextRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async saveDocumentText(e,t){await this.saveDocumentTextRaw(e,t)}async undoRequestOpts(){return{path:`/vscode/undo`,method:`POST`,headers:{},query:{}}}async undoRaw(e){let t=await this.undoRequestOpts();return new VoidApiResponse(await this.request(t,e))}async undo(e){await this.undoRaw(e)}};function CodeBridgeAnchorFromJSON(e){return CodeBridgeAnchorFromJSONTyped(e,!1)}function CodeBridgeAnchorFromJSONTyped(e,t){return e==null?e:{kind:e.kind,value:e.value,file:e.file,line:e.line,symbol:e.symbol===void 0?void 0:e.symbol===null?null:e.symbol,diagram:e.diagram,element:e.element===void 0?void 0:e.element===null?null:e.element}}function CodeBridgeBindingStatusFromJSON(e){return CodeBridgeBindingStatusFromJSONTyped(e,!1)}function CodeBridgeBindingStatusFromJSONTyped(e,t){return e==null?e:{kind:e.kind,value:e.value,listener:e.listener==null?void 0:e.listener,state:e.state,reason:e.reason===void 0?void 0:e.reason===null?null:e.reason,anchors:e.anchors.map(CodeBridgeAnchorFromJSON),tests:e.tests.map(CodeBridgeAnchorFromJSON),near:e.near===void 0?void 0:e.near===null?null:e.near}}function CodeBridgeStatusFromJSON(e){return CodeBridgeStatusFromJSONTyped(e,!1)}function CodeBridgeStatusFromJSONTyped(e,t){return e==null?e:{elementId:e.elementId,elementType:e.elementType,label:e.label,state:e.state,reason:e.reason===void 0?void 0:e.reason===null?null:e.reason,bindings:e.bindings.map(CodeBridgeBindingStatusFromJSON),anchors:e.anchors.map(CodeBridgeAnchorFromJSON),tests:e.tests.map(CodeBridgeAnchorFromJSON)}}function CodeBridgeAnswerFromJSON(e){return CodeBridgeAnswerFromJSONTyped(e,!1)}function CodeBridgeAnswerFromJSONTyped(e,t){return e==null?e:{licensed:e.licensed,statuses:e.statuses.map(CodeBridgeStatusFromJSON)}}function CodeBridgeBindingToJSON(e){return CodeBridgeBindingToJSONTyped(e,!1)}function CodeBridgeBindingToJSONTyped(e,t=!1){return e==null?e:{kind:e.kind,value:e.value,listener:e.listener}}function CodeBridgeElementToJSON(e){return CodeBridgeElementToJSONTyped(e,!1)}function CodeBridgeElementToJSONTyped(e,t=!1){return e==null?e:{elementId:e.elementId,elementType:e.elementType,label:e.label,bindings:e.bindings.map(CodeBridgeBindingToJSON)}}function CodeBridgeRequestToJSON(e){return CodeBridgeRequestToJSONTyped(e,!1)}function CodeBridgeRequestToJSONTyped(e,t=!1){return e==null?e:{diagram:e.diagram,elements:e.elements.map(CodeBridgeElementToJSON)}}function CodeSnippetAnswerFromJSON(e){return CodeSnippetAnswerFromJSONTyped(e,!1)}function CodeSnippetAnswerFromJSONTyped(e,t){return e==null?e:{path:e.path,line:e.line,lines:e.lines}}function CodeSnippetRequestToJSON(e){return CodeSnippetRequestToJSONTyped(e,!1)}function CodeSnippetRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,line:e.line,count:e.count}}function CodeUseFromJSON(e){return CodeUseFromJSONTyped(e,!1)}function CodeUseFromJSONTyped(e,t){return e==null?e:{line:e.line,kind:e.kind,value:e.value,diagram:e.diagram,element:e.element===void 0?void 0:e.element===null?null:e.element,name:e.name,elementType:e.elementType}}function CodeUsesAnswerFromJSON(e){return CodeUsesAnswerFromJSONTyped(e,!1)}function CodeUsesAnswerFromJSONTyped(e,t){return e==null?e:{uses:e.uses.map(CodeUseFromJSON)}}function CodeUsesRequestToJSON(e){return CodeUsesRequestToJSONTyped(e,!1)}function CodeUsesRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path}}function CompareAnswerFromJSON(e){return CompareAnswerFromJSONTyped(e,!1)}function CompareAnswerFromJSONTyped(e,t){return e==null?e:{tracked:e.tracked,before:e.before===void 0?void 0:e.before===null?null:e.before}}function CompareRequestToJSON(e){return CompareRequestToJSONTyped(e,!1)}function CompareRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path}}function CreateFolderRequestToJSON(e){return CreateFolderRequestToJSONTyped(e,!1)}function CreateFolderRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path}}function CurrentProjectFromJSON(e){return CurrentProjectFromJSONTyped(e,!1)}function CurrentProjectFromJSONTyped(e,t){return e==null?e:{open:e.open,available:e.available,id:e.id===void 0?void 0:e.id===null?null:e.id,name:e.name===void 0?void 0:e.name===null?null:e.name,folder:e.folder===void 0?void 0:e.folder===null?null:e.folder}}function DeleteEntryRequestToJSON(e){return DeleteEntryRequestToJSONTyped(e,!1)}function DeleteEntryRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,stamp:e.stamp}}function DuplicateEntryRequestToJSON(e){return DuplicateEntryRequestToJSONTyped(e,!1)}function DuplicateEntryRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path}}function EntryResultFromJSON(e){return EntryResultFromJSONTyped(e,!1)}function EntryResultFromJSONTyped(e,t){return e==null?e:{path:e.path}}function FolderListRequestToJSON(e){return FolderListRequestToJSONTyped(e,!1)}function FolderListRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,hidden:e.hidden}}function FolderProjectHintFromJSON(e){return FolderProjectHintFromJSONTyped(e,!1)}function FolderProjectHintFromJSONTyped(e,t){return e==null?e:{config:e.config,diagrams:e.diagrams}}function FolderEntryFromJSON(e){return FolderEntryFromJSONTyped(e,!1)}function FolderEntryFromJSONTyped(e,t){return e==null?e:{name:e.name,hidden:e.hidden,link:e.link,project:e.project==null?void 0:e.project}}function FolderListingFromJSON(e){return FolderListingFromJSONTyped(e,!1)}function FolderListingFromJSONTyped(e,t){return e==null?e:{path:e.path,parent:e.parent===void 0?void 0:e.parent===null?null:e.parent,home:e.home,separator:e.separator,roots:e.roots,entries:e.entries.map(FolderEntryFromJSON),total:e.total,truncated:e.truncated,hiddenCount:e.hiddenCount,hintsComplete:e.hintsComplete,project:e.project===void 0?void 0:e.project===null?null:FolderProjectHintFromJSON(e.project)}}function LanguageServerInfoFromJSON(e){return LanguageServerInfoFromJSONTyped(e,!1)}function LanguageServerInfoFromJSONTyped(e,t){return e==null?e:{id:e.id,label:e.label,languages:e.languages,available:e.available,configured:e.configured}}function LanguageServerListFromJSON(e){return LanguageServerListFromJSONTyped(e,!1)}function LanguageServerListFromJSONTyped(e,t){return e==null?e:{servers:e.servers.map(LanguageServerInfoFromJSON)}}var b=function(e){return e.PRO=`PRO`,e.TEAM=`TEAM`,e}({});function LicenceCheckoutToJSON(e){return LicenceCheckoutToJSONTyped(e,!1)}function LicenceCheckoutToJSONTyped(e,t=!1){return e==null?e:{tier:e.tier,email:e.email}}function LicenceCheckoutAnswerFromJSON(e){return LicenceCheckoutAnswerFromJSONTyped(e,!1)}function LicenceCheckoutAnswerFromJSONTyped(e,t){return e==null?e:{url:e.url}}function LicenceKeyToJSON(e){return LicenceKeyToJSONTyped(e,!1)}function LicenceKeyToJSONTyped(e,t=!1){return e==null?e:{key:e.key}}function LinkedRenameAppliedFromJSON(e){return LinkedRenameAppliedFromJSONTyped(e,!1)}function LinkedRenameAppliedFromJSONTyped(e,t){return e==null?e:{places:e.places,files:e.files}}function LinkedRenameFileVersionFromJSON(e){return LinkedRenameFileVersionFromJSONTyped(e,!1)}function LinkedRenameFileVersionFromJSONTyped(e,t){return e==null?e:{path:e.path,version:e.version}}function LinkedRenameFileVersionToJSON(e){return LinkedRenameFileVersionToJSONTyped(e,!1)}function LinkedRenameFileVersionToJSONTyped(e,t=!1){return e==null?e:{path:e.path,version:e.version}}function LinkedRenameApplyToJSON(e){return LinkedRenameApplyToJSONTyped(e,!1)}function LinkedRenameApplyToJSONTyped(e,t=!1){return e==null?e:{kind:LinkedRenameKindToJSON(e.kind),from:e.from,to:e.to,path:e.path,files:e.files.map(LinkedRenameFileVersionToJSON)}}function LinkedRenameSiteFromJSON(e){return LinkedRenameSiteFromJSONTyped(e,!1)}function LinkedRenameSiteFromJSONTyped(e,t){return e==null?e:{path:e.path,where:e.where,label:e.label,line:e.line}}function LinkedRenamePlanFromJSON(e){return LinkedRenamePlanFromJSONTyped(e,!1)}function LinkedRenamePlanFromJSONTyped(e,t){return e==null?e:{offered:e.offered,detail:e.detail==null?void 0:e.detail,summary:e.summary==null?void 0:e.summary,sites:e.sites.map(LinkedRenameSiteFromJSON),files:e.files.map(LinkedRenameFileVersionFromJSON)}}function LocatedPlaceFromJSON(e){return LocatedPlaceFromJSONTyped(e,!1)}function LocatedPlaceFromJSONTyped(e,t){return e==null?e:{path:e.path,line:e.line,label:e.label}}function LocateAnswerFromJSON(e){return LocateAnswerFromJSONTyped(e,!1)}function LocateAnswerFromJSONTyped(e,t){return e==null?e:{places:e.places.map(LocatedPlaceFromJSON)}}function LocateRequestToJSON(e){return LocateRequestToJSONTyped(e,!1)}function LocateRequestToJSONTyped(e,t=!1){return e==null?e:{kind:e.kind,value:e.value}}function LspMessageFromJSON(e){return LspMessageFromJSONTyped(e,!1)}function LspMessageFromJSONTyped(e,t){return e==null?e:{serverName:e.serverName,message:e.message}}function LspMessagesFromJSON(e){return LspMessagesFromJSONTyped(e,!1)}function LspMessagesFromJSONTyped(e,t){return e==null?e:{messages:e.messages.map(LspMessageFromJSON)}}function MoveEntryRequestToJSON(e){return MoveEntryRequestToJSONTyped(e,!1)}function MoveEntryRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,folder:e.folder,stamp:e.stamp}}function OpenProjectRequestToJSON(e){return OpenProjectRequestToJSONTyped(e,!1)}function OpenProjectRequestToJSONTyped(e,t=!1){return e==null?e:{folder:e.folder}}function ProjectFileSavedFromJSON(e){return ProjectFileSavedFromJSONTyped(e,!1)}function ProjectFileSavedFromJSONTyped(e,t){return e==null?e:{stamp:e.stamp}}function ProjectNamesFromJSON(e){return ProjectNamesFromJSONTyped(e,!1)}function ProjectNamesFromJSONTyped(e,t){return e==null?e:{names:e.names.map(ProjectNameFromJSON)}}function RecentProjectFromJSON(e){return RecentProjectFromJSONTyped(e,!1)}function RecentProjectFromJSONTyped(e,t){return e==null?e:{folder:e.folder,name:e.name,present:e.present}}function RecentProjectsFromJSON(e){return RecentProjectsFromJSONTyped(e,!1)}function RecentProjectsFromJSONTyped(e,t){return e==null?e:{projects:e.projects.map(RecentProjectFromJSON)}}function RenameEntryRequestToJSON(e){return RenameEntryRequestToJSONTyped(e,!1)}function RenameEntryRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,name:e.name,stamp:e.stamp}}function SaveProjectFileRequestToJSON(e){return SaveProjectFileRequestToJSONTyped(e,!1)}function SaveProjectFileRequestToJSONTyped(e,t=!1){return e==null?e:{path:e.path,content:e.content,stamp:e.stamp}}function ToolWindowPlaceFromJSON(e){return ToolWindowPlaceFromJSONTyped(e,!1)}function ToolWindowPlaceFromJSONTyped(e,t){return e==null?e:{path:e.path,line:e.line,label:e.label}}function ToolWindowInstructionFromJSON(e){return ToolWindowInstructionFromJSONTyped(e,!1)}function ToolWindowInstructionFromJSONTyped(e,t){return e==null?e:{kind:e.kind,path:e.path==null?void 0:e.path,elementId:e.elementId==null?void 0:e.elementId,title:e.title==null?void 0:e.title,slot:e.slot==null?void 0:ScriptSlotFromJSON(e.slot),language:e.language==null?void 0:e.language,script:e.script==null?void 0:e.script,variables:e.variables==null?void 0:e.variables.map(ScriptContextVariableFromJSON),places:e.places==null?void 0:e.places.map(ToolWindowPlaceFromJSON),text:e.text==null?void 0:e.text,error:e.error==null?void 0:e.error,key:e.key==null?void 0:e.key,value:e.value==null?void 0:e.value,paths:e.paths==null?void 0:e.paths,profile:e.profile==null?void 0:e.profile,confirm:e.confirm==null?void 0:e.confirm,example:e.example==null?void 0:e.example,reason:e.reason==null?void 0:e.reason}}function ToolWindowPerformRequestToJSON(e){return ToolWindowPerformRequestToJSONTyped(e,!1)}function ToolWindowPerformRequestToJSONTyped(e,t=!1){return e==null?e:{id:e.id,revision:e.revision}}function ToolWindowSnapshotFromJSON(e){return ToolWindowSnapshotFromJSONTyped(e,!1)}function ToolWindowSnapshotFromJSONTyped(e,t){return e==null?e:{revision:e.revision,unchanged:e.unchanged==null?void 0:e.unchanged,codeLinks:e.codeLinks==null?void 0:e.codeLinks,truncated:e.truncated==null?void 0:e.truncated,roots:e.roots==null?void 0:e.roots.map(ViewNodeFromJSON),toolbar:e.toolbar==null?void 0:e.toolbar.map(ViewActionFromJSON)}}var WebApi=class extends n{async activateLicenceRequestOpts(e){if(e.licenceKey==null)throw new RequiredError(`licenceKey`,`Required parameter "licenceKey" was null or undefined when calling activateLicence().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/licence/activate`,method:`POST`,headers:n,query:t,body:LicenceKeyToJSON(e.licenceKey)}}async activateLicenceRaw(e,t){let n=await this.activateLicenceRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>LicenseStatusFromJSON(e))}async activateLicence(e,t){return await(await this.activateLicenceRaw(e,t)).value()}async applyLinkedRenameRequestOpts(e){if(e.linkedRenameApply==null)throw new RequiredError(`linkedRenameApply`,`Required parameter "linkedRenameApply" was null or undefined when calling applyLinkedRename().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/linked-rename/apply`,method:`POST`,headers:n,query:t,body:LinkedRenameApplyToJSON(e.linkedRenameApply)}}async applyLinkedRenameRaw(e,t){let n=await this.applyLinkedRenameRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>LinkedRenameAppliedFromJSON(e))}async applyLinkedRename(e,t){return await(await this.applyLinkedRenameRaw(e,t)).value()}async closeProjectRequestOpts(){return{path:`/web/project/close`,method:`POST`,headers:{},query:{}}}async closeProjectRaw(e){let t=await this.closeProjectRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>CurrentProjectFromJSON(e))}async closeProject(e){return await(await this.closeProjectRaw(e)).value()}async compareWithHeadRequestOpts(e){if(e.compareRequest==null)throw new RequiredError(`compareRequest`,`Required parameter "compareRequest" was null or undefined when calling compareWithHead().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/compare`,method:`POST`,headers:n,query:t,body:CompareRequestToJSON(e.compareRequest)}}async compareWithHeadRaw(e,t){let n=await this.compareWithHeadRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>CompareAnswerFromJSON(e))}async compareWithHead(e,t){return await(await this.compareWithHeadRaw(e,t)).value()}async createFolderRequestOpts(e){if(e.createFolderRequest==null)throw new RequiredError(`createFolderRequest`,`Required parameter "createFolderRequest" was null or undefined when calling createFolder().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/files/create-folder`,method:`POST`,headers:n,query:t,body:CreateFolderRequestToJSON(e.createFolderRequest)}}async createFolderRaw(e,t){let n=await this.createFolderRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async createFolder(e,t){await this.createFolderRaw(e,t)}async deactivateLicenceRequestOpts(){return{path:`/web/licence/deactivate`,method:`POST`,headers:{},query:{}}}async deactivateLicenceRaw(e){let t=await this.deactivateLicenceRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>LicenseStatusFromJSON(e))}async deactivateLicence(e){return await(await this.deactivateLicenceRaw(e)).value()}async deleteEntryRequestOpts(e){if(e.deleteEntryRequest==null)throw new RequiredError(`deleteEntryRequest`,`Required parameter "deleteEntryRequest" was null or undefined when calling deleteEntry().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/files/delete`,method:`POST`,headers:n,query:t,body:DeleteEntryRequestToJSON(e.deleteEntryRequest)}}async deleteEntryRaw(e,t){let n=await this.deleteEntryRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async deleteEntry(e,t){await this.deleteEntryRaw(e,t)}async downloadProjectArchiveRequestOpts(e){let t={};return e.expect!=null&&(t.expect=e.expect),{path:`/web/project/archive`,method:`GET`,headers:{},query:t}}async downloadProjectArchiveRaw(e,t){let n=await this.downloadProjectArchiveRequestOpts(e);return new BlobApiResponse(await this.request(n,t))}async downloadProjectArchive(e={},t){return await(await this.downloadProjectArchiveRaw(e,t)).value()}async duplicateEntryRequestOpts(e){if(e.duplicateEntryRequest==null)throw new RequiredError(`duplicateEntryRequest`,`Required parameter "duplicateEntryRequest" was null or undefined when calling duplicateEntry().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/files/duplicate`,method:`POST`,headers:n,query:t,body:DuplicateEntryRequestToJSON(e.duplicateEntryRequest)}}async duplicateEntryRaw(e,t){let n=await this.duplicateEntryRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>EntryResultFromJSON(e))}async duplicateEntry(e,t){return await(await this.duplicateEntryRaw(e,t)).value()}async findCodeStatusRequestOpts(e){if(e.codeBridgeRequest==null)throw new RequiredError(`codeBridgeRequest`,`Required parameter "codeBridgeRequest" was null or undefined when calling findCodeStatus().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/code/status`,method:`POST`,headers:n,query:t,body:CodeBridgeRequestToJSON(e.codeBridgeRequest)}}async findCodeStatusRaw(e,t){let n=await this.findCodeStatusRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>CodeBridgeAnswerFromJSON(e))}async findCodeStatus(e,t){return await(await this.findCodeStatusRaw(e,t)).value()}async findCodeUsesRequestOpts(e){if(e.codeUsesRequest==null)throw new RequiredError(`codeUsesRequest`,`Required parameter "codeUsesRequest" was null or undefined when calling findCodeUses().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/code/uses`,method:`POST`,headers:n,query:t,body:CodeUsesRequestToJSON(e.codeUsesRequest)}}async findCodeUsesRaw(e,t){let n=await this.findCodeUsesRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>CodeUsesAnswerFromJSON(e))}async findCodeUses(e,t){return await(await this.findCodeUsesRaw(e,t)).value()}async forgetRecentProjectRequestOpts(e){if(e.openProjectRequest==null)throw new RequiredError(`openProjectRequest`,`Required parameter "openProjectRequest" was null or undefined when calling forgetRecentProject().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/project/recent/forget`,method:`POST`,headers:n,query:t,body:OpenProjectRequestToJSON(e.openProjectRequest)}}async forgetRecentProjectRaw(e,t){let n=await this.forgetRecentProjectRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>RecentProjectsFromJSON(e))}async forgetRecentProject(e,t){return await(await this.forgetRecentProjectRaw(e,t)).value()}async getCurrentProjectRequestOpts(){return{path:`/web/project`,method:`GET`,headers:{},query:{}}}async getCurrentProjectRaw(e){let t=await this.getCurrentProjectRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>CurrentProjectFromJSON(e))}async getCurrentProject(e){return await(await this.getCurrentProjectRaw(e)).value()}async getToolWindowRequestOpts(e){let t={};return e.revision!=null&&(t.revision=e.revision),{path:`/web/tool-window`,method:`GET`,headers:{},query:t}}async getToolWindowRaw(e,t){let n=await this.getToolWindowRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>ToolWindowSnapshotFromJSON(e))}async getToolWindow(e={},t){return await(await this.getToolWindowRaw(e,t)).value()}async listFoldersRequestOpts(e){if(e.folderListRequest==null)throw new RequiredError(`folderListRequest`,`Required parameter "folderListRequest" was null or undefined when calling listFolders().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/folders`,method:`POST`,headers:n,query:t,body:FolderListRequestToJSON(e.folderListRequest)}}async listFoldersRaw(e,t){let n=await this.listFoldersRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>FolderListingFromJSON(e))}async listFolders(e,t){return await(await this.listFoldersRaw(e,t)).value()}async listLanguageServersRequestOpts(){return{path:`/web/lsp/servers`,method:`GET`,headers:{},query:{}}}async listLanguageServersRaw(e){let t=await this.listLanguageServersRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>LanguageServerListFromJSON(e))}async listLanguageServers(e){return await(await this.listLanguageServersRaw(e)).value()}async listProjectNamesRequestOpts(){return{path:`/web/code/names`,method:`GET`,headers:{},query:{}}}async listProjectNamesRaw(e){let t=await this.listProjectNamesRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>ProjectNamesFromJSON(e))}async listProjectNames(e){return await(await this.listProjectNamesRaw(e)).value()}async listRecentProjectsRequestOpts(){return{path:`/web/project/recent`,method:`GET`,headers:{},query:{}}}async listRecentProjectsRaw(e){let t=await this.listRecentProjectsRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>RecentProjectsFromJSON(e))}async listRecentProjects(e){return await(await this.listRecentProjectsRaw(e)).value()}async locateCodeRequestOpts(e){if(e.locateRequest==null)throw new RequiredError(`locateRequest`,`Required parameter "locateRequest" was null or undefined when calling locateCode().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/code/locate`,method:`POST`,headers:n,query:t,body:LocateRequestToJSON(e.locateRequest)}}async locateCodeRaw(e,t){let n=await this.locateCodeRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>LocateAnswerFromJSON(e))}async locateCode(e,t){return await(await this.locateCodeRaw(e,t)).value()}async moveEntryRequestOpts(e){if(e.moveEntryRequest==null)throw new RequiredError(`moveEntryRequest`,`Required parameter "moveEntryRequest" was null or undefined when calling moveEntry().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/files/move`,method:`POST`,headers:n,query:t,body:MoveEntryRequestToJSON(e.moveEntryRequest)}}async moveEntryRaw(e,t){let n=await this.moveEntryRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>EntryResultFromJSON(e))}async moveEntry(e,t){return await(await this.moveEntryRaw(e,t)).value()}async nextLspMessagesRequestOpts(){return{path:`/web/lsp/messages`,method:`GET`,headers:{},query:{}}}async nextLspMessagesRaw(e){let t=await this.nextLspMessagesRequestOpts();return new JSONApiResponse(await this.request(t,e),e=>LspMessagesFromJSON(e))}async nextLspMessages(e){return await(await this.nextLspMessagesRaw(e)).value()}async openProjectRequestOpts(e){if(e.openProjectRequest==null)throw new RequiredError(`openProjectRequest`,`Required parameter "openProjectRequest" was null or undefined when calling openProject().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/project/open`,method:`POST`,headers:n,query:t,body:OpenProjectRequestToJSON(e.openProjectRequest)}}async openProjectRaw(e,t){let n=await this.openProjectRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>CurrentProjectFromJSON(e))}async openProject(e,t){return await(await this.openProjectRaw(e,t)).value()}async performToolWindowActionRequestOpts(e){if(e.toolWindowPerformRequest==null)throw new RequiredError(`toolWindowPerformRequest`,`Required parameter "toolWindowPerformRequest" was null or undefined when calling performToolWindowAction().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/tool-window/perform`,method:`POST`,headers:n,query:t,body:ToolWindowPerformRequestToJSON(e.toolWindowPerformRequest)}}async performToolWindowActionRaw(e,t){let n=await this.performToolWindowActionRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>ToolWindowInstructionFromJSON(e))}async performToolWindowAction(e,t){return await(await this.performToolWindowActionRaw(e,t)).value()}async planLinkedRenameRequestOpts(e){if(e.linkedRenameOffer==null)throw new RequiredError(`linkedRenameOffer`,`Required parameter "linkedRenameOffer" was null or undefined when calling planLinkedRename().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/linked-rename/plan`,method:`POST`,headers:n,query:t,body:LinkedRenameOfferToJSON(e.linkedRenameOffer)}}async planLinkedRenameRaw(e,t){let n=await this.planLinkedRenameRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>LinkedRenamePlanFromJSON(e))}async planLinkedRename(e,t){return await(await this.planLinkedRenameRaw(e,t)).value()}async readCodeSnippetRequestOpts(e){if(e.codeSnippetRequest==null)throw new RequiredError(`codeSnippetRequest`,`Required parameter "codeSnippetRequest" was null or undefined when calling readCodeSnippet().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/code/snippet`,method:`POST`,headers:n,query:t,body:CodeSnippetRequestToJSON(e.codeSnippetRequest)}}async readCodeSnippetRaw(e,t){let n=await this.readCodeSnippetRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>CodeSnippetAnswerFromJSON(e))}async readCodeSnippet(e,t){return await(await this.readCodeSnippetRaw(e,t)).value()}async renameEntryRequestOpts(e){if(e.renameEntryRequest==null)throw new RequiredError(`renameEntryRequest`,`Required parameter "renameEntryRequest" was null or undefined when calling renameEntry().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/files/rename`,method:`POST`,headers:n,query:t,body:RenameEntryRequestToJSON(e.renameEntryRequest)}}async renameEntryRaw(e,t){let n=await this.renameEntryRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>EntryResultFromJSON(e))}async renameEntry(e,t){return await(await this.renameEntryRaw(e,t)).value()}async saveProjectFileRequestOpts(e){if(e.saveProjectFileRequest==null)throw new RequiredError(`saveProjectFileRequest`,`Required parameter "saveProjectFileRequest" was null or undefined when calling saveProjectFile().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/files/save`,method:`POST`,headers:n,query:t,body:SaveProjectFileRequestToJSON(e.saveProjectFileRequest)}}async saveProjectFileRaw(e,t){let n=await this.saveProjectFileRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>ProjectFileSavedFromJSON(e))}async saveProjectFile(e,t){return await(await this.saveProjectFileRaw(e,t)).value()}async sendLspMessageRequestOpts(e){if(e.serverName==null)throw new RequiredError(`serverName`,`Required parameter "serverName" was null or undefined when calling sendLspMessage().`);if(e.body==null)throw new RequiredError(`body`,`Required parameter "body" was null or undefined when calling sendLspMessage().`);let t={},n={};n[`Content-Type`]=`application/json`;let r=`/web/lsp/{serverName}/message`;return r=r.replace(`{serverName}`,encodeURIComponent(String(e.serverName))),{path:r,method:`POST`,headers:n,query:t,body:e.body}}async sendLspMessageRaw(e,t){let n=await this.sendLspMessageRequestOpts(e);return new VoidApiResponse(await this.request(n,t))}async sendLspMessage(e,t){await this.sendLspMessageRaw(e,t)}async startLicenceCheckoutRequestOpts(e){if(e.licenceCheckout==null)throw new RequiredError(`licenceCheckout`,`Required parameter "licenceCheckout" was null or undefined when calling startLicenceCheckout().`);let t={},n={};return n[`Content-Type`]=`application/json`,{path:`/web/licence/checkout`,method:`POST`,headers:n,query:t,body:LicenceCheckoutToJSON(e.licenceCheckout)}}async startLicenceCheckoutRaw(e,t){let n=await this.startLicenceCheckoutRequestOpts(e);return new JSONApiResponse(await this.request(n,t),e=>LicenceCheckoutAnswerFromJSON(e))}async startLicenceCheckout(e,t){return await(await this.startLicenceCheckoutRaw(e,t)).value()}};export{a as A,Configuration as B,l as C,FileSaverApi as D,o as E,ConfigApi as F,r as I,ClipboardApi as L,DeploymentApi as M,i as N,FileReaderApi as O,ConnectorsApi as P,AgentApi as R,HostApi as S,s as T,ResponseError as V,PreferencesApi as _,y as a,LicenseApi as b,ScriptApi as c,g as d,m as f,PreviewApi as g,f as h,ViewApi as i,DiffApi as j,FileChooserApi as k,_ as l,p as m,b as n,v as o,h as p,VscodeApi as r,ThemeApi as s,WebApi as t,ProjectApi as u,d as v,c as w,u as x,NavigationApi as y,ActionsApi as z};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime-B8BYMn-z.js";import{i as e}from"./translator-Dvvasoz-.js";async function readFailure(t){if(t==null)return{message:``,classified:null};let n=t?.response;if(n){let t=await n.text().catch(()=>``),r=(()=>{try{return JSON.parse(t)}catch{return t}})();if(typeof r==`string`&&r.trim())return{message:r,classified:null};let i=r,a=typeof i?.key==`string`&&typeof i.detail==`string`?{key:i.key,detail:i.detail}:null;return typeof i?.message==`string`?{message:i.message,classified:a}:{message:e(`app.platform.theIdeAnswered`,{status:n.status}),classified:a}}return{message:t instanceof Error?t.message:String(t),classified:null}}async function messageOf(e){return(await readFailure(e)).message}function hostIsAbsent(e){return e?.response?.status===501}var AgentRefusal=class extends Error{status;failure;constructor(e,t,n=null){super(t),this.status=e,this.failure=n}};function statusOf(e){return e?.response?.status??null}async function answered(e){try{return await e}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)throw e;let t=statusOf(e),{message:n,classified:r}=await readFailure(e);throw t===null?Error(n):new AgentRefusal(t,n,r)}}function toolOf(e){return{id:e.id,title:e.title,kind:e.kind,status:e.status,diffs:(e.diffs??[]).map(e=>({path:e.path,oldText:e.oldText??null,newText:e.newText})),paths:e.paths??[],locations:(e.locations??[]).map(e=>({path:e.path,line:e.line??null})),raw:e.raw}}function toolEntryId(e){return`tool:${e.id}`}function entryOf(e){switch(e.kind){case`user`:case`agent`:case`thought`:case`notice`:return{kind:e.kind,id:e.id,text:e.text??``};case`tool`:{if(!e.tool)return null;let t=toolOf(e.tool);return{kind:`tool`,id:toolEntryId(t),tool:t}}case`plan`:return{kind:`plan`,id:e.id,items:(e.items??[]).map(e=>({text:e.text,status:e.status}))};default:return null}}function permissionOf(e){return{id:e.id,tool:toolOf(e.tool),options:e.options.map(e=>({id:e.id,label:e.label,kind:e.kind}))}}function optionOf(e){return{id:e.id,name:e.name,description:e.description??null,category:e.category,current:e.current,values:e.values.map(e=>({id:e.id,name:e.name,description:e.description??null,group:e.group??null}))}}function errorOf(e){return e?e.signIn===!0?{key:e.key,detail:e.detail,signIn:!0}:{key:e.key,detail:e.detail}:null}function chatOf(e){return{id:e.id,title:e.title,state:e.state,agentId:e.agentId,updated:e.updated instanceof Date?e.updated.getTime():Date.parse(String(e.updated))||0,detail:e.detail??null,files:e.files??[]}}function eventOf(e){let t=e.chatId??null;switch(e.type){case`sync`:return{type:`sync`};case`chats`:return{type:`chats`,chats:(e.chats??[]).map(chatOf)};case`enabled`:return{type:`enabled`,enabled:e.enabled!==!1};case`entry`:{let n=e.entry?entryOf(e.entry):null;return t&&n?{type:`entry`,chatId:t,entry:n}:null}case`tool`:return t&&e.tool?{type:`tool`,chatId:t,tool:toolOf(e.tool)}:null;case`plan`:return t?{type:`plan`,chatId:t,items:(e.items??[]).map(e=>({text:e.text,status:e.status}))}:null;case`queue`:return t?{type:`queue`,chatId:t,queue:(e.queue??[]).map(e=>({id:e.id,text:e.text}))}:null;case`permission`:return t?{type:`permission`,chatId:t,permission:e.permission?permissionOf(e.permission):null}:null;case`error`:return t?{type:`error`,chatId:t,error:errorOf(e.error)}:null;case`options`:return t?{type:`options`,chatId:t,options:(e.options??[]).map(optionOf)}:null;default:return null}}function httpAgentHost(e){return{choices:async()=>(await answered(e.getAgentChoices())).agents.map(e=>({id:e.id,name:e.name,available:e.available,source:e.source,install:e.install??null,icon:e.icon??null,options:(e.options??[]).map(optionOf)})),chats:async()=>{let t=await answered(e.listAgentChats());return{chats:t.chats.map(chatOf),enabled:t.enabled}},chat:async t=>{let n=await answered(e.getAgentChat({chatId:t}));return{chat:chatOf(n.chat),entries:n.entries.map(entryOf).filter(e=>e!==null),queue:n.queue.map(e=>({id:e.id,text:e.text})),permission:n.permission?permissionOf(n.permission):null,error:errorOf(n.error),options:(n.options??[]).map(optionOf)}},create:async t=>chatOf(await answered(e.createAgentChat({createAgentChatRequest:{agentId:t}}))),rename:async(t,n)=>chatOf(await answered(e.renameAgentChat({chatId:t,renameAgentChatRequest:{title:n}}))),remove:t=>answered(e.deleteAgentChat({chatId:t})),prompt:async(t,n,r)=>{let i=await answered(e.promptAgent({chatId:t,promptAgentRequest:{text:n,...r?{context:{file:r.file,elementIds:r.elementIds}}:{}}}));return{queued:i.queued,queueId:i.queueId??null}},unqueue:(t,n)=>answered(e.unqueueAgentPrompt({chatId:t,queueId:n})),stop:t=>answered(e.stopAgentTurn({chatId:t})),signIn:t=>answered(e.signInAgent({chatId:t})),answer:(t,n,r)=>answered(e.answerAgentPermission({chatId:t,answerAgentPermissionRequest:{permissionId:n,optionId:r}})),setOption:async(t,n,r)=>(await answered(e.setAgentConfigOption({chatId:t,setAgentConfigOptionRequest:{optionId:n,valueId:r}}))).map(optionOf),next:async(t,n)=>{let r=await answered(e.nextAgentEvent({client:t},{signal:n}));return r?eventOf(r):null}}}export{messageOf as a,hostIsAbsent as i,toolEntryId as n,AgentRefusal as r,httpAgentHost as t};