@scalar/agent-chat 0.10.13 → 0.10.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/dist/App.vue.js +3 -3
  2. package/dist/App.vue.script.js +24 -20
  3. package/dist/App.vue.script.js.map +1 -1
  4. package/dist/Chat.vue.js +3 -3
  5. package/dist/Chat.vue.script.js +50 -39
  6. package/dist/Chat.vue.script.js.map +1 -1
  7. package/dist/_virtual/_plugin-vue_export-helper.js +5 -5
  8. package/dist/api.js +66 -57
  9. package/dist/api.js.map +1 -1
  10. package/dist/client-tools/execute-request.js +84 -60
  11. package/dist/client-tools/execute-request.js.map +1 -1
  12. package/dist/components/ActionsDropdown.vue.js +4 -4
  13. package/dist/components/ActionsDropdown.vue.script.js +29 -25
  14. package/dist/components/ActionsDropdown.vue.script.js.map +1 -1
  15. package/dist/components/ApprovalSection.vue.js +4 -4
  16. package/dist/components/ApprovalSection.vue.script.js +23 -18
  17. package/dist/components/ApprovalSection.vue.script.js.map +1 -1
  18. package/dist/components/AuthenticationProvided.vue.js +8 -7
  19. package/dist/components/AuthenticationProvided.vue.js.map +1 -1
  20. package/dist/components/AuthenticationRequired.vue.js +8 -7
  21. package/dist/components/AuthenticationRequired.vue.js.map +1 -1
  22. package/dist/components/AutosendPaused.vue.js +8 -7
  23. package/dist/components/AutosendPaused.vue.js.map +1 -1
  24. package/dist/components/BuildingRequest.vue.js +9 -8
  25. package/dist/components/BuildingRequest.vue.js.map +1 -1
  26. package/dist/components/ContextItem.vue.js +4 -4
  27. package/dist/components/ContextItem.vue.script.js +8 -5
  28. package/dist/components/ContextItem.vue.script.js.map +1 -1
  29. package/dist/components/ErrorMessage.vue.js +4 -4
  30. package/dist/components/ErrorMessage.vue.script.js +15 -12
  31. package/dist/components/ErrorMessage.vue.script.js.map +1 -1
  32. package/dist/components/FreeMessagesInfoSection.vue.js +4 -4
  33. package/dist/components/FreeMessagesInfoSection.vue.script.js +45 -34
  34. package/dist/components/FreeMessagesInfoSection.vue.script.js.map +1 -1
  35. package/dist/components/LoadingOpenAPISpecsSummary.vue.js +8 -7
  36. package/dist/components/LoadingOpenAPISpecsSummary.vue.js.map +1 -1
  37. package/dist/components/LoadingSearchOpenAPIOperations.vue.js +8 -7
  38. package/dist/components/LoadingSearchOpenAPIOperations.vue.js.map +1 -1
  39. package/dist/components/Logo.vue.js +9 -8
  40. package/dist/components/Logo.vue.js.map +1 -1
  41. package/dist/components/PaymentSection.vue.js +4 -4
  42. package/dist/components/PaymentSection.vue.script.js +20 -15
  43. package/dist/components/PaymentSection.vue.script.js.map +1 -1
  44. package/dist/components/RequestApproved.vue.js +8 -7
  45. package/dist/components/RequestApproved.vue.js.map +1 -1
  46. package/dist/components/RequestFailed.vue.js +9 -8
  47. package/dist/components/RequestFailed.vue.js.map +1 -1
  48. package/dist/components/RequestPreview.vue.js +4 -4
  49. package/dist/components/RequestPreview.vue.script.js +96 -73
  50. package/dist/components/RequestPreview.vue.script.js.map +1 -1
  51. package/dist/components/RequestRejected.vue.js +9 -8
  52. package/dist/components/RequestRejected.vue.js.map +1 -1
  53. package/dist/components/RequestSuccess.vue.js +8 -7
  54. package/dist/components/RequestSuccess.vue.js.map +1 -1
  55. package/dist/components/ResponseBody/ResponseBody.vue.js +3 -3
  56. package/dist/components/ResponseBody/ResponseBody.vue.script.js +33 -30
  57. package/dist/components/ResponseBody/ResponseBody.vue.script.js.map +1 -1
  58. package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +9 -7
  59. package/dist/components/ResponseBody/ResponseBodyInfo.vue.js.map +1 -1
  60. package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +4 -4
  61. package/dist/components/ResponseBody/ResponseBodyPreview.vue.script.js +51 -44
  62. package/dist/components/ResponseBody/ResponseBodyPreview.vue.script.js.map +1 -1
  63. package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +3 -3
  64. package/dist/components/ResponseBody/ResponseBodyRaw.vue.script.js +13 -11
  65. package/dist/components/ResponseBody/ResponseBodyRaw.vue.script.js.map +1 -1
  66. package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +3 -3
  67. package/dist/components/ResponseBody/ResponseBodyToggle.vue.script.js +17 -14
  68. package/dist/components/ResponseBody/ResponseBodyToggle.vue.script.js.map +1 -1
  69. package/dist/components/ResponseBody/helpers/media-types.js +37 -35
  70. package/dist/components/ResponseBody/helpers/media-types.js.map +1 -1
  71. package/dist/components/ResponseBody/helpers/process-response-body.js +30 -20
  72. package/dist/components/ResponseBody/helpers/process-response-body.js.map +1 -1
  73. package/dist/components/SearchPopover.vue.js +4 -4
  74. package/dist/components/SearchPopover.vue.script.js +52 -42
  75. package/dist/components/SearchPopover.vue.script.js.map +1 -1
  76. package/dist/components/Selector.vue.js +3 -3
  77. package/dist/components/Selector.vue.script.js +54 -45
  78. package/dist/components/Selector.vue.script.js.map +1 -1
  79. package/dist/components/SendingRequest.vue.js +9 -8
  80. package/dist/components/SendingRequest.vue.js.map +1 -1
  81. package/dist/components/ServerSelector.vue.js +3 -3
  82. package/dist/components/ServerSelector.vue.script.js +52 -43
  83. package/dist/components/ServerSelector.vue.script.js.map +1 -1
  84. package/dist/components/UploadSection.vue.js +4 -4
  85. package/dist/components/UploadSection.vue.script.js +38 -29
  86. package/dist/components/UploadSection.vue.script.js.map +1 -1
  87. package/dist/consts/urls.js +2 -2
  88. package/dist/consts/urls.js.map +1 -1
  89. package/dist/entities/error/constants.js +2 -2
  90. package/dist/entities/error/constants.js.map +1 -1
  91. package/dist/entities/error/helpers.js +4 -4
  92. package/dist/entities/error/helpers.js.map +1 -1
  93. package/dist/entities/index.js +10 -10
  94. package/dist/entities/prompt/constants.js +2 -2
  95. package/dist/entities/prompt/constants.js.map +1 -1
  96. package/dist/entities/registry/document.js +9 -9
  97. package/dist/entities/registry/document.js.map +1 -1
  98. package/dist/entities/tools/ask-for-authentication.js +6 -5
  99. package/dist/entities/tools/ask-for-authentication.js.map +1 -1
  100. package/dist/entities/tools/execute-request.js +10 -9
  101. package/dist/entities/tools/execute-request.js.map +1 -1
  102. package/dist/entities/tools/get-openapi-specs-summary.js +2 -2
  103. package/dist/entities/tools/get-openapi-specs-summary.js.map +1 -1
  104. package/dist/entities/tools/search-openapi-operations.js +4 -3
  105. package/dist/entities/tools/search-openapi-operations.js.map +1 -1
  106. package/dist/helpers.js +53 -27
  107. package/dist/helpers.js.map +1 -1
  108. package/dist/hooks/use-agent-key-documents.js +16 -15
  109. package/dist/hooks/use-agent-key-documents.js.map +1 -1
  110. package/dist/hooks/use-chat-approvals.js +27 -24
  111. package/dist/hooks/use-chat-approvals.js.map +1 -1
  112. package/dist/hooks/use-chat-error.js +19 -17
  113. package/dist/hooks/use-chat-error.js.map +1 -1
  114. package/dist/hooks/use-chat-pending-client-tool-parts.js +10 -8
  115. package/dist/hooks/use-chat-pending-client-tool-parts.js.map +1 -1
  116. package/dist/hooks/use-chat-scroll.js +13 -10
  117. package/dist/hooks/use-chat-scroll.js.map +1 -1
  118. package/dist/hooks/use-curated-documents.js +9 -8
  119. package/dist/hooks/use-curated-documents.js.map +1 -1
  120. package/dist/hooks/use-search.js +25 -16
  121. package/dist/hooks/use-search.js.map +1 -1
  122. package/dist/hooks/use-signup-link.js +19 -9
  123. package/dist/hooks/use-signup-link.js.map +1 -1
  124. package/dist/hooks/use-term-and-conditions.js +12 -11
  125. package/dist/hooks/use-term-and-conditions.js.map +1 -1
  126. package/dist/hooks/use-upload-tmp-document.js +67 -54
  127. package/dist/hooks/use-upload-tmp-document.js.map +1 -1
  128. package/dist/index.js +2 -2
  129. package/dist/package.json +9 -2
  130. package/dist/plugins/persistance.js +18 -10
  131. package/dist/plugins/persistance.js.map +1 -1
  132. package/dist/registry/add-documents-to-store.js +39 -33
  133. package/dist/registry/add-documents-to-store.js.map +1 -1
  134. package/dist/registry/create-document-name.js +3 -3
  135. package/dist/registry/create-document-name.js.map +1 -1
  136. package/dist/state/state.js +176 -132
  137. package/dist/state/state.js.map +1 -1
  138. package/dist/style.css +6604 -1
  139. package/dist/styles/tailwind.config.css +12 -0
  140. package/dist/views/Catalog/Catalog.vue.js +4 -4
  141. package/dist/views/Catalog/Catalog.vue.script.js +56 -39
  142. package/dist/views/Catalog/Catalog.vue.script.js.map +1 -1
  143. package/dist/views/Chat/Chat.vue.js +4 -4
  144. package/dist/views/Chat/Chat.vue.script.js +55 -43
  145. package/dist/views/Chat/Chat.vue.script.js.map +1 -1
  146. package/dist/views/Chat/Messages/AskForAuthentication.vue.js +4 -4
  147. package/dist/views/Chat/Messages/AskForAuthentication.vue.script.js +67 -55
  148. package/dist/views/Chat/Messages/AskForAuthentication.vue.script.js.map +1 -1
  149. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +4 -4
  150. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.script.js +29 -18
  151. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.script.js.map +1 -1
  152. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +3 -3
  153. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.script.js +15 -10
  154. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.script.js.map +1 -1
  155. package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.js +4 -4
  156. package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.script.js +55 -40
  157. package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.script.js.map +1 -1
  158. package/dist/views/Chat/Messages/Text.vue.js +3 -3
  159. package/dist/views/Chat/Messages/Text.vue.script.js +8 -6
  160. package/dist/views/Chat/Messages/Text.vue.script.js.map +1 -1
  161. package/dist/views/Layout.vue.js +4 -4
  162. package/dist/views/Layout.vue.script.js +21 -17
  163. package/dist/views/Layout.vue.script.js.map +1 -1
  164. package/dist/views/PromptForm.vue.js +4 -4
  165. package/dist/views/PromptForm.vue.script.js +214 -170
  166. package/dist/views/PromptForm.vue.script.js.map +1 -1
  167. package/dist/views/Settings/Auth.vue.js +3 -3
  168. package/dist/views/Settings/Auth.vue.script.js +58 -46
  169. package/dist/views/Settings/Auth.vue.script.js.map +1 -1
  170. package/dist/views/Settings/DocSettings.vue.js +4 -4
  171. package/dist/views/Settings/DocSettings.vue.script.js +45 -39
  172. package/dist/views/Settings/DocSettings.vue.script.js.map +1 -1
  173. package/dist/views/Settings/Settings.vue.js +4 -4
  174. package/dist/views/Settings/Settings.vue.script.js +59 -48
  175. package/dist/views/Settings/Settings.vue.script.js.map +1 -1
  176. package/dist/views/Start.vue.js +4 -4
  177. package/dist/views/Start.vue.script.js +40 -33
  178. package/dist/views/Start.vue.script.js.map +1 -1
  179. package/dist/vue-styles.css +1341 -0
  180. package/package.json +17 -10
