@layers-app/editor 0.5.4-optimization → 0.5.6-optimization

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +19 -0
  2. package/dist/index.cjs +2 -0
  3. package/dist/index.js +12 -10
  4. package/dist/layers.7jmq6tBR.js +2227 -0
  5. package/dist/layers.B90YwJga.js +4 -0
  6. package/dist/layers.C03OvlLb.js +6 -0
  7. package/dist/layers.CJiIq6YQ.js +1 -0
  8. package/dist/layers.CXffIp2y.js +864 -0
  9. package/dist/layers.CZPeYQ9g.js +3 -0
  10. package/dist/layers.CZ_Lt7IL.js +7 -0
  11. package/dist/layers.Ci1-qkbn.js +341 -0
  12. package/dist/layers.Cnm-pECN.js +2 -0
  13. package/dist/layers.D6d62qQ_.js +6774 -0
  14. package/dist/layers.DNCgFYS7.js +27 -0
  15. package/dist/layers.Dev6Yrwi.js +530 -0
  16. package/dist/layers.Dgok89qX.js +1 -0
  17. package/dist/layers.Dq3o7sh3.js +7723 -0
  18. package/dist/layers.Duy8YzsH.js +2511 -0
  19. package/dist/layers.QjAkD17S.js +3677 -0
  20. package/package.json +73 -17
  21. package/dist/layers.0EAb8Ajx.js +0 -65
  22. package/dist/layers.1Mvzm38Y.js +0 -501
  23. package/dist/layers.2wIERhxO.js +0 -41
  24. package/dist/layers.694DrE1_.js +0 -931
  25. package/dist/layers.7JqFgE4-.js +0 -15
  26. package/dist/layers.B-5aeeDH.js +0 -1359
  27. package/dist/layers.B0winug5.js +0 -59
  28. package/dist/layers.B1S8ufDn.js +0 -40
  29. package/dist/layers.B3JNY9Km.js +0 -42
  30. package/dist/layers.B6W2tqC0.js +0 -40
  31. package/dist/layers.B7Olyhe8.js +0 -1089
  32. package/dist/layers.BCuuRSaf.js +0 -37
  33. package/dist/layers.BESPlBGC.js +0 -32
  34. package/dist/layers.BJDrjORS.js +0 -244
  35. package/dist/layers.BJTh7mUo.js +0 -1265
  36. package/dist/layers.BLL-019k.js +0 -39
  37. package/dist/layers.BNJiP8Pw.js +0 -2966
  38. package/dist/layers.BNvAl5dS.js +0 -14
  39. package/dist/layers.BThP74aw.js +0 -32
  40. package/dist/layers.BZ4laUeR.js +0 -40
  41. package/dist/layers.BZByPNdY.js +0 -37
  42. package/dist/layers.B_5zMrI3.js +0 -38
  43. package/dist/layers.B_7N5yjX.js +0 -32
  44. package/dist/layers.BbCfEXyj.js +0 -55
  45. package/dist/layers.BdvfoI4U.js +0 -44
  46. package/dist/layers.BiJ8hfRt.js +0 -1510
  47. package/dist/layers.BiJBOHr0.js +0 -84
  48. package/dist/layers.Bk3_8qR9.js +0 -48146
  49. package/dist/layers.BkPPOKBy.js +0 -32
  50. package/dist/layers.BnZcjRLr.js +0 -32
  51. package/dist/layers.BpilXLfW.js +0 -6
  52. package/dist/layers.BqpcWKH6.js +0 -2479
  53. package/dist/layers.Br7D0wMN.js +0 -39
  54. package/dist/layers.BsAu1GXs.js +0 -42
  55. package/dist/layers.Bv5sK47C.js +0 -769
  56. package/dist/layers.BxEdkUpI.js +0 -1088
  57. package/dist/layers.BxUBbVsO.js +0 -41
  58. package/dist/layers.Bzalhqz_.js +0 -39
  59. package/dist/layers.C-dS7ntQ.js +0 -41
  60. package/dist/layers.C0Lgw_Sx.js +0 -11688
  61. package/dist/layers.C5BFsvzI.js +0 -803
  62. package/dist/layers.C5WLg9ed.js +0 -21763
  63. package/dist/layers.C6lAFlKZ.js +0 -186
  64. package/dist/layers.C8_lu5UH.js +0 -23
  65. package/dist/layers.CGwNL7dH.js +0 -791
  66. package/dist/layers.CI739wqN.js +0 -39
  67. package/dist/layers.CKaj4dG4.js +0 -41
  68. package/dist/layers.CLRiSwgi.js +0 -904
  69. package/dist/layers.CN1QkD6D.js +0 -38
  70. package/dist/layers.CPY6U3g-.js +0 -1034
  71. package/dist/layers.CRSjdIG6.js +0 -1619
  72. package/dist/layers.CUHkTCid.js +0 -6
  73. package/dist/layers.CUPMw0sy.js +0 -40
  74. package/dist/layers.CWb6LiAY.js +0 -40
  75. package/dist/layers.C_XsSNQo.js +0 -42
  76. package/dist/layers.CbmlFoXt.js +0 -33
  77. package/dist/layers.CfGeHh-g.js +0 -36
  78. package/dist/layers.CiJxVu9b.js +0 -36
  79. package/dist/layers.Cj4ezyVr.js +0 -33
  80. package/dist/layers.Cpb-MRZn.js +0 -960
  81. package/dist/layers.CqVTtuYm.js +0 -6
  82. package/dist/layers.CskURloi.js +0 -39
  83. package/dist/layers.CtTD47i4.js +0 -41
  84. package/dist/layers.CxcvEfKe.js +0 -36
  85. package/dist/layers.D-U9uIsP.js +0 -40
  86. package/dist/layers.D10WeKck.js +0 -2235
  87. package/dist/layers.D4T8fTcj.js +0 -1223
  88. package/dist/layers.D4jK2Tet.js +0 -39
  89. package/dist/layers.D7jGxypv.js +0 -8
  90. package/dist/layers.DBosqi2D.js +0 -19
  91. package/dist/layers.DGtETOVJ.js +0 -304
  92. package/dist/layers.DKENAsMv.js +0 -220
  93. package/dist/layers.DLwuMfdd.js +0 -84
  94. package/dist/layers.DN9HoVxI.js +0 -18
  95. package/dist/layers.DOBSfaUM.js +0 -35
  96. package/dist/layers.DOKLQ6A3.js +0 -373
  97. package/dist/layers.DPuVWH3L.js +0 -40
  98. package/dist/layers.DQVXh43C.js +0 -42
  99. package/dist/layers.DSTh89J8.js +0 -42
  100. package/dist/layers.DUsIfvNt.js +0 -46859
  101. package/dist/layers.DVfpGIrv.js +0 -41
  102. package/dist/layers.DWSkLlGf.js +0 -41
  103. package/dist/layers.DX1RI3m3.js +0 -32
  104. package/dist/layers.DdMwmP4m.js +0 -37
  105. package/dist/layers.DhkyREpW.js +0 -793
  106. package/dist/layers.Dj-f1_6N.js +0 -34
  107. package/dist/layers.DjUOC4st.js +0 -16
  108. package/dist/layers.DjhJT1nZ.js +0 -21938
  109. package/dist/layers.Djl9Gz6s.js +0 -282
  110. package/dist/layers.Dn2AP7iE.js +0 -1283
  111. package/dist/layers.Dqbek_0L.js +0 -40
  112. package/dist/layers.DsDjOLHs.js +0 -437
  113. package/dist/layers.DsOaqGXW.js +0 -8
  114. package/dist/layers.DuE1l7lR.js +0 -41
  115. package/dist/layers.DxA6ocdw.js +0 -70
  116. package/dist/layers.DxHlP7Pb.js +0 -39
  117. package/dist/layers.Dy1naDTQ.js +0 -14
  118. package/dist/layers.DyZ5R-vS.js +0 -37
  119. package/dist/layers.H2Kl_PC2.js +0 -40
  120. package/dist/layers.IW4NBP9k.js +0 -39
  121. package/dist/layers.LGx1jmqd.js +0 -40
  122. package/dist/layers.NABwYdw5.js +0 -35
  123. package/dist/layers.NtwvbkGN.js +0 -1580
  124. package/dist/layers.O-bFTk-n.js +0 -268
  125. package/dist/layers.R_udKe_N.js +0 -38
  126. package/dist/layers.TdTDbIzb.js +0 -1126
  127. package/dist/layers.WLeJl9el.js +0 -202
  128. package/dist/layers.b0h5ZBmD.js +0 -61
  129. package/dist/layers.dEHKcy8J.js +0 -320
  130. package/dist/layers.eTredPK_.js +0 -36
  131. package/dist/layers.gIdzfQAa.js +0 -5
  132. package/dist/layers.huV95Ipe.js +0 -295
  133. package/dist/layers.jU4W5PG5.js +0 -9166
  134. package/dist/layers.lCpg7dOn.js +0 -21
  135. package/dist/layers.mQcENPPW.js +0 -802
  136. package/dist/layers.nPQCmYXI.js +0 -423
  137. package/dist/layers.ntC1foLT.js +0 -39
  138. package/dist/layers.uHy1yMbq.js +0 -6
