@scalar/api-client 2.38.1 → 2.38.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1162) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/AddressBar-B4xnl66I.js +302 -0
  3. package/dist/AddressBar-B4xnl66I.js.map +1 -0
  4. package/dist/App-BVH4lIe8.js +533 -0
  5. package/dist/App-BVH4lIe8.js.map +1 -0
  6. package/dist/App-CvClwSlM.js +2510 -0
  7. package/dist/App-CvClwSlM.js.map +1 -0
  8. package/dist/CodeInput-C-igR77V.js +694 -0
  9. package/dist/CodeInput-C-igR77V.js.map +1 -0
  10. package/dist/CodeSnippet-D7Heh1nd.js +218 -0
  11. package/dist/CodeSnippet-D7Heh1nd.js.map +1 -0
  12. package/dist/Collection-4MT9WmDD.js +219 -0
  13. package/dist/Collection-4MT9WmDD.js.map +1 -0
  14. package/dist/CollectionAuthentication-MHWQpw74.js +56 -0
  15. package/dist/CollectionAuthentication-MHWQpw74.js.map +1 -0
  16. package/dist/CollectionCookies-DyjPPMdt.js +19 -0
  17. package/dist/CollectionCookies-DyjPPMdt.js.map +1 -0
  18. package/dist/CollectionEnvironment-Dw35vIqo.js +514 -0
  19. package/dist/CollectionEnvironment-Dw35vIqo.js.map +1 -0
  20. package/dist/CollectionOverview-TUdDIu5f.js +131 -0
  21. package/dist/CollectionOverview-TUdDIu5f.js.map +1 -0
  22. package/dist/CollectionScripts-CMNlBlby.js +19 -0
  23. package/dist/CollectionScripts-CMNlBlby.js.map +1 -0
  24. package/dist/CollectionServers-BrjTCfDe.js +168 -0
  25. package/dist/CollectionServers-BrjTCfDe.js.map +1 -0
  26. package/dist/CollectionSettings-HVSlp2Gv.js +87 -0
  27. package/dist/CollectionSettings-HVSlp2Gv.js.map +1 -0
  28. package/dist/CollectionSync-CAflc5yW.js +19 -0
  29. package/dist/CollectionSync-CAflc5yW.js.map +1 -0
  30. package/dist/CommandActionInput-TkcAx6E8.js +97 -0
  31. package/dist/CommandActionInput-TkcAx6E8.js.map +1 -0
  32. package/dist/CommandPalette-CL8k4CoN.js +964 -0
  33. package/dist/CommandPalette-CL8k4CoN.js.map +1 -0
  34. package/dist/CommandPaletteImport-Diu5dDIY.js +622 -0
  35. package/dist/CommandPaletteImport-Diu5dDIY.js.map +1 -0
  36. package/dist/Cookies-DbOKTi1f.js +284 -0
  37. package/dist/Cookies-DbOKTi1f.js.map +1 -0
  38. package/dist/DataTable-BqbZKW3K.js +62 -0
  39. package/dist/DataTable-BqbZKW3K.js.map +1 -0
  40. package/dist/DataTableHeader-DJVB0jCZ.js +21 -0
  41. package/dist/DataTableHeader-DJVB0jCZ.js.map +1 -0
  42. package/dist/DataTableInput-yaU5g-kP.js +166 -0
  43. package/dist/DataTableInput-yaU5g-kP.js.map +1 -0
  44. package/dist/DataTableRow-c3XveEUO.js +57 -0
  45. package/dist/DataTableRow-c3XveEUO.js.map +1 -0
  46. package/dist/DeleteSidebarListElement-C-p87d03.js +78 -0
  47. package/dist/DeleteSidebarListElement-C-p87d03.js.map +1 -0
  48. package/dist/EditSidebarListElement-CodWPnM6.js +32 -0
  49. package/dist/EditSidebarListElement-CodWPnM6.js.map +1 -0
  50. package/dist/Editor-BomsGWHx.js +909 -0
  51. package/dist/Editor-BomsGWHx.js.map +1 -0
  52. package/dist/EmptyState-Cnm7hGW5.js +46 -0
  53. package/dist/EmptyState-Cnm7hGW5.js.map +1 -0
  54. package/dist/Environment-DJatRQIg.js +416 -0
  55. package/dist/Environment-DJatRQIg.js.map +1 -0
  56. package/dist/EnvironmentModal-DBEJ4Kzj.js +288 -0
  57. package/dist/EnvironmentModal-DBEJ4Kzj.js.map +1 -0
  58. package/dist/Form-CSKzyHGO.js +83 -0
  59. package/dist/Form-CSKzyHGO.js.map +1 -0
  60. package/dist/HttpMethod-rnWEgC3T.js +78 -0
  61. package/dist/HttpMethod-rnWEgC3T.js.map +1 -0
  62. package/dist/IconSelector-BDC_GQXv.js +67 -0
  63. package/dist/IconSelector-BDC_GQXv.js.map +1 -0
  64. package/dist/ImportCollection-DfX1UQ5u.js +804 -0
  65. package/dist/ImportCollection-DfX1UQ5u.js.map +1 -0
  66. package/dist/IntegrationLogo-B9EDW8db.js +51 -0
  67. package/dist/IntegrationLogo-B9EDW8db.js.map +1 -0
  68. package/dist/MainLayout-BEFMl1ud.js +281 -0
  69. package/dist/MainLayout-BEFMl1ud.js.map +1 -0
  70. package/dist/Modal-sQ9vH6MN.js +67 -0
  71. package/dist/Modal-sQ9vH6MN.js.map +1 -0
  72. package/dist/ModalClientContainer-qHsZi4wQ.js +65 -0
  73. package/dist/ModalClientContainer-qHsZi4wQ.js.map +1 -0
  74. package/dist/Request-gscRsGQ8.js +212 -0
  75. package/dist/Request-gscRsGQ8.js.map +1 -0
  76. package/dist/RequestAuth-BzBfIysT.js +989 -0
  77. package/dist/RequestAuth-BzBfIysT.js.map +1 -0
  78. package/dist/RequestRoot-3Bj8JZD-.js +1611 -0
  79. package/dist/RequestRoot-3Bj8JZD-.js.map +1 -0
  80. package/dist/RequestSection-HhdJj9hW.js +1582 -0
  81. package/dist/RequestSection-HhdJj9hW.js.map +1 -0
  82. package/dist/ResponseSection-DMJ0tw8E.js +949 -0
  83. package/dist/ResponseSection-DMJ0tw8E.js.map +1 -0
  84. package/dist/ScalarAsciiArt-BjuSnj8e.js +45 -0
  85. package/dist/ScalarAsciiArt-BjuSnj8e.js.map +1 -0
  86. package/dist/SectionFilter-hrtoRLwj.js +99 -0
  87. package/dist/SectionFilter-hrtoRLwj.js.map +1 -0
  88. package/dist/Server-DnA_BzPS.js +303 -0
  89. package/dist/Server-DnA_BzPS.js.map +1 -0
  90. package/dist/ServerVariablesForm-BRZ9XC8o.js +145 -0
  91. package/dist/ServerVariablesForm-BRZ9XC8o.js.map +1 -0
  92. package/dist/Settings-CYZzdJPO.js +347 -0
  93. package/dist/Settings-CYZzdJPO.js.map +1 -0
  94. package/dist/Sidebar-C6AdX6-N.js +73 -0
  95. package/dist/Sidebar-C6AdX6-N.js.map +1 -0
  96. package/dist/SidebarButton-BAagdMDe.js +37 -0
  97. package/dist/SidebarButton-BAagdMDe.js.map +1 -0
  98. package/dist/SidebarListElement-BfTPiihc.js +232 -0
  99. package/dist/SidebarListElement-BfTPiihc.js.map +1 -0
  100. package/dist/TheCommandPalette-Dl9TAeke.js +204 -0
  101. package/dist/TheCommandPalette-Dl9TAeke.js.map +1 -0
  102. package/dist/ValueEmitter-QYkZ9Hdc.js +20 -0
  103. package/dist/ValueEmitter-QYkZ9Hdc.js.map +1 -0
  104. package/dist/ViewLayout-BOXN0IYo.js +17 -0
  105. package/dist/ViewLayout-BOXN0IYo.js.map +1 -0
  106. package/dist/ViewLayoutCollapse-CiTb-Uml.js +86 -0
  107. package/dist/ViewLayoutCollapse-CiTb-Uml.js.map +1 -0
  108. package/dist/ViewLayoutContent-CvMoJYPF.js +13 -0
  109. package/dist/ViewLayoutContent-CvMoJYPF.js.map +1 -0
  110. package/dist/ViewLayoutSection-mUqKbQry.js +23 -0
  111. package/dist/ViewLayoutSection-mUqKbQry.js.map +1 -0
  112. package/dist/WatchModeToggle-D_eAiTWJ.js +41 -0
  113. package/dist/WatchModeToggle-D_eAiTWJ.js.map +1 -0
  114. package/dist/_plugin-vue_export-helper-BmmBcIzD.js +8 -0
  115. package/dist/analytics-BZimCWcw.js +7 -0
  116. package/dist/analytics-BZimCWcw.js.map +1 -0
  117. package/dist/build-request-security-BQjNr2MD.js +41 -0
  118. package/dist/build-request-security-BQjNr2MD.js.map +1 -0
  119. package/dist/code-input-iq-moLxi.js +775 -0
  120. package/dist/code-input-iq-moLxi.js.map +1 -0
  121. package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
  122. package/dist/components/AddressBar/index.d.ts +1 -1
  123. package/dist/components/AddressBar/index.js +5 -4
  124. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  125. package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
  126. package/dist/components/CodeInput/index.d.ts +1 -1
  127. package/dist/components/CodeInput/index.js +2 -4
  128. package/dist/components/CommandPalette/index.d.ts +1 -1
  129. package/dist/components/CommandPalette/index.js +3 -4
  130. package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
  131. package/dist/components/DataTable/index.d.ts +8 -8
  132. package/dist/components/DataTable/index.js +6 -18
  133. package/dist/components/Form/LabelInput.vue.d.ts +1 -1
  134. package/dist/components/HttpMethod/index.d.ts +1 -1
  135. package/dist/components/HttpMethod/index.js +2 -4
  136. package/dist/components/ImportCollection/index.d.ts +1 -1
  137. package/dist/components/ImportCollection/index.js +2 -4
  138. package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
  139. package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
  140. package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
  141. package/dist/components/Server/index.d.ts +3 -3
  142. package/dist/components/Server/index.js +3 -8
  143. package/dist/components/Sidebar/index.d.ts +1 -1
  144. package/dist/components/Sidebar/index.js +2 -4
  145. package/dist/components/ViewLayout/index.d.ts +1 -1
  146. package/dist/components/ViewLayout/index.js +2 -4
  147. package/dist/components/index.d.ts +3 -3
  148. package/dist/components/index.js +7 -8
  149. package/dist/components-CSxJTn6F.js +183 -0
  150. package/dist/components-CSxJTn6F.js.map +1 -0
  151. package/dist/components-ChixwQhN.js +61 -0
  152. package/dist/components-ChixwQhN.js.map +1 -0
  153. package/dist/computer-D7VW3Ruy.js +562 -0
  154. package/dist/computer-D7VW3Ruy.js.map +1 -0
  155. package/dist/consts-CyGRb9dl.js +318 -0
  156. package/dist/consts-CyGRb9dl.js.map +1 -0
  157. package/dist/curl-nbw1OxbV.js +54 -0
  158. package/dist/curl-nbw1OxbV.js.map +1 -0
  159. package/dist/data-table-PL7e8NRO.js +282 -0
  160. package/dist/data-table-PL7e8NRO.js.map +1 -0
  161. package/dist/editor-BZ_J0eze.js +466 -0
  162. package/dist/editor-BZ_J0eze.js.map +1 -0
  163. package/dist/environments-ByLK9lnC.js +592 -0
  164. package/dist/environments-ByLK9lnC.js.map +1 -0
  165. package/dist/formatters-DOGXZq9R.js +36 -0
  166. package/dist/formatters-DOGXZq9R.js.map +1 -0
  167. package/dist/forms-CZX6cFDS.js +42 -0
  168. package/dist/forms-CZX6cFDS.js.map +1 -0
  169. package/dist/get-active-environment-CkxyQ1dM.js +19 -0
  170. package/dist/get-active-environment-CkxyQ1dM.js.map +1 -0
  171. package/dist/get-resolved-url-BUCwrBzc.js +30 -0
  172. package/dist/get-resolved-url-BUCwrBzc.js.map +1 -0
  173. package/dist/get-server-url-o3On8CEr.js +32 -0
  174. package/dist/get-server-url-o3On8CEr.js.map +1 -0
  175. package/dist/get-servers-B_WNlQWB.js +106 -0
  176. package/dist/get-servers-B_WNlQWB.js.map +1 -0
  177. package/dist/get-snippet-DBRUSfZ2.js +39 -0
  178. package/dist/get-snippet-DBRUSfZ2.js.map +1 -0
  179. package/dist/global-cookies-D3ZS9ON3.js +184 -0
  180. package/dist/global-cookies-D3ZS9ON3.js.map +1 -0
  181. package/dist/hooks/index.d.ts +4 -4
  182. package/dist/hooks/index.js +3 -11
  183. package/dist/hooks/useSidebar.d.ts +1 -1
  184. package/dist/hooks-BvZxH4XB.js +80 -0
  185. package/dist/hooks-BvZxH4XB.js.map +1 -0
  186. package/dist/index.d.ts +3 -3
  187. package/dist/index.js +8 -12
  188. package/dist/layout-BWiL7dfb.js +81 -0
  189. package/dist/layout-BWiL7dfb.js.map +1 -0
  190. package/dist/layouts/App/create-api-client-app.d.ts +9 -9
  191. package/dist/layouts/App/index.d.ts +2 -2
  192. package/dist/layouts/App/index.js +5 -7
  193. package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
  194. package/dist/layouts/Modal/index.d.ts +2 -2
  195. package/dist/layouts/Modal/index.js +3 -4
  196. package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
  197. package/dist/layouts/Web/index.d.ts +2 -2
  198. package/dist/layouts/Web/index.js +101 -6
  199. package/dist/layouts/Web/index.js.map +1 -0
  200. package/dist/libs/create-client.d.ts +9 -9
  201. package/dist/libs/create-client.d.ts.map +1 -1
  202. package/dist/libs/environment-parser.d.ts +1 -1
  203. package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
  204. package/dist/libs/hot-keys.d.ts +1 -1
  205. package/dist/libs/importers/index.d.ts +1 -1
  206. package/dist/libs/importers/index.js +2 -4
  207. package/dist/libs/index.d.ts +15 -15
  208. package/dist/libs/index.js +6 -45
  209. package/dist/libs/local-storage.d.ts +1 -1
  210. package/dist/libs/send-request/create-request-operation.d.ts +3 -3
  211. package/dist/libs/send-request/index.d.ts +3 -3
  212. package/dist/libs/send-request/index.js +3 -8
  213. package/dist/libs-spbv4P0g.js +249 -0
  214. package/dist/libs-spbv4P0g.js.map +1 -0
  215. package/dist/monacoeditorwork/json.worker.bundle.js +8 -8
  216. package/dist/monacoeditorwork/yaml.worker.bundle.js +151 -151
  217. package/dist/operation-block-BnMIKAOh.js +1624 -0
  218. package/dist/operation-block-BnMIKAOh.js.map +1 -0
  219. package/dist/operation-code-sample-ZUTueV3v.js +1726 -0
  220. package/dist/operation-code-sample-ZUTueV3v.js.map +1 -0
  221. package/dist/parse-curl-BtypQT3D.js +106 -0
  222. package/dist/parse-curl-BtypQT3D.js.map +1 -0
  223. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  224. package/dist/plugins/index.d.ts +2 -2
  225. package/dist/plugins/index.js +2 -7
  226. package/dist/plugins/plugin-manager.d.ts +10 -4
  227. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  228. package/dist/plugins-B52hCIyZ.js +50 -0
  229. package/dist/plugins-B52hCIyZ.js.map +1 -0
  230. package/dist/rabbitjump-CMZXAR6d.js +9 -0
  231. package/dist/rabbitjump-CMZXAR6d.js.map +1 -0
  232. package/dist/request-block-DwsGy64Q.js +1466 -0
  233. package/dist/request-block-DwsGy64Q.js.map +1 -0
  234. package/dist/resize-D2IYvVdh.js +114 -0
  235. package/dist/resize-D2IYvVdh.js.map +1 -0
  236. package/dist/response-block-DmkaDZYs.js +1188 -0
  237. package/dist/response-block-DmkaDZYs.js.map +1 -0
  238. package/dist/scalar-address-bar-block--Vs6IBU1.js +425 -0
  239. package/dist/scalar-address-bar-block--Vs6IBU1.js.map +1 -0
  240. package/dist/scalar-auth-selector-block-DI3DLag9.js +1886 -0
  241. package/dist/scalar-auth-selector-block-DI3DLag9.js.map +1 -0
  242. package/dist/search-CmsQQkjn.js +151 -0
  243. package/dist/search-CmsQQkjn.js.map +1 -0
  244. package/dist/send-request-BsTfRiBC.js +348 -0
  245. package/dist/send-request-BsTfRiBC.js.map +1 -0
  246. package/dist/server-tcI-OCyx.js +140 -0
  247. package/dist/server-tcI-OCyx.js.map +1 -0
  248. package/dist/set-request-cookies-BJJhsU4A.js +88 -0
  249. package/dist/set-request-cookies-BJJhsU4A.js.map +1 -0
  250. package/dist/settings-BKk_1lcH.js +455 -0
  251. package/dist/settings-BKk_1lcH.js.map +1 -0
  252. package/dist/sidebar-ceSbYmnt.js +217 -0
  253. package/dist/sidebar-ceSbYmnt.js.map +1 -0
  254. package/dist/store/collections.d.ts +1 -1
  255. package/dist/store/environment.d.ts +1 -1
  256. package/dist/store/events.d.ts +8 -8
  257. package/dist/store/import-spec.d.ts +2 -2
  258. package/dist/store/index.d.ts +2 -2
  259. package/dist/store/index.js +2 -10
  260. package/dist/store/request-example.d.ts +1 -1
  261. package/dist/store/requests.d.ts +1 -1
  262. package/dist/store/security-schemes.d.ts +1 -1
  263. package/dist/store/servers.d.ts +1 -1
  264. package/dist/store/store.d.ts +7 -7
  265. package/dist/store/tags.d.ts +1 -1
  266. package/dist/store/workspace.d.ts +1 -1
  267. package/dist/store-DpSUVhjp.js +1512 -0
  268. package/dist/store-DpSUVhjp.js.map +1 -0
  269. package/dist/string-template-sS5PtY6T.js +64 -0
  270. package/dist/string-template-sS5PtY6T.js.map +1 -0
  271. package/dist/style.css +10372 -1
  272. package/dist/types/index.js +0 -1
  273. package/dist/use-global-hot-keys-D8Ai8Qbm.js +274 -0
  274. package/dist/use-global-hot-keys-D8Ai8Qbm.js.map +1 -0
  275. package/dist/useSidebar-DLTwHDI-.js +45 -0
  276. package/dist/useSidebar-DLTwHDI-.js.map +1 -0
  277. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
  278. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
  279. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
  280. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
  281. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  282. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
  283. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
  284. package/dist/v2/blocks/operation-block/index.d.ts +4 -4
  285. package/dist/v2/blocks/operation-block/index.js +20 -11
  286. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
  287. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
  288. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
  289. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -2
  290. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
  291. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
  292. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
  293. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +1 -1
  294. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
  295. package/dist/v2/blocks/operation-code-sample/index.d.ts +6 -6
  296. package/dist/v2/blocks/operation-code-sample/index.js +2 -16
  297. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
  298. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
  299. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +1 -1
  300. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
  301. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  302. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +3 -2
  303. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
  304. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
  305. package/dist/v2/blocks/request-block/index.d.ts +1 -1
  306. package/dist/v2/blocks/request-block/index.js +9 -4
  307. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
  308. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
  309. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
  310. package/dist/v2/blocks/response-block/index.d.ts +1 -1
  311. package/dist/v2/blocks/response-block/index.js +6 -4
  312. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
  313. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +2 -2
  314. package/dist/v2/blocks/scalar-address-bar-block/index.js +5 -4
  315. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
  316. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  317. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
  318. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
  319. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
  320. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
  321. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
  322. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +1 -1
  323. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +4 -4
  324. package/dist/v2/blocks/scalar-auth-selector-block/index.js +6 -8
  325. package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
  326. package/dist/v2/components/code-input/index.d.ts +1 -1
  327. package/dist/v2/components/code-input/index.js +2 -4
  328. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
  329. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
  330. package/dist/v2/components/data-table/index.d.ts +8 -8
  331. package/dist/v2/components/data-table/index.js +3 -18
  332. package/dist/v2/components/forms/index.d.ts +1 -1
  333. package/dist/v2/components/forms/index.js +2 -4
  334. package/dist/v2/components/layout/index.d.ts +1 -1
  335. package/dist/v2/components/layout/index.js +2 -4
  336. package/dist/v2/components/modals/index.d.ts +1 -1
  337. package/dist/v2/components/modals/index.js +37 -3
  338. package/dist/v2/components/modals/index.js.map +1 -0
  339. package/dist/v2/components/resize/index.d.ts +2 -2
  340. package/dist/v2/components/resize/index.js +2 -6
  341. package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
  342. package/dist/v2/components/server/index.d.ts +1 -1
  343. package/dist/v2/components/server/index.js +2 -4
  344. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
  345. package/dist/v2/components/sidebar/index.d.ts +3 -3
  346. package/dist/v2/components/sidebar/index.js +3 -8
  347. package/dist/v2/features/app/App.vue.d.ts +4 -4
  348. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
  349. package/dist/v2/features/app/components/index.d.ts +1 -1
  350. package/dist/v2/features/app/components/index.js +10 -5
  351. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +3 -3
  352. package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
  353. package/dist/v2/features/app/helpers/routes.d.ts +5 -5
  354. package/dist/v2/features/app/hooks/use-theme.d.ts +1 -1
  355. package/dist/v2/features/app/index.d.ts +8 -8
  356. package/dist/v2/features/app/index.js +3161 -19
  357. package/dist/v2/features/app/index.js.map +1 -0
  358. package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
  359. package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
  360. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
  361. package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
  362. package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
  363. package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
  364. package/dist/v2/features/collection/components/Editor/index.d.ts +1 -1
  365. package/dist/v2/features/collection/components/Editor/index.js +2 -4
  366. package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
  367. package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
  368. package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
  369. package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
  370. package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
  371. package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts +1 -1
  372. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +10 -45
  373. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  374. package/dist/v2/features/command-palette/index.d.ts +2 -2
  375. package/dist/v2/features/command-palette/index.js +3 -6
  376. package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
  377. package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +1 -1
  378. package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts +1 -1
  379. package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
  380. package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
  381. package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
  382. package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
  383. package/dist/v2/features/editor/index.d.ts +4 -4
  384. package/dist/v2/features/editor/index.js +2 -10
  385. package/dist/v2/features/environments/index.d.ts +1 -1
  386. package/dist/v2/features/environments/index.js +4 -4
  387. package/dist/v2/features/global-cookies/index.d.ts +1 -1
  388. package/dist/v2/features/global-cookies/index.js +4 -4
  389. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  390. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
  391. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
  392. package/dist/v2/features/modal/index.d.ts +3 -3
  393. package/dist/v2/features/modal/index.js +639 -7
  394. package/dist/v2/features/modal/index.js.map +1 -0
  395. package/dist/v2/features/modal/modal-events.d.ts +1 -1
  396. package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
  397. package/dist/v2/features/operation/index.d.ts +5 -5
  398. package/dist/v2/features/operation/index.js +19 -12
  399. package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
  400. package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
  401. package/dist/v2/features/search/index.d.ts +1 -1
  402. package/dist/v2/features/search/index.js +2 -4
  403. package/dist/v2/features/settings/index.d.ts +2 -2
  404. package/dist/v2/features/settings/index.js +2 -6
  405. package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
  406. package/dist/v2/helpers/get-tab-details.d.ts +1 -1
  407. package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
  408. package/dist/v2/helpers/index.d.ts +2 -2
  409. package/dist/v2/helpers/index.js +3 -6
  410. package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
  411. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
  412. package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
  413. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
  414. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
  415. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
  416. package/dist/views/Components/CodeSnippet/index.d.ts +4 -4
  417. package/dist/views/Components/CodeSnippet/index.js +3 -10
  418. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
  419. package/dist/views/Environment/handle-drag.d.ts +1 -1
  420. package/dist/views/Request/Request.vue.d.ts +1 -1
  421. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
  422. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
  423. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
  424. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
  425. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
  426. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
  427. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
  428. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +3 -3
  429. package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -8
  430. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
  431. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
  432. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
  433. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
  434. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
  435. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
  436. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
  437. package/dist/views/Request/RequestSection/index.d.ts +2 -2
  438. package/dist/views/Request/RequestSection/index.js +42 -5
  439. package/dist/views/Request/RequestSection/index.js.map +1 -0
  440. package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
  441. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
  442. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
  443. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
  444. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
  445. package/dist/views/Request/ResponseSection/index.d.ts +2 -2
  446. package/dist/views/Request/ResponseSection/index.js +7 -6
  447. package/dist/views/Request/components/index.d.ts +1 -1
  448. package/dist/views/Request/components/index.js +2 -4
  449. package/dist/views/Request/consts/index.d.ts +2 -2
  450. package/dist/views/Request/consts/index.js +2 -10
  451. package/dist/views/Request/handle-drag.d.ts +2 -2
  452. package/dist/views/Request/libs/auth.d.ts +1 -1
  453. package/dist/views/Request/libs/index.d.ts +3 -3
  454. package/dist/views/Request/libs/index.js +3 -22
  455. package/dist/views/Request/libs/oauth2.d.ts +1 -1
  456. package/dist/views/Request/libs/watch-mode.d.ts +2 -2
  457. package/dist/views/Request/types/index.js +0 -1
  458. package/dist/watch-mode-Dbaqd9bG.js +375 -0
  459. package/dist/watch-mode-Dbaqd9bG.js.map +1 -0
  460. package/package.json +29 -33
  461. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  462. package/dist/analytics.js +0 -9
  463. package/dist/assets/computer.ascii.js +0 -34
  464. package/dist/assets/keycap.ascii.js +0 -25
  465. package/dist/assets/rabbit.ascii.js +0 -11
  466. package/dist/assets/rabbitjump.ascii.js +0 -11
  467. package/dist/components/AddressBar/AddressBar.vue.js +0 -7
  468. package/dist/components/AddressBar/AddressBar.vue2.js +0 -160
  469. package/dist/components/AddressBar/AddressBarHistory.vue.js +0 -7
  470. package/dist/components/AddressBar/AddressBarHistory.vue2.js +0 -98
  471. package/dist/components/AddressBar/httpStatusCodeColors.js +0 -38
  472. package/dist/components/CodeInput/CodeInput.vue.js +0 -8
  473. package/dist/components/CodeInput/CodeInput.vue2.js +0 -209
  474. package/dist/components/CodeInput/codeVariableWidget.js +0 -111
  475. package/dist/components/CommandPalette/CommandActionForm.vue.js +0 -44
  476. package/dist/components/CommandPalette/CommandActionForm.vue2.js +0 -4
  477. package/dist/components/CommandPalette/CommandActionInput.vue.js +0 -52
  478. package/dist/components/CommandPalette/CommandActionInput.vue2.js +0 -4
  479. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +0 -80
  480. package/dist/components/CommandPalette/CommandPaletteCollection.vue2.js +0 -4
  481. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +0 -116
  482. package/dist/components/CommandPalette/CommandPaletteExample.vue2.js +0 -4
  483. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +0 -217
  484. package/dist/components/CommandPalette/CommandPaletteImport.vue2.js +0 -4
  485. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +0 -7
  486. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +0 -136
  487. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +0 -123
  488. package/dist/components/CommandPalette/CommandPaletteServer.vue2.js +0 -4
  489. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +0 -84
  490. package/dist/components/CommandPalette/CommandPaletteTag.vue2.js +0 -4
  491. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +0 -48
  492. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +0 -4
  493. package/dist/components/CommandPalette/TheCommandPalette.vue.js +0 -7
  494. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -305
  495. package/dist/components/CommandPalette/WatchModeToggle.vue.js +0 -39
  496. package/dist/components/CommandPalette/WatchModeToggle.vue2.js +0 -4
  497. package/dist/components/DataTable/DataTable.vue.js +0 -38
  498. package/dist/components/DataTable/DataTable.vue2.js +0 -4
  499. package/dist/components/DataTable/DataTableCell.vue.js +0 -26
  500. package/dist/components/DataTable/DataTableCell.vue2.js +0 -4
  501. package/dist/components/DataTable/DataTableCheckbox.vue.js +0 -53
  502. package/dist/components/DataTable/DataTableCheckbox.vue2.js +0 -4
  503. package/dist/components/DataTable/DataTableHeader.vue.js +0 -18
  504. package/dist/components/DataTable/DataTableHeader.vue2.js +0 -4
  505. package/dist/components/DataTable/DataTableInput.vue.js +0 -7
  506. package/dist/components/DataTable/DataTableInput.vue2.js +0 -124
  507. package/dist/components/DataTable/DataTableInputSelect.vue.js +0 -146
  508. package/dist/components/DataTable/DataTableInputSelect.vue2.js +0 -4
  509. package/dist/components/DataTable/DataTableRow.vue.js +0 -12
  510. package/dist/components/DataTable/DataTableText.vue.js +0 -23
  511. package/dist/components/DataTable/DataTableText.vue2.js +0 -4
  512. package/dist/components/EmptyState.vue.js +0 -7
  513. package/dist/components/EmptyState.vue2.js +0 -42
  514. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +0 -113
  515. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +0 -4
  516. package/dist/components/Form/Form.vue.js +0 -83
  517. package/dist/components/Form/Form.vue2.js +0 -4
  518. package/dist/components/Form/LabelInput.vue.js +0 -7
  519. package/dist/components/Form/LabelInput.vue2.js +0 -42
  520. package/dist/components/HelpfulLink.vue.js +0 -20
  521. package/dist/components/HelpfulLink.vue2.js +0 -4
  522. package/dist/components/HttpMethod/HttpMethod.vue.js +0 -7
  523. package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -62
  524. package/dist/components/IconSelector.vue.js +0 -75
  525. package/dist/components/IconSelector.vue2.js +0 -4
  526. package/dist/components/ImportCollection/DropEventListener.vue.js +0 -81
  527. package/dist/components/ImportCollection/DropEventListener.vue2.js +0 -4
  528. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +0 -77
  529. package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +0 -4
  530. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +0 -208
  531. package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +0 -5
  532. package/dist/components/ImportCollection/ImportNowButton.vue.js +0 -73
  533. package/dist/components/ImportCollection/ImportNowButton.vue2.js +0 -4
  534. package/dist/components/ImportCollection/IntegrationLogo.vue.js +0 -44
  535. package/dist/components/ImportCollection/IntegrationLogo.vue2.js +0 -4
  536. package/dist/components/ImportCollection/PasteEventListener.vue.js +0 -24
  537. package/dist/components/ImportCollection/PasteEventListener.vue2.js +0 -4
  538. package/dist/components/ImportCollection/PrefetchError.vue.js +0 -27
  539. package/dist/components/ImportCollection/PrefetchError.vue2.js +0 -4
  540. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +0 -20
  541. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +0 -4
  542. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +0 -134
  543. package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +0 -4
  544. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +0 -106
  545. package/dist/components/ImportCollection/utils/get-openapi-version.js +0 -20
  546. package/dist/components/ImportCollection/utils/import-collection.js +0 -29
  547. package/dist/components/ImportCollection/utils/is-document.js +0 -9
  548. package/dist/components/ImportCollection/utils/is-url.js +0 -9
  549. package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +0 -7
  550. package/dist/components/OpenApiClientButton.vue.js +0 -7
  551. package/dist/components/OpenApiClientButton.vue2.js +0 -48
  552. package/dist/components/ScalarAsciiArt.vue.js +0 -7
  553. package/dist/components/ScalarAsciiArt.vue2.js +0 -37
  554. package/dist/components/Search/useSearch.js +0 -78
  555. package/dist/components/SectionFilter.vue.js +0 -7
  556. package/dist/components/SectionFilter.vue2.js +0 -64
  557. package/dist/components/SectionFilterButton.vue.js +0 -23
  558. package/dist/components/SectionFilterButton.vue2.js +0 -4
  559. package/dist/components/Server/ServerDropdown.vue.js +0 -132
  560. package/dist/components/Server/ServerDropdown.vue2.js +0 -4
  561. package/dist/components/Server/ServerDropdownItem.vue.js +0 -7
  562. package/dist/components/Server/ServerDropdownItem.vue2.js +0 -84
  563. package/dist/components/Server/ServerSelector.vue.js +0 -82
  564. package/dist/components/Server/ServerSelector.vue2.js +0 -4
  565. package/dist/components/Server/ServerVariablesForm.vue.js +0 -49
  566. package/dist/components/Server/ServerVariablesForm.vue2.js +0 -4
  567. package/dist/components/Server/ServerVariablesSelect.vue.js +0 -54
  568. package/dist/components/Server/ServerVariablesSelect.vue2.js +0 -4
  569. package/dist/components/Server/ServerVariablesTextbox.vue.js +0 -29
  570. package/dist/components/Server/ServerVariablesTextbox.vue2.js +0 -4
  571. package/dist/components/SideNav/DownloadAppButton.vue.js +0 -7
  572. package/dist/components/SideNav/DownloadAppButton.vue2.js +0 -33
  573. package/dist/components/SideNav/SideHelp.vue.js +0 -127
  574. package/dist/components/SideNav/SideHelp.vue2.js +0 -4
  575. package/dist/components/SideNav/SideNav.vue.js +0 -96
  576. package/dist/components/SideNav/SideNav.vue2.js +0 -4
  577. package/dist/components/SideNav/SideNavGroup.vue.js +0 -16
  578. package/dist/components/SideNav/SideNavGroup.vue2.js +0 -4
  579. package/dist/components/SideNav/SideNavLink.vue.js +0 -39
  580. package/dist/components/SideNav/SideNavLink.vue2.js +0 -4
  581. package/dist/components/SideNav/SideNavRouterLink.vue.js +0 -27
  582. package/dist/components/SideNav/SideNavRouterLink.vue2.js +0 -4
  583. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +0 -30
  584. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue2.js +0 -4
  585. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +0 -58
  586. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +0 -4
  587. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +0 -29
  588. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +0 -4
  589. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +0 -46
  590. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +0 -4
  591. package/dist/components/Sidebar/Sidebar.vue.js +0 -7
  592. package/dist/components/Sidebar/Sidebar.vue2.js +0 -63
  593. package/dist/components/Sidebar/SidebarButton.vue.js +0 -33
  594. package/dist/components/Sidebar/SidebarButton.vue2.js +0 -4
  595. package/dist/components/Sidebar/SidebarList.vue.js +0 -12
  596. package/dist/components/Sidebar/SidebarListElement.vue.js +0 -8
  597. package/dist/components/Sidebar/SidebarListElement.vue2.js +0 -94
  598. package/dist/components/Sidebar/SidebarListElementActions.vue.js +0 -86
  599. package/dist/components/Sidebar/SidebarListElementActions.vue2.js +0 -4
  600. package/dist/components/Sidebar/SidebarToggle.vue.js +0 -49
  601. package/dist/components/Sidebar/SidebarToggle.vue2.js +0 -4
  602. package/dist/components/TopNav/TopNav.vue.js +0 -210
  603. package/dist/components/TopNav/TopNav.vue2.js +0 -4
  604. package/dist/components/TopNav/TopNavItem.vue.js +0 -7
  605. package/dist/components/TopNav/TopNavItem.vue2.js +0 -138
  606. package/dist/components/ViewLayout/ViewLayout.vue.js +0 -18
  607. package/dist/components/ViewLayout/ViewLayout.vue2.js +0 -4
  608. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +0 -92
  609. package/dist/components/ViewLayout/ViewLayoutCollapse.vue2.js +0 -4
  610. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +0 -12
  611. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +0 -23
  612. package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +0 -4
  613. package/dist/constants.js +0 -40
  614. package/dist/data/httpHeaders.js +0 -537
  615. package/dist/hooks/useAnalytics.js +0 -11
  616. package/dist/hooks/useClientConfig.js +0 -7
  617. package/dist/hooks/useFileDialog.js +0 -21
  618. package/dist/hooks/useLayout.js +0 -8
  619. package/dist/hooks/useResponseBody.js +0 -20
  620. package/dist/hooks/useSidebar.js +0 -28
  621. package/dist/layouts/App/ApiClientApp.vue.js +0 -70
  622. package/dist/layouts/App/ApiClientApp.vue3.js +0 -5
  623. package/dist/layouts/App/MainLayout.vue.js +0 -26
  624. package/dist/layouts/App/MainLayout.vue2.js +0 -4
  625. package/dist/layouts/App/create-api-client-app.js +0 -35
  626. package/dist/layouts/App/hotkeys.js +0 -21
  627. package/dist/layouts/Modal/ApiClientModal.vue.js +0 -30
  628. package/dist/layouts/Modal/ApiClientModal.vue2.js +0 -4
  629. package/dist/layouts/Modal/create-api-client-modal.js +0 -32
  630. package/dist/layouts/Web/ApiClientWeb.vue.js +0 -64
  631. package/dist/layouts/Web/ApiClientWeb.vue3.js +0 -5
  632. package/dist/layouts/Web/create-api-client-web.js +0 -32
  633. package/dist/libs/create-client.js +0 -189
  634. package/dist/libs/electron.js +0 -4
  635. package/dist/libs/env-helpers.js +0 -6
  636. package/dist/libs/environment-parser.js +0 -18
  637. package/dist/libs/errors.js +0 -16
  638. package/dist/libs/event-bus.js +0 -32
  639. package/dist/libs/extractAttachmentFilename.js +0 -18
  640. package/dist/libs/find-request.js +0 -23
  641. package/dist/libs/formatters.js +0 -10
  642. package/dist/libs/get-request-uid-by-path-method.js +0 -18
  643. package/dist/libs/getOpenApiDocumentDetails.js +0 -40
  644. package/dist/libs/hot-keys.js +0 -44
  645. package/dist/libs/importers/curl.js +0 -53
  646. package/dist/libs/isUrl.js +0 -7
  647. package/dist/libs/local-storage.js +0 -41
  648. package/dist/libs/normalize-headers.js +0 -27
  649. package/dist/libs/parse-curl.js +0 -59
  650. package/dist/libs/postman.js +0 -37
  651. package/dist/libs/send-request/build-request-security.js +0 -35
  652. package/dist/libs/send-request/create-fetch-body.js +0 -25
  653. package/dist/libs/send-request/create-fetch-headers.js +0 -11
  654. package/dist/libs/send-request/create-fetch-query-params.js +0 -33
  655. package/dist/libs/send-request/create-request-operation.js +0 -140
  656. package/dist/libs/send-request/decode-buffer.js +0 -9
  657. package/dist/libs/send-request/set-request-cookies.js +0 -58
  658. package/dist/libs/string-template.js +0 -42
  659. package/dist/libs/validate-parameters.js +0 -16
  660. package/dist/plugins/hooks/usePluginManager.js +0 -10
  661. package/dist/plugins/plugin-manager.js +0 -26
  662. package/dist/routes.js +0 -210
  663. package/dist/store/active-entities.js +0 -118
  664. package/dist/store/collections.js +0 -73
  665. package/dist/store/cookies.js +0 -13
  666. package/dist/store/environment.js +0 -32
  667. package/dist/store/events.js +0 -35
  668. package/dist/store/import-spec.js +0 -55
  669. package/dist/store/request-example.js +0 -43
  670. package/dist/store/requests.js +0 -97
  671. package/dist/store/router-params.js +0 -22
  672. package/dist/store/security-schemes.js +0 -55
  673. package/dist/store/servers.js +0 -39
  674. package/dist/store/store.js +0 -144
  675. package/dist/store/tags.js +0 -45
  676. package/dist/store/workspace.js +0 -52
  677. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +0 -242
  678. package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +0 -4
  679. package/dist/v2/blocks/operation-block/components/Header.vue.js +0 -7
  680. package/dist/v2/blocks/operation-block/components/Header.vue2.js +0 -100
  681. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +0 -40
  682. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +0 -31
  683. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +0 -107
  684. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +0 -46
  685. package/dist/v2/blocks/operation-block/helpers/build-request.js +0 -70
  686. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +0 -25
  687. package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +0 -9
  688. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +0 -14
  689. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +0 -4
  690. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +0 -7
  691. package/dist/v2/blocks/operation-block/helpers/get-example.js +0 -36
  692. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +0 -17
  693. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +0 -4
  694. package/dist/v2/blocks/operation-block/helpers/get-server-url.js +0 -12
  695. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +0 -31
  696. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +0 -43
  697. package/dist/v2/blocks/operation-block/helpers/response-cache.js +0 -12
  698. package/dist/v2/blocks/operation-block/helpers/send-request.js +0 -122
  699. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +0 -49
  700. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +0 -17
  701. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +0 -56
  702. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue2.js +0 -4
  703. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +0 -30
  704. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +0 -4
  705. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +0 -7
  706. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +0 -227
  707. package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +0 -22
  708. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +0 -27
  709. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +0 -40
  710. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +0 -20
  711. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +0 -4
  712. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +0 -302
  713. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +0 -28
  714. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js +0 -10
  715. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +0 -67
  716. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +0 -66
  717. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -172
  718. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js +0 -55
  719. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +0 -18
  720. package/dist/v2/blocks/request-block/RequestBlock.vue.js +0 -7
  721. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +0 -347
  722. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +0 -7
  723. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +0 -191
  724. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +0 -84
  725. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +0 -4
  726. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +0 -135
  727. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +0 -4
  728. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +0 -78
  729. package/dist/v2/blocks/request-block/components/RequestParams.vue2.js +0 -4
  730. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +0 -7
  731. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +0 -74
  732. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +0 -204
  733. package/dist/v2/blocks/request-block/components/RequestTableRow.vue2.js +0 -4
  734. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +0 -7
  735. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +0 -63
  736. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +0 -55
  737. package/dist/v2/blocks/request-block/helpers/files.js +0 -7
  738. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +0 -26
  739. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +0 -29
  740. package/dist/v2/blocks/request-block/helpers/get-parameter-content.js +0 -9
  741. package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js +0 -6
  742. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +0 -16
  743. package/dist/v2/blocks/request-block/helpers/group-by.js +0 -10
  744. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +0 -7
  745. package/dist/v2/blocks/request-block/helpers/validate-parameter.js +0 -32
  746. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +0 -7
  747. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +0 -180
  748. package/dist/v2/blocks/response-block/components/Headers.vue.js +0 -96
  749. package/dist/v2/blocks/response-block/components/Headers.vue2.js +0 -4
  750. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +0 -7
  751. package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +0 -87
  752. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +0 -36
  753. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue2.js +0 -4
  754. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +0 -14
  755. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +0 -7
  756. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +0 -63
  757. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +0 -7
  758. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue2.js +0 -41
  759. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +0 -94
  760. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue2.js +0 -4
  761. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +0 -25
  762. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue2.js +0 -4
  763. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +0 -52
  764. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue3.js +0 -5
  765. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +0 -54
  766. package/dist/v2/blocks/response-block/components/ResponseCookies.vue2.js +0 -4
  767. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +0 -7
  768. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +0 -79
  769. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +0 -7
  770. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +0 -46
  771. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +0 -67
  772. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue2.js +0 -4
  773. package/dist/v2/blocks/response-block/helpers/extract-filename.js +0 -18
  774. package/dist/v2/blocks/response-block/helpers/get-content-length.js +0 -12
  775. package/dist/v2/blocks/response-block/helpers/media-types.js +0 -126
  776. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +0 -12
  777. package/dist/v2/blocks/response-block/helpers/process-response-body.js +0 -16
  778. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +0 -7
  779. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +0 -208
  780. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +0 -7
  781. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +0 -95
  782. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +0 -145
  783. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue2.js +0 -4
  784. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -38
  785. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +0 -25
  786. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -184
  787. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -4
  788. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -51
  789. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
  790. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -330
  791. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
  792. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +0 -7
  793. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +0 -76
  794. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -165
  795. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue3.js +0 -5
  796. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +0 -91
  797. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +0 -4
  798. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -83
  799. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -4
  800. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -46
  801. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
  802. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -244
  803. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
  804. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +0 -97
  805. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +0 -135
  806. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +0 -35
  807. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +0 -7
  808. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +0 -23
  809. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +0 -139
  810. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +0 -27
  811. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +0 -64
  812. package/dist/v2/components/callout/Callout.vue.js +0 -7
  813. package/dist/v2/components/callout/Callout.vue2.js +0 -43
  814. package/dist/v2/components/code-input/CodeInput.vue.js +0 -8
  815. package/dist/v2/components/code-input/CodeInput.vue2.js +0 -213
  816. package/dist/v2/components/code-input/code-variable-widget.js +0 -106
  817. package/dist/v2/components/data-table/DataTable.vue.js +0 -38
  818. package/dist/v2/components/data-table/DataTable.vue2.js +0 -4
  819. package/dist/v2/components/data-table/DataTableCell.vue.js +0 -26
  820. package/dist/v2/components/data-table/DataTableCell.vue2.js +0 -4
  821. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +0 -53
  822. package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +0 -4
  823. package/dist/v2/components/data-table/DataTableHeader.vue.js +0 -18
  824. package/dist/v2/components/data-table/DataTableHeader.vue2.js +0 -4
  825. package/dist/v2/components/data-table/DataTableInput.vue.js +0 -7
  826. package/dist/v2/components/data-table/DataTableInput.vue2.js +0 -121
  827. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +0 -149
  828. package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +0 -4
  829. package/dist/v2/components/data-table/DataTableRow.vue.js +0 -12
  830. package/dist/v2/components/data-table/DataTableText.vue.js +0 -23
  831. package/dist/v2/components/data-table/DataTableText.vue2.js +0 -4
  832. package/dist/v2/components/forms/ConfirmationForm.vue.js +0 -45
  833. package/dist/v2/components/forms/ConfirmationForm.vue2.js +0 -4
  834. package/dist/v2/components/layout/CollapsibleSection.vue.js +0 -89
  835. package/dist/v2/components/layout/CollapsibleSection.vue2.js +0 -4
  836. package/dist/v2/components/layout/ValueEmitter.vue.js +0 -21
  837. package/dist/v2/components/layout/ValueEmitter.vue2.js +0 -4
  838. package/dist/v2/components/modals/DeleteModal.vue.js +0 -31
  839. package/dist/v2/components/modals/DeleteModal.vue2.js +0 -4
  840. package/dist/v2/components/modals/ModalClientContainer.vue.js +0 -7
  841. package/dist/v2/components/modals/ModalClientContainer.vue2.js +0 -60
  842. package/dist/v2/components/resize/Resize.vue.js +0 -8
  843. package/dist/v2/components/resize/Resize.vue2.js +0 -36
  844. package/dist/v2/components/resize/use-split-resize.js +0 -57
  845. package/dist/v2/components/server/ServerDropdown.vue.js +0 -91
  846. package/dist/v2/components/server/ServerDropdown.vue2.js +0 -4
  847. package/dist/v2/components/server/ServerDropdownItem.vue.js +0 -7
  848. package/dist/v2/components/server/ServerDropdownItem.vue2.js +0 -49
  849. package/dist/v2/components/sidebar/Sidebar.vue.js +0 -115
  850. package/dist/v2/components/sidebar/Sidebar.vue2.js +0 -4
  851. package/dist/v2/components/sidebar/SidebarMenu.vue.js +0 -52
  852. package/dist/v2/components/sidebar/SidebarMenu.vue2.js +0 -4
  853. package/dist/v2/components/sidebar/SidebarToggle.vue.js +0 -52
  854. package/dist/v2/components/sidebar/SidebarToggle.vue2.js +0 -4
  855. package/dist/v2/features/app/App.vue.js +0 -152
  856. package/dist/v2/features/app/App.vue3.js +0 -5
  857. package/dist/v2/features/app/app-events.js +0 -251
  858. package/dist/v2/features/app/app-state.js +0 -415
  859. package/dist/v2/features/app/components/AppSidebar.vue.js +0 -7
  860. package/dist/v2/features/app/components/AppSidebar.vue2.js +0 -304
  861. package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +0 -56
  862. package/dist/v2/features/app/components/CreateWorkspaceModal.vue2.js +0 -4
  863. package/dist/v2/features/app/components/DesktopTab.vue.js +0 -7
  864. package/dist/v2/features/app/components/DesktopTab.vue2.js +0 -134
  865. package/dist/v2/features/app/components/DesktopTabs.vue.js +0 -56
  866. package/dist/v2/features/app/components/DesktopTabs.vue2.js +0 -4
  867. package/dist/v2/features/app/components/DownloadAppButton.vue.js +0 -7
  868. package/dist/v2/features/app/components/DownloadAppButton.vue2.js +0 -19
  869. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +0 -185
  870. package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +0 -4
  871. package/dist/v2/features/app/components/SplashScreen.vue.js +0 -7
  872. package/dist/v2/features/app/components/SplashScreen.vue2.js +0 -18
  873. package/dist/v2/features/app/helpers/create-api-client-app.js +0 -36
  874. package/dist/v2/features/app/helpers/filter-workspaces.js +0 -5
  875. package/dist/v2/features/app/helpers/get-route-param.js +0 -9
  876. package/dist/v2/features/app/helpers/group-workspaces.js +0 -23
  877. package/dist/v2/features/app/helpers/routes.js +0 -157
  878. package/dist/v2/features/app/hooks/use-document-watcher.js +0 -66
  879. package/dist/v2/features/app/hooks/use-theme.js +0 -48
  880. package/dist/v2/features/collection/DocumentCollection.vue.js +0 -336
  881. package/dist/v2/features/collection/DocumentCollection.vue3.js +0 -5
  882. package/dist/v2/features/collection/OperationCollection.vue.js +0 -86
  883. package/dist/v2/features/collection/OperationCollection.vue2.js +0 -4
  884. package/dist/v2/features/collection/WorkspaceCollection.vue.js +0 -68
  885. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +0 -4
  886. package/dist/v2/features/collection/components/Authentication.vue.js +0 -7
  887. package/dist/v2/features/collection/components/Authentication.vue2.js +0 -154
  888. package/dist/v2/features/collection/components/Cookies.vue.js +0 -52
  889. package/dist/v2/features/collection/components/Cookies.vue2.js +0 -4
  890. package/dist/v2/features/collection/components/Editor/Editor.vue.js +0 -7
  891. package/dist/v2/features/collection/components/Editor/Editor.vue2.js +0 -344
  892. package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +0 -78
  893. package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue2.js +0 -4
  894. package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +0 -83
  895. package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue2.js +0 -4
  896. package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +0 -10
  897. package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +0 -5
  898. package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +0 -5
  899. package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +0 -21
  900. package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +0 -5
  901. package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +0 -25
  902. package/dist/v2/features/collection/components/Environment.vue.js +0 -54
  903. package/dist/v2/features/collection/components/Environment.vue2.js +0 -4
  904. package/dist/v2/features/collection/components/Form.vue.js +0 -78
  905. package/dist/v2/features/collection/components/Form.vue2.js +0 -4
  906. package/dist/v2/features/collection/components/LabelInput.vue.js +0 -7
  907. package/dist/v2/features/collection/components/LabelInput.vue2.js +0 -35
  908. package/dist/v2/features/collection/components/Overview.vue.js +0 -7
  909. package/dist/v2/features/collection/components/Overview.vue2.js +0 -208
  910. package/dist/v2/features/collection/components/Servers.vue.js +0 -210
  911. package/dist/v2/features/collection/components/Servers.vue2.js +0 -4
  912. package/dist/v2/features/collection/components/Settings.vue.js +0 -61
  913. package/dist/v2/features/collection/components/Settings.vue2.js +0 -4
  914. package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.js +0 -7
  915. package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue2.js +0 -136
  916. package/dist/v2/features/collection/components/Tabs.vue.js +0 -44
  917. package/dist/v2/features/collection/components/Tabs.vue2.js +0 -4
  918. package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +0 -13
  919. package/dist/v2/features/command-palette/TheCommandPalette.vue.js +0 -7
  920. package/dist/v2/features/command-palette/TheCommandPalette.vue2.js +0 -152
  921. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +0 -48
  922. package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +0 -4
  923. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +0 -52
  924. package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +0 -4
  925. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +0 -211
  926. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +0 -4
  927. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +0 -182
  928. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +0 -4
  929. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +0 -7
  930. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +0 -115
  931. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js +0 -78
  932. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +0 -4
  933. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +0 -221
  934. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +0 -4
  935. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +0 -114
  936. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +0 -4
  937. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +0 -40
  938. package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +0 -4
  939. package/dist/v2/features/command-palette/helpers/generate-unique-slug.js +0 -11
  940. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +0 -31
  941. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +0 -11
  942. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +0 -76
  943. package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +0 -18
  944. package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js +0 -33
  945. package/dist/v2/features/command-palette/helpers/is-postman-collection.js +0 -11
  946. package/dist/v2/features/command-palette/helpers/load-document-from-source.js +0 -52
  947. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -139
  948. package/dist/v2/features/editor/config.js +0 -16
  949. package/dist/v2/features/editor/helpers/configure-language-support.js +0 -39
  950. package/dist/v2/features/editor/helpers/ensure-monaco-environment.js +0 -20
  951. package/dist/v2/features/editor/helpers/json/create-json-model.js +0 -19
  952. package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +0 -9
  953. package/dist/v2/features/editor/helpers/json/json-ast.js +0 -24
  954. package/dist/v2/features/editor/helpers/json/json-pointer-links.js +0 -72
  955. package/dist/v2/features/editor/helpers/json/json-pointer-path.js +0 -21
  956. package/dist/v2/features/editor/helpers/range-to-whole-line.js +0 -8
  957. package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js +0 -56
  958. package/dist/v2/features/editor/helpers/theme/load-css-variables.js +0 -21
  959. package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +0 -19
  960. package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js +0 -50
  961. package/dist/v2/features/editor/hooks/use-editor-markers.js +0 -34
  962. package/dist/v2/features/editor/hooks/use-editor.js +0 -107
  963. package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +0 -27
  964. package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +0 -316
  965. package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js +0 -25
  966. package/dist/v2/features/environments/EnvironmentsList.vue.js +0 -68
  967. package/dist/v2/features/environments/EnvironmentsList.vue2.js +0 -4
  968. package/dist/v2/features/environments/components/Environment.vue.js +0 -66
  969. package/dist/v2/features/environments/components/Environment.vue2.js +0 -4
  970. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +0 -121
  971. package/dist/v2/features/environments/components/EnvironmentColors.vue2.js +0 -4
  972. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +0 -85
  973. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue2.js +0 -4
  974. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +0 -53
  975. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue2.js +0 -4
  976. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +0 -109
  977. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +0 -4
  978. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +0 -7
  979. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +0 -136
  980. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +0 -7
  981. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +0 -189
  982. package/dist/v2/features/modal/Modal.vue.js +0 -122
  983. package/dist/v2/features/modal/Modal.vue2.js +0 -4
  984. package/dist/v2/features/modal/helpers/create-api-client-modal.js +0 -89
  985. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +0 -36
  986. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +0 -29
  987. package/dist/v2/features/modal/helpers/restore-workspace-state.js +0 -36
  988. package/dist/v2/features/modal/hooks/use-modal-sidebar.js +0 -93
  989. package/dist/v2/features/modal/modal-events.js +0 -44
  990. package/dist/v2/features/operation/Operation.vue.js +0 -126
  991. package/dist/v2/features/operation/Operation.vue2.js +0 -4
  992. package/dist/v2/features/operation/helpers/combine-params.js +0 -14
  993. package/dist/v2/features/operation/helpers/get-security-requirements.js +0 -4
  994. package/dist/v2/features/operation/helpers/get-selected-security.js +0 -18
  995. package/dist/v2/features/operation/helpers/get-selected-server.js +0 -4
  996. package/dist/v2/features/search/helpers/create-fuse-instance.js +0 -43
  997. package/dist/v2/features/search/helpers/create-search-index.js +0 -63
  998. package/dist/v2/features/search/hooks/use-search-index.js +0 -18
  999. package/dist/v2/features/settings/CollectionSettings.vue.js +0 -275
  1000. package/dist/v2/features/settings/CollectionSettings.vue2.js +0 -4
  1001. package/dist/v2/features/settings/DocumentSettings.vue.js +0 -115
  1002. package/dist/v2/features/settings/DocumentSettings.vue2.js +0 -4
  1003. package/dist/v2/features/settings/components/Appearance.vue.js +0 -88
  1004. package/dist/v2/features/settings/components/Appearance.vue2.js +0 -4
  1005. package/dist/v2/features/settings/components/Section.vue.js +0 -35
  1006. package/dist/v2/features/settings/components/Section.vue2.js +0 -4
  1007. package/dist/v2/features/settings/helpers/get-theme-colors.js +0 -16
  1008. package/dist/v2/helpers/drag-handle-factory.js +0 -120
  1009. package/dist/v2/helpers/generate-location-id.js +0 -10
  1010. package/dist/v2/helpers/get-active-environment.js +0 -22
  1011. package/dist/v2/helpers/get-active-proxy-url.js +0 -5
  1012. package/dist/v2/helpers/get-servers.js +0 -66
  1013. package/dist/v2/helpers/get-tab-details.js +0 -34
  1014. package/dist/v2/helpers/handle-hotkeys.js +0 -54
  1015. package/dist/v2/helpers/is-url.js +0 -5
  1016. package/dist/v2/helpers/slugify.js +0 -4
  1017. package/dist/v2/helpers/storage.js +0 -16
  1018. package/dist/v2/hooks/use-color-mode.js +0 -24
  1019. package/dist/v2/hooks/use-global-hot-keys.js +0 -11
  1020. package/dist/v2/hooks/use-scroll-lock.js +0 -21
  1021. package/dist/v2/workspace-events.js +0 -252
  1022. package/dist/views/Collection/Collection.vue.js +0 -4
  1023. package/dist/views/Collection/Collection.vue2.js +0 -49
  1024. package/dist/views/Collection/CollectionAuthentication.vue.js +0 -7
  1025. package/dist/views/Collection/CollectionAuthentication.vue2.js +0 -56
  1026. package/dist/views/Collection/CollectionCookies.vue.js +0 -4
  1027. package/dist/views/Collection/CollectionCookies.vue2.js +0 -16
  1028. package/dist/views/Collection/CollectionEnvironment.vue.js +0 -5
  1029. package/dist/views/Collection/CollectionEnvironment.vue2.js +0 -229
  1030. package/dist/views/Collection/CollectionInfoForm.vue.js +0 -7
  1031. package/dist/views/Collection/CollectionInfoForm.vue2.js +0 -63
  1032. package/dist/views/Collection/CollectionNavigation.vue.js +0 -133
  1033. package/dist/views/Collection/CollectionNavigation.vue2.js +0 -4
  1034. package/dist/views/Collection/CollectionOverview.vue.js +0 -4
  1035. package/dist/views/Collection/CollectionOverview.vue2.js +0 -34
  1036. package/dist/views/Collection/CollectionScripts.vue.js +0 -4
  1037. package/dist/views/Collection/CollectionScripts.vue2.js +0 -16
  1038. package/dist/views/Collection/CollectionServerForm.vue.js +0 -75
  1039. package/dist/views/Collection/CollectionServerForm.vue2.js +0 -4
  1040. package/dist/views/Collection/CollectionServers.vue.js +0 -4
  1041. package/dist/views/Collection/CollectionServers.vue2.js +0 -94
  1042. package/dist/views/Collection/CollectionSettings.vue.js +0 -4
  1043. package/dist/views/Collection/CollectionSettings.vue2.js +0 -118
  1044. package/dist/views/Collection/CollectionSync.vue.js +0 -4
  1045. package/dist/views/Collection/CollectionSync.vue2.js +0 -16
  1046. package/dist/views/Collection/components/EnvironmentForm.vue.js +0 -7
  1047. package/dist/views/Collection/components/EnvironmentForm.vue2.js +0 -270
  1048. package/dist/views/Collection/components/MarkdownInput.vue.js +0 -7
  1049. package/dist/views/Collection/components/MarkdownInput.vue2.js +0 -100
  1050. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +0 -50
  1051. package/dist/views/Components/CodeSnippet/CodeSnippet.vue2.js +0 -4
  1052. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +0 -62
  1053. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +0 -82
  1054. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +0 -30
  1055. package/dist/views/Cookies/CookieForm.vue.js +0 -34
  1056. package/dist/views/Cookies/CookieForm.vue2.js +0 -4
  1057. package/dist/views/Cookies/CookieModal.vue.js +0 -7
  1058. package/dist/views/Cookies/CookieModal.vue2.js +0 -88
  1059. package/dist/views/Cookies/Cookies.vue.js +0 -4
  1060. package/dist/views/Cookies/Cookies.vue2.js +0 -162
  1061. package/dist/views/Environment/Environment.vue.js +0 -4
  1062. package/dist/views/Environment/Environment.vue2.js +0 -402
  1063. package/dist/views/Environment/EnvironmentColorModal.vue.js +0 -42
  1064. package/dist/views/Environment/EnvironmentColorModal.vue2.js +0 -4
  1065. package/dist/views/Environment/EnvironmentColors.vue.js +0 -118
  1066. package/dist/views/Environment/EnvironmentColors.vue2.js +0 -4
  1067. package/dist/views/Environment/EnvironmentModal.vue.js +0 -131
  1068. package/dist/views/Environment/EnvironmentModal.vue2.js +0 -4
  1069. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +0 -129
  1070. package/dist/views/Environment/EnvironmentVariableDropdown.vue2.js +0 -4
  1071. package/dist/views/Environment/handle-drag.js +0 -32
  1072. package/dist/views/Request/Request.vue.js +0 -7
  1073. package/dist/views/Request/Request.vue2.js +0 -105
  1074. package/dist/views/Request/RequestRoot.vue.js +0 -7
  1075. package/dist/views/Request/RequestRoot.vue2.js +0 -123
  1076. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +0 -52
  1077. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +0 -4
  1078. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +0 -246
  1079. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue2.js +0 -4
  1080. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +0 -135
  1081. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue2.js +0 -4
  1082. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +0 -7
  1083. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +0 -209
  1084. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +0 -7
  1085. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +0 -116
  1086. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +0 -50
  1087. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue2.js +0 -4
  1088. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +0 -219
  1089. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +0 -4
  1090. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +0 -28
  1091. package/dist/views/Request/RequestSection/RequestBody.vue.js +0 -7
  1092. package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -451
  1093. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +0 -7
  1094. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +0 -170
  1095. package/dist/views/Request/RequestSection/RequestParams.vue.js +0 -162
  1096. package/dist/views/Request/RequestSection/RequestParams.vue2.js +0 -4
  1097. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +0 -96
  1098. package/dist/views/Request/RequestSection/RequestPathParams.vue2.js +0 -4
  1099. package/dist/views/Request/RequestSection/RequestSection.vue.js +0 -7
  1100. package/dist/views/Request/RequestSection/RequestSection.vue2.js +0 -247
  1101. package/dist/views/Request/RequestSection/RequestTable.vue.js +0 -7
  1102. package/dist/views/Request/RequestSection/RequestTable.vue2.js +0 -227
  1103. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +0 -7
  1104. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +0 -61
  1105. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +0 -29
  1106. package/dist/views/Request/RequestSection/helpers/getting-started.js +0 -13
  1107. package/dist/views/Request/RequestSection/helpers/update-scheme.js +0 -16
  1108. package/dist/views/Request/RequestSidebar.vue.js +0 -7
  1109. package/dist/views/Request/RequestSidebar.vue2.js +0 -341
  1110. package/dist/views/Request/RequestSidebarItem.vue.js +0 -8
  1111. package/dist/views/Request/RequestSidebarItem.vue2.js +0 -464
  1112. package/dist/views/Request/RequestSidebarItemMenu.vue.js +0 -7
  1113. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +0 -236
  1114. package/dist/views/Request/RequestSubpageHeader.vue.js +0 -7
  1115. package/dist/views/Request/RequestSubpageHeader.vue2.js +0 -79
  1116. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +0 -96
  1117. package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +0 -4
  1118. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +0 -7
  1119. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +0 -83
  1120. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +0 -36
  1121. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue2.js +0 -4
  1122. package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +0 -14
  1123. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +0 -7
  1124. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +0 -63
  1125. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +0 -7
  1126. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +0 -42
  1127. package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +0 -74
  1128. package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue2.js +0 -4
  1129. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +0 -25
  1130. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue2.js +0 -4
  1131. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +0 -50
  1132. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +0 -5
  1133. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +0 -51
  1134. package/dist/views/Request/ResponseSection/ResponseCookies.vue2.js +0 -4
  1135. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +0 -7
  1136. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +0 -103
  1137. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +0 -96
  1138. package/dist/views/Request/ResponseSection/ResponseHeaders.vue2.js +0 -4
  1139. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +0 -7
  1140. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +0 -38
  1141. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +0 -67
  1142. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue2.js +0 -4
  1143. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +0 -7
  1144. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +0 -189
  1145. package/dist/views/Request/components/WorkspaceDropdown.vue.js +0 -182
  1146. package/dist/views/Request/components/WorkspaceDropdown.vue2.js +0 -4
  1147. package/dist/views/Request/consts/mediaTypes.js +0 -131
  1148. package/dist/views/Request/consts/new-auth-options.js +0 -100
  1149. package/dist/views/Request/handle-drag.js +0 -42
  1150. package/dist/views/Request/hooks/useOpenApiWatcher.js +0 -57
  1151. package/dist/views/Request/libs/auth.js +0 -52
  1152. package/dist/views/Request/libs/oauth2.js +0 -127
  1153. package/dist/views/Request/libs/request.js +0 -40
  1154. package/dist/views/Request/libs/watch-mode.js +0 -337
  1155. package/dist/views/Settings/Settings.vue.js +0 -4
  1156. package/dist/views/Settings/Settings.vue2.js +0 -29
  1157. package/dist/views/Settings/SettingsGeneral.vue.js +0 -286
  1158. package/dist/views/Settings/SettingsGeneral.vue2.js +0 -4
  1159. package/dist/views/Settings/components/SettingsAppearance.vue.js +0 -85
  1160. package/dist/views/Settings/components/SettingsAppearance.vue2.js +0 -4
  1161. package/dist/views/Settings/components/SettingsSection.vue.js +0 -24
  1162. package/dist/views/Settings/components/SettingsSection.vue2.js +0 -4