@@ -1,10 +1,10 @@
1
- import { useState as e } from "../../state/state.js";
2
- import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, openBlock as o, shallowRef as s, unref as c, watch as l } from "vue";
3
- import { getSecurityRequirements as u, getSelectedSecurity as d, mergeSecurity as f } from "@scalar/workspace-store/request-example";
4
- import { AuthSelector as p } from "@scalar/api-client/blocks/scalar-auth-selector-block";
5
- import { useFocusWithin as m } from "@vueuse/core";
1
+ import { useState } from "../../state/state.js";
2
+ import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, openBlock, shallowRef, unref, watch } from "vue";
3
+ import { getSecurityRequirements, getSelectedSecurity, mergeSecurity } from "@scalar/workspace-store/request-example";
4
+ import { AuthSelector } from "@scalar/api-client/blocks/scalar-auth-selector-block";
5
+ import { useFocusWithin } from "@vueuse/core";
6
6
  //#region src/views/Settings/Auth.vue?vue&type=script&setup=true&lang.ts
7
- var h = /* @__PURE__ */ a({
7
+ var Auth_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
8
8
  __name: "Auth",
9
9
  props: {
10
10
  options: {},
@@ -15,49 +15,61 @@ var h = /* @__PURE__ */ a({
15
15
  selectedServer: {},
16
16
  environment: {}
17
17
  },
18
- setup(a) {
19
- let { workspaceStore: h } = e(), g = t(() => u(a.document?.security)), _ = t(() => f(a.document?.components?.securitySchemes ?? {}, a.options.authentication?.securitySchemes, a.authStore, a.name)), v = t(() => d(a.authStore.getAuthSelectedSchemas({
18
+ setup(__props) {
19
+ const { workspaceStore } = useState();
20
+ /** Compute what the security requirements should be for the document */
21
+ const securityRequirements = computed(() => getSecurityRequirements(__props.document?.security));
22
+ /** Merge the security schemes with the authentication config and the auth store */
23
+ const securitySchemes = computed(() => mergeSecurity(__props.document?.components?.securitySchemes ?? {}, __props.options.authentication?.securitySchemes, __props.authStore, __props.name));
24
+ /** The selected security keys for the document */
25
+ const selectedSecurity = computed(() => getSelectedSecurity(__props.authStore.getAuthSelectedSchemas({
20
26
  type: "document",
21
- documentName: a.name
22
- }), void 0, g.value, _.value, a.options.authentication?.preferredSecurityScheme)), y = s(), { focused: b } = m(y);
23
- return l(b, (e) => {
24
- e && h.update("x-scalar-active-document", a.name);
25
- }), (e, t) => (o(), i("div", {
26
- ref_key: "focusRef",
27
- ref: y,
28
- tabindex: "0"
29
- }, [Object.keys(_.value).length ? (o(), n(c(p), {
30
- key: 0,
31
- authStore: a.authStore,
32
- documentSlug: a.name,
33
- environment: a.environment,
34
- eventBus: a.eventBus,
35
- isReadOnly: "",
36
- isStatic: "",
37
- layout: "reference",
38
- meta: { type: "document" },
39
- persistAuth: a.options.persistAuth,
40
- proxyUrl: a.options.proxyUrl ?? "",
41
- securityRequirements: g.value,
42
- securitySchemes: _.value,
43
- selectedSecurity: v.value,
44
- server: a.selectedServer,
45
- title: "Authentication"
46
- }, null, 8, [
47
- "authStore",
48
- "documentSlug",
49
- "environment",
50
- "eventBus",
51
- "persistAuth",
52
- "proxyUrl",
53
- "securityRequirements",
54
- "securitySchemes",
55
- "selectedSecurity",
56
- "server"
57
- ])) : r("", !0)], 512));
27
+ documentName: __props.name
28
+ }), void 0, securityRequirements.value, securitySchemes.value, __props.options.authentication?.preferredSecurityScheme));
29
+ const focusRef = shallowRef();
30
+ const { focused } = useFocusWithin(focusRef);
31
+ watch(focused, (isFocused) => {
32
+ if (!isFocused) return;
33
+ workspaceStore.update("x-scalar-active-document", __props.name);
34
+ });
35
+ return (_ctx, _cache) => {
36
+ return openBlock(), createElementBlock("div", {
37
+ ref_key: "focusRef",
38
+ ref: focusRef,
39
+ tabindex: "0"
40
+ }, [Object.keys(securitySchemes.value).length ? (openBlock(), createBlock(unref(AuthSelector), {
41
+ key: 0,
42
+ authStore: __props.authStore,
43
+ documentSlug: __props.name,
44
+ environment: __props.environment,
45
+ eventBus: __props.eventBus,
46
+ isReadOnly: "",
47
+ isStatic: "",
48
+ layout: "reference",
49
+ meta: { type: "document" },
50
+ persistAuth: __props.options.persistAuth,
51
+ proxyUrl: __props.options.proxyUrl ?? "",
52
+ securityRequirements: securityRequirements.value,
53
+ securitySchemes: securitySchemes.value,
54
+ selectedSecurity: selectedSecurity.value,
55
+ server: __props.selectedServer,
56
+ title: "Authentication"
57
+ }, null, 8, [
58
+ "authStore",
59
+ "documentSlug",
60
+ "environment",
61
+ "eventBus",
62
+ "persistAuth",
63
+ "proxyUrl",
64
+ "securityRequirements",
65
+ "securitySchemes",
66
+ "selectedSecurity",
67
+ "server"
68
+ ])) : createCommentVNode("", true)], 512);
69
+ };
58
70
  }
59
71
  });
60
72
  //#endregion
61
- export { h as default };
73
+ export { Auth_vue_vue_type_script_setup_true_lang_default as default };
62
74
 
63
75
  //# sourceMappingURL=Auth.vue.script.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Auth.vue.script.js","names":[],"sources":["../../../src/views/Settings/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\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'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { useFocusWithin } from '@vueuse/core'\nimport { computed, shallowRef, watch } from 'vue'\n\nimport { useState } from '@/state/state'\n\nconst { document, name, environment, eventBus, options, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'persistAuth' | 'proxyUrl'\n >\n name: string\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\nconst { workspaceStore } = useState()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(document?.security),\n)\n\n/** Merge the security schemes with the authentication config and the auth store */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n document?.components?.securitySchemes ?? {},\n options.authentication?.securitySchemes,\n authStore,\n name,\n ),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: name,\n }),\n undefined,\n securityRequirements.value,\n securitySchemes.value,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n\nconst focusRef = shallowRef()\nconst { focused } = useFocusWithin(focusRef)\n\nwatch(focused, (isFocused) => {\n if (!isFocused) {\n return\n }\n\n workspaceStore.update('x-scalar-active-document', name)\n})\n</script>\n<template>\n <div\n ref=\"focusRef\"\n tabindex=\"0\">\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :authStore\n :documentSlug=\"name\"\n :environment\n :eventBus\n isReadOnly\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAgCA,IAAM,EAAE,sBAAmB,GAAS,EAG9B,IAAuB,QAC3B,EAAwB,EAAA,UAAU,SAAS,CAC7C,EAGM,IAAkB,QACtB,EACE,EAAA,UAAU,YAAY,mBAAmB,EAAE,EAC3C,EAAA,QAAQ,gBAAgB,iBACxB,EAAA,WACA,EAAA,KACD,CACH,EAGM,IAAmB,QACvB,EACE,EAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,EAAA;GACf,CAAC,EACF,KAAA,GACA,EAAqB,OACrB,EAAgB,OAChB,EAAA,QAAQ,gBAAgB,wBACzB,CACH,EAEM,IAAW,GAAW,EACtB,EAAE,eAAY,EAAe,EAAQ;SAE3C,EAAM,IAAU,MAAc;AACvB,QAIL,EAAe,OAAO,4BAA4B,EAAA,KAAI;IACvD,kBAGC,EAoBM,OAAA;YAnBA;GAAJ,KAAI;GACJ,UAAS;MAED,OAAO,KAAK,EAAA,MAAe,CAAE,UAAA,GAAA,EADrC,EAgB2B,EAAA,EAAA,EAAA;;GAdxB,WAAA,EAAA;GACA,cAAc,EAAA;GACd,aAAA,EAAA;GACA,UAAA,EAAA;GACD,YAAA;GACA,UAAA;GACA,QAAO;GACN,MAAM,EAAA,MAAA,YAAoB;GAC1B,aAAa,EAAA,QAAQ;GACrB,UAAU,EAAA,QAAQ,YAAQ;GAC1B,sBAAA,EAAA;GACA,iBAAA,EAAA;GACA,kBAAA,EAAA;GACA,QAAQ,EAAA;GACT,OAAM"}
1
+ {"version":3,"file":"Auth.vue.script.js","names":[],"sources":["../../../src/views/Settings/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\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'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { useFocusWithin } from '@vueuse/core'\nimport { computed, shallowRef, watch } from 'vue'\n\nimport { useState } from '@/state/state'\n\nconst { document, name, environment, eventBus, options, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'persistAuth' | 'proxyUrl'\n >\n name: string\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\nconst { workspaceStore } = useState()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(document?.security),\n)\n\n/** Merge the security schemes with the authentication config and the auth store */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n document?.components?.securitySchemes ?? {},\n options.authentication?.securitySchemes,\n authStore,\n name,\n ),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: name,\n }),\n undefined,\n securityRequirements.value,\n securitySchemes.value,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n\nconst focusRef = shallowRef()\nconst { focused } = useFocusWithin(focusRef)\n\nwatch(focused, (isFocused) => {\n if (!isFocused) {\n return\n }\n\n workspaceStore.update('x-scalar-active-document', name)\n})\n</script>\n<template>\n <div\n ref=\"focusRef\"\n tabindex=\"0\">\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :authStore\n :documentSlug=\"name\"\n :environment\n :eventBus\n isReadOnly\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAgCA,MAAM,EAAE,mBAAmB,UAAS;;EAGpC,MAAM,uBAAuB,eAC3B,wBAAwB,QAAA,UAAU,SAAS,CAC7C;;EAGA,MAAM,kBAAkB,eACtB,cACE,QAAA,UAAU,YAAY,mBAAmB,EAAE,EAC3C,QAAA,QAAQ,gBAAgB,iBACxB,QAAA,WACA,QAAA,KACD,CACH;;EAGA,MAAM,mBAAmB,eACvB,oBACE,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,QAAA;GACf,CAAC,EACF,KAAA,GACA,qBAAqB,OACrB,gBAAgB,OAChB,QAAA,QAAQ,gBAAgB,wBACzB,CACH;EAEA,MAAM,WAAW,YAAW;EAC5B,MAAM,EAAE,YAAY,eAAe,SAAQ;AAE3C,QAAM,UAAU,cAAc;AAC5B,OAAI,CAAC,UACH;AAGF,kBAAe,OAAO,4BAA4B,QAAA,KAAI;IACvD;;uBAGC,mBAoBM,OAAA;aAnBA;IAAJ,KAAI;IACJ,UAAS;OAED,OAAO,KAAK,gBAAA,MAAe,CAAE,UAAA,WAAA,EADrC,YAgB2B,MAAA,aAAA,EAAA;;IAdxB,WAAA,QAAA;IACA,cAAc,QAAA;IACd,aAAA,QAAA;IACA,UAAA,QAAA;IACD,YAAA;IACA,UAAA;IACA,QAAO;IACN,MAAM,EAAA,MAAA,YAAoB;IAC1B,aAAa,QAAA,QAAQ;IACrB,UAAU,QAAA,QAAQ,YAAQ;IAC1B,sBAAA,qBAAA;IACA,iBAAA,gBAAA;IACA,kBAAA,iBAAA;IACA,QAAQ,QAAA;IACT,OAAM"}
@@ -1,9 +1,9 @@
1
- import e from "../../_virtual/_plugin-vue_export-helper.js";
2
- import t from "./DocSettings.vue.script.js";
1
+ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import DocSettings_vue_vue_type_script_setup_true_lang_default from "./DocSettings.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/views/Settings/DocSettings.vue
5
- var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-dd964244"]]);
5
+ var DocSettings_default = /* @__PURE__ */ _plugin_vue_export_helper_default(DocSettings_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-dd964244"]]);
6
6
  //#endregion
7
- export { n as default };
7
+ export { DocSettings_default as default };
8
8
 
9
9
  //# sourceMappingURL=DocSettings.vue.js.map
@@ -1,50 +1,56 @@
1
- import { useState as e } from "../../state/state.js";
2
- import t from "./Auth.vue.js";
3
- import n from "../../components/ServerSelector.vue.js";
4
- import { computed as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, openBlock as c, unref as l } from "vue";
5
- import { getActiveEnvironment as u, getSelectedServer as d, getServers as f } from "@scalar/workspace-store/request-example";
1
+ import { useState } from "../../state/state.js";
2
+ import Auth_default from "./Auth.vue.js";
3
+ import ServerSelector_default from "../../components/ServerSelector.vue.js";
4
+ import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, unref } from "vue";
5
+ import { getActiveEnvironment, getSelectedServer, getServers } from "@scalar/workspace-store/request-example";
6
6
  //#region src/views/Settings/DocSettings.vue?vue&type=script&setup=true&lang.ts
7
- var p = { class: "docSettings" }, m = /* @__PURE__ */ s({
7
+ var _hoisted_1 = { class: "docSettings" };
8
+ var DocSettings_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
8
9
  __name: "DocSettings",
9
10
  props: {
10
11
  document: {},
11
12
  name: {}
12
13
  },
13
- setup(s) {
14
- let { workspaceStore: m, config: h, eventBus: g } = e(), _ = r(() => u(m, s.document).environment), v = r(() => {
15
- let e = f(s.document.servers, { documentUrl: s.document["x-scalar-original-source-url"] });
16
- return d(s.document, null, null, e);
17
- }), y = r(() => s.document.components?.securitySchemes ?? {});
18
- return (e, r) => (c(), i("div", p, [a("div", null, [o(t, {
19
- authStore: l(m).auth,
20
- document: s.document,
21
- environment: _.value,
22
- eventBus: l(g),
23
- name: s.name,
24
- options: l(h),
25
- securitySchemes: y.value,
26
- selectedServer: v.value
27
- }, null, 8, [
28
- "authStore",
29
- "document",
30
- "environment",
31
- "eventBus",
32
- "name",
33
- "options",
34
- "securitySchemes",
35
- "selectedServer"
36
- ])]), a("div", null, [o(n, {
37
- eventBus: l(g),
38
- selectedServer: v.value,
39
- servers: s.document.servers ?? []
40
- }, null, 8, [
41
- "eventBus",
42
- "selectedServer",
43
- "servers"
44
- ])])]));
14
+ setup(__props) {
15
+ const { workspaceStore, config, eventBus } = useState();
16
+ const environment = computed(() => getActiveEnvironment(workspaceStore, __props.document).environment);
17
+ const selectedServer = computed(() => {
18
+ const servers = getServers(__props.document.servers, { documentUrl: __props.document["x-scalar-original-source-url"] });
19
+ return getSelectedServer(__props.document, null, null, servers);
20
+ });
21
+ const securitySchemes = computed(() => __props.document.components?.securitySchemes ?? {});
22
+ return (_ctx, _cache) => {
23
+ return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", null, [createVNode(Auth_default, {
24
+ authStore: unref(workspaceStore).auth,
25
+ document: __props.document,
26
+ environment: environment.value,
27
+ eventBus: unref(eventBus),
28
+ name: __props.name,
29
+ options: unref(config),
30
+ securitySchemes: securitySchemes.value,
31
+ selectedServer: selectedServer.value
32
+ }, null, 8, [
33
+ "authStore",
34
+ "document",
35
+ "environment",
36
+ "eventBus",
37
+ "name",
38
+ "options",
39
+ "securitySchemes",
40
+ "selectedServer"
41
+ ])]), createElementVNode("div", null, [createVNode(ServerSelector_default, {
42
+ eventBus: unref(eventBus),
43
+ selectedServer: selectedServer.value,
44
+ servers: __props.document.servers ?? []
45
+ }, null, 8, [
46
+ "eventBus",
47
+ "selectedServer",
48
+ "servers"
49
+ ])])]);
50
+ };
45
51
  }
46
52
  });
