@scalar/agent-chat 0.2.3 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/App.vue.d.ts +3 -2
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +32 -0
- package/dist/App.vue2.js +4 -0
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Chat.vue.js +23 -0
- package/dist/Chat.vue2.js +4 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/api.d.ts +50 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +68 -0
- package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
- package/dist/components/ApprovalSection.vue.js +7 -0
- package/dist/components/ApprovalSection.vue2.js +42 -0
- package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
- package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationProvided.vue.js +13 -0
- package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
- package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationRequired.vue.js +13 -0
- package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
- package/dist/components/AutosendPaused.vue.js +13 -0
- package/dist/components/ContextItem.vue.d.ts.map +1 -1
- package/dist/components/ContextItem.vue.js +7 -0
- package/dist/components/ContextItem.vue2.js +19 -0
- package/dist/components/ErrorMessage.vue.d.ts +2 -1
- package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
- package/dist/components/ErrorMessage.vue.js +7 -0
- package/dist/components/ErrorMessage.vue2.js +22 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
- package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
- package/dist/components/Logo.vue.d.ts.map +1 -1
- package/dist/components/Logo.vue.js +23 -0
- package/dist/components/PaymentSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.js +7 -0
- package/dist/components/PaymentSection.vue2.js +34 -0
- package/dist/components/RequestApproved.vue.d.ts.map +1 -1
- package/dist/components/RequestApproved.vue.js +13 -0
- package/dist/components/RequestFailed.vue.d.ts.map +1 -1
- package/dist/components/RequestFailed.vue.js +24 -0
- package/dist/components/RequestPreview.vue.d.ts +1 -1
- package/dist/components/RequestPreview.vue.d.ts.map +1 -1
- package/dist/components/RequestPreview.vue.js +7 -0
- package/dist/components/RequestPreview.vue2.js +123 -0
- package/dist/components/RequestRejected.vue.d.ts.map +1 -1
- package/dist/components/RequestRejected.vue.js +22 -0
- package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
- package/dist/components/RequestSuccess.vue.js +13 -0
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
- package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
- package/dist/components/ResponseBody/helpers/media-types.js +130 -0
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
- package/dist/components/SearchPopover.vue.d.ts +2 -2
- package/dist/components/SearchPopover.vue.d.ts.map +1 -1
- package/dist/components/SearchPopover.vue.js +7 -0
- package/dist/components/SearchPopover.vue2.js +67 -0
- package/dist/components/Selector.vue.d.ts +24 -0
- package/dist/components/Selector.vue.d.ts.map +1 -0
- package/dist/components/Selector.vue.js +67 -0
- package/dist/components/Selector.vue2.js +4 -0
- package/dist/components/SendingRequest.vue.d.ts.map +1 -1
- package/dist/components/SendingRequest.vue.js +24 -0
- package/dist/components/ServerSelector.vue.d.ts +22 -0
- package/dist/components/ServerSelector.vue.d.ts.map +1 -0
- package/dist/components/ServerSelector.vue.js +57 -0
- package/dist/components/ServerSelector.vue2.js +4 -0
- package/dist/components/Suggestion.vue.d.ts.map +1 -1
- package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
- package/dist/components/UploadSection.vue.d.ts.map +1 -0
- package/dist/components/UploadSection.vue.js +7 -0
- package/dist/components/UploadSection.vue2.js +62 -0
- package/dist/entities/prompt/constants.d.ts +2 -0
- package/dist/entities/prompt/constants.d.ts.map +1 -0
- package/dist/entities/prompt/constants.js +4 -0
- package/dist/entities/registry/document.d.ts +21 -0
- package/dist/entities/registry/document.d.ts.map +1 -0
- package/dist/entities/registry/document.js +12 -0
- package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
- package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
- package/dist/entities/tools/ask-for-authentication.js +8 -0
- package/dist/entities/tools/constants.d.ts +2 -0
- package/dist/entities/tools/constants.d.ts.map +1 -0
- package/dist/entities/tools/constants.js +4 -0
- package/dist/entities/tools/execute-request.d.ts +42 -0
- package/dist/entities/tools/execute-request.d.ts.map +1 -0
- package/dist/entities/tools/execute-request.js +11 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
- package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
- package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
- package/dist/helpers.d.ts +20 -12
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +122 -0
- package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
- package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
- package/dist/hooks/use-chat-approvals.js +21 -0
- package/dist/hooks/use-chat-error.d.ts +14 -0
- package/dist/hooks/use-chat-error.d.ts.map +1 -0
- package/dist/hooks/use-chat-error.js +23 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
- package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
- package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
- package/dist/hooks/use-chat-scroll.js +16 -0
- package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
- package/dist/hooks/use-search.d.ts.map +1 -0
- package/dist/hooks/use-search.js +25 -0
- package/dist/hooks/use-term-and-conditions.d.ts +6 -0
- package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
- package/dist/hooks/use-term-and-conditions.js +16 -0
- package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
- package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
- package/dist/hooks/use-upload-tmp-document.js +64 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/package.json +34 -23
- package/dist/registry/add-documents-to-store.d.ts +6 -6
- package/dist/registry/add-documents-to-store.d.ts.map +1 -1
- package/dist/registry/add-documents-to-store.js +40 -0
- package/dist/registry/create-document-name.d.ts +2 -0
- package/dist/registry/create-document-name.d.ts.map +1 -0
- package/dist/registry/create-document-name.js +6 -0
- package/dist/state/state.d.ts +20 -8
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +110 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/views/Chat/Chat.vue.js +7 -0
- package/dist/views/Chat/Chat.vue2.js +77 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +93 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
- package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/Text.vue.js +16 -0
- package/dist/views/Chat/Messages/Text.vue2.js +4 -0
- package/dist/views/Layout.vue.d.ts.map +1 -1
- package/dist/views/Layout.vue.js +7 -0
- package/dist/views/Layout.vue2.js +23 -0
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +7 -0
- package/dist/views/PromptForm.vue2.js +212 -0
- package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
- package/dist/views/Settings/Auth.vue.js +67 -0
- package/dist/views/Settings/Auth.vue2.js +4 -0
- package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +7 -0
- package/dist/views/Settings/DocSettings.vue2.js +48 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.js +8 -0
- package/dist/views/Settings/Settings.vue2.js +67 -0
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.js +7 -0
- package/dist/views/Start.vue2.js +41 -0
- package/package.json +52 -7
- package/dist/Tooltip-Cm82QgNj.js +0 -575
- package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
- package/dist/_basePickBy-hHD8tMGb.js +0 -151
- package/dist/_baseUniq-DTF1wuF6.js +0 -614
- package/dist/arc-Dw2RQerU.js +0 -83
- package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
- package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
- package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
- package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
- package/dist/channel-105myCGU.js +0 -5
- package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
- package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
- package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
- package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
- package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
- package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
- package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
- package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
- package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
- package/dist/clone-CIIO71O9.js +0 -8
- package/dist/components/Endpoint.vue.d.ts.map +0 -1
- package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
- package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
- package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
- package/dist/defaultLocale-BEa-49Qz.js +0 -171
- package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
- package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
- package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
- package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
- package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
- package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
- package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
- package/dist/graph-Dth4IhEK.js +0 -247
- package/dist/hooks/useChatApprovals.d.ts.map +0 -1
- package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
- package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
- package/dist/hooks/useChatScroll.d.ts.map +0 -1
- package/dist/hooks/useSearch.d.ts.map +0 -1
- package/dist/index-BOvT43H8.js +0 -111780
- package/dist/index2-B36B-gt0.js +0 -69
- package/dist/index3-CtIyYUnG.js +0 -70
- package/dist/index4-Dzz91Ao2.js +0 -537
- package/dist/index5-Bmz0gMSP.js +0 -590
- package/dist/index6-DMB3qTSV.js +0 -196
- package/dist/info-NVLQJR56-azt5obk5.js +0 -27
- package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
- package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
- package/dist/katex-SsTUIUTC.js +0 -11688
- package/dist/layout-7TCY8eA2.js +0 -1332
- package/dist/linear-DSm5i91N.js +0 -625
- package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
- package/dist/mermaid.core-QjuzH7xx.js +0 -14164
- package/dist/mhchem-XHl7cef5.js +0 -2306
- package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
- package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
- package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
- package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
- package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
- package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
- package/dist/safeRaf-I3a3-dyJ.js +0 -10
- package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
- package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
- package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
- package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
- package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
- package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { _ as l, s as k, g as R, q as E, p as F, a as I, b as _, H as D, y as G, D as f, E as C, F as P, l as z, K as H } from "./mermaid.core-QjuzH7xx.js";
|
|
2
|
-
import { p as V } from "./chunk-4BX2VUAB-TAxJli7C.js";
|
|
3
|
-
import { p as W } from "./mermaid-parser.core-CUQWpAMM.js";
|
|
4
|
-
var x = {
|
|
5
|
-
showLegend: !0,
|
|
6
|
-
ticks: 5,
|
|
7
|
-
max: null,
|
|
8
|
-
min: 0,
|
|
9
|
-
graticule: "circle"
|
|
10
|
-
}, w = {
|
|
11
|
-
axes: [],
|
|
12
|
-
curves: [],
|
|
13
|
-
options: x
|
|
14
|
-
}, h = structuredClone(w), B = P.radar, j = /* @__PURE__ */ l(() => f({
|
|
15
|
-
...B,
|
|
16
|
-
...C().radar
|
|
17
|
-
}), "getConfig"), b = /* @__PURE__ */ l(() => h.axes, "getAxes"), q = /* @__PURE__ */ l(() => h.curves, "getCurves"), K = /* @__PURE__ */ l(() => h.options, "getOptions"), N = /* @__PURE__ */ l((a) => {
|
|
18
|
-
h.axes = a.map((t) => ({
|
|
19
|
-
name: t.name,
|
|
20
|
-
label: t.label ?? t.name
|
|
21
|
-
}));
|
|
22
|
-
}, "setAxes"), U = /* @__PURE__ */ l((a) => {
|
|
23
|
-
h.curves = a.map((t) => ({
|
|
24
|
-
name: t.name,
|
|
25
|
-
label: t.label ?? t.name,
|
|
26
|
-
entries: X(t.entries)
|
|
27
|
-
}));
|
|
28
|
-
}, "setCurves"), X = /* @__PURE__ */ l((a) => {
|
|
29
|
-
if (a[0].axis == null)
|
|
30
|
-
return a.map((e) => e.value);
|
|
31
|
-
const t = b();
|
|
32
|
-
if (t.length === 0)
|
|
33
|
-
throw new Error("Axes must be populated before curves for reference entries");
|
|
34
|
-
return t.map((e) => {
|
|
35
|
-
const r = a.find((s) => s.axis?.$refText === e.name);
|
|
36
|
-
if (r === void 0)
|
|
37
|
-
throw new Error("Missing entry for axis " + e.label);
|
|
38
|
-
return r.value;
|
|
39
|
-
});
|
|
40
|
-
}, "computeCurveEntries"), Y = /* @__PURE__ */ l((a) => {
|
|
41
|
-
const t = a.reduce(
|
|
42
|
-
(e, r) => (e[r.name] = r, e),
|
|
43
|
-
{}
|
|
44
|
-
);
|
|
45
|
-
h.options = {
|
|
46
|
-
showLegend: t.showLegend?.value ?? x.showLegend,
|
|
47
|
-
ticks: t.ticks?.value ?? x.ticks,
|
|
48
|
-
max: t.max?.value ?? x.max,
|
|
49
|
-
min: t.min?.value ?? x.min,
|
|
50
|
-
graticule: t.graticule?.value ?? x.graticule
|
|
51
|
-
};
|
|
52
|
-
}, "setOptions"), Z = /* @__PURE__ */ l(() => {
|
|
53
|
-
G(), h = structuredClone(w);
|
|
54
|
-
}, "clear"), $ = {
|
|
55
|
-
getAxes: b,
|
|
56
|
-
getCurves: q,
|
|
57
|
-
getOptions: K,
|
|
58
|
-
setAxes: N,
|
|
59
|
-
setCurves: U,
|
|
60
|
-
setOptions: Y,
|
|
61
|
-
getConfig: j,
|
|
62
|
-
clear: Z,
|
|
63
|
-
setAccTitle: _,
|
|
64
|
-
getAccTitle: I,
|
|
65
|
-
setDiagramTitle: F,
|
|
66
|
-
getDiagramTitle: E,
|
|
67
|
-
getAccDescription: R,
|
|
68
|
-
setAccDescription: k
|
|
69
|
-
}, J = /* @__PURE__ */ l((a) => {
|
|
70
|
-
V(a, $);
|
|
71
|
-
const { axes: t, curves: e, options: r } = a;
|
|
72
|
-
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
|
73
|
-
}, "populate"), Q = {
|
|
74
|
-
parse: /* @__PURE__ */ l(async (a) => {
|
|
75
|
-
const t = await W("radar", a);
|
|
76
|
-
z.debug(t), J(t);
|
|
77
|
-
}, "parse")
|
|
78
|
-
}, tt = /* @__PURE__ */ l((a, t, e, r) => {
|
|
79
|
-
const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p = D(t), u = et(p, c), g = n.max ?? Math.max(...i.map((y) => Math.max(...y.entries))), m = n.min, v = Math.min(c.width, c.height) / 2;
|
|
80
|
-
at(u, o, v, n.ticks, n.graticule), rt(u, o, v, c), M(u, o, i, m, g, n.graticule, c), T(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
|
81
|
-
}, "draw"), et = /* @__PURE__ */ l((a, t) => {
|
|
82
|
-
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
83
|
-
x: t.marginLeft + t.width / 2,
|
|
84
|
-
y: t.marginTop + t.height / 2
|
|
85
|
-
};
|
|
86
|
-
return a.attr("viewbox", `0 0 ${e} ${r}`).attr("width", e).attr("height", r), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
|
|
87
|
-
}, "drawFrame"), at = /* @__PURE__ */ l((a, t, e, r, s) => {
|
|
88
|
-
if (s === "circle")
|
|
89
|
-
for (let o = 0; o < r; o++) {
|
|
90
|
-
const i = e * (o + 1) / r;
|
|
91
|
-
a.append("circle").attr("r", i).attr("class", "radarGraticule");
|
|
92
|
-
}
|
|
93
|
-
else if (s === "polygon") {
|
|
94
|
-
const o = t.length;
|
|
95
|
-
for (let i = 0; i < r; i++) {
|
|
96
|
-
const n = e * (i + 1) / r, c = t.map((d, p) => {
|
|
97
|
-
const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), m = n * Math.sin(u);
|
|
98
|
-
return `${g},${m}`;
|
|
99
|
-
}).join(" ");
|
|
100
|
-
a.append("polygon").attr("points", c).attr("class", "radarGraticule");
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}, "drawGraticule"), rt = /* @__PURE__ */ l((a, t, e, r) => {
|
|
104
|
-
const s = t.length;
|
|
105
|
-
for (let o = 0; o < s; o++) {
|
|
106
|
-
const i = t[o].label, n = 2 * o * Math.PI / s - Math.PI / 2;
|
|
107
|
-
a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * Math.cos(n)).attr("y2", e * r.axisScaleFactor * Math.sin(n)).attr("class", "radarAxisLine"), a.append("text").text(i).attr("x", e * r.axisLabelFactor * Math.cos(n)).attr("y", e * r.axisLabelFactor * Math.sin(n)).attr("class", "radarAxisLabel");
|
|
108
|
-
}
|
|
109
|
-
}, "drawAxes");
|
|
110
|
-
function M(a, t, e, r, s, o, i) {
|
|
111
|
-
const n = t.length, c = Math.min(i.width, i.height) / 2;
|
|
112
|
-
e.forEach((d, p) => {
|
|
113
|
-
if (d.entries.length !== n)
|
|
114
|
-
return;
|
|
115
|
-
const u = d.entries.map((g, m) => {
|
|
116
|
-
const v = 2 * Math.PI * m / n - Math.PI / 2, y = A(g, r, s, c), O = y * Math.cos(v), S = y * Math.sin(v);
|
|
117
|
-
return { x: O, y: S };
|
|
118
|
-
});
|
|
119
|
-
o === "circle" ? a.append("path").attr("d", L(u, i.curveTension)).attr("class", `radarCurve-${p}`) : o === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
l(M, "drawCurves");
|
|
123
|
-
function A(a, t, e, r) {
|
|
124
|
-
const s = Math.min(Math.max(a, t), e);
|
|
125
|
-
return r * (s - t) / (e - t);
|
|
126
|
-
}
|
|
127
|
-
l(A, "relativeRadius");
|
|
128
|
-
function L(a, t) {
|
|
129
|
-
const e = a.length;
|
|
130
|
-
let r = `M${a[0].x},${a[0].y}`;
|
|
131
|
-
for (let s = 0; s < e; s++) {
|
|
132
|
-
const o = a[(s - 1 + e) % e], i = a[s], n = a[(s + 1) % e], c = a[(s + 2) % e], d = {
|
|
133
|
-
x: i.x + (n.x - o.x) * t,
|
|
134
|
-
y: i.y + (n.y - o.y) * t
|
|
135
|
-
}, p = {
|
|
136
|
-
x: n.x - (c.x - i.x) * t,
|
|
137
|
-
y: n.y - (c.y - i.y) * t
|
|
138
|
-
};
|
|
139
|
-
r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
|
|
140
|
-
}
|
|
141
|
-
return `${r} Z`;
|
|
142
|
-
}
|
|
143
|
-
l(L, "closedRoundCurve");
|
|
144
|
-
function T(a, t, e, r) {
|
|
145
|
-
if (!e)
|
|
146
|
-
return;
|
|
147
|
-
const s = (r.width / 2 + r.marginRight) * 3 / 4, o = -(r.height / 2 + r.marginTop) * 3 / 4, i = 20;
|
|
148
|
-
t.forEach((n, c) => {
|
|
149
|
-
const d = a.append("g").attr("transform", `translate(${s}, ${o + c * i})`);
|
|
150
|
-
d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${c}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
l(T, "drawLegend");
|
|
154
|
-
var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
|
|
155
|
-
let e = "";
|
|
156
|
-
for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
|
|
157
|
-
const s = a[`cScale${r}`];
|
|
158
|
-
e += `
|
|
159
|
-
.radarCurve-${r} {
|
|
160
|
-
color: ${s};
|
|
161
|
-
fill: ${s};
|
|
162
|
-
fill-opacity: ${t.curveOpacity};
|
|
163
|
-
stroke: ${s};
|
|
164
|
-
stroke-width: ${t.curveStrokeWidth};
|
|
165
|
-
}
|
|
166
|
-
.radarLegendBox-${r} {
|
|
167
|
-
fill: ${s};
|
|
168
|
-
fill-opacity: ${t.curveOpacity};
|
|
169
|
-
stroke: ${s};
|
|
170
|
-
}
|
|
171
|
-
`;
|
|
172
|
-
}
|
|
173
|
-
return e;
|
|
174
|
-
}, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
|
|
175
|
-
const t = H(), e = C(), r = f(t, e.themeVariables), s = f(r.radar, a);
|
|
176
|
-
return { themeVariables: r, radarOptions: s };
|
|
177
|
-
}, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
|
|
178
|
-
const { themeVariables: t, radarOptions: e } = ot(a);
|
|
179
|
-
return `
|
|
180
|
-
.radarTitle {
|
|
181
|
-
font-size: ${t.fontSize};
|
|
182
|
-
color: ${t.titleColor};
|
|
183
|
-
dominant-baseline: hanging;
|
|
184
|
-
text-anchor: middle;
|
|
185
|
-
}
|
|
186
|
-
.radarAxisLine {
|
|
187
|
-
stroke: ${e.axisColor};
|
|
188
|
-
stroke-width: ${e.axisStrokeWidth};
|
|
189
|
-
}
|
|
190
|
-
.radarAxisLabel {
|
|
191
|
-
dominant-baseline: middle;
|
|
192
|
-
text-anchor: middle;
|
|
193
|
-
font-size: ${e.axisLabelFontSize}px;
|
|
194
|
-
color: ${e.axisColor};
|
|
195
|
-
}
|
|
196
|
-
.radarGraticule {
|
|
197
|
-
fill: ${e.graticuleColor};
|
|
198
|
-
fill-opacity: ${e.graticuleOpacity};
|
|
199
|
-
stroke: ${e.graticuleColor};
|
|
200
|
-
stroke-width: ${e.graticuleStrokeWidth};
|
|
201
|
-
}
|
|
202
|
-
.radarLegendText {
|
|
203
|
-
text-anchor: start;
|
|
204
|
-
font-size: ${e.legendFontSize}px;
|
|
205
|
-
dominant-baseline: hanging;
|
|
206
|
-
}
|
|
207
|
-
${nt(t, e)}
|
|
208
|
-
`;
|
|
209
|
-
}, "styles"), ut = {
|
|
210
|
-
parser: Q,
|
|
211
|
-
db: $,
|
|
212
|
-
renderer: st,
|
|
213
|
-
styles: it
|
|
214
|
-
};
|
|
215
|
-
export {
|
|
216
|
-
ut as diagram
|
|
217
|
-
};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { _ as b, D as m, H as B, e as C, l as w, b as S, a as D, p as T, q as E, g as F, s as P, E as z, F as A, y as W } from "./mermaid.core-QjuzH7xx.js";
|
|
2
|
-
import { p as _ } from "./chunk-4BX2VUAB-TAxJli7C.js";
|
|
3
|
-
import { p as N } from "./mermaid-parser.core-CUQWpAMM.js";
|
|
4
|
-
var L = A.packet, u, v = (u = class {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.packet = [], this.setAccTitle = S, this.getAccTitle = D, this.setDiagramTitle = T, this.getDiagramTitle = E, this.getAccDescription = F, this.setAccDescription = P;
|
|
7
|
-
}
|
|
8
|
-
getConfig() {
|
|
9
|
-
const t = m({
|
|
10
|
-
...L,
|
|
11
|
-
...z().packet
|
|
12
|
-
});
|
|
13
|
-
return t.showBits && (t.paddingY += 10), t;
|
|
14
|
-
}
|
|
15
|
-
getPacket() {
|
|
16
|
-
return this.packet;
|
|
17
|
-
}
|
|
18
|
-
pushWord(t) {
|
|
19
|
-
t.length > 0 && this.packet.push(t);
|
|
20
|
-
}
|
|
21
|
-
clear() {
|
|
22
|
-
W(), this.packet = [];
|
|
23
|
-
}
|
|
24
|
-
}, b(u, "PacketDB"), u), M = 1e4, Y = /* @__PURE__ */ b((e, t) => {
|
|
25
|
-
_(e, t);
|
|
26
|
-
let r = -1, s = [], n = 1;
|
|
27
|
-
const { bitsPerRow: l } = t.getConfig();
|
|
28
|
-
for (let { start: a, end: i, bits: d, label: c } of e.blocks) {
|
|
29
|
-
if (a !== void 0 && i !== void 0 && i < a)
|
|
30
|
-
throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);
|
|
31
|
-
if (a ??= r + 1, a !== r + 1)
|
|
32
|
-
throw new Error(
|
|
33
|
-
`Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${r + 1}.`
|
|
34
|
-
);
|
|
35
|
-
if (d === 0)
|
|
36
|
-
throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
|
|
37
|
-
for (i ??= a + (d ?? 1) - 1, d ??= i - a + 1, r = i, w.debug(`Packet block ${a} - ${r} with label ${c}`); s.length <= l + 1 && t.getPacket().length < M; ) {
|
|
38
|
-
const [p, o] = H({ start: a, end: i, bits: d, label: c }, n, l);
|
|
39
|
-
if (s.push(p), p.end + 1 === n * l && (t.pushWord(s), s = [], n++), !o)
|
|
40
|
-
break;
|
|
41
|
-
({ start: a, end: i, bits: d, label: c } = o);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
t.pushWord(s);
|
|
45
|
-
}, "populate"), H = /* @__PURE__ */ b((e, t, r) => {
|
|
46
|
-
if (e.start === void 0)
|
|
47
|
-
throw new Error("start should have been set during first phase");
|
|
48
|
-
if (e.end === void 0)
|
|
49
|
-
throw new Error("end should have been set during first phase");
|
|
50
|
-
if (e.start > e.end)
|
|
51
|
-
throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);
|
|
52
|
-
if (e.end + 1 <= t * r)
|
|
53
|
-
return [e, void 0];
|
|
54
|
-
const s = t * r - 1, n = t * r;
|
|
55
|
-
return [
|
|
56
|
-
{
|
|
57
|
-
start: e.start,
|
|
58
|
-
end: s,
|
|
59
|
-
label: e.label,
|
|
60
|
-
bits: s - e.start
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
start: n,
|
|
64
|
-
end: e.end,
|
|
65
|
-
label: e.label,
|
|
66
|
-
bits: e.end - n
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
}, "getNextFittingBlock"), x = {
|
|
70
|
-
// @ts-expect-error - PacketDB is not assignable to DiagramDB
|
|
71
|
-
parser: { yy: void 0 },
|
|
72
|
-
parse: /* @__PURE__ */ b(async (e) => {
|
|
73
|
-
const t = await N("packet", e), r = x.parser?.yy;
|
|
74
|
-
if (!(r instanceof v))
|
|
75
|
-
throw new Error(
|
|
76
|
-
"parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
|
|
77
|
-
);
|
|
78
|
-
w.debug(t), Y(t, r);
|
|
79
|
-
}, "parse")
|
|
80
|
-
}, I = /* @__PURE__ */ b((e, t, r, s) => {
|
|
81
|
-
const n = s.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = B(t);
|
|
82
|
-
f.attr("viewbox", `0 0 ${k} ${g}`), C(f, g, k, l.useMaxWidth);
|
|
83
|
-
for (const [y, $] of p.entries())
|
|
84
|
-
O(f, $, y, l);
|
|
85
|
-
f.append("text").text(o).attr("x", k / 2).attr("y", g - h / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
86
|
-
}, "draw"), O = /* @__PURE__ */ b((e, t, r, { rowHeight: s, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
|
|
87
|
-
const c = e.append("g"), p = r * (s + l) + l;
|
|
88
|
-
for (const o of t) {
|
|
89
|
-
const h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
|
|
90
|
-
if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", s).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 2).attr("y", p + s / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
|
|
91
|
-
continue;
|
|
92
|
-
const k = o.end === o.start, f = p - 2;
|
|
93
|
-
c.append("text").attr("x", h + (k ? g / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(o.start), k || c.append("text").attr("x", h + g).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);
|
|
94
|
-
}
|
|
95
|
-
}, "drawWord"), j = { draw: I }, q = {
|
|
96
|
-
byteFontSize: "10px",
|
|
97
|
-
startByteColor: "black",
|
|
98
|
-
endByteColor: "black",
|
|
99
|
-
labelColor: "black",
|
|
100
|
-
labelFontSize: "12px",
|
|
101
|
-
titleColor: "black",
|
|
102
|
-
titleFontSize: "14px",
|
|
103
|
-
blockStrokeColor: "black",
|
|
104
|
-
blockStrokeWidth: "1",
|
|
105
|
-
blockFillColor: "#efefef"
|
|
106
|
-
}, G = /* @__PURE__ */ b(({ packet: e } = {}) => {
|
|
107
|
-
const t = m(q, e);
|
|
108
|
-
return `
|
|
109
|
-
.packetByte {
|
|
110
|
-
font-size: ${t.byteFontSize};
|
|
111
|
-
}
|
|
112
|
-
.packetByte.start {
|
|
113
|
-
fill: ${t.startByteColor};
|
|
114
|
-
}
|
|
115
|
-
.packetByte.end {
|
|
116
|
-
fill: ${t.endByteColor};
|
|
117
|
-
}
|
|
118
|
-
.packetLabel {
|
|
119
|
-
fill: ${t.labelColor};
|
|
120
|
-
font-size: ${t.labelFontSize};
|
|
121
|
-
}
|
|
122
|
-
.packetTitle {
|
|
123
|
-
fill: ${t.titleColor};
|
|
124
|
-
font-size: ${t.titleFontSize};
|
|
125
|
-
}
|
|
126
|
-
.packetBlock {
|
|
127
|
-
stroke: ${t.blockStrokeColor};
|
|
128
|
-
stroke-width: ${t.blockStrokeWidth};
|
|
129
|
-
fill: ${t.blockFillColor};
|
|
130
|
-
}
|
|
131
|
-
`;
|
|
132
|
-
}, "styles"), X = {
|
|
133
|
-
parser: x,
|
|
134
|
-
get db() {
|
|
135
|
-
return new v();
|
|
136
|
-
},
|
|
137
|
-
renderer: j,
|
|
138
|
-
styles: G
|
|
139
|
-
};
|
|
140
|
-
export {
|
|
141
|
-
X as diagram
|
|
142
|
-
};
|