-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorgchart.mjs
More file actions
5930 lines (5926 loc) · 335 KB
/
orgchart.mjs
File metadata and controls
5930 lines (5926 loc) · 335 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//#region dist/combined/community.esm.js
var e = function(e, t) {
var n = this;
Object.defineProperty(this, "element", {
get() {
return e ? e.querySelector("[data-boc-content]") : null;
},
set(e) {
n.mainElement = e;
}
}), Object.defineProperty(this, "mainElement", {
get() {
return e;
},
set(t) {
e = t, e && (e.innerHTML = "\n <style> \n .boc-dark, .boc-light{ display: flex; }\n [data-boc-left]{ display: none; }\n [data-boc-right]{ height: 100%; position: relative; overflow:hidden; flex-grow: 1; }\n [data-boc-content]{ height: 100%; width: 100%; }\n @media screen and (max-width: 500px) {\n .boc-dark, .boc-light{ flex-direction: column; }\n [data-boc-left]{ order: 2; height: 50vh; }\n [data-boc-right]{ order: 1; }\n }\n </style>\n <div data-boc-left></div>\n <div data-boc-right>\n <div data-boc-content></div>\n </div>");
}
}), Object.defineProperty(this, "leftElement", { get() {
return e.querySelector("[data-boc-left]");
} }), n.init(e, t);
};
e.prototype.init = function(t, n) {
if (t && !this._initCalled) {
this._initCalled = !0, (typeof t == "string" || t instanceof String) && (t = document.querySelector(t)), this.element = t;
var r = this;
if (this.config = e.mergeDeep(e._defaultConfig(n), n), this._layoutConfigs = { base: {
orientation: this.config.orientation,
levelSeparation: this.config.levelSeparation,
mixedHierarchyNodesSeparation: this.config.mixedHierarchyNodesSeparation,
assistantSeparation: this.config.assistantSeparation,
subtreeSeparation: this.config.subtreeSeparation,
siblingSeparation: this.config.siblingSeparation,
layout: this.config.layout,
columns: this.config.columns,
collapse: this.config.collapse,
partnerNodeSeparation: this.config.partnerNodeSeparation
} }, this.config.tags) for (var i in this.config.tags) {
var a = this.config.tags[i];
a.subTreeConfig != null && (this._layoutConfigs[i] = {
orientation: a.subTreeConfig.orientation == null ? this.config.orientation : a.subTreeConfig.orientation,
levelSeparation: a.subTreeConfig.levelSeparation == null ? this.config.levelSeparation : a.subTreeConfig.levelSeparation,
mixedHierarchyNodesSeparation: a.subTreeConfig.mixedHierarchyNodesSeparation == null ? this.config.mixedHierarchyNodesSeparation : a.subTreeConfig.mixedHierarchyNodesSeparation,
assistantSeparation: a.subTreeConfig.assistantSeparation == null ? this.config.assistantSeparation : a.subTreeConfig.assistantSeparation,
subtreeSeparation: a.subTreeConfig.subtreeSeparation == null ? this.config.subtreeSeparation : a.subTreeConfig.subtreeSeparation,
siblingSeparation: a.subTreeConfig.siblingSeparation == null ? this.config.siblingSeparation : a.subTreeConfig.siblingSeparation,
layout: a.subTreeConfig.layout == null ? this.config.layout : a.subTreeConfig.layout,
columns: a.subTreeConfig.columns == null ? this.config.columns : a.subTreeConfig.columns,
collapse: a.subTreeConfig.collapse == null ? this.config.collapse : a.subTreeConfig.collapse,
partnerNodeSeparation: a.subTreeConfig.partnerNodeSeparation == null ? this.config.partnerNodeSeparation : a.subTreeConfig.partnerNodeSeparation,
template: a.subTreeConfig.template
});
}
this._event_id = e._guid(), e._validateConfig(this.config) && (this._vScroll = {}, this.config.ui || (this.ui = e.ui), this.config.editUI ? this.editUI = this.config.editUI : this.editUI = new e.editUI(), this.editUI.init(this), this.config.filterUI ? this.filterUI = this.config.filterUI : this.filterUI = new e.filterUI(), this.filterUI.init(this), this.manager = new e.manager(this), this._ai = new e._ai(this), this.config.searchUI ? this.searchUI = this.config.searchUI : this.searchUI = new e.searchUI(), this.config.aiUI ? this.aiUI = this.config.aiUI : this.aiUI = new e.aiUI(), this.config.orgScribeUI ? this.orgScribeUI = this.config.orgScribeUI : this.orgScribeUI = new e.orgScribeUI(), this.config.powerPointPreviewUI ? this.powerPointPreviewUI = this.config.powerPointPreviewUI : this.powerPointPreviewUI = new e.exportUI("pptx"), this.config.pdfPreviewUI ? this.pdfPreviewUI = this.config.pdfPreviewUI : this.pdfPreviewUI = new e.exportUI("pdf"), this.config.svgPreviewUI ? this.svgPreviewUI = this.config.svgPreviewUI : this.svgPreviewUI = new e.exportUI("svg"), this.config.pngPreviewUI ? this.pngPreviewUI = this.config.pngPreviewUI : this.pngPreviewUI = new e.exportUI("png"), this.config.nodeMenuUI ? this.nodeMenuUI = this.config.nodeMenuUI : this.nodeMenuUI = new e.menuUI(), this.nodeMenuUI.init(this, this.config.nodeMenu), this.config.nodeCircleMenuUI ? this.nodeCircleMenuUI = this.config.nodeCircleMenuUI : this.nodeCircleMenuUI = new e.circleMenuUI(), this.nodeCircleMenuUI.init(this, this.config.nodeCircleMenu), this.config.nodeContextMenuUI ? this.nodeContextMenuUI = this.config.nodeContextMenuUI : this.nodeContextMenuUI = new e.menuUI(), this.nodeContextMenuUI.init(this, this.config.nodeContextMenu), this.config.controlsUI ? this.controlsUI = this.config.controlsUI : this.controlsUI = new e.controlsUI(), this.config.toolbarUI ? this.toolbarUI = this.config.toolbarUI : this.toolbarUI = new e.toolbarUI(), this.config.notifierUI ? this.notifierUI = this.config.notifierUI : this.notifierUI = new e.notifierUI(), this.notifierUI.init(this), this.config.menuUI ? this.menuUI = this.config.menuUI : this.menuUI = new e.menuUI(), this.menuUI.init(this, this.config.menu), this.config.xScrollUI || (this.xScrollUI = new e.xScrollUI(this.element, this.config, function() {
return {
boundary: r.response.boundary,
scale: r.getScale(),
viewBox: r.getViewBox(),
padding: r.config.padding
};
}, function(e) {
r.setViewBox(e);
}, function() {
r._draw(!0, e.action.xScroll);
})), this.config.yScrollUI || (this.yScrollUI = new e.yScrollUI(this.element, this.config, function() {
return {
boundary: r.response.boundary,
scale: r.getScale(),
viewBox: r.getViewBox(),
padding: r.config.padding
};
}, function(e) {
r.setViewBox(e);
}, function() {
r._draw(!0, e.action.xScroll);
})), this.config.undoRedoUI ? this.undoRedoUI = this.config.undoRedoUI : this.undoRedoUI = new e.undoRedoUI(), this.mainElement.classList.add("boc-" + this.config.mode), this._gragStartedId = null, this._timeout = null, this._touch = null, this._initialized = !1, this._loaded = !1, this._moveInterval = null, this._movePosition = null, this.response = null, this.nodes = null, this.isVisible = null, this._connectorLines = {
x: {},
y: {}
}, e._intersectionObserver(this.element, function(t) {
r.isVisible = t, e.events.publish("visibility-change", [r]) !== !1 && e.LAZY_LOADING && r.isVisible && (r._loaded ? r._draw(!1, e.action.update) : (r._setInitialSizeIfNotSet(), r._draw(!1, e.action.init)));
}), this._resizeObserver = new ResizeObserver((e) => {
for (let t of e) {
let { width: e, height: n } = t.contentRect;
r._resizeHandler(e, n);
}
}), this._resizeObserver.observe(this.element));
}
}, e.prototype.load = function(t, n) {
var r = this;
return this.config.nodes = t, this._draw(!1, e.action.init, void 0, function() {
r.filterUI.update(), n && n();
}), this;
}, e.prototype.loadXML = function(t, n) {
var r = e._xml2json(t);
return this.load(r, n);
}, e.prototype.getXML = function() {
return e._json2xml(this.config.nodes);
}, e.prototype.on = function(t, n) {
return e.events.on(t, n, this._event_id), this;
}, e.prototype.removeListener = function(t, n) {
return e.events.remove(t, n, this._event_id);
}, e.prototype.draw = function(t, n, r) {
t ??= e.action.update, this._draw(!1, t, n, r);
}, e.prototype._draw = function(t, n, r, i) {
var a = this;
if (!(e.LAZY_LOADING && !this.isVisible)) {
if (!e.LAZY_LOADING && !this._initialized && (this._setInitialSizeIfNotSet(), this.width() == 0 || this.height() == 0)) {
console.error("Cannot load the chart with size 0! If you are using the OrgChart within tabs set OrgChart.LAZY_LOADING to true! ");
return;
}
this._hideBeforeAnimationCompleted = !1;
var o = n == e.action.init ? null : this.getViewBox();
this.manager.read(t, this.width(), this.height(), o, n, r, function(t) {
if (!a.notifierUI.show(t.notif)) {
n != e.action.exporting && (a.nodes = t.nodes, a.visibleNodeIds = t.visibleNodeIds, a.roots = t.roots), a._connectorLines = {
x: {},
y: {}
}, a.editUI.fields = t.allFields;
var o = { defs: "" };
e.events.publish("renderdefs", [a, o]);
var s = a.ui.defs(o.defs), c = a.getScale(t.viewBox);
s += a.ui.pointer(a.config, n, c);
var l = a.getViewBox(), u = t.viewBox, o = {
content: s,
res: t
};
e.events.publish("prerender", [a, o]), s = o.content;
var d = [];
if (e.RENDER_LINKS_BEFORE_NODES) for (var f = 0; f < t.visibleNodeIds.length; f++) {
var p = t.nodes[t.visibleNodeIds[f]];
e.getRootOf(p).stParent ? d.push(p.id) : s += a.ui.link(p, a, c, t.bordersByRootIdAndLevel, t.nodes, n);
}
for (var f = 0; f < t.visibleNodeIds.length; f++) {
var p = t.nodes[t.visibleNodeIds[f]], m = a._get(p.id);
if (e.RENDER_LINKS_BEFORE_NODES && d.includes(p.id) && (s += a.ui.link(p, a, c, t.bordersByRootIdAndLevel, t.nodes, n)), p.isTreeListItem || (s += a.ui.node(p, m, t.animations, a.config, void 0, void 0, void 0, n, c, a)), !p.min && p.treeList) {
var h = function(e) {
if (!p.treeList.pinnedIds.includes(e.id)) {
var r = a._get(e.id);
s += a.ui.node(e, r, t.animations, a.config, void 0, void 0, void 0, n, c, a), s += a.ui.expandCollapseBtn(a, e, r, a.config, a._layoutConfigs, n, c);
}
for (var i of e.children) h(i);
}, g = e.randomId();
s += `<clipPath id="treelist_${g}">
<rect rx="10" ry="10" x="${p.x + p.padding[3]}" y="${p.y + p.padding[0]}" width="${p.w - p.padding[1] - p.padding[3]}" height="${p.h - p.padding[2] - p.padding[0]}">
</clipPath><g clip-path="url(#treelist_${g})"><g data-treelist-content="${p.id}" transform="matrix(1,0,0,1,0,-${p.treeList.scrollTop})">`;
for (var _ of p.stChildren) h(_);
for (var v of p.treeList.pinnedIds) {
var y = a.getNode(v), b = a._get(v);
s += a.ui.node(y, b, t.animations, a.config, void 0, void 0, void 0, n, c, a, !0), s += a.ui.expandCollapseBtn(a, y, b, a.config, a._layoutConfigs, n, c);
}
var { thumbHeight: x, thumbPosition: S, scrollBarDisplay: C } = e._treeListGetTumbPositionFromScrollTop(p);
s += `</g>
<rect style="display: ${C}" data-treelist-scroll="${p.id}" class="boc-scroll" x="${p.x + p.w - p.padding[1] - e.TREELIST_SCROLLBAR_WIDTH}" y="${p.y + p.padding[0]}" width="${e.TREELIST_SCROLLBAR_WIDTH}" height="${p.h - p.padding[2] - p.padding[0]}"></rect>
<rect style="display: ${C}" data-treelist-thumb="${p.id}" class="boc-scroll-thumb" x="${p.x + p.w - p.padding[1] - e.TREELIST_SCROLLBAR_WIDTH}" y="${S}" width="${e.TREELIST_SCROLLBAR_WIDTH}" height="${x}"></rect>
</g>`;
}
}
for (var f = 0; f < t.visibleNodeIds.length; f++) {
var p = t.nodes[t.visibleNodeIds[f]], m = a._get(p.id);
p.isTreeListItem || (e.RENDER_LINKS_BEFORE_NODES || (s += a.ui.link(p, a, c, t.bordersByRootIdAndLevel, t.nodes, n)), s += a.ui.expandCollapseBtn(a, p, m, a.config, a._layoutConfigs, n, c));
}
var o = {
content: s,
res: t
};
if (e.events.publish("render", [a, o]), s = o.content, t = o.res, s += a.ui.lonely(a.config), n === e.action.exporting) {
var w = t.boundary, T = w.maxX - w.minX, E = w.maxY - w.minY, D = a.ui.svg(T, E, [
w.minX,
w.minY,
T,
E
], a.config, s, c);
i.call(a, D, t);
return;
}
(n === e.action.centernode || n === e.action.insert || n === e.action.expand || n === e.action.collapse || n === e.action.update) && (u = l), n === e.action.init && l != null && (u = l), n === e.action.centerNode && l != null && (u = l), a.response = t, a._lastSize = {
width: a.width(),
height: a.height()
};
var D = a.ui.svg("100%", "100%", u, a.config, s);
if (!a._initialized) a.element.innerHTML = a.ui.css() + D + a.ui.menuButton(a.config) + a.ui.aiButton(a.config), a._attachEventHandlers(), a.xScrollUI.create(a.width(), a.config.padding), a.xScrollUI.setPosition(), a.xScrollUI.addListener(a.getSvg()), a.yScrollUI.create(a.height(), a.config.padding), a.yScrollUI.setPosition(), a.yScrollUI.addListener(a.getSvg()), a.config.enableSearch && a.searchUI.init(a), a.aiUI.init(a), a.orgScribeUI.init(a), a.powerPointPreviewUI.init(a), a.pdfPreviewUI.init(a), a.svgPreviewUI.init(a), a.pngPreviewUI.init(a), a.toolbarUI.init(a, a.config.toolbar), a.undoRedoUI.init(a), a.controlsUI.init(a);
else {
var O = a.getSvg(), k = O.parentNode;
k.removeChild(O), k.insertAdjacentHTML("afterbegin", D), a._attachEventHandlers(), a.xScrollUI.addListener(a.getSvg()), a.yScrollUI.addListener(a.getSvg()), a.xScrollUI.setPosition(), a.yScrollUI.setPosition();
}
var A = !1, j = a.response.animations;
if (j[0].length > 0) {
a._hideBeforeAnimation(j[0].length);
for (var f = 0; f < j[0].length; f++) j[0][f] = a.getNodeElement(j[0][f]);
e.animate(j[0], j[1], j[2], a.config.anim.duration, a.config.anim.func, function() {
A ||= (i && i.call(a), e.events.publish("redraw", [a]), a._showAfterAnimation(), !0);
});
}
n === e.action.centerNode ? e.animate(a.getSvg(), { viewbox: l }, { viewbox: a.response.viewBox }, a.config.anim.duration, a.config.anim.func, function() {
a.ripple(r.options.rippleId), A ||= (i && i.call(a), e.events.publish("redraw", [a]), a._showAfterAnimation(), !0);
}, function() {
a.xScrollUI.setPosition(), a.yScrollUI.setPosition();
}) : l && a.response && (l[0] != a.response.viewBox[0] || l[1] != a.response.viewBox[1] || l[2] != a.response.viewBox[2] || l[3] != a.response.viewBox[3]) && (n === e.action.insert || n === e.action.expand || n === e.action.collapse || n === e.action.update || n === e.action.init) ? e.animate(a.getSvg(), { viewbox: l }, { viewbox: a.response.viewBox }, a.config.anim.duration * 2, a.config.anim.func, function() {
a.xScrollUI.setPosition(), a.yScrollUI.setPosition(), A ||= (i && i.call(a), e.events.publish("redraw", [a]), !0);
}) : j[0].length == 0 && (A ||= (i && i.call(a), e.events.publish("redraw", [a]), !0)), a._initialized || (a._initialized = !0, a.filterUI.update(), a._ai.setContext(), e.events.publish("init", [a])), !a._loaded && t && t.nodes && Object.keys(t.nodes).length && (a._loaded = !0);
}
}, function(t) {
e.events.publish("ready", [a, t]);
});
}
}, e.prototype._setInitialSizeIfNotSet = function() {
this.mainElement.style.overflow = "hidden", this.mainElement.style.position = "relative", this.mainElement.offsetHeight == 0 && (this.mainElement.style.height = "100%", this.mainElement.offsetHeight == 0 && (this.mainElement.style.height = "700px")), this.mainElement.offsetWidth == 0 && (this.mainElement.style.width = "100%", this.mainElement.offsetWidth == 0 && (this.mainElement.style.width = "700px"));
}, e.prototype.width = function() {
return this.element.offsetWidth;
}, e.prototype.height = function() {
return this.element.offsetHeight;
}, e.prototype.getViewBox = function() {
var t = this.getSvg();
return e._getViewBox(t);
}, e.prototype.setViewBox = function(e) {
this.getSvg().setAttribute("viewBox", e.toString());
}, e.prototype.getScale = function(t) {
return t ||= this.getViewBox(), e.getScale(t, this.width(), this.height(), this.config.scaleInitial, this.config.scaleMax, this.config.scaleMin);
}, e.prototype.setScale = function(t) {
t > this.config.scaleMax && (t = this.config.scaleMax), t < this.config.scaleMin && (t = this.config.scaleMin);
var n = this.getViewBox().slice(0), r = this.width(), i = this.height(), a = r / n[2], o = i / n[3], s = a > o ? o : a, c = n, l = n[2], u = n[3];
return n[2] /= t / s, n[3] /= t / s, n[0] = c[0] - (n[2] - l) / 2, n[1] = c[1] - (n[3] - u) / 2, this.setViewBox(n), e.events.publish("redraw", [this]), t;
}, e.prototype.ripple = function(t, n, r) {
var i = this.getNode(t);
if (i != null) {
var a = this.getNodeElement(t);
if (a != null) {
var o = this.getScale(), s = i.w / 2, c = i.h / 2;
if (n !== void 0 && r !== void 0) {
var l = a.getBoundingClientRect();
s = n / o - l.left / o, c = r / o - l.top / o;
}
var u = i.w, d = i.h, f = u - s > s ? u - s : s, p = d - c > c ? d - c : c;
f = f, p = p;
var m = f > p ? f : p, h = document.createElementNS("http://www.w3.org/2000/svg", "g"), g = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), _ = document.createElementNS("http://www.w3.org/2000/svg", "rect"), v = document.createElementNS("http://www.w3.org/2000/svg", "circle"), y = e.randomId();
g.setAttribute("id", y);
var b = {
ripple: e.t(i.templateName, i.min, this.getScale()).ripple,
node: i
};
e.events.publish("ripple", [this, b]), _.setAttribute("x", b.ripple.rect ? b.ripple.rect.x : 0), _.setAttribute("y", b.ripple.rect ? b.ripple.rect.y : 0), _.setAttribute("width", b.ripple.rect ? b.ripple.rect.width : i.w), _.setAttribute("height", b.ripple.rect ? b.ripple.rect.height : i.h), _.setAttribute("rx", b.ripple.radius), _.setAttribute("ry", b.ripple.radius), v.setAttribute("clip-path", "url(#" + y + ")"), v.setAttribute("cx", s), v.setAttribute("cy", c), v.setAttribute("r", 0), v.setAttribute("fill", b.ripple.color), v.setAttribute("class", "boc-ripple"), g.appendChild(_), h.appendChild(g), h.appendChild(v), a.appendChild(h), e.animate(v, {
r: 0,
opacity: 1
}, {
r: m,
opacity: 0
}, 500, e.anim.outPow, function() {
a.removeChild(h);
});
}
}
}, e.prototype.centerOutNodes = function(t) {
if (this._centerInNodes) {
var n = JSON.parse(this._centerInNodes);
this._centerInNodes = null;
var r = this;
this._centerInNodesTimeout = e.animate(this.getSvg(), { viewBox: this.getViewBox() }, { viewBox: n }, 300, this.config.anim.func, function() {
r.draw(e.action.update, null, function() {
t && t.call(r);
});
});
}
}, e.prototype.centerInNodes = function(t, n) {
var r = this.getViewBox();
this._centerInNodes ||= JSON.stringify(r);
var i = 2 ** 53 - 1, a = -(2 ** 53 - 1), o = 2 ** 53 - 1, s = -(2 ** 53 - 1);
for (var c of t) c.y < i && (i = c.y), c.y + c.h > a && (a = c.y + c.h), c.x < o && (o = c.x), c.x + c.w > s && (s = c.x + c.w);
var l = s - o, u = a - i, d = l / (l + this.config.padding * 2), f = u / (u + this.config.padding * 2), p = d > f ? f : d;
p > this.config.scaleMax && (p = this.config.scaleMax), p < this.config.scaleMin && (p = this.config.scaleMin);
var m = [50, 50], h = this.width(), g = this.height(), d = h / r[2], f = g / r[3], _ = d > f ? f : d, v = r, y = r[2], b = r[3];
r[2] /= p / _, r[3] /= p / _, r[0] = v[0] - (r[2] - y) / (100 / m[0]), r[1] = v[1] - (r[3] - b) / (100 / m[1]), r[0] = o - (h / p - l) / 2, r[1] = i - (g / p - u) / 2;
var x = this;
this._centerInNodesTimeout &&= (clearTimeout(this._centerInNodesTimeout), null), this._centerInNodesTimeout = e.animate(this.getSvg(), { viewBox: this.getViewBox() }, { viewBox: r }, 300, this.config.anim.func, function() {
x.draw(e.action.update, null, function() {
n && n.call(x);
});
});
}, e.prototype.center = function(t, n, r) {
var i, a, o = t, s = !0, c = !0;
n && n.parentState != null && (i = n.parentState), n && n.childrenState != null && (a = n.childrenState), n && n.rippleId != null && (o = n.rippleId), n && n.vertical != null && (s = n.vertical), n && n.horizontal != null && (c = n.horizontal);
var l = {
parentState: i,
childrenState: a,
rippleId: o,
vertical: s,
horizontal: c
};
this._draw(!1, e.action.centerNode, {
id: t,
options: l
}, r);
}, e.prototype.fit = function(t) {
this.config.scaleInitial = e.match.boundary, this._draw(!0, e.action.init, { method: "fit" }, t);
}, e.prototype.fitIfOutside = function(t) {
this.config.scaleInitial = e.match.boundaryIfOutside, this._draw(!0, e.action.init, { method: "fit" }, t);
}, e.prototype.toggleFullScreen = function() {
var t = document.querySelector("[" + e.attr.tlbr + "r='fullScreen']");
document.fullscreenElement == this.element || document.webkitFullscreenElement == this.element || document.mozFullScreenElement == this.element || document.msFullscreenElement == this.element ? (document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(), t && (t.innerHTML = e.toolbarUI.openFullScreenIcon)) : (this.element.requestFullscreen ? this.element.requestFullscreen() : this.element.mozRequestFullScreen ? this.element.mozRequestFullScreen() : this.element.webkitRequestFullscreen ? this.element.webkitRequestFullscreen() : this.element.msRequestFullscreen && this.element.msRequestFullscreen(), t && (t.innerHTML = e.toolbarUI.closeFullScreenIcon));
}, e.prototype.getNode = function(e) {
return this.nodes[e];
}, e.prototype.setLayout = function(t, n) {
n ||= "base", this._layoutConfigs[n].layout = t, n == "base" && (this.config.layout = t), this._draw(!1, e.action.update);
}, e.prototype.setOrientation = function(t, n, r) {
var i = this;
n ||= "base", this._layoutConfigs[n].orientation = t, n == "base" && (this.config.orientation = t), this._draw(!1, e.action.update, void 0, function() {
i.getScale(), e._moveToBoundaryArea(i.getSvg(), i.getViewBox(), i.response.boundary, function() {
i._draw(!0, e.action.pan), r && r();
});
});
}, e.prototype.search = function(t, n, r) {
return e.isNEU(n) && (n = this.searchUI._searchFields), e.isNEU(r) && (r = n), e._search.search(this.config.nodes, t, n, r, this.config.searchDisplayField, this.config.searchFieldsWeight, this.searchUI._searchFieldsAbbreviation);
}, e.prototype._hideBeforeAnimation = function(t) {
if (this._hideBeforeAnimationCompleted != 1 && !(t && t < e.ANIM_THRESHOLD)) {
var n = this.element.getElementsByTagName("text");
if (n.length > e.TEXT_THRESHOLD) for (var r = 0; r < n.length; r++) n[r].style.display = "none";
var i = this.element.getElementsByTagName("image");
if (i.length > e.IMAGES_THRESHOLD) for (var r = 0; r < i.length; r++) i[r].style.display = "none";
var a = this.element.querySelectorAll("[" + e.attr.link_id + "]");
if (a.length > e.LINKS_THRESHOLD) for (var r = 0; r < a.length; r++) a[r].style.display = "none";
var o = this.element.querySelectorAll("[" + e.attr.control_expcoll_id + "]");
if (o.length > e.BUTTONS_THRESHOLD) for (var r = 0; r < o.length; r++) o[r].style.display = "none";
var s = this.element.querySelectorAll("[" + e.attr.control_up_id + "]");
if (s.length > e.BUTTONS_THRESHOLD) for (var r = 0; r < s.length; r++) s[r].style.display = "none";
this._hideBeforeAnimationCompleted = !0;
}
}, e.prototype._showAfterAnimation = function() {
for (var t = this.element.getElementsByTagName("text"), n = 0; n < t.length; n++) t[n].style.display = "";
for (var r = this.element.getElementsByTagName("image"), n = 0; n < r.length; n++) r[n].style.display = "";
for (var i = this.element.querySelectorAll("[" + e.attr.link_id + "]"), n = 0; n < i.length; n++) i[n].style.display = "";
for (var a = this.element.querySelectorAll("[" + e.attr.control_expcoll_id + "]"), n = 0; n < a.length; n++) a[n].style.display = "";
for (var o = this.element.querySelectorAll("[" + e.attr.control_up_id + "]"), n = 0; n < o.length; n++) o[n].style.display = "";
this._hideBeforeAnimationCompleted = !1;
}, e.prototype.isChild = function(e, t) {
for (var n = this.getNode(t); n;) {
if (n.id == e) return !0;
n = n.parent ? n.parent : n.stParent;
}
return !1;
}, e.prototype.getCollapsedIds = function(e) {
for (var t = [], n = 0; n < e.childrenIds.length; n++) {
var r = this.getNode(e.childrenIds[n]);
r.collapsed == 1 && t.push(r.id);
}
return t;
}, e.prototype.stateToUrl = function() {
if (this.manager.state) {
var e = {};
return e.exp = this.manager.state.exp.join("*"), e.min = this.manager.state.min.join("*"), e.adjustify = this.manager.state.adjustify.x + "*" + this.manager.state.adjustify.y, e.scale = this.manager.state.scale, e.y = this.manager.state.x, e.x = this.manager.state.y, new URLSearchParams(e).toString();
}
return "";
}, e.prototype.generateId = function() {
for (;;) {
var e = "_" + ("0000" + (Math.random() * 36 ** 4 | 0).toString(36)).slice(-4);
if (this.nodes == null || !this.nodes.hasOwnProperty(e)) return e;
}
}, e.prototype.moveNodesToVisibleArea = function(t, n) {
for (var r = this, i = this.roots[0], a = this.getSvg(), o = this.getViewBox(), s = null, c = null, l = null, u = null, d = 0; d < t.length; d++) {
var f = this.nodes[t[d]];
f.x != null && f.y != null && ((s === null || s < f.x + f.w) && (s = f.x + f.w), (c === null || c < f.y + f.h) && (c = f.y + f.h), (l === null || l > f.x) && (l = f.x), (u === null || u > f.y) && (u = f.y));
}
if (!(s == null || c == null || l == null || u == null)) {
var p = this.width(), m = this.height(), h = s - l + this.config.padding * 2, g = c - u + this.config.padding * 2, _ = p / h, v = m / g, y = _ > v ? v : _, b = Math.ceil(p / y), x = Math.ceil(m / y), h = 0, g = 0;
if (b - this.config.padding * 2 >= s - l) h = (s + l) / 2 - b / 2;
else switch (h = i.x - b / 2 + e.manager._getNodeWidth(i, this.config) / 2, this.config.orientation) {
case e.orientation.right:
case e.orientation.right_top:
h = -(b / 2 - (l - s) / 2), h < this.config.padding - b && (h = this.config.padding - b);
break;
case e.orientation.left:
case e.orientation.bottom_left:
case e.orientation.top_left:
case e.orientation.left_top:
h = -(b / 2 - (s - l) / 2), h > -this.config.padding && (h = -this.config.padding);
break;
}
if (x - this.config.padding * 2 >= c - u) g = (c + u) / 2 - x / 2;
else switch (g = -(x / 2 - (c - u) / 2), g > -this.config.padding && (g = -this.config.padding), this.config.orientation) {
case e.orientation.bottom:
case e.orientation.bottom_left:
g = -(x / 2 - (u - c) / 2), g < this.config.padding - x && (g = this.config.padding - x);
break;
case e.orientation.left:
case e.orientation.right:
g = i.y - x / 2 + e.manager._getNodeWidth(i, this.config) / 2;
break;
}
var S = [
h,
g,
b,
x
];
o[0] !== S[0] || o[1] !== S[1] ? e.animate(a, { viewBox: o }, { viewBox: S }, this.config.anim.duration, this.config.anim.func, function() {
r.draw(e.action.update, void 0, n);
}) : n && n();
}
}, e.prototype._nodeHasHiddenParent = function(t) {
return !t.parent && !e.isNEU(t.pid) && this.getNode(t.pid);
}, e.prototype.destroy = function() {
this._initCalled = !1, this._resizeObserver.unobserve(this.element), e.events.removeForEventId(this._event_id), this.element.innerHTML = null;
}, e.prototype.canUpdateLink = function(e, t) {
if (t == null || t == null || e == null || e == null || e == t) return !1;
var n = this.getNode(t), r = this.getNode(e);
return n && r && (n.isPartner || n.hasPartners && r.isAssistant || n.hasAssistants && r.isPartner) ? !1 : !this.isChild(e, t);
}, e.prototype._canUpdateLink = e.prototype.canUpdateLink, e.prototype.updateNode = function(t, n, r, i) {
if (t) {
var a = this, o = this.get(t.id);
if (r === !0 && e.events.publish("update", [
this,
o,
t
]) === !1) return !1;
this.update(t), this._ai.setContext(), e.events.publish("updated", [this]), this.filterUI.update();
var s = this.getNode(t.id), c = s.pid;
c ??= s.stpid, this._draw(!1, e.action.update, { id: c }, function() {
i || a.ripple(t.id), n && n();
});
}
}, e.prototype.update = function(e) {
for (var t = 0; t < this.config.nodes.length; t++) if (this.config.nodes[t].id == e.id) {
this._putInUndoStack(), this.clearRedo(), this.config.nodes[t] = e;
break;
}
return this;
}, e.prototype.removeNode = function(t, n, r) {
if (!this.canRemove(t)) return !1;
var i = this._getNewPidsAndStpidsForIds(t);
return r === !0 && e.events.publish("remove", [
this,
t,
i
]) === !1 ? !1 : (this.remove(t), this._ai.setContext(), e.events.publish("updated", [this]), this.filterUI.update(), this._draw(!1, e.action.update, null, function() {
n && n();
}), !0);
}, e.prototype.remove = function(e) {
var t = this.get(e);
if (t) {
this._putInUndoStack(), this.clearRedo();
for (var n = this.config.nodes.length - 1; n >= 0; n--) (this.config.nodes[n].pid == e || this.config.nodes[n].stpid == e) && (this.config.nodes[n].pid = t.pid, this.config.nodes[n].stpid = t.stpid), this.config.nodes[n].id == e && this.config.nodes.splice(n, 1);
}
return this;
}, e.prototype._getNewPidsAndStpidsForIds = function(e) {
var t = this.get(e), n = {}, r = {};
if (t) for (var i = this.config.nodes.length - 1; i >= 0; i--) this.config.nodes[i].pid == e ? n[this.config.nodes[i].id] = t.pid : this.config.nodes[i].stpid == e && (r[this.config.nodes[i].id] = t.stpid);
return {
newPidsForIds: n,
newStpidsForIds: r
};
}, e.prototype.addNode = function(t, n, r) {
var i = this;
if (r === !0 && e.events.publish("add", [this, t]) === !1) return !1;
this.add(t), this._ai.setContext(), e.events.publish("updated", [this]), this.filterUI.update(), i._draw(!1, e.action.insert, {
id: t.pid,
insertedNodeId: t.id
}, function() {
i.ripple(t.id), n && n();
});
}, e.prototype.add = function(t) {
if (t.id ?? console.error("Call addNode without id"), this._putInUndoStack(), this.clearRedo(), this.config.movable && !e.isNEU(t.pid)) {
var n = this._get(t.pid);
n && (n.movex != null && (t.movex = n.movex), n.movey != null && (t.movey = n.movey));
}
return this.config.nodes.push(t), this;
}, e.prototype.replaceIds = function(t, n) {
this._replaceIds(t), this._draw(!1, e.action.update, void 0, n);
}, e.prototype._replaceIds = function(t) {
for (var n = function(e) {
for (var n = 0; n < e.length; n++) {
var r = e[n];
for (var i in t) {
var a = t[i];
r.from == i && (r.from = a), r.to == i && (r.to = a);
}
}
}, r = 0; r < this.config.nodes.length; r++) {
var i = this.config.nodes[r];
for (var a in t) {
var o = t[a];
i.id == a && (i.id = o), i.pid == a && (i.pid = o), i.stpid == a && (i.stpid = o), i.ppid == a && (i.ppid = o);
}
}
if (Array.isArray(this.config.roots)) for (var r = 0; r < this.config.roots.length; r++) e.isNEU(t[this.config.roots[r]]) || (this.config.roots[r] = t[this.config.roots[r]]);
if (this.nodes) {
for (var s in this.nodes) if (!e.isNEU(t[s])) {
var o = t[s], c = this.nodes[s];
c.id = o, this.nodes[o] = c;
}
}
if (this.manager.oldNodes) {
for (var s in this.manager.oldNodes) if (!e.isNEU(t[s])) {
var o = t[s], c = this.manager.oldNodes[s];
c.id = o, this.manager.oldNodes[o] = c;
}
}
if (this.roots) {
for (var s in this.roots) if (!e.isNEU(t[s])) {
var o = t[s], c = this.roots[s];
c.id = o, this.roots[o] = c;
}
}
n(this.config.clinks), n(this.config.slinks), n(this.config.groupDottedLines), n(this.config.dottedLines);
}, e.prototype._get = function(t) {
var n = this.__get(t);
if (n) return n;
if ((this.config.groupDottedLines.length || this.config.dottedLines.length) && !e.isNEU(t) && typeof t == "string" && (t.indexOf("balkan_group_dotted_") != -1 || t.indexOf("balkan_dotted_") != -1)) {
t = t.replace("balkan_group_dotted_", ""), t = t.replace("balkan_dotted_", "");
var r = t.indexOf("_balkan_id_");
if (t = t.substring(r + 11), n = this.__get(t), n) return n;
}
return null;
}, e.prototype.__get = function(e) {
for (var t = 0; t < this.config.nodes.length; t++) if (this.config.nodes[t].id == e) return this.config.nodes[t];
return null;
}, e.prototype.get = function(e) {
var t = this._get(e);
return t == null ? null : JSON.parse(JSON.stringify(t));
}, e.prototype.canRemove = function(e) {
var t = this.getNode(e);
return !(!t || t.hasPartners || t.hasAssistants);
}, e === void 0 && (e = {}), e.animate = function(t, n, r, i, a, o, s) {
var c = 10, l = 1, u = 1, d = i / c + 1, f;
document.getElementsByTagName("g"), Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
function p() {
for (var p = 0; p < t.length; p++) for (var m in r[p]) {
var h = e._arrayContains([
"top",
"left",
"right",
"bottom",
"width",
"height"
], m.toLowerCase()) ? "px" : "";
switch (m.toLowerCase()) {
case "d":
var g = a((u * c - c) / i) * (r[p][m][0] - n[p][m][0]) + n[p][m][0], _ = a((u * c - c) / i) * (r[p][m][1] - n[p][m][1]) + n[p][m][1];
t[p].setAttribute("d", t[p].getAttribute("d") + " L" + g + " " + _);
break;
case "r":
var v = a((u * c - c) / i) * (r[p][m] - n[p][m]) + n[p][m];
t[p].setAttribute("r", v);
break;
case "x1":
var v = a((u * c - c) / i) * (r[p][m] - n[p][m]) + n[p][m];
t[p].setAttribute("x1", v);
break;
case "x2":
var v = a((u * c - c) / i) * (r[p][m] - n[p][m]) + n[p][m];
t[p].setAttribute("x2", v);
break;
case "y1":
var v = a((u * c - c) / i) * (r[p][m] - n[p][m]) + n[p][m];
t[p].setAttribute("y1", v);
break;
case "y2":
var v = a((u * c - c) / i) * (r[p][m] - n[p][m]) + n[p][m];
t[p].setAttribute("y2", v);
break;
case "scrolltop":
var v = a((u * c - c) / i) * (r[p][m] - n[p][m]) + n[p][m];
t[p].scrollTop = v;
break;
case "rotate3d":
if (r[p][m]) {
var y = n[p][m], b = r[p][m], x = [
0,
0,
0,
0
];
for (var S in y) x[S] = a((u * c - c) / i) * (b[S] - y[S]) + y[S];
t[p].style.transform = "rotate3d(" + x.toString() + "deg)";
}
break;
case "transform":
if (r[p][m]) {
var y = n[p][m], b = r[p][m], x = [
0,
0,
0,
0,
0,
0
];
for (var S in y) x[S] = a((u * c - c) / i) * (b[S] - y[S]) + y[S];
t[p].hasAttribute("transform") ? t[p].setAttribute("transform", "matrix(" + x.toString() + ")") : t[p].style.transform = "matrix(" + x.toString() + ")";
}
break;
case "viewbox":
if (r[p][m]) {
var y = n[p][m], b = r[p][m], x = [
0,
0,
0,
0
];
for (var S in y) x[S] = a((u * c - c) / i) * (b[S] - y[S]) + y[S];
t[p].setAttribute("viewBox", x.toString());
}
break;
case "margin":
if (r[p][m]) {
var y = n[p][m], b = r[p][m], x = [
0,
0,
0,
0
];
for (var S in y) x[S] = a((u * c - c) / i) * (b[S] - y[S]) + y[S];
for (var C = "", S = 0; S < x.length; S++) C += parseInt(x[S]) + "px ";
t[p] && t[p].style && (t[p].style[m] = C);
}
break;
case "scrolly":
var v = a((u * c - c) / i) * (r[p][m] - n[p][m]) + n[p][m];
t[p].scrollTo(0, v);
break;
default:
var v = a((u * c - c) / i) * (r[p][m] - n[p][m]) + n[p][m];
t[p] && t[p].style && (t[p].style[m] = v + h);
break;
}
}
if (s) {
var v = a((u * c - c) / i);
s(v);
}
u += l, u > d + 1 && (clearInterval(f), o && o(t));
}
return f = setInterval(p, c), f;
}, e.anim = {}, e.anim.inPow = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : e ** 2;
}, e.anim.outPow = function(e) {
var t = 2;
if (e < 0) return 0;
if (e > 1) return 1;
var n = t % 2 == 0 ? -1 : 1;
return n * ((e - 1) ** t + n);
}, e.anim.inOutPow = function(t) {
var n = 2;
if (t < 0) return 0;
if (t > 1) return 1;
if (t *= 2, t < 1) return e.anim.inPow(t, n) / 2;
var r = n % 2 == 0 ? -1 : 1;
return r / 2 * ((t - 2) ** n + r * 2);
}, e.anim.inSin = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : -Math.cos(Math.PI / 2 * e) + 1;
}, e.anim.outSin = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : Math.sin(Math.PI / 2 * e);
}, e.anim.inOutSin = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : -.5 * (Math.cos(Math.PI * e) - 1);
}, e.anim.inExp = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : 2 ** (10 * (e - 1));
}, e.anim.outExp = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : -(2 ** (-10 * e)) + 1;
}, e.anim.inOutExp = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : e < .5 ? .5 * 2 ** (10 * (2 * e - 1)) : .5 * (-(2 ** (10 * (-2 * e + 1))) + 2);
}, e.anim.inCirc = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : -(Math.sqrt(1 - e * e) - 1);
}, e.anim.outCirc = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : Math.sqrt(1 - (e - 1) * (e - 1));
}, e.anim.inOutCirc = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : e < 1 ? -.5 * (Math.sqrt(1 - e * e) - 1) : .5 * (Math.sqrt(1 - (2 * e - 2) * (2 * e - 2)) + 1);
}, e.anim.rebound = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : e < 1 / 2.75 ? 1 - 7.5625 * e * e : e < 2 / 2.75 ? 1 - (7.5625 * (e - 1.5 / 2.75) * (e - 1.5 / 2.75) + .75) : e < 2.5 / 2.75 ? 1 - (7.5625 * (e - 2.25 / 2.75) * (e - 2.25 / 2.75) + .9375) : 1 - (7.5625 * (e - 2.625 / 2.75) * (e - 2.625 / 2.75) + .984375);
}, e.anim.inBack = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : e * e * (2.70158 * e - 1.70158);
}, e.anim.outBack = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : (e - 1) * (e - 1) * (2.70158 * (e - 1) + 1.70158) + 1;
}, e.anim.inOutBack = function(e) {
return e < 0 ? 0 : e > 1 ? 1 : e < .5 ? .5 * (4 * e * e * (3.5949 * 2 * e - 2.5949)) : .5 * ((2 * e - 2) * (2 * e - 2) * (3.5949 * (2 * e - 2) + 2.5949) + 2);
}, e.anim.impulse = function(e) {
var t = 2 * e;
return t * Math.exp(1 - t);
}, e.anim.expPulse = function(e) {
return Math.exp(-2 * e ** 2);
}, e === void 0 && (e = {}), e.prototype._attachEventHandlers = function(t) {
if (this.config.interactive) {
var t = this.getSvg(), n = this;
t.addEventListener("touchstart", function(e) {
e.preventDefault(), n._globalMouseDownHandler.apply(n, [this, e]);
}, { passive: !1 }), t.addEventListener("mousedown", function(e) {
n._globalMouseDownHandler.apply(n, [this, e]);
}, { passive: !0 }), t.addEventListener("contextmenu", function(e) {
n._globalContextHandler.apply(n, [this, e]);
}, { passive: !1 }), t.addEventListener("dblclick", function(e) {
n._globalDbClickHandler.apply(n, [this, e]);
}, { passive: !0 }), this.config.mouseScrool != e.action.none && t.addEventListener("wheel", function(e) {
n._mouseScrollHandler.apply(n, [this, e]);
}, { passive: !1 });
var r = this.getMenuButton();
r && r.addEventListener("click", function(e) {
n._menuClickHandler.apply(n, [this, e]);
});
}
}, e === void 0 && (e = {}), e.VERSION = "9.1.82", e.orientation = {}, e.orientation.top = 0, e.orientation.bottom = 1, e.orientation.right = 2, e.orientation.left = 3, e.orientation.top_left = 4, e.orientation.bottom_left = 5, e.orientation.right_top = 6, e.orientation.left_top = 7, e.anchor = {
top_right: "top_right",
right_top: "right_top",
bottom_right: "bottom_right",
right_bottom: "right_bottom",
top_left: "top_left",
left_top: "left_top",
bottom_left: "bottom_left",
left_bottom: "left_bottom",
top: "top",
bottom: "bottom",
left: "left",
right: "right"
}, e.align = {}, e.align.center = e.CENTER = 8, e.align.orientation = e.ORIENTATION = 9, e.attr = {}, e.attr.l = "data-l", e.attr.id = "data-id", e.attr.sl = "data-sl", e.attr.lbl = "data-lbl", e.attr.val = "data-val", e.attr.tlbr = "data-tlbr", e.attr.item = "data-item", e.attr.layout = "data-layout", e.attr.node_id = "data-n-id", e.attr.link_id = "data-l-id", e.attr.field_name = "data-f-name", e.attr.c_link_to = "data-c-l-to", e.attr.c_link_from = "data-c-l-from", e.attr.s_link_to = "data-s-l-to", e.attr.s_link_from = "data-s-l-from", e.attr.control_add = "data-ctrl-add", e.attr.control_expcoll_id = "data-ctrl-ec-id", e.attr.control_up_id = "data-ctrl-up-id", e.attr.control_export_menu = "data-ctrl-menu", e.attr.control_node_menu_id = "data-ctrl-n-menu-id", e.attr.control_node_circle_menu_id = "data-ctrl-n-c-menu-id", e.attr.control_node_circle_menu_name = "data-ctrl-n-c-menu-name", e.attr.control_node_circle_menu_wrraper_id = "data-ctrl-n-c-menu-wrapper-id", e.attr.width = "data-width", e.attr.text_overflow = "data-text-overflow", e.ID = "id", e.PID = "pid", e.STPID = "stpid", e.TAGS = "tags", e.NODES = "nodes", e.ELASTIC = "elastic", e.ASSISTANT = "Assistant", e.action = {}, e.action.expand = 0, e.action.collapse = 1, e.action.maximize = 101, e.action.minimize = 102, e.action.expandCollapse = 501, e.action.edit = 1, e.action.zoom = 2, e.action.ctrlZoom = 22, e.action.scroll = 41, e.action.xScroll = 3, e.action.yScroll = 4, e.action.none = 5, e.action.init = 6, e.action.update = 7, e.action.move = 70, e.action.pan = 8, e.action.centerNode = 9, e.action.resize = 10, e.action.insert = 11, e.action.insertfirst = 12, e.action.details = 13, e.action.exporting = 14, e.none = 400001, e.scroll = {}, e.scroll.visible = !0, e.scroll.smooth = 12, e.scroll.speed = 120, e.scroll.safari = {
smooth: 12,
speed: 250
}, e.match = {}, e.match.height = 100001, e.match.width = 100002, e.match.boundary = 100003, e.match.boundaryIfOutside = 100004, e.match.none = 1, e.movable = {}, e.movable.node = "node", e.movable.tree = "tree", e.movable.detachTree = "detachTree", e.layout = {}, e.layout.normal = e.normal = 0, e.layout.mixed = e.mixed = 1, e.layout.tree = e.tree = 2, e.layout.treeLeftOffset = e.treeLeftOffset = 3, e.layout.treeRightOffset = e.treeRightOffset = 4, e.layout.treeLeft = 5, e.layout.treeRight = 6, e.layout.grid = -1, e.layout.treeList = -2, e.nodeOpenTag = "<g " + e.attr.node_id + "=\"{id}\" style=\"opacity: {opacity}\" transform=\"matrix(1,0,0,1,{x},{y})\" class=\"{class}\" " + e.attr.sl + "=\"{sl}\" " + e.attr.l + "=\"{level}\" {lcn}>", e.linkOpenTag = "<g " + e.attr.link_id + "=\"[{id}][{child-id}]\" class=\"{class}\">", e.expcollOpenTag = "<g " + e.attr.control_expcoll_id + "=\"{id}\" transform=\"matrix(1,0,0,1,{x},{y})\" style=\"cursor:pointer;\">", e.upOpenTag = "<g " + e.attr.control_up_id + "=\"{id}\" transform=\"matrix(1,0,0,1,{x},{y})\" style=\"cursor:pointer;\">", e.linkFieldsOpenTag = "<g transform=\"matrix(1,0,0,1,{x},{y}) rotate({rotate})\">", e.grCloseTag = "</g>", e.A5 = {
width: 420,
height: 595
}, e.A4 = {
width: 595,
height: 842
}, e.A3 = {
width: 842,
height: 1191
}, e.A2 = {
width: 1191,
height: 1684
}, e.A1 = {
width: 1684,
height: 2384
}, e.Letter = {
width: 612,
height: 791
}, e.Legal = {
width: 612,
height: 1009
}, e.Legal = {
width: 612,
height: 1009
}, e.Widescreen = {
width: 720,
height: 1280
}, e.Standard = {
width: 720,
height: 960
}, e.COLLAPSE_PARENT_NEIGHBORS = 1, e.COLLAPSE_SUB_CHILDRENS = 2, e.COLLAPSE_PARENT_SUB_CHILDREN_EXCEPT_CLICKED = 3, e.TEXT_THRESHOLD = 4e3, e.IMAGES_THRESHOLD = 1e3, e.LINKS_THRESHOLD = 2e3, e.BUTTONS_THRESHOLD = 700, e.ANIM_THRESHOLD = 500, e.IT_IS_LONELY_HERE = "<g transform=\"translate(-100, 0)\" style=\"cursor:pointer;\" " + e.attr.control_add + "=\"control-add\"><text fill=\"#039be5\">{link}</text></g>", e.RES = {}, e.IT_IS_LONELY_HERE_LINK = e.RES.IT_IS_LONELY_HERE_LINK = "It's lonely here, add your first node", e.FIRE_DRAG_NOT_CLICK_IF_MOVE = 3, e.STRING_TAGS = !1, e.MAX_NODES_MESS = "The trial has expired or 200 nodes limit was reached! <br /><a style='color: #039BE5;' target='_blank' href='https://balkan.app/OrgChartJS/Docs/Evaluation'>See more</a>", e.OFFLINE_MESS = "The evaluation version requires internet connection! <br /><a style='color: #039BE5;' target='_blank' href='https://balkan.app/OrgChartJS/Docs/Evaluation'>See more</a>", e.SEARCH_PLACEHOLDER = "Search... type ? to get help.", e.SEARCH_HELP_SYMBOL = "?", e.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE = !1, e.SEARCH_RESULT_LIMIT = 10, e.IMPORT_MESSAGE = "Choose the columns (fields) in your data file that contain the required information.", e.FIXED_POSITION_ON_CLICK = !1, e.RENDER_LINKS_BEFORE_NODES = !1, e.RENDER_CLINKS_BEFORE_NODES = !1, e.MIXED_LAYOUT_ALL_NODES = !1, e.MIXED_LAYOUT_FOR_NODES_WITH_COLLAPSED_CHILDREN = !1, e.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN = 1, e.LINK_ROUNDED_CORNERS = 5, e.MOVE_STEP = 5, e.CLINK_CURVE = 1, e.MAX_DEPTH = 200, e.SCALE_FACTOR = 1.44, e.LAZY_LOADING_FACTOR = "auto", e.LAZY_LOADING = !0, e.ARRAY_FIELDS = ["tags"], e.CSV_DELIMITER = ",", e.EDITFORM_CLOSE_BTN = "<svg data-edit-from-close class=\"boc-edit-form-close\"><path style=\"fill:#ffffff;\" d=\"M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z\"></path></svg>", e.ESCAPE_HTML = !1, e.VERTICAL_CHILDREN_ASSISTANT = !1, e.EXPORT_PAGES_CUT_NODES = !1, e.RESET_MOVABLE_ONEXPANDCOLLAPSE = !1, e.FILTER_ALPHABETICALLY = !0, e.SERVER_PREFIX = ".azurewebsites.net/api/you-see-this-request-because-it-is-trial-version-of-orgchartjs", e.FUNC_URL_NAME = "func-url-orgchartjs", e.MINIMUM_SYMBOLS_IN_SEARCH_INPUT = 1, e.AI_SYSTEM_MESSAGES = [], e.ORGSCRIBE_OFFSET = " ", e.TREELIST_WHEEL_STEP = "auto", e.TREELIST_SCROLLBAR_WIDTH = 10, e.CONVERT_IMAGES_TO_BASE64_BEFORE_EXPORT = !1, e.REQUEST_CUSTOM_HEADERS = {}, e.SLINK_GAP = 7, e._intersects = function(t, n, r) {
var i = t.x - r.siblingSeparation / 4, a = t.y, o = t.x + t.w + r.siblingSeparation / 4, s = t.y;
switch (r.orientation) {
case e.orientation.right:
case e.orientation.right_top:
case e.orientation.left:
case e.orientation.left_top:
i = t.x, a = t.y - r.siblingSeparation / 4, o = t.x, s = t.y + t.h + r.siblingSeparation / 4;
break;
}
var c = n.p, l = n.q, u = n.r, d = n.s, f = (o - i) * (d - l) - (u - c) * (s - a), p, m;
return f === 0 ? !1 : (m = ((d - l) * (u - i) + (c - u) * (d - a)) / f, p = ((a - s) * (u - i) + (o - i) * (d - a)) / f, 0 < m && m < 1 && 0 < p && p < 1);
}, e._addPoint = function(t, n, r, i, a) {
switch (r.orientation) {
case e.orientation.top:
case e.orientation.top_left: return e._addPointTop(t, n, r, i, a);
case e.orientation.bottom:
case e.orientation.bottom_left: return e._addPointBottom(t, n, r, i, a);
case e.orientation.left:
case e.orientation.left_top: return e._addPointLeft(t, n, r, i, a);
case e.orientation.right:
case e.orientation.right_top: return e._addPointRight(t, n, r, i, a);
}
}, e._addPointTop = function(e, t, n, r, i) {
var a, o, s;
return i == "left" ? a = e.leftNeighbor ? e.x + (e.leftNeighbor.x + e.leftNeighbor.w - e.x) / 2 : e.x - n.siblingSeparation / 2 : i == "right" && (a = e.rightNeighbor ? e.x + e.w + (e.rightNeighbor.x - (e.x + e.w)) / 2 : e.x + e.w + n.siblingSeparation / 2), t.push([a, t[t.length - 1][1]]), t.push([a, e.y - n.levelSeparation / 3]), o = t[t.length - 1][1], s = a, r.p = a, r.q = o, r.r = s, r;
}, e._addPointBottom = function(e, t, n, r, i) {
var a, o, s;
return i == "left" ? a = e.leftNeighbor ? e.x + (e.leftNeighbor.x + e.leftNeighbor.w - e.x) / 2 : e.x - n.siblingSeparation / 2 : i == "right" && (a = e.rightNeighbor ? e.x + e.w + (e.rightNeighbor.x - (e.x + e.w)) / 2 : e.x + e.w + n.siblingSeparation / 2), t.push([a, t[t.length - 1][1]]), t.push([a, e.y + e.h + n.levelSeparation / 3]), o = t[t.length - 1][1], s = a, r.p = a, r.q = o, r.r = s, r;
}, e._addPointLeft = function(e, t, n, r, i) {
var a = t[t.length - 1][0], o;
i == "bottom" ? o = e.rightNeighbor ? e.y + e.h + (e.rightNeighbor.y - (e.y + e.h)) / 2 : e.y + e.h + n.siblingSeparation / 2 : i == "top" && (o = e.leftNeighbor ? e.y + (e.leftNeighbor.y + e.leftNeighbor.h - e.y) / 2 : e.y - n.siblingSeparation / 2), t.push([t[t.length - 1][0], o]), t.push([e.x - n.levelSeparation / 3, o]), a = t[t.length - 1][0];
var s = o;
return r.p = a, r.q = o, r.s = s, r;
}, e._addPointRight = function(e, t, n, r, i) {
var a = t[t.length - 1][0], o;
i == "bottom" ? o = e.rightNeighbor ? e.y + e.h + (e.rightNeighbor.y - (e.y + e.h)) / 2 : e.y + e.h + n.siblingSeparation / 2 : i == "top" && (o = e.leftNeighbor ? e.y + (e.leftNeighbor.y + e.leftNeighbor.h - e.y) / 2 : e.y - n.siblingSeparation / 2), t.push([t[t.length - 1][0], o]), t.push([e.x + e.w + n.levelSeparation / 3, o]), a = t[t.length - 1][0];
var s = o;
return r.p = a, r.q = o, r.s = s, r;
}, e._addConnectorLines = function(t, n) {
e._addConnectorLine(t, {
x1: n.xa,
y1: n.ya,
x2: n.xb,
y2: n.yb
}), e._addConnectorLine(t, {
x1: n.xb,
y1: n.yb,
x2: n.xc,
y2: n.yc
}), e._addConnectorLine(t, {
x1: n.xc,
y1: n.yc,
x2: n.xd,
y2: n.yd
});
}, e._addConnectorLine = function(e, t) {
if (t.x1 == t.x2) {
if (e.x[t.x1] || (e.x[t.x1] = []), t.y1 > t.y2) {
var n = t.y1;
t.y1 = t.y2, t.y2 = n;
}
e.x[t.x1].push({
y1: t.y1,
y2: t.y2
});
}
if (t.y1 == t.y2) {
if (e.y[t.y1] || (e.y[t.y1] = []), t.x1 > t.x2) {
var r = t.x1;
t.x1 = t.x2, t.x2 = r;
}
e.y[t.y1].push({
x1: t.x1,
x2: t.x2
});
}
}, e._addLineToPath = function(t, n, r) {
return e._avoidOverlapping(n, r), t.push([r.x1, r.y1]), t.push([r.x2, r.y2]), e._addConnectorLine(n, r), r;
}, e._slinkRemoveUnusedPoints = function(e) {
for (var t = e.length - 2; t >= 1; t--) {
var n = e[t - 1], r = e[t], i = e[t + 1];
(r[0] == n[0] && r[0] == i[0] || r[1] == n[1] && r[1] == i[1]) && e.splice(t, 1);
}
}, e._slinkAvoidOverlaping = function(t, n, r, i) {
for (var a = 1; a < n.length; a++) {
var o = n[a - 1], s = n[a];
if (o[0] == s[0]) {
for (var c = t.x[s[0]]; c;) {
var l = !0;
for (var u of c) if (u.y1 <= o[1] && u.y2 >= o[1] || u.y1 <= s[1] && u.y2 >= s[1]) {
i == e.orientation.top || i == e.orientation.top_left ? r == "left" ? s[0] -= e.SLINK_GAP : r == "right" && (s[0] += e.SLINK_GAP) : (i == e.orientation.bottom || i == e.orientation.bottom_left) && (r == "right" ? s[0] += e.SLINK_GAP : r == "left" && (s[0] -= e.SLINK_GAP)), l = !1;
break;
}
if (l) break;
c = t.x[s[0]];
}
o[0] = s[0];
}
var d = !0;
if (o[1] == s[1] && o[0] >= s[0] && (d = !1), d && o[1] == s[1]) {
for (var c = t.y[s[1]]; c;) {
var l = !0;
for (var u of c) if (u.x1 <= o[0] && u.x2 >= o[0] || u.x1 <= s[0] && u.x2 >= s[0]) {
o[0] >= s[0] || (i == e.orientation.top || i == e.orientation.top_left ? s[1] -= e.SLINK_GAP : (i == e.orientation.bottom || i == e.orientation.bottom_left) && (s[1] += e.SLINK_GAP), l = !1);
break;
}
if (l) break;
c = t.y[s[1]];
}
o[1] = s[1];
}
d && e._addConnectorLine(t, {
x1: o[0],
y1: o[1],
x2: s[0],
y2: s[1]
});
}
}, e._slinkAvoidOverlapingSecond = function(t, n, r) {
for (var i = 1; i < n.length; i++) {
var a = n[i - 1], o = n[i], s = !1;
if (a[1] == o[1]) {
for (var c = t.y[o[1]]; c;) {
var l = !0;
for (var u of c) if (u.x1 <= a[0] && u.x2 >= a[0] || u.x1 <= o[0] && u.x2 >= o[0]) {
a[0] >= o[0] ? (r == e.orientation.top || r == e.orientation.top_left ? o[1] -= e.SLINK_GAP : (r == e.orientation.bottom || r == e.orientation.bottom_left) && (o[1] += e.SLINK_GAP), l = !1) : s = !0;
break;
}
if (l) break;
c = t.y[o[1]];
}
a[1] = o[1];
}
s || e._addConnectorLine(t, {
x1: a[0],
y1: a[1],
x2: o[0],
y2: o[1]
});
}
}, e._slinkAvoidOverlaping2 = function(t, n, r, i) {
for (var a = 1; a < n.length; a++) {
var o = n[a - 1], s = n[a];
if (o[1] == s[1]) {
for (var c = t.y[s[1]]; c;) {
var l = !0;
for (var u of c) if (u.x1 <= o[0] && u.x2 >= o[0] || u.x1 <= s[0] && u.x2 >= s[0]) {
i == e.orientation.left || i == e.orientation.left_top ? r == "top" ? s[1] -= e.SLINK_GAP : r == "bottom" && (s[1] += e.SLINK_GAP) : (i == e.orientation.right || i == e.orientation.right_top) && (r == "bottom" ? s[1] += e.SLINK_GAP : r == "top" && (s[1] -= e.SLINK_GAP)), l = !1;
break;
}
if (l) break;
c = t.y[s[1]];
}
o[1] = s[1];
}
var d = !0;
if (o[0] == s[0] && o[1] >= s[1] && (d = !1), d && o[0] == s[0]) {
for (var c = t.x[s[0]]; c;) {
var l = !0;
for (var u of c) if (u.y1 <= o[1] && u.y2 >= o[1] || u.y1 <= s[1] && u.y2 >= s[1]) {
o[1] >= s[1] || (i == e.orientation.left || i == e.orientation.left_top ? s[0] -= e.SLINK_GAP : (i == e.orientation.right || i == e.orientation.right_top) && (s[0] += e.SLINK_GAP), l = !1);
break;
}
if (l) break;
c = t.x[s[0]];
}
o[0] = s[0];
}
d && e._addConnectorLine(t, {
x1: o[0],
y1: o[1],
x2: s[0],
y2: s[1]
});
}
}, e._slinkAvoidOverlapingSecond2 = function(t, n, r) {
for (var i = 1; i < n.length; i++) {
var a = n[i - 1], o = n[i], s = !1;
if (a[0] == o[0]) {
for (var c = t.x[o[0]]; c;) {
var l = !0;
for (var u of c) if (u.y1 <= a[1] && u.y2 >= a[1] || u.y1 <= o[1] && u.y2 >= o[1]) {
a[1] >= o[1] ? (r == e.orientation.left || r == e.orientation.left_top ? o[0] -= e.SLINK_GAP : (r == e.orientation.right || r == e.orientation.right_top) && (o[0] += e.SLINK_GAP), l = !1) : s = !0;
break;
}
if (l) break;
c = t.x[o[0]];
}
a[0] = o[0];
}
s || e._addConnectorLine(t, {
x1: a[0],
y1: a[1],
x2: o[0],
y2: o[1]
});
}
}, e.prototype.getSvg = function() {
return this.element.querySelector("svg");
}, e.prototype.getPointerElement = function() {
return this.element.querySelector("g[data-pointer]");
}, e.prototype.getNodeElement = function(t) {
return this.element.querySelector("[" + e.attr.node_id + "='" + t + "']");
}, e.prototype.getMenuButton = function() {
return this.element.querySelector("[" + e.attr.control_export_menu + "]");
}, e.notifierUI = function() {}, e.notifierUI.prototype.init = function(e) {
this.obj = e;
}, e.notifierUI.prototype.show = function(t, n) {
if (t == null) return !1;
t == 1 && (t = e.MAX_NODES_MESS, n = "#FFCA28"), t == 2 && (t = e.OFFLINE_MESS, n = "#FFCA28");
var r = document.createElement("div");
r.innerHTML = t, Object.assign(r.style, {
position: "absolute",
"background-color": n,
color: "#ffffff",
padding: "15px",
"border-radius": "40px",
opacity: 0,
overflow: "hidden",
"white-space": "nowrap",
"text-align": "center"
}), this.obj.element.appendChild(r);
var i = this.obj.width() / 2 - r.offsetWidth / 2, a = this.obj.height() / 2 - r.offsetHeight / 2;
r.style.left = i + "px", r.style.top = a + "px";
var o = r.offsetWidth;
return r.style.width = "20px", e.animate(r, {
opacity: 0,
width: 10
}, {
opacity: 1,
width: o
}, this.obj.config.anim.duration, this.obj.config.anim.func), !0;
}, e === void 0 && (e = {}), e.icon = {}, e.icon.png_export = e.icon.png_preview = e.icon.pngpreview = e.icon.png = function(e, t, n, r, i) {
return r ??= 0, i ??= 0, `<svg width="${e}" height="${t}" viewBox="0 0 550.801 550.801" x="${r}" y="${i}">
<path fill="${n}" d="M146.747,276.708c0-13.998-9.711-22.352-26.887-22.352c-6.99,0-11.726,0.675-14.204,1.355v44.927 c2.932,0.676,6.539,0.896,11.52,0.896C135.449,301.546,146.747,292.28,146.747,276.708z"/>
<path fill="${n}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M234.344,335.86v45.831h-31.601V229.524h40.184 l31.611,55.759c9.025,16.031,18.064,34.983,24.825,52.154h0.675c-2.257-20.103-2.933-40.643-2.933-63.44v-44.473h31.614v152.167 h-36.117l-32.516-58.703c-9.049-16.253-18.971-35.892-26.438-53.727l-0.665,0.222C233.906,289.58,234.344,311.027,234.344,335.86z M71.556,381.691V231.56c10.613-1.804,25.516-3.159,46.506-3.159c21.215,0,36.353,4.061,46.509,12.192 c9.698,7.673,16.255,20.313,16.255,35.219c0,14.897-4.959,27.549-13.999,36.123c-11.738,11.063-29.123,16.031-49.441,16.031 c-4.522,0-8.593-0.231-11.736-0.675v54.411H71.556V381.691z M453.601,523.353H97.2V419.302h356.4V523.353z M485.652,374.688 c-10.61,3.607-30.713,8.585-50.805,8.585c-27.759,0-47.872-7.003-61.857-20.545c-13.995-13.1-21.684-32.97-21.452-55.318 c0.222-50.569,37.03-79.463,86.917-79.463c19.644,0,34.783,3.829,42.219,7.446l-7.214,27.543c-8.369-3.617-18.752-6.55-35.458-6.55 c-28.656,0-50.341,16.256-50.341,49.22c0,31.382,19.649,49.892,47.872,49.892c7.895,0,14.218-0.901,16.934-2.257v-31.835h-23.493 v-26.869h56.679V374.688z"/>
</svg>`;
}, e.icon.pdf_export = e.icon.pdf_preview = e.icon.pdfpreview = e.icon.pdf = function(e, t, n, r, i) {
return r ??= 0, i ??= 0, `<svg width="${e}" height="${t}" viewBox="0 0 550.801 550.801" x="${r}" y="${i}">
<path fill="${n}" d="M160.381,282.225c0-14.832-10.299-23.684-28.474-23.684c-7.414,0-12.437,0.715-15.071,1.432V307.6 c3.114,0.707,6.942,0.949,12.192,0.949C148.419,308.549,160.381,298.74,160.381,282.225z"/>
<path fill="${n}" d="M272.875,259.019c-8.145,0-13.397,0.717-16.519,1.435v105.523c3.116,0.729,8.142,0.729,12.69,0.729 c33.017,0.231,54.554-17.946,54.554-56.474C323.842,276.719,304.215,259.019,272.875,259.019z"/>
<path fill="${n}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M362.359,309.023c0,30.876-11.243,52.165-26.82,65.333 c-16.971,14.117-42.82,20.814-74.396,20.814c-18.9,0-32.297-1.197-41.401-2.389V234.365c13.399-2.149,30.878-3.346,49.304-3.346 c30.612,0,50.478,5.508,66.039,17.226C351.828,260.69,362.359,280.547,362.359,309.023z M80.7,393.499V234.365 c11.241-1.904,27.042-3.346,49.296-3.346c22.491,0,38.527,4.308,49.291,12.928c10.292,8.131,17.215,21.534,17.215,37.328 c0,15.799-5.25,29.198-14.829,38.285c-12.442,11.728-30.865,16.996-52.407,16.996c-4.778,0-9.1-0.243-12.435-0.723v57.67H80.7 V393.499z M453.601,523.353H97.2V419.302h356.4V523.353z M484.898,262.127h-61.989v36.851h57.913v29.674h-57.913v64.848h-36.593 V232.216h98.582V262.127z"/>
</svg>`;
}, e.icon.svg_export = e.icon.svg_preview = e.icon.svg = function(e, t, n, r, i) {
return r ??= 0, i ??= 0, `<svg width="${e}" height="${t}" viewBox="0 0 550.801 550.801" x="${r}" y="${i}">
<path fill="${n}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M338.871,225.672L284.545,386.96h-42.591 l-51.69-161.288h39.967l19.617,68.196c5.508,19.143,10.531,37.567,14.36,57.67h0.717c4.061-19.385,9.089-38.527,14.592-56.953 l20.585-68.918h38.77V225.672z M68.458,379.54l7.415-30.153c9.811,5.021,24.888,10.051,40.439,10.051 c16.751,0,25.607-6.935,25.607-17.465c0-10.052-7.662-15.795-27.05-22.734c-26.8-9.328-44.263-24.168-44.263-47.611 c0-27.524,22.971-48.579,61.014-48.579c18.188,0,31.591,3.823,41.159,8.131l-8.126,29.437c-6.465-3.116-17.945-7.657-33.745-7.657 c-15.791,0-23.454,7.183-23.454,15.552c0,10.296,9.089,14.842,29.917,22.731c28.468,10.536,41.871,25.365,41.871,48.094 c0,27.042-20.812,50.013-65.09,50.013C95.731,389.349,77.538,384.571,68.458,379.54z M453.601,523.353H97.2V419.302h356.4V523.353z M488.911,379.54c-11.243,3.823-32.537,9.103-53.831,9.103c-29.437,0-50.73-7.426-65.57-21.779 c-14.839-13.875-22.971-34.942-22.738-58.625c0.253-53.604,39.255-84.235,92.137-84.235c20.81,0,36.852,4.073,44.74,7.896 l-7.657,29.202c-8.859-3.829-19.849-6.95-37.567-6.95c-30.396,0-53.357,17.233-53.357,52.173c0,33.265,20.81,52.882,50.73,52.882 c8.375,0,15.072-0.96,17.94-2.395v-33.745h-24.875v-28.471h60.049V379.54L488.911,379.54z" />
</svg>`;
}, e.icon.csv_export = e.icon.csv = function(e, t, n, r, i) {
return r ??= 0, i ??= 0, `<svg width="${e}" height="${t}" viewBox="0 0 548.29 548.291" x="${r}" y="${i}">'
<path fill="${n}" d="M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 c-0.031-0.034-0.064-0.044-0.085-0.075c-0.629-0.707-1.364-1.292-2.141-1.796c-0.231-0.157-0.462-0.286-0.704-0.419 c-0.672-0.365-1.386-0.672-2.121-0.893c-0.199-0.052-0.377-0.134-0.576-0.188C358.229,0.118,357.4,0,356.562,0H96.757 C84.893,0,75.256,9.649,75.256,21.502v174.613H62.093c-16.972,0-30.733,13.756-30.733,30.73v159.81 c0,16.966,13.761,30.736,30.733,30.736h13.163V526.79c0,11.854,9.637,21.501,21.501,21.501h354.777 c11.853,0,21.502-9.647,21.502-21.501V417.392H486.2c16.966,0,30.729-13.764,30.729-30.731v-159.81 C516.93,209.872,503.166,196.121,486.2,196.121z M96.757,21.502h249.053v110.006c0,5.94,4.818,10.751,10.751,10.751h94.973v53.861 H96.757V21.502z M258.618,313.18c-26.68-9.291-44.063-24.053-44.063-47.389c0-27.404,22.861-48.368,60.733-48.368 c18.107,0,31.447,3.811,40.968,8.107l-8.09,29.3c-6.43-3.107-17.862-7.632-33.59-7.632c-15.717,0-23.339,7.149-23.339,15.485 c0,10.247,9.047,14.769,29.78,22.632c28.341,10.479,41.681,25.239,41.681,47.874c0,26.909-20.721,49.786-64.792,49.786 c-18.338,0-36.449-4.776-45.497-9.77l7.38-30.016c9.772,5.014,24.775,10.006,40.264,10.006c16.671,0,25.488-6.908,25.488-17.396 C285.536,325.789,277.909,320.078,258.618,313.18z M69.474,302.692c0-54.781,39.074-85.269,87.654-85.269 c18.822,0,33.113,3.811,39.549,7.149l-7.392,28.816c-7.38-3.084-17.632-5.939-30.491-5.939c-28.822,0-51.206,17.375-51.206,53.099 c0,32.158,19.051,52.4,51.456,52.4c10.947,0,23.097-2.378,30.241-5.238l5.483,28.346c-6.672,3.34-21.674,6.919-41.208,6.919 C98.06,382.976,69.474,348.424,69.474,302.692z M451.534,520.962H96.757v-103.57h354.777V520.962z M427.518,380.583h-42.399 l-51.45-160.536h39.787l19.526,67.894c5.479,19.046,10.479,37.386,14.299,57.397h0.709c4.048-19.298,9.045-38.352,14.526-56.693 l20.487-68.598h38.599L427.518,380.583z" />'
</svg>`;
}, e.icon.json_export = e.icon.json = function(e, t, n, r, i) {
return r ??= 0, i ??= 0, `<svg width="${e}" height="${t}" viewBox="0 0 32 32" x="${r}" y="${i}">
<polygon fill="${n}" points="31 11 31 21 29 21 27 15 27 21 25 21 25 11 27 11 29 17 29 11 31 11"/>
<path fill="${n}" d="M21.3335,21h-2.667A1.6684,1.6684,0,0,1,17,19.3335v-6.667A1.6684,1.6684,0,0,1,18.6665,11h2.667A1.6684,1.6684,0,0,1,23,12.6665v6.667A1.6684,1.6684,0,0,1,21.3335,21ZM19,19h2V13H19Z"/>
<path fill="${n}" d="M13.3335,21H9V19h4V17H11a2.002,2.002,0,0,1-2-2V12.6665A1.6684,1.6684,0,0,1,10.6665,11H15v2H11v2h2a2.002,2.002,0,0,1,2,2v2.3335A1.6684,1.6684,0,0,1,13.3335,21Z"/>
<path fill="${n}" d="M5.3335,21H2.6665A1.6684,1.6684,0,0,1,1,19.3335V17H3v2H5V11H7v8.3335A1.6684,1.6684,0,0,1,5.3335,21Z"/>