47
53
  //#endregion
48
- export { m as default };
54
+ export { DocSettings_vue_vue_type_script_setup_true_lang_default as default };
49
55
 
50
56
  //# sourceMappingURL=DocSettings.vue.script.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocSettings.vue.script.js","names":[],"sources":["../../../src/views/Settings/DocSettings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n getActiveEnvironment,\n getSelectedServer,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport { type WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nimport ServerSelector from '@/components/ServerSelector.vue'\nimport { useState } from '@/state/state'\nimport Auth from '@/views/Settings/Auth.vue'\n\nconst { document, name } = defineProps<{\n document: WorkspaceDocument\n name: string\n}>()\n\nconst { workspaceStore, config, eventBus } = useState()\n\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document).environment,\n)\n\nconst selectedServer = computed(() => {\n const servers = getServers(document.servers, {\n documentUrl: document['x-scalar-original-source-url'],\n })\n\n return getSelectedServer(document, null, null, servers)\n})\n\nconst securitySchemes = computed(\n () => document.components?.securitySchemes ?? {},\n)\n</script>\n\n<template>\n <div class=\"docSettings\">\n <div>\n <Auth\n :authStore=\"workspaceStore.auth\"\n :document\n :environment\n :eventBus\n :name\n :options=\"config\"\n :securitySchemes\n :selectedServer />\n </div>\n <div>\n <ServerSelector\n :eventBus\n :selectedServer\n :servers=\"document.servers ?? []\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.docSettings {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-bottom: 12px;\n font-size: var(--scalar-font-size-3);\n max-height: 600px;\n}\n\n.documentName {\n font-weight: var(--scalar-semibold);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;EAkBA,IAAM,EAAE,mBAAgB,WAAQ,gBAAa,GAAS,EAEhD,IAAc,QACZ,EAAqB,GAAgB,EAAA,SAAS,CAAC,YACvD,EAEM,IAAiB,QAAe;GACpC,IAAM,IAAU,EAAW,EAAA,SAAS,SAAS,EAC3C,aAAa,EAAA,SAAS,iCACvB,CAAA;AAED,UAAO,EAAkB,EAAA,UAAU,MAAM,MAAM,EAAO;IACvD,EAEK,IAAkB,QAChB,EAAA,SAAS,YAAY,mBAAmB,EAAE,CAClD;yBAIE,EAkBM,OAlBN,GAkBM,CAjBJ,EAUM,OAAA,MAAA,CATJ,EAQoB,GAAA;GAPjB,WAAW,EAAA,EAAc,CAAC;GAC1B,UAAA,EAAA;GACA,aAAA,EAAA;GACA,UAAA,EAAA,EAAQ;GACR,MAAA,EAAA;GACA,SAAS,EAAA,EAAM;GACf,iBAAA,EAAA;GACA,gBAAA,EAAA;;;;;;;;;;QAEL,EAKM,OAAA,MAAA,CAJJ,EAGsC,GAAA;GAFnC,UAAA,EAAA,EAAQ;GACR,gBAAA,EAAA;GACA,SAAS,EAAA,SAAS,WAAO,EAAA"}
