@scalar/agent-chat 0.2.1 → 0.2.3
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/dist/App.vue.d.ts +6 -1
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Tooltip-Cm82QgNj.js +575 -0
- package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +5 -0
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +5 -0
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +5 -0
- package/dist/_basePickBy-hHD8tMGb.js +151 -0
- package/dist/_baseUniq-DTF1wuF6.js +614 -0
- package/dist/arc-Dw2RQerU.js +83 -0
- package/dist/architecture-U656AL7Q-B00Z9eXr.js +36 -0
- package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +4662 -0
- package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +2261 -0
- package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +1579 -0
- package/dist/channel-105myCGU.js +5 -0
- package/dist/chunk-4BX2VUAB-TAxJli7C.js +8 -0
- package/dist/chunk-55IACEB6-VXFJ4bz5.js +8 -0
- package/dist/chunk-B4BG7PRW-CZDQpfj5.js +1375 -0
- package/dist/chunk-DI55MBZ5-D3l7TA-E.js +1370 -0
- package/dist/chunk-FMBD7UC4-BMXFm8I3.js +19 -0
- package/dist/chunk-QN33PNHL-BOUpbpWp.js +19 -0
- package/dist/chunk-QZHKN3VN-C-TEEx05.js +15 -0
- package/dist/chunk-TZMSLE5B-BUiROKNR.js +64 -0
- package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +16 -0
- package/dist/clone-CIIO71O9.js +8 -0
- package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.d.ts +9 -0
- package/dist/components/PaymentSection.vue.d.ts.map +1 -0
- package/dist/components/RequestPreview.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +2609 -0
- package/dist/cytoscape.esm-DfdJODL8.js +18735 -0
- package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +444 -0
- package/dist/defaultLocale-BEa-49Qz.js +171 -0
- package/dist/diagram-PSM6KHXK-1xyGntw2.js +531 -0
- package/dist/diagram-QEK2KX5R-DdZdlAm1.js +217 -0
- package/dist/diagram-S2PKOQOG-C80Eo2jp.js +142 -0
- package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +841 -0
- package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +1620 -0
- package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +2506 -0
- package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +27 -0
- package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +699 -0
- package/dist/graph-Dth4IhEK.js +247 -0
- package/dist/helpers.d.ts +1 -1
- package/dist/hooks/useSearch.d.ts.map +1 -1
- package/dist/index-BOvT43H8.js +111780 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/index2-B36B-gt0.js +69 -0
- package/dist/index3-CtIyYUnG.js +70 -0
- package/dist/index4-Dzz91Ao2.js +537 -0
- package/dist/index5-Bmz0gMSP.js +590 -0
- package/dist/index6-DMB3qTSV.js +196 -0
- package/dist/info-NVLQJR56-azt5obk5.js +27 -0
- package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +24 -0
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +5 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +834 -0
- package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +719 -0
- package/dist/katex-SsTUIUTC.js +11688 -0
- package/dist/layout-7TCY8eA2.js +1332 -0
- package/dist/linear-DSm5i91N.js +625 -0
- package/dist/mermaid-parser.core-CUQWpAMM.js +12746 -0
- package/dist/mermaid.core-QjuzH7xx.js +14164 -0
- package/dist/mhchem-XHl7cef5.js +2306 -0
- package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +784 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/package.json +2 -2
- package/dist/packet-BFZMPI3H-CixuxAEA.js +27 -0
- package/dist/pie-7BOR55EZ-D3cgnzR1.js +32 -0
- package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +161 -0
- package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +1022 -0
- package/dist/radar-NHE76QYJ-DhV0Od_M.js +27 -0
- package/dist/registry/add-documents-to-store.d.ts +3 -2
- package/dist/registry/add-documents-to-store.d.ts.map +1 -1
- package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +850 -0
- package/dist/safeRaf-I3a3-dyJ.js +10 -0
- package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +810 -0
- package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +2511 -0
- package/dist/state/state.d.ts +7 -3
- package/dist/state/state.d.ts.map +1 -1
- package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +16 -0
- package/dist/style.css +1 -12713
- package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +795 -0
- package/dist/treemap-KMMF4GRG-CQbPsyWe.js +81 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +1 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +1 -1
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +1340 -0
- package/package.json +1 -1
- package/dist/App.vue.js +0 -29
- package/dist/App.vue.js.map +0 -1
- package/dist/App.vue2.js +0 -5
- package/dist/App.vue2.js.map +0 -1
- package/dist/Chat.vue.js +0 -55
- package/dist/Chat.vue.js.map +0 -1
- package/dist/Chat.vue2.js +0 -5
- package/dist/Chat.vue2.js.map +0 -1
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -11
- package/dist/_virtual/_plugin-vue_export-helper.js.map +0 -1
- package/dist/components/ApprovalSection.vue.js +0 -8
- package/dist/components/ApprovalSection.vue.js.map +0 -1
- package/dist/components/ApprovalSection.vue2.js +0 -47
- package/dist/components/ApprovalSection.vue2.js.map +0 -1
- package/dist/components/AutosendPaused.vue.js +0 -15
- package/dist/components/AutosendPaused.vue.js.map +0 -1
- package/dist/components/ContextItem.vue.js +0 -8
- package/dist/components/ContextItem.vue.js.map +0 -1
- package/dist/components/ContextItem.vue2.js +0 -22
- package/dist/components/ContextItem.vue2.js.map +0 -1
- package/dist/components/Endpoint.vue.js +0 -8
- package/dist/components/Endpoint.vue.js.map +0 -1
- package/dist/components/Endpoint.vue2.js +0 -98
- package/dist/components/Endpoint.vue2.js.map +0 -1
- package/dist/components/ErrorMessage.vue.js +0 -8
- package/dist/components/ErrorMessage.vue.js.map +0 -1
- package/dist/components/ErrorMessage.vue2.js +0 -28
- package/dist/components/ErrorMessage.vue2.js.map +0 -1
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +0 -16
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js.map +0 -1
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +0 -16
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js.map +0 -1
- package/dist/components/Logo.vue.js +0 -25
- package/dist/components/Logo.vue.js.map +0 -1
- package/dist/components/RequestApproved.vue.js +0 -15
- package/dist/components/RequestApproved.vue.js.map +0 -1
- package/dist/components/RequestFailed.vue.js +0 -26
- package/dist/components/RequestFailed.vue.js.map +0 -1
- package/dist/components/RequestPreview.vue.js +0 -9
- package/dist/components/RequestPreview.vue.js.map +0 -1
- package/dist/components/RequestPreview.vue2.js +0 -150
- package/dist/components/RequestPreview.vue2.js.map +0 -1
- package/dist/components/RequestRejected.vue.js +0 -24
- package/dist/components/RequestRejected.vue.js.map +0 -1
- package/dist/components/RequestSuccess.vue.js +0 -15
- package/dist/components/RequestSuccess.vue.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBody.vue.js +0 -45
- package/dist/components/ResponseBody/ResponseBody.vue.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBody.vue2.js +0 -5
- package/dist/components/ResponseBody/ResponseBody.vue2.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +0 -17
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +0 -8
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +0 -73
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +0 -23
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +0 -5
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +0 -30
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js.map +0 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +0 -5
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js.map +0 -1
- package/dist/components/ResponseBody/helpers/media-types.js +0 -134
- package/dist/components/ResponseBody/helpers/media-types.js.map +0 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +0 -63
- package/dist/components/ResponseBody/helpers/process-response-body.js.map +0 -1
- package/dist/components/SearchPopover.vue.js +0 -8
- package/dist/components/SearchPopover.vue.js.map +0 -1
- package/dist/components/SearchPopover.vue2.js +0 -78
- package/dist/components/SearchPopover.vue2.js.map +0 -1
- package/dist/components/SendingRequest.vue.js +0 -26
- package/dist/components/SendingRequest.vue.js.map +0 -1
- package/dist/components/Suggestion.vue.js +0 -8
- package/dist/components/Suggestion.vue.js.map +0 -1
- package/dist/components/Suggestion.vue2.js +0 -28
- package/dist/components/Suggestion.vue2.js.map +0 -1
- package/dist/components/TestRequestButton.vue.js +0 -8
- package/dist/components/TestRequestButton.vue.js.map +0 -1
- package/dist/components/TestRequestButton.vue2.js +0 -37
- package/dist/components/TestRequestButton.vue2.js.map +0 -1
- package/dist/helpers.js +0 -201
- package/dist/helpers.js.map +0 -1
- package/dist/hooks/useChatApprovals.js +0 -25
- package/dist/hooks/useChatApprovals.js.map +0 -1
- package/dist/hooks/useChatOperationBlocks.js +0 -29
- package/dist/hooks/useChatOperationBlocks.js.map +0 -1
- package/dist/hooks/useChatScroll.js +0 -22
- package/dist/hooks/useChatScroll.js.map +0 -1
- package/dist/hooks/useSearch.js +0 -36
- package/dist/hooks/useSearch.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.js +0 -12
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.js +0 -67
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.js +0 -25
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/parse.js +0 -64
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/parse.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/regexes.js +0 -8
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/regexes.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.js +0 -181
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.js +0 -85
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.js +0 -9
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.js.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/schemas.js +0 -61
- package/dist/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/mini/schemas.js.map +0 -1
- package/dist/registry/add-documents-to-store.js +0 -42
- package/dist/registry/add-documents-to-store.js.map +0 -1
- package/dist/state/state.js +0 -112
- package/dist/state/state.js.map +0 -1
- package/dist/views/Chat/Chat.vue.js +0 -8
- package/dist/views/Chat/Chat.vue.js.map +0 -1
- package/dist/views/Chat/Chat.vue2.js +0 -84
- package/dist/views/Chat/Chat.vue2.js.map +0 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +0 -8
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js.map +0 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +0 -39
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js.map +0 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +0 -8
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js.map +0 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +0 -65
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js.map +0 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +0 -32
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js.map +0 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +0 -5
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js.map +0 -1
- package/dist/views/Chat/Messages/Text.vue.js +0 -21
- package/dist/views/Chat/Messages/Text.vue.js.map +0 -1
- package/dist/views/Chat/Messages/Text.vue2.js +0 -5
- package/dist/views/Chat/Messages/Text.vue2.js.map +0 -1
- package/dist/views/Layout.vue.js +0 -8
- package/dist/views/Layout.vue.js.map +0 -1
- package/dist/views/Layout.vue2.js +0 -28
- package/dist/views/Layout.vue2.js.map +0 -1
- package/dist/views/PromptForm.vue.js +0 -8
- package/dist/views/PromptForm.vue.js.map +0 -1
- package/dist/views/PromptForm.vue2.js +0 -182
- package/dist/views/PromptForm.vue2.js.map +0 -1
- package/dist/views/Settings/Auth.vue.js +0 -66
- package/dist/views/Settings/Auth.vue.js.map +0 -1
- package/dist/views/Settings/Auth.vue2.js +0 -5
- package/dist/views/Settings/Auth.vue2.js.map +0 -1
- package/dist/views/Settings/DocSettings.vue.js +0 -8
- package/dist/views/Settings/DocSettings.vue.js.map +0 -1
- package/dist/views/Settings/DocSettings.vue2.js +0 -50
- package/dist/views/Settings/DocSettings.vue2.js.map +0 -1
- package/dist/views/Settings/Settings.vue.js +0 -9
- package/dist/views/Settings/Settings.vue.js.map +0 -1
- package/dist/views/Settings/Settings.vue2.js +0 -78
- package/dist/views/Settings/Settings.vue2.js.map +0 -1
- package/dist/views/Start.vue.js +0 -8
- package/dist/views/Start.vue.js.map +0 -1
- package/dist/views/Start.vue2.js +0 -56
- package/dist/views/Start.vue2.js.map +0 -1
|
@@ -0,0 +1,784 @@
|
|
|
1
|
+
import { g as le } from "./chunk-55IACEB6-VXFJ4bz5.js";
|
|
2
|
+
import { s as he } from "./chunk-QN33PNHL-BOUpbpWp.js";
|
|
3
|
+
import { _ as l, l as I, o as de, r as ge, F, c as W, i as V, aH as ue, W as pe, X as fe, Y as ye } from "./mermaid.core-QjuzH7xx.js";
|
|
4
|
+
const E = [];
|
|
5
|
+
for (let t = 0; t < 256; ++t)
|
|
6
|
+
E.push((t + 256).toString(16).slice(1));
|
|
7
|
+
function me(t, e = 0) {
|
|
8
|
+
return (E[t[e + 0]] + E[t[e + 1]] + E[t[e + 2]] + E[t[e + 3]] + "-" + E[t[e + 4]] + E[t[e + 5]] + "-" + E[t[e + 6]] + E[t[e + 7]] + "-" + E[t[e + 8]] + E[t[e + 9]] + "-" + E[t[e + 10]] + E[t[e + 11]] + E[t[e + 12]] + E[t[e + 13]] + E[t[e + 14]] + E[t[e + 15]]).toLowerCase();
|
|
9
|
+
}
|
|
10
|
+
let z;
|
|
11
|
+
const Ee = new Uint8Array(16);
|
|
12
|
+
function _e() {
|
|
13
|
+
if (!z) {
|
|
14
|
+
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
15
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
16
|
+
z = crypto.getRandomValues.bind(crypto);
|
|
17
|
+
}
|
|
18
|
+
return z(Ee);
|
|
19
|
+
}
|
|
20
|
+
const be = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ne = { randomUUID: be };
|
|
21
|
+
function Se(t, e, n) {
|
|
22
|
+
if (ne.randomUUID && !t)
|
|
23
|
+
return ne.randomUUID();
|
|
24
|
+
t = t || {};
|
|
25
|
+
const c = t.random ?? t.rng?.() ?? _e();
|
|
26
|
+
if (c.length < 16)
|
|
27
|
+
throw new Error("Random bytes length must be >= 16");
|
|
28
|
+
return c[6] = c[6] & 15 | 64, c[8] = c[8] & 63 | 128, me(c);
|
|
29
|
+
}
|
|
30
|
+
var X = (function() {
|
|
31
|
+
var t = /* @__PURE__ */ l(function(x, s, i, o) {
|
|
32
|
+
for (i = i || {}, o = x.length; o--; i[x[o]] = s) ;
|
|
33
|
+
return i;
|
|
34
|
+
}, "o"), e = [1, 4], n = [1, 13], c = [1, 12], f = [1, 15], h = [1, 16], p = [1, 20], m = [1, 19], u = [6, 7, 8], N = [1, 26], Y = [1, 24], q = [1, 25], b = [6, 7, 11], J = [1, 6, 13, 15, 16, 19, 22], K = [1, 33], Q = [1, 34], R = [1, 6, 7, 11, 13, 15, 16, 19, 22], B = {
|
|
35
|
+
trace: /* @__PURE__ */ l(function() {
|
|
36
|
+
}, "trace"),
|
|
37
|
+
yy: {},
|
|
38
|
+
symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
|
|
39
|
+
terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
|
|
40
|
+
productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
|
|
41
|
+
performAction: /* @__PURE__ */ l(function(s, i, o, a, g, r, w) {
|
|
42
|
+
var d = r.length - 1;
|
|
43
|
+
switch (g) {
|
|
44
|
+
case 6:
|
|
45
|
+
case 7:
|
|
46
|
+
return a;
|
|
47
|
+
case 8:
|
|
48
|
+
a.getLogger().trace("Stop NL ");
|
|
49
|
+
break;
|
|
50
|
+
case 9:
|
|
51
|
+
a.getLogger().trace("Stop EOF ");
|
|
52
|
+
break;
|
|
53
|
+
case 11:
|
|
54
|
+
a.getLogger().trace("Stop NL2 ");
|
|
55
|
+
break;
|
|
56
|
+
case 12:
|
|
57
|
+
a.getLogger().trace("Stop EOF2 ");
|
|
58
|
+
break;
|
|
59
|
+
case 15:
|
|
60
|
+
a.getLogger().info("Node: ", r[d].id), a.addNode(r[d - 1].length, r[d].id, r[d].descr, r[d].type);
|
|
61
|
+
break;
|
|
62
|
+
case 16:
|
|
63
|
+
a.getLogger().trace("Icon: ", r[d]), a.decorateNode({ icon: r[d] });
|
|
64
|
+
break;
|
|
65
|
+
case 17:
|
|
66
|
+
case 21:
|
|
67
|
+
a.decorateNode({ class: r[d] });
|
|
68
|
+
break;
|
|
69
|
+
case 18:
|
|
70
|
+
a.getLogger().trace("SPACELIST");
|
|
71
|
+
break;
|
|
72
|
+
case 19:
|
|
73
|
+
a.getLogger().trace("Node: ", r[d].id), a.addNode(0, r[d].id, r[d].descr, r[d].type);
|
|
74
|
+
break;
|
|
75
|
+
case 20:
|
|
76
|
+
a.decorateNode({ icon: r[d] });
|
|
77
|
+
break;
|
|
78
|
+
case 25:
|
|
79
|
+
a.getLogger().trace("node found ..", r[d - 2]), this.$ = { id: r[d - 1], descr: r[d - 1], type: a.getType(r[d - 2], r[d]) };
|
|
80
|
+
break;
|
|
81
|
+
case 26:
|
|
82
|
+
this.$ = { id: r[d], descr: r[d], type: a.nodeType.DEFAULT };
|
|
83
|
+
break;
|
|
84
|
+
case 27:
|
|
85
|
+
a.getLogger().trace("node found ..", r[d - 3]), this.$ = { id: r[d - 3], descr: r[d - 1], type: a.getType(r[d - 2], r[d]) };
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}, "anonymous"),
|
|
89
|
+
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: e }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: e }, { 6: n, 7: [1, 10], 9: 9, 12: 11, 13: c, 14: 14, 15: f, 16: h, 17: 17, 18: 18, 19: p, 22: m }, t(u, [2, 3]), { 1: [2, 2] }, t(u, [2, 4]), t(u, [2, 5]), { 1: [2, 6], 6: n, 12: 21, 13: c, 14: 14, 15: f, 16: h, 17: 17, 18: 18, 19: p, 22: m }, { 6: n, 9: 22, 12: 11, 13: c, 14: 14, 15: f, 16: h, 17: 17, 18: 18, 19: p, 22: m }, { 6: N, 7: Y, 10: 23, 11: q }, t(b, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: p, 22: m }), t(b, [2, 18]), t(b, [2, 19]), t(b, [2, 20]), t(b, [2, 21]), t(b, [2, 23]), t(b, [2, 24]), t(b, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: N, 7: Y, 10: 32, 11: q }, { 1: [2, 7], 6: n, 12: 21, 13: c, 14: 14, 15: f, 16: h, 17: 17, 18: 18, 19: p, 22: m }, t(J, [2, 14], { 7: K, 11: Q }), t(R, [2, 8]), t(R, [2, 9]), t(R, [2, 10]), t(b, [2, 15]), t(b, [2, 16]), t(b, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, t(J, [2, 13], { 7: K, 11: Q }), t(R, [2, 11]), t(R, [2, 12]), { 21: [1, 37] }, t(b, [2, 25]), t(b, [2, 27])],
|
|
90
|
+
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
|
91
|
+
parseError: /* @__PURE__ */ l(function(s, i) {
|
|
92
|
+
if (i.recoverable)
|
|
93
|
+
this.trace(s);
|
|
94
|
+
else {
|
|
95
|
+
var o = new Error(s);
|
|
96
|
+
throw o.hash = i, o;
|
|
97
|
+
}
|
|
98
|
+
}, "parseError"),
|
|
99
|
+
parse: /* @__PURE__ */ l(function(s) {
|
|
100
|
+
var i = this, o = [0], a = [], g = [null], r = [], w = this.table, d = "", U = 0, Z = 0, re = 2, ee = 1, oe = r.slice.call(arguments, 1), y = Object.create(this.lexer), v = { yy: {} };
|
|
101
|
+
for (var j in this.yy)
|
|
102
|
+
Object.prototype.hasOwnProperty.call(this.yy, j) && (v.yy[j] = this.yy[j]);
|
|
103
|
+
y.setInput(s, v.yy), v.yy.lexer = y, v.yy.parser = this, typeof y.yylloc > "u" && (y.yylloc = {});
|
|
104
|
+
var G = y.yylloc;
|
|
105
|
+
r.push(G);
|
|
106
|
+
var ae = y.options && y.options.ranges;
|
|
107
|
+
typeof v.yy.parseError == "function" ? this.parseError = v.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
108
|
+
function ce(S) {
|
|
109
|
+
o.length = o.length - 2 * S, g.length = g.length - S, r.length = r.length - S;
|
|
110
|
+
}
|
|
111
|
+
l(ce, "popStack");
|
|
112
|
+
function te() {
|
|
113
|
+
var S;
|
|
114
|
+
return S = a.pop() || y.lex() || ee, typeof S != "number" && (S instanceof Array && (a = S, S = a.pop()), S = i.symbols_[S] || S), S;
|
|
115
|
+
}
|
|
116
|
+
l(te, "lex");
|
|
117
|
+
for (var _, T, D, H, O = {}, P, k, ie, M; ; ) {
|
|
118
|
+
if (T = o[o.length - 1], this.defaultActions[T] ? D = this.defaultActions[T] : ((_ === null || typeof _ > "u") && (_ = te()), D = w[T] && w[T][_]), typeof D > "u" || !D.length || !D[0]) {
|
|
119
|
+
var $ = "";
|
|
120
|
+
M = [];
|
|
121
|
+
for (P in w[T])
|
|
122
|
+
this.terminals_[P] && P > re && M.push("'" + this.terminals_[P] + "'");
|
|
123
|
+
y.showPosition ? $ = "Parse error on line " + (U + 1) + `:
|
|
124
|
+
` + y.showPosition() + `
|
|
125
|
+
Expecting ` + M.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : $ = "Parse error on line " + (U + 1) + ": Unexpected " + (_ == ee ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError($, {
|
|
126
|
+
text: y.match,
|
|
127
|
+
token: this.terminals_[_] || _,
|
|
128
|
+
line: y.yylineno,
|
|
129
|
+
loc: G,
|
|
130
|
+
expected: M
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
if (D[0] instanceof Array && D.length > 1)
|
|
134
|
+
throw new Error("Parse Error: multiple actions possible at state: " + T + ", token: " + _);
|
|
135
|
+
switch (D[0]) {
|
|
136
|
+
case 1:
|
|
137
|
+
o.push(_), g.push(y.yytext), r.push(y.yylloc), o.push(D[1]), _ = null, Z = y.yyleng, d = y.yytext, U = y.yylineno, G = y.yylloc;
|
|
138
|
+
break;
|
|
139
|
+
case 2:
|
|
140
|
+
if (k = this.productions_[D[1]][1], O.$ = g[g.length - k], O._$ = {
|
|
141
|
+
first_line: r[r.length - (k || 1)].first_line,
|
|
142
|
+
last_line: r[r.length - 1].last_line,
|
|
143
|
+
first_column: r[r.length - (k || 1)].first_column,
|
|
144
|
+
last_column: r[r.length - 1].last_column
|
|
145
|
+
}, ae && (O._$.range = [
|
|
146
|
+
r[r.length - (k || 1)].range[0],
|
|
147
|
+
r[r.length - 1].range[1]
|
|
148
|
+
]), H = this.performAction.apply(O, [
|
|
149
|
+
d,
|
|
150
|
+
Z,
|
|
151
|
+
U,
|
|
152
|
+
v.yy,
|
|
153
|
+
D[1],
|
|
154
|
+
g,
|
|
155
|
+
r
|
|
156
|
+
].concat(oe)), typeof H < "u")
|
|
157
|
+
return H;
|
|
158
|
+
k && (o = o.slice(0, -1 * k * 2), g = g.slice(0, -1 * k), r = r.slice(0, -1 * k)), o.push(this.productions_[D[1]][0]), g.push(O.$), r.push(O._$), ie = w[o[o.length - 2]][o[o.length - 1]], o.push(ie);
|
|
159
|
+
break;
|
|
160
|
+
case 3:
|
|
161
|
+
return !0;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return !0;
|
|
165
|
+
}, "parse")
|
|
166
|
+
}, se = /* @__PURE__ */ (function() {
|
|
167
|
+
var x = {
|
|
168
|
+
EOF: 1,
|
|
169
|
+
parseError: /* @__PURE__ */ l(function(i, o) {
|
|
170
|
+
if (this.yy.parser)
|
|
171
|
+
this.yy.parser.parseError(i, o);
|
|
172
|
+
else
|
|
173
|
+
throw new Error(i);
|
|
174
|
+
}, "parseError"),
|
|
175
|
+
// resets the lexer, sets new input
|
|
176
|
+
setInput: /* @__PURE__ */ l(function(s, i) {
|
|
177
|
+
return this.yy = i || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
178
|
+
first_line: 1,
|
|
179
|
+
first_column: 0,
|
|
180
|
+
last_line: 1,
|
|
181
|
+
last_column: 0
|
|
182
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
183
|
+
}, "setInput"),
|
|
184
|
+
// consumes and returns one char from the input
|
|
185
|
+
input: /* @__PURE__ */ l(function() {
|
|
186
|
+
var s = this._input[0];
|
|
187
|
+
this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
|
|
188
|
+
var i = s.match(/(?:\r\n?|\n).*/g);
|
|
189
|
+
return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
|
|
190
|
+
}, "input"),
|
|
191
|
+
// unshifts one char (or a string) into the input
|
|
192
|
+
unput: /* @__PURE__ */ l(function(s) {
|
|
193
|
+
var i = s.length, o = s.split(/(?:\r\n?|\n)/g);
|
|
194
|
+
this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
|
|
195
|
+
var a = this.match.split(/(?:\r\n?|\n)/g);
|
|
196
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
|
|
197
|
+
var g = this.yylloc.range;
|
|
198
|
+
return this.yylloc = {
|
|
199
|
+
first_line: this.yylloc.first_line,
|
|
200
|
+
last_line: this.yylineno + 1,
|
|
201
|
+
first_column: this.yylloc.first_column,
|
|
202
|
+
last_column: o ? (o.length === a.length ? this.yylloc.first_column : 0) + a[a.length - o.length].length - o[0].length : this.yylloc.first_column - i
|
|
203
|
+
}, this.options.ranges && (this.yylloc.range = [g[0], g[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
|
|
204
|
+
}, "unput"),
|
|
205
|
+
// When called from action, caches matched text and appends it on next action
|
|
206
|
+
more: /* @__PURE__ */ l(function() {
|
|
207
|
+
return this._more = !0, this;
|
|
208
|
+
}, "more"),
|
|
209
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
210
|
+
reject: /* @__PURE__ */ l(function() {
|
|
211
|
+
if (this.options.backtrack_lexer)
|
|
212
|
+
this._backtrack = !0;
|
|
213
|
+
else
|
|
214
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
215
|
+
` + this.showPosition(), {
|
|
216
|
+
text: "",
|
|
217
|
+
token: null,
|
|
218
|
+
line: this.yylineno
|
|
219
|
+
});
|
|
220
|
+
return this;
|
|
221
|
+
}, "reject"),
|
|
222
|
+
// retain first n characters of the match
|
|
223
|
+
less: /* @__PURE__ */ l(function(s) {
|
|
224
|
+
this.unput(this.match.slice(s));
|
|
225
|
+
}, "less"),
|
|
226
|
+
// displays already matched input, i.e. for error messages
|
|
227
|
+
pastInput: /* @__PURE__ */ l(function() {
|
|
228
|
+
var s = this.matched.substr(0, this.matched.length - this.match.length);
|
|
229
|
+
return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
|
|
230
|
+
}, "pastInput"),
|
|
231
|
+
// displays upcoming input, i.e. for error messages
|
|
232
|
+
upcomingInput: /* @__PURE__ */ l(function() {
|
|
233
|
+
var s = this.match;
|
|
234
|
+
return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
235
|
+
}, "upcomingInput"),
|
|
236
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
237
|
+
showPosition: /* @__PURE__ */ l(function() {
|
|
238
|
+
var s = this.pastInput(), i = new Array(s.length + 1).join("-");
|
|
239
|
+
return s + this.upcomingInput() + `
|
|
240
|
+
` + i + "^";
|
|
241
|
+
}, "showPosition"),
|
|
242
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
243
|
+
test_match: /* @__PURE__ */ l(function(s, i) {
|
|
244
|
+
var o, a, g;
|
|
245
|
+
if (this.options.backtrack_lexer && (g = {
|
|
246
|
+
yylineno: this.yylineno,
|
|
247
|
+
yylloc: {
|
|
248
|
+
first_line: this.yylloc.first_line,
|
|
249
|
+
last_line: this.last_line,
|
|
250
|
+
first_column: this.yylloc.first_column,
|
|
251
|
+
last_column: this.yylloc.last_column
|
|
252
|
+
},
|
|
253
|
+
yytext: this.yytext,
|
|
254
|
+
match: this.match,
|
|
255
|
+
matches: this.matches,
|
|
256
|
+
matched: this.matched,
|
|
257
|
+
yyleng: this.yyleng,
|
|
258
|
+
offset: this.offset,
|
|
259
|
+
_more: this._more,
|
|
260
|
+
_input: this._input,
|
|
261
|
+
yy: this.yy,
|
|
262
|
+
conditionStack: this.conditionStack.slice(0),
|
|
263
|
+
done: this.done
|
|
264
|
+
}, this.options.ranges && (g.yylloc.range = this.yylloc.range.slice(0))), a = s[0].match(/(?:\r\n?|\n).*/g), a && (this.yylineno += a.length), this.yylloc = {
|
|
265
|
+
first_line: this.yylloc.last_line,
|
|
266
|
+
last_line: this.yylineno + 1,
|
|
267
|
+
first_column: this.yylloc.last_column,
|
|
268
|
+
last_column: a ? a[a.length - 1].length - a[a.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
|
|
269
|
+
}, this.yytext += s[0], this.match += s[0], this.matches = s, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(s[0].length), this.matched += s[0], o = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
|
|
270
|
+
return o;
|
|
271
|
+
if (this._backtrack) {
|
|
272
|
+
for (var r in g)
|
|
273
|
+
this[r] = g[r];
|
|
274
|
+
return !1;
|
|
275
|
+
}
|
|
276
|
+
return !1;
|
|
277
|
+
}, "test_match"),
|
|
278
|
+
// return next match in input
|
|
279
|
+
next: /* @__PURE__ */ l(function() {
|
|
280
|
+
if (this.done)
|
|
281
|
+
return this.EOF;
|
|
282
|
+
this._input || (this.done = !0);
|
|
283
|
+
var s, i, o, a;
|
|
284
|
+
this._more || (this.yytext = "", this.match = "");
|
|
285
|
+
for (var g = this._currentRules(), r = 0; r < g.length; r++)
|
|
286
|
+
if (o = this._input.match(this.rules[g[r]]), o && (!i || o[0].length > i[0].length)) {
|
|
287
|
+
if (i = o, a = r, this.options.backtrack_lexer) {
|
|
288
|
+
if (s = this.test_match(o, g[r]), s !== !1)
|
|
289
|
+
return s;
|
|
290
|
+
if (this._backtrack) {
|
|
291
|
+
i = !1;
|
|
292
|
+
continue;
|
|
293
|
+
} else
|
|
294
|
+
return !1;
|
|
295
|
+
} else if (!this.options.flex)
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
return i ? (s = this.test_match(i, g[a]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
299
|
+
` + this.showPosition(), {
|
|
300
|
+
text: "",
|
|
301
|
+
token: null,
|
|
302
|
+
line: this.yylineno
|
|
303
|
+
});
|
|
304
|
+
}, "next"),
|
|
305
|
+
// return next match that has a token
|
|
306
|
+
lex: /* @__PURE__ */ l(function() {
|
|
307
|
+
var i = this.next();
|
|
308
|
+
return i || this.lex();
|
|
309
|
+
}, "lex"),
|
|
310
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
311
|
+
begin: /* @__PURE__ */ l(function(i) {
|
|
312
|
+
this.conditionStack.push(i);
|
|
313
|
+
}, "begin"),
|
|
314
|
+
// pop the previously active lexer condition state off the condition stack
|
|
315
|
+
popState: /* @__PURE__ */ l(function() {
|
|
316
|
+
var i = this.conditionStack.length - 1;
|
|
317
|
+
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
318
|
+
}, "popState"),
|
|
319
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
320
|
+
_currentRules: /* @__PURE__ */ l(function() {
|
|
321
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
322
|
+
}, "_currentRules"),
|
|
323
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
324
|
+
topState: /* @__PURE__ */ l(function(i) {
|
|
325
|
+
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
326
|
+
}, "topState"),
|
|
327
|
+
// alias for begin(condition)
|
|
328
|
+
pushState: /* @__PURE__ */ l(function(i) {
|
|
329
|
+
this.begin(i);
|
|
330
|
+
}, "pushState"),
|
|
331
|
+
// return the number of states currently on the stack
|
|
332
|
+
stateStackSize: /* @__PURE__ */ l(function() {
|
|
333
|
+
return this.conditionStack.length;
|
|
334
|
+
}, "stateStackSize"),
|
|
335
|
+
options: { "case-insensitive": !0 },
|
|
336
|
+
performAction: /* @__PURE__ */ l(function(i, o, a, g) {
|
|
337
|
+
switch (a) {
|
|
338
|
+
case 0:
|
|
339
|
+
return i.getLogger().trace("Found comment", o.yytext), 6;
|
|
340
|
+
case 1:
|
|
341
|
+
return 8;
|
|
342
|
+
case 2:
|
|
343
|
+
this.begin("CLASS");
|
|
344
|
+
break;
|
|
345
|
+
case 3:
|
|
346
|
+
return this.popState(), 16;
|
|
347
|
+
case 4:
|
|
348
|
+
this.popState();
|
|
349
|
+
break;
|
|
350
|
+
case 5:
|
|
351
|
+
i.getLogger().trace("Begin icon"), this.begin("ICON");
|
|
352
|
+
break;
|
|
353
|
+
case 6:
|
|
354
|
+
return i.getLogger().trace("SPACELINE"), 6;
|
|
355
|
+
case 7:
|
|
356
|
+
return 7;
|
|
357
|
+
case 8:
|
|
358
|
+
return 15;
|
|
359
|
+
case 9:
|
|
360
|
+
i.getLogger().trace("end icon"), this.popState();
|
|
361
|
+
break;
|
|
362
|
+
case 10:
|
|
363
|
+
return i.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
|
|
364
|
+
case 11:
|
|
365
|
+
return i.getLogger().trace("Cloud"), this.begin("NODE"), 19;
|
|
366
|
+
case 12:
|
|
367
|
+
return i.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
|
|
368
|
+
case 13:
|
|
369
|
+
return i.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
|
|
370
|
+
case 14:
|
|
371
|
+
return this.begin("NODE"), 19;
|
|
372
|
+
case 15:
|
|
373
|
+
return this.begin("NODE"), 19;
|
|
374
|
+
case 16:
|
|
375
|
+
return this.begin("NODE"), 19;
|
|
376
|
+
case 17:
|
|
377
|
+
return this.begin("NODE"), 19;
|
|
378
|
+
case 18:
|
|
379
|
+
return 13;
|
|
380
|
+
case 19:
|
|
381
|
+
return 22;
|
|
382
|
+
case 20:
|
|
383
|
+
return 11;
|
|
384
|
+
case 21:
|
|
385
|
+
this.begin("NSTR2");
|
|
386
|
+
break;
|
|
387
|
+
case 22:
|
|
388
|
+
return "NODE_DESCR";
|
|
389
|
+
case 23:
|
|
390
|
+
this.popState();
|
|
391
|
+
break;
|
|
392
|
+
case 24:
|
|
393
|
+
i.getLogger().trace("Starting NSTR"), this.begin("NSTR");
|
|
394
|
+
break;
|
|
395
|
+
case 25:
|
|
396
|
+
return i.getLogger().trace("description:", o.yytext), "NODE_DESCR";
|
|
397
|
+
case 26:
|
|
398
|
+
this.popState();
|
|
399
|
+
break;
|
|
400
|
+
case 27:
|
|
401
|
+
return this.popState(), i.getLogger().trace("node end ))"), "NODE_DEND";
|
|
402
|
+
case 28:
|
|
403
|
+
return this.popState(), i.getLogger().trace("node end )"), "NODE_DEND";
|
|
404
|
+
case 29:
|
|
405
|
+
return this.popState(), i.getLogger().trace("node end ...", o.yytext), "NODE_DEND";
|
|
406
|
+
case 30:
|
|
407
|
+
return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
|
|
408
|
+
case 31:
|
|
409
|
+
return this.popState(), i.getLogger().trace("node end (-"), "NODE_DEND";
|
|
410
|
+
case 32:
|
|
411
|
+
return this.popState(), i.getLogger().trace("node end (-"), "NODE_DEND";
|
|
412
|
+
case 33:
|
|
413
|
+
return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
|
|
414
|
+
case 34:
|
|
415
|
+
return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
|
|
416
|
+
case 35:
|
|
417
|
+
return i.getLogger().trace("Long description:", o.yytext), 20;
|
|
418
|
+
case 36:
|
|
419
|
+
return i.getLogger().trace("Long description:", o.yytext), 20;
|
|
420
|
+
}
|
|
421
|
+
}, "anonymous"),
|
|
422
|
+
rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
|
|
423
|
+
conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
|
|
424
|
+
};
|
|
425
|
+
return x;
|
|
426
|
+
})();
|
|
427
|
+
B.lexer = se;
|
|
428
|
+
function A() {
|
|
429
|
+
this.yy = {};
|
|
430
|
+
}
|
|
431
|
+
return l(A, "Parser"), A.prototype = B, B.Parser = A, new A();
|
|
432
|
+
})();
|
|
433
|
+
X.parser = X;
|
|
434
|
+
var De = X, L = {
|
|
435
|
+
DEFAULT: 0,
|
|
436
|
+
NO_BORDER: 0,
|
|
437
|
+
ROUNDED_RECT: 1,
|
|
438
|
+
RECT: 2,
|
|
439
|
+
CIRCLE: 3,
|
|
440
|
+
CLOUD: 4,
|
|
441
|
+
BANG: 5,
|
|
442
|
+
HEXAGON: 6
|
|
443
|
+
}, C, Ne = (C = class {
|
|
444
|
+
constructor() {
|
|
445
|
+
this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = L, this.clear(), this.getType = this.getType.bind(this), this.getElementById = this.getElementById.bind(this), this.getParent = this.getParent.bind(this), this.getMindmap = this.getMindmap.bind(this), this.addNode = this.addNode.bind(this), this.decorateNode = this.decorateNode.bind(this);
|
|
446
|
+
}
|
|
447
|
+
clear() {
|
|
448
|
+
this.nodes = [], this.count = 0, this.elements = {}, this.baseLevel = void 0;
|
|
449
|
+
}
|
|
450
|
+
getParent(e) {
|
|
451
|
+
for (let n = this.nodes.length - 1; n >= 0; n--)
|
|
452
|
+
if (this.nodes[n].level < e)
|
|
453
|
+
return this.nodes[n];
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
getMindmap() {
|
|
457
|
+
return this.nodes.length > 0 ? this.nodes[0] : null;
|
|
458
|
+
}
|
|
459
|
+
addNode(e, n, c, f) {
|
|
460
|
+
I.info("addNode", e, n, c, f);
|
|
461
|
+
let h = !1;
|
|
462
|
+
this.nodes.length === 0 ? (this.baseLevel = e, e = 0, h = !0) : this.baseLevel !== void 0 && (e = e - this.baseLevel, h = !1);
|
|
463
|
+
const p = W();
|
|
464
|
+
let m = p.mindmap?.padding ?? F.mindmap.padding;
|
|
465
|
+
switch (f) {
|
|
466
|
+
case this.nodeType.ROUNDED_RECT:
|
|
467
|
+
case this.nodeType.RECT:
|
|
468
|
+
case this.nodeType.HEXAGON:
|
|
469
|
+
m *= 2;
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
const u = {
|
|
473
|
+
id: this.count++,
|
|
474
|
+
nodeId: V(n, p),
|
|
475
|
+
level: e,
|
|
476
|
+
descr: V(c, p),
|
|
477
|
+
type: f,
|
|
478
|
+
children: [],
|
|
479
|
+
width: p.mindmap?.maxNodeWidth ?? F.mindmap.maxNodeWidth,
|
|
480
|
+
padding: m,
|
|
481
|
+
isRoot: h
|
|
482
|
+
}, N = this.getParent(e);
|
|
483
|
+
if (N)
|
|
484
|
+
N.children.push(u), this.nodes.push(u);
|
|
485
|
+
else if (h)
|
|
486
|
+
this.nodes.push(u);
|
|
487
|
+
else
|
|
488
|
+
throw new Error(
|
|
489
|
+
`There can be only one root. No parent could be found for ("${u.descr}")`
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
getType(e, n) {
|
|
493
|
+
switch (I.debug("In get type", e, n), e) {
|
|
494
|
+
case "[":
|
|
495
|
+
return this.nodeType.RECT;
|
|
496
|
+
case "(":
|
|
497
|
+
return n === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
|
|
498
|
+
case "((":
|
|
499
|
+
return this.nodeType.CIRCLE;
|
|
500
|
+
case ")":
|
|
501
|
+
return this.nodeType.CLOUD;
|
|
502
|
+
case "))":
|
|
503
|
+
return this.nodeType.BANG;
|
|
504
|
+
case "{{":
|
|
505
|
+
return this.nodeType.HEXAGON;
|
|
506
|
+
default:
|
|
507
|
+
return this.nodeType.DEFAULT;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
setElementForId(e, n) {
|
|
511
|
+
this.elements[e] = n;
|
|
512
|
+
}
|
|
513
|
+
getElementById(e) {
|
|
514
|
+
return this.elements[e];
|
|
515
|
+
}
|
|
516
|
+
decorateNode(e) {
|
|
517
|
+
if (!e)
|
|
518
|
+
return;
|
|
519
|
+
const n = W(), c = this.nodes[this.nodes.length - 1];
|
|
520
|
+
e.icon && (c.icon = V(e.icon, n)), e.class && (c.class = V(e.class, n));
|
|
521
|
+
}
|
|
522
|
+
type2Str(e) {
|
|
523
|
+
switch (e) {
|
|
524
|
+
case this.nodeType.DEFAULT:
|
|
525
|
+
return "no-border";
|
|
526
|
+
case this.nodeType.RECT:
|
|
527
|
+
return "rect";
|
|
528
|
+
case this.nodeType.ROUNDED_RECT:
|
|
529
|
+
return "rounded-rect";
|
|
530
|
+
case this.nodeType.CIRCLE:
|
|
531
|
+
return "circle";
|
|
532
|
+
case this.nodeType.CLOUD:
|
|
533
|
+
return "cloud";
|
|
534
|
+
case this.nodeType.BANG:
|
|
535
|
+
return "bang";
|
|
536
|
+
case this.nodeType.HEXAGON:
|
|
537
|
+
return "hexgon";
|
|
538
|
+
// cspell: disable-line
|
|
539
|
+
default:
|
|
540
|
+
return "no-border";
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Assign section numbers to nodes based on their position relative to root
|
|
545
|
+
* @param node - The mindmap node to process
|
|
546
|
+
* @param sectionNumber - The section number to assign (undefined for root)
|
|
547
|
+
*/
|
|
548
|
+
assignSections(e, n) {
|
|
549
|
+
if (e.level === 0 ? e.section = void 0 : e.section = n, e.children)
|
|
550
|
+
for (const [c, f] of e.children.entries()) {
|
|
551
|
+
const h = e.level === 0 ? c : n;
|
|
552
|
+
this.assignSections(f, h);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Convert mindmap tree structure to flat array of nodes
|
|
557
|
+
* @param node - The mindmap node to process
|
|
558
|
+
* @param processedNodes - Array to collect processed nodes
|
|
559
|
+
*/
|
|
560
|
+
flattenNodes(e, n) {
|
|
561
|
+
const c = ["mindmap-node"];
|
|
562
|
+
e.isRoot === !0 ? c.push("section-root", "section--1") : e.section !== void 0 && c.push(`section-${e.section}`), e.class && c.push(e.class);
|
|
563
|
+
const f = c.join(" "), h = /* @__PURE__ */ l((m) => {
|
|
564
|
+
switch (m) {
|
|
565
|
+
case L.CIRCLE:
|
|
566
|
+
return "mindmapCircle";
|
|
567
|
+
case L.RECT:
|
|
568
|
+
return "rect";
|
|
569
|
+
case L.ROUNDED_RECT:
|
|
570
|
+
return "rounded";
|
|
571
|
+
case L.CLOUD:
|
|
572
|
+
return "cloud";
|
|
573
|
+
case L.BANG:
|
|
574
|
+
return "bang";
|
|
575
|
+
case L.HEXAGON:
|
|
576
|
+
return "hexagon";
|
|
577
|
+
case L.DEFAULT:
|
|
578
|
+
return "defaultMindmapNode";
|
|
579
|
+
case L.NO_BORDER:
|
|
580
|
+
default:
|
|
581
|
+
return "rect";
|
|
582
|
+
}
|
|
583
|
+
}, "getShapeFromType"), p = {
|
|
584
|
+
id: e.id.toString(),
|
|
585
|
+
domId: "node_" + e.id.toString(),
|
|
586
|
+
label: e.descr,
|
|
587
|
+
isGroup: !1,
|
|
588
|
+
shape: h(e.type),
|
|
589
|
+
width: e.width,
|
|
590
|
+
height: e.height ?? 0,
|
|
591
|
+
padding: e.padding,
|
|
592
|
+
cssClasses: f,
|
|
593
|
+
cssStyles: [],
|
|
594
|
+
look: "default",
|
|
595
|
+
icon: e.icon,
|
|
596
|
+
x: e.x,
|
|
597
|
+
y: e.y,
|
|
598
|
+
// Mindmap-specific properties
|
|
599
|
+
level: e.level,
|
|
600
|
+
nodeId: e.nodeId,
|
|
601
|
+
type: e.type,
|
|
602
|
+
section: e.section
|
|
603
|
+
};
|
|
604
|
+
if (n.push(p), e.children)
|
|
605
|
+
for (const m of e.children)
|
|
606
|
+
this.flattenNodes(m, n);
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Generate edges from parent-child relationships in mindmap tree
|
|
610
|
+
* @param node - The mindmap node to process
|
|
611
|
+
* @param edges - Array to collect edges
|
|
612
|
+
*/
|
|
613
|
+
generateEdges(e, n) {
|
|
614
|
+
if (e.children)
|
|
615
|
+
for (const c of e.children) {
|
|
616
|
+
let f = "edge";
|
|
617
|
+
c.section !== void 0 && (f += ` section-edge-${c.section}`);
|
|
618
|
+
const h = e.level + 1;
|
|
619
|
+
f += ` edge-depth-${h}`;
|
|
620
|
+
const p = {
|
|
621
|
+
id: `edge_${e.id}_${c.id}`,
|
|
622
|
+
start: e.id.toString(),
|
|
623
|
+
end: c.id.toString(),
|
|
624
|
+
type: "normal",
|
|
625
|
+
curve: "basis",
|
|
626
|
+
thickness: "normal",
|
|
627
|
+
look: "default",
|
|
628
|
+
classes: f,
|
|
629
|
+
// Store mindmap-specific data
|
|
630
|
+
depth: e.level,
|
|
631
|
+
section: c.section
|
|
632
|
+
};
|
|
633
|
+
n.push(p), this.generateEdges(c, n);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Get structured data for layout algorithms
|
|
638
|
+
* Following the pattern established by ER diagrams
|
|
639
|
+
* @returns Structured data containing nodes, edges, and config
|
|
640
|
+
*/
|
|
641
|
+
getData() {
|
|
642
|
+
const e = this.getMindmap(), n = W(), f = ue().layout !== void 0, h = n;
|
|
643
|
+
if (f || (h.layout = "cose-bilkent"), !e)
|
|
644
|
+
return {
|
|
645
|
+
nodes: [],
|
|
646
|
+
edges: [],
|
|
647
|
+
config: h
|
|
648
|
+
};
|
|
649
|
+
I.debug("getData: mindmapRoot", e, n), this.assignSections(e);
|
|
650
|
+
const p = [], m = [];
|
|
651
|
+
this.flattenNodes(e, p), this.generateEdges(e, m), I.debug(
|
|
652
|
+
`getData: processed ${p.length} nodes and ${m.length} edges`
|
|
653
|
+
);
|
|
654
|
+
const u = /* @__PURE__ */ new Map();
|
|
655
|
+
for (const N of p)
|
|
656
|
+
u.set(N.id, {
|
|
657
|
+
shape: N.shape,
|
|
658
|
+
width: N.width,
|
|
659
|
+
height: N.height,
|
|
660
|
+
padding: N.padding
|
|
661
|
+
});
|
|
662
|
+
return {
|
|
663
|
+
nodes: p,
|
|
664
|
+
edges: m,
|
|
665
|
+
config: h,
|
|
666
|
+
// Store the root node for mindmap-specific layout algorithms
|
|
667
|
+
rootNode: e,
|
|
668
|
+
// Properties required by dagre layout algorithm
|
|
669
|
+
markers: ["point"],
|
|
670
|
+
// Mindmaps don't use markers
|
|
671
|
+
direction: "TB",
|
|
672
|
+
// Top-to-bottom direction for mindmaps
|
|
673
|
+
nodeSpacing: 50,
|
|
674
|
+
// Default spacing between nodes
|
|
675
|
+
rankSpacing: 50,
|
|
676
|
+
// Default spacing between ranks
|
|
677
|
+
// Add shapes for ELK compatibility
|
|
678
|
+
shapes: Object.fromEntries(u),
|
|
679
|
+
// Additional properties that layout algorithms might expect
|
|
680
|
+
type: "mindmap",
|
|
681
|
+
diagramId: "mindmap-" + Se()
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
// Expose logger to grammar
|
|
685
|
+
getLogger() {
|
|
686
|
+
return I;
|
|
687
|
+
}
|
|
688
|
+
}, l(C, "MindmapDB"), C), ke = /* @__PURE__ */ l(async (t, e, n, c) => {
|
|
689
|
+
I.debug(`Rendering mindmap diagram
|
|
690
|
+
` + t);
|
|
691
|
+
const f = c.db, h = f.getData(), p = le(e, h.config.securityLevel);
|
|
692
|
+
h.type = c.type, h.layoutAlgorithm = de(h.config.layout, {
|
|
693
|
+
fallback: "cose-bilkent"
|
|
694
|
+
}), h.diagramId = e, f.getMindmap() && (h.nodes.forEach((u) => {
|
|
695
|
+
u.shape === "rounded" ? (u.radius = 15, u.taper = 15, u.stroke = "none", u.width = 0, u.padding = 15) : u.shape === "circle" ? u.padding = 10 : u.shape === "rect" && (u.width = 0, u.padding = 10);
|
|
696
|
+
}), await ge(h, p), he(
|
|
697
|
+
p,
|
|
698
|
+
h.config.mindmap?.padding ?? F.mindmap.padding,
|
|
699
|
+
"mindmapDiagram",
|
|
700
|
+
h.config.mindmap?.useMaxWidth ?? F.mindmap.useMaxWidth
|
|
701
|
+
));
|
|
702
|
+
}, "draw"), Le = {
|
|
703
|
+
draw: ke
|
|
704
|
+
}, xe = /* @__PURE__ */ l((t) => {
|
|
705
|
+
let e = "";
|
|
706
|
+
for (let n = 0; n < t.THEME_COLOR_LIMIT; n++)
|
|
707
|
+
t["lineColor" + n] = t["lineColor" + n] || t["cScaleInv" + n], pe(t["lineColor" + n]) ? t["lineColor" + n] = fe(t["lineColor" + n], 20) : t["lineColor" + n] = ye(t["lineColor" + n], 20);
|
|
708
|
+
for (let n = 0; n < t.THEME_COLOR_LIMIT; n++) {
|
|
709
|
+
const c = "" + (17 - 3 * n);
|
|
710
|
+
e += `
|
|
711
|
+
.section-${n - 1} rect, .section-${n - 1} path, .section-${n - 1} circle, .section-${n - 1} polygon, .section-${n - 1} path {
|
|
712
|
+
fill: ${t["cScale" + n]};
|
|
713
|
+
}
|
|
714
|
+
.section-${n - 1} text {
|
|
715
|
+
fill: ${t["cScaleLabel" + n]};
|
|
716
|
+
}
|
|
717
|
+
.node-icon-${n - 1} {
|
|
718
|
+
font-size: 40px;
|
|
719
|
+
color: ${t["cScaleLabel" + n]};
|
|
720
|
+
}
|
|
721
|
+
.section-edge-${n - 1}{
|
|
722
|
+
stroke: ${t["cScale" + n]};
|
|
723
|
+
}
|
|
724
|
+
.edge-depth-${n - 1}{
|
|
725
|
+
stroke-width: ${c};
|
|
726
|
+
}
|
|
727
|
+
.section-${n - 1} line {
|
|
728
|
+
stroke: ${t["cScaleInv" + n]} ;
|
|
729
|
+
stroke-width: 3;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.disabled, .disabled circle, .disabled text {
|
|
733
|
+
fill: lightgray;
|
|
734
|
+
}
|
|
735
|
+
.disabled text {
|
|
736
|
+
fill: #efefef;
|
|
737
|
+
}
|
|
738
|
+
`;
|
|
739
|
+
}
|
|
740
|
+
return e;
|
|
741
|
+
}, "genSections"), ve = /* @__PURE__ */ l((t) => `
|
|
742
|
+
.edge {
|
|
743
|
+
stroke-width: 3;
|
|
744
|
+
}
|
|
745
|
+
${xe(t)}
|
|
746
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
747
|
+
fill: ${t.git0};
|
|
748
|
+
}
|
|
749
|
+
.section-root text {
|
|
750
|
+
fill: ${t.gitBranchLabel0};
|
|
751
|
+
}
|
|
752
|
+
.section-root span {
|
|
753
|
+
color: ${t.gitBranchLabel0};
|
|
754
|
+
}
|
|
755
|
+
.section-2 span {
|
|
756
|
+
color: ${t.gitBranchLabel0};
|
|
757
|
+
}
|
|
758
|
+
.icon-container {
|
|
759
|
+
height:100%;
|
|
760
|
+
display: flex;
|
|
761
|
+
justify-content: center;
|
|
762
|
+
align-items: center;
|
|
763
|
+
}
|
|
764
|
+
.edge {
|
|
765
|
+
fill: none;
|
|
766
|
+
}
|
|
767
|
+
.mindmap-node-label {
|
|
768
|
+
dy: 1em;
|
|
769
|
+
alignment-baseline: middle;
|
|
770
|
+
text-anchor: middle;
|
|
771
|
+
dominant-baseline: middle;
|
|
772
|
+
text-align: center;
|
|
773
|
+
}
|
|
774
|
+
`, "getStyles"), Te = ve, Re = {
|
|
775
|
+
get db() {
|
|
776
|
+
return new Ne();
|
|
777
|
+
},
|
|
778
|
+
renderer: Le,
|
|
779
|
+
parser: De,
|
|
780
|
+
styles: Te
|
|
781
|
+
};
|
|
782
|
+
export {
|
|
783
|
+
Re as diagram
|
|
784
|
+
};
|