@layers-app/editor 0.5.5-optimization → 0.5.5
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/index.cjs +2 -2
- package/dist/index.js +10 -12
- package/dist/layers.0w5S-QQA.js +40 -0
- package/dist/layers.0wI6yvx5.js +39 -0
- package/dist/layers.2923K-vc.js +10 -0
- package/dist/layers.3hYFOwvv.js +8 -0
- package/dist/layers.52famHy6.js +1 -0
- package/dist/layers.5N13frHH.js +6 -0
- package/dist/layers.6IBx-qi5.js +10 -0
- package/dist/layers.7JqFgE4-.js +15 -0
- package/dist/layers.7QozyVZs.js +35 -0
- package/dist/layers.8jNiUB6g.js +1 -0
- package/dist/layers.9THUd_df.js +6 -0
- package/dist/layers.9cmmyava.js +1089 -0
- package/dist/layers.9dEXo7_C.js +13 -0
- package/dist/layers.9o_U5jfj.js +39 -0
- package/dist/layers.9pNaFvaX.js +1 -0
- package/dist/layers.AjDHx6UP.js +37 -0
- package/dist/layers.B-p6VlwR.js +9 -0
- package/dist/layers.B18ZgT9v.js +202 -0
- package/dist/layers.B19hGmey.js +1 -0
- package/dist/layers.B1wHHvE6.js +295 -0
- package/dist/layers.B3D4g2HH.js +1 -0
- package/dist/layers.B7K7JjK6.js +1510 -0
- package/dist/layers.B7dzLgTm.js +9 -0
- package/dist/layers.B8OtSObh.js +5 -0
- package/dist/layers.BAtv1CM7.js +1 -0
- package/dist/layers.BFcGp_Gv.js +220 -0
- package/dist/layers.BGyOsjNd.js +139 -0
- package/dist/layers.BHlsvftZ.js +9 -0
- package/dist/layers.BIWARpmB.js +41 -0
- package/dist/layers.BIeVwYKL.js +1 -0
- package/dist/layers.BJDrjORS.js +244 -0
- package/dist/layers.BKqtCWWZ.js +40 -0
- package/dist/layers.BLTdG0Mr.js +1619 -0
- package/dist/layers.BLd2spTm.js +1 -0
- package/dist/layers.BLuog6Kb.js +1034 -0
- package/dist/layers.BNDDJ_2_.js +9 -0
- package/dist/layers.BOz1yBau.js +2 -0
- package/dist/layers.BPDfSLMf.js +10 -0
- package/dist/layers.BQLM3liS.js +437 -0
- package/dist/layers.BRwzEFNo.js +40 -0
- package/dist/layers.BSTBZrFn.js +1 -0
- package/dist/layers.BTOiiuLQ.js +116 -0
- package/dist/layers.BXh8X6qB.js +10 -0
- package/dist/layers.BYHU1eYE.js +9 -0
- package/dist/layers.BZvD_ufq.js +10 -0
- package/dist/layers.BbCfEXyj.js +55 -0
- package/dist/layers.Bc-lInMK.js +793 -0
- package/dist/layers.BcrGngrS.js +1 -0
- package/dist/layers.BcvHk4_r.js +38 -0
- package/dist/layers.BdQk3Yld.js +802 -0
- package/dist/layers.BgJWoaX0.js +4 -0
- package/dist/layers.BldbIWu1.js +8 -0
- package/dist/layers.BmRLb_KH.js +70 -0
- package/dist/layers.BmXMWXPz.js +189 -0
- package/dist/layers.Bp5rrf5G.js +10 -0
- package/dist/layers.BpilXLfW.js +6 -0
- package/dist/layers.Bq14VT1U.js +40 -0
- package/dist/layers.BqdpPAoB.js +10 -0
- package/dist/layers.BqtKL1Vm.js +1283 -0
- package/dist/layers.BrFrT4aC.js +9 -0
- package/dist/layers.BrJ_0UsE.js +9 -0
- package/dist/layers.Bs0j4fBT.js +1 -0
- package/dist/layers.Bt-00ZMW.js +7 -0
- package/dist/layers.BufenkCO.js +39 -0
- package/dist/layers.BvQnydnN.js +39 -0
- package/dist/layers.Bvgecag6.js +1 -0
- package/dist/layers.Bw1mFZXl.js +11 -0
- package/dist/layers.BwKKYwFD.js +11 -0
- package/dist/layers.BwiupTbi.js +1359 -0
- package/dist/layers.BxDjh9NF.js +1 -0
- package/dist/layers.ByQyHVoi.js +1 -0
- package/dist/layers.BymfnWMg.js +39 -0
- package/dist/layers.ByxHbusl.js +230 -0
- package/dist/layers.BzNb_e9O.js +96 -0
- package/dist/layers.C-wRhDxe.js +6 -0
- package/dist/layers.C09RI0Hd.js +769 -0
- package/dist/layers.C0Lgw_Sx.js +11688 -0
- package/dist/layers.C1-YETKR.js +35 -0
- package/dist/layers.C1KOVN1R.js +268 -0
- package/dist/layers.C3269RRe.js +48146 -0
- package/dist/layers.C5JuEsOS.js +2479 -0
- package/dist/layers.C5PbzZgC.js +8 -0
- package/dist/layers.C7JUGsGr.js +791 -0
- package/dist/layers.C8QG97nQ.js +40 -0
- package/dist/layers.C8_lu5UH.js +23 -0
- package/dist/layers.C9Xny9c1.js +7 -0
- package/dist/layers.C9vKJCjt.js +122 -0
- package/dist/layers.CA0K1Ecr.js +39 -0
- package/dist/layers.CAYtCPJ-.js +3 -0
- package/dist/layers.CBMcoJVX.js +207 -0
- package/dist/layers.CGLureRh.js +282 -0
- package/dist/layers.CGUTAZ4d.js +1 -0
- package/dist/layers.CHZsXQcr.js +1 -0
- package/dist/layers.CIN0toZS.js +41 -0
- package/dist/layers.CJW9IXO2.js +5 -0
- package/dist/layers.CLzT5cMn.js +8 -0
- package/dist/layers.COAN95H3.js +6 -0
- package/dist/layers.CQWT2Mii.js +51 -0
- package/dist/layers.CRgvTT9V.js +40 -0
- package/dist/layers.CSwGb7jy.js +373 -0
- package/dist/layers.CTXOKanI.js +37 -0
- package/dist/layers.CUvrvILv.js +257 -0
- package/dist/layers.CVoblPs8.js +38 -0
- package/dist/layers.CYLKHgxd.js +11 -0
- package/dist/layers.CYVid0EG.js +1 -0
- package/dist/layers.CZUjXb0C.js +2235 -0
- package/dist/layers.CZZTB1Zf.js +1 -0
- package/dist/layers.CZfSnJsL.js +40 -0
- package/dist/layers.C_IvrzZ3.js +7 -0
- package/dist/layers.C_yNmq9N.js +42 -0
- package/dist/layers.CcITvqlZ.js +8 -0
- package/dist/layers.CcOERYl9.js +41 -0
- package/dist/layers.Cedtkbht.js +1 -0
- package/dist/layers.CfOIPoIP.js +960 -0
- package/dist/layers.Cfc57ihF.js +1 -0
- package/dist/layers.Cm_DIS6r.js +1 -0
- package/dist/layers.CnT6veDF.js +6 -0
- package/dist/layers.CqVTtuYm.js +6 -0
- package/dist/layers.Crx6In_3.js +320 -0
- package/dist/layers.CsAIsRSb.js +1126 -0
- package/dist/layers.Ct32pzvN.js +8 -0
- package/dist/layers.CuGuJloE.js +37 -0
- package/dist/layers.CvSFem62.js +1265 -0
- package/dist/layers.Cwlheu8b.js +8 -0
- package/dist/layers.Cxv0DB_2.js +32 -0
- package/dist/layers.CyWzLA6t.js +6 -0
- package/dist/layers.Cy_HIaDA.js +36 -0
- package/dist/layers.Cyzu9PKQ.js +1 -0
- package/dist/layers.CzhdqFIN.js +7 -0
- package/dist/layers.D-4serHw.js +7 -0
- package/dist/layers.D-b32wWh.js +40 -0
- package/dist/layers.D0MPYC0b.js +41 -0
- package/dist/layers.D0zn4_Mx.js +1 -0
- package/dist/layers.D10hg7vI.js +11 -0
- package/dist/layers.D1hV7KX6.js +10 -0
- package/dist/layers.D2ErdcjU.js +38 -0
- package/dist/layers.D3WNiVgt.js +32 -0
- package/dist/layers.D3t8YKFv.js +1 -0
- package/dist/layers.D4T8fTcj.js +1223 -0
- package/dist/layers.D7jGxypv.js +8 -0
- package/dist/layers.D7sSY6DB.js +803 -0
- package/dist/layers.D9BJhiZI.js +42 -0
- package/dist/layers.DAoIveAz.js +186 -0
- package/dist/layers.DB9dq9br.js +1 -0
- package/dist/layers.DFb_R5xT.js +59 -0
- package/dist/layers.DFun-dAk.js +501 -0
- package/dist/layers.DGxdKpV_.js +2 -0
- package/dist/layers.DHHxFvMb.js +5 -0
- package/dist/layers.DIbNVZML.js +8 -0
- package/dist/layers.DIn3k5ZL.js +8 -0
- package/dist/layers.DKcXlOsV.js +9 -0
- package/dist/layers.DL8jwGhD.js +39 -0
- package/dist/layers.DLwuMfdd.js +84 -0
- package/dist/layers.DMOxf396.js +21763 -0
- package/dist/layers.DMkBISW1.js +1 -0
- package/dist/layers.DN9HoVxI.js +18 -0
- package/dist/layers.DNciL9-y.js +1 -0
- package/dist/layers.DNrSuXGz.js +36 -0
- package/dist/layers.DOrgOHBr.js +1 -0
- package/dist/layers.DQSP86ib.js +84 -0
- package/dist/layers.DSCF8EF6.js +33 -0
- package/dist/layers.DSjAbsiI.js +61 -0
- package/dist/layers.DT4LICiJ.js +2 -0
- package/dist/layers.DUD9gnsf.js +1 -0
- package/dist/layers.DUoRCKF0.js +904 -0
- package/dist/layers.DVl3Vhqz.js +1580 -0
- package/dist/layers.DY8pSuUr.js +10 -0
- package/dist/layers.D_d_ismX.js +423 -0
- package/dist/layers.Day8795K.js +931 -0
- package/dist/layers.DbaKVP5e.js +1 -0
- package/dist/layers.DcbHyTt0.js +425 -0
- package/dist/layers.DdET72Yw.js +42 -0
- package/dist/layers.Ddvc5nMM.js +5 -0
- package/dist/layers.De-QCmxS.js +84 -0
- package/dist/layers.DfaNM_-P.js +1 -0
- package/dist/layers.DiArSMcJ.js +41 -0
- package/dist/layers.Did2Ok8I.js +9 -0
- package/dist/layers.DjUOC4st.js +16 -0
- package/dist/layers.Dm2vTHWN.js +10 -0
- package/dist/layers.Dnnqwk-X.js +42 -0
- package/dist/layers.DoXnyJKj.js +39 -0
- package/dist/layers.DtaYwVxW.js +2966 -0
- package/dist/layers.DtiGznGH.js +1 -0
- package/dist/layers.DubbxAyz.js +35 -0
- package/dist/layers.DvSvsOmi.js +19 -0
- package/dist/layers.DxA6ocdw.js +70 -0
- package/dist/layers.Dy1naDTQ.js +14 -0
- package/dist/layers.DyGbCQD1.js +1 -0
- package/dist/layers.Dz51Anc0.js +32 -0
- package/dist/layers.E9yWRmfi.js +4 -0
- package/dist/layers.JWCLFILJ.js +1 -0
- package/dist/layers.JrQOR4SH.js +33 -0
- package/dist/layers.MCj3WEVm.js +36 -0
- package/dist/layers.NMJzuWfA.js +9 -0
- package/dist/layers.O2J31sgD.js +46859 -0
- package/dist/layers.OGt-lv_l.js +1088 -0
- package/dist/layers.OuVKSFg8.js +41 -0
- package/dist/layers.PfvZQj0b.js +52 -0
- package/dist/layers.S9rhoDh3.js +21938 -0
- package/dist/layers.SV9c-xJ4.js +7 -0
- package/dist/layers.TxMpB1Hi.js +9166 -0
- package/dist/layers.UFIAgb9q.js +1 -0
- package/dist/layers.UT_N-vRk.js +1 -0
- package/dist/layers.VBl-Oztn.js +40 -0
- package/dist/layers.VMY9os8P.js +160 -0
- package/dist/layers.VwL8osbr.js +304 -0
- package/dist/layers.WP57UvSl.js +4 -0
- package/dist/layers.Y8QuC6mk.js +1 -0
- package/dist/layers.ZY7cShzc.js +7 -0
- package/dist/layers.b0h5ZBmD.js +61 -0
- package/dist/layers.c3O_eVw7.js +40 -0
- package/dist/layers.ceGsXYNa.js +41 -0
- package/dist/layers.dpXRC-w3.js +34 -0
- package/dist/layers.eJBQATnQ.js +1 -0
- package/dist/layers.ft1FusK9.js +118 -0
- package/dist/layers.gU8QcMnC.js +32 -0
- package/dist/layers.hSbpOWP5.js +42 -0
- package/dist/layers.hweLqW3I.js +261 -0
- package/dist/layers.i3ws09Iv.js +8 -0
- package/dist/layers.i7sPHczK.js +36 -0
- package/dist/layers.iCIkc7_N.js +41 -0
- package/dist/layers.kOvRCr2f.js +7 -0
- package/dist/layers.lA1sY3Ml.js +32 -0
- package/dist/layers.lCpg7dOn.js +21 -0
- package/dist/layers.lK-yASGE.js +139 -0
- package/dist/layers.mOFjA605.js +37 -0
- package/dist/layers.mSTd6mKy.js +5 -0
- package/dist/layers.pK4ABsGq.js +14 -0
- package/dist/layers.ps4Hq2c-.js +65 -0
- package/dist/layers.rt6zsYSf.js +44 -0
- package/dist/layers.sZjUuIto.js +11 -0
- package/dist/layers.tAiRbzBD.js +4 -0
- package/dist/layers.u25KgIS2.js +7 -0
- package/dist/layers.weqd2nEj.js +32 -0
- package/dist/layers.ykNftii-.js +39 -0
- package/dist/layers.zGHylA_8.js +1 -0
- package/package.json +18 -77
- package/dist/layers.B10sB-Vy.js +0 -1
- package/dist/layers.BDsvvINb.js +0 -6774
- package/dist/layers.BFJ7oQiY.js +0 -7723
- package/dist/layers.BwyONivc.js +0 -864
- package/dist/layers.C2lacXcg.js +0 -2511
- package/dist/layers.C69TrYD7.js +0 -7
- package/dist/layers.CEMW9z_P.js +0 -4
- package/dist/layers.Cwao1pOZ.js +0 -6
- package/dist/layers.CzNz0Zya.js +0 -1
- package/dist/layers.D0Z-zLAV.js +0 -530
- package/dist/layers.DNCgFYS7.js +0 -27
- package/dist/layers.EKDSoJm1.js +0 -2227
- package/dist/layers.QjAkD17S.js +0 -3677
- package/dist/layers.ahDFHQXD.js +0 -341
- package/dist/layers.eLiGm-eZ.js +0 -3
- package/dist/layers.hgliNTDV.js +0 -2
|
@@ -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,18 @@
|
|
|
1
|
+
const l = async (e) => {
|
|
2
|
+
const a = await e.getFile();
|
|
3
|
+
return a.handle = e, a;
|
|
4
|
+
};
|
|
5
|
+
var p = async (e = [{}]) => {
|
|
6
|
+
Array.isArray(e) || (e = [e]);
|
|
7
|
+
const a = [];
|
|
8
|
+
e.forEach((i, c) => {
|
|
9
|
+
a[c] = { description: i.description || "", accept: {} }, i.mimeTypes ? i.mimeTypes.map((n) => {
|
|
10
|
+
a[c].accept[n] = i.extensions || [];
|
|
11
|
+
}) : a[c].accept["*/*"] = i.extensions || [];
|
|
12
|
+
});
|
|
13
|
+
const t = await window.showOpenFilePicker({ id: e[0].id, startIn: e[0].startIn, types: a, multiple: e[0].multiple || !1, excludeAcceptAllOption: e[0].excludeAcceptAllOption || !1 }), s = await Promise.all(t.map(l));
|
|
14
|
+
return e[0].multiple ? s : s[0];
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
p as default
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./layers.De-QCmxS.js");require("./layers.ByxHbusl.js");var e=typeof document<"u"?document.currentScript:null,n=(typeof document>"u"?require("url").pathToFileURL(__filename).href:e&&e.tagName.toUpperCase()==="SCRIPT"&&e.src||new URL("layers.DNciL9-y.js",document.baseURI).href)?new URL(typeof document>"u"?require("url").pathToFileURL(__filename).href:e&&e.tagName.toUpperCase()==="SCRIPT"&&e.src||new URL("layers.DNciL9-y.js",document.baseURI).href):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async r=>{switch(r.data.command){case a.CB.Subset:let t=await a.NQ(r.data.arrayBuffer,r.data.codePoints);self.postMessage(t,{transfer:[t]});break}});exports.WorkerUrl=n;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./layers.DMOxf396.js";
|
|
2
|
+
var u = { paste: "Dán", pasteAsPlaintext: "Dán kiểu văn bản thuần", pasteCharts: "Dán biểu đồ", selectAll: "Chọn tất cả", multiSelect: "Thêm mới vào Select", moveCanvas: "Di chuyển canvas", cut: "Cắt", copy: "Sao chép", copyAsPng: "Sao chép vào bộ nhớ tạm dưới dạng PNG", copyAsSvg: "Sao chép vào bộ nhớ tạm dưới dạng SVG", copyText: "Sao chép vào bộ nhớ tạm dưới dạng chữ", copySource: "", convertToCode: "", bringForward: "Đưa ra trước", sendToBack: "Hạ xuống dưới", bringToFront: "Đưa ra đầu tiên", sendBackward: "Hạ xuống cuối", delete: "Xóa", copyStyles: "Sao chép định dạng", pasteStyles: "Dán định dạng", stroke: "Nét", background: "Nền", fill: "Fill", strokeWidth: "Độ dày nét", strokeStyle: "Kiểu nét", strokeStyle_solid: "Khối", strokeStyle_dashed: "Gạch ngang", strokeStyle_dotted: "Nhiều chấm", sloppiness: "Hoa văn nét", opacity: "Độ trong suốt", textAlign: "Căn chỉnh văn bản", edges: "Cạnh", sharp: "Nhọn", round: "Tròn", arrowheads: "Đầu mũi tên", arrowhead_none: "Không", arrowhead_arrow: "Mũi tên", arrowhead_bar: "Thanh", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "Tam giác", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "Cỡ chữ", fontFamily: "Phông chữ", addWatermark: 'Làm với Excalidraw"', handDrawn: "Vẽ tay", normal: "Bình thường", code: "Mã", small: "Nhỏ", medium: "Vừa", large: "Lớn", veryLarge: "Rất lớn", solid: "Đặc", hachure: "Nét gạch gạch", zigzag: "Zigzag", crossHatch: "Nét gạch chéo", thin: "Mỏng", bold: "In đậm", left: "Trái", center: "Giữa", right: "Phải", extraBold: "Nét siêu đậm", architect: "Kiến trúc sư", artist: "Nghệ sỹ", cartoonist: "Hoạt hình", fileTitle: "Tên tập tin", colorPicker: "Chọn màu", canvasColors: "Đã dùng trên canvas", canvasBackground: "Nền canvas", drawingCanvas: "Canvas vẽ", layers: "Lớp", actions: "Chức năng", language: "Ngôn ngữ", liveCollaboration: "Hợp tác trực tiếp...", duplicateSelection: "Tạo bản sao", untitled: "Không có tiêu đề", name: "Tên", yourName: "Tên của bạn", madeWithExcalidraw: "Làm với Excalidraw", group: "Gộp nhóm lại lựa chọn", ungroup: "Tách nhóm lựa chọn", collaborators: "Cộng tác viên", showGrid: "Hiển thị lưới", addToLibrary: "Thêm vào thư viện", removeFromLibrary: "Xóa khỏi thư viện", libraryLoadingMessage: "Đang tải thư viện…", libraries: "Xem thư viện", loadingScene: "Đang tải về…", align: "Căn chỉnh", alignTop: "Căn trên", alignBottom: "Căn dưới", alignLeft: "Canh trái", alignRight: "Canh phải", centerVertically: "Giữa theo chiều dọc", centerHorizontally: "Giữa theo chiều ngang", distributeHorizontally: "Phân bố theo chiều ngang", distributeVertically: "Phân bố theo chiều dọc", flipHorizontal: "Lật ngang", flipVertical: "Lật dọc", viewMode: "Chế độ xem", share: "Chia sẻ", showStroke: "Hiển thị chọn màu", showBackground: "Hiện thị chọn màu nền", toggleTheme: "", personalLib: "Thư viện cá nhân", excalidrawLib: "Thư viện Excalidraw", decreaseFontSize: "Giảm cỡ chữ", increaseFontSize: "Tăng cỡ chữ", unbindText: "", bindText: "", createContainerFromText: "", link: { edit: "Sửa liên kết", editEmbed: "", create: "Tạo liên kết", createEmbed: "", label: "Liên kết", labelEmbed: "", empty: "" }, lineEditor: { edit: "Điều chỉnh nét", exit: "Thoát chỉnh nét" }, elementLock: { lock: "Khoá", unlock: "Mở khoá", lockAll: "Khóa tất cả", unlockAll: "Mở khóa tất cả" }, statusPublished: "Đã đăng tải", sidebarLock: "Giữ thanh bên luôn mở", selectAllElementsInFrame: "", removeAllElementsFromFrame: "", eyeDropper: "", textToDiagram: "", prompt: "" }, E = { noItems: "Chưa có món nào...", hint_emptyLibrary: "Chọn một món trên canvas để thêm nó vào đây, hoặc cài đặt thư viện từ kho lưu trữ công cộng, ở bên dưới.", hint_emptyPrivateLibrary: "Chọn một món trên canvas để thêm nó vào đây." }, n = { clearReset: "Reset canvas", exportJSON: "Xuất ra tập tin", exportImage: "Xuất file ảnh...", export: "Lưu vào...", copyToClipboard: "Sao chép vào bộ nhớ tạm", save: "Lưu vào tập tin hiện tại", saveAs: "Lưu thành", load: "Mở", getShareableLink: "Tạo liên kết để chia sẻ", close: "Đóng", selectLanguage: "Chọn ngôn ngữ", scrollBackToContent: "Cuộn về nội dung chính", zoomIn: "Phóng to", zoomOut: "Thu nhỏ", resetZoom: "Đặt lại thu phóng", menu: "Bảng chọn", done: "Xong", edit: "Chỉnh sửa", undo: "Hoàn tác", redo: "Làm lại", resetLibrary: "", createNewRoom: "Tạo phòng mới", fullScreen: "Toàn màn hình", darkMode: "Chế độ tối", lightMode: "Chế độ sáng", zenMode: "Chế độ zen", objectsSnapMode: "", exitZenMode: "Thoát chể độ zen", cancel: "Hủy", clear: "Làm sạch", remove: "Xóa", embed: "", publishLibrary: "Đăng tải", submit: "Gửi", confirm: "Xác nhận", embeddableInteractionButton: "" }, e = { clearReset: "Điều này sẽ dọn hết canvas. Bạn có chắc không?", couldNotCreateShareableLink: "Không thể tạo đường dẫn chia sẻ.", couldNotCreateShareableLinkTooBig: "Không thể tạo đường dẫn chia sẻ: bản vẽ quá lớn", couldNotLoadInvalidFile: "Không thể load tập tin không hợp lệ", importBackendFailed: "", cannotExportEmptyCanvas: "Không thể xuất canvas trống.", couldNotCopyToClipboard: "", decryptFailed: "Không thể giải mã dữ liệu.", uploadedSecurly: "", loadSceneOverridePrompt: "", collabStopOverridePrompt: `Dừng phiên sẽ ghi đè lên bản vẽ được lưu trữ cục bộ trước đó của bạn. Bạn có chắc không?
|
|
3
|
+
|
|
4
|
+
(Nếu bạn muốn giữ bản vẽ cục bộ của mình, chỉ cần đóng tab trình duyệt.)`, errorAddingToLibrary: "Không thể thêm món vào thư viện", errorRemovingFromLibrary: "Không thể xoá món khỏi thư viện", confirmAddLibrary: "Hình {{numShapes}} sẽ được thêm vào thư viện. Bạn chắc chứ?", imageDoesNotContainScene: "Hình ảnh này dường như không chứa bất kỳ dữ liệu cảnh nào. Bạn đã bật tính năng nhúng cảnh khi xuất chưa?", cannotRestoreFromImage: "", invalidSceneUrl: "", resetLibrary: "", removeItemsFromsLibrary: "Xoá {{count}} món từ thư viện?", invalidEncryptionKey: "Khóa mã hóa phải có 22 ký tự. Hợp tác trực tiếp bị vô hiệu hóa.", collabOfflineWarning: `Không có kết nối internet.
|
|
5
|
+
Thay đổi của bạn sẽ không được lưu!` }, t = { unsupportedFileType: "Loại tập tin không được hỗ trợ.", imageInsertError: "Không thể thêm ảnh. Hãy thử lại sau...", fileTooBig: "Tệp tin quá lớn. Dung lượng tối đa cho phép là {{maxSize}}.", svgImageInsertError: "Không thể thêm ảnh SVG. Mã SVG có vẻ sai.", failedToFetchImage: "", invalidSVGString: "SVG không hợp lệ.", cannotResolveCollabServer: "Không thể kết nối với máy chủ hợp tác. Hãy tải lại trang và thử lại.", importLibraryError: "Không thể tải thư viện", collabSaveFailed: "Không thể lưu vào cơ sở dữ liệu. Nếu vấn đề tiếp tục xảy ra, bạn nên lưu tệp vào máy để đảm bảo bạn không bị mất công việc.", collabSaveFailed_sizeExceeded: "Không thể lưu vào cơ sở dữ liệu, canvas có vẻ quá lớn. Bạn nên lưu tệp cục bộ để đảm bảo bạn không bị mất công việc.", imageToolNotSupported: "", brave_measure_text_error: { line1: "", line2: "", line3: "", line4: "" }, libraryElementTypeError: { embeddable: "", iframe: "", image: "" }, asyncPasteFailedOnRead: "", asyncPasteFailedOnParse: "", copyToSystemClipboardFailed: "" }, a = { selection: "Lựa chọn", image: "Chèn ảnh", rectangle: "Hình chữ nhật", diamond: "Kim cương", ellipse: "Hình elíp", arrow: "Mũi tên", line: "Đường kẻ", freedraw: "Vẽ", text: "Văn bản", library: "Thư viện", lock: "Giữ dụng cũ hiện tại sau khi vẽ", penMode: "Chế độ bút vẽ - ngăn ngừa chạm nhầm", link: "Thêm/ Chỉnh sửa liên kết cho hình được chọn", eraser: "Xóa", frame: "", magicframe: "", embeddable: "", laser: "", hand: "Tay kéo", extraTools: "", mermaidToExcalidraw: "", magicSettings: "" }, i = { canvasActions: "Hành động canvas", selectedShapeActions: "Các hành động cho hình dạng đã chọn", shapes: "Các hình khối" }, o = { canvasPanning: "Để di chuyển canvas, giữ con lăn chuột hoặc phím cách trong khi kéo, hoặc sử dụng công cụ cầm tay", linearElement: "Ấn để bắt đầu nhiểm điểm vẽ, kéo để vẽ một đường thẳng", freeDraw: "Ấn bà kéo, thả khi bạn xong", text: "Mẹo: bạn có thể thêm văn bản tại bất cứ đâu bằng cách ấn hai lần bằng tool lựa chọn", embeddable: "", text_selected: "Ấn 2 lần hoặc nhấn ENTER để chỉnh văn bản", text_editing: "Nhấn Escape hoặc Ctrl/Cmd+ENTER để hoàn thành chỉnh sửa", linearElementMulti: "Nhấn vào điểm cuối hoặc nhấn Escape hoặc Enter để kết thúc", lockAngle: "Bạn có thể chỉnh lại góc bằng cách giữ phím SHIFT", resize: `Bạn có thể chỉnh tỷ lệ bằng cách giữ SHIFT khi chỉnh kích cỡ,
|
|
6
|
+
giữ ALT để chỉnh kích cỡ từ trung tâm`, resizeImage: "", rotate: "", lineEditor_info: "", lineEditor_pointSelected: "", lineEditor_nothingSelected: "", placeImage: "", publishLibrary: "", bindTextToElement: "", deepBoxSelect: "", eraserRevert: "", firefox_clipboard_write: 'Tính năng này có thể được bật bằng cách đặt cờ "dom.events.asyncClipboard.clipboardItem" thành "true". Để thay đổi cờ trình duyệt trong Firefox, hãy truy cập trang "about:config".', disableSnapping: "" }, r = { cannotShowPreview: "Không thể xem trước", canvasTooBig: "Canvas này có thể hơi lớn.", canvasTooBigTip: "Mẹo: hãy thử di chuyển các elements nhất lại gần nhau hơn một chút." }, h = { headingMain: "", clearCanvasMessage: "Nếu không tải lại được, hãy thử <button>dọn canvas.</button>", clearCanvasCaveat: " Điều này sẽ dẫn đến mất dữ liệu bạn đã làm ", trackedToSentry: "", openIssueMessage: "", sceneContent: "" }, c = { desc_intro: "", desc_privacy: "", button_startSession: "", button_stopSession: "", desc_inProgressIntro: "", desc_shareLink: "", desc_exitSession: "", shareTitle: "" }, l = { title: "" }, x = { disk_title: "", disk_details: "", disk_button: "", link_title: "", link_details: "", link_button: "", excalidrawplus_description: "", excalidrawplus_button: "", excalidrawplus_exportError: "" }, s = { 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: "" }, d = { title: "Dọn canvas" }, g = { title: "", itemName: "Tên món", authorName: "", githubUsername: "", twitterUsername: "", libraryName: "", libraryDesc: "", website: "", placeholder: { authorName: "", libraryName: "", libraryDesc: "", githubHandle: "", twitterHandle: "", website: "" }, errors: { required: "", website: "" }, noteDescription: "", noteGuidelines: "", noteLicense: "", noteItems: "Từng món trong thư viện phải có tên riêng để có thể lọc. Các món thư viện sau đây sẽ thêm:", atleastOneLibItem: "Vui lòng chọn ít nhất một món thư viện để bắt đầu", republishWarning: "Lưu ý: một số món đã chọn được đánh dấu là đã xuất bản/đã gửi. Bạn chỉ nên gửi lại các món khi cập nhật thư viện hiện có hoặc gửi." }, A = { title: "", content: "" }, C = { resetLibrary: "", removeItemsFromLib: "Xóa món đã chọn khỏi thư viện" }, m = { header: "", label: { withBackground: "", onlySelected: "", darkMode: "", embedScene: "", scale: "", padding: "" }, tooltip: { embedScene: "" }, title: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" }, button: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" } }, D = { tooltip: "", link: "" }, B = { angle: "", element: "", elements: "", height: "", scene: "", selected: "", storage: "", title: "", total: "", version: "", versionCopy: "", versionNotAvailable: "", width: "" }, F = { addedToLibrary: "", copyStyles: "", copyToClipboard: "", copyToClipboardAsPng: "", fileSaved: "", fileSavedToFilename: "", canvas: "canvas", selection: "", pasteAsSingleElement: "", unableToEmbed: "", unrecognizedLinkFormat: "" }, b = { transparent: "", black: "", white: "", red: "", pink: "", grape: "", violet: "", gray: "", blue: "", cyan: "", teal: "", green: "", yellow: "", orange: "", bronze: "" }, p = { app: { center_heading: "", center_heading_plus: "", menuHint: "" }, defaults: { menuHint: "", center_heading: "", toolbarHint: "", helpHint: "" } }, v = { mostUsedCustomColors: "", colors: "", shades: "", hexCode: "", noShades: "" }, y = { action: { exportToImage: { title: "", button: "", description: "" }, saveToDisk: { title: "", button: "", description: "" }, excalidrawPlus: { title: "", button: "", description: "" } }, modal: { loadFromFile: { title: "", button: "", description: "" }, shareableLink: { title: "", button: "", description: "" } } }, k = { title: "", button: "", description: "", syntax: "", preview: "" }, S = { labels: u, library: E, buttons: n, alerts: e, errors: t, toolBar: a, headings: i, hints: o, canvasError: r, errorSplash: h, roomDialog: c, errorDialog: l, exportDialog: x, helpDialog: s, clearCanvasDialog: d, publishDialog: g, publishSuccessDialog: A, confirmDialog: C, imageExportDialog: m, encrypted: D, stats: B, toast: F, colors: b, welcomeScreen: p, colorPicker: v, overwriteConfirm: y, mermaid: k };
|
|
7
|
+
export {
|
|
8
|
+
e as alerts,
|
|
9
|
+
n as buttons,
|
|
10
|
+
r as canvasError,
|
|
11
|
+
d as clearCanvasDialog,
|
|
12
|
+
v as colorPicker,
|
|
13
|
+
b as colors,
|
|
14
|
+
C as confirmDialog,
|
|
15
|
+
S as default,
|
|
16
|
+
D as encrypted,
|
|
17
|
+
l as errorDialog,
|
|
18
|
+
h as errorSplash,
|
|
19
|
+
t as errors,
|
|
20
|
+
x as exportDialog,
|
|
21
|
+
i as headings,
|
|
22
|
+
s as helpDialog,
|
|
23
|
+
o as hints,
|
|
24
|
+
m as imageExportDialog,
|
|
25
|
+
u as labels,
|
|
26
|
+
E as library,
|
|
27
|
+
k as mermaid,
|
|
28
|
+
y as overwriteConfirm,
|
|
29
|
+
g as publishDialog,
|
|
30
|
+
A as publishSuccessDialog,
|
|
31
|
+
c as roomDialog,
|
|
32
|
+
B as stats,
|
|
33
|
+
F as toast,
|
|
34
|
+
a as toolBar,
|
|
35
|
+
p as welcomeScreen
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const M=Math.PI,x=2*M,p=1e-6,T=x-p;function E(e){this._+=e[0];for(let t=1,h=e.length;t<h;++t)this._+=arguments[t]+e[t]}function m(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return E;const h=10**t;return function(i){this._+=i[0];for(let s=1,n=i.length;s<n;++s)this._+=Math.round(arguments[s]*h)/h+i[s]}}class A{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?E:m(t)}moveTo(t,h){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+h}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,h){this._append`L${this._x1=+t},${this._y1=+h}`}quadraticCurveTo(t,h,i,s){this._append`Q${+t},${+h},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,h,i,s,n,$){this._append`C${+t},${+h},${+i},${+s},${this._x1=+n},${this._y1=+$}`}arcTo(t,h,i,s,n){if(t=+t,h=+h,i=+i,s=+s,n=+n,n<0)throw new Error(`negative radius: ${n}`);let $=this._x1,r=this._y1,u=i-t,l=s-h,_=$-t,o=r-h,a=_*_+o*o;if(this._x1===null)this._append`M${this._x1=t},${this._y1=h}`;else if(a>p)if(!(Math.abs(o*u-l*_)>p)||!n)this._append`L${this._x1=t},${this._y1=h}`;else{let d=i-$,f=s-r,y=u*u+l*l,P=d*d+f*f,g=Math.sqrt(y),v=Math.sqrt(a),w=n*Math.tan((M-Math.acos((y+a-P)/(2*g*v)))/2),c=w/v,b=w/g;Math.abs(c-1)>p&&this._append`L${t+c*_},${h+c*o}`,this._append`A${n},${n},0,0,${+(o*d>_*f)},${this._x1=t+b*u},${this._y1=h+b*l}`}}arc(t,h,i,s,n,$){if(t=+t,h=+h,i=+i,$=!!$,i<0)throw new Error(`negative radius: ${i}`);let r=i*Math.cos(s),u=i*Math.sin(s),l=t+r,_=h+u,o=1^$,a=$?s-n:n-s;this._x1===null?this._append`M${l},${_}`:(Math.abs(this._x1-l)>p||Math.abs(this._y1-_)>p)&&this._append`L${l},${_}`,i&&(a<0&&(a=a%x+x),a>T?this._append`A${i},${i},0,1,${o},${t-r},${h-u}A${i},${i},0,1,${o},${this._x1=l},${this._y1=_}`:a>p&&this._append`A${i},${i},0,${+(a>=M)},${o},${this._x1=t+i*Math.cos(n)},${this._y1=h+i*Math.sin(n)}`)}rect(t,h,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+h}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function L(e){return function(){return e}}function q(e){let t=3;return e.digits=function(h){if(!arguments.length)return t;if(h==null)t=null;else{const i=Math.floor(h);if(!(i>=0))throw new RangeError(`invalid digits: ${h}`);t=i}return e},()=>new A(t)}exports.constant=L;exports.withPath=q;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { w as ln, c as H } from "./layers.DLwuMfdd.js";
|
|
2
|
+
import { B as rn, D as M, E as D, F as an, G as y, H as on, I as j, J as _, K as un, L as t, M as sn, N as tn, O as fn } from "./layers.TxMpB1Hi.js";
|
|
3
|
+
function cn(l) {
|
|
4
|
+
return l.innerRadius;
|
|
5
|
+
}
|
|
6
|
+
function yn(l) {
|
|
7
|
+
return l.outerRadius;
|
|
8
|
+
}
|
|
9
|
+
function gn(l) {
|
|
10
|
+
return l.startAngle;
|
|
11
|
+
}
|
|
12
|
+
function mn(l) {
|
|
13
|
+
return l.endAngle;
|
|
14
|
+
}
|
|
15
|
+
function pn(l) {
|
|
16
|
+
return l && l.padAngle;
|
|
17
|
+
}
|
|
18
|
+
function dn(l, h, O, E, v, A, J, r) {
|
|
19
|
+
var q = O - l, i = E - h, n = J - v, m = r - A, a = m * q - n * i;
|
|
20
|
+
if (!(a * a < y))
|
|
21
|
+
return a = (n * (h - A) - m * (l - v)) / a, [l + a * q, h + a * i];
|
|
22
|
+
}
|
|
23
|
+
function W(l, h, O, E, v, A, J) {
|
|
24
|
+
var r = l - O, q = h - E, i = (J ? A : -A) / j(r * r + q * q), n = i * q, m = -i * r, a = l + n, s = h + m, f = O + n, c = E + m, K = (a + f) / 2, o = (s + c) / 2, p = f - a, g = c - s, R = p * p + g * g, T = v - A, P = a * c - f * s, B = (g < 0 ? -1 : 1) * j(tn(0, T * T * R - P * P)), F = (P * g - p * B) / R, G = (-P * p - g * B) / R, w = (P * g + p * B) / R, d = (-P * p + g * B) / R, x = F - K, e = G - o, u = w - K, L = d - o;
|
|
25
|
+
return x * x + e * e > u * u + L * L && (F = w, G = d), {
|
|
26
|
+
cx: F,
|
|
27
|
+
cy: G,
|
|
28
|
+
x01: -n,
|
|
29
|
+
y01: -m,
|
|
30
|
+
x11: F * (v / T - 1),
|
|
31
|
+
y11: G * (v / T - 1)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function vn() {
|
|
35
|
+
var l = cn, h = yn, O = H(0), E = null, v = gn, A = mn, J = pn, r = null, q = ln(i);
|
|
36
|
+
function i() {
|
|
37
|
+
var n, m, a = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - an, c = A.apply(this, arguments) - an, K = un(c - f), o = c > f;
|
|
38
|
+
if (r || (r = n = q()), s < a && (m = s, s = a, a = m), !(s > y)) r.moveTo(0, 0);
|
|
39
|
+
else if (K > on - y)
|
|
40
|
+
r.moveTo(s * M(f), s * D(f)), r.arc(0, 0, s, f, c, !o), a > y && (r.moveTo(a * M(c), a * D(c)), r.arc(0, 0, a, c, f, o));
|
|
41
|
+
else {
|
|
42
|
+
var p = f, g = c, R = f, T = c, P = K, B = K, F = J.apply(this, arguments) / 2, G = F > y && (E ? +E.apply(this, arguments) : j(a * a + s * s)), w = _(un(s - a) / 2, +O.apply(this, arguments)), d = w, x = w, e, u;
|
|
43
|
+
if (G > y) {
|
|
44
|
+
var L = sn(G / a * D(F)), z = sn(G / s * D(F));
|
|
45
|
+
(P -= L * 2) > y ? (L *= o ? 1 : -1, R += L, T -= L) : (P = 0, R = T = (f + c) / 2), (B -= z * 2) > y ? (z *= o ? 1 : -1, p += z, g -= z) : (B = 0, p = g = (f + c) / 2);
|
|
46
|
+
}
|
|
47
|
+
var N = s * M(p), S = s * D(p), C = a * M(T), Q = a * D(T);
|
|
48
|
+
if (w > y) {
|
|
49
|
+
var U = s * M(g), V = s * D(g), X = a * M(R), Y = a * D(R), I;
|
|
50
|
+
if (K < rn)
|
|
51
|
+
if (I = dn(N, S, X, Y, U, V, C, Q)) {
|
|
52
|
+
var Z = N - I[0], $ = S - I[1], k = U - I[0], b = V - I[1], nn = 1 / D(fn((Z * k + $ * b) / (j(Z * Z + $ * $) * j(k * k + b * b))) / 2), en = j(I[0] * I[0] + I[1] * I[1]);
|
|
53
|
+
d = _(w, (a - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
|
|
54
|
+
} else
|
|
55
|
+
d = x = 0;
|
|
56
|
+
}
|
|
57
|
+
B > y ? x > y ? (e = W(X, Y, N, S, s, x, o), u = W(U, V, C, Q, s, x, o), r.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? r.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (r.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, s, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), r.arc(u.cx, u.cy, x, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (r.moveTo(N, S), r.arc(0, 0, s, p, g, !o)) : r.moveTo(N, S), !(a > y) || !(P > y) ? r.lineTo(C, Q) : d > y ? (e = W(C, Q, U, V, a, -d, o), u = W(N, S, X, Y, a, -d, o), r.lineTo(e.cx + e.x01, e.cy + e.y01), d < w ? r.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (r.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, a, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), r.arc(u.cx, u.cy, d, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : r.arc(0, 0, a, T, R, o);
|
|
58
|
+
}
|
|
59
|
+
if (r.closePath(), n) return r = null, n + "" || null;
|
|
60
|
+
}
|
|
61
|
+
return i.centroid = function() {
|
|
62
|
+
var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, m = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - rn / 2;
|
|
63
|
+
return [M(m) * n, D(m) * n];
|
|
64
|
+
}, i.innerRadius = function(n) {
|
|
65
|
+
return arguments.length ? (l = typeof n == "function" ? n : H(+n), i) : l;
|
|
66
|
+
}, i.outerRadius = function(n) {
|
|
67
|
+
return arguments.length ? (h = typeof n == "function" ? n : H(+n), i) : h;
|
|
68
|
+
}, i.cornerRadius = function(n) {
|
|
69
|
+
return arguments.length ? (O = typeof n == "function" ? n : H(+n), i) : O;
|
|
70
|
+
}, i.padRadius = function(n) {
|
|
71
|
+
return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : H(+n), i) : E;
|
|
72
|
+
}, i.startAngle = function(n) {
|
|
73
|
+
return arguments.length ? (v = typeof n == "function" ? n : H(+n), i) : v;
|
|
74
|
+
}, i.endAngle = function(n) {
|
|
75
|
+
return arguments.length ? (A = typeof n == "function" ? n : H(+n), i) : A;
|
|
76
|
+
}, i.padAngle = function(n) {
|
|
77
|
+
return arguments.length ? (J = typeof n == "function" ? n : H(+n), i) : J;
|
|
78
|
+
}, i.context = function(n) {
|
|
79
|
+
return arguments.length ? (r = n ?? null, i) : r;
|
|
80
|
+
}, i;
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
vn as a
|
|
84
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { a as h } from "./layers.CqVTtuYm.js";
|
|
2
|
+
import { w as d, c as o } from "./layers.DLwuMfdd.js";
|
|
3
|
+
import { a0 as v } from "./layers.TxMpB1Hi.js";
|
|
4
|
+
function w(t) {
|
|
5
|
+
return t[0];
|
|
6
|
+
}
|
|
7
|
+
function b(t) {
|
|
8
|
+
return t[1];
|
|
9
|
+
}
|
|
10
|
+
function P(t, u) {
|
|
11
|
+
var s = o(!0), i = null, l = v, r = null, m = d(e);
|
|
12
|
+
t = typeof t == "function" ? t : t === void 0 ? w : o(t), u = typeof u == "function" ? u : u === void 0 ? b : o(u);
|
|
13
|
+
function e(n) {
|
|
14
|
+
var f, g = (n = h(n)).length, a, c = !1, p;
|
|
15
|
+
for (i == null && (r = l(p = m())), f = 0; f <= g; ++f)
|
|
16
|
+
!(f < g && s(a = n[f], f, n)) === c && ((c = !c) ? r.lineStart() : r.lineEnd()), c && r.point(+t(a, f, n), +u(a, f, n));
|
|
17
|
+
if (p) return r = null, p + "" || null;
|
|
18
|
+
}
|
|
19
|
+
return e.x = function(n) {
|
|
20
|
+
return arguments.length ? (t = typeof n == "function" ? n : o(+n), e) : t;
|
|
21
|
+
}, e.y = function(n) {
|
|
22
|
+
return arguments.length ? (u = typeof n == "function" ? n : o(+n), e) : u;
|
|
23
|
+
}, e.defined = function(n) {
|
|
24
|
+
return arguments.length ? (s = typeof n == "function" ? n : o(!!n), e) : s;
|
|
25
|
+
}, e.curve = function(n) {
|
|
26
|
+
return arguments.length ? (l = n, i != null && (r = l(i)), e) : l;
|
|
27
|
+
}, e.context = function(n) {
|
|
28
|
+
return arguments.length ? (n == null ? i = r = null : r = l(i = n), e) : i;
|
|
29
|
+
}, e;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
P as l
|
|
33
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./layers.BzNb_e9O.js");require("./layers.ByxHbusl.js");const Y=require("./layers.UT_N-vRk.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,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./layers.VMY9os8P.js"),t=require("./layers.BzNb_e9O.js"),_=require("./layers.BLd2spTm.js"),N=require("./layers.CGUTAZ4d.js");require("./layers.ByxHbusl.js");require("lodash-es");require("./layers.Cyzu9PKQ.js");const k=s=>t.common$1.sanitizeText(s,t.getConfig());let w={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const D=function(s,o,f,i){const e=Object.keys(s);t.log$1.info("keys:",e),t.log$1.info(s),e.forEach(function(r){var l,c;const n=s[r],d={shape:"rect",id:n.id,domId:n.domId,labelText:k(n.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};o.setNode(n.id,d),$(n.classes,o,f,i,n.id),t.log$1.info("setNode",d)})},$=function(s,o,f,i,e){const r=Object.keys(s);t.log$1.info("keys:",r),t.log$1.info(s),r.filter(l=>s[l].parent==e).forEach(function(l){var c,n;const a=s[l],d=a.cssClasses.join(" "),g=t.getStylesFromArray(a.styles),p=a.label??a.id,u=0,y={labelStyle:g.labelStyle,shape:"class_box",labelText:k(p),classData:a,rx:u,ry:u,class:d,style:g.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((c=t.getConfig().flowchart)==null?void 0:c.padding)??((n=t.getConfig().class)==null?void 0:n.padding)};o.setNode(a.id,y),e&&o.setParent(a.id,e),t.log$1.info("setNode",y)})},E=function(s,o,f,i){t.log$1.info(s),s.forEach(function(e,r){var l,c;const n=e,a="",d={labelStyle:"",style:""},g=n.text,p=0,b={labelStyle:d.labelStyle,shape:"note",labelText:k(g),noteData:n,rx:p,ry:p,class:a,style:d.style,id:n.id,domId:n.id,tooltip:"",type:"note",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};if(o.setNode(n.id,b),t.log$1.info("setNode",b),!n.class||!(n.class in i))return;const y=f+r,x={id:`edgeNote${y}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(w.curve,t.curveLinear)};o.setEdge(n.id,n.class,x,y)})},A=function(s,o){const f=t.getConfig().flowchart;let i=0;s.forEach(function(e){var r;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:C(e.relation.type1),arrowTypeEnd:C(e.relation.type2),style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(f==null?void 0:f.curve,t.curveLinear)};if(t.log$1.info(l,e),e.style!==void 0){const c=t.getStylesFromArray(e.style);l.style=c.style,l.labelStyle=c.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((r=t.getConfig().flowchart)==null?void 0:r.htmlLabels)??t.getConfig().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(t.common$1.lineBreakRegex,`
|
|
2
|
+
`),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),o.setEdge(e.id1,e.id2,l,i)})},q=function(s){w={...w,...s}},M=async function(s,o,f,i){t.log$1.info("Drawing class - ",o);const e=t.getConfig().flowchart??t.getConfig().class,r=t.getConfig().securityLevel;t.log$1.info("config:",e);const l=(e==null?void 0:e.nodeSpacing)??50,c=(e==null?void 0:e.rankSpacing)??50,n=new _.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=i.db.getNamespaces(),d=i.db.getClasses(),g=i.db.getRelations(),p=i.db.getNotes();t.log$1.info(g),D(a,n,o,i),$(d,n,o,i),A(g,n),E(p,n,g.length+1,d);let u;r==="sandbox"&&(u=t.select("#i"+o));const b=r==="sandbox"?t.select(u.nodes()[0].contentDocument.body):t.select("body"),y=b.select(`[id="${o}"]`),x=b.select("#"+o+" g");if(await N.render(x,n,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",o),t.utils.insertTitle(y,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,i.db.getDiagramTitle()),t.setupGraphViewbox$1(n,y,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const S=r==="sandbox"?u.nodes()[0].contentDocument:document,L=S.querySelectorAll('[id="'+o+'"] .edgeLabel .label');for(const m of L){const T=m.getBBox(),h=S.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",T.width),h.setAttribute("height",T.height),m.insertBefore(h,m.firstChild)}}};function C(s){let o;switch(s){case 0:o="aggregation";break;case 1:o="extension";break;case 2:o="composition";break;case 3:o="dependency";break;case 4:o="lollipop";break;default:o="none"}return o}const I={setConf:q,draw:M},B={parser:v.parser$1,db:v.db,renderer:I,styles:v.styles,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,v.db.clear()}};exports.diagram=B;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./layers.ByxHbusl.js");exports.alerts=e.l;exports.buttons=e.n;exports.canvasError=e.u;exports.clearCanvasDialog=e.v;exports.colorPicker=e.A;exports.colors=e.F;exports.commandPalette=e.R;exports.confirmDialog=e.C;exports.default=e.B;exports.element=e.c;exports.elementLink=e.r;exports.encrypted=e.E;exports.errorDialog=e.y;exports.errorSplash=e.h;exports.errors=e.s;exports.exportDialog=e.w;exports.fontList=e.N;exports.headings=e.p;exports.helpDialog=e.k;exports.hints=e.m;exports.imageExportDialog=e.x;exports.labels=e.t;exports.library=e.a;exports.mermaid=e.D;exports.overwriteConfirm=e._;exports.publishDialog=e.f;exports.publishSuccessDialog=e.S;exports.quickSearch=e.I;exports.roomDialog=e.g;exports.search=e.i;exports.shareDialog=e.b;exports.stats=e.T;exports.toast=e.L;exports.toolBar=e.d;exports.userList=e.z;exports.welcomeScreen=e.P;
|