1
+ {"version":3,"file":"DocSettings.vue.script.js","names":[],"sources":["../../../src/views/Settings/DocSettings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n getActiveEnvironment,\n getSelectedServer,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport { type WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nimport ServerSelector from '@/components/ServerSelector.vue'\nimport { useState } from '@/state/state'\nimport Auth from '@/views/Settings/Auth.vue'\n\nconst { document, name } = defineProps<{\n document: WorkspaceDocument\n name: string\n}>()\n\nconst { workspaceStore, config, eventBus } = useState()\n\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document).environment,\n)\n\nconst selectedServer = computed(() => {\n const servers = getServers(document.servers, {\n documentUrl: document['x-scalar-original-source-url'],\n })\n\n return getSelectedServer(document, null, null, servers)\n})\n\nconst securitySchemes = computed(\n () => document.components?.securitySchemes ?? {},\n)\n</script>\n\n<template>\n <div class=\"docSettings\">\n <div>\n <Auth\n :authStore=\"workspaceStore.auth\"\n :document\n :environment\n :eventBus\n :name\n :options=\"config\"\n :securitySchemes\n :selectedServer />\n </div>\n <div>\n <ServerSelector\n :eventBus\n :selectedServer\n :servers=\"document.servers ?? []\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.docSettings {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-bottom: 12px;\n font-size: var(--scalar-font-size-3);\n max-height: 600px;\n}\n\n.documentName {\n font-weight: var(--scalar-semibold);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAkBA,MAAM,EAAE,gBAAgB,QAAQ,aAAa,UAAS;EAEtD,MAAM,cAAc,eACZ,qBAAqB,gBAAgB,QAAA,SAAS,CAAC,YACvD;EAEA,MAAM,iBAAiB,eAAe;GACpC,MAAM,UAAU,WAAW,QAAA,SAAS,SAAS,EAC3C,aAAa,QAAA,SAAS,iCACvB,CAAA;AAED,UAAO,kBAAkB,QAAA,UAAU,MAAM,MAAM,QAAO;IACvD;EAED,MAAM,kBAAkB,eAChB,QAAA,SAAS,YAAY,mBAAmB,EAAE,CAClD;;uBAIE,mBAkBM,OAlBN,YAkBM,CAjBJ,mBAUM,OAAA,MAAA,CATJ,YAQoB,cAAA;IAPjB,WAAW,MAAA,eAAc,CAAC;IAC1B,UAAA,QAAA;IACA,aAAA,YAAA;IACA,UAAA,MAAA,SAAQ;IACR,MAAA,QAAA;IACA,SAAS,MAAA,OAAM;IACf,iBAAA,gBAAA;IACA,gBAAA,eAAA;;;;;;;;;;SAEL,mBAKM,OAAA,MAAA,CAJJ,YAGsC,wBAAA;IAFnC,UAAA,MAAA,SAAQ;IACR,gBAAA,eAAA;IACA,SAAS,QAAA,SAAS,WAAO,EAAA"}
@@ -1,10 +1,10 @@
1
- import e from "../../_virtual/_plugin-vue_export-helper.js";
2
- import t from "./Settings.vue.script.js";
1
+ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import Settings_vue_vue_type_script_setup_true_lang_default from "./Settings.vue.script.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  //#region src/views/Settings/Settings.vue
6
- var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-5e4bca68"]]);
6
+ var Settings_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Settings_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-5e4bca68"]]);
7
7
  //#endregion
8
- export { n as default };
8
+ export { Settings_default as default };
9
9
 
10
10
  //# sourceMappingURL=Settings.vue.js.map
@@ -1,59 +1,70 @@
1
- import { URLS as e } from "../../consts/urls.js";
2
- import { useState as t } from "../../state/state.js";
3
- import n from "./DocSettings.vue.js";
4
- import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, isRef as d, normalizeClass as f, openBlock as p, renderList as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
5
- import { ScalarColorModeToggle as v, ScalarModal as y, ScalarTextInput as b } from "@scalar/components";
6
- import { ScalarIconCaretDown as x, ScalarIconCaretRight as S } from "@scalar/icons";
1
+ import { URLS } from "../../consts/urls.js";
2
+ import { useState } from "../../state/state.js";
3
+ import DocSettings_default from "./DocSettings.vue.js";
4
+ import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, normalizeClass, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
5
+ import { ScalarColorModeToggle, ScalarModal, ScalarTextInput } from "@scalar/components";
6
+ import { ScalarIconCaretDown, ScalarIconCaretRight } from "@scalar/icons";
7
7
  //#region src/views/Settings/Settings.vue?vue&type=script&setup=true&lang.ts
8
- var C = { class: "settingsHeading" }, w = { class: "documentList" }, T = ["onClick"], E = { key: 0 }, D = {
8
+ var _hoisted_1 = { class: "settingsHeading" };
9
+ var _hoisted_2 = { class: "documentList" };
10
+ var _hoisted_3 = ["onClick"];
11
+ var _hoisted_4 = { key: 0 };
12
+ var _hoisted_5 = {
9
13
  key: 1,
10
14
  class: "noDocuments"
11
- }, O = { class: "proxyUrlContainer" }, k = ["href"], A = /* @__PURE__ */ u({
15
+ };
16
+ var _hoisted_6 = { class: "proxyUrlContainer" };
17
+ var _hoisted_7 = ["href"];
18
+ var Settings_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
12
19
  __name: "Settings",
13
20
  props: { modalState: {} },
14
- setup(u) {
15
- let { workspaceStore: A, proxyUrlRaw: j } = t();
16
- function M(e) {
17
- A.update("x-scalar-active-document", e);
21
+ setup(__props) {
22
+ const { workspaceStore, proxyUrlRaw } = useState();
23
+ function selectDocument(name) {
24
+ workspaceStore.update("x-scalar-active-document", name);
18
25
  }
19
- return (t, N) => (p(), i(g(y), {
20
- class: "settingsModal",
21
- state: u.modalState
22
- }, {
23
- default: _(() => [
24
- s("div", C, [N[1] ||= s("h1", null, "Settings", -1), l(g(v), { class: "colorToggle ml-auto" })]),
25
- s("div", w, [Object.entries(g(A).workspace.documents).length ? (p(!0), o(r, { key: 0 }, m(Object.entries(g(A).workspace.documents), ([e, t]) => (p(), o("div", {
26
- key: e,
27
- class: "document"
28
- }, [s("button", {
29
- class: f(["documentName", { documentNameActive: g(A).workspace.activeDocument === t }]),
30
- type: "button",
31
- onClick: (t) => M(e)
32
- }, [c(" @" + h(e) + " ", 1), g(A).workspace.activeDocument === t ? (p(), i(g(x), { key: 0 })) : (p(), i(g(S), { key: 1 }))], 10, T), g(A).workspace.activeDocument === t ? (p(), o("div", E, [l(n, {
33
- document: t,
34
- name: e
35
- }, null, 8, ["document", "name"])])) : a("", !0)]))), 128)) : (p(), o("div", D, " There's no API definition loaded. Use the + button to load APIs. "))]),
36
- s("div", O, [
37
- N[3] ||= s("label", { for: "proxyUrl" }, "CORS Proxy", -1),
38
- s("p", null, [N[2] ||= c(" All requests will be sent through the specified proxy URL to help avoid CORS (Cross-Origin Resource Sharing) issues. ", -1), s("a", {
39
- class: "underline",
40
- href: g(e).PROXY_SOURCE_CODE,
41
- target: "_blank"
42
- }, " Read more ", 8, k)]),
43
- l(g(b), {
44
- id: "proxyUrl",
45
- modelValue: g(j),
46
- "onUpdate:modelValue": N[0] ||= (e) => d(j) ? j.value = e : null,
47
- label: "Proxy URL",
48
- placeholder: g(e).DEFAULT_PROXY_URL
49
- }, null, 8, ["modelValue", "placeholder"])
50
- ])
51
- ]),
52
- _: 1
53
- }, 8, ["state"]));
26
+ return (_ctx, _cache) => {
27
+ return openBlock(), createBlock(unref(ScalarModal), {
28
+ class: "settingsModal",
29
+ state: __props.modalState
30
+ }, {
31
+ default: withCtx(() => [
32
+ createElementVNode("div", _hoisted_1, [_cache[1] || (_cache[1] = createElementVNode("h1", null, "Settings", -1)), createVNode(unref(ScalarColorModeToggle), { class: "colorToggle ml-auto" })]),
33
+ createElementVNode("div", _hoisted_2, [Object.entries(unref(workspaceStore).workspace.documents).length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(Object.entries(unref(workspaceStore).workspace.documents), ([name, document]) => {
34
+ return openBlock(), createElementBlock("div", {
35
+ key: name,
36
+ class: "document"
37
+ }, [createElementVNode("button", {
38
+ class: normalizeClass(["documentName", { documentNameActive: unref(workspaceStore).workspace.activeDocument === document }]),
39
+ type: "button",
40
+ onClick: ($event) => selectDocument(name)
41
+ }, [createTextVNode(" @" + toDisplayString(name) + " ", 1), unref(workspaceStore).workspace.activeDocument === document ? (openBlock(), createBlock(unref(ScalarIconCaretDown), { key: 0 })) : (openBlock(), createBlock(unref(ScalarIconCaretRight), { key: 1 }))], 10, _hoisted_3), unref(workspaceStore).workspace.activeDocument === document ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(DocSettings_default, {
42
+ document,
43
+ name
44
+ }, null, 8, ["document", "name"])])) : createCommentVNode("", true)]);
45
+ }), 128)) : (openBlock(), createElementBlock("div", _hoisted_5, " There's no API definition loaded. Use the + button to load APIs. "))]),
46
+ createElementVNode("div", _hoisted_6, [
47
+ _cache[3] || (_cache[3] = createElementVNode("label", { for: "proxyUrl" }, "CORS Proxy", -1)),
48
+ createElementVNode("p", null, [_cache[2] || (_cache[2] = createTextVNode(" All requests will be sent through the specified proxy URL to help avoid CORS (Cross-Origin Resource Sharing) issues. ", -1)), createElementVNode("a", {
49
+ class: "underline",
50
+ href: unref(URLS).PROXY_SOURCE_CODE,
51
+ target: "_blank"
52
+ }, " Read more ", 8, _hoisted_7)]),
53
+ createVNode(unref(ScalarTextInput), {
54
+ id: "proxyUrl",
55
+ modelValue: unref(proxyUrlRaw),
56
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(proxyUrlRaw) ? proxyUrlRaw.value = $event : null),
57
+ label: "Proxy URL",
58
+ placeholder: unref(URLS).DEFAULT_PROXY_URL
59
+ }, null, 8, ["modelValue", "placeholder"])
60
+ ])
61
+ ]),
62
+ _: 1
63
+ }, 8, ["state"]);
64
+ };
54
65
  }
