@layers-app/editor 0.3.11 → 0.4.1-progress.1
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/README.md +215 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -6
- package/dist/layers.0EGX3HEy.js +1 -0
- package/dist/layers.1RmgGsLp.js +1 -0
- package/dist/layers.1df9kFxm.js +40 -0
- package/dist/layers.2aPuvps8.js +2235 -0
- package/dist/layers.3YvcJPBv.js +7 -0
- package/dist/layers.52famHy6.js +1 -0
- package/dist/layers.5l4Zrk2L.js +1 -0
- package/dist/layers.6hpmGhQ7.js +10 -0
- package/dist/layers.7JqFgE4-.js +15 -0
- package/dist/layers.7RKu5qAq.js +37 -0
- package/dist/layers.9QK1wiQj.js +1 -0
- package/dist/layers.9pNaFvaX.js +1 -0
- package/dist/layers.AmKAZWLq.js +11 -0
- package/dist/layers.B0J4f_xf.js +5 -0
- package/dist/layers.B19hGmey.js +1 -0
- package/dist/layers.B1O1xaS8.js +33 -0
- package/dist/layers.B2AGu32C.js +11692 -0
- package/dist/layers.B31bUvoU.js +37 -0
- package/dist/layers.B3BB_VRY.js +802 -0
- package/dist/layers.B3D4g2HH.js +1 -0
- package/dist/layers.B3jz2GM9.js +2479 -0
- package/dist/layers.B7pMHVvI.js +230 -0
- package/dist/layers.B8vyhX3w.js +40 -0
- package/dist/{layers.BnjxHNDK.js → layers.B93hVIUg.js} +84 -84
- package/dist/layers.B97E5Ket.js +41 -0
- package/dist/layers.B9oGbUwj.js +65 -0
- package/dist/layers.B9x4sQmU.js +9 -0
- package/dist/layers.B9yJUkZR.js +39 -0
- package/dist/layers.BArswBu6.js +1 -0
- package/dist/layers.BAtv1CM7.js +1 -0
- package/dist/layers.BCCZdUAo.js +6 -0
- package/dist/layers.BCpU6Rx2.js +207 -0
- package/dist/layers.BEWGfzM9.js +790 -0
- package/dist/layers.BFGghBqX.js +84 -0
- package/dist/layers.BGSQMYfb.js +3 -0
- package/dist/layers.BIOgNBCU.js +118 -0
- package/dist/layers.BIeVwYKL.js +1 -0
- package/dist/layers.BK7LrtsI.js +8 -0
- package/dist/layers.BKEU6fbU.js +268 -0
- package/dist/layers.BM5aqSQa.js +904 -0
- package/dist/layers.BMWTYLoS.js +1580 -0
- package/dist/layers.BNiUL2Vg.js +1283 -0
- package/dist/layers.BRbDF_Rn.js +40 -0
- package/dist/layers.BSJVn_-a.js +4 -0
- package/dist/{layers.C125HTat.js → layers.BSQmbaLA.js} +1 -1
- package/dist/layers.BSTBZrFn.js +1 -0
- package/dist/layers.BSZN_1IW.js +1 -0
- package/dist/layers.BU089OsF.js +160 -0
- package/dist/layers.BV_nreRT.js +5 -0
- package/dist/layers.BVzXy_Es.js +282 -0
- package/dist/layers.BX_VhzvH.js +4 -0
- package/dist/layers.BXlqVxG4.js +10 -0
- package/dist/layers.BY4eBmlK.js +37 -0
- package/dist/layers.BbCfEXyj.js +55 -0
- package/dist/layers.BcAvrhb2.js +11 -0
- package/dist/layers.Be4S2sq-.js +11 -0
- package/dist/layers.BejsVBlP.js +8 -0
- package/dist/layers.BfFWkiCr.js +8 -0
- package/dist/layers.BgOa2ZQq.js +7 -0
- package/dist/layers.BiJ8hfRt.js +1510 -0
- package/dist/layers.Bm9A8t2O.js +41 -0
- package/dist/layers.BmKPR1Q_.js +803 -0
- package/dist/layers.BpLN4VBV.js +35 -0
- package/dist/layers.Bp_LzOtD.js +6 -0
- package/dist/layers.BpilXLfW.js +6 -0
- package/dist/layers.BrlarkcH.js +1 -0
- package/dist/layers.BrwdJtoi.js +2966 -0
- package/dist/layers.BtWb_X9E.js +1088 -0
- package/dist/layers.BuQv8-pQ.js +10 -0
- package/dist/layers.BvcJQqPP.js +36 -0
- package/dist/layers.BwReZ0XC.js +8 -0
- package/dist/layers.C0uya3UC.js +257 -0
- package/dist/layers.C3Efr78e.js +1 -0
- package/dist/layers.C3kfFCwy.js +37 -0
- package/dist/layers.C4DnE7f4.js +9 -0
- package/dist/layers.C6dIKT7t.js +32 -0
- package/dist/layers.C6rE9oi4.js +5 -0
- package/dist/layers.C7lIplJU.js +247 -0
- package/dist/layers.C8_lu5UH.js +23 -0
- package/dist/layers.C9s4Ga9-.js +139 -0
- package/dist/layers.CA3xAcdD.js +84 -0
- package/dist/layers.CAt0Toqo.js +39 -0
- package/dist/layers.CBmWR4JD.js +41 -0
- package/dist/layers.CEnd1x3K.js +7 -0
- package/dist/layers.CEpgYsO5.js +10 -0
- package/dist/layers.CF3SIE-y.js +9 -0
- package/dist/layers.CFMVSllB.js +34 -0
- package/dist/layers.CGWEiDtE.js +501 -0
- package/dist/layers.CHV4TIWj.js +769 -0
- package/dist/layers.CHZsXQcr.js +1 -0
- package/dist/layers.CHe9Q8ia.js +9 -0
- package/dist/layers.CLX5RFJB.js +39 -0
- package/dist/layers.CLz5oPPj.js +1 -0
- package/dist/layers.CMV5IiUc.js +5 -0
- package/dist/layers.CN0RXanE.js +2 -0
- package/dist/layers.CNcbY4HA.js +6 -0
- package/dist/layers.COAF7f8g.js +1 -0
- package/dist/layers.COPB0bHF.js +2 -0
- package/dist/layers.CPGH36Hx.js +38 -0
- package/dist/layers.CQ_Gb_tr.js +40 -0
- package/dist/layers.CRIXCu9y.js +36 -0
- package/dist/layers.CRbZFXp0.js +10 -0
- package/dist/layers.CTHKUBrY.js +1 -0
- package/dist/layers.CTinG4fA.js +1 -0
- package/dist/layers.CUBdNh1l.js +139 -0
- package/dist/layers.CUKl38op.js +373 -0
- package/dist/layers.CUM6WWJc.js +10 -0
- package/dist/layers.CVO2cgHn.js +7 -0
- package/dist/layers.CVg-xbVM.js +9148 -0
- package/dist/layers.CWQb-v3n.js +59 -0
- package/dist/layers.CX7R1NFA.js +42 -0
- package/dist/layers.CY2dfUZP.js +220 -0
- package/dist/layers.C_YVSLx2.js +19 -0
- package/dist/layers.C_kJ5c3l.js +1089 -0
- package/dist/layers.CaXcZpWP.js +8 -0
- package/dist/layers.CacJtvRK.js +42 -0
- package/dist/layers.Cb-u0SLP.js +931 -0
- package/dist/layers.Cbk6-WFM.js +1 -0
- package/dist/layers.CcEJHfTE.js +6 -0
- package/dist/layers.CdKuzWdD.js +1 -0
- package/dist/layers.CeljVLEY.js +7 -0
- package/dist/layers.CjFEU6yv.js +36 -0
- package/dist/layers.CltyxC3q.js +39 -0
- package/dist/layers.CnZQE2Pi.js +5 -0
- package/dist/layers.Cpp1ZEuF.js +9 -0
- package/dist/layers.CpvexSFh.js +202 -0
- package/dist/layers.CqVTtuYm.js +6 -0
- package/dist/layers.Cs24L6er.js +261 -0
- package/dist/layers.CsUFpQDp.js +40 -0
- package/dist/layers.CutHJDp4.js +7 -0
- package/dist/layers.CvCD8PmL.js +39 -0
- package/dist/layers.CwE7GdQT.js +8 -0
- package/dist/layers.CwL5PiXG.js +8 -0
- package/dist/layers.CyPA2u9-.js +8 -0
- package/dist/layers.CzRgGVNU.js +41 -0
- package/dist/layers.D0zn4_Mx.js +1 -0
- package/dist/layers.D2KUO0dY.js +42 -0
- package/dist/layers.D2SIBPjl.js +41 -0
- package/dist/layers.D2Tzu1xx.js +116 -0
- package/dist/layers.D3rmRYuA.js +10 -0
- package/dist/layers.D4fGb2cV.js +1272 -0
- package/dist/layers.D56h41PX.js +1 -0
- package/dist/layers.D5Wk7Brs.js +10 -0
- package/dist/layers.D7jGxypv.js +8 -0
- package/dist/layers.D8g04PjT.js +9 -0
- package/dist/layers.D97nDwEx.js +9 -0
- package/dist/layers.D9Df9NSm.js +14 -0
- package/dist/layers.DBFfWJxR.js +51 -0
- package/dist/layers.DChAJIDE.js +40 -0
- package/dist/layers.DGjpnqy8.js +295 -0
- package/dist/layers.DKvSkiyS.js +52 -0
- package/dist/layers.DL83jGn_.js +61 -0
- package/dist/layers.DLwuMfdd.js +84 -0
- package/dist/layers.DMkBISW1.js +1 -0
- package/dist/layers.DMyyjog4.js +32 -0
- package/dist/layers.DN9HoVxI.js +18 -0
- package/dist/layers.DO-43L6O.js +423 -0
- package/dist/layers.DOrgOHBr.js +1 -0
- package/dist/layers.DPRdtwVX.js +10 -0
- package/dist/layers.DPkkvYnI.js +96 -0
- package/dist/layers.DRLM7uPa.js +1 -0
- package/dist/layers.DRk9pZsP.js +1 -0
- package/dist/layers.DRrRO-pI.js +39 -0
- package/dist/layers.DS6sUpQY.js +70 -0
- package/dist/layers.DSNZlSxG.js +40 -0
- package/dist/layers.DT14b_tp.js +122 -0
- package/dist/layers.DU9bT12-.js +11 -0
- package/dist/layers.DVysgz_L.js +9 -0
- package/dist/layers.DWyWcSYq.js +425 -0
- package/dist/layers.DYgifwCe.js +1265 -0
- package/dist/layers.DYrmRjRC.js +1034 -0
- package/dist/layers.DZVdzwBS.js +1 -0
- package/dist/layers.DbaKVP5e.js +1 -0
- package/dist/layers.Dd8k3mGW.js +32 -0
- package/dist/layers.Dera5nI8.js +8 -0
- package/dist/layers.DfHyYQto.js +1 -0
- package/dist/layers.Dg-bFIGZ.js +6 -0
- package/dist/layers.Dj2x2a5K.js +7 -0
- package/dist/layers.DjRYd6_J.js +6 -0
- package/dist/layers.DjUOC4st.js +16 -0
- package/dist/layers.Dlx-9qlV.js +4 -0
- package/dist/layers.DmXbI_X6.js +32 -0
- package/dist/layers.Dn51Gu3w.js +42 -0
- package/dist/layers.DnGlTnoF.js +8 -0
- package/dist/layers.DnXE-nI2.js +32 -0
- package/dist/layers.DneGJ5YW.js +36 -0
- package/dist/layers.DnyqZntR.js +1 -0
- package/dist/layers.DvXH8BN-.js +4 -0
- package/dist/layers.DvbNClAr.js +11 -0
- package/dist/layers.DwlMkCL5.js +1 -0
- package/dist/layers.DxA6ocdw.js +70 -0
- package/dist/layers.Dy1naDTQ.js +14 -0
- package/dist/layers.Fwx6Z-E0.js +7 -0
- package/dist/layers.GqCRYDXG.js +1619 -0
- package/dist/layers.Iok4Hx4P.js +1 -0
- package/dist/layers.JWCLFILJ.js +1 -0
- package/dist/layers.JWXTGwdn.js +39 -0
- package/dist/layers.Lv1hsK8F.js +42 -0
- package/dist/layers.MRw7LhZs.js +185 -0
- package/dist/layers.MZxHWl05.js +437 -0
- package/dist/layers.MfF8Mar4.js +40 -0
- package/dist/layers.NZaKqPGi.js +320 -0
- package/dist/layers.O16Qu9DR.js +38 -0
- package/dist/layers.OJEt97_Q.js +1 -0
- package/dist/layers.OkAEP5sK.js +41 -0
- package/dist/layers.QKd6brRD.js +1 -0
- package/dist/layers.QgpZpst1.js +1 -0
- package/dist/layers.RkLEX3Zh.js +7 -0
- package/dist/layers.RskRv7xC.js +33 -0
- package/dist/layers.Ru0qupSB.js +32 -0
- package/dist/layers.W2ukY1Da.js +960 -0
- package/dist/layers.XHdBpBIc.js +38 -0
- package/dist/layers.Y42vCoBD.js +40 -0
- package/dist/layers.ZQ_-z-aL.js +10 -0
- package/dist/layers.b0h5ZBmD.js +61 -0
- package/dist/layers.b6DSxQLV.js +186 -0
- package/dist/layers.erJbqYPP.js +9 -0
- package/dist/layers.gBi0hIYC.js +13 -0
- package/dist/layers.lCpg7dOn.js +21 -0
- package/dist/layers.ms8NfStk.js +41 -0
- package/dist/layers.mwnm89da.js +21763 -0
- package/dist/layers.nHHM2gEW.js +39 -0
- package/dist/layers.nbOz9XY9.js +44 -0
- package/dist/layers.p871JVGx.js +1359 -0
- package/dist/layers.pmoMn3BH.js +793 -0
- package/dist/layers.pw41pFms.js +35 -0
- package/dist/layers.rNpo9CKl.js +1126 -0
- package/dist/layers.uf8nbAjB.js +39 -0
- package/dist/layers.vXYsjfZS.js +9 -0
- package/dist/layers.vggOk4T3.js +48146 -0
- package/dist/layers.vmEHkEhU.js +21938 -0
- package/dist/{layers.YZkXZvVS.js → layers.vrcLKgWz.js} +14947 -13808
- package/dist/layers.vsJbLxBG.js +2 -0
- package/dist/layers.wmlkGZ6N.js +41 -0
- package/dist/layers.xJXWA8H6.js +35 -0
- package/dist/layers.zPlc1039.js +40 -0
- package/package.json +32 -16
- package/dist/layers.Cjs5EBWM.js +0 -343
- package/dist/layers.DPccTctI.js +0 -285
- package/dist/layers.DZ8DrrVn.js +0 -53491
- package/dist/layers.QVaGPbs3.js +0 -161
- package/dist/layers.VK3NB7Nd.js +0 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { jsx as l, jsxs as Z } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as K, useState as u, useContext as ee, useEffect as g } from "react";
|
|
3
|
+
import { useTranslation as te } from "react-i18next";
|
|
4
|
+
import { l as ie, a as oe, u as ae, C as ne, m as M, b as se, c as re, d as L, e as W, t as le, U as de, I as he, f as ge, h as ue, R as me, p as $, i as fe } from "./layers.vrcLKgWz.js";
|
|
5
|
+
import { LoadingOverlay as ce } from "@mantine/core";
|
|
6
|
+
import { showErrorNotification as pe } from "@layers-app/shared";
|
|
7
|
+
const j = (t) => {
|
|
8
|
+
const {
|
|
9
|
+
width: m,
|
|
10
|
+
height: n,
|
|
11
|
+
isLoading: d,
|
|
12
|
+
isError: v,
|
|
13
|
+
src: f,
|
|
14
|
+
id: c,
|
|
15
|
+
altText: p,
|
|
16
|
+
imageRef: w,
|
|
17
|
+
maxWidth: h
|
|
18
|
+
} = t;
|
|
19
|
+
return /* @__PURE__ */ Z(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: "media-wrapper",
|
|
23
|
+
style: {
|
|
24
|
+
width: m,
|
|
25
|
+
height: n,
|
|
26
|
+
display: "inline-flex",
|
|
27
|
+
position: "relative"
|
|
28
|
+
},
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ l(
|
|
31
|
+
ce,
|
|
32
|
+
{
|
|
33
|
+
visible: d,
|
|
34
|
+
zIndex: 1e3,
|
|
35
|
+
overlayProps: { backgroundOpacity: 0.5 },
|
|
36
|
+
loaderProps: { size: 24, color: "black" }
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ l(
|
|
40
|
+
we,
|
|
41
|
+
{
|
|
42
|
+
className: null,
|
|
43
|
+
src: f,
|
|
44
|
+
altText: p,
|
|
45
|
+
imageRef: w,
|
|
46
|
+
width: "inherit",
|
|
47
|
+
height: "inherit",
|
|
48
|
+
maxWidth: h || "auto",
|
|
49
|
+
id: c
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
function we({
|
|
57
|
+
altText: t,
|
|
58
|
+
className: m,
|
|
59
|
+
imageRef: n,
|
|
60
|
+
src: d,
|
|
61
|
+
width: v,
|
|
62
|
+
height: f,
|
|
63
|
+
maxWidth: c,
|
|
64
|
+
id: p
|
|
65
|
+
}) {
|
|
66
|
+
const [w, h] = u(!1);
|
|
67
|
+
return /* @__PURE__ */ l(
|
|
68
|
+
"img",
|
|
69
|
+
{
|
|
70
|
+
className: `${m || void 0} ${w ? "" : "loading"}`,
|
|
71
|
+
src: d,
|
|
72
|
+
alt: t,
|
|
73
|
+
ref: n,
|
|
74
|
+
style: {
|
|
75
|
+
height: f,
|
|
76
|
+
maxWidth: c,
|
|
77
|
+
width: v
|
|
78
|
+
},
|
|
79
|
+
onLoad: () => {
|
|
80
|
+
d.includes("splash") ? setTimeout(() => {
|
|
81
|
+
h(!0);
|
|
82
|
+
}, 100) : h(!0);
|
|
83
|
+
},
|
|
84
|
+
draggable: "false",
|
|
85
|
+
"data-id": p
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function Le({
|
|
90
|
+
src: t,
|
|
91
|
+
altText: m,
|
|
92
|
+
nodeKey: n,
|
|
93
|
+
width: d,
|
|
94
|
+
height: v,
|
|
95
|
+
maxWidth: f,
|
|
96
|
+
showCaption: c,
|
|
97
|
+
caption: p,
|
|
98
|
+
id: w,
|
|
99
|
+
create: h,
|
|
100
|
+
alignment: B
|
|
101
|
+
}) {
|
|
102
|
+
var F, T;
|
|
103
|
+
const R = K(null), [b, I] = u(!0), { isCollabActive: U } = ie(), [r] = oe(), [C, y] = u(!0), [s, z] = u({
|
|
104
|
+
width: 0,
|
|
105
|
+
height: 0
|
|
106
|
+
}), { start: G, cancel: V } = ae(), [q, P] = u(0), { fetchUploadMedia: A, fetchDeleteMedia: O, maxFileSize: Ie } = ee(ne), E = M.has(t) && (((F = M.get(t)) == null ? void 0 : F.mediaNodeKeys.length) === 0 || ((T = M.get(t)) == null ? void 0 : T.mediaNodeKeys.length) === void 0 || t.trim() === ""), { t: N } = te(), [Ce, J] = u(0);
|
|
107
|
+
g(() => r.registerDecoratorListener(() => {
|
|
108
|
+
J((e) => e + 1);
|
|
109
|
+
}), [E]), g(() => {
|
|
110
|
+
if (!t || t.startsWith("data:image/") || !t.trim()) {
|
|
111
|
+
I(!1);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const e = new Image();
|
|
115
|
+
e.src = t, e.onload = () => I(!1), e.onerror = () => {
|
|
116
|
+
I(!1);
|
|
117
|
+
};
|
|
118
|
+
}, [t, E]);
|
|
119
|
+
const Q = (e, o) => {
|
|
120
|
+
r.update(() => {
|
|
121
|
+
fe(null);
|
|
122
|
+
const i = L(n);
|
|
123
|
+
W(i) && i.setWidthAndHeight(e, o);
|
|
124
|
+
});
|
|
125
|
+
}, { historyState: k } = se(), {
|
|
126
|
+
settings: { showNestedEditorTreeView: H }
|
|
127
|
+
} = re(), [S, x] = u(!1);
|
|
128
|
+
function X(e) {
|
|
129
|
+
return e.endsWith(".svg") || e.includes("image/svg+xml");
|
|
130
|
+
}
|
|
131
|
+
function Y(e) {
|
|
132
|
+
return new Promise((o, i) => {
|
|
133
|
+
if (X(e)) {
|
|
134
|
+
o(0);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const a = new Image();
|
|
138
|
+
a.src = e, a.onload = () => {
|
|
139
|
+
o(a.width);
|
|
140
|
+
}, a.onerror = () => {
|
|
141
|
+
i(new Error("Failed to load image"));
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
g(() => {
|
|
146
|
+
h && x(!0);
|
|
147
|
+
}, [h]), g(() => {
|
|
148
|
+
let e = d, o = v, i = 100;
|
|
149
|
+
(t.includes("unsplash") ? t.trim() : !E && t.trim() || t.includes("upload-src-editor")) && t !== "upload" && Y(t).then((a) => {
|
|
150
|
+
typeof e == "number" && e < i && a < i ? (y(!0), z({
|
|
151
|
+
width: e,
|
|
152
|
+
height: o
|
|
153
|
+
})) : a < i ? (y(!0), z({
|
|
154
|
+
width: "auto",
|
|
155
|
+
height: "auto"
|
|
156
|
+
})) : (z({
|
|
157
|
+
width: a,
|
|
158
|
+
height: a
|
|
159
|
+
}), y(!1));
|
|
160
|
+
}).catch((a) => {
|
|
161
|
+
console.warn("Ошибка при загрузке изображения:", a.message);
|
|
162
|
+
});
|
|
163
|
+
}, [t, E]), g(() => {
|
|
164
|
+
s.width && s.height && C && r.update(() => {
|
|
165
|
+
const e = L(n);
|
|
166
|
+
W(e) && e.setWidthAndHeight(s.width, s.height);
|
|
167
|
+
});
|
|
168
|
+
}, [s.width, s.height, C]), g(() => {
|
|
169
|
+
const e = document.documentElement;
|
|
170
|
+
le(S, e);
|
|
171
|
+
}, [S]), g(() => r.registerCommand(
|
|
172
|
+
de,
|
|
173
|
+
(e) => (t === "upload" && _(e), !1),
|
|
174
|
+
he
|
|
175
|
+
), [t, b]);
|
|
176
|
+
const D = (e, o) => {
|
|
177
|
+
I(!1), r.update(() => {
|
|
178
|
+
const i = L(n);
|
|
179
|
+
W(i) && (i.setSrc(e), i.setId(o));
|
|
180
|
+
});
|
|
181
|
+
}, _ = (e) => {
|
|
182
|
+
I(!0);
|
|
183
|
+
const o = G();
|
|
184
|
+
A && A(
|
|
185
|
+
e[0],
|
|
186
|
+
(i, a) => {
|
|
187
|
+
D(i, a), P(0);
|
|
188
|
+
},
|
|
189
|
+
(i) => {
|
|
190
|
+
i && pe({
|
|
191
|
+
message: N("editor.gallery.errorFile")
|
|
192
|
+
}), P(0), D("", "");
|
|
193
|
+
},
|
|
194
|
+
o,
|
|
195
|
+
(i) => {
|
|
196
|
+
P(i);
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
return !t || t === "upload" ? /* @__PURE__ */ l(
|
|
201
|
+
ge,
|
|
202
|
+
{
|
|
203
|
+
uploading: !1,
|
|
204
|
+
onUpload: (e) => {
|
|
205
|
+
!A || !e.length || (_(e), x(!1));
|
|
206
|
+
},
|
|
207
|
+
popoverProps: {
|
|
208
|
+
opened: S,
|
|
209
|
+
position: "bottom",
|
|
210
|
+
onChange: x
|
|
211
|
+
},
|
|
212
|
+
onChange: (e) => {
|
|
213
|
+
x(!1), r.update(() => {
|
|
214
|
+
const o = L(n);
|
|
215
|
+
W(o) && o.setSrc(e);
|
|
216
|
+
});
|
|
217
|
+
},
|
|
218
|
+
children: /* @__PURE__ */ l(
|
|
219
|
+
ue,
|
|
220
|
+
{
|
|
221
|
+
title: N("editor.image.add_photo"),
|
|
222
|
+
icon: "photo",
|
|
223
|
+
onClick: () => x(!S),
|
|
224
|
+
isLoading: b,
|
|
225
|
+
progress: q,
|
|
226
|
+
onAfterCancel: () => {
|
|
227
|
+
V(), I(!1);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
) : C ? /* @__PURE__ */ l(
|
|
233
|
+
j,
|
|
234
|
+
{
|
|
235
|
+
width: s.width,
|
|
236
|
+
height: s.height,
|
|
237
|
+
isLoading: b,
|
|
238
|
+
isError: !1,
|
|
239
|
+
isIcon: C,
|
|
240
|
+
src: t,
|
|
241
|
+
id: w,
|
|
242
|
+
editor: r,
|
|
243
|
+
nodeKey: n,
|
|
244
|
+
fetchDeleteMedia: O,
|
|
245
|
+
altText: m,
|
|
246
|
+
imageRef: R,
|
|
247
|
+
maxWidth: f,
|
|
248
|
+
showCaption: c,
|
|
249
|
+
caption: p,
|
|
250
|
+
isCollabActive: U,
|
|
251
|
+
historyState: k,
|
|
252
|
+
showNestedEditorTreeView: H,
|
|
253
|
+
t: N
|
|
254
|
+
}
|
|
255
|
+
) : /* @__PURE__ */ l(
|
|
256
|
+
me,
|
|
257
|
+
{
|
|
258
|
+
editor: r,
|
|
259
|
+
isIcon: C,
|
|
260
|
+
width: $(d),
|
|
261
|
+
height: $(v),
|
|
262
|
+
initialWidth: s.width || "",
|
|
263
|
+
initialHeight: s.height || "",
|
|
264
|
+
onResizeEnd: Q,
|
|
265
|
+
alignment: B,
|
|
266
|
+
children: /* @__PURE__ */ l(
|
|
267
|
+
j,
|
|
268
|
+
{
|
|
269
|
+
width: "inherit",
|
|
270
|
+
height: "inherit",
|
|
271
|
+
isLoading: b,
|
|
272
|
+
isError: !1,
|
|
273
|
+
isIcon: C,
|
|
274
|
+
src: t,
|
|
275
|
+
id: w,
|
|
276
|
+
editor: r,
|
|
277
|
+
nodeKey: n,
|
|
278
|
+
fetchDeleteMedia: O,
|
|
279
|
+
altText: m,
|
|
280
|
+
imageRef: R,
|
|
281
|
+
maxWidth: f,
|
|
282
|
+
showCaption: c,
|
|
283
|
+
caption: p,
|
|
284
|
+
isCollabActive: U,
|
|
285
|
+
historyState: k,
|
|
286
|
+
showNestedEditorTreeView: H,
|
|
287
|
+
t: N
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
export {
|
|
294
|
+
Le as default
|
|
295
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./layers.DPkkvYnI.js");require("lodash-es");const Ve=require("./layers.COAF7f8g.js"),Oe=require("./layers.9QK1wiQj.js");require("./layers.B7pMHVvI.js");const Le=require("./layers.OJEt97_Q.js");var ce=(function(){var e=function(V,i,r,a){for(r=r||{},a=V.length;a--;r[V[a]]=i);return r},t=[1,3],l=[1,4],c=[1,5],u=[1,6],d=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],p=[1,18],h=[2,7],o=[1,22],g=[1,23],R=[1,24],v=[1,25],N=[1,26],x=[1,27],$=[1,20],S=[1,28],A=[1,29],M=[62,63],de=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],pe=[1,47],ye=[1,48],fe=[1,49],_e=[1,50],ge=[1,51],Ee=[1,52],Re=[1,53],L=[53,54],D=[1,64],P=[1,60],Y=[1,61],U=[1,62],B=[1,63],Q=[1,65],z=[1,69],X=[1,70],J=[1,67],Z=[1,68],I=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ne={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:function(i,r,a,n,y,s,K){var _=s.length-1;switch(y){case 4:this.$=s[_].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[_].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[_-3],s[_-4]);break;case 14:n.setNewReqId(s[_-2]);break;case 15:n.setNewReqText(s[_-2]);break;case 16:n.setNewReqRisk(s[_-2]);break;case 17:n.setNewReqVerifyMethod(s[_-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[_-3]);break;case 34:n.setNewElementType(s[_-2]);break;case 35:n.setNewElementDocRef(s[_-2]);break;case 38:n.addRelationship(s[_-2],s[_],s[_-4]);break;case 39:n.addRelationship(s[_-2],s[_-4],s[_]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},table:[{3:1,4:2,6:t,9:l,11:c,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:l,11:c,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(d,[2,6]),{3:12,4:2,6:t,9:l,11:c,13:u},{1:[2,2]},{4:17,5:p,7:13,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},e(d,[2,4]),e(d,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:p,7:31,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{4:17,5:p,7:32,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{4:17,5:p,7:33,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{4:17,5:p,7:34,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{4:17,5:p,7:35,8:h,9:l,11:c,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:v,35:N,36:x,44:$,62:S,63:A},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(M,[2,20]),e(M,[2,21]),e(M,[2,22]),e(M,[2,23]),e(M,[2,24]),e(M,[2,25]),e(de,[2,49]),e(de,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:pe,56:ye,57:fe,58:_e,59:ge,60:Ee,61:Re},{52:54,55:pe,56:ye,57:fe,58:_e,59:ge,60:Ee,61:Re},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(L,[2,40]),e(L,[2,41]),e(L,[2,42]),e(L,[2,43]),e(L,[2,44]),e(L,[2,45]),e(L,[2,46]),{54:[1,58]},{5:D,20:59,21:P,24:Y,26:U,28:B,30:Q},{5:z,30:X,46:66,47:J,49:Z},{23:71,62:S,63:A},{23:72,62:S,63:A},e(I,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:P,24:Y,26:U,28:B,30:Q},e(I,[2,19]),e(I,[2,33]),{22:[1,78]},{22:[1,79]},{5:z,30:X,46:80,47:J,49:Z},e(I,[2,37]),e(I,[2,38]),e(I,[2,39]),{23:81,62:S,63:A},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(I,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(I,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:107,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:108,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:109,21:P,24:Y,26:U,28:B,30:Q},{5:z,30:X,46:110,47:J,49:Z},{5:z,30:X,46:111,47:J,49:Z},e(I,[2,14]),e(I,[2,15]),e(I,[2,16]),e(I,[2,17]),e(I,[2,34]),e(I,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var a=new Error(i);throw a.hash=r,a}},parse:function(i){var r=this,a=[0],n=[],y=[null],s=[],K=this.table,_="",ee=0,me=0,ve=2,Ie=1,$e=s.slice.call(arguments,1),E=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);E.setInput(i,C.yy),C.yy.lexer=E,C.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var ae=E.yylloc;s.push(ae);var we=E.options&&E.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qe(){var q;return q=n.pop()||E.lex()||Ie,typeof q!="number"&&(q instanceof Array&&(n=q,q=n.pop()),q=r.symbols_[q]||q),q}for(var b,F,T,le,H={},te,w,be,ie;;){if(F=a[a.length-1],this.defaultActions[F]?T=this.defaultActions[F]:((b===null||typeof b>"u")&&(b=qe()),T=K[F]&&K[F][b]),typeof T>"u"||!T.length||!T[0]){var oe="";ie=[];for(te in K[F])this.terminals_[te]&&te>ve&&ie.push("'"+this.terminals_[te]+"'");E.showPosition?oe="Parse error on line "+(ee+1)+`:
|
|
2
|
+
`+E.showPosition()+`
|
|
3
|
+
Expecting `+ie.join(", ")+", got '"+(this.terminals_[b]||b)+"'":oe="Parse error on line "+(ee+1)+": Unexpected "+(b==Ie?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(oe,{text:E.match,token:this.terminals_[b]||b,line:E.yylineno,loc:ae,expected:ie})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+b);switch(T[0]){case 1:a.push(b),y.push(E.yytext),s.push(E.yylloc),a.push(T[1]),b=null,me=E.yyleng,_=E.yytext,ee=E.yylineno,ae=E.yylloc;break;case 2:if(w=this.productions_[T[1]][1],H.$=y[y.length-w],H._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},we&&(H._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),le=this.performAction.apply(H,[_,me,ee,C.yy,T[1],y,s].concat($e)),typeof le<"u")return le;w&&(a=a.slice(0,-1*w*2),y=y.slice(0,-1*w),s=s.slice(0,-1*w)),a.push(this.productions_[T[1]][0]),y.push(H.$),s.push(H._$),be=K[a[a.length-2]][a[a.length-1]],a.push(be);break;case 3:return!0}}return!0}},Ae=(function(){var V={EOF:1,parseError:function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+r+"^"},test_match:function(i,r){var a,n,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),n=i[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],a=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var s in y)this[s]=y[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,a,n;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),s=0;s<y.length;s++)if(a=this._input.match(this.rules[y[s]]),a&&(!r||a[0].length>r[0].length)){if(r=a,n=s,this.options.backtrack_lexer){if(i=this.test_match(a,y[s]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,y[n]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(r,a,n,y){switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return a.yytext=a.yytext.trim(),62}},rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return V})();ne.lexer=Ae;function re(){this.yy={}}return re.prototype=ne,ne.Parser=re,new re})();ce.parser=ce;const Ce=ce;let ue=[],k={},G={},O={},j={};const Fe={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},Me={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},De={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Pe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Ye=(e,t)=>(G[e]===void 0&&(G[e]={name:e,type:t,id:k.id,text:k.text,risk:k.risk,verifyMethod:k.verifyMethod}),k={},G[e]),Ue=()=>G,Be=e=>{k!==void 0&&(k.id=e)},Qe=e=>{k!==void 0&&(k.text=e)},He=e=>{k!==void 0&&(k.risk=e)},We=e=>{k!==void 0&&(k.verifyMethod=e)},Ke=e=>(j[e]===void 0&&(j[e]={name:e,type:O.type,docRef:O.docRef},m.log$1.info("Added new requirement: ",e)),O={},j[e]),Ge=()=>j,je=e=>{O!==void 0&&(O.type=e)},ze=e=>{O!==void 0&&(O.docRef=e)},Xe=(e,t,l)=>{ue.push({type:e,src:t,dst:l})},Je=()=>ue,Ze=()=>{ue=[],k={},G={},O={},j={},m.clear()},et={RequirementType:Fe,RiskLevel:Me,VerifyType:De,Relationships:Pe,getConfig:()=>m.getConfig().req,addRequirement:Ye,getRequirements:Ue,setNewReqId:Be,setNewReqText:Qe,setNewReqRisk:He,setNewReqVerifyMethod:We,setAccTitle:m.setAccTitle,getAccTitle:m.getAccTitle,setAccDescription:m.setAccDescription,getAccDescription:m.getAccDescription,addElement:Ke,getElements:Ge,setNewElementType:je,setNewElementDocRef:ze,addRelationship:Xe,getRelationships:Je,clear:Ze},tt=e=>`
|
|
7
|
+
|
|
8
|
+
marker {
|
|
9
|
+
fill: ${e.relationColor};
|
|
10
|
+
stroke: ${e.relationColor};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
marker.cross {
|
|
14
|
+
stroke: ${e.lineColor};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
svg {
|
|
18
|
+
font-family: ${e.fontFamily};
|
|
19
|
+
font-size: ${e.fontSize};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.reqBox {
|
|
23
|
+
fill: ${e.requirementBackground};
|
|
24
|
+
fill-opacity: 1.0;
|
|
25
|
+
stroke: ${e.requirementBorderColor};
|
|
26
|
+
stroke-width: ${e.requirementBorderSize};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.reqTitle, .reqLabel{
|
|
30
|
+
fill: ${e.requirementTextColor};
|
|
31
|
+
}
|
|
32
|
+
.reqLabelBox {
|
|
33
|
+
fill: ${e.relationLabelBackground};
|
|
34
|
+
fill-opacity: 1.0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.req-title-line {
|
|
38
|
+
stroke: ${e.requirementBorderColor};
|
|
39
|
+
stroke-width: ${e.requirementBorderSize};
|
|
40
|
+
}
|
|
41
|
+
.relationshipLine {
|
|
42
|
+
stroke: ${e.relationColor};
|
|
43
|
+
stroke-width: 1;
|
|
44
|
+
}
|
|
45
|
+
.relationshipLabel {
|
|
46
|
+
fill: ${e.relationLabelColor};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
`,it=tt,he={CONTAINS:"contains",ARROW:"arrow"},nt=(e,t)=>{let l=e.append("defs").append("marker").attr("id",he.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");l.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),l.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),l.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",he.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0
|
|
50
|
+
L${t.line_height},${t.line_height/2}
|
|
51
|
+
M${t.line_height},${t.line_height/2}
|
|
52
|
+
L0,${t.line_height}`).attr("stroke-width",1)},Se={ReqMarkers:he,insertLineEndings:nt};let f={},ke=0;const Te=(e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",f.rect_min_width+"px").attr("height",f.rect_min_height+"px"),Ne=(e,t,l)=>{let c=f.rect_min_width/2,u=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",c).attr("y",f.rect_padding).attr("dominant-baseline","hanging"),d=0;l.forEach(g=>{d==0?u.append("tspan").attr("text-anchor","middle").attr("x",f.rect_min_width/2).attr("dy",0).text(g):u.append("tspan").attr("text-anchor","middle").attr("x",f.rect_min_width/2).attr("dy",f.line_height*.75).text(g),d++});let p=1.5*f.rect_padding,h=d*f.line_height*.75,o=p+h;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",f.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:u,y:o}},xe=(e,t,l,c)=>{let u=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",f.rect_padding).attr("y",c).attr("dominant-baseline","hanging"),d=0;const p=30;let h=[];return l.forEach(o=>{let g=o.length;for(;g>p&&d<3;){let R=o.substring(0,p);o=o.substring(p,o.length),g=o.length,h[h.length]=R,d++}if(d==3){let R=h[h.length-1];h[h.length-1]=R.substring(0,R.length-4)+"..."}else h[h.length]=o;d=0}),h.forEach(o=>{u.append("tspan").attr("x",f.rect_padding).attr("dy",f.line_height).text(o)}),u},rt=(e,t,l,c)=>{const u=t.node().getTotalLength(),d=t.node().getPointAtLength(u*.5),p="rel"+ke;ke++;const o=e.append("text").attr("class","req relationshipLabel").attr("id",p).attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(c).node().getBBox();e.insert("rect","#"+p).attr("class","req reqLabelBox").attr("x",d.x-o.width/2).attr("y",d.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")},st=function(e,t,l,c,u){const d=l.edge(W(t.src),W(t.dst)),p=Le.line().x(function(o){return o.x}).y(function(o){return o.y}),h=e.insert("path","#"+c).attr("class","er relationshipLine").attr("d",p(d.points)).attr("fill","none");t.type==u.db.Relationships.CONTAINS?h.attr("marker-start","url("+m.common$1.getUrl(f.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+m.common$1.getUrl(f.arrowMarkerAbsolute)+"#"+Se.ReqMarkers.ARROW+"_line_ending)")),rt(e,h,f,`<<${t.type}>>`)},at=(e,t,l)=>{Object.keys(e).forEach(c=>{let u=e[c];c=W(c),m.log$1.info("Added new requirement: ",c);const d=l.append("g").attr("id",c),p="req-"+c,h=Te(d,p);let o=Ne(d,c+"_title",[`<<${u.type}>>`,`${u.name}`]);xe(d,c+"_body",[`Id: ${u.id}`,`Text: ${u.text}`,`Risk: ${u.risk}`,`Verification: ${u.verifyMethod}`],o.y);const g=h.node().getBBox();t.setNode(c,{width:g.width,height:g.height,shape:"rect",id:c})})},lt=(e,t,l)=>{Object.keys(e).forEach(c=>{let u=e[c];const d=W(c),p=l.append("g").attr("id",d),h="element-"+d,o=Te(p,h);let g=Ne(p,h+"_title",["<<Element>>",`${c}`]);xe(p,h+"_body",[`Type: ${u.type||"Not Specified"}`,`Doc Ref: ${u.docRef||"None"}`],g.y);const R=o.node().getBBox();t.setNode(d,{width:R.width,height:R.height,shape:"rect",id:d})})},ot=(e,t)=>(e.forEach(function(l){let c=W(l.src),u=W(l.dst);t.setEdge(c,u,{relationship:l})}),e),ct=function(e,t){t.nodes().forEach(function(l){l!==void 0&&t.node(l)!==void 0&&(e.select("#"+l),e.select("#"+l).attr("transform","translate("+(t.node(l).x-t.node(l).width/2)+","+(t.node(l).y-t.node(l).height/2)+" )"))})},W=e=>e.replace(/\s/g,"").replace(/\./g,"_"),ht=(e,t,l,c)=>{f=m.getConfig().requirement;const u=f.securityLevel;let d;u==="sandbox"&&(d=m.select("#i"+t));const h=(u==="sandbox"?m.select(d.nodes()[0].contentDocument.body):m.select("body")).select(`[id='${t}']`);Se.insertLineEndings(h,f);const o=new Oe.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:f.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let g=c.db.getRequirements(),R=c.db.getElements(),v=c.db.getRelationships();at(g,o,h),lt(R,o,h),ot(v,o),Ve.layout(o),ct(h,o),v.forEach(function(A){st(h,A,o,t,c)});const N=f.rect_padding,x=h.node().getBBox(),$=x.width+N*2,S=x.height+N*2;m.configureSvgSize(h,S,$,f.useMaxWidth),h.attr("viewBox",`${x.x-N} ${x.y-N} ${$} ${S}`)},ut={draw:ht},dt={parser:Ce,db:et,renderer:ut,styles:it};exports.diagram=dt;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./layers.DPkkvYnI.js");require("./layers.B7pMHVvI.js");const Y=require("./layers.DZVdzwBS.js");var J=(function(){var n=function(f,i,r,c){for(r=r||{},c=f.length;c--;r[f[c]]=i);return r},t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],s=[1,11],h=[1,12],l=[1,13],p=[1,16],y=[1,17],g={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(i,r,c,d,u,o,I){var b=o.length-1;switch(u){case 1:return o[b-1];case 2:this.$=[];break;case 3:o[b-1].push(o[b]),this.$=o[b-1];break;case 4:case 5:this.$=o[b];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(o[b].substr(6)),this.$=o[b].substr(6);break;case 9:this.$=o[b].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[b].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(o[b].substr(8)),this.$=o[b].substr(8);break;case 15:d.addTask(o[b],0,""),this.$=o[b];break;case 16:d.addEvent(o[b].substr(2)),this.$=o[b];break}},table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=r,c}},parse:function(i){var r=this,c=[0],d=[],u=[null],o=[],I=this.table,b="",$=0,W=0,C=2,P=1,B=o.slice.call(arguments,1),v=Object.create(this.lexer),S={yy:{}};for(var w in this.yy)Object.prototype.hasOwnProperty.call(this.yy,w)&&(S.yy[w]=this.yy[w]);v.setInput(i,S.yy),S.yy.lexer=v,S.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var T=v.yylloc;o.push(T);var A=v.options&&v.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(){var M;return M=d.pop()||v.lex()||P,typeof M!="number"&&(M instanceof Array&&(d=M,M=d.pop()),M=r.symbols_[M]||M),M}for(var k,L,E,U,R={},O,N,X,j;;){if(L=c[c.length-1],this.defaultActions[L]?E=this.defaultActions[L]:((k===null||typeof k>"u")&&(k=z()),E=I[L]&&I[L][k]),typeof E>"u"||!E.length||!E[0]){var Z="";j=[];for(O in I[L])this.terminals_[O]&&O>C&&j.push("'"+this.terminals_[O]+"'");v.showPosition?Z="Parse error on line "+($+1)+`:
|
|
2
|
+
`+v.showPosition()+`
|
|
3
|
+
Expecting `+j.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+($+1)+": Unexpected "+(k==P?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:v.match,token:this.terminals_[k]||k,line:v.yylineno,loc:T,expected:j})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+k);switch(E[0]){case 1:c.push(k),u.push(v.yytext),o.push(v.yylloc),c.push(E[1]),k=null,W=v.yyleng,b=v.yytext,$=v.yylineno,T=v.yylloc;break;case 2:if(N=this.productions_[E[1]][1],R.$=u[u.length-N],R._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},A&&(R._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),U=this.performAction.apply(R,[b,W,$,S.yy,E[1],u,o].concat(B)),typeof U<"u")return U;N&&(c=c.slice(0,-1*N*2),u=u.slice(0,-1*N),o=o.slice(0,-1*N)),c.push(this.productions_[E[1]][0]),u.push(R.$),o.push(R._$),X=I[c[c.length-2]][c[c.length-1]],c.push(X);break;case 3:return!0}}return!0}},_=(function(){var f={EOF:1,parseError:function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+r+"^"},test_match:function(i,r){var c,d,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),d=i[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var o in u)this[o]=u[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,c,d;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),o=0;o<u.length;o++)if(c=this._input.match(this.rules[u[o]]),c&&(!r||c[0].length>r[0].length)){if(r=c,d=o,this.options.backtrack_lexer){if(i=this.test_match(c,u[o]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,u[d]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(r,c,d,u){switch(d){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return f})();g.lexer=_;function m(){this.yy={}}return m.prototype=g,g.Parser=m,new m})();J.parser=J;const yt=J;let F="",nt=0;const K=[],q=[],V=[],st=()=>x.commonDb,it=function(){K.length=0,q.length=0,F="",V.length=0,x.clear()},rt=function(n){F=n,K.push(n)},at=function(){return K},lt=function(){let n=D();const t=100;let e=0;for(;!n&&e<t;)n=D(),e++;return q.push(...V),q},ot=function(n,t,e){const a={id:nt++,section:F,type:F,task:n,score:t||0,events:e?[e]:[]};V.push(a)},ct=function(n){V.find(e=>e.id===nt-1).events.push(n)},ht=function(n){const t={section:F,type:F,description:n,task:n,classes:[]};q.push(t)},D=function(){const n=function(e){return V[e].processed};let t=!0;for(const[e,a]of V.entries())n(e),t=t&&a.processed;return t},gt={clear:it,getCommonDb:st,addSection:rt,getSections:at,getTasks:lt,addTask:ot,addTaskOrg:ht,addEvent:ct},ft=Object.freeze(Object.defineProperty({__proto__:null,addEvent:ct,addSection:rt,addTask:ot,addTaskOrg:ht,clear:it,default:gt,getCommonDb:st,getSections:at,getTasks:lt},Symbol.toStringTag,{value:"Module"})),mt=12,G=function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},xt=function(n,t){const a=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=n.append("g");s.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(y){const g=Y.arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function l(y){const g=Y.arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function p(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return t.score>3?h(s):t.score<3?l(s):p(s),a},bt=function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},dt=function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),a=n.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),a},_t=function(n,t){function e(s,h,l,p,y){return s+","+h+" "+(s+l)+","+h+" "+(s+l)+","+(h+p-y)+" "+(s+l-y*1.2)+","+(h+p)+" "+s+","+(h+p)}const a=n.append("polygon");a.attr("points",e(t.x,t.y,50,20,7)),a.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,dt(n,t)},kt=function(n,t,e){const a=n.append("g"),s=Q();s.x=t.x,s.y=t.y,s.fill=t.fill,s.width=e.width,s.height=e.height,s.class="journey-section section-type-"+t.num,s.rx=3,s.ry=3,G(a,s),ut(e)(t.text,a,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+t.num},e,t.colour)};let tt=-1;const vt=function(n,t,e){const a=t.x+e.width/2,s=n.append("g");tt++,s.append("line").attr("id","task"+tt).attr("x1",a).attr("y1",t.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),xt(s,{cx:a,cy:300+(5-t.score)*30,score:t.score});const l=Q();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=e.width,l.height=e.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,G(s,l),t.x+14,ut(e)(t.task,s,l.x,l.y,l.width,l.height,{class:"task"},e,t.colour)},wt=function(n,t){G(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},St=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},Q=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},ut=(function(){function n(s,h,l,p,y,g,_,m){const f=h.append("text").attr("x",l+y/2).attr("y",p+g/2+5).style("font-color",m).style("text-anchor","middle").text(s);a(f,_)}function t(s,h,l,p,y,g,_,m,f){const{taskFontSize:i,taskFontFamily:r}=m,c=s.split(/<br\s*\/?>/gi);for(let d=0;d<c.length;d++){const u=d*i-i*(c.length-1)/2,o=h.append("text").attr("x",l+y/2).attr("y",p).attr("fill",f).style("text-anchor","middle").style("font-size",i).style("font-family",r);o.append("tspan").attr("x",l+y/2).attr("dy",u).text(c[d]),o.attr("y",p+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(o,_)}}function e(s,h,l,p,y,g,_,m){const f=h.append("switch"),r=f.append("foreignObject").attr("x",l).attr("y",p).attr("width",y).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");r.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),t(s,f,l,p,y,g,_,m),a(r,_)}function a(s,h){for(const l in h)l in h&&s.attr(l,h[l])}return function(s){return s.textPlacement==="fo"?e:s.textPlacement==="old"?n:t}})(),Et=function(n){n.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};function pt(n,t){n.each(function(){var e=x.select(this),a=e.text().split(/(\s+|<br>)/).reverse(),s,h=[],l=1.1,p=e.attr("y"),y=parseFloat(e.attr("dy")),g=e.text(null).append("tspan").attr("x",0).attr("y",p).attr("dy",y+"em");for(let _=0;_<a.length;_++)s=a[a.length-1-_],h.push(s),g.text(h.join(" ").trim()),(g.node().getComputedTextLength()>t||s==="<br>")&&(h.pop(),g.text(h.join(" ").trim()),s==="<br>"?h=[""]:h=[s],g=e.append("tspan").attr("x",0).attr("y",p).attr("dy",l+"em").text(s))})}const $t=function(n,t,e,a){const s=e%mt-1,h=n.append("g");t.section=s,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+s));const l=h.append("g"),p=h.append("g"),g=p.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,t.width).node().getBBox(),_=a.fontSize&&a.fontSize.replace?a.fontSize.replace("px",""):a.fontSize;return t.height=g.height+_*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,p.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),It(l,t,s),t},Tt=function(n,t,e){const a=n.append("g"),h=a.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,t.width).node().getBBox(),l=e.fontSize&&e.fontSize.replace?e.fontSize.replace("px",""):e.fontSize;return a.remove(),h.height+l*1.1*.5+t.padding},It=function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+10} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},H={drawRect:G,drawCircle:bt,drawSection:kt,drawText:dt,drawLabel:_t,drawTask:vt,drawBackgroundRect:wt,getTextObj:St,getNoteRect:Q,initGraphics:Et,drawNode:$t,getVirtualNodeHeight:Tt},Nt=function(n,t,e,a){var s,h;const l=x.getConfig(),p=l.leftMargin??50;x.log$1.debug("timeline",a.db);const y=l.securityLevel;let g;y==="sandbox"&&(g=x.select("#i"+t));const m=(y==="sandbox"?x.select(g.nodes()[0].contentDocument.body):x.select("body")).select("#"+t);m.append("g");const f=a.db.getTasks(),i=a.db.getCommonDb().getDiagramTitle();x.log$1.debug("task",f),H.initGraphics(m);const r=a.db.getSections();x.log$1.debug("sections",r);let c=0,d=0,u=0,o=0,I=50+p,b=50;o=50;let $=0,W=!0;r.forEach(function(S){const w={number:$,descr:S,section:$,width:150,padding:20,maxHeight:c},T=H.getVirtualNodeHeight(m,w,l);x.log$1.debug("sectionHeight before draw",T),c=Math.max(c,T+20)});let C=0,P=0;x.log$1.debug("tasks.length",f.length);for(const[S,w]of f.entries()){const T={number:S,descr:w,section:w.section,width:150,padding:20,maxHeight:d},A=H.getVirtualNodeHeight(m,T,l);x.log$1.debug("taskHeight before draw",A),d=Math.max(d,A+20),C=Math.max(C,w.events.length);let z=0;for(let k=0;k<w.events.length;k++){const E={descr:w.events[k],section:w.section,number:w.section,width:150,padding:20,maxHeight:50};z+=H.getVirtualNodeHeight(m,E,l)}P=Math.max(P,z)}x.log$1.debug("maxSectionHeight before draw",c),x.log$1.debug("maxTaskHeight before draw",d),r&&r.length>0?r.forEach(S=>{const w=f.filter(k=>k.section===S),T={number:$,descr:S,section:$,width:200*Math.max(w.length,1)-50,padding:20,maxHeight:c};x.log$1.debug("sectionNode",T);const A=m.append("g"),z=H.drawNode(A,T,$,l);x.log$1.debug("sectionNode output",z),A.attr("transform",`translate(${I}, ${o})`),b+=c+50,w.length>0&&et(m,w,$,I,b,d,l,C,P,c,!1),I+=200*Math.max(w.length,1),b=o,$++}):(W=!1,et(m,f,$,I,b,d,l,C,P,c,!0));const B=m.node().getBBox();x.log$1.debug("bounds",B),i&&m.append("text").text(i).attr("x",B.width/2-p).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),u=W?c+d+150:d+100,m.append("g").attr("class","lineWrapper").append("line").attr("x1",p).attr("y1",u).attr("x2",B.width+3*p).attr("y2",u).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),x.setupGraphViewbox$1(void 0,m,((s=l.timeline)==null?void 0:s.padding)??50,((h=l.timeline)==null?void 0:h.useMaxWidth)??!1)},et=function(n,t,e,a,s,h,l,p,y,g,_){var m;for(const f of t){const i={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:h};x.log$1.debug("taskNode",i);const r=n.append("g").attr("class","taskWrapper"),d=H.drawNode(r,i,e,l).height;if(x.log$1.debug("taskHeight after draw",d),r.attr("transform",`translate(${a}, ${s})`),h=Math.max(h,d),f.events){const u=n.append("g").attr("class","lineWrapper");let o=h;s+=100,o=o+Mt(n,f.events,e,a,s,l),s-=100,u.append("line").attr("x1",a+190/2).attr("y1",s+h).attr("x2",a+190/2).attr("y2",s+h+(_?h:g)+y+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}a=a+200,_&&!((m=l.timeline)!=null&&m.disableMulticolor)&&e++}s=s-10},Mt=function(n,t,e,a,s,h){let l=0;const p=s;s=s+100;for(const y of t){const g={descr:y,section:e,number:e,width:150,padding:20,maxHeight:50};x.log$1.debug("eventNode",g);const _=n.append("g").attr("class","eventWrapper"),f=H.drawNode(_,g,e,h).height;l=l+f,_.attr("transform",`translate(${a}, ${s})`),s=s+10+f}return s=p,l},Lt={setConf:()=>{},draw:Nt},Pt=n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],x.isDark(n["lineColor"+e])?n["lineColor"+e]=x.lighten(n["lineColor"+e],20):n["lineColor"+e]=x.darken(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const a=""+(17-3*e);t+=`
|
|
7
|
+
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
|
|
8
|
+
fill: ${n["cScale"+e]};
|
|
9
|
+
}
|
|
10
|
+
.section-${e-1} text {
|
|
11
|
+
fill: ${n["cScaleLabel"+e]};
|
|
12
|
+
}
|
|
13
|
+
.node-icon-${e-1} {
|
|
14
|
+
font-size: 40px;
|
|
15
|
+
color: ${n["cScaleLabel"+e]};
|
|
16
|
+
}
|
|
17
|
+
.section-edge-${e-1}{
|
|
18
|
+
stroke: ${n["cScale"+e]};
|
|
19
|
+
}
|
|
20
|
+
.edge-depth-${e-1}{
|
|
21
|
+
stroke-width: ${a};
|
|
22
|
+
}
|
|
23
|
+
.section-${e-1} line {
|
|
24
|
+
stroke: ${n["cScaleInv"+e]} ;
|
|
25
|
+
stroke-width: 3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lineWrapper line{
|
|
29
|
+
stroke: ${n["cScaleLabel"+e]} ;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
`}return t},At=n=>`
|
|
39
|
+
.edge {
|
|
40
|
+
stroke-width: 3;
|
|
41
|
+
}
|
|
42
|
+
${Pt(n)}
|
|
43
|
+
.section-root rect, .section-root path, .section-root circle {
|
|
44
|
+
fill: ${n.git0};
|
|
45
|
+
}
|
|
46
|
+
.section-root text {
|
|
47
|
+
fill: ${n.gitBranchLabel0};
|
|
48
|
+
}
|
|
49
|
+
.icon-container {
|
|
50
|
+
height:100%;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
.edge {
|
|
56
|
+
fill: none;
|
|
57
|
+
}
|
|
58
|
+
.eventWrapper {
|
|
59
|
+
filter: brightness(120%);
|
|
60
|
+
}
|
|
61
|
+
`,Ht=At,Ct={db:ft,renderer:Lt,parser:yt,styles:Ht};exports.diagram=Ct;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const c = Math.PI, x = 2 * c, u = 1e-6, m = x - u;
|
|
2
|
+
function E(e) {
|
|
3
|
+
this._ += e[0];
|
|
4
|
+
for (let t = 1, h = e.length; t < h; ++t)
|
|
5
|
+
this._ += arguments[t] + e[t];
|
|
6
|
+
}
|
|
7
|
+
function A(e) {
|
|
8
|
+
let t = Math.floor(e);
|
|
9
|
+
if (!(t >= 0)) throw new Error(`invalid digits: ${e}`);
|
|
10
|
+
if (t > 15) return E;
|
|
11
|
+
const h = 10 ** t;
|
|
12
|
+
return function(i) {
|
|
13
|
+
this._ += i[0];
|
|
14
|
+
for (let s = 1, n = i.length; s < n; ++s)
|
|
15
|
+
this._ += Math.round(arguments[s] * h) / h + i[s];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
class L {
|
|
19
|
+
constructor(t) {
|
|
20
|
+
this._x0 = this._y0 = // start of current subpath
|
|
21
|
+
this._x1 = this._y1 = null, this._ = "", this._append = t == null ? E : A(t);
|
|
22
|
+
}
|
|
23
|
+
moveTo(t, h) {
|
|
24
|
+
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +h}`;
|
|
25
|
+
}
|
|
26
|
+
closePath() {
|
|
27
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
|
|
28
|
+
}
|
|
29
|
+
lineTo(t, h) {
|
|
30
|
+
this._append`L${this._x1 = +t},${this._y1 = +h}`;
|
|
31
|
+
}
|
|
32
|
+
quadraticCurveTo(t, h, i, s) {
|
|
33
|
+
this._append`Q${+t},${+h},${this._x1 = +i},${this._y1 = +s}`;
|
|
34
|
+
}
|
|
35
|
+
bezierCurveTo(t, h, i, s, n, $) {
|
|
36
|
+
this._append`C${+t},${+h},${+i},${+s},${this._x1 = +n},${this._y1 = +$}`;
|
|
37
|
+
}
|
|
38
|
+
arcTo(t, h, i, s, n) {
|
|
39
|
+
if (t = +t, h = +h, i = +i, s = +s, n = +n, n < 0) throw new Error(`negative radius: ${n}`);
|
|
40
|
+
let $ = this._x1, r = this._y1, p = i - t, l = s - h, _ = $ - t, o = r - h, a = _ * _ + o * o;
|
|
41
|
+
if (this._x1 === null)
|
|
42
|
+
this._append`M${this._x1 = t},${this._y1 = h}`;
|
|
43
|
+
else if (a > u) if (!(Math.abs(o * p - l * _) > u) || !n)
|
|
44
|
+
this._append`L${this._x1 = t},${this._y1 = h}`;
|
|
45
|
+
else {
|
|
46
|
+
let d = i - $, f = s - r, y = p * p + l * l, T = d * d + f * f, g = Math.sqrt(y), v = Math.sqrt(a), w = n * Math.tan((c - Math.acos((y + a - T) / (2 * g * v))) / 2), M = w / v, b = w / g;
|
|
47
|
+
Math.abs(M - 1) > u && this._append`L${t + M * _},${h + M * o}`, this._append`A${n},${n},0,0,${+(o * d > _ * f)},${this._x1 = t + b * p},${this._y1 = h + b * l}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
arc(t, h, i, s, n, $) {
|
|
51
|
+
if (t = +t, h = +h, i = +i, $ = !!$, i < 0) throw new Error(`negative radius: ${i}`);
|
|
52
|
+
let r = i * Math.cos(s), p = i * Math.sin(s), l = t + r, _ = h + p, o = 1 ^ $, a = $ ? s - n : n - s;
|
|
53
|
+
this._x1 === null ? this._append`M${l},${_}` : (Math.abs(this._x1 - l) > u || Math.abs(this._y1 - _) > u) && this._append`L${l},${_}`, i && (a < 0 && (a = a % x + x), a > m ? this._append`A${i},${i},0,1,${o},${t - r},${h - p}A${i},${i},0,1,${o},${this._x1 = l},${this._y1 = _}` : a > u && this._append`A${i},${i},0,${+(a >= c)},${o},${this._x1 = t + i * Math.cos(n)},${this._y1 = h + i * Math.sin(n)}`);
|
|
54
|
+
}
|
|
55
|
+
rect(t, h, i, s) {
|
|
56
|
+
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +h}h${i = +i}v${+s}h${-i}Z`;
|
|
57
|
+
}
|
|
58
|
+
toString() {
|
|
59
|
+
return this._;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function P(e) {
|
|
63
|
+
return function() {
|
|
64
|
+
return e;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function q(e) {
|
|
68
|
+
let t = 3;
|
|
69
|
+
return e.digits = function(h) {
|
|
70
|
+
if (!arguments.length) return t;
|
|
71
|
+
if (h == null)
|
|
72
|
+
t = null;
|
|
73
|
+
else {
|
|
74
|
+
const i = Math.floor(h);
|
|
75
|
+
if (!(i >= 0)) throw new RangeError(`invalid digits: ${h}`);
|
|
76
|
+
t = i;
|
|
77
|
+
}
|
|
78
|
+
return e;
|
|
79
|
+
}, () => new L(t);
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
P as c,
|
|
83
|
+
q as w
|
|
84
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function r(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}exports.commonjsRequire=r;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "./layers.mwnm89da.js";
|
|
2
|
+
var u = { paste: "Қою", pasteAsPlaintext: "", pasteCharts: "Диаграммаларды қою", selectAll: "Бәрін таңдау", multiSelect: "", moveCanvas: "", cut: "Қию", copy: "Көшіру", copyAsPng: "", copyAsSvg: "", copyText: "", copySource: "", convertToCode: "", bringForward: "", sendToBack: "", bringToFront: "", sendBackward: "", delete: "Жою", copyStyles: "Стильдерді көшіру", pasteStyles: "Стильдерді қою", stroke: "", background: "", fill: "", strokeWidth: "", strokeStyle: "", strokeStyle_solid: "", strokeStyle_dashed: "", strokeStyle_dotted: "", sloppiness: "", opacity: "", textAlign: "", edges: "", sharp: "", round: "", arrowheads: "Нұсқар ұштары", arrowhead_none: "Жоқ", arrowhead_arrow: "Нұсқар", arrowhead_bar: "Тосқауыл", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "Қаріп өлшемі", fontFamily: "Қаріп тобы", addWatermark: "", handDrawn: "", normal: "Қалыпты", code: "", small: "Кіші", medium: "Орта", large: "Үлкен", veryLarge: "Өте үлкен", solid: "", hachure: "", zigzag: "", crossHatch: "", thin: "", bold: "", left: "Солға", center: "Ортаға", right: "Оңға", extraBold: "", architect: "", artist: "", cartoonist: "", fileTitle: "Файл атауы", colorPicker: "", canvasColors: "", canvasBackground: "", drawingCanvas: "", layers: "", actions: "", language: "Тіл", liveCollaboration: "", duplicateSelection: "Көшірме", untitled: "Атауысыз", name: "", yourName: "", madeWithExcalidraw: "", group: "", ungroup: "", collaborators: "", showGrid: "", addToLibrary: "", removeFromLibrary: "", libraryLoadingMessage: "", libraries: "", loadingScene: "", align: "", alignTop: "", alignBottom: "", alignLeft: "", alignRight: "", centerVertically: "", centerHorizontally: "", distributeHorizontally: "", distributeVertically: "", flipHorizontal: "", flipVertical: "", viewMode: "", share: "", showStroke: "", showBackground: "", toggleTheme: "", personalLib: "", excalidrawLib: "", decreaseFontSize: "", increaseFontSize: "", unbindText: "", bindText: "", createContainerFromText: "", link: { edit: "", editEmbed: "", create: "", createEmbed: "", label: "", labelEmbed: "", empty: "" }, lineEditor: { edit: "", exit: "" }, elementLock: { lock: "", unlock: "", lockAll: "", unlockAll: "" }, statusPublished: "", sidebarLock: "", selectAllElementsInFrame: "", removeAllElementsFromFrame: "", eyeDropper: "", textToDiagram: "", prompt: "" }, e = { noItems: "", hint_emptyLibrary: "", hint_emptyPrivateLibrary: "" }, a = { clearReset: "", exportJSON: "", exportImage: "", export: "", copyToClipboard: "", save: "", saveAs: "", load: "", getShareableLink: "", close: "Жабу", selectLanguage: "Тілді таңдау", scrollBackToContent: "", zoomIn: "", zoomOut: "", resetZoom: "", menu: "Mәзір", done: "Дайын", edit: "", undo: "", redo: "", resetLibrary: "", createNewRoom: "", fullScreen: "", darkMode: "", lightMode: "", zenMode: "", objectsSnapMode: "", exitZenMode: "", cancel: "", clear: "", remove: "", embed: "", publishLibrary: "", submit: "", confirm: "", embeddableInteractionButton: "" }, o = { clearReset: "", couldNotCreateShareableLink: "", couldNotCreateShareableLinkTooBig: "", couldNotLoadInvalidFile: "", importBackendFailed: "", cannotExportEmptyCanvas: "", couldNotCopyToClipboard: "", decryptFailed: "", uploadedSecurly: "", loadSceneOverridePrompt: "", collabStopOverridePrompt: "", errorAddingToLibrary: "", errorRemovingFromLibrary: "", confirmAddLibrary: "", imageDoesNotContainScene: "", cannotRestoreFromImage: "", invalidSceneUrl: "", resetLibrary: "", removeItemsFromsLibrary: "", invalidEncryptionKey: "", collabOfflineWarning: "" }, r = { unsupportedFileType: "", imageInsertError: "Суретті жүктеу мүмкін болмады. Кейінірек қайталап көріңіз...", fileTooBig: "Файл өте үлкен. Максималды рұқсат етілген көлем {{maxSize}}.", svgImageInsertError: "", failedToFetchImage: "", invalidSVGString: "", cannotResolveCollabServer: "", importLibraryError: "", collabSaveFailed: "", collabSaveFailed_sizeExceeded: "", imageToolNotSupported: "", brave_measure_text_error: { line1: "", line2: "", line3: "", line4: "" }, libraryElementTypeError: { embeddable: "", iframe: "", image: "" }, asyncPasteFailedOnRead: "", asyncPasteFailedOnParse: "", copyToSystemClipboardFailed: "" }, t = { selection: "", image: "Суретті қою", rectangle: "", diamond: "", ellipse: "", arrow: "Нұсқар", line: "", freedraw: "", text: "Мәтін", library: "", lock: "", penMode: "", link: "", eraser: "", frame: "", magicframe: "", embeddable: "", laser: "", hand: "", extraTools: "", mermaidToExcalidraw: "", magicSettings: "" }, i = { canvasActions: "", selectedShapeActions: "", shapes: "" }, l = { canvasPanning: "", linearElement: "", freeDraw: "", text: "", embeddable: "", text_selected: "", text_editing: "", linearElementMulti: "", lockAngle: "", resize: "", resizeImage: "", rotate: "", lineEditor_info: "", lineEditor_pointSelected: "", lineEditor_nothingSelected: "", placeImage: "", publishLibrary: "", bindTextToElement: "", deepBoxSelect: "", eraserRevert: "", firefox_clipboard_write: "", disableSnapping: "" }, n = { cannotShowPreview: "", canvasTooBig: "", canvasTooBigTip: "" }, s = { headingMain: "", clearCanvasMessage: "", clearCanvasCaveat: "", trackedToSentry: "", openIssueMessage: "", sceneContent: "" }, d = { desc_intro: "", desc_privacy: "", button_startSession: "", button_stopSession: "", desc_inProgressIntro: "", desc_shareLink: "", desc_exitSession: "", shareTitle: "" }, c = { title: "Қате" }, B = { disk_title: "", disk_details: "Сахна деректерін кейін қайта импорттауға болатын файлға экспорттаңыз.", disk_button: "Файлға сақтау", link_title: "Ортақ сілтеме", link_details: "Тек оқуға арналған сілтеме ретінде экспорттау.", link_button: "Сілтемеге экспорттау", excalidrawplus_description: "Сахнаны өзіңіздің Excalidraw+ жұмыс кеңістігінде сақтаңыз.", excalidrawplus_button: "Экспорт", excalidrawplus_exportError: "Қазіргі уақытта Excalidraw+ үшін экспорттау мүмкін емес..." }, m = { blog: "Біздің блогты оқу", click: "шерту", deepSelect: "", deepBoxSelect: "", curvedArrow: "Майысқан нұсқар", curvedLine: "Майысқан сызық", documentation: "Құжаттама", doubleClick: "қос шерту", drag: "апару", editor: "Өңдеу", editLineArrowPoints: "", editText: "", github: "Қате таптыңыз ба? Жолдаңыз", howto: "Біздің нұсқаулықтарды орындаңыз", or: "немесе", preventBinding: "Нұсқарды байланыстыруға жол бермеу", tools: "", shortcuts: "Пернетақта пәрмендері", textFinish: "Өңдеуді аяқтау (мәтіндік редактор)", textNewLine: "Жаңа жолға көшу (мәтіндік редактор)", title: "Көмек", view: "Көру", zoomToFit: "Барлық элементтердің көлеміне сәйкес үлкейту", zoomToSelection: "Таңдалғанды үлкейту", toggleElementLock: "", movePageUpDown: "", movePageLeftRight: "" }, p = { title: "" }, g = { title: "", itemName: "", authorName: "", githubUsername: "", twitterUsername: "", libraryName: "", libraryDesc: "", website: "", placeholder: { authorName: "", libraryName: "", libraryDesc: "", githubHandle: "", twitterHandle: "", website: "" }, errors: { required: "", website: "" }, noteDescription: "", noteGuidelines: "", noteLicense: "", noteItems: "", atleastOneLibItem: "", republishWarning: "" }, b = { title: "", content: "" }, A = { resetLibrary: "", removeItemsFromLib: "" }, E = { header: "", label: { withBackground: "", onlySelected: "", darkMode: "", embedScene: "", scale: "", padding: "" }, tooltip: { embedScene: "" }, title: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" }, button: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" } }, D = { tooltip: "Сіздің сызбаларыңыз өтпелі шифрлеу арқылы шифрланған, сондықтан Excalidraw серверлері оларды ешқашан көрмейді.", link: "Excalidraw қолданатын өтпелі шифрлеу туралы блог жазбасы" }, h = { angle: "Бұрыш", element: "Элемент", elements: "Элементтер", height: "Биіктігі", scene: "Сахна", selected: "Таңдалды", storage: "Сақтау көлемі", title: "", total: "Барлығы", version: "Нұсқа", versionCopy: "Көшіру үшін басыңыз", versionNotAvailable: "Бұл нұсқа қолжетімсіз", width: "Ені" }, y = { addedToLibrary: "", copyStyles: "Стильдер көшірілді.", copyToClipboard: "", copyToClipboardAsPng: "", fileSaved: "Файл сақталды.", fileSavedToFilename: "{filename} сақталды", canvas: "", selection: "таңдау", pasteAsSingleElement: "", unableToEmbed: "", unrecognizedLinkFormat: "" }, C = { transparent: "", black: "", white: "", red: "", pink: "", grape: "", violet: "", gray: "", blue: "", cyan: "", teal: "", green: "", yellow: "", orange: "", bronze: "" }, v = { app: { center_heading: "", center_heading_plus: "", menuHint: "" }, defaults: { menuHint: "", center_heading: "", toolbarHint: "", helpHint: "" } }, S = { mostUsedCustomColors: "", colors: "", shades: "", hexCode: "", noShades: "" }, w = { action: { exportToImage: { title: "", button: "", description: "" }, saveToDisk: { title: "", button: "", description: "" }, excalidrawPlus: { title: "", button: "", description: "" } }, modal: { loadFromFile: { title: "", button: "", description: "" }, shareableLink: { title: "", button: "", description: "" } } }, F = { title: "", button: "", description: "", syntax: "", preview: "" }, k = { labels: u, library: e, buttons: a, alerts: o, errors: r, toolBar: t, headings: i, hints: l, canvasError: n, errorSplash: s, roomDialog: d, errorDialog: c, exportDialog: B, helpDialog: m, clearCanvasDialog: p, publishDialog: g, publishSuccessDialog: b, confirmDialog: A, imageExportDialog: E, encrypted: D, stats: h, toast: y, colors: C, welcomeScreen: v, colorPicker: S, overwriteConfirm: w, mermaid: F };
|
|
3
|
+
export {
|
|
4
|
+
o as alerts,
|
|
5
|
+
a as buttons,
|
|
6
|
+
n as canvasError,
|
|
7
|
+
p as clearCanvasDialog,
|
|
8
|
+
S as colorPicker,
|
|
9
|
+
C as colors,
|
|
10
|
+
A as confirmDialog,
|
|
11
|
+
k as default,
|
|
12
|
+
D as encrypted,
|
|
13
|
+
c as errorDialog,
|
|
14
|
+
s as errorSplash,
|
|
15
|
+
r as errors,
|
|
16
|
+
B as exportDialog,
|
|
17
|
+
i as headings,
|
|
18
|
+
m as helpDialog,
|
|
19
|
+
l as hints,
|
|
20
|
+
E as imageExportDialog,
|
|
21
|
+
u as labels,
|
|
22
|
+
e as library,
|
|
23
|
+
F as mermaid,
|
|
24
|
+
w as overwriteConfirm,
|
|
25
|
+
g as publishDialog,
|
|
26
|
+
b as publishSuccessDialog,
|
|
27
|
+
d as roomDialog,
|
|
28
|
+
h as stats,
|
|
29
|
+
y as toast,
|
|
30
|
+
t as toolBar,
|
|
31
|
+
v as welcomeScreen
|
|
32
|
+
};
|