@@ -0,0 +1,1726 @@
1
+ import { i as isElectron, n as matchesDomain } from "./set-request-cookies-BJJhsU4A.js";
2
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
3
+ import { t as getSnippet } from "./get-snippet-DBRUSfZ2.js";
4
+ import { capitalize, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeStyle, onBeforeMount, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, useId, useModel, watch, withCtx } from "vue";
5
+ import { ScalarButton, ScalarCard, ScalarCardFooter, ScalarCardHeader, ScalarCardSection, ScalarCodeBlock, ScalarCombobox, ScalarListbox, ScalarVirtualText } from "@scalar/components";
6
+ import { encode } from "js-base64";
7
+ import { isDefined } from "@scalar/helpers/array/is-defined";
8
+ import { mergeUrls } from "@scalar/helpers/url/merge-urls";
9
+ import { getHttpMethodInfo } from "@scalar/helpers/http/http-info";
10
+ import { ScalarIconCaretDown } from "@scalar/icons";
11
+ import { replaceVariables } from "@scalar/helpers/regex/replace-variables";
12
+ import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
13
+ import { isObject } from "@scalar/helpers/object/is-object";
14
+ import { unpackProxyObject } from "@scalar/workspace-store/helpers/unpack-proxy";
15
+ import { canMethodHaveBody } from "@scalar/helpers/http/can-method-have-body";
16
+ import { resolve } from "@scalar/workspace-store/resolve";
17
+ import { freezeElement } from "@scalar/helpers/dom/freeze-element";
18
+ import { AVAILABLE_CLIENTS, snippetz } from "@scalar/snippetz";
19
+ import { json2xml } from "@scalar/helpers/file/json2xml";
20
+ import { normalizeHttpMethod } from "@scalar/helpers/http/normalize-http-method";
21
+ //#region src/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.ts
22
+ /**
23
+ * Recursively resolves all $ref objects in a data structure to their actual values.
24
+ * Traverses through objects, arrays, and nested structures to find and resolve
25
+ * any $ref references at any depth level.
26
+ *
27
+ * Handles circular references gracefully by detecting them and returning '[circular]'
28
+ * to prevent infinite loops.
29
+ */
30
+ var getResolvedRefDeep = (node) => {
31
+ const visited = /* @__PURE__ */ new WeakSet();
32
+ const cachedResults = /* @__PURE__ */ new WeakMap();
33
+ const resolveNode = (current) => {
34
+ if (!isObject(current) && !Array.isArray(current)) return current;
35
+ const rawValue = unpackProxyObject(current, { depth: 1 });
36
+ if (cachedResults.has(rawValue)) return cachedResults.get(rawValue);
37
+ if (visited.has(rawValue)) return "[circular]";
38
+ visited.add(rawValue);
39
+ if ("$ref" in current) {
40
+ const result = resolveNode(getResolvedRef(current));
41
+ cachedResults.set(rawValue, result);
42
+ return result;
43
+ }
44
+ if (Array.isArray(current)) {
45
+ const result = current.map(resolveNode);
46
+ cachedResults.set(rawValue, result);
47
+ return result;
48
+ }
49
+ const result = Object.fromEntries(Object.entries(current).map(([key, value]) => [key, resolveNode(value)]));
50
+ cachedResults.set(rawValue, result);
51
+ return result;
52
+ };
53
+ return resolveNode(node);
54
+ };
55
+ //#endregion
56
+ //#region src/v2/blocks/operation-block/helpers/get-example.ts
57
+ /** Helper to get example from examples object with fallback to example field */
58
+ var getExampleFromExamples = (examples, exampleField, exampleKey) => {
59
+ if (!examples && !exampleField) return;
60
+ const hasExamples = !!examples && Object.keys(examples).length > 0;
61
+ const key = exampleKey || Object.keys(examples ?? {})[0] || "";
62
+ const example = getResolvedRefDeep(examples?.[key]);
63
+ if (example !== void 0) return example;
64
+ if ((!hasExamples || !exampleKey) && exampleField !== void 0) return { value: getResolvedRefDeep(exampleField) };
65
+ };
66
+ /**
67
+ * Resolve an example value for a parameter or requestBody from either `examples` or `content.*.examples`.
68
+ * Or the [deprecated] `example` field.
69
+ * If no exampleKey is provided it will fallback to the first example in the examples object then the [deprecated]
70
+ * `example` field.
71
+ * Used both for send-request and generating code snippets.
72
+ */
73
+ var getExample = (param, exampleKey, contentType) => {
74
+ if ("content" in param) {
75
+ const content = param.content?.[contentType ?? Object.keys(param.content)[0] ?? ""];
76
+ const result = getExampleFromExamples(content?.examples, content?.example, exampleKey);
77
+ if (result !== void 0) return result;
78
+ }
79
+ if ("examples" in param || "example" in param) {
80
+ const result = getExampleFromExamples(param.examples, param.example, exampleKey);
81
+ if (result !== void 0) return result;
82
+ }
83
+ const resolvedParam = getResolvedRefDeep(param);
84
+ if ("schema" in resolvedParam && resolvedParam.schema) {
85
+ const schema = resolvedParam.schema;
86
+ if ("default" in schema && schema.default !== void 0) return { value: schema.default };
87
+ if ("enum" in schema && schema.enum?.[0] !== void 0) return { value: schema.enum[0] };
88
+ if ("examples" in schema && schema.examples?.[0] !== void 0) return { value: schema.examples[0] };
89
+ if ("example" in schema && schema.example !== void 0) return { value: schema.example };
90
+ }
91
+ };
92
+ //#endregion
93
+ //#region src/v2/blocks/request-block/helpers/get-default-headers.ts
94
+ var APP_VERSION = "2.38.2";
95
+ /** Default Accept header value to accept all response types. */
96
+ var DEFAULT_ACCEPT = "*/*";
97
+ /**
98
+ * Creates a default header object with the override status determined by existing headers.
99
+ *
100
+ * @param name The header name
101
+ * @param defaultValue The header value
102
+ * @param existingHeaders Set of existing header names (lowercase) from the operation
103
+ * @returns A DefaultHeader object
104
+ */
105
+ var createDefaultHeader = (name, defaultValue, existingHeaders) => ({
106
+ name,
107
+ defaultValue,
108
+ isOverridden: existingHeaders.has(name.toLowerCase())
109
+ });
110
+ /**
111
+ * Generates a list of default headers for an OpenAPI operation and HTTP method.
112
+ *
113
+ * This function intelligently adds standard HTTP headers based on the request context:
114
+ * - Content-Type: Added only if the HTTP method supports a request body and the OpenAPI operation
115
+ * defines a request body content type. Uses the selected content type from the operation or the
116
+ * first defined request body content type.
117
+ * - Accept: Derived from the 2xx response content types in the spec (joined as a comma-separated list), falling back to a wildcard.
118
+ * - User-Agent: Added in Electron environments (desktop app or proxy) to identify the client.
119
+ *
120
+ * The function respects OpenAPI operation parameters and marks headers as overridden
121
+ * if they are explicitly defined in the operation. It also supports hiding disabled
122
+ * headers for specific request examples using x-scalar-disable-parameters.
123
+ *
124
+ * @param method The HTTP method of the operation (GET, POST, etc.)
125
+ * @param operation The OpenAPI OperationObject describing the endpoint
126
+ * @param exampleKey The current request example key
127
+ * @param hideDisabledHeaders If true, filters out headers marked as disabled for this example
128
+ * @returns Array of default header objects with their values and override status
129
+ */
130
+ var getDefaultHeaders = ({ method, operation, exampleKey, hideDisabledHeaders = false }) => {
131
+ const existingHeaders = new Set(operation.parameters?.filter((param) => getResolvedRef(param).in === "header").map((param) => getResolvedRef(param).name.toLowerCase()) ?? []);
132
+ const disabledHeaders = operation["x-scalar-disable-parameters"]?.["default-headers"]?.[exampleKey] ?? {};
133
+ const headers = [];
134
+ const requestBody = getResolvedRef(operation.requestBody);
135
+ if (canMethodHaveBody(method) && requestBody) {
136
+ const contentType = requestBody["x-scalar-selected-content-type"]?.[exampleKey] ?? Object.keys(requestBody.content ?? {})[0];
137
+ if (contentType && contentType !== "none") headers.push(createDefaultHeader("Content-Type", contentType, existingHeaders));
138
+ }
139
+ const successResponseKey = Object.keys(operation.responses ?? {}).find((k) => k.startsWith("2"));
140
+ const successResponse = successResponseKey ? getResolvedRef(operation.responses[successResponseKey]) : null;
141
+ const acceptValue = Object.keys(successResponse?.content ?? {}).join(", ") || DEFAULT_ACCEPT;
142
+ headers.push(createDefaultHeader("Accept", acceptValue, existingHeaders));
143
+ if (isElectron() && APP_VERSION) headers.push(createDefaultHeader("User-Agent", `Scalar/${APP_VERSION}`, existingHeaders));
144
+ if (hideDisabledHeaders) return headers.filter((header) => disabledHeaders[header.name.toLowerCase()] !== true);
145
+ return headers;
146
+ };
147
+ //#endregion
148
+ //#region src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts
149
+ /** Maximum recursion depth to prevent infinite loops in circular references */
150
+ var MAX_LEVELS_DEEP = 10;
151
+ /** Default name used for additional properties when no custom name is provided */
152
+ var DEFAULT_ADDITIONAL_PROPERTIES_NAME = "additionalProperty";
153
+ /**
154
+ * Pre-computed date/time values to avoid expensive Date operations on every call.
155
+ * These are calculated once at module load time for better performance.
156
+ */
157
+ var currentISOString = (/* @__PURE__ */ new Date()).toISOString();
158
+ var currentDateString = currentISOString.split("T")[0];
159
+ var currentTimeString = currentISOString.split("T")[1].split(".")[0];
160
+ /**
161
+ * Mapping of OpenAPI string formats to example values.
162
+ * Used to generate realistic examples for different string formats.
163
+ */
164
+ var genericExampleValues = {
165
+ "date-time": currentISOString,
166
+ "date": currentDateString,
167
+ "email": "hello@example.com",
168
+ "hostname": "example.com",
169
+ "idn-email": "jane.doe@example.com",
170
+ "idn-hostname": "example.com",
171
+ "ipv4": "127.0.0.1",
172
+ "ipv6": "51d4:7fab:bfbf:b7d7:b2cb:d4b4:3dad:d998",
173
+ "iri-reference": "/entitiy/1",
174
+ "iri": "https://example.com/entity/123",
175
+ "json-pointer": "/nested/objects",
176
+ "password": "super-secret",
177
+ "regex": "/[a-z]/",
178
+ "relative-json-pointer": "1/nested/objects",
179
+ "time": currentTimeString,
180
+ "uri-reference": "../folder",
181
+ "uri-template": "https://example.com/{id}",
182
+ "uri": "https://example.com",
183
+ "uuid": "123e4567-e89b-12d3-a456-426614174000",
184
+ "object-id": "6592008029c8c3e4dc76256c"
185
+ };
186
+ /**
187
+ * Extract enum values from the propertyNames keyword of an object schema.
188
+ * JSON Schema's propertyNames constrains which keys are valid in a map/dict.
189
+ */
190
+ var getPropertyNamesEnumValues = (schema) => {
191
+ if (!("propertyNames" in schema) || !schema.propertyNames) return;
192
+ const resolved = resolve.schema(schema.propertyNames);
193
+ if (resolved && "enum" in resolved && Array.isArray(resolved.enum) && resolved.enum.length > 0) return resolved.enum;
194
+ };
195
+ /**
196
+ * Generate example values for string types based on their format.
197
+ * Special handling for binary format which returns a File object.
198
+ */
199
+ var guessFromFormat = (schema, makeUpRandomData = false, fallback = "") => {
200
+ if ("type" in schema && schema.type === "string" && "format" in schema && schema.format === "binary") return "@filename";
201
+ if (makeUpRandomData && "format" in schema && schema.format) return genericExampleValues[schema.format] ?? fallback;
202
+ return fallback;
203
+ };
204
+ /**
205
+ * WeakMap cache for memoizing resolved example results.
206
+ * Uses the resolved schema object as the key for efficient lookups.
207
+ */
208
+ var resultCache = /* @__PURE__ */ new WeakMap();
209
+ /** Cache required property names per parent schema for O(1) membership checks */
210
+ var requiredNamesCache = /* @__PURE__ */ new WeakMap();
211
+ /** Normalize schema identity for cache and cycle tracking */
212
+ var getSchemaCacheTarget = (schema) => unpackProxyObject(schema, { depth: 1 });
213
+ /**
214
+ * Retrieves the set of required property names from a schema.
215
+ * Caches the result in a WeakMap for efficient lookups.
216
+ */
217
+ var getRequiredNames = (parentSchema) => {
218
+ if (!parentSchema) return;
219
+ const cached = requiredNamesCache.get(parentSchema);
220
+ if (cached) return cached;
221
+ if ("required" in parentSchema) {
222
+ const required = parentSchema.required;
223
+ if (Array.isArray(required) && required.length > 0) {
224
+ const set = new Set(required);
225
+ requiredNamesCache.set(parentSchema, set);
226
+ return set;
227
+ }
228
+ }
229
+ };
230
+ /**
231
+ * Cache the result for a schema if it is an object type.
232
+ * Primitive values are not cached to avoid unnecessary WeakMap operations.
233
+ * Stores a map of cacheKey strings which is made up of the options object.
234
+ */
235
+ var cache = (schema, result, cacheKey) => {
236
+ if (typeof result !== "object" || result === null) return result;
237
+ const rawSchema = getSchemaCacheTarget(schema);
238
+ const cacheMap = resultCache.get(rawSchema) ?? /* @__PURE__ */ new Map();
239
+ if (cacheMap) cacheMap.set(cacheKey, result);
240
+ resultCache.set(rawSchema, cacheMap);
241
+ return result;
242
+ };
243
+ /**
244
+ * Check if a schema uses composition keywords (allOf, oneOf, anyOf).
245
+ * These require special handling for merging or selecting schemas.
246
+ */
247
+ var isComposed = (schema) => !!(schema.allOf || schema.oneOf || schema.anyOf);
248
+ /**
249
+ * Determine if a property should be omitted based on the options.
250
+ * Properties are omitted if they are not required and the option is enabled.
251
+ */
252
+ var shouldOmitProperty = (schema, parentSchema, propertyName, options) => {
253
+ if (schema.deprecated || options?.mode === "write" && schema.readOnly || options?.mode === "read" && schema.writeOnly) return true;
254
+ if (options?.omitEmptyAndOptionalProperties !== true) return false;
255
+ if ("type" in schema && (schema.type === "object" || schema.type === "array") || isComposed(schema)) return false;
256
+ if ("examples" in schema && Array.isArray(schema.examples) && schema.examples.length > 0 || "example" in schema && schema.example !== void 0 || "default" in schema && schema.default !== void 0 || "const" in schema && schema.const !== void 0 || "enum" in schema && Array.isArray(schema.enum) && schema.enum.length > 0) return false;
257
+ const name = propertyName ?? schema.title ?? "";
258
+ const requiredNames = getRequiredNames(parentSchema);
259
+ return !(requiredNames ? requiredNames.has(name) : false);
260
+ };
261
+ /**
262
+ * Merge two example values with predictable semantics.
263
+ * Arrays are concatenated, objects are merged, otherwise the new value wins.
264
+ */
265
+ var mergeExamples = (baseValue, newValue) => {
266
+ if (Array.isArray(baseValue) && Array.isArray(newValue)) return [...baseValue, ...newValue];
267
+ if (baseValue && typeof baseValue === "object" && newValue && typeof newValue === "object") return {
268
+ ...baseValue,
269
+ ...newValue
270
+ };
271
+ return newValue;
272
+ };
273
+ /**
274
+ * Build an example for an object schema, including properties, patternProperties,
275
+ * additionalProperties, and composition (allOf/oneOf/anyOf) merging.
276
+ */
277
+ var handleObjectSchema = (schema, options, level, seen, cacheKey) => {
278
+ const response = {};
279
+ if ("properties" in schema && schema.properties) {
280
+ const propertyNames = Object.keys(schema.properties);
281
+ const limit = propertyNames.length;
282
+ for (let i = 0; i < limit; i++) {
283
+ const propertyName = propertyNames[i];
284
+ const propertySchema = resolve.schema(schema.properties[propertyName]);
285
+ if (!propertySchema) continue;
286
+ const propertyXmlName = options?.xml && "xml" in propertySchema ? propertySchema.xml?.name : void 0;
287
+ const value = getExampleFromSchema(propertySchema, options, {
288
+ level: level + 1,
289
+ parentSchema: schema,
290
+ name: propertyName,
291
+ seen
292
+ });
293
+ if (typeof value !== "undefined") response[propertyXmlName ?? propertyName] = value;
294
+ }
295
+ }
296
+ if ("patternProperties" in schema && schema.patternProperties) for (const pattern of Object.keys(schema.patternProperties)) {
297
+ const propertySchema = resolve.schema(schema.patternProperties[pattern]);
298
+ if (!propertySchema) continue;
299
+ response[pattern] = getExampleFromSchema(propertySchema, options, {
300
+ level: level + 1,
301
+ parentSchema: schema,
302
+ name: pattern,
303
+ seen
304
+ });
305
+ }
306
+ if ("additionalProperties" in schema && schema.additionalProperties) {
307
+ const additional = typeof schema.additionalProperties === "boolean" ? schema.additionalProperties : resolve.schema(schema.additionalProperties);
308
+ const isAnyType = schema.additionalProperties === true || typeof schema.additionalProperties === "object" && Object.keys(schema.additionalProperties).length === 0;
309
+ const hasCustomName = typeof additional === "object" && "x-additionalPropertiesName" in additional && typeof additional["x-additionalPropertiesName"] === "string" && additional["x-additionalPropertiesName"].trim().length > 0;
310
+ const propertyNamesEnum = hasCustomName ? void 0 : getPropertyNamesEnumValues(schema);
311
+ const additionalName = hasCustomName ? additional["x-additionalPropertiesName"].trim() : DEFAULT_ADDITIONAL_PROPERTIES_NAME;
312
+ const additionalValue = isAnyType ? "anything" : typeof additional === "object" ? getExampleFromSchema(additional, options, {
313
+ level: level + 1,
314
+ seen
315
+ }) : "anything";
316
+ if (propertyNamesEnum && propertyNamesEnum.length > 0) response[String(propertyNamesEnum[0])] = additionalValue;
317
+ else response[additionalName] = additionalValue;
318
+ }
319
+ if (schema.oneOf?.[0]) Object.assign(response, getExampleFromSchema(resolve.schema(schema.oneOf[0]), options, {
320
+ level: level + 1,
321
+ seen
322
+ }));
323
+ else if (schema.anyOf?.[0]) Object.assign(response, getExampleFromSchema(resolve.schema(schema.anyOf[0]), options, {
324
+ level: level + 1,
325
+ seen
326
+ }));
327
+ else if (Array.isArray(schema.allOf) && schema.allOf.length > 0) {
328
+ let merged = response;
329
+ for (const item of schema.allOf) {
330
+ const ex = getExampleFromSchema(resolve.schema(item), options, {
331
+ level: level + 1,
332
+ parentSchema: schema,
333
+ seen
334
+ });
335
+ merged = mergeExamples(merged, ex);
336
+ }
337
+ if (merged && typeof merged === "object") Object.assign(response, merged);
338
+ }
339
+ if (options?.xml && "xml" in schema && schema.xml?.name && level === 0) {
340
+ const wrapped = {};
341
+ wrapped[schema.xml.name] = response;
342
+ return cache(schema, wrapped, cacheKey);
343
+ }
344
+ return cache(schema, response, cacheKey);
345
+ };
346
+ /** Build an example for an array schema, including items, allOf, oneOf/anyOf, and XML wrapping */
347
+ var handleArraySchema = (schema, options, level, seen, cacheKey) => {
348
+ const items = "items" in schema ? resolve.schema(schema.items) : void 0;
349
+ const itemsXmlTagName = items && typeof items === "object" && "xml" in items ? items.xml?.name : void 0;
350
+ const wrapItems = !!(options?.xml && "xml" in schema && schema.xml?.wrapped && itemsXmlTagName);
351
+ if (schema.example !== void 0) return cache(schema, wrapItems ? { [itemsXmlTagName]: schema.example } : schema.example, cacheKey);
352
+ if (items && typeof items === "object") {
353
+ if (Array.isArray(items.allOf) && items.allOf.length > 0) {
354
+ const allOf = items.allOf.filter(isDefined);
355
+ const first = resolve.schema(allOf[0]);
356
+ if (first && typeof first === "object" && "type" in first && first.type === "object") {
357
+ const merged = getExampleFromSchema({
358
+ type: "object",
359
+ allOf
360
+ }, options, {
361
+ level: level + 1,
362
+ parentSchema: schema,
363
+ seen
364
+ });
365
+ return cache(schema, wrapItems ? [{ [itemsXmlTagName]: merged }] : [merged], cacheKey);
366
+ }
367
+ const examples = allOf.map((s) => getExampleFromSchema(resolve.schema(s), options, {
368
+ level: level + 1,
369
+ parentSchema: schema,
370
+ seen
371
+ })).filter(isDefined);
372
+ return cache(schema, wrapItems ? examples.map((e) => ({ [itemsXmlTagName]: e })) : examples, cacheKey);
373
+ }
374
+ const union = items.anyOf || items.oneOf;
375
+ if (union && union.length > 0) {
376
+ const first = union[0];
377
+ const ex = getExampleFromSchema(resolve.schema(first), options, {
378
+ level: level + 1,
379
+ parentSchema: schema,
380
+ seen
381
+ });
382
+ return cache(schema, wrapItems ? [{ [itemsXmlTagName]: ex }] : [ex], cacheKey);
383
+ }
384
+ }
385
+ const isObject = items && typeof items === "object" && ("type" in items && items.type === "object" || "properties" in items);
386
+ const isArray = items && typeof items === "object" && ("type" in items && items.type === "array" || "items" in items);
387
+ if (items && typeof items === "object" && ("type" in items && items.type || isObject || isArray)) {
388
+ const ex = getExampleFromSchema(items, options, {
389
+ level: level + 1,
390
+ seen
391
+ });
392
+ return cache(schema, wrapItems ? [{ [itemsXmlTagName]: ex }] : [ex], cacheKey);
393
+ }
394
+ return cache(schema, [], cacheKey);
395
+ };
396
+ /** Return primitive example value for single-type schemas, or undefined if not primitive */
397
+ var getPrimitiveValue = (schema, makeUpRandomData, emptyString) => {
398
+ if ("type" in schema && schema.type && !Array.isArray(schema.type)) switch (schema.type) {
399
+ case "string": return guessFromFormat(schema, makeUpRandomData, emptyString ?? "");
400
+ case "boolean": return true;
401
+ case "integer": return "minimum" in schema && typeof schema.minimum === "number" ? schema.minimum : 1;
402
+ case "number": return "minimum" in schema && typeof schema.minimum === "number" ? schema.minimum : 1;
403
+ case "array": return [];
404
+ default: return;
405
+ }
406
+ };
407
+ /** Return primitive example value for union-type schemas (type: string[]) */
408
+ var getUnionPrimitiveValue = (schema, makeUpRandomData, emptyString) => {
409
+ if ("type" in schema && Array.isArray(schema.type)) {
410
+ if (schema.type.includes("null")) return null;
411
+ const first = schema.type[0];
412
+ if (first) switch (first) {
413
+ case "string": return guessFromFormat(schema, makeUpRandomData, emptyString ?? "");
414
+ case "boolean": return true;
415
+ case "integer": return "minimum" in schema && typeof schema.minimum === "number" ? schema.minimum : 1;
416
+ case "number": return "minimum" in schema && typeof schema.minimum === "number" ? schema.minimum : 1;
417
+ case "null": return null;
418
+ default: return;
419
+ }
420
+ }
421
+ };
422
+ /** Create stable cache key from the options object */
423
+ var createOptionsCacheKey = (options) => JSON.stringify({
424
+ emptyString: options?.emptyString,
425
+ xml: options?.xml,
426
+ mode: options?.mode,
427
+ variables: options?.variables,
428
+ omitEmptyAndOptionalProperties: options?.omitEmptyAndOptionalProperties
429
+ });
430
+ /**
431
+ * Generate an example value from a given OpenAPI SchemaObject.
432
+ *
433
+ * This function recursively processes OpenAPI schemas to create realistic example data.
434
+ * It handles all OpenAPI schema types including primitives, objects, arrays, and
435
+ * composition schemas (allOf, oneOf, anyOf).
436
+ * Uses a tonne of caching for maximum performance.
437
+ *
438
+ * @param schema - The OpenAPI SchemaObject to generate an example from.
439
+ * @param options - Options to customize example generation.
440
+ * @param level - The current recursion depth.
441
+ * @param parentSchema - The parent schema, if any.
442
+ * @param name - The name of the property being processed.
443
+ * @returns An example value for the given schema.
444
+ */
445
+ var getExampleFromSchema = (schema, options, { level = 0, parentSchema, name, seen = /* @__PURE__ */ new WeakSet() } = {}) => {
446
+ const _schema = resolve.schema(schema);
447
+ if (!isDefined(_schema)) return;
448
+ const targetValue = getSchemaCacheTarget(_schema);
449
+ if (seen.has(targetValue)) return;
450
+ seen.add(targetValue);
451
+ /** Make the cache key unique per options */
452
+ const cacheKey = createOptionsCacheKey(options);
453
+ const cached = resultCache.get(targetValue)?.get(cacheKey);
454
+ if (typeof cached !== "undefined") {
455
+ seen.delete(targetValue);
456
+ return cached;
457
+ }
458
+ if (level > MAX_LEVELS_DEEP) {
459
+ seen.delete(targetValue);
460
+ return "[Max Depth Exceeded]";
461
+ }
462
+ const makeUpRandomData = !!options?.emptyString;
463
+ if (shouldOmitProperty(_schema, parentSchema, name, options)) {
464
+ seen.delete(targetValue);
465
+ return;
466
+ }
467
+ if ("x-variable" in _schema && _schema["x-variable"]) {
468
+ const value = options?.variables?.[_schema["x-variable"]];
469
+ if (value !== void 0) {
470
+ if ("type" in _schema && (_schema.type === "number" || _schema.type === "integer")) {
471
+ seen.delete(targetValue);
472
+ return cache(_schema, Number(value), cacheKey);
473
+ }
474
+ seen.delete(targetValue);
475
+ return cache(_schema, value, cacheKey);
476
+ }
477
+ }
478
+ if (Array.isArray(_schema.examples) && _schema.examples.length > 0) {
479
+ seen.delete(targetValue);
480
+ return cache(_schema, _schema.examples[0], cacheKey);
481
+ }
482
+ if (_schema.example !== void 0) {
483
+ seen.delete(targetValue);
484
+ return cache(_schema, _schema.example, cacheKey);
485
+ }
486
+ if (_schema.default !== void 0) {
487
+ seen.delete(targetValue);
488
+ return cache(_schema, _schema.default, cacheKey);
489
+ }
490
+ if (_schema.const !== void 0) {
491
+ seen.delete(targetValue);
492
+ return cache(_schema, _schema.const, cacheKey);
493
+ }
494
+ if (Array.isArray(_schema.enum) && _schema.enum.length > 0) {
495
+ seen.delete(targetValue);
496
+ return cache(_schema, _schema.enum[0], cacheKey);
497
+ }
498
+ if ("properties" in _schema || "type" in _schema && _schema.type === "object") {
499
+ const result = handleObjectSchema(_schema, options, level, seen, cacheKey);
500
+ seen.delete(targetValue);
501
+ return result;
502
+ }
503
+ if ("type" in _schema && _schema.type === "array" || "items" in _schema) {
504
+ const result = handleArraySchema(_schema, options, level, seen, cacheKey);
505
+ seen.delete(targetValue);
506
+ return result;
507
+ }
508
+ const primitive = getPrimitiveValue(_schema, makeUpRandomData, options?.emptyString);
509
+ if (primitive !== void 0) {
510
+ seen.delete(targetValue);
511
+ return cache(_schema, primitive, cacheKey);
512
+ }
513
+ const discriminate = _schema.oneOf || _schema.anyOf;
514
+ if (Array.isArray(discriminate) && discriminate.length > 0) {
515
+ for (const item of discriminate) {
516
+ const resolved = resolve.schema(item);
517
+ if (resolved && (!("type" in resolved) || resolved.type !== "null")) {
518
+ seen.delete(targetValue);
519
+ return cache(_schema, getExampleFromSchema(resolved, options, {
520
+ level: level + 1,
521
+ seen
522
+ }), cacheKey);
523
+ }
524
+ }
525
+ seen.delete(targetValue);
526
+ return cache(_schema, null, cacheKey);
527
+ }
528
+ if (Array.isArray(_schema.allOf) && _schema.allOf.length > 0) {
529
+ let merged = void 0;
530
+ const items = _schema.allOf;
531
+ for (const item of items) {
532
+ const ex = getExampleFromSchema(item, options, {
533
+ level: level + 1,
534
+ parentSchema: _schema,
535
+ seen
536
+ });
537
+ if (merged === void 0) merged = ex;
538
+ else if (merged && typeof merged === "object" && ex && typeof ex === "object") merged = mergeExamples(merged, ex);
539
+ else if (ex !== void 0) merged = ex;
540
+ }
541
+ seen.delete(targetValue);
542
+ return cache(_schema, merged ?? null, cacheKey);
543
+ }
544
+ const unionPrimitive = getUnionPrimitiveValue(_schema, makeUpRandomData, options?.emptyString);
545
+ if (unionPrimitive !== void 0) {
546
+ seen.delete(targetValue);
547
+ return cache(_schema, unionPrimitive, cacheKey);
548
+ }
549
+ seen.delete(targetValue);
550
+ return cache(_schema, null, cacheKey);
551
+ };
552
+ //#endregion
553
+ //#region src/v2/blocks/operation-block/helpers/filter-global-cookies.ts
554
+ /**
555
+ * Filter a global cookie to determine if it should be included with a request to the given URL.
556
+ * - Returns false if the cookie is disabled, in the disabledGlobalCookies map, or missing a name.
557
+ * - Returns false if the domain does not match.
558
+ * - Returns false if the path is specified and does not match the URL pathname.
559
+ * - Returns true otherwise.
560
+ */
561
+ var filterGlobalCookie = ({ cookie, url, disabledGlobalCookies }) => {
562
+ if (cookie.isDisabled || disabledGlobalCookies[cookie.name.toLowerCase()] === true || !cookie.name) return false;
563
+ const urlObject = new URL(url, "https://example.com");
564
+ if (cookie.domain && !matchesDomain(url, cookie.domain)) return false;
565
+ if (cookie.path && !urlObject.pathname.startsWith(cookie.path)) return false;
566
+ return true;
567
+ };
568
+ //#endregion
569
+ //#region src/v2/blocks/operation-block/helpers/de-serialize-parameter.ts
570
+ /** Helper that de-serializes the example value based on the parameter type */
571
+ var deSerializeParameter = (example, param) => {
572
+ if ("content" in param) return deSerializeContentExample(example, Object.keys(param.content ?? {})[0] ?? "");
573
+ if ("schema" in param) return deSerializeSchemaExample(example, param.schema);
574
+ return example;
575
+ };
576
+ /** De-serialize the example value based on the content type */
577
+ var deSerializeContentExample = (example, contentType) => {
578
+ if (typeof example === "string" && contentType.includes("json")) try {
579
+ return JSON.parse(example);
580
+ } catch {}
581
+ return example;
582
+ };
583
+ /** Create a set of all the types we wish to parse as JSON */
584
+ var parseableTypesSet = new Set([
585
+ "array",
586
+ "object",
587
+ "boolean",
588
+ "number",
589
+ "integer",
590
+ "null"
591
+ ]);
592
+ /** De-serialize the example value based on the schema type */
593
+ var deSerializeSchemaExample = (example, schema) => {
594
+ const resolvedSchema = getResolvedRef(schema);
595
+ if (typeof example === "string" && resolvedSchema && "type" in resolvedSchema) {
596
+ const type = Array.isArray(resolvedSchema.type) ? resolvedSchema.type[0] : resolvedSchema.type;
597
+ if (type && parseableTypesSet.has(type)) try {
598
+ return JSON.parse(example);
599
+ } catch {
600
+ if (type === "array") return example.split(/,\s?/).filter((v) => v !== "");
601
+ }
602
+ }
603
+ return example;
604
+ };
605
+ //#endregion
606
+ //#region src/v2/blocks/request-block/helpers/is-param-disabled.ts
607
+ /**
608
+ * Determines if a parameter is disabled
609
+ *
610
+ * First we explicitly check if its been disabled via the `x-disabled` extension.
611
+ * Then we check if its an optional parameter and not a path parameter.
612
+ *
613
+ * @param param - The parameter to check.
614
+ * @param example - The example to check.
615
+ * @returns true if the parameter is disabled, false otherwise.
616
+ */
617
+ var isParamDisabled = (param, example) => {
618
+ const xDisabled = example?.["x-disabled"];
619
+ if (typeof xDisabled === "boolean") return xDisabled;
620
+ return !param.required && param.in !== "path";
621
+ };
622
+ //#endregion
623
+ //#region src/v2/blocks/operation-block/helpers/serialize-parameter.ts
624
+ /**
625
+ * Shared parameter serialization utilities for OpenAPI style values.
626
+ * Used by both build-request-parameters and process-parameters.
627
+ *
628
+ * @see https://spec.openapis.org/oas/v3.1.1.html#style-values
629
+ */
630
+ /**
631
+ * Serializes a value based on the content type for content-based query parameters.
632
+ * Content-based query parameters do not use style serialization and instead follow
633
+ * their content type specification (e.g., application/json should be JSON.stringified).
634
+ *
635
+ * @param value - The value to serialize
636
+ * @param contentType - The content type to use for serialization
637
+ * @returns The serialized value as a string
638
+ */
639
+ var serializeContentValue = (value, contentType) => {
640
+ if (typeof value === "string") return value;
641
+ if (contentType.includes("json") || typeof value === "object" && value !== null && !Array.isArray(value)) return JSON.stringify(value);
642
+ return String(value);
643
+ };
644
+ /**
645
+ * Serializes a value according to OpenAPI simple style.
646
+ * Used for path and header parameters.
647
+ *
648
+ * Simple style with explode: false
649
+ * - Primitive: blue
650
+ * - Array: blue,black,brown
651
+ * - Object: R,100,G,200,B,150
652
+ *
653
+ * Simple style with explode: true
654
+ * - Primitive: blue
655
+ * - Array: blue,black,brown
656
+ * - Object: R=100,G=200,B=150
657
+ */
658
+ var serializeSimpleStyle = (value, explode) => {
659
+ if (Array.isArray(value)) return value.join(",");
660
+ if (typeof value === "object" && value !== null) {
661
+ const entries = Object.entries(value);
662
+ if (explode) return entries.map(([k, v]) => `${k}=${v}`).join(",");
663
+ return entries.map(([k, v]) => `${k},${v}`).join(",");
664
+ }
665
+ return value;
666
+ };
667
+ /**
668
+ * Serializes a value according to OpenAPI form style.
669
+ * Used for query and cookie parameters.
670
+ *
671
+ * Form style with explode: true (default for query)
672
+ * - Primitive: color=blue
673
+ * - Array: color=blue&color=black&color=brown (multiple entries)
674
+ * - Object: R=100&G=200&B=150 (multiple entries)
675
+ *
676
+ * Form style with explode: false
677
+ * - Primitive: color=blue
678
+ * - Array: color=blue,black,brown
679
+ * - Object: color=R,100,G,200,B,150
680
+ */
681
+ var serializeFormStyle = (value, explode) => {
682
+ if (Array.isArray(value) && explode) return value.map((v) => ({
683
+ key: "",
684
+ value: v
685
+ }));
686
+ if (Array.isArray(value)) return value.join(",");
687
+ if (typeof value === "object" && value !== null && explode) return Object.entries(value).map(([k, v]) => ({
688
+ key: k,
689
+ value: v
690
+ }));
691
+ if (typeof value === "object" && value !== null) return Object.entries(value).map(([k, v]) => `${k},${v}`).join(",");
692
+ return value;
693
+ };
694
+ /**
695
+ * Serializes a value according to OpenAPI form style for cookies.
696
+ * This is similar to serializeFormStyle but handles nested objects recursively
697
+ * and treats null values specially for cookie serialization.
698
+ *
699
+ * Form style with explode: true (default for cookies)
700
+ * - Primitive: color=blue
701
+ * - Array: color=blue&color=black&color=brown (multiple entries)
702
+ * - Object: R=100&G=200&B=150 (multiple entries)
703
+ *
704
+ * Form style with explode: false
705
+ * - Primitive: color=blue
706
+ * - Array: color=blue,black,brown (null becomes "null")
707
+ * - Object: color=R,100,G,200,B,150 (recursively flattened)
708
+ */
709
+ var serializeFormStyleForCookies = (value, explode) => {
710
+ if (Array.isArray(value) && explode) return value.map((v) => ({
711
+ key: "",
712
+ value: v
713
+ }));
714
+ if (Array.isArray(value)) return value.map((v) => v === null ? "null" : String(v)).join(",");
715
+ if (typeof value === "object" && value !== null && explode) return Object.entries(value).map(([k, v]) => ({
716
+ key: k,
717
+ value: v
718
+ }));
719
+ if (typeof value === "object" && value !== null) {
720
+ const flattenObject = (obj) => {
721
+ const result = [];
722
+ for (const [key, val] of Object.entries(obj)) if (typeof val === "object" && val !== null && !Array.isArray(val)) result.push(key, ...flattenObject(val));
723
+ else result.push(key, val === null ? "null" : String(val));
724
+ return result;
725
+ };
726
+ return flattenObject(value).join(",");
727
+ }
728
+ return value;
729
+ };
730
+ /**
731
+ * Serializes a value according to OpenAPI spaceDelimited style.
732
+ * Only valid for query parameters with array or object values.
733
+ *
734
+ * SpaceDelimited array: blue black brown
735
+ * SpaceDelimited object: R 100 G 200 B 150
736
+ */
737
+ var serializeSpaceDelimitedStyle = (value) => {
738
+ if (Array.isArray(value)) return value.join(" ");
739
+ if (typeof value === "object" && value !== null) return Object.entries(value).map(([k, v]) => `${k} ${v}`).join(" ");
740
+ return String(value);
741
+ };
742
+ /**
743
+ * Serializes a value according to OpenAPI pipeDelimited style.
744
+ * Only valid for query parameters with array or object values.
745
+ *
746
+ * PipeDelimited array: blue|black|brown
747
+ * PipeDelimited object: R|100|G|200|B|150
748
+ */
749
+ var serializePipeDelimitedStyle = (value) => {
750
+ if (Array.isArray(value)) return value.join("|");
751
+ if (typeof value === "object" && value !== null) return Object.entries(value).flat().join("|");
752
+ return String(value);
753
+ };
754
+ /**
755
+ * Serializes a value according to OpenAPI deepObject style.
756
+ * Only valid for query parameters with explode: true.
757
+ *
758
+ * DeepObject: color[R]=100&color[G]=200&color[B]=150
759
+ * Nested: user[name][first]=Alex&user[name][last]=Smith&user[role]=admin
760
+ */
761
+ var serializeDeepObjectStyle = (paramName, value) => {
762
+ const result = [];
763
+ /**
764
+ * Recursively flattens nested objects into deepObject notation.
765
+ */
766
+ const flatten = (obj, prefix) => {
767
+ for (const [key, val] of Object.entries(obj)) {
768
+ const fullKey = `${prefix}[${key}]`;
769
+ if (typeof val === "object" && val !== null && !Array.isArray(val)) flatten(val, fullKey);
770
+ else result.push({
771
+ key: fullKey,
772
+ value: String(val)
773
+ });
774
+ }
775
+ };
776
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) flatten(value, paramName);
777
+ return result;
778
+ };
779
+ //#endregion
780
+ //#region src/v2/blocks/operation-code-sample/components/ExamplePicker.vue?vue&type=script&setup=true&lang.ts
781
+ var _hoisted_1$1 = { class: "min-w-0 flex-1 truncate" };
782
+ //#endregion
783
+ //#region src/v2/blocks/operation-code-sample/components/ExamplePicker.vue
784
+ var ExamplePicker_default = /* @__PURE__ */ defineComponent({
785
+ inheritAttrs: false,
786
+ __name: "ExamplePicker",
787
+ props: /* @__PURE__ */ mergeModels({ examples: { default: () => ({}) } }, {
788
+ "modelValue": { required: true },
789
+ "modelModifiers": {}
790
+ }),
791
+ emits: ["update:modelValue"],
792
+ setup(__props) {
793
+ const selectedExampleKey = useModel(__props, "modelValue");
794
+ const exampleOptions = computed(() => Object.entries(__props.examples).map(([key, example]) => ({
795
+ id: key,
796
+ label: example?.summary ?? key
797
+ })));
798
+ const selectedExample = computed({
799
+ get: () => exampleOptions.value.find(({ id }) => id === selectedExampleKey.value),
800
+ set: (v) => selectedExampleKey.value = v?.id ?? ""
801
+ });
802
+ return (_ctx, _cache) => {
803
+ return openBlock(), createBlock(unref(ScalarListbox), {
804
+ modelValue: selectedExample.value,
805
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedExample.value = $event),
806
+ class: "w-fit min-w-32",
807
+ options: exampleOptions.value,
808
+ placement: "bottom-start",
809
+ teleport: ""
810
+ }, {
811
+ default: withCtx(() => [createVNode(unref(ScalarButton), mergeProps({
812
+ class: "text-c-2 hover:text-c-1 flex h-full w-fit min-w-0 gap-1.5 px-1.5 py-0.75 text-base font-normal",
813
+ "data-testid": "example-picker",
814
+ variant: "ghost"
815
+ }, _ctx.$attrs), {
816
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$1, toDisplayString(selectedExample.value?.label ?? "Select an example"), 1), createVNode(unref(ScalarIconCaretDown), {
817
+ class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
818
+ weight: "bold"
819
+ })]),
820
+ _: 1
821
+ }, 16)]),
822
+ _: 1
823
+ }, 8, ["modelValue", "options"]);
824
+ };
825
+ }
826
+ });
827
+ //#endregion
828
+ //#region src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.ts
829
+ /**
830
+ * Converts an object to an array of form parameters
831
+ * @param obj - The object to convert
832
+ * @returns Array of form parameters with name and value properties
833
+ */
834
+ var objectToFormParams = (obj) => {
835
+ const params = [];
836
+ /** Ensure we do not include disabled items */
837
+ const entries = Array.isArray(obj) ? obj.filter((item) => !item.isDisabled).map((item) => [item.name, item.value]) : Object.entries(obj);
838
+ for (const [key, value] of entries) {
839
+ if (value === void 0 || value === null) continue;
840
+ if (value instanceof File) {
841
+ const file = unpackProxyObject(value);
842
+ params.push({
843
+ name: key,
844
+ value: `@${file.name}`
845
+ });
846
+ } else if (Array.isArray(value)) for (const item of value) if (item instanceof File) {
847
+ const file = unpackProxyObject(item);
848
+ params.push({
849
+ name: key,
850
+ value: `@${file.name}`
851
+ });
852
+ } else params.push({
853
+ name: key,
854
+ value: String(item)
855
+ });
856
+ else if (typeof value === "object") {
857
+ const nestedParams = objectToFormParams(value);
858
+ for (const param of nestedParams) params.push({
859
+ name: `${key}.${param.name}`,
860
+ value: param.value
861
+ });
862
+ } else params.push({
863
+ name: key,
864
+ value: String(value)
865
+ });
866
+ }
867
+ return params;
868
+ };
869
+ /**
870
+ * Processes the request body and returns the processed data
871
+ * Returns undefined if no example is found
872
+ */
873
+ var processBody = ({ requestBody, contentType, example }) => {
874
+ const _contentType = contentType || Object.keys(requestBody.content)[0] || "";
875
+ const formatBinaryFile = (file) => {
876
+ return `@${unpackProxyObject(file).name || "filename"}`;
877
+ };
878
+ const isFormData = _contentType === "multipart/form-data" || _contentType === "application/x-www-form-urlencoded";
879
+ const isXml = _contentType === "application/xml";
880
+ const _example = getExample(requestBody, example, contentType)?.value;
881
+ if (typeof _example !== "undefined") {
882
+ const exampleValue = _example !== null && typeof _example === "object" ? unpackProxyObject(_example) : _example;
883
+ if (isFormData && typeof exampleValue === "object" && exampleValue !== null) return {
884
+ mimeType: _contentType,
885
+ params: objectToFormParams(exampleValue)
886
+ };
887
+ if (isXml && typeof exampleValue === "object" && exampleValue !== null) return {
888
+ mimeType: _contentType,
889
+ text: json2xml(exampleValue)
890
+ };
891
+ if (exampleValue instanceof File) return {
892
+ mimeType: _contentType,
893
+ text: formatBinaryFile(exampleValue)
894
+ };
895
+ return {
896
+ mimeType: _contentType,
897
+ text: typeof exampleValue === "string" ? exampleValue : JSON.stringify(exampleValue)
898
+ };
899
+ }
900
+ const contentSchema = getResolvedRef(requestBody.content[_contentType]?.schema);
901
+ if (typeof contentSchema !== "undefined") {
902
+ const extractedExample = getExampleFromSchema(contentSchema, {
903
+ mode: "write",
904
+ xml: isXml
905
+ });
906
+ if (extractedExample !== void 0) {
907
+ if (isFormData && typeof extractedExample === "object" && extractedExample !== null) return {
908
+ mimeType: _contentType,
909
+ params: objectToFormParams(extractedExample)
910
+ };
911
+ if (isXml && typeof extractedExample === "object" && extractedExample !== null) return {
912
+ mimeType: _contentType,
913
+ text: json2xml(extractedExample)
914
+ };
915
+ return {
916
+ mimeType: _contentType,
917
+ text: typeof extractedExample === "string" ? extractedExample : JSON.stringify(extractedExample)
918
+ };
919
+ }
920
+ }
921
+ };
922
+ //#endregion
923
+ //#region src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.ts
924
+ /** Ensures we don't have any references in the parameters */
925
+ var deReferenceParams = (params) => (params ?? []).map((param) => getResolvedRef(param));
926
+ /**
927
+ * Get the style and explode values for a parameter according to OpenAPI 3.1.1 specification.
928
+ * Handles defaults and validation for parameter location restrictions.
929
+ */
930
+ var getParameterStyleAndExplode = (param) => {
931
+ if (param.in === "header") return {
932
+ style: "simple",
933
+ explode: "explode" in param && param.explode !== void 0 ? param.explode : false
934
+ };
935
+ if (param.in === "cookie") return {
936
+ style: "form",
937
+ explode: "explode" in param && param.explode !== void 0 ? param.explode : true
938
+ };
939
+ const defaultStyle = {
940
+ path: "simple",
941
+ query: "form",
942
+ header: "simple",
943
+ cookie: "form"
944
+ }[param.in];
945
+ const style = "style" in param && param.style ? param.style : defaultStyle;
946
+ return {
947
+ style,
948
+ explode: "explode" in param && param.explode !== void 0 ? param.explode : style === "form"
949
+ };
950
+ };
951
+ /**
952
+ * Extract the value for a parameter from example data or schema.
953
+ * Prioritizes example data over schema examples.
954
+ * Returns null if the parameter is disabled so we can skip it.
955
+ */
956
+ var getParameterValue = (param, example, contentType) => {
957
+ const exampleValue = getExample(param, example, contentType);
958
+ if (isParamDisabled(param, exampleValue)) return;
959
+ if (exampleValue?.value !== void 0) return deSerializeParameter(exampleValue.value, param);
960
+ if (!("schema" in param) || !param.schema) return;
961
+ const options = param.in === "path" ? { emptyString: `{${param.name}}` } : {};
962
+ return getExampleFromSchema(getResolvedRef(param.schema), options);
963
+ };
964
+ /**
965
+ * Process OpenAPI parameters and return the updated properties.
966
+ * Handles path, query, and header parameters with various styles and explode options.
967
+ *
968
+ * @see https://spec.openapis.org/oas/latest.html#style-values
969
+ */
970
+ var processParameters = ({ harRequest, parameters, example }) => {
971
+ const newHeaders = [...harRequest.headers];
972
+ const newQueryString = [...harRequest.queryString];
973
+ let newUrl = harRequest.url;
974
+ const deReferencedParams = deReferenceParams(parameters);
975
+ for (const param of deReferencedParams) {
976
+ if (!param.in || !param.name) continue;
977
+ const paramValue = getParameterValue(param, example, void 0);
978
+ if (paramValue === void 0) continue;
979
+ const { style, explode } = getParameterStyleAndExplode(param);
980
+ switch (param.in) {
981
+ case "path":
982
+ newUrl = processPathParameters(newUrl, param, paramValue, style, explode);
983
+ break;
984
+ case "query":
985
+ if ("content" in param && param.content) {
986
+ const serializedValue = serializeContentValue(paramValue, Object.keys(param.content)[0] ?? "application/json");
987
+ newQueryString.push({
988
+ name: param.name,
989
+ value: serializedValue
990
+ });
991
+ break;
992
+ }
993
+ switch (style) {
994
+ case "form": {
995
+ const serialized = serializeFormStyle(paramValue, explode);
996
+ if (Array.isArray(serialized)) for (const entry of serialized) {
997
+ const key = entry.key || param.name;
998
+ newQueryString.push({
999
+ name: key,
1000
+ value: String(entry.value)
1001
+ });
1002
+ }
1003
+ else newQueryString.push({
1004
+ name: param.name,
1005
+ value: String(serialized)
1006
+ });
1007
+ break;
1008
+ }
1009
+ case "spaceDelimited": {
1010
+ const serialized = serializeSpaceDelimitedStyle(paramValue);
1011
+ newQueryString.push({
1012
+ name: param.name,
1013
+ value: serialized
1014
+ });
1015
+ break;
1016
+ }
1017
+ case "pipeDelimited": {
1018
+ const serialized = serializePipeDelimitedStyle(paramValue);
1019
+ newQueryString.push({
1020
+ name: param.name,
1021
+ value: serialized
1022
+ });
1023
+ break;
1024
+ }
1025
+ case "deepObject":
1026
+ if (explode) {
1027
+ const entries = serializeDeepObjectStyle(param.name, paramValue);
1028
+ for (const entry of entries) newQueryString.push({
1029
+ name: entry.key,
1030
+ value: entry.value
1031
+ });
1032
+ }
1033
+ break;
1034
+ default: newQueryString.push({
1035
+ name: param.name,
1036
+ value: String(paramValue)
1037
+ });
1038
+ }
1039
+ break;
1040
+ case "header": {
1041
+ const serialized = serializeSimpleStyle(paramValue, explode);
1042
+ newHeaders.push({
1043
+ name: param.name,
1044
+ value: String(serialized)
1045
+ });
1046
+ break;
1047
+ }
1048
+ case "cookie": {
1049
+ const serialized = serializeFormStyleForCookies(paramValue, explode);
1050
+ if (Array.isArray(serialized)) for (const entry of serialized) {
1051
+ const key = entry.key || param.name;
1052
+ const value = entry.value === null ? "null" : String(entry.value);
1053
+ harRequest.cookies.push({
1054
+ name: key,
1055
+ value
1056
+ });
1057
+ }
1058
+ else {
1059
+ const value = serialized === null ? "null" : String(serialized);
1060
+ harRequest.cookies.push({
1061
+ name: param.name,
1062
+ value
1063
+ });
1064
+ }
1065
+ break;
1066
+ }
1067
+ }
1068
+ }
1069
+ return {
1070
+ url: newUrl,
1071
+ headers: newHeaders,
1072
+ queryString: newQueryString,
1073
+ cookies: harRequest.cookies
1074
+ };
1075
+ };
1076
+ /**
1077
+ * Process path parameters according to OpenAPI specification.
1078
+ * Handles matrix, label, and simple styles with explode options.
1079
+ *
1080
+ * @param url - The URL to process
1081
+ * @param param - The parameter object
1082
+ * @param paramValue - The value of the parameter
1083
+ * @param style - The style of the parameter (matrix, label, simple)
1084
+ * @param explode - Whether to explode the parameter
1085
+ * @returns The updated URL with processed path parameters
1086
+ */
1087
+ var processPathParameters = (url, param, paramValue, style, explode) => {
1088
+ switch (style) {
1089
+ case "matrix":
1090
+ if (explode) {
1091
+ if (Array.isArray(paramValue)) {
1092
+ const values = paramValue.map((v) => `${param.name}=${v}`).join(";");
1093
+ return url.replace(`{;${param.name}}`, `;${values}`);
1094
+ }
1095
+ if (typeof paramValue === "object" && paramValue !== null) {
1096
+ const values = Object.entries(paramValue).map(([k, v]) => `${k}=${v}`).join(";");
1097
+ return url.replace(`{;${param.name}}`, `;${values}`);
1098
+ }
1099
+ return url.replace(`{;${param.name}}`, `;${param.name}=${paramValue}`);
1100
+ }
1101
+ if (Array.isArray(paramValue)) return url.replace(`{;${param.name}}`, `;${param.name}=${paramValue.join(",")}`);
1102
+ if (typeof paramValue === "object" && paramValue !== null) {
1103
+ const values = Object.entries(paramValue).map(([k, v]) => `${k},${v}`).join(",");
1104
+ return url.replace(`{;${param.name}}`, `;${param.name}=${values}`);
1105
+ }
1106
+ return url.replace(`{;${param.name}}`, `;${param.name}=${paramValue}`);
1107
+ case "label":
1108
+ if (explode) {
1109
+ if (Array.isArray(paramValue)) return url.replace(`{.${param.name}}`, `.${paramValue.join(".")}`);
1110
+ if (typeof paramValue === "object" && paramValue !== null) {
1111
+ const values = Object.entries(paramValue).map(([k, v]) => `${k}=${v}`).join(".");
1112
+ return url.replace(`{.${param.name}}`, `.${values}`);
1113
+ }
1114
+ return url.replace(`{.${param.name}}`, `.${paramValue}`);
1115
+ }
1116
+ if (Array.isArray(paramValue)) return url.replace(`{.${param.name}}`, `.${paramValue.join(",")}`);
1117
+ if (typeof paramValue === "object" && paramValue !== null) {
1118
+ const values = Object.entries(paramValue).map(([k, v]) => `${k},${v}`).join(",");
1119
+ return url.replace(`{.${param.name}}`, `.${values}`);
1120
+ }
1121
+ return url.replace(`{.${param.name}}`, `.${paramValue}`);
1122
+ case "simple": {
1123
+ const serialized = serializeSimpleStyle(paramValue, explode);
1124
+ return url.replace(`{${param.name}}`, String(serialized));
1125
+ }
1126
+ default: return url.replace(`{${param.name}}`, String(paramValue));
1127
+ }
1128
+ };
1129
+ //#endregion
1130
+ //#region src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.ts
1131
+ /**
1132
+ * Process security schemes into whichever parameters they are applicable to
1133
+ *
1134
+ * TODO: we probably want to be able to disable YOUR_SECRET_TOKEN placeholder text + or allow it to be customzied
1135
+ */
1136
+ var processSecuritySchemes = (securitySchemes) => {
1137
+ const result = {
1138
+ headers: [],
1139
+ queryString: [],
1140
+ cookies: []
1141
+ };
1142
+ for (const scheme of securitySchemes) {
1143
+ if (scheme.type === "apiKey") {
1144
+ const value = scheme["x-scalar-secret-token"] || "YOUR_SECRET_TOKEN";
1145
+ if (!scheme.name) continue;
1146
+ const param = {
1147
+ name: scheme.name,
1148
+ value
1149
+ };
1150
+ switch (scheme.in) {
1151
+ case "header":
1152
+ result.headers.push(param);
1153
+ break;
1154
+ case "query":
1155
+ result.queryString.push(param);
1156
+ break;
1157
+ case "cookie":
1158
+ result.cookies.push(param);
1159
+ break;
1160
+ }
1161
+ continue;
1162
+ }
1163
+ if (scheme.type === "http") {
1164
+ if (scheme.scheme === "basic") {
1165
+ const value = `${scheme["x-scalar-secret-username"] || ""}:${scheme["x-scalar-secret-password"] || ""}`;
1166
+ const auth = value === ":" ? "username:password" : encode(value);
1167
+ result.headers.push({
1168
+ name: "Authorization",
1169
+ value: `Basic ${auth}`
1170
+ });
1171
+ } else if (scheme.scheme === "bearer") {
1172
+ const token = scheme["x-scalar-secret-token"] || "YOUR_SECRET_TOKEN";
1173
+ result.headers.push({
1174
+ name: "Authorization",
1175
+ value: `Bearer ${token}`
1176
+ });
1177
+ }
1178
+ continue;
1179
+ }
1180
+ if (scheme.type === "oauth2" && scheme.flows) {
1181
+ const token = Object.values(scheme.flows).find((f) => f["x-scalar-secret-token"])?.["x-scalar-secret-token"] || "YOUR_SECRET_TOKEN";
1182
+ result.headers.push({
1183
+ name: "Authorization",
1184
+ value: `Bearer ${token}`
1185
+ });
1186
+ }
1187
+ }
1188
+ return result;
1189
+ };
1190
+ //#endregion
1191
+ //#region src/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.ts
1192
+ /**
1193
+ * Processes a server URL by replacing variables with their default values and merging with the path
1194
+ */
1195
+ var processServerUrl = (server, path) => {
1196
+ if (!server?.url) return path;
1197
+ const serverUrl = server.url;
1198
+ if (server.variables) return mergeUrls(replaceVariables(serverUrl, Object.entries(server.variables).reduce((defaults, [variableName, variableConfig]) => {
1199
+ if (variableConfig.default !== void 0) defaults[variableName] = variableConfig.default;
1200
+ return defaults;
1201
+ }, {})), path);
1202
+ return mergeUrls(serverUrl, path);
1203
+ };
1204
+ //#endregion
1205
+ //#region src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.ts
1206
+ /**
1207
+ * Converts an OpenAPI Operation to a HarRequest format for generating HTTP request snippets.
1208
+ *
1209
+ * This function transforms OpenAPI 3.1 operation objects into HAR (HTTP Archive) format requests,
1210
+ * which can be used to generate code snippets for various programming languages and HTTP clients.
1211
+ *
1212
+ * The conversion handles:
1213
+ * - Server URL processing and path parameter substitution
1214
+ * - Query parameter formatting based on OpenAPI parameter styles
1215
+ * - Request body processing with content type handling
1216
+ * - Security scheme integration (API keys, etc.)
1217
+ *
1218
+ * The resulting HarRequest object follows the HAR specification and includes:
1219
+ * - HTTP method and URL
1220
+ * - Headers and query parameters
1221
+ * - Request body (if present)
1222
+ * - Cookie information
1223
+ * - Size calculations for headers and body
1224
+ *
1225
+ * @see https://w3c.github.io/web-performance/specs/HAR/Overview.html
1226
+ * @see https://spec.openapis.org/oas/v3.1.0#operation-object
1227
+ */
1228
+ var operationToHar = ({ includeDefaultHeaders = false, operation, contentType, method, path, server = null, example, securitySchemes, globalCookies }) => {
1229
+ const defaultHeaders = includeDefaultHeaders ? getDefaultHeaders({
1230
+ method,
1231
+ operation,
1232
+ exampleKey: example ?? "default",
1233
+ hideDisabledHeaders: true
1234
+ }).filter((header) => !header.isOverridden) : [];
1235
+ const disabledGlobalCookies = operation["x-scalar-disable-parameters"]?.["global-cookies"]?.[example ?? "default"] ?? {};
1236
+ const harRequest = {
1237
+ method,
1238
+ url: processServerUrl(server, path),
1239
+ headers: defaultHeaders.map((header) => ({
1240
+ name: header.name,
1241
+ value: header.defaultValue
1242
+ })),
1243
+ queryString: [],
1244
+ postData: void 0,
1245
+ httpVersion: "HTTP/1.1",
1246
+ cookies: [],
1247
+ headersSize: -1,
1248
+ bodySize: -1
1249
+ };
1250
+ if (operation.parameters) {
1251
+ const { url, headers, queryString, cookies } = processParameters({
1252
+ harRequest,
1253
+ parameters: operation.parameters,
1254
+ example
1255
+ });
1256
+ const filteredGlobalCookies = globalCookies?.filter((cookie) => filterGlobalCookie({
1257
+ cookie,
1258
+ url,
1259
+ disabledGlobalCookies
1260
+ }))?.map((cookie) => ({
1261
+ name: cookie.name,
1262
+ value: cookie.value
1263
+ })) ?? [];
1264
+ harRequest.url = url;
1265
+ harRequest.headers = headers;
1266
+ harRequest.queryString = queryString;
1267
+ harRequest.cookies = [...filteredGlobalCookies, ...cookies];
1268
+ }
1269
+ const body = getResolvedRef(operation.requestBody);
1270
+ if (body?.content) {
1271
+ const postData = processBody({
1272
+ requestBody: body,
1273
+ contentType,
1274
+ example
1275
+ });
1276
+ if (postData) {
1277
+ harRequest.postData = postData;
1278
+ harRequest.bodySize = postData.text?.length ?? -1;
1279
+ if (postData.mimeType) {
1280
+ const existingContentTypeHeader = harRequest.headers.find((header) => header.name.toLowerCase() === "content-type");
1281
+ if (existingContentTypeHeader && !existingContentTypeHeader.value) existingContentTypeHeader.value = postData.mimeType;
1282
+ else if (!existingContentTypeHeader) harRequest.headers.push({
1283
+ name: "Content-Type",
1284
+ value: postData.mimeType
1285
+ });
1286
+ }
1287
+ }
1288
+ }
1289
+ if (securitySchemes) {
1290
+ const { headers, queryString, cookies } = processSecuritySchemes(securitySchemes);
1291
+ harRequest.headers.push(...headers);
1292
+ harRequest.queryString.push(...queryString);
1293
+ harRequest.cookies.push(...cookies);
1294
+ }
1295
+ let headersSize = 0;
1296
+ for (const h of harRequest.headers) headersSize += (h.name?.length ?? 0) + 2 + (h.value?.length ?? 0) + 2;
1297
+ harRequest.headersSize = headersSize;
1298
+ return harRequest;
1299
+ };
1300
+ //#endregion
1301
+ //#region src/v2/blocks/operation-code-sample/components/HttpMethod.vue
1302
+ var HttpMethod_default = /* @__PURE__ */ defineComponent({
1303
+ __name: "HttpMethod",
1304
+ props: {
1305
+ as: {},
1306
+ property: {},
1307
+ short: { type: Boolean },
1308
+ method: {}
1309
+ },
1310
+ setup(__props) {
1311
+ const props = __props;
1312
+ /** Grabs the method info object which contains abbreviation, color, and background color etc */
1313
+ const httpMethodInfo = computed(() => getHttpMethodInfo(String(props.method || "")));
1314
+ /** Full method name */
1315
+ const normalized = computed(() => normalizeHttpMethod(props.method));
1316
+ return (_ctx, _cache) => {
1317
+ return openBlock(), createBlock(resolveDynamicComponent(__props.as ?? "span"), {
1318
+ class: "uppercase",
1319
+ style: normalizeStyle({ [__props.property || "color"]: httpMethodInfo.value.colorVar })
1320
+ }, {
1321
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default"), createTextVNode(" " + toDisplayString(__props.short ? httpMethodInfo.value.short : normalized.value), 1)]),
1322
+ _: 3
1323
+ }, 8, ["style"]);
1324
+ };
1325
+ }
1326
+ });
1327
+ //#endregion
1328
+ //#region src/v2/blocks/operation-code-sample/helpers/find-client.ts
1329
+ var DEFAULT_CLIENT = "shell/curl";
1330
+ /** Type guard to check if a string is a valid client id */
1331
+ var isClient = (id) => AVAILABLE_CLIENTS.includes(id);
1332
+ /**
1333
+ * Finds and returns the appropriate client option from a list of client option groups.
1334
+ *
1335
+ * This function is used to determine which client should be initially selected in the
1336
+ * request example block. It prioritizes a specific client ID if provided, otherwise
1337
+ * falls back to the first available option.
1338
+ *
1339
+ * @param options - Array of client option groups, each containing a label and array of client options
1340
+ * @param id - Optional client identifier to search for (e.g., 'js/fetch', 'python/requests')
1341
+
1342
+ * @returns The selected client option. If a specific ID is provided and found, returns that client.
1343
+ * If the ID is not found or not provided, returns the first available client option.
1344
+ *
1345
+ * @example
1346
+ * ```typescript
1347
+ * const clientGroups = [
1348
+ * {
1349
+ * label: 'JavaScript',
1350
+ * options: [
1351
+ * { id: 'js/fetch', label: 'Fetch API', lang: 'js' },
1352
+ * { id: 'js/axios', label: 'Axios', lang: 'js' }
1353
+ * ]
1354
+ * }
1355
+ * ]
1356
+ *
1357
+ * // Find specific client
1358
+ * const client = findClient(clientGroups, 'js/fetch')
1359
+ * // Returns: { id: 'js/fetch', label: 'Fetch API', lang: 'js' }
1360
+ *
1361
+ * // Find first available client
1362
+ * const firstClient = findClient(clientGroups)
1363
+ * // Returns: { id: 'js/fetch', label: 'Fetch API', lang: 'js' }
1364
+ * ```
1365
+ */
1366
+ var findClient = (clientGroups, clientId) => {
1367
+ const firstOption = clientGroups[0]?.options[0];
1368
+ if (clientId) for (const group of clientGroups) {
1369
+ const option = group.options.find((option) => option.id === clientId);
1370
+ if (option) return option;
1371
+ }
1372
+ if (!firstOption?.id.startsWith("custom")) for (const group of clientGroups) {
1373
+ const option = group.options.find((option) => option.id === DEFAULT_CLIENT);
1374
+ if (option) return option;
1375
+ }
1376
+ return firstOption;
1377
+ };
1378
+ //#endregion
1379
+ //#region src/v2/blocks/operation-code-sample/helpers/generate-client-options.ts
1380
+ /** Helper to generate an ID for custom code samples */
1381
+ var generateCustomId = (example) => `custom/${example.lang}`;
1382
+ /**
1383
+ * Generate client options for the request example block by filtering by allowed clients
1384
+ *
1385
+ * @param allowedClients - The list of allowed clients to include in the options
1386
+ * @returns A list of client option groups
1387
+ */
1388
+ var generateClientOptions = (allowedClients = AVAILABLE_CLIENTS) => {
1389
+ /** Create set of allowlist for quicker lookups */
1390
+ const allowedClientsSet = new Set(allowedClients);
1391
+ return snippetz().clients().flatMap((group) => {
1392
+ const options = group.clients.flatMap((plugin) => {
1393
+ const id = `${group.key}/${plugin.client}`;
1394
+ if (!allowedClientsSet.has(id)) return [];
1395
+ return {
1396
+ id,
1397
+ lang: plugin.client === "curl" ? "curl" : group.key,
1398
+ title: `${capitalize(group.title)} ${plugin.title}`,
1399
+ label: plugin.title,
1400
+ targetKey: group.key,
1401
+ targetTitle: group.title,
1402
+ clientKey: plugin.client
1403
+ };
1404
+ });
1405
+ if (options.length === 0) return [];
1406
+ return {
1407
+ label: group.title,
1408
+ options
1409
+ };
1410
+ });
1411
+ };
1412
+ //#endregion
1413
+ //#region src/v2/blocks/operation-code-sample/helpers/get-clients.ts
1414
+ /**
1415
+ * Merges custom code samples with the client options
1416
+ *
1417
+ * @param customCodeSamples - The custom code samples from the operation to merge with the client options
1418
+ * @param clientOptions - The client options to merge with the custom code samples
1419
+ * @returns A list of client option groups
1420
+ */
1421
+ var getClients = (customCodeSamples, clientOptions) => {
1422
+ if (customCodeSamples.length) return [{
1423
+ label: "Code Examples",
1424
+ options: customCodeSamples.map((sample) => {
1425
+ const id = generateCustomId(sample);
1426
+ const label = sample.label || sample.lang || id;
1427
+ return {
1428
+ id,
1429
+ lang: sample.lang || "plaintext",
1430
+ title: label,
1431
+ label,
1432
+ clientKey: "custom"
1433
+ };
1434
+ })
1435
+ }, ...clientOptions];
1436
+ return clientOptions;
1437
+ };
1438
+ //#endregion
1439
+ //#region src/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.ts
1440
+ /**
1441
+ * Grabs any custom code samples from the operation
1442
+ *
1443
+ * @param operation - The operation to get the custom code samples from
1444
+ * @returns An array of custom code samples which exist in the operation
1445
+ */
1446
+ var getCustomCodeSamples = (operation) => {
1447
+ return [
1448
+ "x-custom-examples",
1449
+ "x-codeSamples",
1450
+ "x-code-samples"
1451
+ ].flatMap((key) => operation[key] ?? []);
1452
+ };
1453
+ //#endregion
1454
+ //#region src/v2/blocks/operation-code-sample/helpers/get-secrets.ts
1455
+ /** Extract secrets from security schemes */
1456
+ var getSecrets = (securitySchemes) => securitySchemes.flatMap((scheme) => {
1457
+ if (scheme.type === "apiKey") return scheme["x-scalar-secret-token"];
1458
+ if (scheme?.type === "http") return [
1459
+ scheme["x-scalar-secret-token"],
1460
+ scheme["x-scalar-secret-username"],
1461
+ scheme["x-scalar-secret-password"],
1462
+ encode(`${scheme["x-scalar-secret-username"]}:${scheme["x-scalar-secret-password"]}`)
1463
+ ];
1464
+ if (scheme.type === "oauth2") return Object.values(scheme.flows).map((flow) => flow["x-scalar-secret-token"]);
1465
+ return [];
1466
+ }).filter(Boolean);
1467
+ //#endregion
1468
+ //#region src/v2/blocks/operation-code-sample/helpers/generate-code-snippet.ts
1469
+ /** Generate the code snippet for the selected example OR operation */
1470
+ var generateCodeSnippet = ({ clientId, customCodeSamples, includeDefaultHeaders = false, operation, method, path, example, contentType, server, securitySchemes, globalCookies }) => {
1471
+ try {
1472
+ if (!clientId) return "";
1473
+ if (clientId.startsWith("custom")) return customCodeSamples.find((example) => generateCustomId(example) === clientId)?.source ?? "Custom example not found";
1474
+ const harRequest = operationToHar({
1475
+ operation,
1476
+ contentType,
1477
+ method,
1478
+ path,
1479
+ server,
1480
+ securitySchemes,
1481
+ example,
1482
+ globalCookies,
1483
+ includeDefaultHeaders
1484
+ });
1485
+ const [targetKey, clientKey] = clientId.split("/");
1486
+ const [error, payload] = getSnippet(targetKey, clientKey, harRequest);
1487
+ if (error) {
1488
+ console.error("[generateCodeSnippet]", error);
1489
+ return error.message ?? "Error generating code snippet";
1490
+ }
1491
+ return payload;
1492
+ } catch (error) {
1493
+ console.error("[generateCodeSnippet]", error);
1494
+ return "Error generating code snippet";
1495
+ }
1496
+ };
1497
+ //#endregion
1498
+ //#region src/v2/blocks/operation-code-sample/components/OperationCodeSample.vue?vue&type=script&setup=true&lang.ts
1499
+ var _hoisted_1 = ["innerHTML"];
1500
+ var _hoisted_2 = ["id"];
1501
+ var _hoisted_3 = {
1502
+ key: 0,
1503
+ class: "request-card-footer-addon"
1504
+ };
1505
+ var _hoisted_4 = { class: "request-header" };
1506
+ //#endregion
1507
+ //#region src/v2/blocks/operation-code-sample/components/OperationCodeSample.vue
1508
+ var OperationCodeSample_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
1509
+ __name: "OperationCodeSample",
1510
+ props: /* @__PURE__ */ mergeModels({
1511
+ integration: {},
1512
+ clientOptions: {},
1513
+ selectedClient: {},
1514
+ selectedServer: { default: null },
1515
+ selectedContentType: {},
1516
+ selectedExample: {},
1517
+ eventBus: {},
1518
+ securitySchemes: { default: () => [] },
1519
+ method: {},
1520
+ path: {},
1521
+ operation: {},
1522
+ fallback: { type: Boolean },
1523
+ generateLabel: { type: Function },
1524
+ isWebhook: { type: Boolean },
1525
+ globalCookies: {}
1526
+ }, {
1527
+ "selectedExample": { default: "" },
1528
+ "selectedExampleModifiers": {}
1529
+ }),
1530
+ emits: ["update:selectedExample"],
1531
+ setup(__props) {
1532
+ /** Grab the examples for the given content type */
1533
+ const requestBodyExamples = computed(() => {
1534
+ const content = getResolvedRef(__props.operation.requestBody)?.content ?? {};
1535
+ const contentType = __props.selectedContentType || Object.keys(content)[0];
1536
+ if (!contentType) return {};
1537
+ return content[contentType]?.examples ?? {};
1538
+ });
1539
+ /** The currently selected example key with v-model support */
1540
+ const selectedExampleKey = useModel(__props, "selectedExample");
1541
+ onBeforeMount(() => {
1542
+ selectedExampleKey.value ||= Object.keys(requestBodyExamples.value)[0] ?? "";
1543
+ });
1544
+ /** Grab any custom code samples from the operation */
1545
+ const customCodeSamples = computed(() => getCustomCodeSamples(__props.operation));
1546
+ /** Merge custom code samples with the client options */
1547
+ const clients = computed(() => getClients(customCodeSamples.value, __props.clientOptions));
1548
+ /** The locally selected client which would include code samples from this operation only */
1549
+ const localSelectedClient = ref(findClient(clients.value, __props.selectedClient));
1550
+ /** If the globally selected client changes we can update the local one */
1551
+ watch(() => __props.selectedClient, (newClient) => {
1552
+ const client = findClient(clients.value, newClient);
1553
+ if (client) localSelectedClient.value = client;
1554
+ });
1555
+ /** Generate HAR data for webhook requests */
1556
+ const webhookHar = computed(() => {
1557
+ if (!__props.isWebhook) return null;
1558
+ try {
1559
+ return operationToHar({
1560
+ operation: __props.operation,
1561
+ method: __props.method,
1562
+ path: __props.path,
1563
+ example: selectedExampleKey.value
1564
+ });
1565
+ } catch (error) {
1566
+ console.error("[webhookHar]", error);
1567
+ return null;
1568
+ }
1569
+ });
1570
+ /** Generate the code snippet for the selected example */
1571
+ const generatedCode = computed(() => {
1572
+ if (__props.isWebhook) return webhookHar.value?.postData?.text ?? "";
1573
+ return generateCodeSnippet({
1574
+ includeDefaultHeaders: __props.integration === "client",
1575
+ clientId: localSelectedClient.value?.id,
1576
+ customCodeSamples: customCodeSamples.value,
1577
+ operation: __props.operation,
1578
+ method: __props.method,
1579
+ path: __props.path,
1580
+ contentType: __props.selectedContentType,
1581
+ server: __props.selectedServer,
1582
+ securitySchemes: __props.securitySchemes,
1583
+ example: selectedExampleKey.value,
1584
+ globalCookies: __props.globalCookies
1585
+ });
1586
+ });
1587
+ /** The language for the code block, used for syntax highlighting */
1588
+ const codeBlockLanguage = computed(() => {
1589
+ if (__props.isWebhook) return webhookLanguage.value;
1590
+ return localSelectedClient.value?.lang;
1591
+ });
1592
+ /** Determine the language for webhook content based on MIME type */
1593
+ const webhookLanguage = computed(() => {
1594
+ if (!webhookHar.value?.postData) return "json";
1595
+ const contentType = webhookHar.value.postData.mimeType;
1596
+ if (contentType?.includes("json")) return "json";
1597
+ if (contentType?.includes("xml")) return "xml";
1598
+ if (contentType?.includes("yaml") || contentType?.includes("yml")) return "yaml";
1599
+ if (contentType?.includes("text/plain")) return "text";
1600
+ return "json";
1601
+ });
1602
+ /** Block secrets from being shown in the code block */
1603
+ const secretCredentials = computed(() => getSecrets(__props.securitySchemes));
1604
+ /** Grab the ref to freeze the ui as the clients change so there's no jump as the size of the dom changes */
1605
+ const elem = ref(null);
1606
+ /** Set custom example, or update the selected HTTP client globally */
1607
+ const selectClient = (option) => {
1608
+ if (elem.value) {
1609
+ const unfreeze = freezeElement(elem.value.$el);
1610
+ setTimeout(() => {
1611
+ unfreeze();
1612
+ }, 300);
1613
+ }
1614
+ localSelectedClient.value = option;
1615
+ if (option && !option.id.startsWith("custom")) __props.eventBus.emit("workspace:update:selected-client", option.id);
1616
+ };
1617
+ const VIRTUALIZATION_THRESHOLD = 2e4;
1618
+ const shouldVirtualize = computed(() => (generatedCode.value.length ?? 0) > VIRTUALIZATION_THRESHOLD);
1619
+ const id = useId();
1620
+ return (_ctx, _cache) => {
1621
+ return generatedCode.value ? (openBlock(), createBlock(unref(ScalarCard), {
1622
+ key: 0,
1623
+ ref_key: "elem",
1624
+ ref: elem,
1625
+ class: "request-card dark-mode"
1626
+ }, {
1627
+ default: withCtx(() => [
1628
+ createVNode(unref(ScalarCardHeader), { class: "pr-2.5" }, createSlots({
1629
+ default: withCtx(() => [
1630
+ _cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Request Example for", -1)),
1631
+ createVNode(HttpMethod_default, {
1632
+ as: "span",
1633
+ class: "request-method",
1634
+ method: __props.method
1635
+ }, null, 8, ["method"]),
1636
+ __props.generateLabel ? (openBlock(), createElementBlock("span", {
1637
+ key: 0,
1638
+ innerHTML: __props.generateLabel()
1639
+ }, null, 8, _hoisted_1)) : createCommentVNode("", true),
1640
+ renderSlot(_ctx.$slots, "header", {}, void 0, true)
1641
+ ]),
1642
+ _: 2
1643
+ }, [!__props.isWebhook && clients.value.length ? {
1644
+ name: "actions",
1645
+ fn: withCtx(() => [createVNode(unref(ScalarCombobox), {
1646
+ class: "max-h-80",
1647
+ modelValue: localSelectedClient.value,
1648
+ options: clients.value,
1649
+ placement: "bottom-end",
1650
+ teleport: "",
1651
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectClient($event))
1652
+ }, {
1653
+ default: withCtx(() => [createVNode(unref(ScalarButton), {
1654
+ class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal",
1655
+ "data-testid": "client-picker",
1656
+ variant: "ghost"
1657
+ }, {
1658
+ default: withCtx(() => [createTextVNode(toDisplayString(localSelectedClient.value?.title) + " ", 1), createVNode(unref(ScalarIconCaretDown), {
1659
+ class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
1660
+ weight: "bold"
1661
+ })]),
1662
+ _: 1
1663
+ })]),
1664
+ _: 1
1665
+ }, 8, ["modelValue", "options"])]),
1666
+ key: "0"
1667
+ } : void 0]), 1024),
1668
+ createVNode(unref(ScalarCardSection), { class: "request-editor-section custom-scroll p-0" }, {
1669
+ default: withCtx(() => [createElementVNode("div", {
1670
+ id: `${unref(id)}-example`,
1671
+ class: "code-snippet"
1672
+ }, [!shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarCodeBlock), {
1673
+ key: 0,
1674
+ class: "bg-b-2 h-full",
1675
+ content: generatedCode.value,
1676
+ hideCredentials: secretCredentials.value,
1677
+ lang: codeBlockLanguage.value,
1678
+ lineNumbers: ""
1679
+ }, null, 8, [
1680
+ "content",
1681
+ "hideCredentials",
1682
+ "lang"
1683
+ ])) : (openBlock(), createBlock(unref(ScalarVirtualText), {
1684
+ key: 1,
1685
+ containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
1686
+ contentClass: "language-plaintext whitespace-pre font-code text-base",
1687
+ lineHeight: 20,
1688
+ text: generatedCode.value
1689
+ }, null, 8, ["text"]))], 8, _hoisted_2)]),
1690
+ _: 1
1691
+ }),
1692
+ Object.keys(requestBodyExamples.value).length > 1 || _ctx.$slots.footer ? (openBlock(), createBlock(unref(ScalarCardFooter), {
1693
+ key: 0,
1694
+ class: "request-card-footer bg-b-3"
1695
+ }, {
1696
+ default: withCtx(() => [Object.keys(requestBodyExamples.value).length > 1 ? (openBlock(), createElementBlock("div", _hoisted_3, [Object.keys(requestBodyExamples.value).length ? (openBlock(), createBlock(ExamplePicker_default, {
1697
+ key: 0,
1698
+ modelValue: selectedExampleKey.value,
1699
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedExampleKey.value = $event),
1700
+ examples: requestBodyExamples.value
1701
+ }, null, 8, ["modelValue", "examples"])) : createCommentVNode("", true)])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "footer", { exampleName: selectedExampleKey.value }, void 0, true)]),
1702
+ _: 3
1703
+ })) : createCommentVNode("", true)
1704
+ ]),
1705
+ _: 3
1706
+ }, 512)) : __props.fallback ? (openBlock(), createBlock(unref(ScalarCard), {
1707
+ key: 1,
1708
+ class: "request-card dark-mode"
1709
+ }, {
1710
+ default: withCtx(() => [createVNode(unref(ScalarCardSection), { class: "request-card-simple" }, {
1711
+ default: withCtx(() => [createElementVNode("div", _hoisted_4, [createVNode(HttpMethod_default, {
1712
+ as: "span",
1713
+ class: "request-method",
1714
+ method: __props.method
1715
+ }, null, 8, ["method"]), renderSlot(_ctx.$slots, "header", {}, void 0, true)]), renderSlot(_ctx.$slots, "footer", { exampleName: selectedExampleKey.value }, void 0, true)]),
1716
+ _: 3
1717
+ })]),
1718
+ _: 3
1719
+ })) : createCommentVNode("", true);
1720
+ };
1721
+ }
1722
+ }), [["__scopeId", "data-v-cbc307e3"]]);
1723
+ //#endregion
1724
+ export { getDefaultHeaders as C, getExampleFromSchema as S, getResolvedRefDeep as T, serializeSimpleStyle as _, getClients as a, deSerializeParameter as b, findClient as c, ExamplePicker_default as d, serializeContentValue as f, serializePipeDelimitedStyle as g, serializeFormStyleForCookies as h, getCustomCodeSamples as i, isClient as l, serializeFormStyle as m, generateCodeSnippet as n, generateClientOptions as o, serializeDeepObjectStyle as p, getSecrets as r, DEFAULT_CLIENT as s, OperationCodeSample_default as t, HttpMethod_default as u, serializeSpaceDelimitedStyle as v, getExample as w, filterGlobalCookie as x, isParamDisabled as y };
1725
+
1726
+ //# sourceMappingURL=operation-code-sample-ZUTueV3v.js.map