55
66
  });
56
67
  //#endregion
57
- export { A as default };
68
+ export { Settings_vue_vue_type_script_setup_true_lang_default as default };
58
69
 
59
70
  //# sourceMappingURL=Settings.vue.script.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.vue.script.js","names":[],"sources":["../../../src/views/Settings/Settings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarColorModeToggle,\n ScalarModal,\n ScalarTextInput,\n type ModalState,\n} from '@scalar/components'\nimport { ScalarIconCaretDown, ScalarIconCaretRight } from '@scalar/icons'\n\nimport { URLS } from '@/consts/urls'\nimport { useState } from '@/state/state'\nimport DocSettings from '@/views/Settings/DocSettings.vue'\n\nconst { modalState } = defineProps<{\n modalState: ModalState\n}>()\n\nconst { workspaceStore, proxyUrlRaw } = useState()\n\nfunction selectDocument(name: string) {\n workspaceStore.update('x-scalar-active-document', name)\n}\n</script>\n\n<template>\n <ScalarModal\n class=\"settingsModal\"\n :state=\"modalState\">\n <div class=\"settingsHeading\">\n <h1>Settings</h1>\n <ScalarColorModeToggle class=\"colorToggle ml-auto\" />\n </div>\n <div class=\"documentList\">\n <template\n v-if=\"Object.entries(workspaceStore.workspace.documents).length\">\n <div\n v-for=\"[name, document] of Object.entries(\n workspaceStore.workspace.documents,\n )\"\n :key=\"name\"\n class=\"document\">\n <button\n class=\"documentName\"\n :class=\"{\n documentNameActive:\n workspaceStore.workspace.activeDocument === document,\n }\"\n type=\"button\"\n @click=\"selectDocument(name)\">\n @{{ name }}\n <ScalarIconCaretDown\n v-if=\"workspaceStore.workspace.activeDocument === document\" />\n <ScalarIconCaretRight v-else />\n </button>\n <div v-if=\"workspaceStore.workspace.activeDocument === document\">\n <DocSettings\n :document\n :name />\n </div>\n </div>\n </template>\n <div\n v-else\n class=\"noDocuments\">\n There's no API definition loaded. Use the + button to load APIs.\n </div>\n </div>\n\n <div class=\"proxyUrlContainer\">\n <label for=\"proxyUrl\">CORS Proxy</label>\n <p>\n All requests will be sent through the specified proxy URL to help avoid\n CORS (Cross-Origin Resource Sharing) issues.\n <a\n class=\"underline\"\n :href=\"URLS.PROXY_SOURCE_CODE\"\n target=\"_blank\">\n Read more\n </a>\n </p>\n <ScalarTextInput\n id=\"proxyUrl\"\n v-model=\"proxyUrlRaw\"\n label=\"Proxy URL\"\n :placeholder=\"URLS.DEFAULT_PROXY_URL\" />\n </div>\n </ScalarModal>\n</template>\n\n<style>\n/* Prevent auth method dropdown from going behind the modal */\n.settingsModal .scalar-modal-layout {\n z-index: 10 !important;\n}\n\n.settingsModal .scalar-modal-body {\n overflow-y: auto;\n overflow-x: hidden;\n}\n</style>\n\n<style scoped>\n.documentList {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-font-size-3);\n margin-bottom: 12px;\n}\n\n.document {\n display: flex;\n flex-direction: column;\n width: calc(100% + 24px);\n left: -12px;\n position: relative;\n padding: 0 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.document:first-of-type:not(:last-of-type) {\n border-bottom: none;\n}\n\n.documentName {\n gap: 4px;\n display: flex;\n align-items: center;\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-2);\n padding: 12px 0;\n}\n\n.documentNameActive {\n color: var(--scalar-color-1);\n}\n\n.settingsHeading {\n font-size: 19px;\n margin-bottom: 12px;\n display: flex;\n gap: 5px;\n align-items: center;\n font-weight: var(--scalar-semibold);\n}\n\n.proxyUrlContainer {\n font-size: var(--scalar-font-size-3);\n display: flex;\n gap: 5px;\n flex-direction: column;\n}\n.proxyUrlContainer label {\n font-weight: var(--scalar-semibold);\n}\n.noDocuments {\n color: var(--scalar-color-2);\n margin-bottom: 10px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAiBA,IAAM,EAAE,mBAAgB,mBAAgB,GAAS;EAEjD,SAAS,EAAe,GAAc;AACpC,KAAe,OAAO,4BAA4B,EAAI;;yBAKtD,EA6Dc,EAAA,EAAA,EAAA;GA5DZ,OAAM;GACL,OAAO,EAAA;;oBAIF;IAHN,EAGM,OAHN,GAGM,CAAA,AAAA,EAAA,OAFJ,EAAiB,MAAA,MAAb,YAAQ,GAAA,EACZ,EAAqD,EAAA,EAAA,EAAA,EAA9B,OAAM,uBAAqB,CAAA,CAAA,CAAA;IAEpD,EAkCM,OAlCN,GAkCM,CAhCI,OAAO,QAAQ,EAAA,EAAc,CAAC,UAAU,UAAS,CAAE,UAAA,EAAA,GAAA,EACzD,EAwBM,GAAA,EAAA,KAAA,GAAA,EAAA,EAvBuB,OAAO,QAAqB,EAAA,EAAc,CAAC,UAAU,UAAA,GAAA,CAAxE,GAAM,aADhB,EAwBM,OAAA;KApBH,KAAK;KACN,OAAM;QACN,EAYS,UAAA;KAXP,OAAK,EAAA,CAAC,gBAAc,EAAA,oBACwC,EAAA,EAAc,CAAC,UAAU,mBAAmB,GAAA,CAAA,CAAA;KAIxG,MAAK;KACJ,UAAK,MAAE,EAAe,EAAI;UAAG,OAC7B,EAAG,EAAI,GAAG,KACX,EAAA,EACQ,EAAA,EAAc,CAAC,UAAU,mBAAmB,KAAA,GAAA,EADpD,EACgE,EAAA,EAAA,EAAA,EAAA,KAAA,GAAA,CAAA,KAAA,GAAA,EAChE,EAA+B,EAAA,EAAA,EAAA,EAAA,KAAA,GAAA,CAAA,EAAA,EAAA,IAAA,EAAA,EAEtB,EAAA,EAAc,CAAC,UAAU,mBAAmB,KAAA,GAAA,EAAvD,EAIM,OAAA,GAAA,CAHJ,EAEU,GAAA;KADP;KACA;wEAIT,EAIM,OAJN,GAEsB,qEAEtB,EAAA,CAAA;IAGF,EAiBM,OAjBN,GAiBM;cAhBJ,EAAwC,SAAA,EAAjC,KAAI,YAAU,EAAC,cAAU,GAAA;KAChC,EASI,KAAA,MAAA,CAAA,AAAA,EAAA,OAAA,EATD,0HAGD,GAAA,EAAA,EAKI,KAAA;MAJF,OAAM;MACL,MAAM,EAAA,EAAI,CAAC;MACZ,QAAO;QAAS,eAElB,GAAA,EAAA,CAAA,CAAA;KAEF,EAI0C,EAAA,EAAA,EAAA;MAHxC,IAAG;kBACM,EAAA,EAAW;sDAAA,QAAA,IAAA;MACpB,OAAM;MACL,aAAa,EAAA,EAAI,CAAC"}
