@scalar/api-client 2.38.2 → 2.38.4
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.
- package/CHANGELOG.md +14 -0
- package/dist/{AddressBar-B4xnl66I.js → AddressBar-BOZGKSoz.js} +4 -4
- package/dist/{AddressBar-B4xnl66I.js.map → AddressBar-BOZGKSoz.js.map} +1 -1
- package/dist/{App-CvClwSlM.js → App-Ckirvnv1.js} +2 -2
- package/dist/{App-CvClwSlM.js.map → App-Ckirvnv1.js.map} +1 -1
- package/dist/{App-BVH4lIe8.js → App-DHBmpWJI.js} +4 -4
- package/dist/{App-BVH4lIe8.js.map → App-DHBmpWJI.js.map} +1 -1
- package/dist/{CodeInput-C-igR77V.js → CodeInput-BTN8cC5h.js} +2 -2
- package/dist/{CodeInput-C-igR77V.js.map → CodeInput-BTN8cC5h.js.map} +1 -1
- package/dist/{Collection-4MT9WmDD.js → Collection-BsAG7ms5.js} +2 -2
- package/dist/{Collection-4MT9WmDD.js.map → Collection-BsAG7ms5.js.map} +1 -1
- package/dist/{CollectionAuthentication-MHWQpw74.js → CollectionAuthentication-BMGhRnpo.js} +5 -5
- package/dist/{CollectionAuthentication-MHWQpw74.js.map → CollectionAuthentication-BMGhRnpo.js.map} +1 -1
- package/dist/{CollectionEnvironment-Dw35vIqo.js → CollectionEnvironment-BY9Gcnln.js} +4 -4
- package/dist/{CollectionEnvironment-Dw35vIqo.js.map → CollectionEnvironment-BY9Gcnln.js.map} +1 -1
- package/dist/{CollectionOverview-TUdDIu5f.js → CollectionOverview-C3GvN8GY.js} +3 -3
- package/dist/{CollectionOverview-TUdDIu5f.js.map → CollectionOverview-C3GvN8GY.js.map} +1 -1
- package/dist/{CollectionServers-BrjTCfDe.js → CollectionServers-DuOLysNB.js} +5 -5
- package/dist/{CollectionServers-BrjTCfDe.js.map → CollectionServers-DuOLysNB.js.map} +1 -1
- package/dist/{CollectionSettings-HVSlp2Gv.js → CollectionSettings-FtXNetOh.js} +2 -2
- package/dist/{CollectionSettings-HVSlp2Gv.js.map → CollectionSettings-FtXNetOh.js.map} +1 -1
- package/dist/{CommandPalette-CL8k4CoN.js → CommandPalette-BxoEK8TY.js} +2 -2
- package/dist/{CommandPalette-CL8k4CoN.js.map → CommandPalette-BxoEK8TY.js.map} +1 -1
- package/dist/{Cookies-DbOKTi1f.js → Cookies-BYTv1YIA.js} +8 -8
- package/dist/{Cookies-DbOKTi1f.js.map → Cookies-BYTv1YIA.js.map} +1 -1
- package/dist/{DataTableInput-yaU5g-kP.js → DataTableInput-RydMDjn2.js} +2 -2
- package/dist/{DataTableInput-yaU5g-kP.js.map → DataTableInput-RydMDjn2.js.map} +1 -1
- package/dist/{Environment-DJatRQIg.js → Environment-BIxG7DaO.js} +5 -5
- package/dist/{Environment-DJatRQIg.js.map → Environment-BIxG7DaO.js.map} +1 -1
- package/dist/{EnvironmentModal-DBEJ4Kzj.js → EnvironmentModal-C0lYytkh.js} +2 -2
- package/dist/{EnvironmentModal-DBEJ4Kzj.js.map → EnvironmentModal-C0lYytkh.js.map} +1 -1
- package/dist/{Form-CSKzyHGO.js → Form-KFcdRQp1.js} +3 -3
- package/dist/{Form-CSKzyHGO.js.map → Form-KFcdRQp1.js.map} +1 -1
- package/dist/{ImportCollection-DfX1UQ5u.js → ImportCollection-CGjySEzP.js} +2 -2
- package/dist/{ImportCollection-DfX1UQ5u.js.map → ImportCollection-CGjySEzP.js.map} +1 -1
- package/dist/{MainLayout-BEFMl1ud.js → MainLayout-BnLwst16.js} +3 -3
- package/dist/{MainLayout-BEFMl1ud.js.map → MainLayout-BnLwst16.js.map} +1 -1
- package/dist/{Modal-sQ9vH6MN.js → Modal-CTZ8UNds.js} +2 -2
- package/dist/{Modal-sQ9vH6MN.js.map → Modal-CTZ8UNds.js.map} +1 -1
- package/dist/{Request-gscRsGQ8.js → Request-d0RY0ZhC.js} +10 -10
- package/dist/{Request-gscRsGQ8.js.map → Request-d0RY0ZhC.js.map} +1 -1
- package/dist/{RequestAuth-BzBfIysT.js → RequestAuth-1cRH3DDn.js} +3 -3
- package/dist/{RequestAuth-BzBfIysT.js.map → RequestAuth-1cRH3DDn.js.map} +1 -1
- package/dist/{RequestRoot-3Bj8JZD-.js → RequestRoot-pW0yXesG.js} +7 -7
- package/dist/{RequestRoot-3Bj8JZD-.js.map → RequestRoot-pW0yXesG.js.map} +1 -1
- package/dist/{RequestSection-HhdJj9hW.js → RequestSection-D2BLvDTr.js} +4 -4
- package/dist/{RequestSection-HhdJj9hW.js.map → RequestSection-D2BLvDTr.js.map} +1 -1
- package/dist/{ResponseSection-DMJ0tw8E.js → ResponseSection-B_YF7l_E.js} +3 -3
- package/dist/{ResponseSection-DMJ0tw8E.js.map → ResponseSection-B_YF7l_E.js.map} +1 -1
- package/dist/{Server-DnA_BzPS.js → Server-CEKGIEfE.js} +2 -2
- package/dist/{Server-DnA_BzPS.js.map → Server-CEKGIEfE.js.map} +1 -1
- package/dist/{Settings-CYZzdJPO.js → Settings-BaPvhJ8Y.js} +2 -2
- package/dist/{Settings-CYZzdJPO.js.map → Settings-BaPvhJ8Y.js.map} +1 -1
- package/dist/{Sidebar-C6AdX6-N.js → Sidebar-CRxdl38Y.js} +2 -2
- package/dist/{Sidebar-C6AdX6-N.js.map → Sidebar-CRxdl38Y.js.map} +1 -1
- package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
- package/dist/components/AddressBar/index.js +3 -3
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
- package/dist/components/CodeInput/index.js +1 -1
- package/dist/components/CommandPalette/index.js +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
- package/dist/components/DataTable/index.js +2 -2
- package/dist/components/Form/LabelInput.vue.d.ts +1 -1
- package/dist/components/ImportCollection/index.js +1 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/index.js +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +4 -4
- package/dist/{components-CSxJTn6F.js → components-B0BwUDFw.js} +2 -2
- package/dist/{components-CSxJTn6F.js.map → components-B0BwUDFw.js.map} +1 -1
- package/dist/get-resolved-url-SybDPV0U.js +85 -0
- package/dist/get-resolved-url-SybDPV0U.js.map +1 -0
- package/dist/{get-server-url-o3On8CEr.js → get-server-url-UVN-dx79.js} +1 -1
- package/dist/{get-server-url-o3On8CEr.js.map → get-server-url-UVN-dx79.js.map} +1 -1
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/layouts/App/create-api-client-app.d.ts +9 -9
- package/dist/layouts/App/index.js +3 -3
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
- package/dist/layouts/Modal/index.d.ts +1 -1
- package/dist/layouts/Modal/index.js +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
- package/dist/layouts/Web/index.js +4 -4
- package/dist/libs/create-client.d.ts +3 -3
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/index.d.ts +1 -1
- package/dist/libs/index.js +1 -1
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +3 -3
- package/dist/{operation-block-BnMIKAOh.js → operation-block-B1B3lJPx.js} +67 -17
- package/dist/operation-block-B1B3lJPx.js.map +1 -0
- package/dist/{operation-code-sample-ZUTueV3v.js → operation-code-sample-DOzAPxLQ.js} +22 -10
- package/dist/operation-code-sample-DOzAPxLQ.js.map +1 -0
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/{request-block-DwsGy64Q.js → request-block-C1kLLMEd.js} +4 -4
- package/dist/{request-block-DwsGy64Q.js.map → request-block-C1kLLMEd.js.map} +1 -1
- package/dist/{scalar-address-bar-block--Vs6IBU1.js → scalar-address-bar-block-BbysOhkE.js} +2 -2
- package/dist/{scalar-address-bar-block--Vs6IBU1.js.map → scalar-address-bar-block-BbysOhkE.js.map} +1 -1
- package/dist/{scalar-auth-selector-block-DI3DLag9.js → scalar-auth-selector-block-Bs79QOMA.js} +12 -9
- package/dist/scalar-auth-selector-block-Bs79QOMA.js.map +1 -0
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/environment.d.ts +1 -1
- package/dist/store/events.d.ts +8 -8
- package/dist/store/import-spec.d.ts +2 -2
- package/dist/store/index.js +1 -1
- package/dist/store/request-example.d.ts +1 -1
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/security-schemes.d.ts +1 -1
- package/dist/store/servers.d.ts +1 -1
- package/dist/store/store.d.ts +7 -7
- package/dist/store/tags.d.ts +1 -1
- package/dist/store/workspace.d.ts +1 -1
- package/dist/{store-DpSUVhjp.js → store-DnlAQK5d.js} +15 -15
- package/dist/{store-DpSUVhjp.js.map → store-DnlAQK5d.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +6 -0
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +2 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/index.js +11 -11
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
- package/dist/v2/blocks/request-block/index.js +5 -5
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/index.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/index.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +3 -3
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/v2/constants.d.ts +3 -0
- package/dist/v2/constants.d.ts.map +1 -0
- package/dist/v2/features/app/App.vue.d.ts +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
- package/dist/v2/features/app/components/index.js +4 -4
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +3 -3
- package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +3 -3
- package/dist/v2/features/app/index.d.ts +5 -5
- package/dist/v2/features/app/index.js +14 -14
- package/dist/v2/features/app/index.js.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +45 -10
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
- package/dist/v2/features/modal/index.js +10 -10
- package/dist/v2/features/modal/modal-events.d.ts +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +6 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
- package/dist/v2/features/operation/index.js +10 -10
- package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
- package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
- package/dist/v2/helpers/get-tab-details.d.ts +1 -1
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Request/Request.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.js +3 -3
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -4
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/index.js +3 -3
- package/dist/views/Request/components/index.js +1 -1
- package/dist/views/Request/handle-drag.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/package.json +12 -12
- package/dist/get-resolved-url-BUCwrBzc.js +0 -30
- package/dist/get-resolved-url-BUCwrBzc.js.map +0 -1
- package/dist/operation-block-BnMIKAOh.js.map +0 -1
- package/dist/operation-code-sample-ZUTueV3v.js.map +0 -1
- package/dist/scalar-auth-selector-block-DI3DLag9.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-block-BnMIKAOh.js","names":[],"sources":["../src/v2/blocks/operation-block/helpers/build-request-security.ts","../src/v2/blocks/operation-block/helpers/build-request-body.ts","../src/v2/blocks/operation-block/helpers/build-request-cookie-header.ts","../src/v2/blocks/operation-block/helpers/build-request-parameters.ts","../src/v2/blocks/operation-block/helpers/build-request.ts","../src/v2/blocks/operation-block/helpers/har-to-fetch-request.ts","../src/v2/blocks/operation-block/helpers/get-cookie-header-keys.ts","../src/v2/blocks/operation-block/helpers/har-to-fetch-response.ts","../src/v2/blocks/operation-block/helpers/response-cache.ts","../src/v2/blocks/operation-block/helpers/decode-buffer.ts","../src/v2/blocks/operation-block/helpers/send-request.ts","../src/v2/blocks/operation-block/helpers/validate-path-parameters.ts","../src/v2/features/operation/helpers/combine-params.ts","../src/v2/features/operation/helpers/get-security-requirements.ts","../src/v2/features/operation/helpers/get-selected-security.ts","../src/v2/features/operation/helpers/get-selected-server.ts","../src/v2/features/modal/helpers/map-hidden-clients-config.ts","../src/v2/helpers/get-active-proxy-url.ts","../src/v2/features/operation/Operation.vue","../src/v2/features/operation/Operation.vue","../src/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue","../src/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue","../src/v2/blocks/operation-block/components/Header.vue","../src/v2/blocks/operation-block/components/Header.vue","../src/v2/blocks/operation-block/OperationBlock.vue","../src/v2/blocks/operation-block/OperationBlock.vue"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n type XScalarCookie,\n xScalarCookieSchema,\n} from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\nimport type { SecurityRequirementObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { encode } from 'js-base64'\n\nimport type { MergedSecuritySchemes } from '@/v2/blocks/scalar-auth-selector-block/helpers/merge-security'\nimport type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types'\n\n/**\n * Get the selected security schemes from security requirements.\n * Takes security requirement objects and resolves them to actual security scheme objects.\n */\nexport const getSecuritySchemes = (\n securitySchemes: MergedSecuritySchemes,\n selectedSecurity: SecurityRequirementObject[],\n): SecuritySchemeObjectSecret[] =>\n selectedSecurity.flatMap((scheme) =>\n objectKeys(scheme).flatMap((key) => {\n const scheme = getResolvedRef(securitySchemes?.[key])\n if (scheme) {\n return scheme\n }\n\n return []\n }),\n ) ?? []\n\n/**\n * Generates the headers, cookies and query params for selected security schemes\n * In the future we can add customization for where the security is applied\n */\nexport const buildRequestSecurity = (\n /** Currently selected security for the current operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[],\n /** Environment variables flattened into a key-value object */\n env: Record<string, string> = {},\n /** Include this parameter to set the placeholder for empty tokens */\n emptyTokenPlaceholder = '',\n): { headers: Record<string, string>; cookies: XScalarCookie[]; urlParams: URLSearchParams } => {\n const headers: Record<string, string> = {}\n const cookies: XScalarCookie[] = []\n const urlParams = new URLSearchParams()\n\n selectedSecuritySchemes.forEach((scheme) => {\n // Api key\n if (scheme.type === 'apiKey') {\n const name = replaceEnvVariables(scheme.name, env)\n const value = replaceEnvVariables(scheme['x-scalar-secret-token'], env) || emptyTokenPlaceholder\n\n if (scheme.in === 'header') {\n headers[name] = value\n }\n if (scheme.in === 'query') {\n urlParams.append(name, value)\n }\n if (scheme.in === 'cookie') {\n cookies.push(\n coerceValue(xScalarCookieSchema, {\n name,\n value,\n path: '/',\n }),\n )\n }\n }\n\n // HTTP\n if (scheme.type === 'http') {\n if (scheme.scheme === 'basic') {\n const username = replaceEnvVariables(scheme['x-scalar-secret-username'], env)\n const password = replaceEnvVariables(scheme['x-scalar-secret-password'], env)\n const value = `${username}:${password}`\n\n headers['Authorization'] = `Basic ${value === ':' ? 'username:password' : encode(value)}`\n } else {\n const value = replaceEnvVariables(scheme['x-scalar-secret-token'], env)\n headers['Authorization'] = `Bearer ${value || emptyTokenPlaceholder}`\n }\n }\n\n // OAuth2\n if (scheme.type === 'oauth2') {\n const flows = Object.values(scheme?.flows ?? {})\n const token = replaceEnvVariables(\n flows.filter(isDefined).find((f) => f['x-scalar-secret-token'])?.['x-scalar-secret-token'] ?? '',\n env,\n )\n\n headers['Authorization'] = `Bearer ${token || emptyTokenPlaceholder}`\n }\n })\n\n return { headers, cookies, urlParams }\n}\n","import { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { unpackProxyObject } from '@scalar/workspace-store/helpers/unpack-proxy'\nimport type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/request-body'\n\nimport { getSelectedBodyContentType } from '@/v2/blocks/operation-block/helpers/get-selected-body-content-type'\nimport { getExampleFromBody } from '@/v2/blocks/request-block/helpers/get-request-body-example'\n\n/**\n * Create the fetch request body\n */\nexport const buildRequestBody = (\n requestBody: RequestBodyObject | undefined,\n /** Environment variables flattened into a key-value object */\n env: Record<string, string> = {},\n /** The key of the current example */\n exampleKey = 'default',\n): BodyInit | null => {\n if (!requestBody) {\n return null\n }\n\n /** Selected content type for the body from the dropdown, stored as x-scalar-selected-content-type */\n const bodyContentType = getSelectedBodyContentType(requestBody, exampleKey)\n if (!bodyContentType) {\n return null\n }\n\n /** An example value or generated example from the schema */\n const example = getExampleFromBody(requestBody, bodyContentType, exampleKey)\n if (!example) {\n return null\n }\n\n // Form data - array format (from UI editor)\n if (\n (bodyContentType === 'multipart/form-data' || bodyContentType === 'application/x-www-form-urlencoded') &&\n Array.isArray(example.value)\n ) {\n const exampleValue = example.value.filter((item) => !item.isDisabled) as { name: string; value: string | File }[]\n const form = bodyContentType === 'multipart/form-data' ? new FormData() : new URLSearchParams()\n\n // Loop over all entries and add them to the form\n exampleValue.forEach(({ name, value }) => {\n if (!name) {\n return\n }\n const replacedName = replaceEnvVariables(name, env)\n\n // Handle file uploads\n if (value instanceof File && form instanceof FormData) {\n /**\n * We need to unwrap the proxies to get the file name due to the\n * \"this\" context in the proxy causing an illegal invocation error\n */\n const unwrappedValue = unpackProxyObject(value)\n form.append(replacedName, unwrappedValue, unwrappedValue.name)\n }\n // Text input\n else if (typeof value === 'string') {\n form.append(replacedName, replaceEnvVariables(value, env))\n }\n })\n\n return form\n }\n\n // Form data - object format (from schema examples)\n // When the example value is a plain object and content type is form-urlencoded,\n // convert to URLSearchParams instead of JSON stringifying\n if (\n bodyContentType === 'application/x-www-form-urlencoded' &&\n example.value !== null &&\n typeof example.value === 'object' &&\n !Array.isArray(example.value)\n ) {\n const form = new URLSearchParams()\n\n // Convert object properties to form fields\n for (const [key, value] of Object.entries(example.value)) {\n if (key && value !== undefined && value !== null) {\n const replacedKey = replaceEnvVariables(key, env)\n const stringValue = typeof value === 'string' ? value : String(value)\n form.append(replacedKey, replaceEnvVariables(stringValue, env))\n }\n }\n\n return form\n }\n\n const exampleValue =\n example.value !== null && typeof example.value === 'object' ? unpackProxyObject(example.value) : example.value\n\n if (exampleValue instanceof File) {\n return exampleValue\n }\n\n // Ensure we stringify the example value if it is an object\n if (typeof exampleValue === 'object') {\n return replaceEnvVariables(JSON.stringify(exampleValue), env)\n }\n\n // Return binary or string values\n return typeof exampleValue === 'string' ? replaceEnvVariables(exampleValue, env) : exampleValue\n}\n","import { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport {\n type XScalarCookie,\n xScalarCookieSchema,\n} from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\nimport { filterGlobalCookie } from '@/v2/blocks/operation-block/helpers/filter-global-cookies'\n\nconst CUSTOM_COOKIE_HEADER_WARNING =\n \"We're using a `X-Scalar-Cookie` custom header to the request. The proxy will forward this as a `Cookie` header. We do this to avoid the browser omitting the `Cookie` header for cross-origin requests for security reasons.\"\nconst COOKIE_HEADER_WARNING = `We're trying to add a Cookie header, but browsers often omit them for cross-origin requests for various security reasons. If it's not working, that's probably why. Here are the requirements for it to work:\n\n - The browser URL must be on the same domain as the server URL.\n - The connection must be made over HTTPS.\n `\n\n/**\n * Generate a cookie header from the cookie params\n */\nexport const getCookieHeader = (cookieParams: XScalarCookie[], originalCookieHeader: string | undefined): string => {\n // Generate the cookie header from the cookie params\n const cookieHeader = cookieParams.map((c) => `${c.name}=${c.value}`).join('; ')\n\n // Merge with the original cookie header\n if (originalCookieHeader && cookieHeader) {\n return `${originalCookieHeader}; ${cookieHeader}`\n }\n\n // Return whichever one exists, or empty string if both are empty\n return originalCookieHeader || cookieHeader || ''\n}\n\n/**\n * Build out the cookies header taking in global, param and security scheme cookies\n */\nexport const buildRequestCookieHeader = ({\n paramCookies,\n globalCookies,\n env,\n originalCookieHeader,\n url,\n useCustomCookieHeader,\n disabledGlobalCookies,\n}: {\n /** Parsed/replaced cookies from the parameters and security schemes */\n paramCookies: XScalarCookie[]\n /** Raw global cookies from the workspace/document */\n globalCookies: XScalarCookie[]\n /** Environment variables flattened into a key-value object */\n env: Record<string, string>\n /** Cookie header that previously exists from the spec OR from the user */\n originalCookieHeader: string | undefined | null\n /** The url of the request used to filter global cookies by domain */\n url: string\n /**\n * If we are running in Electron or using the proxy, we need to add a custom header\n * that's then forwarded as a `Cookie` header.\n */\n useCustomCookieHeader: boolean\n /** The disabled global cookies for the current example */\n disabledGlobalCookies: Record<string, boolean>\n}): null | { name: string; value: string } => {\n /** Filter the global cookies by domain + parse */\n const filteredGlobalCookies = globalCookies\n .filter((cookie) => filterGlobalCookie({ cookie, url, disabledGlobalCookies }))\n .map((cookie) => {\n return coerceValue(xScalarCookieSchema, {\n ...cookie,\n name: replaceEnvVariables(cookie.name, env),\n value: replaceEnvVariables(cookie.value, env),\n })\n })\n\n /** Generate the cookie header */\n const cookieHeader = getCookieHeader([...filteredGlobalCookies, ...paramCookies], originalCookieHeader ?? undefined)\n\n if (cookieHeader) {\n // Add a custom header for the proxy (that's then forwarded as `Cookie`)\n if (useCustomCookieHeader) {\n console.warn(CUSTOM_COOKIE_HEADER_WARNING)\n return { name: 'X-Scalar-Cookie', value: cookieHeader }\n }\n\n // or stick to the original header (which might be removed by the browser)\n console.warn(COOKIE_HEADER_WARNING)\n return { name: 'Cookie', value: cookieHeader }\n }\n\n return null\n}\n","import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n type XScalarCookie,\n xScalarCookieSchema,\n} from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\nimport type { ParameterObject, ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { deSerializeParameter } from '@/v2/blocks/operation-block/helpers/de-serialize-parameter'\nimport { isParamDisabled } from '@/v2/blocks/request-block/helpers/is-param-disabled'\n\nimport { getExample } from './get-example'\nimport {\n serializeContentValue,\n serializeDeepObjectStyle,\n serializeFormStyle,\n serializeFormStyleForCookies,\n serializePipeDelimitedStyle,\n serializeSimpleStyle,\n serializeSpaceDelimitedStyle,\n} from './serialize-parameter'\n\n/** Helper to get explode value with default */\nconst getExplode = (param: ParameterObject, defaultValue: boolean): boolean =>\n 'explode' in param && param.explode !== undefined ? param.explode : defaultValue\n\n/**\n * Converts the parameters into a set of headers, cookies and url params while\n * replacing environment variables and extracting example values. Also builds up a record of the path\n * parameters which can then be used to replace variables in the path.\n * Also handles both content based and schema based parameters.\n *\n * @param parameters - Unfiltered parameters\n * @param env - Environment variables flattened into a key-value object\n * @param exampleKey - The key of the current example\n * @returns A set of headers, cookies and url params\n */\nexport const buildRequestParameters = (\n /** All parameters */\n parameters: ReferenceType<ParameterObject>[] = [],\n /** Environment variables flattened into a key-value object */\n env: Record<string, string> = {},\n /** The key of the current example */\n exampleKey: string = 'default',\n): {\n cookies: XScalarCookie[]\n headers: Record<string, string>\n pathVariables: Record<string, string>\n urlParams: URLSearchParams\n} => {\n const result = {\n cookies: [] as XScalarCookie[],\n headers: {} as Record<string, string>,\n pathVariables: {} as Record<string, string>,\n urlParams: new URLSearchParams(),\n }\n\n // Early return for empty parameters\n if (parameters.length === 0) {\n return result\n }\n\n // Second pass: process all parameters\n for (const referencedParam of parameters) {\n const param = getResolvedRef(referencedParam)\n const example = getExample(param, exampleKey, undefined)\n\n // Skip disabled examples\n if (!example || isParamDisabled(param, example)) {\n continue\n }\n\n /** Replace environment variables in the key and value */\n const replacedEnvValue = typeof example.value === 'string' ? replaceEnvVariables(example.value, env) : example.value\n\n /** De-serialize the example value if it is a string and matches the schema type */\n const deSerializedValue = deSerializeParameter(replacedEnvValue, param)\n const paramName = replaceEnvVariables(param.name, env)\n\n // Handle by parameter location\n switch (param.in) {\n case 'header': {\n // Filter out Content-Type header when it is multipart/form-data\n // The browser will automatically set this header with the proper boundary\n const lowerParamName = paramName.toLowerCase()\n if (lowerParamName === 'content-type' && deSerializedValue === 'multipart/form-data') {\n break\n }\n\n /** Headers only support simple style according to OpenAPI 3.1.1 */\n const serialized = serializeSimpleStyle(deSerializedValue, getExplode(param, false))\n\n // Remove undefined/null headers\n if (!isDefined(serialized)) {\n break\n }\n\n /** Headers can only be strings so we can cast numbers etc */\n const serializedString = String(serialized)\n\n // If the header already exists, append with comma\n if (result.headers[paramName]) {\n result.headers[paramName] = `${result.headers[paramName]},${serializedString}`\n } else {\n result.headers[paramName] = serializedString\n }\n break\n }\n\n case 'path': {\n // Path parameters use simple style by default\n const serialized = serializeSimpleStyle(deSerializedValue, getExplode(param, false))\n result.pathVariables[paramName] = encodeURIComponent(String(serialized))\n break\n }\n\n case 'query': {\n processQueryParameter(param, paramName, deSerializedValue, result.urlParams)\n break\n }\n\n case 'cookie': {\n processCookieParameter(paramName, deSerializedValue, getExplode(param, true), result.cookies)\n break\n }\n }\n }\n\n return result\n}\n\n/** Ensure we only apply the correcet style to the correct types */\nconst getStyle = (param: ParameterObject, replacedValue: unknown): string => {\n if (!('style' in param) || !param.style) {\n return 'form'\n }\n\n // DeepObject can only apply to objects\n if (param.style === 'deepObject') {\n if (isObject(replacedValue)) {\n return 'deepObject'\n }\n return 'form'\n }\n\n return param.style\n}\n\n/**\n * Helper function to process query parameters.\n * Extracted to reduce complexity in main function.\n */\nconst processQueryParameter = (\n param: ParameterObject,\n paramName: string,\n replacedValue: unknown,\n urlParams: URLSearchParams,\n): void => {\n /** If the parameter should be exploded, defaults to true for form style */\n const explodeParam = 'explode' in param && param.explode !== undefined ? param.explode : true\n\n /** Style of the parameter, defaults to form */\n const style = getStyle(param, replacedValue)\n\n // Content type parameters should be serialized according to the parameter's own content type\n if ('content' in param && param.content) {\n // We grab the first for now but eventually we should support selecting the content type per parameter\n const paramContentType = Object.keys(param.content)[0] ?? 'application/json'\n const serializedValue = serializeContentValue(replacedValue, paramContentType)\n urlParams.set(paramName, serializedValue)\n return\n }\n\n // Handle deepObject style\n if (style === 'deepObject' && explodeParam) {\n const entries = serializeDeepObjectStyle(paramName, replacedValue)\n for (const entry of entries) {\n urlParams.append(entry.key, entry.value)\n }\n return\n }\n\n // Handle spaceDelimited style\n if (style === 'spaceDelimited') {\n const serialized = serializeSpaceDelimitedStyle(replacedValue)\n const existingValue = urlParams.get(paramName)\n urlParams.set(paramName, existingValue ? `${existingValue} ${serialized}` : serialized)\n return\n }\n\n // Handle pipeDelimited style\n if (style === 'pipeDelimited') {\n const serialized = serializePipeDelimitedStyle(replacedValue)\n const existingValue = urlParams.get(paramName)\n urlParams.set(paramName, existingValue ? `${existingValue}|${serialized}` : serialized)\n return\n }\n\n // Handle form style (default)\n const serialized = serializeFormStyle(replacedValue, explodeParam)\n\n // If serialized is an array of key-value pairs (exploded object or array)\n if (Array.isArray(serialized)) {\n for (const entry of serialized) {\n // If key is empty, use paramName (for arrays)\n const key = entry.key || paramName\n urlParams.append(key, String(entry.value))\n }\n } else {\n // Otherwise, convert to string for URLSearchParams\n urlParams.append(paramName, String(serialized))\n }\n}\n\n/**\n * Helper function to process cookie parameters.\n * Extracted to reduce complexity in main function.\n */\nconst processCookieParameter = (\n paramName: string,\n replacedValue: unknown,\n explode: boolean,\n cookies: XScalarCookie[],\n): void => {\n // Cookies only support form style according to OpenAPI 3.1.1\n const serialized = serializeFormStyleForCookies(replacedValue, explode)\n\n // If serialized is an array of key-value pairs (exploded object or array)\n if (Array.isArray(serialized)) {\n for (const entry of serialized) {\n const key = entry.key || paramName\n cookies.push(\n coerceValue(xScalarCookieSchema, {\n name: key,\n value: String(entry.value),\n path: '/',\n }),\n )\n }\n } else {\n // Otherwise, convert to string for cookie value\n cookies.push(\n coerceValue(xScalarCookieSchema, {\n name: paramName,\n value: String(serialized),\n path: '/',\n }),\n )\n }\n}\n","import { canMethodHaveBody } from '@scalar/helpers/http/can-method-have-body'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { redirectToProxy, shouldUseProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\n\nimport { isElectron } from '@/libs/electron'\nimport { ERRORS, type ErrorResponse, normalizeError } from '@/libs/errors'\nimport { getEnvironmentVariables } from '@/v2/blocks/operation-block/helpers/get-environment-variables'\nimport { getResolvedUrl } from '@/v2/blocks/operation-block/helpers/get-resolved-url'\nimport { getDefaultHeaders } from '@/v2/blocks/request-block/helpers/get-default-headers'\nimport type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types'\n\nimport { buildRequestBody } from './build-request-body'\nimport { buildRequestCookieHeader } from './build-request-cookie-header'\nimport { buildRequestParameters } from './build-request-parameters'\nimport { buildRequestSecurity } from './build-request-security'\n\n/**\n * Builds a fully configured Request object ready for execution.\n *\n * This function processes an OpenAPI operation and constructs a fetch-compatible\n * Request by resolving environment variables, applying security schemes, building\n * headers and cookies, handling proxy redirection, and preparing the request body.\n *\n * The function handles special cases like Electron environments and proxy usage\n * where custom cookie headers are required.\n *\n * @returns A tuple containing either an error or the request object with an abort controller\n */\nexport const buildRequest = ({\n environment,\n exampleKey = 'default',\n globalCookies,\n method,\n operation,\n path,\n proxyUrl,\n server,\n selectedSecuritySchemes,\n}: {\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The key of the current example */\n exampleKey: string\n /** Workspace + document cookies */\n globalCookies: XScalarCookie[]\n /** The HTTP method of the operation */\n method: HttpMethod\n /** The operation object */\n operation: OperationObject\n /** The path of the operation */\n path: string\n /** The proxy URL for cookie domain determination */\n proxyUrl: string\n /** The server object */\n server: ServerObject | null\n /** The selected security schemes for the current operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n}): ErrorResponse<{\n controller: AbortController\n request: Request\n isUsingProxy: boolean\n}> => {\n try {\n const requestBody = getResolvedRef(operation.requestBody)\n\n /** Flatten the environment variables array into a key-value object */\n const env = getEnvironmentVariables(environment)\n /** Build out the request parameters */\n const params = buildRequestParameters(operation.parameters ?? [], env, exampleKey)\n const security = buildRequestSecurity(selectedSecuritySchemes, env)\n\n // Combine the headers, cookies and url params\n const defaultHeaders = getDefaultHeaders({ method, operation, exampleKey, hideDisabledHeaders: true })\n .filter((header) => !header.isOverridden)\n .reduce(\n (acc, header) => {\n acc[header.name] = header.defaultValue\n return acc\n },\n {} as Record<string, string>,\n )\n const headers = new Headers({ ...defaultHeaders, ...params.headers, ...security.headers })\n const urlParams = new URLSearchParams([...params.urlParams, ...security.urlParams])\n\n // If the method can have a body, build the request body, otherwise set it to null\n const body = canMethodHaveBody(method) ? buildRequestBody(requestBody, env, exampleKey) : null\n\n if (body && (body instanceof FormData || body instanceof URLSearchParams)) {\n // Delete the Content-Type header so the browser will set it automatically based on the request body\n headers.delete('Content-Type')\n }\n\n /** Combine the server url, path and url params into a single url */\n const url = getResolvedUrl({ environment, server, path, pathVariables: params.pathVariables, urlParams })\n\n // Throw for no server or path\n if (!url) {\n throw ERRORS.URL_EMPTY\n }\n\n const isUsingProxy = shouldUseProxy(proxyUrl, url)\n const proxiedUrl = redirectToProxy(proxyUrl, url)\n\n // If we are running in Electron, we need to add a custom header\n // that's then forwarded as a `User-Agent` header.\n const userAgentHeader = headers.get('User-Agent')\n if (isElectron() && userAgentHeader) {\n headers.set('X-Scalar-User-Agent', userAgentHeader)\n }\n\n /** Build out the cookies header */\n const cookiesHeader = buildRequestCookieHeader({\n paramCookies: [...params.cookies, ...security.cookies],\n globalCookies,\n env,\n originalCookieHeader: headers.get('Cookie'),\n url,\n useCustomCookieHeader: isElectron() || isUsingProxy,\n disabledGlobalCookies: operation['x-scalar-disable-parameters']?.['global-cookies']?.[exampleKey] ?? {},\n })\n\n if (cookiesHeader) {\n headers.set(cookiesHeader.name, cookiesHeader.value)\n }\n\n /** Controller to allow aborting the request */\n const controller = new AbortController()\n const acceptHeader = headers.get('Accept')\n const isSseAcceptHeader = acceptHeader?.toLowerCase().includes('text/event-stream') ?? false\n const requestCacheMode: RequestCache = isSseAcceptHeader ? 'no-store' : 'default'\n\n if (isSseAcceptHeader) {\n headers.set('Cache-Control', 'no-cache')\n headers.set('Pragma', 'no-cache')\n }\n\n /** Build the js request object */\n const request = new Request(proxiedUrl, {\n /**\n * Ensure that all methods are uppercased (though only needed for patch)\n *\n * @see https://github.com/whatwg/fetch/issues/50\n */\n method: method.toUpperCase(),\n headers,\n signal: controller.signal,\n body,\n cache: requestCacheMode,\n })\n\n return [\n null,\n {\n controller,\n isUsingProxy,\n request,\n },\n ]\n } catch (error) {\n return [normalizeError(error, ERRORS.BUILDING_REQUEST_FAILED), null]\n }\n}\n","import type { HarRequest } from '@scalar/snippetz'\n\ntype HarToFetchRequestProps = {\n /** The HAR Request object to convert */\n harRequest: HarRequest\n}\n\n/**\n * Converts a HAR (HTTP Archive) Request to a Fetch API Request object.\n *\n * This function is the reverse of fetchRequestToHar - it takes a HAR request\n * and converts it into a standard JavaScript Fetch API Request object.\n *\n * The conversion handles:\n * - Request method and URL reconstruction\n * - Headers reconstruction from HAR headers array\n * - Cookies conversion to Cookie header\n * - Form data (params) conversion to FormData or URLSearchParams\n * - Body decoding\n * - Content-Type and other header restoration\n * - Query parameters (already embedded in the URL)\n *\n * Use cases:\n * - Replaying recorded HTTP requests\n * - Creating mock requests from HAR files\n * - Testing with fixtures\n * - Request caching and restoration\n * - Re-executing historical API calls\n *\n * Note: The Fetch API Request object does not support setting the HTTP version,\n * so that information from the HAR is not preserved in the returned Request.\n * Query parameters are expected to be already part of the URL in the HAR.\n *\n * @see https://w3c.github.io/web-performance/specs/HAR/Overview.html\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Request\n *\n * @example\n * const harRequest = { method: 'POST', url: 'https://api.example.com', ... }\n * const request = harToFetchRequest({ harRequest })\n * const response = await fetch(request)\n */\nexport const harToFetchRequest = ({ harRequest }: HarToFetchRequestProps): Request => {\n const headers = buildHeaders(harRequest)\n const body = buildBody(harRequest.postData)\n\n return new Request(harRequest.url, {\n method: harRequest.method,\n headers,\n body,\n })\n}\n\n/**\n * Builds Headers object from HAR request headers and cookies.\n */\nconst buildHeaders = (harRequest: HarRequest): Headers => {\n const headers = new Headers()\n\n // Add all headers from HAR\n harRequest.headers.forEach(({ name, value }) => {\n headers.append(name, value)\n })\n\n // Convert cookies to Cookie header\n if (harRequest.cookies?.length) {\n const cookieString = harRequest.cookies.map(({ name, value }) => `${name}=${value}`).join('; ')\n headers.append('Cookie', cookieString)\n }\n\n return headers\n}\n\n/**\n * Builds request body from HAR postData.\n * Returns FormData for multipart forms, URLSearchParams for URL-encoded forms,\n * or encoded text for other content types.\n */\nconst buildBody = (postData: HarRequest['postData']): BodyInit | null => {\n if (!postData) {\n return null\n }\n\n const { params, text, mimeType } = postData\n\n // Handle form data parameters\n if (params?.length) {\n const isMultipart = mimeType?.includes('multipart/form-data')\n const form = isMultipart ? new FormData() : new URLSearchParams()\n\n params.forEach(({ name, value }) => {\n form.append(name, value || '')\n })\n\n return form\n }\n\n // Handle text body\n if (text) {\n return new TextEncoder().encode(text)\n }\n\n return null\n}\n","/**\n * Safely extract cookie header keys from response headers.\n * Modern browsers support getSetCookie() which returns an array of Set-Cookie values.\n *\n * Note: Set-Cookie headers are often hidden from JavaScript due to security restrictions.\n * The browser's network tab may show Set-Cookie headers that are not accessible via the\n * Fetch API Headers object. This is intentional browser behavior to prevent JavaScript\n * from accessing HttpOnly cookies and other sensitive cookie data.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Headers/getSetCookie\n *\n * @param headers - The response headers object\n * @returns Array of cookie header keys or empty array if not supported or restricted\n */\nexport const getCookieHeaderKeys = (headers: Headers): string[] => {\n return 'getSetCookie' in headers && typeof headers.getSetCookie === 'function' ? headers.getSetCookie() : []\n}\n","import type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { HarResponse } from '@scalar/snippetz'\n\nimport { getCookieHeaderKeys } from '@/v2/blocks/operation-block/helpers/get-cookie-header-keys'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\n\ntype HarToFetchResponseProps = {\n /** The HAR Response object to convert */\n harResponse: HarResponse\n /** Optional URL to set on the Response object */\n url?: string\n /** The HTTP method used for the request */\n method: HttpMethod\n /** The request path */\n path: string\n /** Time in ms the request took */\n duration?: number\n}\n\ntype ProcessedBody = {\n /** ArrayBuffer for Response body */\n body: ArrayBuffer | null\n /** Data for ResponseInstance (string or Blob) */\n data: string | Blob\n /** Size in bytes */\n size: number\n}\n\n/**\n * Converts a HAR (HTTP Archive) Response back to a ResponseInstance object.\n *\n * This function is the reverse of fetchResponseToHar - it takes a HAR response\n * and converts it back into a ResponseInstance object that includes both the\n * standard Fetch API Response properties and additional metadata.\n *\n * The conversion handles:\n * - Status code and status text restoration\n * - Headers reconstruction from HAR headers array\n * - Body decoding\n * - Content-Type and other header restoration\n * - URL property setting (if provided)\n * - Cookie header detection\n * - Duration tracking\n * - Response size calculation in bytes\n *\n * Body Handling:\n * - Plain text (no encoding): Text-based responses under 1MB from fetchResponseToHar\n * - Base64 encoded: Binary or legacy data (note: new HAR files won't contain binary data)\n * - Empty: Streaming responses, large responses (>1MB), or responses without bodies\n *\n * Use cases:\n * - Replaying recorded HTTP responses\n * - Creating mock responses from HAR files\n * - Testing with fixtures\n * - Response caching and restoration\n *\n * Note: The Fetch API Response object does not support setting the HTTP version,\n * so that information from the HAR is not preserved in the returned Response.\n * The URL property is set using Object.defineProperty since it is read-only\n * in the standard Response constructor.\n *\n * @see https://w3c.github.io/web-performance/specs/HAR/Overview.html\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Response\n *\n * @example\n * const harResponse = { status: 200, statusText: 'OK', ... }\n * const response = harToFetchResponse({\n * harResponse,\n * url: 'https://api.example.com',\n * method: 'GET',\n * path: '/users',\n * duration: 250\n * })\n * console.log(response.url) // 'https://api.example.com'\n * console.log(response.duration) // 250\n */\nexport const harToFetchResponse = ({\n harResponse,\n url = '',\n method,\n path,\n duration = 0,\n}: HarToFetchResponseProps): ResponseInstance => {\n const headers = buildHeaders(harResponse)\n const { body, data, size } = processBody(harResponse)\n const cookieHeaderKeys = getCookieHeaderKeys(headers)\n\n const response = new Response(body, {\n status: harResponse.status,\n statusText: harResponse.statusText,\n headers,\n })\n\n return {\n ...response,\n headers: Object.fromEntries(headers.entries()),\n cookieHeaderKeys,\n duration,\n status: harResponse.status,\n statusText: harResponse.statusText,\n method,\n path,\n data,\n size,\n url,\n }\n}\n\n/**\n * Builds Headers object and record from HAR response headers.\n */\nconst buildHeaders = (harResponse: HarResponse) => {\n const headers = new Headers()\n\n harResponse.headers.forEach(({ name, value }) => {\n headers.append(name, value)\n })\n\n return headers\n}\n\n/**\n * Processes HAR response body content.\n * Returns body, data and size for ResponseInstance.\n */\nconst processBody = (harResponse: HarResponse): ProcessedBody => {\n if (!harResponse.content.text) {\n return { body: null, data: '', size: 0 }\n }\n\n const { text, encoding } = harResponse.content\n\n if (encoding) {\n return { body: null, data: text, size: text.length }\n }\n\n const body = new TextEncoder().encode(text).buffer\n\n return { body, data: text, size: body.byteLength }\n}\n","import type { ResponseInstance } from '@scalar/oas-utils/entities/spec'\n\n/**\n * In-memory cache of operation example id → { response, request }.\n * Restores the last response when navigating back to an operation until\n * the user refreshes the page or makes a new request.\n */\nexport const responseCache = new Map<string, { response: ResponseInstance; request: Request }>()\n\n/**\n * Constructs a unique cache key for a specific operation/example.\n * The key is composed of the HTTP method, request path, and the example key,\n * delimited by \"|\", e.g. \"GET|/pets|123\".\n *\n * @param method - HTTP method (e.g., \"GET\", \"POST\")\n * @param path - The request path (e.g., \"/pets\")\n * @param exampleKey - A unique key identifying the example/request variant\n * @returns The constructed cache key string\n */\nexport function getOperationExampleKey(method: string, path: string, exampleKey: string): string {\n return `${method}|${path}|${exampleKey}`\n}\n\n/**\n * Determines if a response is a streaming response (e.g., server-sent events).\n * Assumes streaming responses include a 'reader' property.\n *\n * @param response - The response instance to check\n * @returns True if response is streaming, otherwise false\n */\nexport function isStreamingResponse(response: ResponseInstance): boolean {\n return 'reader' in response\n}\n","import MimeTypeParser from 'whatwg-mimetype'\n\nimport { isTextMediaType } from '@/views/Request/consts'\n\n/**\n * Decode the buffer according to its content-type\n *\n * @returns The decoded string or Blob\n */\nexport const decodeBuffer = (buffer: ArrayBuffer, contentType: string): string | Blob => {\n const mimeType = new MimeTypeParser(contentType)\n\n // Text\n if (isTextMediaType(mimeType.essence)) {\n const decoder = new TextDecoder(mimeType.parameters.get('charset'))\n return decoder.decode(buffer)\n }\n\n // Binary\n return new Blob([buffer], { type: mimeType.essence })\n}\n","import type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { httpStatusCodes } from '@scalar/helpers/http/http-status-codes'\nimport { type ClientPlugin, executeHook } from '@scalar/oas-utils/helpers'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { ERRORS, type ErrorResponse, normalizeError } from '@/libs/errors'\nimport { normalizeHeaders } from '@/libs/normalize-headers'\n\nimport { decodeBuffer } from './decode-buffer'\nimport { getCookieHeaderKeys } from './get-cookie-header-keys'\n\n/** A single set of populated values for a sent request */\nexport type ResponseInstance = Omit<Response, 'headers'> & {\n /** Store headers as an object to match what we had with axios */\n headers: Record<string, string>\n /** Keys of headers which set cookies */\n cookieHeaderKeys: string[]\n /** Time in ms the request took */\n duration: number\n /** The response status */\n status: number\n /** The response status text */\n statusText: string\n /** The response method */\n method: HttpMethod\n /** The request path */\n path: string\n} & (\n | {\n /** The response data */\n data: string | Blob\n /** The response size in bytes */\n size: number\n }\n | {\n /** A stream reader for a streamable response body */\n reader: ReadableStreamDefaultReader<Uint8Array>\n }\n )\n\n/** HTTP status codes that should not include a response body */\nconst NO_BODY_STATUS_CODES = [204, 205, 304]\n\n/**\n * Execute the built fetch request and return a structured response.\n *\n * This function handles the complete request lifecycle including plugin hooks,\n * response processing, streaming detection, and error handling. It supports both\n * standard responses and server-sent event streams.\n *\n * @param request - The request built by the buildRequest helper\n * @param operation - The OpenAPI operation being executed\n * @param plugins - Array of client plugins to execute hooks\n * @param isUsingProxy - Whether the request is being proxied for header handling\n * @returns A tuple with either an error or the response data\n */\nexport const sendRequest = async ({\n isUsingProxy,\n operation,\n request,\n plugins,\n}: {\n isUsingProxy: boolean\n operation: OperationObject\n plugins: ClientPlugin[]\n request: Request\n}): Promise<\n ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n }>\n> => {\n try {\n // Apply any beforeRequest hooks from the plugins\n const { request: modifiedRequest } = await executeHook({ request }, 'beforeRequest', plugins)\n\n // Execute the request and measure duration\n const startTime = Date.now()\n const response = await fetch(modifiedRequest.clone())\n const endTime = Date.now()\n const duration = endTime - startTime\n\n // Extract response metadata early for reuse\n const contentType = response.headers.get('content-type')\n const responseHeaders = normalizeHeaders(response.headers, isUsingProxy)\n const responseUrl = new URL(response.url)\n const fullPath = responseUrl.pathname + responseUrl.search\n const statusText = response.statusText || httpStatusCodes[response.status]?.name || ''\n const method = modifiedRequest.method as HttpMethod\n const shouldSkipBody = NO_BODY_STATUS_CODES.includes(response.status)\n\n /**\n * Handle server-sent event streams separately.\n * These responses need a reader instead of buffered data.\n * We check this early to avoid unnecessary body reading.\n */\n if (contentType?.startsWith('text/event-stream') && response.body) {\n return buildStreamingResponse({\n response,\n modifiedRequest,\n operation,\n plugins,\n endTime,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n })\n }\n\n return buildStandardResponse({\n response,\n modifiedRequest,\n operation,\n plugins,\n endTime,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n contentType,\n shouldSkipBody,\n })\n } catch (error) {\n return [normalizeError(error, ERRORS.REQUEST_FAILED), null]\n }\n}\n\n/**\n * Build a streaming response for server-sent events.\n * Streaming responses use a reader instead of buffering the entire body.\n */\nconst buildStreamingResponse = async ({\n response,\n modifiedRequest,\n operation,\n plugins,\n endTime,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n}: {\n response: Response\n modifiedRequest: Request\n operation: OperationObject\n plugins: ClientPlugin[]\n endTime: number\n duration: number\n responseHeaders: Record<string, string>\n statusText: string\n method: HttpMethod\n fullPath: string\n}): Promise<\n ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n }>\n> => {\n const normalizedResponse = new Response(null, {\n status: response.status,\n statusText,\n headers: response.headers,\n })\n\n await executeHook({ response: normalizedResponse, request: modifiedRequest, operation }, 'responseReceived', plugins)\n const cookieHeaderKeys = getCookieHeaderKeys(normalizedResponse.headers)\n\n return [\n null,\n {\n timestamp: endTime,\n request: modifiedRequest,\n response: {\n ...normalizedResponse,\n headers: responseHeaders,\n cookieHeaderKeys,\n reader: response.body!.getReader(),\n duration,\n method,\n path: fullPath,\n },\n originalResponse: normalizedResponse.clone(),\n },\n ]\n}\n\n/**\n * Build a standard response with buffered body data.\n * This handles all non-streaming responses including JSON, text, and binary data.\n */\nconst buildStandardResponse = async ({\n response,\n modifiedRequest,\n operation,\n plugins,\n endTime,\n duration,\n responseHeaders,\n statusText,\n method,\n fullPath,\n contentType,\n shouldSkipBody,\n}: {\n response: Response\n modifiedRequest: Request\n operation: OperationObject\n plugins: ClientPlugin[]\n endTime: number\n duration: number\n responseHeaders: Record<string, string>\n statusText: string\n method: HttpMethod\n fullPath: string\n contentType: string | null\n shouldSkipBody: boolean\n}): Promise<\n ErrorResponse<{\n response: ResponseInstance\n request: Request\n timestamp: number\n originalResponse: Response\n }>\n> => {\n /**\n * Clone the response to preserve the original for body reading.\n * Read the body once and reuse the buffer for both decoding and creating a new Response.\n */\n const clonedResponse = response.clone()\n const arrayBuffer = await clonedResponse.arrayBuffer()\n const responseType = contentType ?? 'text/plain;charset=UTF-8'\n const responseData = decodeBuffer(arrayBuffer, responseType)\n\n /**\n * Create a new Response using the arrayBuffer we already read.\n * ArrayBuffers can be reused to create new Response objects without additional memory.\n */\n const normalizedResponse = new Response(shouldSkipBody ? null : arrayBuffer, {\n status: response.status,\n statusText,\n headers: response.headers,\n })\n\n await executeHook({ response: normalizedResponse, request: modifiedRequest, operation }, 'responseReceived', plugins)\n const cookieHeaderKeys = getCookieHeaderKeys(normalizedResponse.headers)\n\n return [\n null,\n {\n timestamp: endTime,\n request: modifiedRequest,\n response: {\n ...normalizedResponse,\n headers: responseHeaders,\n cookieHeaderKeys,\n data: responseData,\n size: arrayBuffer.byteLength,\n duration,\n method,\n status: response.status,\n path: fullPath,\n },\n originalResponse: response.clone(),\n },\n ]\n}\n","import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { ParameterObject, ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { isParamDisabled } from '@/v2/blocks/request-block/helpers/is-param-disabled'\n\nimport { getExample } from './get-example'\n\ntype ValidatePathParametersResult = { ok: true } | { ok: false; invalidParams: string[] }\n\n/** Treats undefined, null, and blank/whitespace strings as empty. */\nconst isEmptyParamValue = (value: unknown): boolean => {\n if (value === undefined || value === null) {\n return true\n }\n if (typeof value === 'string') {\n return value.trim() === ''\n }\n return false\n}\n\n/**\n * Validates that all required path parameters have non-empty values.\n *\n * Path parameters are always required per the OpenAPI specification.\n * Returns the names of any path parameters that are missing values.\n */\nexport const validatePathParameters = (\n parameters: ReferenceType<ParameterObject>[] = [],\n exampleKey: string = 'default',\n): ValidatePathParametersResult => {\n const invalidParams: string[] = []\n\n for (const referencedParam of parameters) {\n const param = getResolvedRef(referencedParam)\n if (param.in !== 'path') {\n continue\n }\n\n const example = getExample(param, exampleKey, undefined)\n if (isParamDisabled(param, example)) {\n continue\n }\n\n if (isEmptyParamValue(example?.value)) {\n invalidParams.push(param.name)\n }\n }\n\n return invalidParams.length > 0 ? { ok: false, invalidParams } : { ok: true }\n}\n","import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { OperationObject, PathItemObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/** Combine pathItem and operation parameters into a single, dereferenced parameter array */\nexport const combineParams = (\n pathParams: PathItemObject['parameters'] = [],\n operationParams: OperationObject['parameters'] = [],\n): OperationObject['parameters'] => {\n const operationKeys = operationParams.flatMap((unresolvedParam) => {\n const param = getResolvedRef(unresolvedParam)\n if (!param) {\n return []\n }\n\n return `${param.in}:${param.name}`\n })\n const operationSet = new Set<string>(operationKeys)\n\n /** We must ensure we do not include any path params which exist in the operation */\n const filteredPathParams = pathParams.filter((unresolvedParam) => {\n const param = getResolvedRef(unresolvedParam)\n if (!param) {\n return false\n }\n return !operationSet.has(`${param.in}:${param.name}`)\n })\n\n return [...filteredPathParams, ...operationParams]\n}\n","import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\n\n/**\n * Compute what the security requirements should be for a request\n *\n * If an operation has only one optional security requirement,\n * use the document security and ensure it includes an optional object.\n *\n * Otherwise we generally go operation -> document security.\n */\nexport const getSecurityRequirements = (\n documentSecurity: OpenApiDocument['security'],\n operationSecurity?: OperationObject['security'],\n) => {\n // If the operation security is optional, use the document security and ensure it includes an optional object\n if (JSON.stringify(operationSecurity) === '[{}]' && documentSecurity?.length) {\n const documentHasOptional = Boolean(documentSecurity.find((s) => JSON.stringify(s) === '{}'))\n return documentHasOptional ? documentSecurity : [...documentSecurity, {}]\n }\n\n return operationSecurity ?? documentSecurity ?? []\n}\n","import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { isAuthOptional } from '@/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional'\n\n/**\n * Resolves which security selection to use for an operation.\n * Priority: operation-level selection, then document-level selection, then a default.\n * When neither level has a selection, returns the first security requirement unless\n * authentication is optional or there are no requirements, in which case returns no selection.\n */\nexport const getSelectedSecurity = (\n documentSelectedSecurity: SelectedSecurity | undefined,\n operationSelectedSecurity: SelectedSecurity | undefined,\n securityRequirements: NonNullable<OpenApiDocument['security']> = [],\n): SelectedSecurity => {\n // Operation level security\n if (operationSelectedSecurity) {\n return operationSelectedSecurity\n }\n // Document level security\n if (documentSelectedSecurity) {\n return documentSelectedSecurity\n }\n\n const isOptional = isAuthOptional(securityRequirements)\n const firstRequirement = securityRequirements[0]\n\n // No need to default if auth is optional\n if (isOptional || !firstRequirement) {\n return {\n selectedIndex: -1,\n selectedSchemes: [],\n }\n }\n\n // Default to the first requirement\n return {\n selectedIndex: 0,\n selectedSchemes: [firstRequirement],\n }\n}\n","import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/**\n * Get the selected server from a list of servers and an optional selected-server URL.\n * Works for both document-level and operation-level servers: the caller passes the\n * appropriate selected URL (from document or operation).\n *\n * - If selectedServerUrl is undefined and servers has items, returns the first server\n * (user has not selected yet).\n * - If selectedServerUrl is '' (user un-selected), returns null.\n * - Otherwise returns the server whose url matches selectedServerUrl, or null.\n */\nexport const getSelectedServer = (\n servers: ServerObject[] | null,\n selectedServerUrl: string | undefined,\n): ServerObject | null => {\n if (!servers?.length) {\n return null\n }\n\n if (selectedServerUrl === undefined) {\n return servers[0]!\n }\n\n if (selectedServerUrl === '') {\n return null\n }\n\n return servers.find(({ url }) => url === selectedServerUrl) ?? null\n}\n","import { objectKeys } from '@scalar/helpers/object/object-keys'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { AvailableClient, TargetId } from '@scalar/types/snippetz'\nimport { AVAILABLE_CLIENTS, type AvailableClients, GROUPED_CLIENTS } from '@scalar/types/snippetz'\n\n/**\n * Map the old hiddenClients config to the new httpClients config.\n * Filters out clients based on the configuration and returns the remaining clients.\n */\nexport const mapHiddenClientsConfig = (hiddenClients: ApiReferenceConfiguration['hiddenClients']): AvailableClients => {\n // Early return for boolean true - hide all clients\n if (hiddenClients === true) {\n return []\n }\n\n // Early return for falsy values or empty arrays - show all clients\n if (!hiddenClients || (Array.isArray(hiddenClients) && hiddenClients.length === 0)) {\n return AVAILABLE_CLIENTS\n }\n\n // Start with all clients visible and remove hidden ones\n const visibleClientsSet = new Set<AvailableClient>(AVAILABLE_CLIENTS)\n\n // Handle array config: ['js/fetch', 'js/axios', 'java', 'fetch', 'axios']\n if (Array.isArray(hiddenClients)) {\n for (const item of hiddenClients) {\n // Check if item is a target group first\n const group = GROUPED_CLIENTS[item as TargetId]\n\n // Item is a target group (e.g., 'java', 'ruby') - hide all clients in the group\n if (group) {\n for (const client of group) {\n visibleClientsSet.delete(`${item}/${client}` as AvailableClient)\n }\n }\n\n // Item is a full client ID (e.g., 'js/fetch') - hide this specific client\n else if (item.includes('/')) {\n visibleClientsSet.delete(item as AvailableClient)\n }\n\n // Item is a client name suffix (e.g., 'fetch', 'axios') - hide all matching clients\n else {\n for (const language of objectKeys(GROUPED_CLIENTS)) {\n visibleClientsSet.delete(`${language}/${item}` as AvailableClient)\n }\n }\n }\n }\n\n // Handle object config: { node: true, python: ['requests'] }\n else if (typeof hiddenClients === 'object') {\n for (const [targetId, clients] of Object.entries(hiddenClients)) {\n if (clients === true) {\n // Hide all clients for this target\n const group = GROUPED_CLIENTS[targetId as TargetId]\n if (group) {\n for (const client of group) {\n visibleClientsSet.delete(`${targetId}/${client}` as AvailableClient)\n }\n }\n } else if (Array.isArray(clients)) {\n // Hide specific clients for this target\n for (const client of clients) {\n // Try both formats: 'fetch' and 'js/fetch'\n visibleClientsSet.delete(client as AvailableClient)\n visibleClientsSet.delete(`${targetId}/${client}` as AvailableClient)\n }\n }\n }\n }\n\n return Array.from(visibleClientsSet)\n}\n","import type { Workspace } from '@scalar/workspace-store/schemas'\n\nimport type { ClientLayout } from '@/v2/types/layout'\n\n/**\n * Returns the default proxy URL for web layout.\n * For the 'web' layout, this ensures requests use Scalar's hosted proxy unless overridden,\n * which is important for browser environments with CORS or network restrictions.\n * For 'desktop' or 'modal' layouts, returns null to indicate no proxy by default.\n */\nexport const getDefaultProxyUrl = (layout: ClientLayout) => {\n if (layout === 'web') {\n return 'https://proxy.scalar.com'\n }\n return null\n}\n\n/**\n * Returns the active proxy URL for the workspace.\n *\n * Logic:\n * - If the active proxy url is not set, use the default proxy url.\n * - Otherwise, use the active proxy url.\n */\nexport const getActiveProxyUrl = (activeProxyUrl: Workspace['x-scalar-active-proxy'], layout: ClientLayout) => {\n // If the active proxy url is not set, use the default proxy url\n if (activeProxyUrl === undefined) {\n return getDefaultProxyUrl(layout)\n }\n return activeProxyUrl\n}\n","<script lang=\"ts\">\n/**\n * Operation example page\n *\n * Displays an operation with a specific example selected\n * - View example request data\n * - Modify example request data\n * - Send example request\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { AuthMeta, ServerMeta } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { computed, toValue } from 'vue'\n\nimport { OperationBlock } from '@/v2/blocks/operation-block'\nimport type { ExtendedScalarCookie } from '@/v2/blocks/request-block/RequestBlock.vue'\nimport type { RouteProps } from '@/v2/features/app/helpers/routes'\nimport { mapHiddenClientsConfig } from '@/v2/features/modal/helpers/map-hidden-clients-config'\nimport type { ModalProps } from '@/v2/features/modal/Modal.vue'\nimport { combineParams } from '@/v2/features/operation/helpers/combine-params'\nimport { getSelectedServer } from '@/v2/features/operation/helpers/get-selected-server'\nimport { getActiveProxyUrl } from '@/v2/helpers/get-active-proxy-url'\nimport { getServers } from '@/v2/helpers/get-servers'\n\nconst {\n document,\n layout,\n eventBus,\n path,\n method,\n environment,\n exampleName,\n options,\n securitySchemes,\n workspaceStore,\n plugins,\n documentSlug,\n} = defineProps<\n RouteProps & {\n /** Subset of config options for the modal */\n options?: ModalProps['options']\n }\n>()\n\n/** Grab the path item object from the document */\nconst pathItem = computed(() => {\n if (!path) {\n return null\n }\n return getResolvedRef(document?.paths?.[path])\n})\n\n/** Find the operation and augment with any path parameters */\nconst operation = computed(() => {\n if (!path || !method) {\n return null\n }\n\n const operation = getResolvedRef(document?.paths?.[path]?.[method])\n if (!operation) {\n return null\n }\n\n if (!pathItem.value) {\n return operation\n }\n\n // We combine any path parameters with the operation parameters\n const parameters = combineParams(\n pathItem.value.parameters,\n operation.parameters,\n )\n return { ...operation, parameters }\n})\n\n/** Combine the workspace and document cookies */\nconst globalCookies = computed(() => [\n ...((workspaceStore.workspace?.['x-scalar-cookies'] ?? []).map((it) => ({\n ...it,\n location: 'workspace',\n })) satisfies ExtendedScalarCookie[]),\n ...((document?.['x-scalar-cookies'] ?? []).map((it) => ({\n ...it,\n location: 'document',\n })) satisfies ExtendedScalarCookie[]),\n])\n\n/** Compute the servers for the operation */\nconst servers = computed(() => {\n /**\n * Gather all the servers from the config, operation, pathItem, and document\n */\n const _servers =\n toValue(options)?.servers ??\n operation.value?.servers ??\n // pathItem.value?.servers ?? TODO: add support for pathItem servers\n document?.servers\n\n return getServers(_servers, {\n baseServerUrl: toValue(options)?.baseServerURL,\n documentUrl: document?.['x-scalar-original-source-url'],\n })\n})\n\n/** Selected server URL from the same source as servers: operation, then document (config has no stored selection so use document selection) */\nconst selectedServerUrl = computed(() => {\n if (toValue(options)?.servers != null) {\n return document?.['x-scalar-selected-server']\n }\n if (operation.value?.servers != null) {\n return operation.value['x-scalar-selected-server']\n }\n return document?.['x-scalar-selected-server']\n})\n\n/** Selected server for the operation (document-level or operation-level servers) */\nconst selectedServer = computed(() =>\n getSelectedServer(servers.value, selectedServerUrl.value),\n)\n\nconst serverMeta = computed<ServerMeta>(() => {\n if (operation.value?.servers != null) {\n return { type: 'operation', path: path ?? '', method: method ?? 'get' }\n }\n return { type: 'document' }\n})\n\nconst documentSelectedSecurity = computed<SelectedSecurity | undefined>(() => {\n return workspaceStore.auth.getAuthSelectedSchemas({\n type: 'document',\n documentName: documentSlug,\n })\n})\n\nconst operationSelectedSecurity = computed<SelectedSecurity | undefined>(() => {\n return workspaceStore.auth.getAuthSelectedSchemas({\n type: 'operation',\n documentName: documentSlug,\n path: path ?? '',\n method: method ?? 'get',\n })\n})\n\n/** Select document vs operation meta based on the extension */\nconst authMeta = computed<AuthMeta>(() => {\n if (operationSelectedSecurity.value !== undefined) {\n return {\n type: 'operation',\n path: path ?? '',\n method: method ?? 'get',\n }\n }\n\n return { type: 'document' }\n})\n\n/** Combine environments from document and workspace into a unique array of environment names */\nconst environments = computed(() => {\n return Array.from(\n new Set(\n Object.keys({\n ...document?.['x-scalar-environments'],\n ...workspaceStore.workspace['x-scalar-environments'],\n }),\n ),\n )\n})\n\n/** Temporarily use the old config.hiddenClients until we migrate to the new httpClients config */\nconst httpClients = computed(() =>\n mapHiddenClientsConfig(toValue(options)?.hiddenClients),\n)\n\n// eslint-disable-next-line no-undef\nconst APP_VERSION = PACKAGE_VERSION\n</script>\n\n<template>\n <!-- Operation exists -->\n <template v-if=\"path && method && exampleName && operation\">\n <OperationBlock\n :activeEnvironment=\"\n workspaceStore.workspace['x-scalar-active-environment']\n \"\n :appVersion=\"APP_VERSION\"\n :authMeta\n :documentSecurity=\"document?.security ?? []\"\n :documentSelectedSecurity=\"documentSelectedSecurity\"\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :environment\n :environments\n :eventBus\n :exampleKey=\"exampleName\"\n :globalCookies\n :hideClientButton=\"toValue(options)?.hideClientButton ?? false\"\n :history=\"workspaceStore.history.getHistory(documentSlug, path, method)\"\n :httpClients\n :layout\n :method\n :operation\n :operationSelectedSecurity=\"operationSelectedSecurity\"\n :path\n :plugins=\"plugins\"\n :proxyUrl=\"\n getActiveProxyUrl(\n workspaceStore.workspace['x-scalar-active-proxy'],\n layout,\n ) ?? ''\n \"\n :securitySchemes\n :selectedClient=\"workspaceStore.workspace['x-scalar-default-client']\"\n :server=\"selectedServer\"\n :serverMeta\n :servers />\n </template>\n\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">Select an operation to view details</span>\n </div>\n</template>\n","<script lang=\"ts\">\n/**\n * Operation example page\n *\n * Displays an operation with a specific example selected\n * - View example request data\n * - Modify example request data\n * - Send example request\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { AuthMeta, ServerMeta } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { computed, toValue } from 'vue'\n\nimport { OperationBlock } from '@/v2/blocks/operation-block'\nimport type { ExtendedScalarCookie } from '@/v2/blocks/request-block/RequestBlock.vue'\nimport type { RouteProps } from '@/v2/features/app/helpers/routes'\nimport { mapHiddenClientsConfig } from '@/v2/features/modal/helpers/map-hidden-clients-config'\nimport type { ModalProps } from '@/v2/features/modal/Modal.vue'\nimport { combineParams } from '@/v2/features/operation/helpers/combine-params'\nimport { getSelectedServer } from '@/v2/features/operation/helpers/get-selected-server'\nimport { getActiveProxyUrl } from '@/v2/helpers/get-active-proxy-url'\nimport { getServers } from '@/v2/helpers/get-servers'\n\nconst {\n document,\n layout,\n eventBus,\n path,\n method,\n environment,\n exampleName,\n options,\n securitySchemes,\n workspaceStore,\n plugins,\n documentSlug,\n} = defineProps<\n RouteProps & {\n /** Subset of config options for the modal */\n options?: ModalProps['options']\n }\n>()\n\n/** Grab the path item object from the document */\nconst pathItem = computed(() => {\n if (!path) {\n return null\n }\n return getResolvedRef(document?.paths?.[path])\n})\n\n/** Find the operation and augment with any path parameters */\nconst operation = computed(() => {\n if (!path || !method) {\n return null\n }\n\n const operation = getResolvedRef(document?.paths?.[path]?.[method])\n if (!operation) {\n return null\n }\n\n if (!pathItem.value) {\n return operation\n }\n\n // We combine any path parameters with the operation parameters\n const parameters = combineParams(\n pathItem.value.parameters,\n operation.parameters,\n )\n return { ...operation, parameters }\n})\n\n/** Combine the workspace and document cookies */\nconst globalCookies = computed(() => [\n ...((workspaceStore.workspace?.['x-scalar-cookies'] ?? []).map((it) => ({\n ...it,\n location: 'workspace',\n })) satisfies ExtendedScalarCookie[]),\n ...((document?.['x-scalar-cookies'] ?? []).map((it) => ({\n ...it,\n location: 'document',\n })) satisfies ExtendedScalarCookie[]),\n])\n\n/** Compute the servers for the operation */\nconst servers = computed(() => {\n /**\n * Gather all the servers from the config, operation, pathItem, and document\n */\n const _servers =\n toValue(options)?.servers ??\n operation.value?.servers ??\n // pathItem.value?.servers ?? TODO: add support for pathItem servers\n document?.servers\n\n return getServers(_servers, {\n baseServerUrl: toValue(options)?.baseServerURL,\n documentUrl: document?.['x-scalar-original-source-url'],\n })\n})\n\n/** Selected server URL from the same source as servers: operation, then document (config has no stored selection so use document selection) */\nconst selectedServerUrl = computed(() => {\n if (toValue(options)?.servers != null) {\n return document?.['x-scalar-selected-server']\n }\n if (operation.value?.servers != null) {\n return operation.value['x-scalar-selected-server']\n }\n return document?.['x-scalar-selected-server']\n})\n\n/** Selected server for the operation (document-level or operation-level servers) */\nconst selectedServer = computed(() =>\n getSelectedServer(servers.value, selectedServerUrl.value),\n)\n\nconst serverMeta = computed<ServerMeta>(() => {\n if (operation.value?.servers != null) {\n return { type: 'operation', path: path ?? '', method: method ?? 'get' }\n }\n return { type: 'document' }\n})\n\nconst documentSelectedSecurity = computed<SelectedSecurity | undefined>(() => {\n return workspaceStore.auth.getAuthSelectedSchemas({\n type: 'document',\n documentName: documentSlug,\n })\n})\n\nconst operationSelectedSecurity = computed<SelectedSecurity | undefined>(() => {\n return workspaceStore.auth.getAuthSelectedSchemas({\n type: 'operation',\n documentName: documentSlug,\n path: path ?? '',\n method: method ?? 'get',\n })\n})\n\n/** Select document vs operation meta based on the extension */\nconst authMeta = computed<AuthMeta>(() => {\n if (operationSelectedSecurity.value !== undefined) {\n return {\n type: 'operation',\n path: path ?? '',\n method: method ?? 'get',\n }\n }\n\n return { type: 'document' }\n})\n\n/** Combine environments from document and workspace into a unique array of environment names */\nconst environments = computed(() => {\n return Array.from(\n new Set(\n Object.keys({\n ...document?.['x-scalar-environments'],\n ...workspaceStore.workspace['x-scalar-environments'],\n }),\n ),\n )\n})\n\n/** Temporarily use the old config.hiddenClients until we migrate to the new httpClients config */\nconst httpClients = computed(() =>\n mapHiddenClientsConfig(toValue(options)?.hiddenClients),\n)\n\n// eslint-disable-next-line no-undef\nconst APP_VERSION = PACKAGE_VERSION\n</script>\n\n<template>\n <!-- Operation exists -->\n <template v-if=\"path && method && exampleName && operation\">\n <OperationBlock\n :activeEnvironment=\"\n workspaceStore.workspace['x-scalar-active-environment']\n \"\n :appVersion=\"APP_VERSION\"\n :authMeta\n :documentSecurity=\"document?.security ?? []\"\n :documentSelectedSecurity=\"documentSelectedSecurity\"\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :environment\n :environments\n :eventBus\n :exampleKey=\"exampleName\"\n :globalCookies\n :hideClientButton=\"toValue(options)?.hideClientButton ?? false\"\n :history=\"workspaceStore.history.getHistory(documentSlug, path, method)\"\n :httpClients\n :layout\n :method\n :operation\n :operationSelectedSecurity=\"operationSelectedSecurity\"\n :path\n :plugins=\"plugins\"\n :proxyUrl=\"\n getActiveProxyUrl(\n workspaceStore.workspace['x-scalar-active-proxy'],\n layout,\n ) ?? ''\n \"\n :securitySchemes\n :selectedClient=\"workspaceStore.workspace['x-scalar-default-client']\"\n :server=\"selectedServer\"\n :serverMeta\n :servers />\n </template>\n\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">Select an operation to view details</span>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n ScalarIcon,\n} from '@scalar/components'\nimport { computed } from 'vue'\n\nconst { environments = [], activeEnvironment } = defineProps<{\n /** List of available environments */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when an environment is selected */\n (e: 'select:environment', environmentName: string): void\n /** Emitted when user wants to add a new environment */\n (e: 'add:environment'): void\n}>()\n\n/** Whether an environment is currently active */\nconst hasActiveEnvironment = computed(() => !!activeEnvironment)\n\n/** Whether environments exist */\nconst hasEnvironments = computed(() => environments.length > 0)\n\n/** Whether the currently selected environment exists in the dropdown options */\nconst hasSelectedEnvironmentInOptions = computed(() => {\n if (!activeEnvironment) {\n return false\n }\n\n return environments.includes(activeEnvironment)\n})\n\n/** True when an environment is selected but unavailable in the current context */\nconst hasMissingActiveEnvironment = computed(\n () => hasActiveEnvironment.value && !hasSelectedEnvironmentInOptions.value,\n)\n\n/** Display text for the button */\nconst displayText = computed(() => {\n if (hasMissingActiveEnvironment.value) {\n return `${activeEnvironment} (Unavailable)`\n }\n\n if (hasActiveEnvironment.value) {\n return activeEnvironment\n }\n if (!hasEnvironments.value) {\n return 'Add Environment'\n }\n return 'Select Environment'\n})\n\n/** Button styling based on state */\nconst buttonClass = computed(() => {\n if (hasMissingActiveEnvironment.value) {\n return 'hover:bg-b-2 text-c-2 border-transparent'\n }\n\n if (hasActiveEnvironment.value) {\n return 'bg-c-accent/10 text-c-accent hover:bg-c-accent/20 border-c-accent/30'\n }\n if (!hasEnvironments.value) {\n return 'hover:bg-b-2 text-c-3 border-transparent'\n }\n return 'hover:bg-b-2 text-c-2 border-transparent'\n})\n\nconst handleAddEnvironment = () => {\n emit('add:environment')\n}\n\nconst handleSelectEnvironment = (environmentName: string) => {\n emit('select:environment', environmentName)\n}\n</script>\n\n<template>\n <div class=\"relative flex items-center\">\n <!-- Environment indicator badge (only show when active) -->\n\n <ScalarDropdown>\n <ScalarButton\n :aria-label=\"`Current environment: ${displayText}`\"\n class=\"line-clamp-1 h-full w-fit justify-start border px-2 py-1 font-normal transition-colors\"\n :class=\"buttonClass\"\n size=\"sm\"\n variant=\"ghost\">\n <div class=\"flex max-w-[220px] min-w-0 items-center gap-1.5\">\n <!-- Icon indicator -->\n <ScalarIcon\n class=\"shrink-0\"\n :class=\"\n hasActiveEnvironment && !hasMissingActiveEnvironment\n ? 'text-c-accent'\n : 'text-c-3'\n \"\n icon=\"Globe\"\n size=\"sm\" />\n\n <!-- Environment name -->\n <span\n class=\"text-xxs block max-w-[160px] min-w-0 truncate text-left font-medium\">\n {{ displayText }}\n </span>\n\n <!-- Dropdown arrow -->\n <ScalarIcon\n class=\"shrink-0\"\n icon=\"ChevronDown\"\n size=\"xs\" />\n </div>\n </ScalarButton>\n\n <template #items>\n <!-- No environment option (clear selection) -->\n <ScalarDropdownItem\n v-if=\"hasActiveEnvironment\"\n class=\"group/item flex w-full items-center gap-1.5\"\n @click.stop=\"handleSelectEnvironment('')\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n !activeEnvironment\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"text-c-2\">No Environment</span>\n </ScalarDropdownItem>\n\n <ScalarDropdownDivider v-if=\"hasActiveEnvironment && hasEnvironments\" />\n\n <!-- Environment list -->\n <ScalarDropdownItem\n v-for=\"environmentName in environments\"\n :key=\"environmentName\"\n class=\"group/item flex w-full min-w-0 items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n @click.stop=\"handleSelectEnvironment(environmentName)\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n activeEnvironment === environmentName\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"min-w-0 flex-1 truncate\">{{ environmentName }}</span>\n </ScalarDropdownItem>\n <ScalarDropdownDivider v-if=\"hasMissingActiveEnvironment\" />\n\n <ScalarDropdownItem\n v-if=\"hasMissingActiveEnvironment\"\n class=\"group/item flex h-auto w-full min-w-0 items-start gap-1.5 overflow-hidden\"\n disabled>\n <div\n class=\"bg-c-accent text-b-1 mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full p-[3px]\">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <div class=\"min-w-0 flex-1 text-left\">\n <span class=\"block truncate\">\n {{ activeEnvironment }}\n </span>\n <span class=\"text-c-3 block truncate text-xs\">\n Not available in this context\n </span>\n </div>\n </ScalarDropdownItem>\n\n <ScalarDropdownDivider v-if=\"hasEnvironments\" />\n\n <!-- Add new environment button -->\n <ScalarDropdownItem\n class=\"text-c-accent flex items-center gap-1.5\"\n @click=\"handleAddEnvironment\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>{{\n hasEnvironments ? 'New Environment' : 'Create Environment'\n }}</span>\n </ScalarDropdownItem>\n\n <!-- Helper text for empty state -->\n <div\n v-if=\"!hasEnvironments && !hasActiveEnvironment\"\n class=\"text-c-3 px-2 py-1.5 text-xs\">\n <p class=\"mb-1\">\n Environments let you manage variables like API keys and base URLs\n across different contexts.\n </p>\n </div>\n </template>\n </ScalarDropdown>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n ScalarButton,\n ScalarDropdown,\n ScalarDropdownDivider,\n ScalarDropdownItem,\n ScalarIcon,\n} from '@scalar/components'\nimport { computed } from 'vue'\n\nconst { environments = [], activeEnvironment } = defineProps<{\n /** List of available environments */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when an environment is selected */\n (e: 'select:environment', environmentName: string): void\n /** Emitted when user wants to add a new environment */\n (e: 'add:environment'): void\n}>()\n\n/** Whether an environment is currently active */\nconst hasActiveEnvironment = computed(() => !!activeEnvironment)\n\n/** Whether environments exist */\nconst hasEnvironments = computed(() => environments.length > 0)\n\n/** Whether the currently selected environment exists in the dropdown options */\nconst hasSelectedEnvironmentInOptions = computed(() => {\n if (!activeEnvironment) {\n return false\n }\n\n return environments.includes(activeEnvironment)\n})\n\n/** True when an environment is selected but unavailable in the current context */\nconst hasMissingActiveEnvironment = computed(\n () => hasActiveEnvironment.value && !hasSelectedEnvironmentInOptions.value,\n)\n\n/** Display text for the button */\nconst displayText = computed(() => {\n if (hasMissingActiveEnvironment.value) {\n return `${activeEnvironment} (Unavailable)`\n }\n\n if (hasActiveEnvironment.value) {\n return activeEnvironment\n }\n if (!hasEnvironments.value) {\n return 'Add Environment'\n }\n return 'Select Environment'\n})\n\n/** Button styling based on state */\nconst buttonClass = computed(() => {\n if (hasMissingActiveEnvironment.value) {\n return 'hover:bg-b-2 text-c-2 border-transparent'\n }\n\n if (hasActiveEnvironment.value) {\n return 'bg-c-accent/10 text-c-accent hover:bg-c-accent/20 border-c-accent/30'\n }\n if (!hasEnvironments.value) {\n return 'hover:bg-b-2 text-c-3 border-transparent'\n }\n return 'hover:bg-b-2 text-c-2 border-transparent'\n})\n\nconst handleAddEnvironment = () => {\n emit('add:environment')\n}\n\nconst handleSelectEnvironment = (environmentName: string) => {\n emit('select:environment', environmentName)\n}\n</script>\n\n<template>\n <div class=\"relative flex items-center\">\n <!-- Environment indicator badge (only show when active) -->\n\n <ScalarDropdown>\n <ScalarButton\n :aria-label=\"`Current environment: ${displayText}`\"\n class=\"line-clamp-1 h-full w-fit justify-start border px-2 py-1 font-normal transition-colors\"\n :class=\"buttonClass\"\n size=\"sm\"\n variant=\"ghost\">\n <div class=\"flex max-w-[220px] min-w-0 items-center gap-1.5\">\n <!-- Icon indicator -->\n <ScalarIcon\n class=\"shrink-0\"\n :class=\"\n hasActiveEnvironment && !hasMissingActiveEnvironment\n ? 'text-c-accent'\n : 'text-c-3'\n \"\n icon=\"Globe\"\n size=\"sm\" />\n\n <!-- Environment name -->\n <span\n class=\"text-xxs block max-w-[160px] min-w-0 truncate text-left font-medium\">\n {{ displayText }}\n </span>\n\n <!-- Dropdown arrow -->\n <ScalarIcon\n class=\"shrink-0\"\n icon=\"ChevronDown\"\n size=\"xs\" />\n </div>\n </ScalarButton>\n\n <template #items>\n <!-- No environment option (clear selection) -->\n <ScalarDropdownItem\n v-if=\"hasActiveEnvironment\"\n class=\"group/item flex w-full items-center gap-1.5\"\n @click.stop=\"handleSelectEnvironment('')\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n !activeEnvironment\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"text-c-2\">No Environment</span>\n </ScalarDropdownItem>\n\n <ScalarDropdownDivider v-if=\"hasActiveEnvironment && hasEnvironments\" />\n\n <!-- Environment list -->\n <ScalarDropdownItem\n v-for=\"environmentName in environments\"\n :key=\"environmentName\"\n class=\"group/item flex w-full min-w-0 items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap\"\n @click.stop=\"handleSelectEnvironment(environmentName)\">\n <div\n class=\"flex h-4 w-4 items-center justify-center rounded-full p-[3px]\"\n :class=\"\n activeEnvironment === environmentName\n ? 'bg-c-accent text-b-1'\n : 'shadow-border text-transparent'\n \">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <span class=\"min-w-0 flex-1 truncate\">{{ environmentName }}</span>\n </ScalarDropdownItem>\n <ScalarDropdownDivider v-if=\"hasMissingActiveEnvironment\" />\n\n <ScalarDropdownItem\n v-if=\"hasMissingActiveEnvironment\"\n class=\"group/item flex h-auto w-full min-w-0 items-start gap-1.5 overflow-hidden\"\n disabled>\n <div\n class=\"bg-c-accent text-b-1 mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full p-[3px]\">\n <ScalarIcon\n class=\"size-2.5\"\n icon=\"Checkmark\"\n thickness=\"3\" />\n </div>\n <div class=\"min-w-0 flex-1 text-left\">\n <span class=\"block truncate\">\n {{ activeEnvironment }}\n </span>\n <span class=\"text-c-3 block truncate text-xs\">\n Not available in this context\n </span>\n </div>\n </ScalarDropdownItem>\n\n <ScalarDropdownDivider v-if=\"hasEnvironments\" />\n\n <!-- Add new environment button -->\n <ScalarDropdownItem\n class=\"text-c-accent flex items-center gap-1.5\"\n @click=\"handleAddEnvironment\">\n <div class=\"flex h-4 w-4 items-center justify-center\">\n <ScalarIcon\n icon=\"Add\"\n size=\"sm\" />\n </div>\n <span>{{\n hasEnvironments ? 'New Environment' : 'Create Environment'\n }}</span>\n </ScalarDropdownItem>\n\n <!-- Helper text for empty state -->\n <div\n v-if=\"!hasEnvironments && !hasActiveEnvironment\"\n class=\"text-c-3 px-2 py-1.5 text-xs\">\n <p class=\"mb-1\">\n Environments let you manage variables like API keys and base URLs\n across different contexts.\n </p>\n </div>\n </template>\n </ScalarDropdown>\n </div>\n</template>\n","<script lang=\"ts\">\n/**\n Operation block header: address bar, environment selector, and modal controls.\n\n Renders the top bar for the API client operation view: URL/method (AddressBar),\n optional environment selector, optional \"Open API Client\" button in modal layout,\n and close button for modal. Layout and visibility depend on `layout` and `source` props.\n */\nexport type HeaderProps = {\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethod\n /** Client layout */\n layout: ClientLayout\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Currently selected server */\n server: ServerObject | null\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** List of request history */\n history: History[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** Environment variables */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type {\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { OpenApiClientButton } from '@/components'\nimport type { ClientLayout } from '@/hooks'\nimport { AddressBar, type History } from '@/v2/blocks/scalar-address-bar-block'\nimport EnvironmentSelector from '@/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue'\n\nconst { hideClientButton = false, eventBus } = defineProps<HeaderProps>()\n\nconst emit = defineEmits<{\n /** Execute the current operation example */\n (e: 'execute'): void\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n /** Add a new environment */\n (e: 'add:environment'): void\n}>()\n\nconst handleSelectEnvironment = (environmentName: string) => {\n eventBus.emit('workspace:update:active-environment', environmentName)\n}\n\nconst handleAddEnvironment = () => {\n eventBus.emit('ui:navigate', { page: 'document', path: 'environment' })\n}\n</script>\n\n<template>\n <div\n class=\"lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1\">\n <div\n class=\"mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1\">\n <!--\n Holds space for the sidebar toggle\n\n Hidden for `modal` layout\n -->\n <div class=\"size-8\"></div>\n </div>\n <AddressBar\n :activeEnvironment\n :environment\n :environments\n :eventBus\n :history\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n @add:environment=\"emit('add:environment')\"\n @execute=\"emit('execute')\"\n @select:history:item=\"\n (payload) => emit('select:history:item', payload)\n \" />\n\n <div\n class=\"mb-2 flex w-1/2 flex-row items-center justify-end gap-2 lg:mb-0 lg:flex-1 lg:px-2.5\">\n <!--\n Environment Selector\n Hidden for `modal` layout\n -->\n <EnvironmentSelector\n v-if=\"layout !== 'modal'\"\n :activeEnvironment=\"activeEnvironment\"\n :environments=\"environments\"\n @add:environment=\"handleAddEnvironment\"\n @select:environment=\"handleSelectEnvironment\" />\n <!--\n Open API Client Button\n\n Only shown in `modal` layout\n -->\n <OpenApiClientButton\n v-if=\"layout === 'modal' && documentUrl && !hideClientButton\"\n buttonSource=\"modal\"\n class=\"!w-fit lg:-mr-1\"\n :integration=\"integration ?? null\"\n :source=\"source ?? 'api-reference'\"\n :url=\"documentUrl\" />\n\n <!--\n Close Button\n\n Only shown in `modal` layout and hidden for GitBook Integration\n -->\n <button\n v-if=\"layout === 'modal' && source !== 'gitbook'\"\n class=\"app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2\"\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"lg\"\n thickness=\"2\" />\n <span class=\"sr-only\">Close Client</span>\n </button>\n\n <!--\n Close Button for GitBook Integration\n\n Hidden by default and visible for GitBook Integration in `modal` layout\n -->\n <button\n v-if=\"layout === 'modal' && source === 'gitbook'\"\n class=\"text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2\"\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"md\"\n thickness=\"1.75\" />\n <span class=\"sr-only\">Close Client</span>\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n.app-exit-button {\n color: white;\n background: rgba(0, 0, 0, 0.1);\n}\n.app-exit-button:hover {\n background: rgba(255, 255, 255, 0.1);\n}\n</style>\n","<script lang=\"ts\">\n/**\n Operation block header: address bar, environment selector, and modal controls.\n\n Renders the top bar for the API client operation view: URL/method (AddressBar),\n optional environment selector, optional \"Open API Client\" button in modal layout,\n and close button for modal. Layout and visibility depend on `layout` and `source` props.\n */\nexport type HeaderProps = {\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethod\n /** Client layout */\n layout: ClientLayout\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Currently selected server */\n server: ServerObject | null\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** List of request history */\n history: History[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** Environment variables */\n environment: XScalarEnvironment\n /** Meta information for the server */\n serverMeta: ServerMeta\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type {\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { OpenApiClientButton } from '@/components'\nimport type { ClientLayout } from '@/hooks'\nimport { AddressBar, type History } from '@/v2/blocks/scalar-address-bar-block'\nimport EnvironmentSelector from '@/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue'\n\nconst { hideClientButton = false, eventBus } = defineProps<HeaderProps>()\n\nconst emit = defineEmits<{\n /** Execute the current operation example */\n (e: 'execute'): void\n /** Select a request history item by index */\n (e: 'select:history:item', payload: { index: number }): void\n /** Add a new environment */\n (e: 'add:environment'): void\n}>()\n\nconst handleSelectEnvironment = (environmentName: string) => {\n eventBus.emit('workspace:update:active-environment', environmentName)\n}\n\nconst handleAddEnvironment = () => {\n eventBus.emit('ui:navigate', { page: 'document', path: 'environment' })\n}\n</script>\n\n<template>\n <div\n class=\"lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1\">\n <div\n class=\"mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1\">\n <!--\n Holds space for the sidebar toggle\n\n Hidden for `modal` layout\n -->\n <div class=\"size-8\"></div>\n </div>\n <AddressBar\n :activeEnvironment\n :environment\n :environments\n :eventBus\n :history\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n @add:environment=\"emit('add:environment')\"\n @execute=\"emit('execute')\"\n @select:history:item=\"\n (payload) => emit('select:history:item', payload)\n \" />\n\n <div\n class=\"mb-2 flex w-1/2 flex-row items-center justify-end gap-2 lg:mb-0 lg:flex-1 lg:px-2.5\">\n <!--\n Environment Selector\n Hidden for `modal` layout\n -->\n <EnvironmentSelector\n v-if=\"layout !== 'modal'\"\n :activeEnvironment=\"activeEnvironment\"\n :environments=\"environments\"\n @add:environment=\"handleAddEnvironment\"\n @select:environment=\"handleSelectEnvironment\" />\n <!--\n Open API Client Button\n\n Only shown in `modal` layout\n -->\n <OpenApiClientButton\n v-if=\"layout === 'modal' && documentUrl && !hideClientButton\"\n buttonSource=\"modal\"\n class=\"!w-fit lg:-mr-1\"\n :integration=\"integration ?? null\"\n :source=\"source ?? 'api-reference'\"\n :url=\"documentUrl\" />\n\n <!--\n Close Button\n\n Only shown in `modal` layout and hidden for GitBook Integration\n -->\n <button\n v-if=\"layout === 'modal' && source !== 'gitbook'\"\n class=\"app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2\"\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"lg\"\n thickness=\"2\" />\n <span class=\"sr-only\">Close Client</span>\n </button>\n\n <!--\n Close Button for GitBook Integration\n\n Hidden by default and visible for GitBook Integration in `modal` layout\n -->\n <button\n v-if=\"layout === 'modal' && source === 'gitbook'\"\n class=\"text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2\"\n type=\"button\"\n @click=\"eventBus.emit('ui:close:client-modal')\">\n <ScalarIcon\n icon=\"Close\"\n size=\"md\"\n thickness=\"1.75\" />\n <span class=\"sr-only\">Close Client</span>\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n.app-exit-button {\n color: white;\n background: rgba(0, 0, 0, 0.1);\n}\n.app-exit-button:hover {\n background: rgba(255, 255, 255, 0.1);\n}\n</style>\n","<script lang=\"ts\">\n/**\n * OperationBlock\n *\n * Orchestrates the operation view by wiring together the Header, OperationBlock,\n * and ResponseBlock. Forwards user interactions to the workspace event bus and\n * passes through configuration such as auth, servers, plugins, and environment.\n * This component keeps the Operation page lean by centralizing event emission\n * and prop wiring between the blocks.\n *\n * Notable behavior:\n * - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide\n * draft overrides for the UI when present.\n */\nexport default {\n name: 'OperationBlock',\n}\n\nexport type OperationBlockProps = {\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Document defined security */\n documentSecurity: OpenApiDocument['security']\n /** Document selected security */\n documentSelectedSecurity: SelectedSecurity | undefined\n /** Application version */\n appVersion: string\n /** Workspace/document cookies */\n globalCookies: ExtendedScalarCookie[]\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethodType\n /** HTTP clients */\n httpClients: AvailableClients\n /** The history for the operation */\n history?: HistoryEntry[]\n /** Client layout */\n layout: ClientLayout\n /** Currently selected server */\n server: ServerObject | null\n /** Currently selected client */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** Meta information for the server */\n serverMeta: ServerMeta\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Operation object */\n operation: OperationObject\n /** Operation selected security */\n operationSelectedSecurity: SelectedSecurity | undefined\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Meta information for the auth update */\n authMeta: AuthMeta\n /** Document defined security schemes */\n securitySchemes: MergedSecuritySchemes\n /** Client plugins */\n plugins: ClientPlugin[]\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The proxy URL for sending requests */\n proxyUrl: string\n}\n</script>\n<script setup lang=\"ts\">\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport type { ResponseInstance } from '@scalar/oas-utils/entities/spec'\nimport { type ClientPlugin } from '@scalar/oas-utils/helpers'\nimport {\n AVAILABLE_CLIENTS,\n type AvailableClients,\n} from '@scalar/types/snippetz'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema'\nimport type {\n AuthMeta,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\nimport type { ClientLayout } from '@/hooks'\nimport { ERRORS } from '@/libs/errors'\nimport { buildRequest } from '@/v2/blocks/operation-block/helpers/build-request'\nimport { getSecuritySchemes } from '@/v2/blocks/operation-block/helpers/build-request-security'\nimport { harToFetchRequest } from '@/v2/blocks/operation-block/helpers/har-to-fetch-request'\nimport { harToFetchResponse } from '@/v2/blocks/operation-block/helpers/har-to-fetch-response'\nimport {\n getOperationExampleKey,\n isStreamingResponse,\n responseCache,\n} from '@/v2/blocks/operation-block/helpers/response-cache'\nimport { sendRequest } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { validatePathParameters } from '@/v2/blocks/operation-block/helpers/validate-path-parameters'\nimport { generateClientOptions } from '@/v2/blocks/operation-code-sample'\nimport { RequestBlock } from '@/v2/blocks/request-block'\nimport type { ExtendedScalarCookie } from '@/v2/blocks/request-block/RequestBlock.vue'\nimport { ResponseBlock } from '@/v2/blocks/response-block'\nimport { type History } from '@/v2/blocks/scalar-address-bar-block'\nimport type { MergedSecuritySchemes } from '@/v2/blocks/scalar-auth-selector-block/helpers/merge-security'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n} from '@/v2/features/operation'\n\nimport Header from './components/Header.vue'\n\nconst {\n authMeta,\n environment,\n documentSecurity,\n documentSelectedSecurity,\n eventBus,\n exampleKey,\n globalCookies = [],\n hideClientButton,\n httpClients = AVAILABLE_CLIENTS,\n history = [],\n method,\n operation,\n operationSelectedSecurity,\n path,\n plugins = [],\n proxyUrl,\n securitySchemes,\n selectedClient,\n server,\n environments,\n activeEnvironment,\n serverMeta,\n} = defineProps<OperationBlockProps>()\n\n/** Hoist up client generation so it doesn't get re-generated on every operation */\nconst clientOptions = computed(() => generateClientOptions(httpClients))\n\n/** Compute what the security requirements should be for an operation */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(documentSecurity, operation.security),\n)\n\n/** The selected security for the operation or document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity,\n operationSelectedSecurity,\n securityRequirements.value,\n ),\n)\n\n/** The above selected requirements in scheme form */\nconst selectedSecuritySchemes = computed(() =>\n getSecuritySchemes(securitySchemes, selectedSecurity.value.selectedSchemes),\n)\n\nconst { toast } = useToasts()\n\n// Refs\nconst abortController = ref<AbortController | null>(null)\nconst response = ref<ResponseInstance | null>(null)\nconst request = ref<Request | null>(null)\n\n/** Cancel the request */\nconst cancelRequest = () => abortController.value?.abort(ERRORS.REQUEST_ABORTED)\n\n/** Execute the current operation example */\nconst handleExecute = async () => {\n const pathValidation = validatePathParameters(\n operation.parameters ?? [],\n exampleKey,\n )\n if (pathValidation.ok === false) {\n toast('Path parameters must have values.', 'error')\n return\n }\n\n const [error, result] = buildRequest({\n environment,\n exampleKey,\n globalCookies,\n method,\n operation,\n path,\n selectedSecuritySchemes: selectedSecuritySchemes.value,\n server,\n proxyUrl,\n })\n\n // Toast the error\n if (error) {\n toast(error.message, 'error')\n return\n }\n\n // Store the abort controller for cancellation\n abortController.value = result.controller\n\n // Stop any previous streaming response\n if (response.value && 'reader' in response.value) {\n response.value.reader.cancel()\n }\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:sent', {\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n /** Execute the request */\n const [sendError, sendResult] = await sendRequest({\n isUsingProxy: result.isUsingProxy,\n operation,\n plugins,\n request: result.request,\n })\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:complete', {\n payload: sendResult\n ? {\n response: sendResult.originalResponse,\n request: sendResult.request.clone(),\n duration: sendResult.response.duration,\n timestamp: sendResult.timestamp,\n }\n : undefined,\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n // Toast the execute error\n if (sendError) {\n toast(sendError.message, 'error')\n return\n }\n\n // Store the response\n response.value = sendResult.response\n request.value = sendResult.request\n\n // Cache non-streaming responses so they can be restored when navigating back\n if (!isStreamingResponse(sendResult.response)) {\n responseCache.set(getOperationExampleKey(method, path, exampleKey), {\n response: sendResult.response,\n request: sendResult.request,\n })\n }\n}\n\nonMounted(() => {\n eventBus.on('operation:send:request:hotkey', handleExecute)\n eventBus.on('operation:cancel:request', cancelRequest)\n})\nonBeforeUnmount(() => {\n eventBus.off('operation:send:request:hotkey', handleExecute)\n eventBus.off('operation:cancel:request', cancelRequest)\n})\n\nconst operationHistory = computed<History[]>(() =>\n history\n .map((entry) => ({\n method: entry.request.method as HttpMethodType,\n path: entry.request.url,\n duration: entry.time,\n status: entry.response.status,\n }))\n .reverse(),\n)\n\nconst handleSelectHistoryItem = ({ index }: { index: number }) => {\n const transformedIndex = (history.length ?? 0) - index - 1\n const historyItem = history[transformedIndex]\n if (!historyItem) {\n return\n }\n\n const navigate = () =>\n eventBus.emit('ui:navigate', {\n page: 'example',\n method,\n path,\n exampleName: 'draft',\n callback: (status) => {\n // Do not replace the response if the navigation was not successful\n if (status !== 'success') {\n return\n }\n // Reconstruct the response\n const fetchResponse = harToFetchResponse({\n harResponse: historyItem.response,\n url: historyItem.request.url,\n method,\n path,\n duration: historyItem.time,\n })\n\n // Reconstruct the request\n const fetchRequest = harToFetchRequest({\n harRequest: historyItem.request,\n })\n\n // Update the response and request\n response.value = fetchResponse\n request.value = fetchRequest\n },\n })\n\n eventBus.emit('operation:reload:history', {\n meta: {\n path,\n method,\n },\n index: transformedIndex,\n callback: navigate,\n })\n}\n\n/**\n * When the path, method, or example key changes: save current response to\n * cache (so it can be restored when navigating back), then restore from cache\n * for the new operation or clear if no cached response. Response is only\n * cleared on page refresh or when making a new request for that operation.\n */\nwatch(\n [() => path, () => method, () => exampleKey],\n ([newPath, newMethod, newExampleKey]) => {\n const newKey = getOperationExampleKey(newMethod, newPath, newExampleKey)\n const cached = responseCache.get(newKey)\n if (cached) {\n response.value = cached.response\n request.value = cached.request\n } else {\n response.value = null\n request.value = null\n }\n\n // Cancel any in-flight request\n cancelRequest()\n },\n { immediate: true },\n)\n\nonBeforeUnmount(() => {\n // We cancel the request if the component is unmounted\n cancelRequest()\n})\n</script>\n<template>\n <div class=\"bg-b-1 flex h-full flex-col\">\n <div\n class=\"lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0\">\n <!-- Address Bar -->\n <Header\n :activeEnvironment\n :documentUrl\n :environment\n :environments\n :eventBus\n :hideClientButton\n :history=\"operationHistory\"\n :integration\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n :source\n @execute=\"handleExecute\"\n @select:history:item=\"handleSelectHistoryItem\" />\n </div>\n\n <ViewLayout class=\"border-t\">\n <ViewLayoutContent class=\"flex-1\">\n <!-- Request Section -->\n <RequestBlock\n :authMeta\n :clientOptions\n :environment\n :eventBus\n :exampleKey\n :globalCookies\n :layout\n :method\n :operation\n :path\n :plugins\n :proxyUrl\n :securityRequirements\n :securitySchemes\n :selectedClient\n :selectedSecurity\n :selectedSecuritySchemes\n :server />\n\n <!-- Response Section -->\n <ResponseBlock\n :appVersion\n :eventBus\n :layout\n :plugins\n :request\n :response\n :totalPerformedRequests=\"operationHistory.length\" />\n </ViewLayoutContent>\n </ViewLayout>\n </div>\n</template>\n","<script lang=\"ts\">\n/**\n * OperationBlock\n *\n * Orchestrates the operation view by wiring together the Header, OperationBlock,\n * and ResponseBlock. Forwards user interactions to the workspace event bus and\n * passes through configuration such as auth, servers, plugins, and environment.\n * This component keeps the Operation page lean by centralizing event emission\n * and prop wiring between the blocks.\n *\n * Notable behavior:\n * - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide\n * draft overrides for the UI when present.\n */\nexport default {\n name: 'OperationBlock',\n}\n\nexport type OperationBlockProps = {\n /** Event bus */\n eventBus: WorkspaceEventBus\n /** Document defined security */\n documentSecurity: OpenApiDocument['security']\n /** Document selected security */\n documentSelectedSecurity: SelectedSecurity | undefined\n /** Application version */\n appVersion: string\n /** Workspace/document cookies */\n globalCookies: ExtendedScalarCookie[]\n /** Current request path */\n path: string\n /** Current request method */\n method: HttpMethodType\n /** HTTP clients */\n httpClients: AvailableClients\n /** The history for the operation */\n history?: HistoryEntry[]\n /** Client layout */\n layout: ClientLayout\n /** Currently selected server */\n server: ServerObject | null\n /** Currently selected client */\n selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n /** Server list available for operation/document */\n servers: ServerObject[]\n /** Meta information for the server */\n serverMeta: ServerMeta\n /** Hides the client button on the header */\n hideClientButton?: boolean\n /** Client integration */\n integration?: string | null\n /** Openapi document url for `modal` mode to open the client app */\n documentUrl?: string\n /** Client source */\n source?: 'gitbook' | 'api-reference'\n /** Operation object */\n operation: OperationObject\n /** Operation selected security */\n operationSelectedSecurity: SelectedSecurity | undefined\n /** Currently selected example key for the current operation */\n exampleKey: string\n /** Meta information for the auth update */\n authMeta: AuthMeta\n /** Document defined security schemes */\n securitySchemes: MergedSecuritySchemes\n /** Client plugins */\n plugins: ClientPlugin[]\n /** Environment list */\n environments?: string[]\n /** Currently selected environment */\n activeEnvironment?: string\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The proxy URL for sending requests */\n proxyUrl: string\n}\n</script>\n<script setup lang=\"ts\">\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport type { ResponseInstance } from '@scalar/oas-utils/entities/spec'\nimport { type ClientPlugin } from '@scalar/oas-utils/helpers'\nimport {\n AVAILABLE_CLIENTS,\n type AvailableClients,\n} from '@scalar/types/snippetz'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema'\nimport type {\n AuthMeta,\n ServerMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n OpenApiDocument,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport ViewLayout from '@/components/ViewLayout/ViewLayout.vue'\nimport ViewLayoutContent from '@/components/ViewLayout/ViewLayoutContent.vue'\nimport type { ClientLayout } from '@/hooks'\nimport { ERRORS } from '@/libs/errors'\nimport { buildRequest } from '@/v2/blocks/operation-block/helpers/build-request'\nimport { getSecuritySchemes } from '@/v2/blocks/operation-block/helpers/build-request-security'\nimport { harToFetchRequest } from '@/v2/blocks/operation-block/helpers/har-to-fetch-request'\nimport { harToFetchResponse } from '@/v2/blocks/operation-block/helpers/har-to-fetch-response'\nimport {\n getOperationExampleKey,\n isStreamingResponse,\n responseCache,\n} from '@/v2/blocks/operation-block/helpers/response-cache'\nimport { sendRequest } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { validatePathParameters } from '@/v2/blocks/operation-block/helpers/validate-path-parameters'\nimport { generateClientOptions } from '@/v2/blocks/operation-code-sample'\nimport { RequestBlock } from '@/v2/blocks/request-block'\nimport type { ExtendedScalarCookie } from '@/v2/blocks/request-block/RequestBlock.vue'\nimport { ResponseBlock } from '@/v2/blocks/response-block'\nimport { type History } from '@/v2/blocks/scalar-address-bar-block'\nimport type { MergedSecuritySchemes } from '@/v2/blocks/scalar-auth-selector-block/helpers/merge-security'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n} from '@/v2/features/operation'\n\nimport Header from './components/Header.vue'\n\nconst {\n authMeta,\n environment,\n documentSecurity,\n documentSelectedSecurity,\n eventBus,\n exampleKey,\n globalCookies = [],\n hideClientButton,\n httpClients = AVAILABLE_CLIENTS,\n history = [],\n method,\n operation,\n operationSelectedSecurity,\n path,\n plugins = [],\n proxyUrl,\n securitySchemes,\n selectedClient,\n server,\n environments,\n activeEnvironment,\n serverMeta,\n} = defineProps<OperationBlockProps>()\n\n/** Hoist up client generation so it doesn't get re-generated on every operation */\nconst clientOptions = computed(() => generateClientOptions(httpClients))\n\n/** Compute what the security requirements should be for an operation */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(documentSecurity, operation.security),\n)\n\n/** The selected security for the operation or document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity,\n operationSelectedSecurity,\n securityRequirements.value,\n ),\n)\n\n/** The above selected requirements in scheme form */\nconst selectedSecuritySchemes = computed(() =>\n getSecuritySchemes(securitySchemes, selectedSecurity.value.selectedSchemes),\n)\n\nconst { toast } = useToasts()\n\n// Refs\nconst abortController = ref<AbortController | null>(null)\nconst response = ref<ResponseInstance | null>(null)\nconst request = ref<Request | null>(null)\n\n/** Cancel the request */\nconst cancelRequest = () => abortController.value?.abort(ERRORS.REQUEST_ABORTED)\n\n/** Execute the current operation example */\nconst handleExecute = async () => {\n const pathValidation = validatePathParameters(\n operation.parameters ?? [],\n exampleKey,\n )\n if (pathValidation.ok === false) {\n toast('Path parameters must have values.', 'error')\n return\n }\n\n const [error, result] = buildRequest({\n environment,\n exampleKey,\n globalCookies,\n method,\n operation,\n path,\n selectedSecuritySchemes: selectedSecuritySchemes.value,\n server,\n proxyUrl,\n })\n\n // Toast the error\n if (error) {\n toast(error.message, 'error')\n return\n }\n\n // Store the abort controller for cancellation\n abortController.value = result.controller\n\n // Stop any previous streaming response\n if (response.value && 'reader' in response.value) {\n response.value.reader.cancel()\n }\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:sent', {\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n /** Execute the request */\n const [sendError, sendResult] = await sendRequest({\n isUsingProxy: result.isUsingProxy,\n operation,\n plugins,\n request: result.request,\n })\n\n // Execute the hooks\n eventBus.emit('hooks:on:request:complete', {\n payload: sendResult\n ? {\n response: sendResult.originalResponse,\n request: sendResult.request.clone(),\n duration: sendResult.response.duration,\n timestamp: sendResult.timestamp,\n }\n : undefined,\n meta: {\n method,\n path,\n exampleKey,\n },\n })\n\n // Toast the execute error\n if (sendError) {\n toast(sendError.message, 'error')\n return\n }\n\n // Store the response\n response.value = sendResult.response\n request.value = sendResult.request\n\n // Cache non-streaming responses so they can be restored when navigating back\n if (!isStreamingResponse(sendResult.response)) {\n responseCache.set(getOperationExampleKey(method, path, exampleKey), {\n response: sendResult.response,\n request: sendResult.request,\n })\n }\n}\n\nonMounted(() => {\n eventBus.on('operation:send:request:hotkey', handleExecute)\n eventBus.on('operation:cancel:request', cancelRequest)\n})\nonBeforeUnmount(() => {\n eventBus.off('operation:send:request:hotkey', handleExecute)\n eventBus.off('operation:cancel:request', cancelRequest)\n})\n\nconst operationHistory = computed<History[]>(() =>\n history\n .map((entry) => ({\n method: entry.request.method as HttpMethodType,\n path: entry.request.url,\n duration: entry.time,\n status: entry.response.status,\n }))\n .reverse(),\n)\n\nconst handleSelectHistoryItem = ({ index }: { index: number }) => {\n const transformedIndex = (history.length ?? 0) - index - 1\n const historyItem = history[transformedIndex]\n if (!historyItem) {\n return\n }\n\n const navigate = () =>\n eventBus.emit('ui:navigate', {\n page: 'example',\n method,\n path,\n exampleName: 'draft',\n callback: (status) => {\n // Do not replace the response if the navigation was not successful\n if (status !== 'success') {\n return\n }\n // Reconstruct the response\n const fetchResponse = harToFetchResponse({\n harResponse: historyItem.response,\n url: historyItem.request.url,\n method,\n path,\n duration: historyItem.time,\n })\n\n // Reconstruct the request\n const fetchRequest = harToFetchRequest({\n harRequest: historyItem.request,\n })\n\n // Update the response and request\n response.value = fetchResponse\n request.value = fetchRequest\n },\n })\n\n eventBus.emit('operation:reload:history', {\n meta: {\n path,\n method,\n },\n index: transformedIndex,\n callback: navigate,\n })\n}\n\n/**\n * When the path, method, or example key changes: save current response to\n * cache (so it can be restored when navigating back), then restore from cache\n * for the new operation or clear if no cached response. Response is only\n * cleared on page refresh or when making a new request for that operation.\n */\nwatch(\n [() => path, () => method, () => exampleKey],\n ([newPath, newMethod, newExampleKey]) => {\n const newKey = getOperationExampleKey(newMethod, newPath, newExampleKey)\n const cached = responseCache.get(newKey)\n if (cached) {\n response.value = cached.response\n request.value = cached.request\n } else {\n response.value = null\n request.value = null\n }\n\n // Cancel any in-flight request\n cancelRequest()\n },\n { immediate: true },\n)\n\nonBeforeUnmount(() => {\n // We cancel the request if the component is unmounted\n cancelRequest()\n})\n</script>\n<template>\n <div class=\"bg-b-1 flex h-full flex-col\">\n <div\n class=\"lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0\">\n <!-- Address Bar -->\n <Header\n :activeEnvironment\n :documentUrl\n :environment\n :environments\n :eventBus\n :hideClientButton\n :history=\"operationHistory\"\n :integration\n :layout\n :method\n :path\n :server\n :serverMeta\n :servers\n :source\n @execute=\"handleExecute\"\n @select:history:item=\"handleSelectHistoryItem\" />\n </div>\n\n <ViewLayout class=\"border-t\">\n <ViewLayoutContent class=\"flex-1\">\n <!-- Request Section -->\n <RequestBlock\n :authMeta\n :clientOptions\n :environment\n :eventBus\n :exampleKey\n :globalCookies\n :layout\n :method\n :operation\n :path\n :plugins\n :proxyUrl\n :securityRequirements\n :securitySchemes\n :selectedClient\n :selectedSecurity\n :selectedSecuritySchemes\n :server />\n\n <!-- Response Section -->\n <ResponseBlock\n :appVersion\n :eventBus\n :layout\n :plugins\n :request\n :response\n :totalPerformedRequests=\"operationHistory.length\" />\n </ViewLayoutContent>\n </ViewLayout>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAa,sBACX,iBACA,qBAEA,iBAAiB,SAAS,WACxB,WAAW,OAAO,CAAC,SAAS,QAAQ;CAClC,MAAM,SAAS,eAAe,kBAAkB,KAAK;AACrD,KAAI,OACF,QAAO;AAGT,QAAO,EAAE;EACT,CACH,IAAI,EAAE;;;;;AAMT,IAAa,wBAEX,yBAEA,MAA8B,EAAE,EAEhC,wBAAwB,OACsE;CAC9F,MAAM,UAAkC,EAAE;CAC1C,MAAM,UAA2B,EAAE;CACnC,MAAM,YAAY,IAAI,iBAAiB;AAEvC,yBAAwB,SAAS,WAAW;AAE1C,MAAI,OAAO,SAAS,UAAU;GAC5B,MAAM,OAAO,oBAAoB,OAAO,MAAM,IAAI;GAClD,MAAM,QAAQ,oBAAoB,OAAO,0BAA0B,IAAI,IAAI;AAE3E,OAAI,OAAO,OAAO,SAChB,SAAQ,QAAQ;AAElB,OA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