@@ -1,84 +0,0 @@
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
- };
@@ -1,18 +0,0 @@
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
- };
@@ -1,35 +0,0 @@
1
- import "./layers.C5WLg9ed.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: "यहाँ जोड़ने के लिए पटल से एक वस्तु चुने." }, F = { clearReset: "कैनवास रीसेट करें", exportJSON: "", exportImage: "प्रतिमा निर्यात करे...", export: "यंहा सुरक्षित करे...", copyToClipboard: "क्लिपबोर्ड पर प्रतिलिपि बनाएँ", save: "", saveAs: "सेव करे इस तरह", load: "खोलें", getShareableLink: "साझा करने योग्य लिंक प्राप्त करें", close: "बंद करें", selectLanguage: "भाषा चुनें", scrollBackToContent: "सामग्री पर वापस स्क्रॉल करें", zoomIn: "बड़ा करें", zoomOut: "छोटा करें", resetZoom: "ज़ूम रीसेट करें", menu: "मेन्यू", done: "समाप्त", edit: "संशोधन करें", undo: "पूर्ववत् करें", redo: "फिर से करें", resetLibrary: "", createNewRoom: "एक नया कमरा बनाएं", fullScreen: "पूरी स्क्रीन", darkMode: "डार्क मोड", lightMode: "लाइट मोड", zenMode: "ज़ेन मोड", objectsSnapMode: "वस्तुओं से पकड़े", exitZenMode: "जेन मोड से बाहर निकलें", cancel: "", clear: "साफ़ करे", remove: "हटाएं", embed: "", publishLibrary: "प्रकाशित करें", submit: "प्रस्तुत करे", confirm: "पुष्टि करें", embeddableInteractionButton: "" }, e = { clearReset: "इससे पूरा कैनवास साफ हो जाएगा। क्या आपको यकीन है?", couldNotCreateShareableLink: "साझा करने योग्य लिंक नहीं बनाया जा सका।", couldNotCreateShareableLinkTooBig: "लिंक शेयर नहीं कर सकता: दृश्य बहुत बड़ा", couldNotLoadInvalidFile: "अमान्य फ़ाइल लोड नहीं की जा सकी", importBackendFailed: "बैकएंड से आयात करना विफल रहा।", cannotExportEmptyCanvas: "खाली कैनवास निर्यात नहीं कर सकता।", couldNotCopyToClipboard: "क्लिपबोर्ड पर कॉपी नहीं किया जा सका", decryptFailed: "डेटा को डिक्रिप्ट नहीं किया जा सका।", uploadedSecurly: "अपलोड को एंड-टू-एंड एन्क्रिप्शन के साथ सुरक्षित किया गया है, जिसका मतलब है कि एक्सक्लूसिव सर्वर और थर्ड पार्टी कंटेंट नहीं पढ़ सकते हैं।", loadSceneOverridePrompt: "लोड हो रहा है बाहरी ड्राइंग आपके मौजूदा सामग्री को बदल देगा। क्या आप जारी रखना चाहते हैं?", collabStopOverridePrompt: "चालू सत्र समाप्ति से आपका संग्रहित पूर्व स्थानीय अधिलेखन नष्ट होकर पुनः अधिलेखित होगा, क्या आपको यक़ीन हैं? ( यदी आपको पूर्व स्थापित अधिलेखन सुरक्षित चाहिये तो बस ब्राउज़र टैब बंद करे)", errorAddingToLibrary: "संग्रह में जोडा न जा सका", errorRemovingFromLibrary: "संग्रह से हटाया नहीं जा सका", confirmAddLibrary: "लाइब्रेरी जोड़ें पुष्‍टि करें आकार संख्या", imageDoesNotContainScene: "ऐसा लगता है कि इस छवि में कोई दृश्य डेटा नहीं है। क्या आपने निर्यात के दौरान दृश्य एम्बेडिंग अनुमतित की है?", cannotRestoreFromImage: "छवि फ़ाइल बहाल दृश्य नहीं है", invalidSceneUrl: "दिये गये युआरेल से दृश्य आयात नहीं किया जा सका. यह या तो अनुचित है, या इसमें उचित Excalidraw JSON डेटा नहीं है।", resetLibrary: "यह पूरा संग्रह रिक्त करेगा. क्या आपको यक़ीन हैं?", removeItemsFromsLibrary: "{{count}} वस्तु(यें) संग्रह से हटायें?", invalidEncryptionKey: "कूटलेखन कुंजी 22 अक्षरों की होनी चाहिये, इसलिये जीवंत सहयोग अक्षम हैं", collabOfflineWarning: `कोई इंटरनेट कनेक्शन उपलब्ध नहीं है।
3
- आपके बदलाव सहेजे नहीं जाएंगे!` }, D = { unsupportedFileType: "असमर्थित फाइल प्रकार", imageInsertError: "छवि सम्मिलित नहीं की जा सकी. पुनः प्रयत्न करे...", fileTooBig: "फ़ाइल ज़रूरत से ज़्यादा बड़ी हैं. अधिकतम अनुमित परिमाण {{maxSize}} हैं", svgImageInsertError: "एसवीजी छवि सम्मिलित नहीं कर सके, एसवीजी रचना अनुचित हैं", failedToFetchImage: "", invalidSVGString: "अनुचित SVG", cannotResolveCollabServer: "कॉलेब सर्वर से कनेक्शन नहीं हो पा रहा. कृपया पृष्ठ को पुनः लाने का प्रयास करे.", importLibraryError: "संग्रह प्रतिष्ठापित नहीं किया जा सका", collabSaveFailed: "किसी कारण वश अंदरूनी डेटाबेस में सहेजा नहीं जा सका। यदि समस्या बनी रहती है, तो किये काम को खोने न देने के लिये अपनी फ़ाइल को स्थानीय रूप से सहेजे।", collabSaveFailed_sizeExceeded: "लगता है कि पृष्ठ तल काफ़ी बड़ा है, इस्कारण अंदरूनी डेटाबेस में सहेजा नहीं जा सका। किये काम को खोने न देने के लिये अपनी फ़ाइल को स्थानीय रूप से सहेजे।", imageToolNotSupported: "प्रतिमायें अक्षम की गयी हैं", brave_measure_text_error: { line1: "लगता है कि आप Brave ब्राउज़र का उपयोग कर रहे और साथ में <bold>आक्रामक उँगलियो के छाप </bold> का चयन किया हुवा है", line2: "यह आपके चित्रों के <bold>पाठ तत्वों</bold>को खंडित कर सकता हैं", line3: "हमें आपसे ठोस आग्रह है की आप सेट्टिंग में इस विकल्प का चयन ना करे.<link> इस अनुक्रम </link> का पालन करके इसका पता लगा सकते हैं", line4: "यदि इस सेटिंग्स को अक्षम करने पर भी पृष्ठ ठीक नहीं दिखता हो तो, हमारे GitHub पर एक <issueLink>मुद्दा प्रस्तुत</issueLink> करे, या हमें <discordLink>डिस्कोर्ड</discordLink> पर लिखित सम्पर्क करें" }, libraryElementTypeError: { embeddable: "", iframe: "आयफ़्रेम तत्व समूहकोष में जोडा नहीं जा सका.", image: "" }, asyncPasteFailedOnRead: "चिपकाया नहीं जा सका (सिस्टम क्लिपबोर्ड से पढ़ा नहीं जा सका).", asyncPasteFailedOnParse: "चिपकाया नहीं जा सका.", copyToSystemClipboardFailed: "क्लिपबोर्ड पर प्रतिलिपि नहीं बनाई जा सकी." }, o = { selection: "चयन", image: "छवि सम्मिलित करें", rectangle: "आयात", diamond: "तिर्यग्वर्ग", ellipse: "दीर्घवृत्त", arrow: "तीर", line: "रेखा", freedraw: "चित्रांतित करे", text: "पाठ", library: "लाइब्रेरी", lock: "ड्राइंग के बाद चयनित टूल को सक्रिय रखें", penMode: "पेन का मोड - स्पर्श टाले", link: "", eraser: "रबड़", frame: "", magicframe: "तारिक ढाँचें को सांकेतिक लिपि में", embeddable: "", laser: "लेसर टॉर्च", hand: "हाथ ( खिसकाने का औज़ार)", extraTools: "", mermaidToExcalidraw: "मर्मेड से एक्सकाली में", magicSettings: "कृतिम बुद्धिमत्ता सेटिंग्स" }, a = { canvasActions: "कैनवास क्रिया", selectedShapeActions: "चयनित आकृति क्रियाएं", shapes: "आकृतियाँ" }, r = { canvasPanning: "कैनवास को सरकाने के लिए, ड्रैग करते समय माउस व्हील को पकड़े रखे या स्पेसबार को दबाए रखे, अथवा हाथ वाले औज़ार का उपयोग करें", linearElement: "कई बिंदुओं को शुरू करने के लिए क्लिक करें, सिंगल लाइन के लिए खींचें", freeDraw: "क्लिक करें और खींचें। समाप्त करने के लिए, छोड़ो", text: "आप चयन टूल से कहीं भी डबल-क्लिक करके टेक्स्ट जोड़ सकते हैं", embeddable: "", text_selected: "", text_editing: "", linearElementMulti: "अंतिम बिंदु पर क्लिक करें या समाप्त होने के लिए एस्केप या एंटर दबाएं", lockAngle: "आप घूर्णन करते समय SHIFT पकड़कर कोणों को मोड़ सकते हैं", resize: `आकार बदलते समय आप SHIFT को पकड़ कर अनुपात में कमी कर सकते हैं,
4
- केंद्र से आकार बदलने के लिए ALT दबाए रखें`, resizeImage: "", rotate: "आप घूर्णन करते समय SHIFT पकड़कर कोणों को विवश कर सकते हैं", lineEditor_info: "बिंदुओं को सम्पादित करने के लिए CtrlOrCmd को दबायें रखते हुये डबल क्लिक करे, अथवा CtrlOrCmd + Enter साथ दबाये", lineEditor_pointSelected: "", lineEditor_nothingSelected: "", placeImage: "", publishLibrary: "", bindTextToElement: "", deepBoxSelect: "", eraserRevert: "मिटाने के लिए चुने हुए चीजों को ना चुनने के लिए Alt साथ में दबाए", firefox_clipboard_write: '"dom.events.asyncClipboard.clipboardItem" फ़्लैग को "true" पर सेट करके इस सुविधा को संभवतः सक्षम किया जा सकता है। Firefox में ब्राउज़र फ़्लैग बदलने के लिए, "about:config" पृष्ठ पर जाएँ।', disableSnapping: "स्नैपिंग को निष्क्रिय करने के लिए CtrlOrCmd दबाए रखें" }, t = { cannotShowPreview: "पूर्वावलोकन नहीं दिखा सकते हैं", canvasTooBig: "कैनवास बहुत बड़ा", canvasTooBigTip: "कैनवास बहुत बड़ा टिप" }, i = { headingMain: "एक त्रुटि का सामना करना पड़ा। प्रयत्न <button>इस पृष्ठ को पुनः लोड करें</button>", clearCanvasMessage: "यदि पुनः लोड करना काम नहीं करता है, तो प्रयास करें <button>कैनवास साफ करना।</button>", clearCanvasCaveat: " इससे काम का नुकसान होगा ", trackedToSentry: "पहचानकर्ता के साथ त्रुटि {{eventId}} हमारे सिस्टम पर नज़र रखी गई थी।", openIssueMessage: "हम बहुत सतर्क थे कि त्रुटि पर आपकी दृश्य जानकारी शामिल न करें। यदि आपका दृश्य निजी नहीं है, तो कृपया हमारे बारे में विचार करें <button>बग ट्रैकर</button> कृपया GitHub मुद्दे को कॉपी और पेस्ट करके नीचे दी गई जानकारी शामिल करें।", sceneContent: "दृश्य सामग्री:" }, A = { desc_intro: "आप अपने वर्तमान दृश्य के लोगों को अपने साथ सहयोग करने के लिए आमंत्रित कर सकते हैं।", desc_privacy: "चिंता न करें, सत्र अंत-से-अंत एन्क्रिप्शन का उपयोग करता है, इसलिए आप जो भी ड्रा करेंगे वह निजी रहेगा। यहां तक कि हमारा सर्वर भी नहीं देख पाएगा कि आप क्या कर रहे हैं।", button_startSession: "सत्र प्रारंभ करें", button_stopSession: "सत्र रुकें", desc_inProgressIntro: "लाइव सहयोग सत्र अब जारी है।", desc_shareLink: "इस लिंक को आप जिस किसी के साथ भी सहयोग करना चाहते हैं, उसके साथ साझा करें", desc_exitSession: "सत्र रोकना आपको रूम से बाहर कर देगा, लेकिन आप स्थानीय स्तर पर दृश्य के साथ काम करना जारी रख पाएंगे। ध्यान दें कि यह अन्य लोगों को प्रभावित नहीं करेगा, और वे अभी भी अपने संस्करण पर सहयोग करने में सक्षम होंगे।", shareTitle: "" }, l = { title: "गलती" }, n = { disk_title: "", disk_details: "", disk_button: "", link_title: "", link_details: "", link_button: "", excalidrawplus_description: "", excalidrawplus_button: "", excalidrawplus_exportError: "" }, C = { 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: "पृष्ठ बायी/दायी तरफ करे" }, s = { title: "" }, B = { title: "", itemName: "", authorName: "", githubUsername: "", twitterUsername: "", libraryName: "", libraryDesc: "", website: "", placeholder: { authorName: "", libraryName: "", libraryDesc: "", githubHandle: "", twitterHandle: "", website: "" }, errors: { required: "", website: "मान्य URL प्रविष्ट करें" }, noteDescription: "संग्रह सम्मिलित करने हेतु प्रस्तुत करें <link>सार्वजनिक संग्रहालय</link>अन्य वक्तियों को उनके चित्रकारी में उपयोग के लिये", noteGuidelines: "संग्रह को पहले स्वीकृति आवश्यक कृपया यह पढ़ें <link>दिशा-निर्देश</link>", noteLicense: "जमा करके, आप सहमत हैं कि संग्रहण को <link>MIT लाइसेंस</link> के तहत प्रकाशित किया जाएगा, जिसका संक्षिप्त अर्थ है कि कोई भी बिना किसी प्रतिबंध के उनका उपयोग कर सकता है।", noteItems: "", atleastOneLibItem: "", republishWarning: "टिप्पणी: कुछ चुने हुवे आइटम पहले ही प्रकाशित/प्रस्तुत किए जा चुके हैं। किसी प्रकाशित संग्रह को अद्यतन करते समय या पहले से प्रस्तुत आइटम को पुन्हा प्रस्तुत करते समय, आप बस उसे केवल अद्यतन करें ।" }, d = { title: "", content: "{{authorName}} धन्यवाद. आपका संग्रहण समीक्षा के लिए दर्ज हो चुका है. समीक्षा स्थिति <link>यहाँ</link>जान सकते हैं." }, c = { resetLibrary: "", removeItemsFromLib: "" }, b = { header: "", label: { withBackground: "", onlySelected: "", darkMode: "", embedScene: "", scale: "", padding: "" }, tooltip: { embedScene: "" }, title: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" }, button: { exportToPng: "", exportToSvg: "", copyPngToClipboard: "" } }, m = { tooltip: "आपके चित्र अंत-से-अंत एन्क्रिप्टेड हैं, इसलिए एक्सक्लूसिव्रॉव के सर्वर उन्हें कभी नहीं देखेंगे।", link: "" }, p = { angle: "कोण", element: "एलिमेंट", elements: "एलिमेंट", height: "ऊंचाई", scene: "दृश्य", selected: "चयनित", storage: "संग्रह", title: "बेवकूफ के लिए आँकड़े", total: "कुल", version: "संस्करण", versionCopy: "काॅपी करने के लिए क्लिक करें", versionNotAvailable: "संस्करण उपलब्ध नहीं है", width: "चौड़ाई" }, g = { addedToLibrary: "", copyStyles: "काॅपी कीए स्टाइल", copyToClipboard: "क्लिपबोर्ड में कॉपी कीए", copyToClipboardAsPng: "", fileSaved: "", fileSavedToFilename: "", canvas: "", selection: "", pasteAsSingleElement: `एक अवयव के रूप में चिपकाने के लिए {{shortcut}} का उपयोग करें,
5
- या किसी मौजूदा पाठ संपादक में चिपकायें`, unableToEmbed: "", unrecognizedLinkFormat: "" }, h = { transparent: "", black: "काला", white: "सफ़ेद", red: "लाल", pink: "गुलाबी", grape: "अंगूरी", violet: "जामुनी", gray: "गहरा", blue: "नीला", cyan: "आसमानी", teal: "हरा-नीला", green: "हरा", yellow: "पीला", orange: "नारंगी", bronze: "कांस्य" }, y = { app: { center_heading: "आपका सर्व डेटा ब्राउज़र के भीतर स्थानिक जगह पे सुरक्षित किया गया.", center_heading_plus: "बजाय आपको Excalidraw+ पर जाना है?", menuHint: "निर्यात, पसंद, भाषायें, ..." }, defaults: { menuHint: "निर्यात, पसंद, और भी...", center_heading: "चित्रांकन। बनाया गया। सरल।", toolbarHint: "एक औजार चुने और चित्रकारी प्रारंभ करे!", helpHint: "शॉर्ट्कट और सहाय्य" } }, v = { mostUsedCustomColors: "अधिकांश उपयोगित रंग", colors: "रंग", shades: "छाया", hexCode: "हेक्स कोड", noShades: "इस रंग की कोई छाया उपलब्ध नहीं हैं" }, S = { action: { exportToImage: { title: "छवि स्वरूप में निर्यात करे", button: "छवि स्वरूप निर्यात करे", description: "दृष्य डेटा छवि स्वरूप में निर्यात करे, उस स्वरूप से आप उसे पुनः आयात कर सकते हो" }, saveToDisk: { title: "डिस्क में सम्हाले", button: "डिस्क में सम्हाले", description: "दृष्य डेटा बाहरी फ़ाइल में निर्यात करे, जहाँसे आप उसे पुनः आयात कर सकते हो" }, excalidrawPlus: { title: "एक्षकालीड्रॉ+", button: "एक्षकालीड्रॉ+ में निर्यात करे", description: "दृष्य को आपके एक्षकालीड्रॉ+ के कर्यस्थल में सम्हाले" } }, modal: { loadFromFile: { title: "फ़ाइल से लोड करें:", button: "फ़ाइल से लोड करें:", description: "फ़ाइल से लोड करने पर <bold>यह आपके कार्य की जगह लेलेगा </bold><br></br>आपकी ड्रॉइंग निम्न दर्शित विकल्पो में से एक चुनके और उपयोग करके सम्हाल सकते हैं" }, shareableLink: { title: "लिंक से लोड करें:", button: "इस जगह प्रतिस्थापित करे", description: "बाहर का चित्र लोड करने पर <bold>यह आपके कार्य की जगह लेलेगा </bold><br></br>आप आपकी ड्रॉइंग पहले निम्न दर्शित विकल्पो में से एक चुनके और उपयोग करके सम्हाल सकते हों." } } }, k = { title: "मर्मेड से एक्सकाली में", button: "अंदर डाले", description: "", syntax: "मर्मेड संरचना नियम", preview: "पूर्वावलोकन" }, x = { labels: u, library: E, buttons: F, alerts: e, errors: D, toolBar: o, headings: a, hints: r, canvasError: t, errorSplash: i, roomDialog: A, errorDialog: l, exportDialog: n, helpDialog: C, clearCanvasDialog: s, publishDialog: B, publishSuccessDialog: d, confirmDialog: c, imageExportDialog: b, encrypted: m, stats: p, toast: g, colors: h, welcomeScreen: y, colorPicker: v, overwriteConfirm: S, mermaid: k };
6
- export {
7
- e as alerts,
8
- F as buttons,
9
- t as canvasError,
10
- s as clearCanvasDialog,
11
- v as colorPicker,
12
- h as colors,
13
- c as confirmDialog,
14
- x as default,
15
- m as encrypted,
16
- l as errorDialog,
17
- i as errorSplash,
18
- D as errors,
19
- n as exportDialog,
20
- a as headings,
21
- C as helpDialog,
22
- r as hints,
23
- b as imageExportDialog,
24
- u as labels,
25
- E as library,
26
- k as mermaid,
27
- S as overwriteConfirm,
28
- B as publishDialog,
29
- d as publishSuccessDialog,
30
- A as roomDialog,
31
- p as stats,
32
- g as toast,
33
- o as toolBar,
34
- y as welcomeScreen
35
- };
@@ -1,373 +0,0 @@
1
- import * as v from "lodash-es";
2
- import { l as M } from "./layers.D4T8fTcj.js";
3
- import { G as U } from "./layers.BJDrjORS.js";
4
- import { i as A, u as H, s as V, a as _, b as W, g as D, p as O, c as q, d as z, e as p, f as $, h as K, j as Q } from "./layers.BxEdkUpI.js";
5
- import { l as s, g as T, t as S, d as J } from "./layers.jU4W5PG5.js";
6
- import { c as Y } from "./layers.BNJiP8Pw.js";
7
- function m(e) {
8
- var t = {
9
- options: {
10
- directed: e.isDirected(),
11
- multigraph: e.isMultigraph(),
12
- compound: e.isCompound()
13
- },
14
- nodes: Z(e),
15
- edges: I(e)
16
- };
17
- return v.isUndefined(e.graph()) || (t.value = v.clone(e.graph())), t;
18
- }
19
- function Z(e) {
20
- return v.map(e.nodes(), function(t) {
21
- var n = e.node(t), r = e.parent(t), i = { v: t };
22
- return v.isUndefined(n) || (i.value = n), v.isUndefined(r) || (i.parent = r), i;
23
- });
24
- }
25
- function I(e) {
26
- return v.map(e.edges(), function(t) {
27
- var n = e.edge(t), r = { v: t.v, w: t.w };
28
- return v.isUndefined(t.name) || (r.name = t.name), v.isUndefined(n) || (r.value = n), r;
29
- });
30
- }
31
- let l = {}, g = {}, L = {};
32
- const tt = () => {
33
- g = {}, L = {}, l = {};
34
- }, B = (e, t) => (s.trace("In isDescendant", t, " ", e, " = ", g[t].includes(e)), !!g[t].includes(e)), et = (e, t) => (s.info("Descendants of ", t, " is ", g[t]), s.info("Edge is ", e), e.v === t || e.w === t ? !1 : g[t] ? g[t].includes(e.v) || B(e.v, t) || B(e.w, t) || g[t].includes(e.w) : (s.debug("Tilt, ", t, ",not in descendants"), !1)), R = (e, t, n, r) => {
35
- s.warn(
36
- "Copying children of ",
37
- e,
38
- "root",
39
- r,
40
- "data",
41
- t.node(e),
42
- r
43
- );
44
- const i = t.children(e) || [];
45
- e !== r && i.push(e), s.warn("Copying (nodes) clusterId", e, "nodes", i), i.forEach((a) => {
46
- if (t.children(a).length > 0)
47
- R(a, t, n, r);
48
- else {
49
- const d = t.node(a);
50
- s.info("cp ", a, " to ", r, " with parent ", e), n.setNode(a, d), r !== t.parent(a) && (s.warn("Setting parent", a, t.parent(a)), n.setParent(a, t.parent(a))), e !== r && a !== e ? (s.debug("Setting parent", a, e), n.setParent(a, e)) : (s.info("In copy ", e, "root", r, "data", t.node(e), r), s.debug(
51
- "Not Setting parent for node=",
52
- a,
53
- "cluster!==rootId",
54
- e !== r,
55
- "node!==clusterId",
56
- a !== e
57
- ));
58
- const u = t.edges(a);
59
- s.debug("Copying Edges", u), u.forEach((f) => {
60
- s.info("Edge", f);
61
- const h = t.edge(f.v, f.w, f.name);
62
- s.info("Edge data", h, r);
63
- try {
64
- et(f, r) ? (s.info("Copying as ", f.v, f.w, h, f.name), n.setEdge(f.v, f.w, h, f.name), s.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : s.info(
65
- "Skipping copy of edge ",
66
- f.v,
67
- "-->",
68
- f.w,
69
- " rootId: ",
70
- r,
71
- " clusterId:",
72
- e
73
- );
74
- } catch (w) {
75
- s.error(w);
76
- }
77
- });
78
- }
79
- s.debug("Removing node", a), t.removeNode(a);
80
- });
81
- }, P = (e, t) => {
82
- const n = t.children(e);
83
- let r = [...n];
84
- for (const i of n)
85
- L[i] = e, r = [...r, ...P(i, t)];
86
- return r;
87
- }, C = (e, t) => {
88
- s.trace("Searching", e);
89
- const n = t.children(e);
90
- if (s.trace("Searching children of id ", e, n), n.length < 1)
91
- return s.trace("This is a valid node", e), e;
92
- for (const r of n) {
93
- const i = C(r, t);
94
- if (i)
95
- return s.trace("Found replacement for", e, " => ", i), i;
96
- }
97
- }, X = (e) => !l[e] || !l[e].externalConnections ? e : l[e] ? l[e].id : e, nt = (e, t) => {
98
- if (!e || t > 10) {
99
- s.debug("Opting out, no graph ");
100
- return;
101
- } else
102
- s.debug("Opting in, graph ");
103
- e.nodes().forEach(function(n) {
104
- e.children(n).length > 0 && (s.warn(
105
- "Cluster identified",
106
- n,
107
- " Replacement id in edges: ",
108
- C(n, e)
109
- ), g[n] = P(n, e), l[n] = { id: C(n, e), clusterData: e.node(n) });
110
- }), e.nodes().forEach(function(n) {
111
- const r = e.children(n), i = e.edges();
112
- r.length > 0 ? (s.debug("Cluster identified", n, g), i.forEach((a) => {
113
- if (a.v !== n && a.w !== n) {
114
- const d = B(a.v, n), u = B(a.w, n);
115
- d ^ u && (s.warn("Edge: ", a, " leaves cluster ", n), s.warn("Descendants of XXX ", n, ": ", g[n]), l[n].externalConnections = !0);
116
- }
117
- })) : s.debug("Not a cluster ", n, g);
118
- });
119
- for (let n of Object.keys(l)) {
120
- const r = l[n].id, i = e.parent(r);
121
- i !== n && l[i] && !l[i].externalConnections && (l[n].id = i);
122
- }
123
- e.edges().forEach(function(n) {
124
- const r = e.edge(n);
125
- s.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), s.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
126
- let i = n.v, a = n.w;
127
- if (s.warn(
128
- "Fix XXX",
129
- l,
130
- "ids:",
131
- n.v,
132
- n.w,
133
- "Translating: ",
134
- l[n.v],
135
- " --- ",
136
- l[n.w]
137
- ), l[n.v] && l[n.w] && l[n.v] === l[n.w]) {
138
- s.warn("Fixing and trixing link to self - removing XXX", n.v, n.w, n.name), s.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), i = X(n.v), a = X(n.w), e.removeEdge(n.v, n.w, n.name);
139
- const d = n.w + "---" + n.v;
140
- e.setNode(d, {
141
- domId: d,
142
- id: d,
143
- labelStyle: "",
144
- labelText: r.label,
145
- padding: 0,
146
- shape: "labelRect",
147
- style: ""
148
- });
149
- const u = structuredClone(r), f = structuredClone(r);
150
- u.label = "", u.arrowTypeEnd = "none", f.label = "", u.fromCluster = n.v, f.toCluster = n.v, e.setEdge(i, d, u, n.name + "-cyclic-special"), e.setEdge(d, a, f, n.name + "-cyclic-special");
151
- } else if (l[n.v] || l[n.w]) {
152
- if (s.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), i = X(n.v), a = X(n.w), e.removeEdge(n.v, n.w, n.name), i !== n.v) {
153
- const d = e.parent(i);
154
- l[d].externalConnections = !0, r.fromCluster = n.v;
155
- }
156
- if (a !== n.w) {
157
- const d = e.parent(a);
158
- l[d].externalConnections = !0, r.toCluster = n.w;
159
- }
160
- s.warn("Fix Replacing with XXX", i, a, n.name), e.setEdge(i, a, r, n.name);
161
- }
162
- }), s.warn("Adjusted Graph", m(e)), k(e, 0), s.trace(l);
163
- }, k = (e, t) => {
164
- if (s.warn("extractor - ", t, m(e), e.children("D")), t > 10) {
165
- s.error("Bailing out");
166
- return;
167
- }
168
- let n = e.nodes(), r = !1;
169
- for (const i of n) {
170
- const a = e.children(i);
171
- r = r || a.length > 0;
172
- }
173
- if (!r) {
174
- s.debug("Done, no node has children", e.nodes());
175
- return;
176
- }
177
- s.debug("Nodes = ", n, t);
178
- for (const i of n)
179
- if (s.debug(
180
- "Extracting node",
181
- i,
182
- l,
183
- l[i] && !l[i].externalConnections,
184
- !e.parent(i),
185
- e.node(i),
186
- e.children("D"),
187
- " Depth ",
188
- t
189
- ), !l[i])
190
- s.debug("Not a cluster", i, t);
191
- else if (!l[i].externalConnections && // !graph.parent(node) &&
192
- e.children(i) && e.children(i).length > 0) {
193
- s.warn(
194
- "Cluster without external connections, without a parent and with children",
195
- i,
196
- t
197
- );
198
- let d = e.graph().rankdir === "TB" ? "LR" : "TB";
199
- l[i] && l[i].clusterData && l[i].clusterData.dir && (d = l[i].clusterData.dir, s.warn("Fixing dir", l[i].clusterData.dir, d));
200
- const u = new U({
201
- multigraph: !0,
202
- compound: !0
203
- }).setGraph({
204
- rankdir: d,
205
- // Todo: set proper spacing
206
- nodesep: 50,
207
- ranksep: 50,
208
- marginx: 8,
209
- marginy: 8
210
- }).setDefaultEdgeLabel(function() {
211
- return {};
212
- });
213
- s.warn("Old graph before copy", m(e)), R(i, e, u, i), e.setNode(i, {
214
- clusterNode: !0,
215
- id: i,
216
- clusterData: l[i].clusterData,
217
- labelText: l[i].labelText,
218
- graph: u
219
- }), s.warn("New graph after copy node: (", i, ")", m(u)), s.debug("Old graph after copy", m(e));
220
- } else
221
- s.warn(
222
- "Cluster ** ",
223
- i,
224
- " **not meeting the criteria !externalConnections:",
225
- !l[i].externalConnections,
226
- " no parent: ",
227
- !e.parent(i),
228
- " children ",
229
- e.children(i) && e.children(i).length > 0,
230
- e.children("D"),
231
- t
232
- ), s.debug(l);
233
- n = e.nodes(), s.warn("New list of nodes", n);
234
- for (const i of n) {
235
- const a = e.node(i);
236
- s.warn(" Now next level", i, a), a.clusterNode && k(a.graph, t + 1);
237
- }
238
- }, F = (e, t) => {
239
- if (t.length === 0)
240
- return [];
241
- let n = Object.assign(t);
242
- return t.forEach((r) => {
243
- const i = e.children(r), a = F(e, i);
244
- n = [...n, ...a];
245
- }), n;
246
- }, it = (e) => F(e, e.children()), st = (e, t) => {
247
- s.info("Creating subgraph rect for ", t.id, t);
248
- const n = T(), r = e.insert("g").attr("class", "cluster" + (t.class ? " " + t.class : "")).attr("id", t.id), i = r.insert("rect", ":first-child"), a = S(n.flowchart.htmlLabels), d = r.insert("g").attr("class", "cluster-label"), u = t.labelType === "markdown" ? Y(d, t.labelText, { style: t.labelStyle, useHtmlLabels: a }) : d.node().appendChild($(t.labelText, t.labelStyle, void 0, !0));
249
- let f = u.getBBox();
250
- if (S(n.flowchart.htmlLabels)) {
251
- const c = u.children[0], o = J(u);
252
- f = c.getBoundingClientRect(), o.attr("width", f.width), o.attr("height", f.height);
253
- }
254
- const h = 0 * t.padding, w = h / 2, x = t.width <= f.width + h ? f.width + h : t.width;
255
- t.width <= f.width + h ? t.diff = (f.width - t.width) / 2 - t.padding / 2 : t.diff = -t.padding / 2, s.trace("Data ", t, JSON.stringify(t)), i.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - x / 2).attr("y", t.y - t.height / 2 - w).attr("width", x).attr("height", t.height + h);
256
- const { subGraphTitleTopMargin: E } = D(n);
257
- a ? d.attr(
258
- "transform",
259
- // This puts the label on top of the box instead of inside it
260
- `translate(${t.x - f.width / 2}, ${t.y - t.height / 2 + E})`
261
- ) : d.attr(
262
- "transform",
263
- // This puts the label on top of the box instead of inside it
264
- `translate(${t.x}, ${t.y - t.height / 2 + E})`
265
- );
266
- const y = i.node().getBBox();
267
- return t.width = y.width, t.height = y.height, t.intersect = function(c) {
268
- return p(t, c);
269
- }, r;
270
- }, rt = (e, t) => {
271
- const n = e.insert("g").attr("class", "note-cluster").attr("id", t.id), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
272
- r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
273
- const d = r.node().getBBox();
274
- return t.width = d.width, t.height = d.height, t.intersect = function(u) {
275
- return p(t, u);
276
- }, n;
277
- }, at = (e, t) => {
278
- const n = T(), r = e.insert("g").attr("class", t.classes).attr("id", t.id), i = r.insert("rect", ":first-child"), a = r.insert("g").attr("class", "cluster-label"), d = r.append("rect"), u = a.node().appendChild($(t.labelText, t.labelStyle, void 0, !0));
279
- let f = u.getBBox();
280
- if (S(n.flowchart.htmlLabels)) {
281
- const c = u.children[0], o = J(u);
282
- f = c.getBoundingClientRect(), o.attr("width", f.width), o.attr("height", f.height);
283
- }
284
- f = u.getBBox();
285
- const h = 0 * t.padding, w = h / 2, x = t.width <= f.width + t.padding ? f.width + t.padding : t.width;
286
- t.width <= f.width + t.padding ? t.diff = (f.width + t.padding * 0 - t.width) / 2 : t.diff = -t.padding / 2, i.attr("class", "outer").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w).attr("width", x + h).attr("height", t.height + h), d.attr("class", "inner").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w + f.height - 1).attr("width", x + h).attr("height", t.height + h - f.height - 3);
287
- const { subGraphTitleTopMargin: E } = D(n);
288
- a.attr(
289
- "transform",
290
- `translate(${t.x - f.width / 2}, ${t.y - t.height / 2 - t.padding / 3 + (S(n.flowchart.htmlLabels) ? 5 : 3) + E})`
291
- );
292
- const y = i.node().getBBox();
293
- return t.height = y.height, t.intersect = function(c) {
294
- return p(t, c);
295
- }, r;
296
- }, ct = (e, t) => {
297
- const n = e.insert("g").attr("class", t.classes).attr("id", t.id), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
298
- r.attr("class", "divider").attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2).attr("width", t.width + i).attr("height", t.height + i);
299
- const d = r.node().getBBox();
300
- return t.width = d.width, t.height = d.height, t.diff = -t.padding / 2, t.intersect = function(u) {
301
- return p(t, u);
302
- }, n;
303
- }, ot = { rect: st, roundedWithTitle: at, noteGroup: rt, divider: ct };
304
- let G = {};
305
- const lt = (e, t) => {
306
- s.trace("Inserting cluster");
307
- const n = t.shape || "rect";
308
- G[t.id] = ot[n](e, t);
309
- }, ft = () => {
310
- G = {};
311
- }, j = async (e, t, n, r, i, a) => {
312
- s.info("Graph in recursive render: XXX", m(t), i);
313
- const d = t.graph().rankdir;
314
- s.trace("Dir in recursive render - dir:", d);
315
- const u = e.insert("g").attr("class", "root");
316
- t.nodes() ? s.info("Recursive render XXX", t.nodes()) : s.info("No nodes found for", t), t.edges().length > 0 && s.trace("Recursive edges", t.edge(t.edges()[0]));
317
- const f = u.insert("g").attr("class", "clusters"), h = u.insert("g").attr("class", "edgePaths"), w = u.insert("g").attr("class", "edgeLabels"), x = u.insert("g").attr("class", "nodes");
318
- await Promise.all(
319
- t.nodes().map(async function(c) {
320
- const o = t.node(c);
321
- if (i !== void 0) {
322
- const b = JSON.parse(JSON.stringify(i.clusterData));
323
- s.info("Setting data for cluster XXX (", c, ") ", b, i), t.setNode(i.id, b), t.parent(c) || (s.trace("Setting parent", c, i.id), t.setParent(c, i.id, b));
324
- }
325
- if (s.info("(Insert) Node XXX" + c + ": " + JSON.stringify(t.node(c))), o && o.clusterNode) {
326
- s.info("Cluster identified", c, o.width, t.node(c));
327
- const b = await j(
328
- x,
329
- o.graph,
330
- n,
331
- r,
332
- t.node(c),
333
- a
334
- ), N = b.elem;
335
- H(o, N), o.diff = b.diff || 0, s.info("Node bounds (abc123)", c, o, o.width, o.x, o.y), V(N, o), s.warn("Recursive render complete ", N, o);
336
- } else
337
- t.children(c).length > 0 ? (s.info("Cluster - the non recursive path XXX", c, o.id, o, t), s.info(C(o.id, t)), l[o.id] = { id: C(o.id, t), node: o }) : (s.info("Node - the non recursive path", c, o.id, o), await _(x, t.node(c), d));
338
- })
339
- ), t.edges().forEach(function(c) {
340
- const o = t.edge(c.v, c.w, c.name);
341
- s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c)), s.info("Edge " + c.v + " -> " + c.w + ": ", c, " ", JSON.stringify(t.edge(c))), s.info("Fix", l, "ids:", c.v, c.w, "Translating: ", l[c.v], l[c.w]), W(w, o);
342
- }), t.edges().forEach(function(c) {
343
- s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c));
344
- }), s.info("#############################################"), s.info("### Layout ###"), s.info("#############################################"), s.info(t), M(t), s.info("Graph after layout:", m(t));
345
- let E = 0;
346
- const { subGraphTitleTotalMargin: y } = D(a);
347
- return it(t).forEach(function(c) {
348
- const o = t.node(c);
349
- s.info("Position " + c + ": " + JSON.stringify(t.node(c))), s.info(
350
- "Position " + c + ": (" + o.x,
351
- "," + o.y,
352
- ") width: ",
353
- o.width,
354
- " height: ",
355
- o.height
356
- ), o && o.clusterNode ? (o.y += y, O(o)) : t.children(c).length > 0 ? (o.height += y, lt(f, o), l[o.id].node = o) : (o.y += y / 2, O(o));
357
- }), t.edges().forEach(function(c) {
358
- const o = t.edge(c);
359
- s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(o), o), o.points.forEach((N) => N.y += y / 2);
360
- const b = q(h, c, o, l, n, t, r);
361
- z(o, b);
362
- }), t.nodes().forEach(function(c) {
363
- const o = t.node(c);
364
- s.info(c, o.type, o.diff), o.type === "group" && (E = o.diff);
365
- }), { elem: u, diff: E };
366
- }, xt = async (e, t, n, r, i) => {
367
- A(e, n, r, i), K(), Q(), ft(), tt(), s.warn("Graph at first:", JSON.stringify(m(t))), nt(t), s.warn("Graph after:", JSON.stringify(m(t)));
368
- const a = T();
369
- await j(e, t, r, i, void 0, a);
370
- };
371
- export {
372
- xt as r
373
- };