1
+ {"version":3,"file":"Settings.vue.script.js","names":[],"sources":["../../../src/views/Settings/Settings.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarColorModeToggle,\n ScalarModal,\n ScalarTextInput,\n type ModalState,\n} from '@scalar/components'\nimport { ScalarIconCaretDown, ScalarIconCaretRight } from '@scalar/icons'\n\nimport { URLS } from '@/consts/urls'\nimport { useState } from '@/state/state'\nimport DocSettings from '@/views/Settings/DocSettings.vue'\n\nconst { modalState } = defineProps<{\n modalState: ModalState\n}>()\n\nconst { workspaceStore, proxyUrlRaw } = useState()\n\nfunction selectDocument(name: string) {\n workspaceStore.update('x-scalar-active-document', name)\n}\n</script>\n\n<template>\n <ScalarModal\n class=\"settingsModal\"\n :state=\"modalState\">\n <div class=\"settingsHeading\">\n <h1>Settings</h1>\n <ScalarColorModeToggle class=\"colorToggle ml-auto\" />\n </div>\n <div class=\"documentList\">\n <template\n v-if=\"Object.entries(workspaceStore.workspace.documents).length\">\n <div\n v-for=\"[name, document] of Object.entries(\n workspaceStore.workspace.documents,\n )\"\n :key=\"name\"\n class=\"document\">\n <button\n class=\"documentName\"\n :class=\"{\n documentNameActive:\n workspaceStore.workspace.activeDocument === document,\n }\"\n type=\"button\"\n @click=\"selectDocument(name)\">\n @{{ name }}\n <ScalarIconCaretDown\n v-if=\"workspaceStore.workspace.activeDocument === document\" />\n <ScalarIconCaretRight v-else />\n </button>\n <div v-if=\"workspaceStore.workspace.activeDocument === document\">\n <DocSettings\n :document\n :name />\n </div>\n </div>\n </template>\n <div\n v-else\n class=\"noDocuments\">\n There's no API definition loaded. Use the + button to load APIs.\n </div>\n </div>\n\n <div class=\"proxyUrlContainer\">\n <label for=\"proxyUrl\">CORS Proxy</label>\n <p>\n All requests will be sent through the specified proxy URL to help avoid\n CORS (Cross-Origin Resource Sharing) issues.\n <a\n class=\"underline\"\n :href=\"URLS.PROXY_SOURCE_CODE\"\n target=\"_blank\">\n Read more\n </a>\n </p>\n <ScalarTextInput\n id=\"proxyUrl\"\n v-model=\"proxyUrlRaw\"\n label=\"Proxy URL\"\n :placeholder=\"URLS.DEFAULT_PROXY_URL\" />\n </div>\n </ScalarModal>\n</template>\n\n<style>\n/* Prevent auth method dropdown from going behind the modal */\n.settingsModal .scalar-modal-layout {\n z-index: 10 !important;\n}\n\n.settingsModal .scalar-modal-body {\n overflow-y: auto;\n overflow-x: hidden;\n}\n</style>\n\n<style scoped>\n.documentList {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-font-size-3);\n margin-bottom: 12px;\n}\n\n.document {\n display: flex;\n flex-direction: column;\n width: calc(100% + 24px);\n left: -12px;\n position: relative;\n padding: 0 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.document:first-of-type:not(:last-of-type) {\n border-bottom: none;\n}\n\n.documentName {\n gap: 4px;\n display: flex;\n align-items: center;\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-2);\n padding: 12px 0;\n}\n\n.documentNameActive {\n color: var(--scalar-color-1);\n}\n\n.settingsHeading {\n font-size: 19px;\n margin-bottom: 12px;\n display: flex;\n gap: 5px;\n align-items: center;\n font-weight: var(--scalar-semibold);\n}\n\n.proxyUrlContainer {\n font-size: var(--scalar-font-size-3);\n display: flex;\n gap: 5px;\n flex-direction: column;\n}\n.proxyUrlContainer label {\n font-weight: var(--scalar-semibold);\n}\n.noDocuments {\n color: var(--scalar-color-2);\n margin-bottom: 10px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,EAAE,gBAAgB,gBAAgB,UAAS;EAEjD,SAAS,eAAe,MAAc;AACpC,kBAAe,OAAO,4BAA4B,KAAI;;;uBAKtD,YA6Dc,MAAA,YAAA,EAAA;IA5DZ,OAAM;IACL,OAAO,QAAA;;2BAIF;KAHN,mBAGM,OAHN,YAGM,CAAA,OAAA,OAAA,OAAA,KAFJ,mBAAiB,MAAA,MAAb,YAAQ,GAAA,GACZ,YAAqD,MAAA,sBAAA,EAAA,EAA9B,OAAM,uBAAqB,CAAA,CAAA,CAAA;KAEpD,mBAkCM,OAlCN,YAkCM,CAhCI,OAAO,QAAQ,MAAA,eAAc,CAAC,UAAU,UAAS,CAAE,UAAA,UAAA,KAAA,EACzD,mBAwBM,UAAA,EAAA,KAAA,GAAA,EAAA,WAvBuB,OAAO,QAAqB,MAAA,eAAc,CAAC,UAAU,UAAA,GAAA,CAAxE,MAAM,cAAQ;0BADxB,mBAwBM,OAAA;OApBH,KAAK;OACN,OAAM;UACN,mBAYS,UAAA;OAXP,OAAK,eAAA,CAAC,gBAAc,EAAA,oBACwC,MAAA,eAAc,CAAC,UAAU,mBAAmB,UAAA,CAAA,CAAA;OAIxG,MAAK;OACJ,UAAK,WAAE,eAAe,KAAI;0BAAG,OAC7B,gBAAG,KAAI,GAAG,KACX,EAAA,EACQ,MAAA,eAAc,CAAC,UAAU,mBAAmB,YAAA,WAAA,EADpD,YACgE,MAAA,oBAAA,EAAA,EAAA,KAAA,GAAA,CAAA,KAAA,WAAA,EAChE,YAA+B,MAAA,qBAAA,EAAA,EAAA,KAAA,GAAA,CAAA,EAAA,EAAA,IAAA,WAAA,EAEtB,MAAA,eAAc,CAAC,UAAU,mBAAmB,YAAA,WAAA,EAAvD,mBAIM,OAAA,YAAA,CAHJ,YAEU,qBAAA;OADP;OACA;;+BAIT,mBAIM,OAJN,YAEsB,qEAEtB,EAAA,CAAA;KAGF,mBAiBM,OAjBN,YAiBM;gCAhBJ,mBAAwC,SAAA,EAAjC,KAAI,YAAU,EAAC,cAAU,GAAA;MAChC,mBASI,KAAA,MAAA,CAAA,OAAA,OAAA,OAAA,KAAA,gBATD,0HAGD,GAAA,GAAA,mBAKI,KAAA;OAJF,OAAM;OACL,MAAM,MAAA,KAAI,CAAC;OACZ,QAAO;SAAS,eAElB,GAAA,WAAA,CAAA,CAAA;MAEF,YAI0C,MAAA,gBAAA,EAAA;OAHxC,IAAG;mBACM,MAAA,YAAW;qGAAA,QAAA,SAAA;OACpB,OAAM;OACL,aAAa,MAAA,KAAI,CAAC"}
@@ -1,9 +1,9 @@
1
- import e from "../_virtual/_plugin-vue_export-helper.js";
2
- import t from "./Start.vue.script.js";
1
+ import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
2
+ import Start_vue_vue_type_script_setup_true_lang_default from "./Start.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/views/Start.vue
5
- var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-56f7e8dd"]]);
5
+ var Start_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Start_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-56f7e8dd"]]);
6
6
  //#endregion
7
- export { n as default };
7
+ export { Start_default as default };
8
8
 
9
9
  //# sourceMappingURL=Start.vue.js.map
@@ -1,41 +1,48 @@
1
- import { URLS as e } from "../consts/urls.js";
2
- import { useState as t } from "../state/state.js";
3
- import n from "./PromptForm.vue.js";
4
- import r from "../components/Logo.vue.js";
5
- import { Fragment as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, openBlock as u, unref as d } from "vue";
1
+ import { URLS } from "../consts/urls.js";
2
+ import { useState } from "../state/state.js";
3
+ import PromptForm_default from "./PromptForm.vue.js";
4
+ import Logo_default from "../components/Logo.vue.js";
5
+ import { Fragment, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, unref } from "vue";
6
6
  //#region src/views/Start.vue?vue&type=script&setup=true&lang.ts
7
- var f = { class: "startContainer" }, p = { class: "disclaimerText" }, m = ["href"], h = ["href"], g = /* @__PURE__ */ l({
7
+ var _hoisted_1 = { class: "startContainer" };
8
+ var _hoisted_2 = { class: "disclaimerText" };
9
+ var _hoisted_3 = ["href"];
10
+ var _hoisted_4 = ["href"];
11
+ var Start_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
8
12
  __name: "Start",
9
13
  emits: ["submit", "uploadApi"],
10
- setup(l, { emit: g }) {
11
- let _ = g, { mode: v } = t();
12
- return (t, l) => (u(), a("div", f, [
13
- c(r, { class: "agentLogo" }),
14
- l[4] ||= o("h1", { class: "heading" }, "How can I help you today?", -1),
15
- c(n, {
16
- ref: "promptFormField",
17
- onSubmit: l[0] ||= (e) => _("submit"),
18
- onUploadApi: l[1] ||= (e) => _("uploadApi")
19
- }, null, 512),
20
- o("p", p, [
21
- d(v) === "preview" ? (u(), a(i, { key: 0 }, [s(" By messaging Agent Scalar your OpenAPI document will be temporarily uploaded to Scalar's servers. You must agree to our ")], 64)) : (u(), a(i, { key: 1 }, [s("By messaging Agent Scalar you agree to our ")], 64)),
22
- o("a", {
23
- class: "disclaimerLink",
24
- href: d(e).TERMS_AND_CONDITIONS,
25
- target: "_blank"
26
- }, "Terms", 8, m),
27
- l[2] ||= s(" and ", -1),
28
- o("a", {
29
- class: "disclaimerLink",
30
- href: d(e).PRIVACY_POLICY,
31
- target: "_blank"
32
- }, "Privacy Policy", 8, h),
33
- l[3] ||= s(". ", -1)
34
- ])
35
- ]));
14
+ setup(__props, { emit: __emit }) {
15
+ const emit = __emit;
16
+ const { mode } = useState();
17
+ return (_ctx, _cache) => {
18
+ return openBlock(), createElementBlock("div", _hoisted_1, [
19
+ createVNode(Logo_default, { class: "agentLogo" }),
20
+ _cache[4] || (_cache[4] = createElementVNode("h1", { class: "heading" }, "How can I help you today?", -1)),
21
+ createVNode(PromptForm_default, {
22
+ ref: "promptFormField",
23
+ onSubmit: _cache[0] || (_cache[0] = ($event) => emit("submit")),
24
+ onUploadApi: _cache[1] || (_cache[1] = ($event) => emit("uploadApi"))
25
+ }, null, 512),
26
+ createElementVNode("p", _hoisted_2, [
27
+ unref(mode) === "preview" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" By messaging Agent Scalar your OpenAPI document will be temporarily uploaded to Scalar's servers. You must agree to our ")], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode("By messaging Agent Scalar you agree to our ")], 64)),
28
+ createElementVNode("a", {
29
+ class: "disclaimerLink",
30
+ href: unref(URLS).TERMS_AND_CONDITIONS,
31
+ target: "_blank"
32
+ }, "Terms", 8, _hoisted_3),
33
+ _cache[2] || (_cache[2] = createTextVNode(" and ", -1)),
34
+ createElementVNode("a", {
35
+ class: "disclaimerLink",
36
+ href: unref(URLS).PRIVACY_POLICY,
37
+ target: "_blank"
38
+ }, "Privacy Policy", 8, _hoisted_4),
39
+ _cache[3] || (_cache[3] = createTextVNode(". ", -1))
40
+ ])
41
+ ]);
42
+ };
36
43
  }
37
44
  });
38
45
  //#endregion
39
- export { g as default };
46
+ export { Start_vue_vue_type_script_setup_true_lang_default as default };
40
47
 
41
48
  //# sourceMappingURL=Start.vue.script.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Start.vue.script.js","names":[],"sources":["../../src/views/Start.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport Logo from '@/components/Logo.vue'\nimport { URLS } from '@/consts/urls'\nimport { useState } from '@/state/state'\nimport PromptForm from '@/views/PromptForm.vue'\n\nconst emit = defineEmits<{\n (e: 'submit'): void\n (e: 'uploadApi'): void\n}>()\n\nconst { mode } = useState()\n</script>\n\n<template>\n <div class=\"startContainer\">\n <Logo class=\"agentLogo\" />\n <h1 class=\"heading\">How can I help you today?</h1>\n <PromptForm\n ref=\"promptFormField\"\n @submit=\"emit('submit')\"\n @uploadApi=\"emit('uploadApi')\" />\n <p class=\"disclaimerText\">\n <template v-if=\"mode === 'preview'\">\n By messaging Agent Scalar your OpenAPI document will be temporarily\n uploaded to Scalar's servers. You must agree to our\n </template>\n <template v-else>By messaging Agent Scalar you agree to our </template>\n <a\n class=\"disclaimerLink\"\n :href=\"URLS.TERMS_AND_CONDITIONS\"\n target=\"_blank\"\n >Terms</a\n >\n and\n <a\n class=\"disclaimerLink\"\n :href=\"URLS.PRIVACY_POLICY\"\n target=\"_blank\"\n >Privacy Policy</a\n >.\n </p>\n </div>\n</template>\n\n<style scoped>\n.agentLogo {\n margin-bottom: 15px;\n}\n\n.startContainer {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n max-width: 720px;\n position: relative;\n}\n\n.heading {\n font-size: 1.5rem;\n font-weight: var(--scalar-font-bold);\n margin-bottom: 50px;\n}\n\n.disclaimerText {\n text-align: center;\n color: var(--scalar-color-3);\n font-size: var(--scalar-font-size-3);\n text-wrap: balance;\n line-height: 1.44;\n margin-top: 40px;\n}\n\n.disclaimerLink {\n text-decoration: underline;\n}\n</style>\n"],"mappings":";;;;;;;;;;EAMA,IAAM,IAAO,GAKP,EAAE,YAAS,GAAS;yBAIxB,EA2BM,OA3BN,GA2BM;GA1BJ,EAA0B,GAAA,EAApB,OAAM,aAAW,CAAA;YACvB,EAAkD,MAAA,EAA9C,OAAM,WAAS,EAAC,6BAAyB,GAAA;GAC7C,EAGmC,GAAA;IAFjC,KAAI;IACH,UAAM,AAAA,EAAA,QAAA,MAAE,EAAI,SAAA;IACZ,aAAS,AAAA,EAAA,QAAA,MAAE,EAAI,YAAA;;GAClB,EAmBI,KAnBJ,GAmBI;IAlBc,EAAA,EAAI,KAAA,aAAA,GAAA,EAApB,EAGW,GAAA,EAAA,KAAA,GAAA,EAAA,CAAA,EAHyB,4HAGpC,CAAA,EAAA,GAAA,KAAA,GAAA,EACA,EAAuE,GAAA,EAAA,KAAA,GAAA,EAAA,CAAA,EAAtD,8CAA2C,CAAA,EAAA,GAAA;IAC5D,EAKC,KAAA;KAJC,OAAM;KACL,MAAM,EAAA,EAAI,CAAC;KACZ,QAAO;OACN,SAAK,GAAA,EAAA;eACP,SAED,GAAA;IAAA,EAKC,KAAA;KAJC,OAAM;KACL,MAAM,EAAA,EAAI,CAAC;KACZ,QAAO;OACN,kBAAc,GAAA,EAAA;eAChB,MACH,GAAA"}
1
+ {"version":3,"file":"Start.vue.script.js","names":[],"sources":["../../src/views/Start.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport Logo from '@/components/Logo.vue'\nimport { URLS } from '@/consts/urls'\nimport { useState } from '@/state/state'\nimport PromptForm from '@/views/PromptForm.vue'\n\nconst emit = defineEmits<{\n (e: 'submit'): void\n (e: 'uploadApi'): void\n}>()\n\nconst { mode } = useState()\n</script>\n\n<template>\n <div class=\"startContainer\">\n <Logo class=\"agentLogo\" />\n <h1 class=\"heading\">How can I help you today?</h1>\n <PromptForm\n ref=\"promptFormField\"\n @submit=\"emit('submit')\"\n @uploadApi=\"emit('uploadApi')\" />\n <p class=\"disclaimerText\">\n <template v-if=\"mode === 'preview'\">\n By messaging Agent Scalar your OpenAPI document will be temporarily\n uploaded to Scalar's servers. You must agree to our\n </template>\n <template v-else>By messaging Agent Scalar you agree to our </template>\n <a\n class=\"disclaimerLink\"\n :href=\"URLS.TERMS_AND_CONDITIONS\"\n target=\"_blank\"\n >Terms</a\n >\n and\n <a\n class=\"disclaimerLink\"\n :href=\"URLS.PRIVACY_POLICY\"\n target=\"_blank\"\n >Privacy Policy</a\n >.\n </p>\n </div>\n</template>\n\n<style scoped>\n.agentLogo {\n margin-bottom: 15px;\n}\n\n.startContainer {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n max-width: 720px;\n position: relative;\n}\n\n.heading {\n font-size: 1.5rem;\n font-weight: var(--scalar-font-bold);\n margin-bottom: 50px;\n}\n\n.disclaimerText {\n text-align: center;\n color: var(--scalar-color-3);\n font-size: var(--scalar-font-size-3);\n text-wrap: balance;\n line-height: 1.44;\n margin-top: 40px;\n}\n\n.disclaimerLink {\n text-decoration: underline;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAMA,MAAM,OAAO;EAKb,MAAM,EAAE,SAAS,UAAS;;uBAIxB,mBA2BM,OA3BN,YA2BM;IA1BJ,YAA0B,cAAA,EAApB,OAAM,aAAW,CAAA;8BACvB,mBAAkD,MAAA,EAA9C,OAAM,WAAS,EAAC,6BAAyB,GAAA;IAC7C,YAGmC,oBAAA;KAFjC,KAAI;KACH,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAA;KACZ,aAAS,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,YAAA;;IAClB,mBAmBI,KAnBJ,YAmBI;KAlBc,MAAA,KAAI,KAAA,aAAA,WAAA,EAApB,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,gBAHyB,4HAGpC,CAAA,EAAA,GAAA,KAAA,WAAA,EACA,mBAAuE,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,gBAAtD,8CAA2C,CAAA,EAAA,GAAA;KAC5D,mBAKC,KAAA;MAJC,OAAM;MACL,MAAM,MAAA,KAAI,CAAC;MACZ,QAAO;QACN,SAAK,GAAA,WAAA;+CACP,SAED,GAAA;KAAA,mBAKC,KAAA;MAJC,OAAM;MACL,MAAM,MAAA,KAAI,CAAC;MACZ,QAAO;QACN,kBAAc,GAAA,WAAA;+CAChB,MACH,GAAA"}