camunda-bpmn-js 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/properties-panel.css +2 -2
- package/dist/base-modeler.development.js +39786 -17454
- package/dist/base-modeler.production.min.js +5 -5
- package/dist/base-navigated-viewer.development.js +1424 -857
- package/dist/base-navigated-viewer.production.min.js +2 -2
- package/dist/base-viewer.development.js +1416 -849
- package/dist/base-viewer.production.min.js +2 -2
- package/dist/camunda-cloud-modeler.development.js +38187 -17621
- package/dist/camunda-cloud-modeler.production.min.js +5 -5
- package/dist/camunda-cloud-navigated-viewer.development.js +1417 -850
- package/dist/camunda-cloud-navigated-viewer.production.min.js +3 -2
- package/dist/camunda-cloud-viewer.development.js +1411 -844
- package/dist/camunda-cloud-viewer.production.min.js +3 -2
- package/dist/camunda-platform-modeler.development.js +45525 -23624
- package/dist/camunda-platform-modeler.production.min.js +5 -5
- package/dist/camunda-platform-navigated-viewer.development.js +1469 -902
- package/dist/camunda-platform-navigated-viewer.production.min.js +3 -2
- package/dist/camunda-platform-viewer.development.js +1460 -893
- package/dist/camunda-platform-viewer.production.min.js +3 -2
- package/lib/camunda-cloud/features/popup-menu/ReplaceOptions.js +1 -0
- package/package.json +12 -12
- package/util/index.js +2 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BpmnViewer = factory());
|
|
5
|
-
}(this, (function () { 'use strict';
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}
|
|
8
8
|
|
|
@@ -14,29 +14,29 @@
|
|
|
14
14
|
* @return {Array<?>}
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
var nativeToString = Object.prototype.toString;
|
|
18
|
-
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
19
|
-
function isUndefined(obj) {
|
|
17
|
+
var nativeToString$2 = Object.prototype.toString;
|
|
18
|
+
var nativeHasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
19
|
+
function isUndefined$3(obj) {
|
|
20
20
|
return obj === undefined;
|
|
21
21
|
}
|
|
22
22
|
function isDefined(obj) {
|
|
23
23
|
return obj !== undefined;
|
|
24
24
|
}
|
|
25
|
-
function isArray(obj) {
|
|
26
|
-
return nativeToString.call(obj) === '[object Array]';
|
|
25
|
+
function isArray$3(obj) {
|
|
26
|
+
return nativeToString$2.call(obj) === '[object Array]';
|
|
27
27
|
}
|
|
28
28
|
function isObject(obj) {
|
|
29
|
-
return nativeToString.call(obj) === '[object Object]';
|
|
29
|
+
return nativeToString$2.call(obj) === '[object Object]';
|
|
30
30
|
}
|
|
31
31
|
function isNumber(obj) {
|
|
32
|
-
return nativeToString.call(obj) === '[object Number]';
|
|
32
|
+
return nativeToString$2.call(obj) === '[object Number]';
|
|
33
33
|
}
|
|
34
34
|
function isFunction(obj) {
|
|
35
|
-
var tag = nativeToString.call(obj);
|
|
35
|
+
var tag = nativeToString$2.call(obj);
|
|
36
36
|
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
|
|
37
37
|
}
|
|
38
38
|
function isString(obj) {
|
|
39
|
-
return nativeToString.call(obj) === '[object String]';
|
|
39
|
+
return nativeToString$2.call(obj) === '[object String]';
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Return true, if target owns a property with the given key.
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
* @return {Boolean}
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
|
-
function has(target, key) {
|
|
51
|
-
return nativeHasOwnProperty.call(target, key);
|
|
50
|
+
function has$2(target, key) {
|
|
51
|
+
return nativeHasOwnProperty$2.call(target, key);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
function find(collection, matcher) {
|
|
64
64
|
matcher = toMatcher(matcher);
|
|
65
65
|
var match;
|
|
66
|
-
forEach(collection, function (val, key) {
|
|
66
|
+
forEach$2(collection, function (val, key) {
|
|
67
67
|
if (matcher(val, key)) {
|
|
68
68
|
match = val;
|
|
69
69
|
return false;
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
|
|
83
83
|
function findIndex(collection, matcher) {
|
|
84
84
|
matcher = toMatcher(matcher);
|
|
85
|
-
var idx = isArray(collection) ? -1 : undefined;
|
|
86
|
-
forEach(collection, function (val, key) {
|
|
85
|
+
var idx = isArray$3(collection) ? -1 : undefined;
|
|
86
|
+
forEach$2(collection, function (val, key) {
|
|
87
87
|
if (matcher(val, key)) {
|
|
88
88
|
idx = key;
|
|
89
89
|
return false;
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
|
|
103
103
|
function filter(collection, matcher) {
|
|
104
104
|
var result = [];
|
|
105
|
-
forEach(collection, function (val, key) {
|
|
105
|
+
forEach$2(collection, function (val, key) {
|
|
106
106
|
if (matcher(val, key)) {
|
|
107
107
|
result.push(val);
|
|
108
108
|
}
|
|
@@ -119,17 +119,17 @@
|
|
|
119
119
|
* @return {Object} return result that stopped the iteration
|
|
120
120
|
*/
|
|
121
121
|
|
|
122
|
-
function forEach(collection, iterator) {
|
|
122
|
+
function forEach$2(collection, iterator) {
|
|
123
123
|
var val, result;
|
|
124
124
|
|
|
125
|
-
if (isUndefined(collection)) {
|
|
125
|
+
if (isUndefined$3(collection)) {
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
var convertKey = isArray(collection) ? toNum : identity;
|
|
129
|
+
var convertKey = isArray$3(collection) ? toNum$2 : identity$2;
|
|
130
130
|
|
|
131
131
|
for (var key in collection) {
|
|
132
|
-
if (has(collection, key)) {
|
|
132
|
+
if (has$2(collection, key)) {
|
|
133
133
|
val = collection[key];
|
|
134
134
|
result = iterator(val, convertKey(key));
|
|
135
135
|
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
*/
|
|
151
151
|
|
|
152
152
|
function reduce(collection, iterator, result) {
|
|
153
|
-
forEach(collection, function (value, idx) {
|
|
153
|
+
forEach$2(collection, function (value, idx) {
|
|
154
154
|
result = iterator(result, value, idx);
|
|
155
155
|
});
|
|
156
156
|
return result;
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
|
|
196
196
|
function map(collection, fn) {
|
|
197
197
|
var result = [];
|
|
198
|
-
forEach(collection, function (val, key) {
|
|
198
|
+
forEach$2(collection, function (val, key) {
|
|
199
199
|
result.push(fn(val, key));
|
|
200
200
|
});
|
|
201
201
|
return result;
|
|
@@ -228,11 +228,11 @@
|
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
function identity(arg) {
|
|
231
|
+
function identity$2(arg) {
|
|
232
232
|
return arg;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
function toNum(arg) {
|
|
235
|
+
function toNum$2(arg) {
|
|
236
236
|
return Number(arg);
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
function pick(target, properties) {
|
|
365
365
|
var result = {};
|
|
366
366
|
var obj = Object(target);
|
|
367
|
-
forEach(properties, function (prop) {
|
|
367
|
+
forEach$2(properties, function (prop) {
|
|
368
368
|
if (prop in obj) {
|
|
369
369
|
result[prop] = target[prop];
|
|
370
370
|
}
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
function omit(target, properties) {
|
|
384
384
|
var result = {};
|
|
385
385
|
var obj = Object(target);
|
|
386
|
-
forEach(obj, function (prop, key) {
|
|
386
|
+
forEach$2(obj, function (prop, key) {
|
|
387
387
|
if (properties.indexOf(key) === -1) {
|
|
388
388
|
result[key] = prop;
|
|
389
389
|
}
|
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
return result;
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
var DEFAULT_RENDER_PRIORITY = 1000;
|
|
394
|
+
var DEFAULT_RENDER_PRIORITY$1 = 1000;
|
|
395
395
|
|
|
396
396
|
/**
|
|
397
397
|
* The base implementation of shape and connection renderers.
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
function BaseRenderer(eventBus, renderPriority) {
|
|
403
403
|
var self = this;
|
|
404
404
|
|
|
405
|
-
renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY;
|
|
405
|
+
renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY$1;
|
|
406
406
|
|
|
407
407
|
eventBus.on([ 'render.shape', 'render.connection' ], renderPriority, function(evt, context) {
|
|
408
408
|
var type = evt.type,
|
|
@@ -486,7 +486,7 @@
|
|
|
486
486
|
*
|
|
487
487
|
* @return {boolean}
|
|
488
488
|
*/
|
|
489
|
-
function is(element, type) {
|
|
489
|
+
function is$1(element, type) {
|
|
490
490
|
var bo = getBusinessObject(element);
|
|
491
491
|
|
|
492
492
|
return bo && (typeof bo.$instanceOf === 'function') && bo.$instanceOf(type);
|
|
@@ -503,7 +503,7 @@
|
|
|
503
503
|
*/
|
|
504
504
|
function isAny(element, types) {
|
|
505
505
|
return some(types, function(t) {
|
|
506
|
-
return is(element, t);
|
|
506
|
+
return is$1(element, t);
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
509
|
|
|
@@ -531,21 +531,21 @@
|
|
|
531
531
|
|
|
532
532
|
function isExpanded(element, di) {
|
|
533
533
|
|
|
534
|
-
if (is(element, 'bpmn:CallActivity')) {
|
|
534
|
+
if (is$1(element, 'bpmn:CallActivity')) {
|
|
535
535
|
return false;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
-
if (is(element, 'bpmn:SubProcess')) {
|
|
538
|
+
if (is$1(element, 'bpmn:SubProcess')) {
|
|
539
539
|
di = di || getDi(element);
|
|
540
540
|
|
|
541
|
-
if (di && is(di, 'bpmndi:BPMNPlane')) {
|
|
541
|
+
if (di && is$1(di, 'bpmndi:BPMNPlane')) {
|
|
542
542
|
return true;
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
return di && !!di.isExpanded;
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
-
if (is(element, 'bpmn:Participant')) {
|
|
548
|
+
if (is$1(element, 'bpmn:Participant')) {
|
|
549
549
|
return !!getBusinessObject(element).processRef;
|
|
550
550
|
}
|
|
551
551
|
|
|
@@ -558,22 +558,22 @@
|
|
|
558
558
|
|
|
559
559
|
function getLabelAttr(semantic) {
|
|
560
560
|
if (
|
|
561
|
-
is(semantic, 'bpmn:FlowElement') ||
|
|
562
|
-
is(semantic, 'bpmn:Participant') ||
|
|
563
|
-
is(semantic, 'bpmn:Lane') ||
|
|
564
|
-
is(semantic, 'bpmn:SequenceFlow') ||
|
|
565
|
-
is(semantic, 'bpmn:MessageFlow') ||
|
|
566
|
-
is(semantic, 'bpmn:DataInput') ||
|
|
567
|
-
is(semantic, 'bpmn:DataOutput')
|
|
561
|
+
is$1(semantic, 'bpmn:FlowElement') ||
|
|
562
|
+
is$1(semantic, 'bpmn:Participant') ||
|
|
563
|
+
is$1(semantic, 'bpmn:Lane') ||
|
|
564
|
+
is$1(semantic, 'bpmn:SequenceFlow') ||
|
|
565
|
+
is$1(semantic, 'bpmn:MessageFlow') ||
|
|
566
|
+
is$1(semantic, 'bpmn:DataInput') ||
|
|
567
|
+
is$1(semantic, 'bpmn:DataOutput')
|
|
568
568
|
) {
|
|
569
569
|
return 'name';
|
|
570
570
|
}
|
|
571
571
|
|
|
572
|
-
if (is(semantic, 'bpmn:TextAnnotation')) {
|
|
572
|
+
if (is$1(semantic, 'bpmn:TextAnnotation')) {
|
|
573
573
|
return 'text';
|
|
574
574
|
}
|
|
575
575
|
|
|
576
|
-
if (is(semantic, 'bpmn:Group')) {
|
|
576
|
+
if (is$1(semantic, 'bpmn:Group')) {
|
|
577
577
|
return 'categoryValueRef';
|
|
578
578
|
}
|
|
579
579
|
}
|
|
@@ -604,7 +604,7 @@
|
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
|
|
607
|
-
function ensureImported(element, target) {
|
|
607
|
+
function ensureImported$1(element, target) {
|
|
608
608
|
|
|
609
609
|
if (element.ownerDocument !== target.ownerDocument) {
|
|
610
610
|
try {
|
|
@@ -630,8 +630,8 @@
|
|
|
630
630
|
*
|
|
631
631
|
* @return {SVGElement} the appended node
|
|
632
632
|
*/
|
|
633
|
-
function appendTo(element, target) {
|
|
634
|
-
return target.appendChild(ensureImported(element, target));
|
|
633
|
+
function appendTo$1(element, target) {
|
|
634
|
+
return target.appendChild(ensureImported$1(element, target));
|
|
635
635
|
}
|
|
636
636
|
|
|
637
637
|
/**
|
|
@@ -646,8 +646,8 @@
|
|
|
646
646
|
*
|
|
647
647
|
* @return {SVGElement} the element
|
|
648
648
|
*/
|
|
649
|
-
function append(target, node) {
|
|
650
|
-
appendTo(node, target);
|
|
649
|
+
function append$1(target, node) {
|
|
650
|
+
appendTo$1(node, target);
|
|
651
651
|
return target;
|
|
652
652
|
}
|
|
653
653
|
|
|
@@ -655,9 +655,9 @@
|
|
|
655
655
|
* attribute accessor utility
|
|
656
656
|
*/
|
|
657
657
|
|
|
658
|
-
var LENGTH_ATTR = 2;
|
|
658
|
+
var LENGTH_ATTR$1 = 2;
|
|
659
659
|
|
|
660
|
-
var CSS_PROPERTIES = {
|
|
660
|
+
var CSS_PROPERTIES$1 = {
|
|
661
661
|
'alignment-baseline': 1,
|
|
662
662
|
'baseline-shift': 1,
|
|
663
663
|
'clip': 1,
|
|
@@ -681,7 +681,7 @@
|
|
|
681
681
|
'flood-opacity': 1,
|
|
682
682
|
'font': 1,
|
|
683
683
|
'font-family': 1,
|
|
684
|
-
'font-size': LENGTH_ATTR,
|
|
684
|
+
'font-size': LENGTH_ATTR$1,
|
|
685
685
|
'font-size-adjust': 1,
|
|
686
686
|
'font-stretch': 1,
|
|
687
687
|
'font-style': 1,
|
|
@@ -711,7 +711,7 @@
|
|
|
711
711
|
'stroke-linejoin': 1,
|
|
712
712
|
'stroke-miterlimit': 1,
|
|
713
713
|
'stroke-opacity': 1,
|
|
714
|
-
'stroke-width': LENGTH_ATTR,
|
|
714
|
+
'stroke-width': LENGTH_ATTR$1,
|
|
715
715
|
'text-anchor': 1,
|
|
716
716
|
'text-decoration': 1,
|
|
717
717
|
'text-rendering': 1,
|
|
@@ -722,22 +722,22 @@
|
|
|
722
722
|
};
|
|
723
723
|
|
|
724
724
|
|
|
725
|
-
function getAttribute(node, name) {
|
|
726
|
-
if (CSS_PROPERTIES[name]) {
|
|
725
|
+
function getAttribute$1(node, name) {
|
|
726
|
+
if (CSS_PROPERTIES$1[name]) {
|
|
727
727
|
return node.style[name];
|
|
728
728
|
} else {
|
|
729
729
|
return node.getAttributeNS(null, name);
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
function setAttribute(node, name, value) {
|
|
733
|
+
function setAttribute$1(node, name, value) {
|
|
734
734
|
var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
735
735
|
|
|
736
|
-
var type = CSS_PROPERTIES[hyphenated];
|
|
736
|
+
var type = CSS_PROPERTIES$1[hyphenated];
|
|
737
737
|
|
|
738
738
|
if (type) {
|
|
739
739
|
// append pixel unit, unless present
|
|
740
|
-
if (type === LENGTH_ATTR && typeof value === 'number') {
|
|
740
|
+
if (type === LENGTH_ATTR$1 && typeof value === 'number') {
|
|
741
741
|
value = String(value) + 'px';
|
|
742
742
|
}
|
|
743
743
|
|
|
@@ -747,12 +747,12 @@
|
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
function setAttributes(node, attrs) {
|
|
750
|
+
function setAttributes$1(node, attrs) {
|
|
751
751
|
|
|
752
752
|
var names = Object.keys(attrs), i, name;
|
|
753
753
|
|
|
754
754
|
for (i = 0, name; (name = names[i]); i++) {
|
|
755
|
-
setAttribute(node, name, attrs[name]);
|
|
755
|
+
setAttribute$1(node, name, attrs[name]);
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
|
|
@@ -766,15 +766,15 @@
|
|
|
766
766
|
*
|
|
767
767
|
* @return {String}
|
|
768
768
|
*/
|
|
769
|
-
function attr(node, name, value) {
|
|
769
|
+
function attr$2(node, name, value) {
|
|
770
770
|
if (typeof name === 'string') {
|
|
771
771
|
if (value !== undefined) {
|
|
772
|
-
setAttribute(node, name, value);
|
|
772
|
+
setAttribute$1(node, name, value);
|
|
773
773
|
} else {
|
|
774
|
-
return getAttribute(node, name);
|
|
774
|
+
return getAttribute$1(node, name);
|
|
775
775
|
}
|
|
776
776
|
} else {
|
|
777
|
-
setAttributes(node, name);
|
|
777
|
+
setAttributes$1(node, name);
|
|
778
778
|
}
|
|
779
779
|
|
|
780
780
|
return node;
|
|
@@ -783,7 +783,7 @@
|
|
|
783
783
|
/**
|
|
784
784
|
* Clear utility
|
|
785
785
|
*/
|
|
786
|
-
function index(arr, obj) {
|
|
786
|
+
function index$1(arr, obj) {
|
|
787
787
|
if (arr.indexOf) {
|
|
788
788
|
return arr.indexOf(obj);
|
|
789
789
|
}
|
|
@@ -798,11 +798,11 @@
|
|
|
798
798
|
return -1;
|
|
799
799
|
}
|
|
800
800
|
|
|
801
|
-
var re = /\s+/;
|
|
801
|
+
var re$3 = /\s+/;
|
|
802
802
|
|
|
803
|
-
var toString = Object.prototype.toString;
|
|
803
|
+
var toString$3 = Object.prototype.toString;
|
|
804
804
|
|
|
805
|
-
function defined(o) {
|
|
805
|
+
function defined$1(o) {
|
|
806
806
|
return typeof o !== 'undefined';
|
|
807
807
|
}
|
|
808
808
|
|
|
@@ -814,11 +814,11 @@
|
|
|
814
814
|
* @api public
|
|
815
815
|
*/
|
|
816
816
|
|
|
817
|
-
function classes(el) {
|
|
818
|
-
return new ClassList(el);
|
|
817
|
+
function classes$3(el) {
|
|
818
|
+
return new ClassList$3(el);
|
|
819
819
|
}
|
|
820
820
|
|
|
821
|
-
function ClassList(el) {
|
|
821
|
+
function ClassList$3(el) {
|
|
822
822
|
if (!el || !el.nodeType) {
|
|
823
823
|
throw new Error('A DOM element reference is required');
|
|
824
824
|
}
|
|
@@ -834,7 +834,7 @@
|
|
|
834
834
|
* @api public
|
|
835
835
|
*/
|
|
836
836
|
|
|
837
|
-
ClassList.prototype.add = function(name) {
|
|
837
|
+
ClassList$3.prototype.add = function(name) {
|
|
838
838
|
|
|
839
839
|
// classList
|
|
840
840
|
if (this.list) {
|
|
@@ -844,12 +844,12 @@
|
|
|
844
844
|
|
|
845
845
|
// fallback
|
|
846
846
|
var arr = this.array();
|
|
847
|
-
var i = index(arr, name);
|
|
847
|
+
var i = index$1(arr, name);
|
|
848
848
|
if (!~i) {
|
|
849
849
|
arr.push(name);
|
|
850
850
|
}
|
|
851
851
|
|
|
852
|
-
if (defined(this.el.className.baseVal)) {
|
|
852
|
+
if (defined$1(this.el.className.baseVal)) {
|
|
853
853
|
this.el.className.baseVal = arr.join(' ');
|
|
854
854
|
} else {
|
|
855
855
|
this.el.className = arr.join(' ');
|
|
@@ -868,8 +868,8 @@
|
|
|
868
868
|
* @api public
|
|
869
869
|
*/
|
|
870
870
|
|
|
871
|
-
ClassList.prototype.remove = function(name) {
|
|
872
|
-
if ('[object RegExp]' === toString.call(name)) {
|
|
871
|
+
ClassList$3.prototype.remove = function(name) {
|
|
872
|
+
if ('[object RegExp]' === toString$3.call(name)) {
|
|
873
873
|
return this.removeMatching(name);
|
|
874
874
|
}
|
|
875
875
|
|
|
@@ -881,7 +881,7 @@
|
|
|
881
881
|
|
|
882
882
|
// fallback
|
|
883
883
|
var arr = this.array();
|
|
884
|
-
var i = index(arr, name);
|
|
884
|
+
var i = index$1(arr, name);
|
|
885
885
|
if (~i) {
|
|
886
886
|
arr.splice(i, 1);
|
|
887
887
|
}
|
|
@@ -897,7 +897,7 @@
|
|
|
897
897
|
* @api private
|
|
898
898
|
*/
|
|
899
899
|
|
|
900
|
-
ClassList.prototype.removeMatching = function(re) {
|
|
900
|
+
ClassList$3.prototype.removeMatching = function(re) {
|
|
901
901
|
var arr = this.array();
|
|
902
902
|
for (var i = 0; i < arr.length; i++) {
|
|
903
903
|
if (re.test(arr[i])) {
|
|
@@ -919,10 +919,10 @@
|
|
|
919
919
|
* @api public
|
|
920
920
|
*/
|
|
921
921
|
|
|
922
|
-
ClassList.prototype.toggle = function(name, force) {
|
|
922
|
+
ClassList$3.prototype.toggle = function(name, force) {
|
|
923
923
|
// classList
|
|
924
924
|
if (this.list) {
|
|
925
|
-
if (defined(force)) {
|
|
925
|
+
if (defined$1(force)) {
|
|
926
926
|
if (force !== this.list.toggle(name, force)) {
|
|
927
927
|
this.list.toggle(name); // toggle again to correct
|
|
928
928
|
}
|
|
@@ -933,7 +933,7 @@
|
|
|
933
933
|
}
|
|
934
934
|
|
|
935
935
|
// fallback
|
|
936
|
-
if (defined(force)) {
|
|
936
|
+
if (defined$1(force)) {
|
|
937
937
|
if (!force) {
|
|
938
938
|
this.remove(name);
|
|
939
939
|
} else {
|
|
@@ -957,10 +957,10 @@
|
|
|
957
957
|
* @api public
|
|
958
958
|
*/
|
|
959
959
|
|
|
960
|
-
ClassList.prototype.array = function() {
|
|
960
|
+
ClassList$3.prototype.array = function() {
|
|
961
961
|
var className = this.el.getAttribute('class') || '';
|
|
962
962
|
var str = className.replace(/^\s+|\s+$/g, '');
|
|
963
|
-
var arr = str.split(re);
|
|
963
|
+
var arr = str.split(re$3);
|
|
964
964
|
if ('' === arr[0]) {
|
|
965
965
|
arr.shift();
|
|
966
966
|
}
|
|
@@ -975,16 +975,16 @@
|
|
|
975
975
|
* @api public
|
|
976
976
|
*/
|
|
977
977
|
|
|
978
|
-
ClassList.prototype.has =
|
|
979
|
-
ClassList.prototype.contains = function(name) {
|
|
978
|
+
ClassList$3.prototype.has =
|
|
979
|
+
ClassList$3.prototype.contains = function(name) {
|
|
980
980
|
return (
|
|
981
981
|
this.list ?
|
|
982
982
|
this.list.contains(name) :
|
|
983
|
-
!! ~index(this.array(), name)
|
|
983
|
+
!! ~index$1(this.array(), name)
|
|
984
984
|
);
|
|
985
985
|
};
|
|
986
986
|
|
|
987
|
-
function remove(element) {
|
|
987
|
+
function remove$4(element) {
|
|
988
988
|
var parent = element.parentNode;
|
|
989
989
|
|
|
990
990
|
if (parent) {
|
|
@@ -1004,17 +1004,17 @@
|
|
|
1004
1004
|
* @param {DOMElement} element
|
|
1005
1005
|
* @return {DOMElement} the element (for chaining)
|
|
1006
1006
|
*/
|
|
1007
|
-
function clear(element) {
|
|
1007
|
+
function clear$2(element) {
|
|
1008
1008
|
var child;
|
|
1009
1009
|
|
|
1010
1010
|
while ((child = element.firstChild)) {
|
|
1011
|
-
remove(child);
|
|
1011
|
+
remove$4(child);
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
1014
|
return element;
|
|
1015
1015
|
}
|
|
1016
1016
|
|
|
1017
|
-
var ns = {
|
|
1017
|
+
var ns$1 = {
|
|
1018
1018
|
svg: 'http://www.w3.org/2000/svg'
|
|
1019
1019
|
};
|
|
1020
1020
|
|
|
@@ -1022,24 +1022,24 @@
|
|
|
1022
1022
|
* DOM parsing utility
|
|
1023
1023
|
*/
|
|
1024
1024
|
|
|
1025
|
-
var SVG_START = '<svg xmlns="' + ns.svg + '"';
|
|
1025
|
+
var SVG_START$1 = '<svg xmlns="' + ns$1.svg + '"';
|
|
1026
1026
|
|
|
1027
|
-
function parse(svg) {
|
|
1027
|
+
function parse$3(svg) {
|
|
1028
1028
|
|
|
1029
1029
|
var unwrap = false;
|
|
1030
1030
|
|
|
1031
1031
|
// ensure we import a valid svg document
|
|
1032
1032
|
if (svg.substring(0, 4) === '<svg') {
|
|
1033
|
-
if (svg.indexOf(ns.svg) === -1) {
|
|
1034
|
-
svg = SVG_START + svg.substring(4);
|
|
1033
|
+
if (svg.indexOf(ns$1.svg) === -1) {
|
|
1034
|
+
svg = SVG_START$1 + svg.substring(4);
|
|
1035
1035
|
}
|
|
1036
1036
|
} else {
|
|
1037
1037
|
// namespace svg
|
|
1038
|
-
svg = SVG_START + '>' + svg + '</svg>';
|
|
1038
|
+
svg = SVG_START$1 + '>' + svg + '</svg>';
|
|
1039
1039
|
unwrap = true;
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
|
-
var parsed = parseDocument(svg);
|
|
1042
|
+
var parsed = parseDocument$1(svg);
|
|
1043
1043
|
|
|
1044
1044
|
if (!unwrap) {
|
|
1045
1045
|
return parsed;
|
|
@@ -1056,7 +1056,7 @@
|
|
|
1056
1056
|
return fragment;
|
|
1057
1057
|
}
|
|
1058
1058
|
|
|
1059
|
-
function parseDocument(svg) {
|
|
1059
|
+
function parseDocument$1(svg) {
|
|
1060
1060
|
|
|
1061
1061
|
var parser;
|
|
1062
1062
|
|
|
@@ -1080,18 +1080,18 @@
|
|
|
1080
1080
|
*
|
|
1081
1081
|
* @returns {SVGElement}
|
|
1082
1082
|
*/
|
|
1083
|
-
function create(name, attrs) {
|
|
1083
|
+
function create$2(name, attrs) {
|
|
1084
1084
|
var element;
|
|
1085
1085
|
|
|
1086
1086
|
if (name.charAt(0) === '<') {
|
|
1087
|
-
element = parse(name).firstChild;
|
|
1087
|
+
element = parse$3(name).firstChild;
|
|
1088
1088
|
element = document.importNode(element, true);
|
|
1089
1089
|
} else {
|
|
1090
|
-
element = document.createElementNS(ns.svg, name);
|
|
1090
|
+
element = document.createElementNS(ns$1.svg, name);
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
1093
|
if (attrs) {
|
|
1094
|
-
attr(element, attrs);
|
|
1094
|
+
attr$2(element, attrs);
|
|
1095
1095
|
}
|
|
1096
1096
|
|
|
1097
1097
|
return element;
|
|
@@ -1102,9 +1102,9 @@
|
|
|
1102
1102
|
*/
|
|
1103
1103
|
|
|
1104
1104
|
// fake node used to instantiate svg geometry elements
|
|
1105
|
-
var node = create('svg');
|
|
1105
|
+
var node = create$2('svg');
|
|
1106
1106
|
|
|
1107
|
-
function extend(object, props) {
|
|
1107
|
+
function extend$1(object, props) {
|
|
1108
1108
|
var i, k, keys = Object.keys(props);
|
|
1109
1109
|
|
|
1110
1110
|
for (i = 0; (k = keys[i]); i++) {
|
|
@@ -1132,9 +1132,9 @@
|
|
|
1132
1132
|
case 0:
|
|
1133
1133
|
return matrix;
|
|
1134
1134
|
case 1:
|
|
1135
|
-
return extend(matrix, a);
|
|
1135
|
+
return extend$1(matrix, a);
|
|
1136
1136
|
case 6:
|
|
1137
|
-
return extend(matrix, {
|
|
1137
|
+
return extend$1(matrix, {
|
|
1138
1138
|
a: a,
|
|
1139
1139
|
b: b,
|
|
1140
1140
|
c: c,
|
|
@@ -1184,7 +1184,7 @@
|
|
|
1184
1184
|
*
|
|
1185
1185
|
* @return {SVGTransform} the consolidated transform
|
|
1186
1186
|
*/
|
|
1187
|
-
function transform(node, transforms) {
|
|
1187
|
+
function transform$1(node, transforms) {
|
|
1188
1188
|
var transformList = node.transform.baseVal;
|
|
1189
1189
|
|
|
1190
1190
|
if (transforms) {
|
|
@@ -1215,18 +1215,18 @@
|
|
|
1215
1215
|
|
|
1216
1216
|
function createLine(points, attrs) {
|
|
1217
1217
|
|
|
1218
|
-
var line = create('polyline');
|
|
1219
|
-
attr(line, { points: toSVGPoints(points) });
|
|
1218
|
+
var line = create$2('polyline');
|
|
1219
|
+
attr$2(line, { points: toSVGPoints(points) });
|
|
1220
1220
|
|
|
1221
1221
|
if (attrs) {
|
|
1222
|
-
attr(line, attrs);
|
|
1222
|
+
attr$2(line, attrs);
|
|
1223
1223
|
}
|
|
1224
1224
|
|
|
1225
1225
|
return line;
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
function updateLine(gfx, points) {
|
|
1229
|
-
attr(gfx, { points: toSVGPoints(points) });
|
|
1229
|
+
attr$2(gfx, { points: toSVGPoints(points) });
|
|
1230
1230
|
|
|
1231
1231
|
return gfx;
|
|
1232
1232
|
}
|
|
@@ -1383,10 +1383,10 @@
|
|
|
1383
1383
|
|
|
1384
1384
|
var nativeToString$1 = Object.prototype.toString;
|
|
1385
1385
|
var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
1386
|
-
function isUndefined$
|
|
1386
|
+
function isUndefined$2(obj) {
|
|
1387
1387
|
return obj === undefined;
|
|
1388
1388
|
}
|
|
1389
|
-
function isArray$
|
|
1389
|
+
function isArray$2(obj) {
|
|
1390
1390
|
return nativeToString$1.call(obj) === '[object Array]';
|
|
1391
1391
|
}
|
|
1392
1392
|
/**
|
|
@@ -1414,11 +1414,11 @@
|
|
|
1414
1414
|
function forEach$1(collection, iterator) {
|
|
1415
1415
|
var val, result;
|
|
1416
1416
|
|
|
1417
|
-
if (isUndefined$
|
|
1417
|
+
if (isUndefined$2(collection)) {
|
|
1418
1418
|
return;
|
|
1419
1419
|
}
|
|
1420
1420
|
|
|
1421
|
-
var convertKey = isArray$
|
|
1421
|
+
var convertKey = isArray$2(collection) ? toNum$1 : identity$1;
|
|
1422
1422
|
|
|
1423
1423
|
for (var key in collection) {
|
|
1424
1424
|
if (has$1(collection, key)) {
|
|
@@ -1448,7 +1448,7 @@
|
|
|
1448
1448
|
*
|
|
1449
1449
|
* @return {Element} the element
|
|
1450
1450
|
*/
|
|
1451
|
-
function assign$1(element) {
|
|
1451
|
+
function assign$1$1(element) {
|
|
1452
1452
|
var target = element.style;
|
|
1453
1453
|
|
|
1454
1454
|
for (var _len = arguments.length, styleSources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -1468,35 +1468,10 @@
|
|
|
1468
1468
|
return element;
|
|
1469
1469
|
}
|
|
1470
1470
|
|
|
1471
|
-
|
|
1472
|
-
* Set attribute `name` to `val`, or get attr `name`.
|
|
1473
|
-
*
|
|
1474
|
-
* @param {Element} el
|
|
1475
|
-
* @param {String} name
|
|
1476
|
-
* @param {String} [val]
|
|
1477
|
-
* @api public
|
|
1478
|
-
*/
|
|
1479
|
-
function attr$1(el, name, val) {
|
|
1480
|
-
// get
|
|
1481
|
-
if (arguments.length == 2) {
|
|
1482
|
-
return el.getAttribute(name);
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
// remove
|
|
1486
|
-
if (val === null) {
|
|
1487
|
-
return el.removeAttribute(name);
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
// set
|
|
1491
|
-
el.setAttribute(name, val);
|
|
1492
|
-
|
|
1493
|
-
return el;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
var indexOf = [].indexOf;
|
|
1471
|
+
var indexOf$1 = [].indexOf;
|
|
1497
1472
|
|
|
1498
|
-
var indexof = function(arr, obj){
|
|
1499
|
-
if (indexOf) return arr.indexOf(obj);
|
|
1473
|
+
var indexof$1 = function(arr, obj){
|
|
1474
|
+
if (indexOf$1) return arr.indexOf(obj);
|
|
1500
1475
|
for (var i = 0; i < arr.length; ++i) {
|
|
1501
1476
|
if (arr[i] === obj) return i;
|
|
1502
1477
|
}
|
|
@@ -1513,13 +1488,13 @@
|
|
|
1513
1488
|
* Whitespace regexp.
|
|
1514
1489
|
*/
|
|
1515
1490
|
|
|
1516
|
-
var re$
|
|
1491
|
+
var re$2 = /\s+/;
|
|
1517
1492
|
|
|
1518
1493
|
/**
|
|
1519
1494
|
* toString reference.
|
|
1520
1495
|
*/
|
|
1521
1496
|
|
|
1522
|
-
var toString$
|
|
1497
|
+
var toString$2 = Object.prototype.toString;
|
|
1523
1498
|
|
|
1524
1499
|
/**
|
|
1525
1500
|
* Wrap `el` in a `ClassList`.
|
|
@@ -1529,8 +1504,8 @@
|
|
|
1529
1504
|
* @api public
|
|
1530
1505
|
*/
|
|
1531
1506
|
|
|
1532
|
-
function classes$
|
|
1533
|
-
return new ClassList$
|
|
1507
|
+
function classes$2(el) {
|
|
1508
|
+
return new ClassList$2(el);
|
|
1534
1509
|
}
|
|
1535
1510
|
|
|
1536
1511
|
/**
|
|
@@ -1540,7 +1515,7 @@
|
|
|
1540
1515
|
* @api private
|
|
1541
1516
|
*/
|
|
1542
1517
|
|
|
1543
|
-
function ClassList$
|
|
1518
|
+
function ClassList$2(el) {
|
|
1544
1519
|
if (!el || !el.nodeType) {
|
|
1545
1520
|
throw new Error('A DOM element reference is required');
|
|
1546
1521
|
}
|
|
@@ -1556,7 +1531,7 @@
|
|
|
1556
1531
|
* @api public
|
|
1557
1532
|
*/
|
|
1558
1533
|
|
|
1559
|
-
ClassList$
|
|
1534
|
+
ClassList$2.prototype.add = function (name) {
|
|
1560
1535
|
// classList
|
|
1561
1536
|
if (this.list) {
|
|
1562
1537
|
this.list.add(name);
|
|
@@ -1565,7 +1540,7 @@
|
|
|
1565
1540
|
|
|
1566
1541
|
// fallback
|
|
1567
1542
|
var arr = this.array();
|
|
1568
|
-
var i = indexof(arr, name);
|
|
1543
|
+
var i = indexof$1(arr, name);
|
|
1569
1544
|
if (!~i) arr.push(name);
|
|
1570
1545
|
this.el.className = arr.join(' ');
|
|
1571
1546
|
return this;
|
|
@@ -1581,8 +1556,8 @@
|
|
|
1581
1556
|
* @api public
|
|
1582
1557
|
*/
|
|
1583
1558
|
|
|
1584
|
-
ClassList$
|
|
1585
|
-
if ('[object RegExp]' == toString$
|
|
1559
|
+
ClassList$2.prototype.remove = function (name) {
|
|
1560
|
+
if ('[object RegExp]' == toString$2.call(name)) {
|
|
1586
1561
|
return this.removeMatching(name);
|
|
1587
1562
|
}
|
|
1588
1563
|
|
|
@@ -1594,7 +1569,7 @@
|
|
|
1594
1569
|
|
|
1595
1570
|
// fallback
|
|
1596
1571
|
var arr = this.array();
|
|
1597
|
-
var i = indexof(arr, name);
|
|
1572
|
+
var i = indexof$1(arr, name);
|
|
1598
1573
|
if (~i) arr.splice(i, 1);
|
|
1599
1574
|
this.el.className = arr.join(' ');
|
|
1600
1575
|
return this;
|
|
@@ -1608,7 +1583,7 @@
|
|
|
1608
1583
|
* @api private
|
|
1609
1584
|
*/
|
|
1610
1585
|
|
|
1611
|
-
ClassList$
|
|
1586
|
+
ClassList$2.prototype.removeMatching = function (re) {
|
|
1612
1587
|
var arr = this.array();
|
|
1613
1588
|
for (var i = 0; i < arr.length; i++) {
|
|
1614
1589
|
if (re.test(arr[i])) {
|
|
@@ -1630,7 +1605,7 @@
|
|
|
1630
1605
|
* @api public
|
|
1631
1606
|
*/
|
|
1632
1607
|
|
|
1633
|
-
ClassList$
|
|
1608
|
+
ClassList$2.prototype.toggle = function (name, force) {
|
|
1634
1609
|
// classList
|
|
1635
1610
|
if (this.list) {
|
|
1636
1611
|
if ('undefined' !== typeof force) {
|
|
@@ -1668,10 +1643,10 @@
|
|
|
1668
1643
|
* @api public
|
|
1669
1644
|
*/
|
|
1670
1645
|
|
|
1671
|
-
ClassList$
|
|
1646
|
+
ClassList$2.prototype.array = function () {
|
|
1672
1647
|
var className = this.el.getAttribute('class') || '';
|
|
1673
1648
|
var str = className.replace(/^\s+|\s+$/g, '');
|
|
1674
|
-
var arr = str.split(re$
|
|
1649
|
+
var arr = str.split(re$2);
|
|
1675
1650
|
if ('' === arr[0]) arr.shift();
|
|
1676
1651
|
return arr;
|
|
1677
1652
|
};
|
|
@@ -1684,34 +1659,19 @@
|
|
|
1684
1659
|
* @api public
|
|
1685
1660
|
*/
|
|
1686
1661
|
|
|
1687
|
-
ClassList$
|
|
1688
|
-
return this.list ? this.list.contains(name) : !!~indexof(this.array(), name);
|
|
1662
|
+
ClassList$2.prototype.has = ClassList$2.prototype.contains = function (name) {
|
|
1663
|
+
return this.list ? this.list.contains(name) : !!~indexof$1(this.array(), name);
|
|
1689
1664
|
};
|
|
1690
1665
|
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
while (el.childNodes.length) {
|
|
1699
|
-
c = el.childNodes[0];
|
|
1700
|
-
el.removeChild(c);
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
return el;
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
var proto = typeof Element !== 'undefined' ? Element.prototype : {};
|
|
1707
|
-
var vendor = proto.matches
|
|
1708
|
-
|| proto.matchesSelector
|
|
1709
|
-
|| proto.webkitMatchesSelector
|
|
1710
|
-
|| proto.mozMatchesSelector
|
|
1711
|
-
|| proto.msMatchesSelector
|
|
1712
|
-
|| proto.oMatchesSelector;
|
|
1666
|
+
var proto$1 = typeof Element !== 'undefined' ? Element.prototype : {};
|
|
1667
|
+
var vendor$1 = proto$1.matches
|
|
1668
|
+
|| proto$1.matchesSelector
|
|
1669
|
+
|| proto$1.webkitMatchesSelector
|
|
1670
|
+
|| proto$1.mozMatchesSelector
|
|
1671
|
+
|| proto$1.msMatchesSelector
|
|
1672
|
+
|| proto$1.oMatchesSelector;
|
|
1713
1673
|
|
|
1714
|
-
var matchesSelector = match;
|
|
1674
|
+
var matchesSelector$1 = match$1;
|
|
1715
1675
|
|
|
1716
1676
|
/**
|
|
1717
1677
|
* Match `el` to `selector`.
|
|
@@ -1722,9 +1682,9 @@
|
|
|
1722
1682
|
* @api public
|
|
1723
1683
|
*/
|
|
1724
1684
|
|
|
1725
|
-
function match(el, selector) {
|
|
1685
|
+
function match$1(el, selector) {
|
|
1726
1686
|
if (!el || el.nodeType !== 1) return false;
|
|
1727
|
-
if (vendor) return vendor.call(el, selector);
|
|
1687
|
+
if (vendor$1) return vendor$1.call(el, selector);
|
|
1728
1688
|
var nodes = el.parentNode.querySelectorAll(selector);
|
|
1729
1689
|
for (var i = 0; i < nodes.length; i++) {
|
|
1730
1690
|
if (nodes[i] == el) return true;
|
|
@@ -1739,24 +1699,24 @@
|
|
|
1739
1699
|
* @param {String} selector
|
|
1740
1700
|
* @param {Boolean} checkYourSelf (optional)
|
|
1741
1701
|
*/
|
|
1742
|
-
function closest (element, selector, checkYourSelf) {
|
|
1702
|
+
function closest$1 (element, selector, checkYourSelf) {
|
|
1743
1703
|
var currentElem = checkYourSelf ? element : element.parentNode;
|
|
1744
1704
|
|
|
1745
1705
|
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE && currentElem.nodeType !== document.DOCUMENT_FRAGMENT_NODE) {
|
|
1746
1706
|
|
|
1747
|
-
if (matchesSelector(currentElem, selector)) {
|
|
1707
|
+
if (matchesSelector$1(currentElem, selector)) {
|
|
1748
1708
|
return currentElem;
|
|
1749
1709
|
}
|
|
1750
1710
|
|
|
1751
1711
|
currentElem = currentElem.parentNode;
|
|
1752
1712
|
}
|
|
1753
1713
|
|
|
1754
|
-
return matchesSelector(currentElem, selector) ? currentElem : null;
|
|
1714
|
+
return matchesSelector$1(currentElem, selector) ? currentElem : null;
|
|
1755
1715
|
}
|
|
1756
1716
|
|
|
1757
|
-
var bind$1 = window.addEventListener ? 'addEventListener' : 'attachEvent',
|
|
1758
|
-
unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
1759
|
-
prefix = bind$1 !== 'addEventListener' ? 'on' : '';
|
|
1717
|
+
var bind$1$1 = window.addEventListener ? 'addEventListener' : 'attachEvent',
|
|
1718
|
+
unbind$2 = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
1719
|
+
prefix$7 = bind$1$1 !== 'addEventListener' ? 'on' : '';
|
|
1760
1720
|
|
|
1761
1721
|
/**
|
|
1762
1722
|
* Bind `el` event `type` to `fn`.
|
|
@@ -1769,8 +1729,8 @@
|
|
|
1769
1729
|
* @api public
|
|
1770
1730
|
*/
|
|
1771
1731
|
|
|
1772
|
-
var bind_1 = function(el, type, fn, capture){
|
|
1773
|
-
el[bind$1](prefix + type, fn, capture || false);
|
|
1732
|
+
var bind_1$1 = function(el, type, fn, capture){
|
|
1733
|
+
el[bind$1$1](prefix$7 + type, fn, capture || false);
|
|
1774
1734
|
return fn;
|
|
1775
1735
|
};
|
|
1776
1736
|
|
|
@@ -1785,14 +1745,14 @@
|
|
|
1785
1745
|
* @api public
|
|
1786
1746
|
*/
|
|
1787
1747
|
|
|
1788
|
-
var unbind_1 = function(el, type, fn, capture){
|
|
1789
|
-
el[unbind](prefix + type, fn, capture || false);
|
|
1748
|
+
var unbind_1$1 = function(el, type, fn, capture){
|
|
1749
|
+
el[unbind$2](prefix$7 + type, fn, capture || false);
|
|
1790
1750
|
return fn;
|
|
1791
1751
|
};
|
|
1792
1752
|
|
|
1793
|
-
var componentEvent = {
|
|
1794
|
-
bind: bind_1,
|
|
1795
|
-
unbind: unbind_1
|
|
1753
|
+
var componentEvent$1 = {
|
|
1754
|
+
bind: bind_1$1,
|
|
1755
|
+
unbind: unbind_1$1
|
|
1796
1756
|
};
|
|
1797
1757
|
|
|
1798
1758
|
/**
|
|
@@ -1815,16 +1775,16 @@
|
|
|
1815
1775
|
|
|
1816
1776
|
// Some events don't bubble, so we want to bind to the capture phase instead
|
|
1817
1777
|
// when delegating.
|
|
1818
|
-
var forceCaptureEvents = ['focus', 'blur'];
|
|
1778
|
+
var forceCaptureEvents$1 = ['focus', 'blur'];
|
|
1819
1779
|
|
|
1820
|
-
function bind$2(el, selector, type, fn, capture) {
|
|
1821
|
-
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1780
|
+
function bind$2$1(el, selector, type, fn, capture) {
|
|
1781
|
+
if (forceCaptureEvents$1.indexOf(type) !== -1) {
|
|
1822
1782
|
capture = true;
|
|
1823
1783
|
}
|
|
1824
1784
|
|
|
1825
|
-
return componentEvent.bind(el, type, function (e) {
|
|
1785
|
+
return componentEvent$1.bind(el, type, function (e) {
|
|
1826
1786
|
var target = e.target || e.srcElement;
|
|
1827
|
-
e.delegateTarget = closest(target, selector, true);
|
|
1787
|
+
e.delegateTarget = closest$1(target, selector, true);
|
|
1828
1788
|
if (e.delegateTarget) {
|
|
1829
1789
|
fn.call(el, e);
|
|
1830
1790
|
}
|
|
@@ -1840,75 +1800,75 @@
|
|
|
1840
1800
|
* @param {Boolean} capture
|
|
1841
1801
|
* @api public
|
|
1842
1802
|
*/
|
|
1843
|
-
function unbind$1(el, type, fn, capture) {
|
|
1844
|
-
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1803
|
+
function unbind$1$1(el, type, fn, capture) {
|
|
1804
|
+
if (forceCaptureEvents$1.indexOf(type) !== -1) {
|
|
1845
1805
|
capture = true;
|
|
1846
1806
|
}
|
|
1847
1807
|
|
|
1848
|
-
return componentEvent.unbind(el, type, fn, capture);
|
|
1808
|
+
return componentEvent$1.unbind(el, type, fn, capture);
|
|
1849
1809
|
}
|
|
1850
1810
|
|
|
1851
|
-
var delegate = {
|
|
1852
|
-
bind: bind$2,
|
|
1853
|
-
unbind: unbind$1
|
|
1811
|
+
var delegate$1 = {
|
|
1812
|
+
bind: bind$2$1,
|
|
1813
|
+
unbind: unbind$1$1
|
|
1854
1814
|
};
|
|
1855
1815
|
|
|
1856
1816
|
/**
|
|
1857
1817
|
* Expose `parse`.
|
|
1858
1818
|
*/
|
|
1859
1819
|
|
|
1860
|
-
var domify = parse$
|
|
1820
|
+
var domify$1 = parse$2;
|
|
1861
1821
|
|
|
1862
1822
|
/**
|
|
1863
1823
|
* Tests for browser support.
|
|
1864
1824
|
*/
|
|
1865
1825
|
|
|
1866
|
-
var innerHTMLBug = false;
|
|
1867
|
-
var bugTestDiv;
|
|
1826
|
+
var innerHTMLBug$1 = false;
|
|
1827
|
+
var bugTestDiv$1;
|
|
1868
1828
|
if (typeof document !== 'undefined') {
|
|
1869
|
-
bugTestDiv = document.createElement('div');
|
|
1829
|
+
bugTestDiv$1 = document.createElement('div');
|
|
1870
1830
|
// Setup
|
|
1871
|
-
bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
|
|
1831
|
+
bugTestDiv$1.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
|
|
1872
1832
|
// Make sure that link elements get serialized correctly by innerHTML
|
|
1873
1833
|
// This requires a wrapper element in IE
|
|
1874
|
-
innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length;
|
|
1875
|
-
bugTestDiv = undefined;
|
|
1834
|
+
innerHTMLBug$1 = !bugTestDiv$1.getElementsByTagName('link').length;
|
|
1835
|
+
bugTestDiv$1 = undefined;
|
|
1876
1836
|
}
|
|
1877
1837
|
|
|
1878
1838
|
/**
|
|
1879
1839
|
* Wrap map from jquery.
|
|
1880
1840
|
*/
|
|
1881
1841
|
|
|
1882
|
-
var map$1 = {
|
|
1842
|
+
var map$1$1 = {
|
|
1883
1843
|
legend: [1, '<fieldset>', '</fieldset>'],
|
|
1884
1844
|
tr: [2, '<table><tbody>', '</tbody></table>'],
|
|
1885
1845
|
col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
|
1886
1846
|
// for script/link/style tags to work in IE6-8, you have to wrap
|
|
1887
1847
|
// in a div with a non-whitespace character in front, ha!
|
|
1888
|
-
_default: innerHTMLBug ? [1, 'X<div>', '</div>'] : [0, '', '']
|
|
1848
|
+
_default: innerHTMLBug$1 ? [1, 'X<div>', '</div>'] : [0, '', '']
|
|
1889
1849
|
};
|
|
1890
1850
|
|
|
1891
|
-
map$1.td =
|
|
1892
|
-
map$1.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
|
1851
|
+
map$1$1.td =
|
|
1852
|
+
map$1$1.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
|
1893
1853
|
|
|
1894
|
-
map$1.option =
|
|
1895
|
-
map$1.optgroup = [1, '<select multiple="multiple">', '</select>'];
|
|
1854
|
+
map$1$1.option =
|
|
1855
|
+
map$1$1.optgroup = [1, '<select multiple="multiple">', '</select>'];
|
|
1896
1856
|
|
|
1897
|
-
map$1.thead =
|
|
1898
|
-
map$1.tbody =
|
|
1899
|
-
map$1.colgroup =
|
|
1900
|
-
map$1.caption =
|
|
1901
|
-
map$1.tfoot = [1, '<table>', '</table>'];
|
|
1857
|
+
map$1$1.thead =
|
|
1858
|
+
map$1$1.tbody =
|
|
1859
|
+
map$1$1.colgroup =
|
|
1860
|
+
map$1$1.caption =
|
|
1861
|
+
map$1$1.tfoot = [1, '<table>', '</table>'];
|
|
1902
1862
|
|
|
1903
|
-
map$1.polyline =
|
|
1904
|
-
map$1.ellipse =
|
|
1905
|
-
map$1.polygon =
|
|
1906
|
-
map$1.circle =
|
|
1907
|
-
map$1.text =
|
|
1908
|
-
map$1.line =
|
|
1909
|
-
map$1.path =
|
|
1910
|
-
map$1.rect =
|
|
1911
|
-
map$1.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
|
|
1863
|
+
map$1$1.polyline =
|
|
1864
|
+
map$1$1.ellipse =
|
|
1865
|
+
map$1$1.polygon =
|
|
1866
|
+
map$1$1.circle =
|
|
1867
|
+
map$1$1.text =
|
|
1868
|
+
map$1$1.line =
|
|
1869
|
+
map$1$1.path =
|
|
1870
|
+
map$1$1.rect =
|
|
1871
|
+
map$1$1.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
|
|
1912
1872
|
|
|
1913
1873
|
/**
|
|
1914
1874
|
* Parse `html` and return a DOM Node instance, which could be a TextNode,
|
|
@@ -1921,7 +1881,7 @@
|
|
|
1921
1881
|
* @api private
|
|
1922
1882
|
*/
|
|
1923
1883
|
|
|
1924
|
-
function parse$
|
|
1884
|
+
function parse$2(html, doc) {
|
|
1925
1885
|
if ('string' != typeof html) throw new TypeError('String expected');
|
|
1926
1886
|
|
|
1927
1887
|
// default to the global `document` object
|
|
@@ -1943,7 +1903,7 @@
|
|
|
1943
1903
|
}
|
|
1944
1904
|
|
|
1945
1905
|
// wrap map
|
|
1946
|
-
var wrap = map$1[tag] || map$1._default;
|
|
1906
|
+
var wrap = map$1$1[tag] || map$1$1._default;
|
|
1947
1907
|
var depth = wrap[0];
|
|
1948
1908
|
var prefix = wrap[1];
|
|
1949
1909
|
var suffix = wrap[2];
|
|
@@ -1965,23 +1925,17 @@
|
|
|
1965
1925
|
return fragment;
|
|
1966
1926
|
}
|
|
1967
1927
|
|
|
1968
|
-
function query(selector, el) {
|
|
1928
|
+
function query$1(selector, el) {
|
|
1969
1929
|
el = el || document;
|
|
1970
1930
|
|
|
1971
1931
|
return el.querySelector(selector);
|
|
1972
1932
|
}
|
|
1973
1933
|
|
|
1974
|
-
function
|
|
1975
|
-
el = el || document;
|
|
1976
|
-
|
|
1977
|
-
return el.querySelectorAll(selector);
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
function remove$1(el) {
|
|
1934
|
+
function remove$3(el) {
|
|
1981
1935
|
el.parentNode && el.parentNode.removeChild(el);
|
|
1982
1936
|
}
|
|
1983
1937
|
|
|
1984
|
-
function ensureImported
|
|
1938
|
+
function ensureImported(element, target) {
|
|
1985
1939
|
|
|
1986
1940
|
if (element.ownerDocument !== target.ownerDocument) {
|
|
1987
1941
|
try {
|
|
@@ -2007,8 +1961,8 @@
|
|
|
2007
1961
|
*
|
|
2008
1962
|
* @return {SVGElement} the appended node
|
|
2009
1963
|
*/
|
|
2010
|
-
function appendTo
|
|
2011
|
-
return target.appendChild(ensureImported
|
|
1964
|
+
function appendTo(element, target) {
|
|
1965
|
+
return target.appendChild(ensureImported(element, target));
|
|
2012
1966
|
}
|
|
2013
1967
|
|
|
2014
1968
|
/**
|
|
@@ -2023,8 +1977,8 @@
|
|
|
2023
1977
|
*
|
|
2024
1978
|
* @return {SVGElement} the element
|
|
2025
1979
|
*/
|
|
2026
|
-
function append
|
|
2027
|
-
appendTo
|
|
1980
|
+
function append(target, node) {
|
|
1981
|
+
appendTo(node, target);
|
|
2028
1982
|
return target;
|
|
2029
1983
|
}
|
|
2030
1984
|
|
|
@@ -2032,9 +1986,9 @@
|
|
|
2032
1986
|
* attribute accessor utility
|
|
2033
1987
|
*/
|
|
2034
1988
|
|
|
2035
|
-
var LENGTH_ATTR
|
|
1989
|
+
var LENGTH_ATTR = 2;
|
|
2036
1990
|
|
|
2037
|
-
var CSS_PROPERTIES
|
|
1991
|
+
var CSS_PROPERTIES = {
|
|
2038
1992
|
'alignment-baseline': 1,
|
|
2039
1993
|
'baseline-shift': 1,
|
|
2040
1994
|
'clip': 1,
|
|
@@ -2058,7 +2012,7 @@
|
|
|
2058
2012
|
'flood-opacity': 1,
|
|
2059
2013
|
'font': 1,
|
|
2060
2014
|
'font-family': 1,
|
|
2061
|
-
'font-size': LENGTH_ATTR
|
|
2015
|
+
'font-size': LENGTH_ATTR,
|
|
2062
2016
|
'font-size-adjust': 1,
|
|
2063
2017
|
'font-stretch': 1,
|
|
2064
2018
|
'font-style': 1,
|
|
@@ -2088,7 +2042,7 @@
|
|
|
2088
2042
|
'stroke-linejoin': 1,
|
|
2089
2043
|
'stroke-miterlimit': 1,
|
|
2090
2044
|
'stroke-opacity': 1,
|
|
2091
|
-
'stroke-width': LENGTH_ATTR
|
|
2045
|
+
'stroke-width': LENGTH_ATTR,
|
|
2092
2046
|
'text-anchor': 1,
|
|
2093
2047
|
'text-decoration': 1,
|
|
2094
2048
|
'text-rendering': 1,
|
|
@@ -2099,22 +2053,22 @@
|
|
|
2099
2053
|
};
|
|
2100
2054
|
|
|
2101
2055
|
|
|
2102
|
-
function getAttribute
|
|
2103
|
-
if (CSS_PROPERTIES
|
|
2056
|
+
function getAttribute(node, name) {
|
|
2057
|
+
if (CSS_PROPERTIES[name]) {
|
|
2104
2058
|
return node.style[name];
|
|
2105
2059
|
} else {
|
|
2106
2060
|
return node.getAttributeNS(null, name);
|
|
2107
2061
|
}
|
|
2108
2062
|
}
|
|
2109
2063
|
|
|
2110
|
-
function setAttribute
|
|
2064
|
+
function setAttribute(node, name, value) {
|
|
2111
2065
|
var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
2112
2066
|
|
|
2113
|
-
var type = CSS_PROPERTIES
|
|
2067
|
+
var type = CSS_PROPERTIES[hyphenated];
|
|
2114
2068
|
|
|
2115
2069
|
if (type) {
|
|
2116
2070
|
// append pixel unit, unless present
|
|
2117
|
-
if (type === LENGTH_ATTR
|
|
2071
|
+
if (type === LENGTH_ATTR && typeof value === 'number') {
|
|
2118
2072
|
value = String(value) + 'px';
|
|
2119
2073
|
}
|
|
2120
2074
|
|
|
@@ -2124,12 +2078,12 @@
|
|
|
2124
2078
|
}
|
|
2125
2079
|
}
|
|
2126
2080
|
|
|
2127
|
-
function setAttributes
|
|
2081
|
+
function setAttributes(node, attrs) {
|
|
2128
2082
|
|
|
2129
2083
|
var names = Object.keys(attrs), i, name;
|
|
2130
2084
|
|
|
2131
2085
|
for (i = 0, name; (name = names[i]); i++) {
|
|
2132
|
-
setAttribute
|
|
2086
|
+
setAttribute(node, name, attrs[name]);
|
|
2133
2087
|
}
|
|
2134
2088
|
}
|
|
2135
2089
|
|
|
@@ -2143,15 +2097,15 @@
|
|
|
2143
2097
|
*
|
|
2144
2098
|
* @return {String}
|
|
2145
2099
|
*/
|
|
2146
|
-
function attr$
|
|
2100
|
+
function attr$1(node, name, value) {
|
|
2147
2101
|
if (typeof name === 'string') {
|
|
2148
2102
|
if (value !== undefined) {
|
|
2149
|
-
setAttribute
|
|
2103
|
+
setAttribute(node, name, value);
|
|
2150
2104
|
} else {
|
|
2151
|
-
return getAttribute
|
|
2105
|
+
return getAttribute(node, name);
|
|
2152
2106
|
}
|
|
2153
2107
|
} else {
|
|
2154
|
-
setAttributes
|
|
2108
|
+
setAttributes(node, name);
|
|
2155
2109
|
}
|
|
2156
2110
|
|
|
2157
2111
|
return node;
|
|
@@ -2160,7 +2114,7 @@
|
|
|
2160
2114
|
/**
|
|
2161
2115
|
* Clear utility
|
|
2162
2116
|
*/
|
|
2163
|
-
function index
|
|
2117
|
+
function index(arr, obj) {
|
|
2164
2118
|
if (arr.indexOf) {
|
|
2165
2119
|
return arr.indexOf(obj);
|
|
2166
2120
|
}
|
|
@@ -2175,11 +2129,11 @@
|
|
|
2175
2129
|
return -1;
|
|
2176
2130
|
}
|
|
2177
2131
|
|
|
2178
|
-
var re$
|
|
2132
|
+
var re$1 = /\s+/;
|
|
2179
2133
|
|
|
2180
|
-
var toString$
|
|
2134
|
+
var toString$1 = Object.prototype.toString;
|
|
2181
2135
|
|
|
2182
|
-
function defined
|
|
2136
|
+
function defined(o) {
|
|
2183
2137
|
return typeof o !== 'undefined';
|
|
2184
2138
|
}
|
|
2185
2139
|
|
|
@@ -2191,11 +2145,11 @@
|
|
|
2191
2145
|
* @api public
|
|
2192
2146
|
*/
|
|
2193
2147
|
|
|
2194
|
-
function classes$
|
|
2195
|
-
return new ClassList$
|
|
2148
|
+
function classes$1(el) {
|
|
2149
|
+
return new ClassList$1(el);
|
|
2196
2150
|
}
|
|
2197
2151
|
|
|
2198
|
-
function ClassList$
|
|
2152
|
+
function ClassList$1(el) {
|
|
2199
2153
|
if (!el || !el.nodeType) {
|
|
2200
2154
|
throw new Error('A DOM element reference is required');
|
|
2201
2155
|
}
|
|
@@ -2211,7 +2165,7 @@
|
|
|
2211
2165
|
* @api public
|
|
2212
2166
|
*/
|
|
2213
2167
|
|
|
2214
|
-
ClassList$
|
|
2168
|
+
ClassList$1.prototype.add = function(name) {
|
|
2215
2169
|
|
|
2216
2170
|
// classList
|
|
2217
2171
|
if (this.list) {
|
|
@@ -2221,12 +2175,12 @@
|
|
|
2221
2175
|
|
|
2222
2176
|
// fallback
|
|
2223
2177
|
var arr = this.array();
|
|
2224
|
-
var i = index
|
|
2178
|
+
var i = index(arr, name);
|
|
2225
2179
|
if (!~i) {
|
|
2226
2180
|
arr.push(name);
|
|
2227
2181
|
}
|
|
2228
2182
|
|
|
2229
|
-
if (defined
|
|
2183
|
+
if (defined(this.el.className.baseVal)) {
|
|
2230
2184
|
this.el.className.baseVal = arr.join(' ');
|
|
2231
2185
|
} else {
|
|
2232
2186
|
this.el.className = arr.join(' ');
|
|
@@ -2245,8 +2199,8 @@
|
|
|
2245
2199
|
* @api public
|
|
2246
2200
|
*/
|
|
2247
2201
|
|
|
2248
|
-
ClassList$
|
|
2249
|
-
if ('[object RegExp]' === toString$
|
|
2202
|
+
ClassList$1.prototype.remove = function(name) {
|
|
2203
|
+
if ('[object RegExp]' === toString$1.call(name)) {
|
|
2250
2204
|
return this.removeMatching(name);
|
|
2251
2205
|
}
|
|
2252
2206
|
|
|
@@ -2258,7 +2212,7 @@
|
|
|
2258
2212
|
|
|
2259
2213
|
// fallback
|
|
2260
2214
|
var arr = this.array();
|
|
2261
|
-
var i = index
|
|
2215
|
+
var i = index(arr, name);
|
|
2262
2216
|
if (~i) {
|
|
2263
2217
|
arr.splice(i, 1);
|
|
2264
2218
|
}
|
|
@@ -2274,7 +2228,7 @@
|
|
|
2274
2228
|
* @api private
|
|
2275
2229
|
*/
|
|
2276
2230
|
|
|
2277
|
-
ClassList$
|
|
2231
|
+
ClassList$1.prototype.removeMatching = function(re) {
|
|
2278
2232
|
var arr = this.array();
|
|
2279
2233
|
for (var i = 0; i < arr.length; i++) {
|
|
2280
2234
|
if (re.test(arr[i])) {
|
|
@@ -2296,10 +2250,10 @@
|
|
|
2296
2250
|
* @api public
|
|
2297
2251
|
*/
|
|
2298
2252
|
|
|
2299
|
-
ClassList$
|
|
2253
|
+
ClassList$1.prototype.toggle = function(name, force) {
|
|
2300
2254
|
// classList
|
|
2301
2255
|
if (this.list) {
|
|
2302
|
-
if (defined
|
|
2256
|
+
if (defined(force)) {
|
|
2303
2257
|
if (force !== this.list.toggle(name, force)) {
|
|
2304
2258
|
this.list.toggle(name); // toggle again to correct
|
|
2305
2259
|
}
|
|
@@ -2310,7 +2264,7 @@
|
|
|
2310
2264
|
}
|
|
2311
2265
|
|
|
2312
2266
|
// fallback
|
|
2313
|
-
if (defined
|
|
2267
|
+
if (defined(force)) {
|
|
2314
2268
|
if (!force) {
|
|
2315
2269
|
this.remove(name);
|
|
2316
2270
|
} else {
|
|
@@ -2334,10 +2288,10 @@
|
|
|
2334
2288
|
* @api public
|
|
2335
2289
|
*/
|
|
2336
2290
|
|
|
2337
|
-
ClassList$
|
|
2291
|
+
ClassList$1.prototype.array = function() {
|
|
2338
2292
|
var className = this.el.getAttribute('class') || '';
|
|
2339
2293
|
var str = className.replace(/^\s+|\s+$/g, '');
|
|
2340
|
-
var arr = str.split(re$
|
|
2294
|
+
var arr = str.split(re$1);
|
|
2341
2295
|
if ('' === arr[0]) {
|
|
2342
2296
|
arr.shift();
|
|
2343
2297
|
}
|
|
@@ -2352,12 +2306,12 @@
|
|
|
2352
2306
|
* @api public
|
|
2353
2307
|
*/
|
|
2354
2308
|
|
|
2355
|
-
ClassList$
|
|
2356
|
-
ClassList$
|
|
2309
|
+
ClassList$1.prototype.has =
|
|
2310
|
+
ClassList$1.prototype.contains = function(name) {
|
|
2357
2311
|
return (
|
|
2358
2312
|
this.list ?
|
|
2359
2313
|
this.list.contains(name) :
|
|
2360
|
-
!! ~index
|
|
2314
|
+
!! ~index(this.array(), name)
|
|
2361
2315
|
);
|
|
2362
2316
|
};
|
|
2363
2317
|
|
|
@@ -2381,7 +2335,7 @@
|
|
|
2381
2335
|
* @param {DOMElement} element
|
|
2382
2336
|
* @return {DOMElement} the element (for chaining)
|
|
2383
2337
|
*/
|
|
2384
|
-
function clear$
|
|
2338
|
+
function clear$1(element) {
|
|
2385
2339
|
var child;
|
|
2386
2340
|
|
|
2387
2341
|
while ((child = element.firstChild)) {
|
|
@@ -2391,7 +2345,7 @@
|
|
|
2391
2345
|
return element;
|
|
2392
2346
|
}
|
|
2393
2347
|
|
|
2394
|
-
var ns
|
|
2348
|
+
var ns = {
|
|
2395
2349
|
svg: 'http://www.w3.org/2000/svg'
|
|
2396
2350
|
};
|
|
2397
2351
|
|
|
@@ -2399,24 +2353,24 @@
|
|
|
2399
2353
|
* DOM parsing utility
|
|
2400
2354
|
*/
|
|
2401
2355
|
|
|
2402
|
-
var SVG_START
|
|
2356
|
+
var SVG_START = '<svg xmlns="' + ns.svg + '"';
|
|
2403
2357
|
|
|
2404
|
-
function parse$
|
|
2358
|
+
function parse$1(svg) {
|
|
2405
2359
|
|
|
2406
2360
|
var unwrap = false;
|
|
2407
2361
|
|
|
2408
2362
|
// ensure we import a valid svg document
|
|
2409
2363
|
if (svg.substring(0, 4) === '<svg') {
|
|
2410
|
-
if (svg.indexOf(ns
|
|
2411
|
-
svg = SVG_START
|
|
2364
|
+
if (svg.indexOf(ns.svg) === -1) {
|
|
2365
|
+
svg = SVG_START + svg.substring(4);
|
|
2412
2366
|
}
|
|
2413
2367
|
} else {
|
|
2414
2368
|
// namespace svg
|
|
2415
|
-
svg = SVG_START
|
|
2369
|
+
svg = SVG_START + '>' + svg + '</svg>';
|
|
2416
2370
|
unwrap = true;
|
|
2417
2371
|
}
|
|
2418
2372
|
|
|
2419
|
-
var parsed = parseDocument
|
|
2373
|
+
var parsed = parseDocument(svg);
|
|
2420
2374
|
|
|
2421
2375
|
if (!unwrap) {
|
|
2422
2376
|
return parsed;
|
|
@@ -2433,7 +2387,7 @@
|
|
|
2433
2387
|
return fragment;
|
|
2434
2388
|
}
|
|
2435
2389
|
|
|
2436
|
-
function parseDocument
|
|
2390
|
+
function parseDocument(svg) {
|
|
2437
2391
|
|
|
2438
2392
|
var parser;
|
|
2439
2393
|
|
|
@@ -2461,14 +2415,14 @@
|
|
|
2461
2415
|
var element;
|
|
2462
2416
|
|
|
2463
2417
|
if (name.charAt(0) === '<') {
|
|
2464
|
-
element = parse$
|
|
2418
|
+
element = parse$1(name).firstChild;
|
|
2465
2419
|
element = document.importNode(element, true);
|
|
2466
2420
|
} else {
|
|
2467
|
-
element = document.createElementNS(ns
|
|
2421
|
+
element = document.createElementNS(ns.svg, name);
|
|
2468
2422
|
}
|
|
2469
2423
|
|
|
2470
2424
|
if (attrs) {
|
|
2471
|
-
attr$
|
|
2425
|
+
attr$1(element, attrs);
|
|
2472
2426
|
}
|
|
2473
2427
|
|
|
2474
2428
|
return element;
|
|
@@ -2488,7 +2442,7 @@
|
|
|
2488
2442
|
'"': '\''
|
|
2489
2443
|
};
|
|
2490
2444
|
|
|
2491
|
-
function escape(str, pattern) {
|
|
2445
|
+
function escape$1(str, pattern) {
|
|
2492
2446
|
|
|
2493
2447
|
function replaceFn(match, entity) {
|
|
2494
2448
|
return ENTITY_REPLACEMENT[entity] || entity;
|
|
@@ -2505,7 +2459,7 @@
|
|
|
2505
2459
|
// TEXT
|
|
2506
2460
|
case 3:
|
|
2507
2461
|
// replace special XML characters
|
|
2508
|
-
output.push(escape(node.textContent, TEXT_ENTITIES));
|
|
2462
|
+
output.push(escape$1(node.textContent, TEXT_ENTITIES));
|
|
2509
2463
|
break;
|
|
2510
2464
|
|
|
2511
2465
|
// ELEMENT
|
|
@@ -2516,7 +2470,7 @@
|
|
|
2516
2470
|
attrMap = node.attributes;
|
|
2517
2471
|
for (i = 0, len = attrMap.length; i < len; ++i) {
|
|
2518
2472
|
attrNode = attrMap.item(i);
|
|
2519
|
-
output.push(' ', attrNode.name, '="', escape(attrNode.value, ATTR_ENTITIES), '"');
|
|
2473
|
+
output.push(' ', attrNode.name, '="', escape$1(attrNode.value, ATTR_ENTITIES), '"');
|
|
2520
2474
|
}
|
|
2521
2475
|
}
|
|
2522
2476
|
|
|
@@ -2534,7 +2488,7 @@
|
|
|
2534
2488
|
|
|
2535
2489
|
// COMMENT
|
|
2536
2490
|
case 8:
|
|
2537
|
-
output.push('<!--', escape(node.nodeValue, TEXT_ENTITIES), '-->');
|
|
2491
|
+
output.push('<!--', escape$1(node.nodeValue, TEXT_ENTITIES), '-->');
|
|
2538
2492
|
break;
|
|
2539
2493
|
|
|
2540
2494
|
// CDATA
|
|
@@ -2557,10 +2511,10 @@
|
|
|
2557
2511
|
|
|
2558
2512
|
function set(element, svg) {
|
|
2559
2513
|
|
|
2560
|
-
var parsed = parse$
|
|
2514
|
+
var parsed = parse$1(svg);
|
|
2561
2515
|
|
|
2562
2516
|
// clear element contents
|
|
2563
|
-
clear$
|
|
2517
|
+
clear$1(element);
|
|
2564
2518
|
|
|
2565
2519
|
if (!svg) {
|
|
2566
2520
|
return;
|
|
@@ -2571,11 +2525,11 @@
|
|
|
2571
2525
|
parsed = parsed.documentElement;
|
|
2572
2526
|
}
|
|
2573
2527
|
|
|
2574
|
-
var nodes = slice(parsed.childNodes);
|
|
2528
|
+
var nodes = slice$1(parsed.childNodes);
|
|
2575
2529
|
|
|
2576
2530
|
// import + append each node
|
|
2577
2531
|
for (var i = 0; i < nodes.length; i++) {
|
|
2578
|
-
appendTo
|
|
2532
|
+
appendTo(nodes[i], element);
|
|
2579
2533
|
}
|
|
2580
2534
|
|
|
2581
2535
|
}
|
|
@@ -2613,7 +2567,7 @@
|
|
|
2613
2567
|
}
|
|
2614
2568
|
|
|
2615
2569
|
|
|
2616
|
-
function slice(arr) {
|
|
2570
|
+
function slice$1(arr) {
|
|
2617
2571
|
return Array.prototype.slice.call(arr);
|
|
2618
2572
|
}
|
|
2619
2573
|
|
|
@@ -2624,7 +2578,7 @@
|
|
|
2624
2578
|
* @param {number} angle
|
|
2625
2579
|
* @param {number} amount
|
|
2626
2580
|
*/
|
|
2627
|
-
function transform
|
|
2581
|
+
function transform(gfx, x, y, angle, amount) {
|
|
2628
2582
|
var translate = createTransform();
|
|
2629
2583
|
translate.setTranslate(x, y);
|
|
2630
2584
|
|
|
@@ -2634,7 +2588,7 @@
|
|
|
2634
2588
|
var scale = createTransform();
|
|
2635
2589
|
scale.setScale(amount || 1, amount || 1);
|
|
2636
2590
|
|
|
2637
|
-
transform(gfx, [ translate, rotate, scale ]);
|
|
2591
|
+
transform$1(gfx, [ translate, rotate, scale ]);
|
|
2638
2592
|
}
|
|
2639
2593
|
|
|
2640
2594
|
|
|
@@ -2643,11 +2597,11 @@
|
|
|
2643
2597
|
* @param {number} x
|
|
2644
2598
|
* @param {number} y
|
|
2645
2599
|
*/
|
|
2646
|
-
function translate(gfx, x, y) {
|
|
2600
|
+
function translate$1(gfx, x, y) {
|
|
2647
2601
|
var translate = createTransform();
|
|
2648
2602
|
translate.setTranslate(x, y);
|
|
2649
2603
|
|
|
2650
|
-
transform(gfx, translate);
|
|
2604
|
+
transform$1(gfx, translate);
|
|
2651
2605
|
}
|
|
2652
2606
|
|
|
2653
2607
|
|
|
@@ -2659,7 +2613,7 @@
|
|
|
2659
2613
|
var rotate = createTransform();
|
|
2660
2614
|
rotate.setRotate(angle, 0, 0);
|
|
2661
2615
|
|
|
2662
|
-
transform(gfx, rotate);
|
|
2616
|
+
transform$1(gfx, rotate);
|
|
2663
2617
|
}
|
|
2664
2618
|
|
|
2665
2619
|
function createCommonjsModule(fn, module) {
|
|
@@ -2871,11 +2825,11 @@
|
|
|
2871
2825
|
|
|
2872
2826
|
var marker = create$1('marker');
|
|
2873
2827
|
|
|
2874
|
-
attr$
|
|
2828
|
+
attr$1(options.element, attrs);
|
|
2875
2829
|
|
|
2876
|
-
append
|
|
2830
|
+
append(marker, options.element);
|
|
2877
2831
|
|
|
2878
|
-
attr$
|
|
2832
|
+
attr$1(marker, {
|
|
2879
2833
|
id: id,
|
|
2880
2834
|
viewBox: '0 0 20 20',
|
|
2881
2835
|
refX: ref.x,
|
|
@@ -2885,15 +2839,15 @@
|
|
|
2885
2839
|
orient: 'auto'
|
|
2886
2840
|
});
|
|
2887
2841
|
|
|
2888
|
-
var defs = query('defs', canvas._svg);
|
|
2842
|
+
var defs = query$1('defs', canvas._svg);
|
|
2889
2843
|
|
|
2890
2844
|
if (!defs) {
|
|
2891
2845
|
defs = create$1('defs');
|
|
2892
2846
|
|
|
2893
|
-
append
|
|
2847
|
+
append(canvas._svg, defs);
|
|
2894
2848
|
}
|
|
2895
2849
|
|
|
2896
|
-
append
|
|
2850
|
+
append(defs, marker);
|
|
2897
2851
|
|
|
2898
2852
|
markers[id] = marker;
|
|
2899
2853
|
}
|
|
@@ -2918,7 +2872,7 @@
|
|
|
2918
2872
|
|
|
2919
2873
|
if (type === 'sequenceflow-end') {
|
|
2920
2874
|
var sequenceflowEnd = create$1('path');
|
|
2921
|
-
attr$
|
|
2875
|
+
attr$1(sequenceflowEnd, { d: 'M 1 5 L 11 10 L 1 15 Z' });
|
|
2922
2876
|
|
|
2923
2877
|
addMarker(id, {
|
|
2924
2878
|
element: sequenceflowEnd,
|
|
@@ -2933,7 +2887,7 @@
|
|
|
2933
2887
|
|
|
2934
2888
|
if (type === 'messageflow-start') {
|
|
2935
2889
|
var messageflowStart = create$1('circle');
|
|
2936
|
-
attr$
|
|
2890
|
+
attr$1(messageflowStart, { cx: 6, cy: 6, r: 3.5 });
|
|
2937
2891
|
|
|
2938
2892
|
addMarker(id, {
|
|
2939
2893
|
element: messageflowStart,
|
|
@@ -2947,7 +2901,7 @@
|
|
|
2947
2901
|
|
|
2948
2902
|
if (type === 'messageflow-end') {
|
|
2949
2903
|
var messageflowEnd = create$1('path');
|
|
2950
|
-
attr$
|
|
2904
|
+
attr$1(messageflowEnd, { d: 'm 1 5 l 0 -3 l 7 3 l -7 3 z' });
|
|
2951
2905
|
|
|
2952
2906
|
addMarker(id, {
|
|
2953
2907
|
element: messageflowEnd,
|
|
@@ -2962,7 +2916,7 @@
|
|
|
2962
2916
|
|
|
2963
2917
|
if (type === 'association-start') {
|
|
2964
2918
|
var associationStart = create$1('path');
|
|
2965
|
-
attr$
|
|
2919
|
+
attr$1(associationStart, { d: 'M 11 5 L 1 10 L 11 15' });
|
|
2966
2920
|
|
|
2967
2921
|
addMarker(id, {
|
|
2968
2922
|
element: associationStart,
|
|
@@ -2978,7 +2932,7 @@
|
|
|
2978
2932
|
|
|
2979
2933
|
if (type === 'association-end') {
|
|
2980
2934
|
var associationEnd = create$1('path');
|
|
2981
|
-
attr$
|
|
2935
|
+
attr$1(associationEnd, { d: 'M 1 5 L 11 10 L 1 15' });
|
|
2982
2936
|
|
|
2983
2937
|
addMarker(id, {
|
|
2984
2938
|
element: associationEnd,
|
|
@@ -2994,7 +2948,7 @@
|
|
|
2994
2948
|
|
|
2995
2949
|
if (type === 'conditional-flow-marker') {
|
|
2996
2950
|
var conditionalflowMarker = create$1('path');
|
|
2997
|
-
attr$
|
|
2951
|
+
attr$1(conditionalflowMarker, { d: 'M 0 10 L 8 6 L 16 10 L 8 14 Z' });
|
|
2998
2952
|
|
|
2999
2953
|
addMarker(id, {
|
|
3000
2954
|
element: conditionalflowMarker,
|
|
@@ -3009,7 +2963,7 @@
|
|
|
3009
2963
|
|
|
3010
2964
|
if (type === 'conditional-default-flow-marker') {
|
|
3011
2965
|
var conditionaldefaultflowMarker = create$1('path');
|
|
3012
|
-
attr$
|
|
2966
|
+
attr$1(conditionaldefaultflowMarker, { d: 'M 6 4 L 10 16' });
|
|
3013
2967
|
|
|
3014
2968
|
addMarker(id, {
|
|
3015
2969
|
element: conditionaldefaultflowMarker,
|
|
@@ -3045,14 +2999,14 @@
|
|
|
3045
2999
|
cy = height / 2;
|
|
3046
3000
|
|
|
3047
3001
|
var circle = create$1('circle');
|
|
3048
|
-
attr$
|
|
3002
|
+
attr$1(circle, {
|
|
3049
3003
|
cx: cx,
|
|
3050
3004
|
cy: cy,
|
|
3051
3005
|
r: Math.round((width + height) / 4 - offset)
|
|
3052
3006
|
});
|
|
3053
|
-
attr$
|
|
3007
|
+
attr$1(circle, attrs);
|
|
3054
3008
|
|
|
3055
|
-
append
|
|
3009
|
+
append(parentGfx, circle);
|
|
3056
3010
|
|
|
3057
3011
|
return circle;
|
|
3058
3012
|
}
|
|
@@ -3073,7 +3027,7 @@
|
|
|
3073
3027
|
});
|
|
3074
3028
|
|
|
3075
3029
|
var rect = create$1('rect');
|
|
3076
|
-
attr$
|
|
3030
|
+
attr$1(rect, {
|
|
3077
3031
|
x: offset,
|
|
3078
3032
|
y: offset,
|
|
3079
3033
|
width: width - offset * 2,
|
|
@@ -3081,9 +3035,9 @@
|
|
|
3081
3035
|
rx: r,
|
|
3082
3036
|
ry: r
|
|
3083
3037
|
});
|
|
3084
|
-
attr$
|
|
3038
|
+
attr$1(rect, attrs);
|
|
3085
3039
|
|
|
3086
|
-
append
|
|
3040
|
+
append(parentGfx, rect);
|
|
3087
3041
|
|
|
3088
3042
|
return rect;
|
|
3089
3043
|
}
|
|
@@ -3106,12 +3060,12 @@
|
|
|
3106
3060
|
});
|
|
3107
3061
|
|
|
3108
3062
|
var polygon = create$1('polygon');
|
|
3109
|
-
attr$
|
|
3063
|
+
attr$1(polygon, {
|
|
3110
3064
|
points: pointsString
|
|
3111
3065
|
});
|
|
3112
|
-
attr$
|
|
3066
|
+
attr$1(polygon, attrs);
|
|
3113
3067
|
|
|
3114
|
-
append
|
|
3068
|
+
append(parentGfx, polygon);
|
|
3115
3069
|
|
|
3116
3070
|
return polygon;
|
|
3117
3071
|
}
|
|
@@ -3125,7 +3079,7 @@
|
|
|
3125
3079
|
|
|
3126
3080
|
var line = createLine(waypoints, attrs);
|
|
3127
3081
|
|
|
3128
|
-
append
|
|
3082
|
+
append(parentGfx, line);
|
|
3129
3083
|
|
|
3130
3084
|
return line;
|
|
3131
3085
|
}
|
|
@@ -3138,10 +3092,10 @@
|
|
|
3138
3092
|
});
|
|
3139
3093
|
|
|
3140
3094
|
var path = create$1('path');
|
|
3141
|
-
attr$
|
|
3142
|
-
attr$
|
|
3095
|
+
attr$1(path, { d: d });
|
|
3096
|
+
attr$1(path, attrs);
|
|
3143
3097
|
|
|
3144
|
-
append
|
|
3098
|
+
append(parentGfx, path);
|
|
3145
3099
|
|
|
3146
3100
|
return path;
|
|
3147
3101
|
}
|
|
@@ -3227,9 +3181,9 @@
|
|
|
3227
3181
|
|
|
3228
3182
|
var text = textRenderer.createText(label || '', options);
|
|
3229
3183
|
|
|
3230
|
-
classes$
|
|
3184
|
+
classes$1(text).add('djs-label');
|
|
3231
3185
|
|
|
3232
|
-
append
|
|
3186
|
+
append(parentGfx, text);
|
|
3233
3187
|
|
|
3234
3188
|
return text;
|
|
3235
3189
|
}
|
|
@@ -3283,7 +3237,7 @@
|
|
|
3283
3237
|
|
|
3284
3238
|
var top = -1 * element.height;
|
|
3285
3239
|
|
|
3286
|
-
transform
|
|
3240
|
+
transform(textBox, 0, -top, 270);
|
|
3287
3241
|
}
|
|
3288
3242
|
|
|
3289
3243
|
function createPathFromConnection(connection) {
|
|
@@ -3839,7 +3793,7 @@
|
|
|
3839
3793
|
});
|
|
3840
3794
|
|
|
3841
3795
|
var businessHeaderPath = drawPath(parentGfx, headerPathData);
|
|
3842
|
-
attr$
|
|
3796
|
+
attr$1(businessHeaderPath, {
|
|
3843
3797
|
strokeWidth: 1,
|
|
3844
3798
|
fill: getFillColor(element, '#aaaaaa'),
|
|
3845
3799
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
@@ -3853,7 +3807,7 @@
|
|
|
3853
3807
|
});
|
|
3854
3808
|
|
|
3855
3809
|
var businessPath = drawPath(parentGfx, headerData);
|
|
3856
|
-
attr$
|
|
3810
|
+
attr$1(businessPath, {
|
|
3857
3811
|
strokeWidth: 1,
|
|
3858
3812
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
3859
3813
|
});
|
|
@@ -3871,7 +3825,7 @@
|
|
|
3871
3825
|
var expanded = isExpanded(element);
|
|
3872
3826
|
|
|
3873
3827
|
if (isEventSubProcess(element)) {
|
|
3874
|
-
attr$
|
|
3828
|
+
attr$1(rect, {
|
|
3875
3829
|
strokeDasharray: '1,2'
|
|
3876
3830
|
});
|
|
3877
3831
|
}
|
|
@@ -4093,7 +4047,7 @@
|
|
|
4093
4047
|
});
|
|
4094
4048
|
|
|
4095
4049
|
var parallelPath = drawPath(parentGfx, pathData);
|
|
4096
|
-
attr$
|
|
4050
|
+
attr$1(parallelPath, {
|
|
4097
4051
|
strokeWidth: 1,
|
|
4098
4052
|
fill: 'none'
|
|
4099
4053
|
});
|
|
@@ -4101,7 +4055,7 @@
|
|
|
4101
4055
|
|
|
4102
4056
|
if (!instantiate) {
|
|
4103
4057
|
var innerCircle = drawCircle(parentGfx, element.width, element.height, element.height * 0.26);
|
|
4104
|
-
attr$
|
|
4058
|
+
attr$1(innerCircle, {
|
|
4105
4059
|
strokeWidth: 1,
|
|
4106
4060
|
fill: 'none',
|
|
4107
4061
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
@@ -4146,7 +4100,7 @@
|
|
|
4146
4100
|
|
|
4147
4101
|
// conditional flow marker
|
|
4148
4102
|
if (sequenceFlow.conditionExpression && source.$instanceOf('bpmn:Activity')) {
|
|
4149
|
-
attr$
|
|
4103
|
+
attr$1(path, {
|
|
4150
4104
|
markerStart: marker('conditional-flow-marker', fill, stroke)
|
|
4151
4105
|
});
|
|
4152
4106
|
}
|
|
@@ -4154,7 +4108,7 @@
|
|
|
4154
4108
|
// default marker
|
|
4155
4109
|
if (source.default && (source.$instanceOf('bpmn:Gateway') || source.$instanceOf('bpmn:Activity')) &&
|
|
4156
4110
|
source.default === sequenceFlow) {
|
|
4157
|
-
attr$
|
|
4111
|
+
attr$1(path, {
|
|
4158
4112
|
markerStart: marker('conditional-default-flow-marker', fill, stroke)
|
|
4159
4113
|
});
|
|
4160
4114
|
}
|
|
@@ -4262,7 +4216,7 @@
|
|
|
4262
4216
|
var translateX = midPoint.x - labelBounds.width / 2,
|
|
4263
4217
|
translateY = midPoint.y + messageBounds.height / 2 + ELEMENT_LABEL_DISTANCE;
|
|
4264
4218
|
|
|
4265
|
-
transform
|
|
4219
|
+
transform(label, translateX, translateY, 0);
|
|
4266
4220
|
|
|
4267
4221
|
}
|
|
4268
4222
|
|
|
@@ -4451,7 +4405,7 @@
|
|
|
4451
4405
|
|
|
4452
4406
|
// Process marker is placed in the middle of the box
|
|
4453
4407
|
// therefore fixed values can be used here
|
|
4454
|
-
translate(markerRect, element.width / 2 - 7.5, element.height - 20);
|
|
4408
|
+
translate$1(markerRect, element.width / 2 - 7.5, element.height - 20);
|
|
4455
4409
|
|
|
4456
4410
|
var markerPath = pathMap.getScaledPath('MARKER_SUB_PROCESS', {
|
|
4457
4411
|
xScaleFactor: 1.5,
|
|
@@ -4585,7 +4539,7 @@
|
|
|
4585
4539
|
};
|
|
4586
4540
|
}
|
|
4587
4541
|
|
|
4588
|
-
forEach(taskMarkers, function(marker) {
|
|
4542
|
+
forEach$2(taskMarkers, function(marker) {
|
|
4589
4543
|
renderer(marker)(parentGfx, element, position);
|
|
4590
4544
|
});
|
|
4591
4545
|
|
|
@@ -4606,96 +4560,704 @@
|
|
|
4606
4560
|
renderer('LoopMarker')(parentGfx, element, position);
|
|
4607
4561
|
}
|
|
4608
4562
|
|
|
4609
|
-
if (isSequential === false) {
|
|
4610
|
-
renderer('ParallelMarker')(parentGfx, element, position);
|
|
4611
|
-
}
|
|
4563
|
+
if (isSequential === false) {
|
|
4564
|
+
renderer('ParallelMarker')(parentGfx, element, position);
|
|
4565
|
+
}
|
|
4566
|
+
|
|
4567
|
+
if (isSequential === true) {
|
|
4568
|
+
renderer('SequentialMarker')(parentGfx, element, position);
|
|
4569
|
+
}
|
|
4570
|
+
}
|
|
4571
|
+
}
|
|
4572
|
+
|
|
4573
|
+
function renderDataItemCollection(parentGfx, element) {
|
|
4574
|
+
|
|
4575
|
+
var yPosition = (element.height - 18) / element.height;
|
|
4576
|
+
|
|
4577
|
+
var pathData = pathMap.getScaledPath('DATA_OBJECT_COLLECTION_PATH', {
|
|
4578
|
+
xScaleFactor: 1,
|
|
4579
|
+
yScaleFactor: 1,
|
|
4580
|
+
containerWidth: element.width,
|
|
4581
|
+
containerHeight: element.height,
|
|
4582
|
+
position: {
|
|
4583
|
+
mx: 0.33,
|
|
4584
|
+
my: yPosition
|
|
4585
|
+
}
|
|
4586
|
+
});
|
|
4587
|
+
|
|
4588
|
+
/* collection path */ drawPath(parentGfx, pathData, {
|
|
4589
|
+
strokeWidth: 2
|
|
4590
|
+
});
|
|
4591
|
+
}
|
|
4592
|
+
|
|
4593
|
+
|
|
4594
|
+
// extension API, use at your own risk
|
|
4595
|
+
this._drawPath = drawPath;
|
|
4596
|
+
|
|
4597
|
+
this._renderer = renderer;
|
|
4598
|
+
}
|
|
4599
|
+
|
|
4600
|
+
|
|
4601
|
+
e(BpmnRenderer, BaseRenderer);
|
|
4602
|
+
|
|
4603
|
+
BpmnRenderer.$inject = [
|
|
4604
|
+
'config.bpmnRenderer',
|
|
4605
|
+
'eventBus',
|
|
4606
|
+
'styles',
|
|
4607
|
+
'pathMap',
|
|
4608
|
+
'canvas',
|
|
4609
|
+
'textRenderer'
|
|
4610
|
+
];
|
|
4611
|
+
|
|
4612
|
+
|
|
4613
|
+
BpmnRenderer.prototype.canRender = function(element) {
|
|
4614
|
+
return is$1(element, 'bpmn:BaseElement');
|
|
4615
|
+
};
|
|
4616
|
+
|
|
4617
|
+
BpmnRenderer.prototype.drawShape = function(parentGfx, element) {
|
|
4618
|
+
var type = element.type;
|
|
4619
|
+
var h = this._renderer(type);
|
|
4620
|
+
|
|
4621
|
+
/* jshint -W040 */
|
|
4622
|
+
return h(parentGfx, element);
|
|
4623
|
+
};
|
|
4624
|
+
|
|
4625
|
+
BpmnRenderer.prototype.drawConnection = function(parentGfx, element) {
|
|
4626
|
+
var type = element.type;
|
|
4627
|
+
var h = this._renderer(type);
|
|
4628
|
+
|
|
4629
|
+
/* jshint -W040 */
|
|
4630
|
+
return h(parentGfx, element);
|
|
4631
|
+
};
|
|
4632
|
+
|
|
4633
|
+
BpmnRenderer.prototype.getShapePath = function(element) {
|
|
4634
|
+
|
|
4635
|
+
if (is$1(element, 'bpmn:Event')) {
|
|
4636
|
+
return getCirclePath(element);
|
|
4637
|
+
}
|
|
4638
|
+
|
|
4639
|
+
if (is$1(element, 'bpmn:Activity')) {
|
|
4640
|
+
return getRoundRectPath(element, TASK_BORDER_RADIUS);
|
|
4641
|
+
}
|
|
4642
|
+
|
|
4643
|
+
if (is$1(element, 'bpmn:Gateway')) {
|
|
4644
|
+
return getDiamondPath(element);
|
|
4645
|
+
}
|
|
4646
|
+
|
|
4647
|
+
return getRectPath(element);
|
|
4648
|
+
};
|
|
4649
|
+
|
|
4650
|
+
/**
|
|
4651
|
+
* Flatten array, one level deep.
|
|
4652
|
+
*
|
|
4653
|
+
* @param {Array<?>} arr
|
|
4654
|
+
*
|
|
4655
|
+
* @return {Array<?>}
|
|
4656
|
+
*/
|
|
4657
|
+
|
|
4658
|
+
var nativeToString = Object.prototype.toString;
|
|
4659
|
+
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4660
|
+
function isUndefined$1(obj) {
|
|
4661
|
+
return obj === undefined;
|
|
4662
|
+
}
|
|
4663
|
+
function isArray$1(obj) {
|
|
4664
|
+
return nativeToString.call(obj) === '[object Array]';
|
|
4665
|
+
}
|
|
4666
|
+
/**
|
|
4667
|
+
* Return true, if target owns a property with the given key.
|
|
4668
|
+
*
|
|
4669
|
+
* @param {Object} target
|
|
4670
|
+
* @param {String} key
|
|
4671
|
+
*
|
|
4672
|
+
* @return {Boolean}
|
|
4673
|
+
*/
|
|
4674
|
+
|
|
4675
|
+
function has(target, key) {
|
|
4676
|
+
return nativeHasOwnProperty.call(target, key);
|
|
4677
|
+
}
|
|
4678
|
+
/**
|
|
4679
|
+
* Iterate over collection; returning something
|
|
4680
|
+
* (non-undefined) will stop iteration.
|
|
4681
|
+
*
|
|
4682
|
+
* @param {Array|Object} collection
|
|
4683
|
+
* @param {Function} iterator
|
|
4684
|
+
*
|
|
4685
|
+
* @return {Object} return result that stopped the iteration
|
|
4686
|
+
*/
|
|
4687
|
+
|
|
4688
|
+
function forEach(collection, iterator) {
|
|
4689
|
+
var val, result;
|
|
4690
|
+
|
|
4691
|
+
if (isUndefined$1(collection)) {
|
|
4692
|
+
return;
|
|
4693
|
+
}
|
|
4694
|
+
|
|
4695
|
+
var convertKey = isArray$1(collection) ? toNum : identity;
|
|
4696
|
+
|
|
4697
|
+
for (var key in collection) {
|
|
4698
|
+
if (has(collection, key)) {
|
|
4699
|
+
val = collection[key];
|
|
4700
|
+
result = iterator(val, convertKey(key));
|
|
4701
|
+
|
|
4702
|
+
if (result === false) {
|
|
4703
|
+
return val;
|
|
4704
|
+
}
|
|
4705
|
+
}
|
|
4706
|
+
}
|
|
4707
|
+
}
|
|
4708
|
+
|
|
4709
|
+
function identity(arg) {
|
|
4710
|
+
return arg;
|
|
4711
|
+
}
|
|
4712
|
+
|
|
4713
|
+
function toNum(arg) {
|
|
4714
|
+
return Number(arg);
|
|
4715
|
+
}
|
|
4716
|
+
|
|
4717
|
+
/**
|
|
4718
|
+
* Assigns style attributes in a style-src compliant way.
|
|
4719
|
+
*
|
|
4720
|
+
* @param {Element} element
|
|
4721
|
+
* @param {...Object} styleSources
|
|
4722
|
+
*
|
|
4723
|
+
* @return {Element} the element
|
|
4724
|
+
*/
|
|
4725
|
+
function assign$1(element) {
|
|
4726
|
+
var target = element.style;
|
|
4727
|
+
|
|
4728
|
+
for (var _len = arguments.length, styleSources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
4729
|
+
styleSources[_key - 1] = arguments[_key];
|
|
4730
|
+
}
|
|
4731
|
+
|
|
4732
|
+
forEach(styleSources, function (style) {
|
|
4733
|
+
if (!style) {
|
|
4734
|
+
return;
|
|
4735
|
+
}
|
|
4736
|
+
|
|
4737
|
+
forEach(style, function (value, key) {
|
|
4738
|
+
target[key] = value;
|
|
4739
|
+
});
|
|
4740
|
+
});
|
|
4741
|
+
|
|
4742
|
+
return element;
|
|
4743
|
+
}
|
|
4744
|
+
|
|
4745
|
+
/**
|
|
4746
|
+
* Set attribute `name` to `val`, or get attr `name`.
|
|
4747
|
+
*
|
|
4748
|
+
* @param {Element} el
|
|
4749
|
+
* @param {String} name
|
|
4750
|
+
* @param {String} [val]
|
|
4751
|
+
* @api public
|
|
4752
|
+
*/
|
|
4753
|
+
function attr(el, name, val) {
|
|
4754
|
+
// get
|
|
4755
|
+
if (arguments.length == 2) {
|
|
4756
|
+
return el.getAttribute(name);
|
|
4757
|
+
}
|
|
4758
|
+
|
|
4759
|
+
// remove
|
|
4760
|
+
if (val === null) {
|
|
4761
|
+
return el.removeAttribute(name);
|
|
4762
|
+
}
|
|
4763
|
+
|
|
4764
|
+
// set
|
|
4765
|
+
el.setAttribute(name, val);
|
|
4766
|
+
|
|
4767
|
+
return el;
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
var indexOf = [].indexOf;
|
|
4771
|
+
|
|
4772
|
+
var indexof = function(arr, obj){
|
|
4773
|
+
if (indexOf) return arr.indexOf(obj);
|
|
4774
|
+
for (var i = 0; i < arr.length; ++i) {
|
|
4775
|
+
if (arr[i] === obj) return i;
|
|
4776
|
+
}
|
|
4777
|
+
return -1;
|
|
4778
|
+
};
|
|
4779
|
+
|
|
4780
|
+
/**
|
|
4781
|
+
* Taken from https://github.com/component/classes
|
|
4782
|
+
*
|
|
4783
|
+
* Without the component bits.
|
|
4784
|
+
*/
|
|
4785
|
+
|
|
4786
|
+
/**
|
|
4787
|
+
* Whitespace regexp.
|
|
4788
|
+
*/
|
|
4789
|
+
|
|
4790
|
+
var re = /\s+/;
|
|
4791
|
+
|
|
4792
|
+
/**
|
|
4793
|
+
* toString reference.
|
|
4794
|
+
*/
|
|
4795
|
+
|
|
4796
|
+
var toString = Object.prototype.toString;
|
|
4797
|
+
|
|
4798
|
+
/**
|
|
4799
|
+
* Wrap `el` in a `ClassList`.
|
|
4800
|
+
*
|
|
4801
|
+
* @param {Element} el
|
|
4802
|
+
* @return {ClassList}
|
|
4803
|
+
* @api public
|
|
4804
|
+
*/
|
|
4805
|
+
|
|
4806
|
+
function classes(el) {
|
|
4807
|
+
return new ClassList(el);
|
|
4808
|
+
}
|
|
4809
|
+
|
|
4810
|
+
/**
|
|
4811
|
+
* Initialize a new ClassList for `el`.
|
|
4812
|
+
*
|
|
4813
|
+
* @param {Element} el
|
|
4814
|
+
* @api private
|
|
4815
|
+
*/
|
|
4816
|
+
|
|
4817
|
+
function ClassList(el) {
|
|
4818
|
+
if (!el || !el.nodeType) {
|
|
4819
|
+
throw new Error('A DOM element reference is required');
|
|
4820
|
+
}
|
|
4821
|
+
this.el = el;
|
|
4822
|
+
this.list = el.classList;
|
|
4823
|
+
}
|
|
4824
|
+
|
|
4825
|
+
/**
|
|
4826
|
+
* Add class `name` if not already present.
|
|
4827
|
+
*
|
|
4828
|
+
* @param {String} name
|
|
4829
|
+
* @return {ClassList}
|
|
4830
|
+
* @api public
|
|
4831
|
+
*/
|
|
4832
|
+
|
|
4833
|
+
ClassList.prototype.add = function (name) {
|
|
4834
|
+
// classList
|
|
4835
|
+
if (this.list) {
|
|
4836
|
+
this.list.add(name);
|
|
4837
|
+
return this;
|
|
4838
|
+
}
|
|
4839
|
+
|
|
4840
|
+
// fallback
|
|
4841
|
+
var arr = this.array();
|
|
4842
|
+
var i = indexof(arr, name);
|
|
4843
|
+
if (!~i) arr.push(name);
|
|
4844
|
+
this.el.className = arr.join(' ');
|
|
4845
|
+
return this;
|
|
4846
|
+
};
|
|
4847
|
+
|
|
4848
|
+
/**
|
|
4849
|
+
* Remove class `name` when present, or
|
|
4850
|
+
* pass a regular expression to remove
|
|
4851
|
+
* any which match.
|
|
4852
|
+
*
|
|
4853
|
+
* @param {String|RegExp} name
|
|
4854
|
+
* @return {ClassList}
|
|
4855
|
+
* @api public
|
|
4856
|
+
*/
|
|
4857
|
+
|
|
4858
|
+
ClassList.prototype.remove = function (name) {
|
|
4859
|
+
if ('[object RegExp]' == toString.call(name)) {
|
|
4860
|
+
return this.removeMatching(name);
|
|
4861
|
+
}
|
|
4862
|
+
|
|
4863
|
+
// classList
|
|
4864
|
+
if (this.list) {
|
|
4865
|
+
this.list.remove(name);
|
|
4866
|
+
return this;
|
|
4867
|
+
}
|
|
4868
|
+
|
|
4869
|
+
// fallback
|
|
4870
|
+
var arr = this.array();
|
|
4871
|
+
var i = indexof(arr, name);
|
|
4872
|
+
if (~i) arr.splice(i, 1);
|
|
4873
|
+
this.el.className = arr.join(' ');
|
|
4874
|
+
return this;
|
|
4875
|
+
};
|
|
4876
|
+
|
|
4877
|
+
/**
|
|
4878
|
+
* Remove all classes matching `re`.
|
|
4879
|
+
*
|
|
4880
|
+
* @param {RegExp} re
|
|
4881
|
+
* @return {ClassList}
|
|
4882
|
+
* @api private
|
|
4883
|
+
*/
|
|
4884
|
+
|
|
4885
|
+
ClassList.prototype.removeMatching = function (re) {
|
|
4886
|
+
var arr = this.array();
|
|
4887
|
+
for (var i = 0; i < arr.length; i++) {
|
|
4888
|
+
if (re.test(arr[i])) {
|
|
4889
|
+
this.remove(arr[i]);
|
|
4890
|
+
}
|
|
4891
|
+
}
|
|
4892
|
+
return this;
|
|
4893
|
+
};
|
|
4894
|
+
|
|
4895
|
+
/**
|
|
4896
|
+
* Toggle class `name`, can force state via `force`.
|
|
4897
|
+
*
|
|
4898
|
+
* For browsers that support classList, but do not support `force` yet,
|
|
4899
|
+
* the mistake will be detected and corrected.
|
|
4900
|
+
*
|
|
4901
|
+
* @param {String} name
|
|
4902
|
+
* @param {Boolean} force
|
|
4903
|
+
* @return {ClassList}
|
|
4904
|
+
* @api public
|
|
4905
|
+
*/
|
|
4906
|
+
|
|
4907
|
+
ClassList.prototype.toggle = function (name, force) {
|
|
4908
|
+
// classList
|
|
4909
|
+
if (this.list) {
|
|
4910
|
+
if ('undefined' !== typeof force) {
|
|
4911
|
+
if (force !== this.list.toggle(name, force)) {
|
|
4912
|
+
this.list.toggle(name); // toggle again to correct
|
|
4913
|
+
}
|
|
4914
|
+
} else {
|
|
4915
|
+
this.list.toggle(name);
|
|
4916
|
+
}
|
|
4917
|
+
return this;
|
|
4918
|
+
}
|
|
4919
|
+
|
|
4920
|
+
// fallback
|
|
4921
|
+
if ('undefined' !== typeof force) {
|
|
4922
|
+
if (!force) {
|
|
4923
|
+
this.remove(name);
|
|
4924
|
+
} else {
|
|
4925
|
+
this.add(name);
|
|
4926
|
+
}
|
|
4927
|
+
} else {
|
|
4928
|
+
if (this.has(name)) {
|
|
4929
|
+
this.remove(name);
|
|
4930
|
+
} else {
|
|
4931
|
+
this.add(name);
|
|
4932
|
+
}
|
|
4933
|
+
}
|
|
4934
|
+
|
|
4935
|
+
return this;
|
|
4936
|
+
};
|
|
4937
|
+
|
|
4938
|
+
/**
|
|
4939
|
+
* Return an array of classes.
|
|
4940
|
+
*
|
|
4941
|
+
* @return {Array}
|
|
4942
|
+
* @api public
|
|
4943
|
+
*/
|
|
4944
|
+
|
|
4945
|
+
ClassList.prototype.array = function () {
|
|
4946
|
+
var className = this.el.getAttribute('class') || '';
|
|
4947
|
+
var str = className.replace(/^\s+|\s+$/g, '');
|
|
4948
|
+
var arr = str.split(re);
|
|
4949
|
+
if ('' === arr[0]) arr.shift();
|
|
4950
|
+
return arr;
|
|
4951
|
+
};
|
|
4952
|
+
|
|
4953
|
+
/**
|
|
4954
|
+
* Check if class `name` is present.
|
|
4955
|
+
*
|
|
4956
|
+
* @param {String} name
|
|
4957
|
+
* @return {ClassList}
|
|
4958
|
+
* @api public
|
|
4959
|
+
*/
|
|
4960
|
+
|
|
4961
|
+
ClassList.prototype.has = ClassList.prototype.contains = function (name) {
|
|
4962
|
+
return this.list ? this.list.contains(name) : !!~indexof(this.array(), name);
|
|
4963
|
+
};
|
|
4964
|
+
|
|
4965
|
+
/**
|
|
4966
|
+
* Remove all children from the given element.
|
|
4967
|
+
*/
|
|
4968
|
+
function clear(el) {
|
|
4969
|
+
|
|
4970
|
+
var c;
|
|
4971
|
+
|
|
4972
|
+
while (el.childNodes.length) {
|
|
4973
|
+
c = el.childNodes[0];
|
|
4974
|
+
el.removeChild(c);
|
|
4975
|
+
}
|
|
4976
|
+
|
|
4977
|
+
return el;
|
|
4978
|
+
}
|
|
4979
|
+
|
|
4980
|
+
var proto = typeof Element !== 'undefined' ? Element.prototype : {};
|
|
4981
|
+
var vendor = proto.matches
|
|
4982
|
+
|| proto.matchesSelector
|
|
4983
|
+
|| proto.webkitMatchesSelector
|
|
4984
|
+
|| proto.mozMatchesSelector
|
|
4985
|
+
|| proto.msMatchesSelector
|
|
4986
|
+
|| proto.oMatchesSelector;
|
|
4987
|
+
|
|
4988
|
+
var matchesSelector = match;
|
|
4989
|
+
|
|
4990
|
+
/**
|
|
4991
|
+
* Match `el` to `selector`.
|
|
4992
|
+
*
|
|
4993
|
+
* @param {Element} el
|
|
4994
|
+
* @param {String} selector
|
|
4995
|
+
* @return {Boolean}
|
|
4996
|
+
* @api public
|
|
4997
|
+
*/
|
|
4998
|
+
|
|
4999
|
+
function match(el, selector) {
|
|
5000
|
+
if (!el || el.nodeType !== 1) return false;
|
|
5001
|
+
if (vendor) return vendor.call(el, selector);
|
|
5002
|
+
var nodes = el.parentNode.querySelectorAll(selector);
|
|
5003
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
5004
|
+
if (nodes[i] == el) return true;
|
|
5005
|
+
}
|
|
5006
|
+
return false;
|
|
5007
|
+
}
|
|
5008
|
+
|
|
5009
|
+
/**
|
|
5010
|
+
* Closest
|
|
5011
|
+
*
|
|
5012
|
+
* @param {Element} el
|
|
5013
|
+
* @param {String} selector
|
|
5014
|
+
* @param {Boolean} checkYourSelf (optional)
|
|
5015
|
+
*/
|
|
5016
|
+
function closest (element, selector, checkYourSelf) {
|
|
5017
|
+
var currentElem = checkYourSelf ? element : element.parentNode;
|
|
5018
|
+
|
|
5019
|
+
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE && currentElem.nodeType !== document.DOCUMENT_FRAGMENT_NODE) {
|
|
5020
|
+
|
|
5021
|
+
if (matchesSelector(currentElem, selector)) {
|
|
5022
|
+
return currentElem;
|
|
5023
|
+
}
|
|
5024
|
+
|
|
5025
|
+
currentElem = currentElem.parentNode;
|
|
5026
|
+
}
|
|
5027
|
+
|
|
5028
|
+
return matchesSelector(currentElem, selector) ? currentElem : null;
|
|
5029
|
+
}
|
|
5030
|
+
|
|
5031
|
+
var bind$1 = window.addEventListener ? 'addEventListener' : 'attachEvent',
|
|
5032
|
+
unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
5033
|
+
prefix$6 = bind$1 !== 'addEventListener' ? 'on' : '';
|
|
5034
|
+
|
|
5035
|
+
/**
|
|
5036
|
+
* Bind `el` event `type` to `fn`.
|
|
5037
|
+
*
|
|
5038
|
+
* @param {Element} el
|
|
5039
|
+
* @param {String} type
|
|
5040
|
+
* @param {Function} fn
|
|
5041
|
+
* @param {Boolean} capture
|
|
5042
|
+
* @return {Function}
|
|
5043
|
+
* @api public
|
|
5044
|
+
*/
|
|
5045
|
+
|
|
5046
|
+
var bind_1 = function(el, type, fn, capture){
|
|
5047
|
+
el[bind$1](prefix$6 + type, fn, capture || false);
|
|
5048
|
+
return fn;
|
|
5049
|
+
};
|
|
5050
|
+
|
|
5051
|
+
/**
|
|
5052
|
+
* Unbind `el` event `type`'s callback `fn`.
|
|
5053
|
+
*
|
|
5054
|
+
* @param {Element} el
|
|
5055
|
+
* @param {String} type
|
|
5056
|
+
* @param {Function} fn
|
|
5057
|
+
* @param {Boolean} capture
|
|
5058
|
+
* @return {Function}
|
|
5059
|
+
* @api public
|
|
5060
|
+
*/
|
|
5061
|
+
|
|
5062
|
+
var unbind_1 = function(el, type, fn, capture){
|
|
5063
|
+
el[unbind](prefix$6 + type, fn, capture || false);
|
|
5064
|
+
return fn;
|
|
5065
|
+
};
|
|
5066
|
+
|
|
5067
|
+
var componentEvent = {
|
|
5068
|
+
bind: bind_1,
|
|
5069
|
+
unbind: unbind_1
|
|
5070
|
+
};
|
|
5071
|
+
|
|
5072
|
+
/**
|
|
5073
|
+
* Module dependencies.
|
|
5074
|
+
*/
|
|
5075
|
+
|
|
5076
|
+
/**
|
|
5077
|
+
* Delegate event `type` to `selector`
|
|
5078
|
+
* and invoke `fn(e)`. A callback function
|
|
5079
|
+
* is returned which may be passed to `.unbind()`.
|
|
5080
|
+
*
|
|
5081
|
+
* @param {Element} el
|
|
5082
|
+
* @param {String} selector
|
|
5083
|
+
* @param {String} type
|
|
5084
|
+
* @param {Function} fn
|
|
5085
|
+
* @param {Boolean} capture
|
|
5086
|
+
* @return {Function}
|
|
5087
|
+
* @api public
|
|
5088
|
+
*/
|
|
5089
|
+
|
|
5090
|
+
// Some events don't bubble, so we want to bind to the capture phase instead
|
|
5091
|
+
// when delegating.
|
|
5092
|
+
var forceCaptureEvents = ['focus', 'blur'];
|
|
5093
|
+
|
|
5094
|
+
function bind$2(el, selector, type, fn, capture) {
|
|
5095
|
+
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
5096
|
+
capture = true;
|
|
5097
|
+
}
|
|
4612
5098
|
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
5099
|
+
return componentEvent.bind(el, type, function (e) {
|
|
5100
|
+
var target = e.target || e.srcElement;
|
|
5101
|
+
e.delegateTarget = closest(target, selector, true);
|
|
5102
|
+
if (e.delegateTarget) {
|
|
5103
|
+
fn.call(el, e);
|
|
4616
5104
|
}
|
|
4617
|
-
}
|
|
5105
|
+
}, capture);
|
|
5106
|
+
}
|
|
4618
5107
|
|
|
4619
|
-
|
|
5108
|
+
/**
|
|
5109
|
+
* Unbind event `type`'s callback `fn`.
|
|
5110
|
+
*
|
|
5111
|
+
* @param {Element} el
|
|
5112
|
+
* @param {String} type
|
|
5113
|
+
* @param {Function} fn
|
|
5114
|
+
* @param {Boolean} capture
|
|
5115
|
+
* @api public
|
|
5116
|
+
*/
|
|
5117
|
+
function unbind$1(el, type, fn, capture) {
|
|
5118
|
+
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
5119
|
+
capture = true;
|
|
5120
|
+
}
|
|
4620
5121
|
|
|
4621
|
-
|
|
5122
|
+
return componentEvent.unbind(el, type, fn, capture);
|
|
5123
|
+
}
|
|
4622
5124
|
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
containerHeight: element.height,
|
|
4628
|
-
position: {
|
|
4629
|
-
mx: 0.33,
|
|
4630
|
-
my: yPosition
|
|
4631
|
-
}
|
|
4632
|
-
});
|
|
5125
|
+
var delegate = {
|
|
5126
|
+
bind: bind$2,
|
|
5127
|
+
unbind: unbind$1
|
|
5128
|
+
};
|
|
4633
5129
|
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
}
|
|
5130
|
+
/**
|
|
5131
|
+
* Expose `parse`.
|
|
5132
|
+
*/
|
|
4638
5133
|
|
|
5134
|
+
var domify = parse;
|
|
4639
5135
|
|
|
4640
|
-
|
|
4641
|
-
|
|
5136
|
+
/**
|
|
5137
|
+
* Tests for browser support.
|
|
5138
|
+
*/
|
|
4642
5139
|
|
|
4643
|
-
|
|
5140
|
+
var innerHTMLBug = false;
|
|
5141
|
+
var bugTestDiv;
|
|
5142
|
+
if (typeof document !== 'undefined') {
|
|
5143
|
+
bugTestDiv = document.createElement('div');
|
|
5144
|
+
// Setup
|
|
5145
|
+
bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
|
|
5146
|
+
// Make sure that link elements get serialized correctly by innerHTML
|
|
5147
|
+
// This requires a wrapper element in IE
|
|
5148
|
+
innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length;
|
|
5149
|
+
bugTestDiv = undefined;
|
|
4644
5150
|
}
|
|
4645
5151
|
|
|
5152
|
+
/**
|
|
5153
|
+
* Wrap map from jquery.
|
|
5154
|
+
*/
|
|
4646
5155
|
|
|
4647
|
-
|
|
5156
|
+
var map$1 = {
|
|
5157
|
+
legend: [1, '<fieldset>', '</fieldset>'],
|
|
5158
|
+
tr: [2, '<table><tbody>', '</tbody></table>'],
|
|
5159
|
+
col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
|
5160
|
+
// for script/link/style tags to work in IE6-8, you have to wrap
|
|
5161
|
+
// in a div with a non-whitespace character in front, ha!
|
|
5162
|
+
_default: innerHTMLBug ? [1, 'X<div>', '</div>'] : [0, '', '']
|
|
5163
|
+
};
|
|
4648
5164
|
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
'eventBus',
|
|
4652
|
-
'styles',
|
|
4653
|
-
'pathMap',
|
|
4654
|
-
'canvas',
|
|
4655
|
-
'textRenderer'
|
|
4656
|
-
];
|
|
5165
|
+
map$1.td =
|
|
5166
|
+
map$1.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
|
4657
5167
|
|
|
5168
|
+
map$1.option =
|
|
5169
|
+
map$1.optgroup = [1, '<select multiple="multiple">', '</select>'];
|
|
4658
5170
|
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
5171
|
+
map$1.thead =
|
|
5172
|
+
map$1.tbody =
|
|
5173
|
+
map$1.colgroup =
|
|
5174
|
+
map$1.caption =
|
|
5175
|
+
map$1.tfoot = [1, '<table>', '</table>'];
|
|
4662
5176
|
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
5177
|
+
map$1.polyline =
|
|
5178
|
+
map$1.ellipse =
|
|
5179
|
+
map$1.polygon =
|
|
5180
|
+
map$1.circle =
|
|
5181
|
+
map$1.text =
|
|
5182
|
+
map$1.line =
|
|
5183
|
+
map$1.path =
|
|
5184
|
+
map$1.rect =
|
|
5185
|
+
map$1.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
|
|
4666
5186
|
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
5187
|
+
/**
|
|
5188
|
+
* Parse `html` and return a DOM Node instance, which could be a TextNode,
|
|
5189
|
+
* HTML DOM Node of some kind (<div> for example), or a DocumentFragment
|
|
5190
|
+
* instance, depending on the contents of the `html` string.
|
|
5191
|
+
*
|
|
5192
|
+
* @param {String} html - HTML string to "domify"
|
|
5193
|
+
* @param {Document} doc - The `document` instance to create the Node for
|
|
5194
|
+
* @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance
|
|
5195
|
+
* @api private
|
|
5196
|
+
*/
|
|
4670
5197
|
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
var h = this._renderer(type);
|
|
5198
|
+
function parse(html, doc) {
|
|
5199
|
+
if ('string' != typeof html) throw new TypeError('String expected');
|
|
4674
5200
|
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
};
|
|
5201
|
+
// default to the global `document` object
|
|
5202
|
+
if (!doc) doc = document;
|
|
4678
5203
|
|
|
4679
|
-
|
|
5204
|
+
// tag name
|
|
5205
|
+
var m = /<([\w:]+)/.exec(html);
|
|
5206
|
+
if (!m) return doc.createTextNode(html);
|
|
4680
5207
|
|
|
4681
|
-
|
|
4682
|
-
|
|
5208
|
+
html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace
|
|
5209
|
+
|
|
5210
|
+
var tag = m[1];
|
|
5211
|
+
|
|
5212
|
+
// body support
|
|
5213
|
+
if (tag == 'body') {
|
|
5214
|
+
var el = doc.createElement('html');
|
|
5215
|
+
el.innerHTML = html;
|
|
5216
|
+
return el.removeChild(el.lastChild);
|
|
4683
5217
|
}
|
|
4684
5218
|
|
|
4685
|
-
|
|
4686
|
-
|
|
5219
|
+
// wrap map
|
|
5220
|
+
var wrap = map$1[tag] || map$1._default;
|
|
5221
|
+
var depth = wrap[0];
|
|
5222
|
+
var prefix = wrap[1];
|
|
5223
|
+
var suffix = wrap[2];
|
|
5224
|
+
var el = doc.createElement('div');
|
|
5225
|
+
el.innerHTML = prefix + html + suffix;
|
|
5226
|
+
while (depth--) el = el.lastChild;
|
|
5227
|
+
|
|
5228
|
+
// one element
|
|
5229
|
+
if (el.firstChild == el.lastChild) {
|
|
5230
|
+
return el.removeChild(el.firstChild);
|
|
4687
5231
|
}
|
|
4688
5232
|
|
|
4689
|
-
|
|
4690
|
-
|
|
5233
|
+
// several elements
|
|
5234
|
+
var fragment = doc.createDocumentFragment();
|
|
5235
|
+
while (el.firstChild) {
|
|
5236
|
+
fragment.appendChild(el.removeChild(el.firstChild));
|
|
4691
5237
|
}
|
|
4692
5238
|
|
|
4693
|
-
return
|
|
4694
|
-
}
|
|
5239
|
+
return fragment;
|
|
5240
|
+
}
|
|
5241
|
+
|
|
5242
|
+
function query(selector, el) {
|
|
5243
|
+
el = el || document;
|
|
5244
|
+
|
|
5245
|
+
return el.querySelector(selector);
|
|
5246
|
+
}
|
|
5247
|
+
|
|
5248
|
+
function all(selector, el) {
|
|
5249
|
+
el = el || document;
|
|
5250
|
+
|
|
5251
|
+
return el.querySelectorAll(selector);
|
|
5252
|
+
}
|
|
5253
|
+
|
|
5254
|
+
function remove$1(el) {
|
|
5255
|
+
el.parentNode && el.parentNode.removeChild(el);
|
|
5256
|
+
}
|
|
4695
5257
|
|
|
4696
5258
|
var DEFAULT_BOX_PADDING = 0;
|
|
4697
5259
|
|
|
4698
|
-
var DEFAULT_LABEL_SIZE = {
|
|
5260
|
+
var DEFAULT_LABEL_SIZE$1 = {
|
|
4699
5261
|
width: 150,
|
|
4700
5262
|
height: 50
|
|
4701
5263
|
};
|
|
@@ -4872,9 +5434,9 @@
|
|
|
4872
5434
|
var helperSvg = document.getElementById('helper-svg');
|
|
4873
5435
|
|
|
4874
5436
|
if (!helperSvg) {
|
|
4875
|
-
helperSvg = create('svg');
|
|
5437
|
+
helperSvg = create$2('svg');
|
|
4876
5438
|
|
|
4877
|
-
attr(helperSvg, {
|
|
5439
|
+
attr$2(helperSvg, {
|
|
4878
5440
|
id: 'helper-svg'
|
|
4879
5441
|
});
|
|
4880
5442
|
|
|
@@ -4904,7 +5466,7 @@
|
|
|
4904
5466
|
function Text(config) {
|
|
4905
5467
|
|
|
4906
5468
|
this._config = assign({}, {
|
|
4907
|
-
size: DEFAULT_LABEL_SIZE,
|
|
5469
|
+
size: DEFAULT_LABEL_SIZE$1,
|
|
4908
5470
|
padding: DEFAULT_BOX_PADDING,
|
|
4909
5471
|
style: {},
|
|
4910
5472
|
align: 'center-top'
|
|
@@ -4968,13 +5530,13 @@
|
|
|
4968
5530
|
var maxWidth = box.width - padding.left - padding.right;
|
|
4969
5531
|
|
|
4970
5532
|
// ensure correct rendering by attaching helper text node to invisible SVG
|
|
4971
|
-
var helperText = create('text');
|
|
4972
|
-
attr(helperText, { x: 0, y: 0 });
|
|
4973
|
-
attr(helperText, style);
|
|
5533
|
+
var helperText = create$2('text');
|
|
5534
|
+
attr$2(helperText, { x: 0, y: 0 });
|
|
5535
|
+
attr$2(helperText, style);
|
|
4974
5536
|
|
|
4975
5537
|
var helperSvg = getHelperSvg();
|
|
4976
5538
|
|
|
4977
|
-
append(helperSvg, helperText);
|
|
5539
|
+
append$1(helperSvg, helperText);
|
|
4978
5540
|
|
|
4979
5541
|
while (lines.length) {
|
|
4980
5542
|
layouted.push(layoutNext(lines, maxWidth, helperText));
|
|
@@ -5003,13 +5565,13 @@
|
|
|
5003
5565
|
y -= (lineHeight || layouted[0].height) / 4;
|
|
5004
5566
|
|
|
5005
5567
|
|
|
5006
|
-
var textElement = create('text');
|
|
5568
|
+
var textElement = create$2('text');
|
|
5007
5569
|
|
|
5008
|
-
attr(textElement, style);
|
|
5570
|
+
attr$2(textElement, style);
|
|
5009
5571
|
|
|
5010
5572
|
// layout each line taking into account that parent
|
|
5011
5573
|
// shape might resize to fit text size
|
|
5012
|
-
forEach(layouted, function(line) {
|
|
5574
|
+
forEach$2(layouted, function(line) {
|
|
5013
5575
|
|
|
5014
5576
|
var x;
|
|
5015
5577
|
|
|
@@ -5032,15 +5594,15 @@
|
|
|
5032
5594
|
- line.width) / 2 + padding.left), 0);
|
|
5033
5595
|
}
|
|
5034
5596
|
|
|
5035
|
-
var tspan = create('tspan');
|
|
5036
|
-
attr(tspan, { x: x, y: y });
|
|
5597
|
+
var tspan = create$2('tspan');
|
|
5598
|
+
attr$2(tspan, { x: x, y: y });
|
|
5037
5599
|
|
|
5038
5600
|
tspan.textContent = line.text;
|
|
5039
5601
|
|
|
5040
|
-
append(textElement, tspan);
|
|
5602
|
+
append$1(textElement, tspan);
|
|
5041
5603
|
});
|
|
5042
5604
|
|
|
5043
|
-
remove(helperText);
|
|
5605
|
+
remove$4(helperText);
|
|
5044
5606
|
|
|
5045
5607
|
var dimensions = {
|
|
5046
5608
|
width: maxLineWidth,
|
|
@@ -5645,7 +6207,7 @@
|
|
|
5645
6207
|
});
|
|
5646
6208
|
}
|
|
5647
6209
|
|
|
5648
|
-
var DrawModule = {
|
|
6210
|
+
var DrawModule$1 = {
|
|
5649
6211
|
__init__: [ 'bpmnRenderer' ],
|
|
5650
6212
|
bpmnRenderer: [ 'type', BpmnRenderer ],
|
|
5651
6213
|
textRenderer: [ 'type', TextRenderer ],
|
|
@@ -5670,7 +6232,7 @@
|
|
|
5670
6232
|
*
|
|
5671
6233
|
* @return {string} the translated string
|
|
5672
6234
|
*/
|
|
5673
|
-
function translate
|
|
6235
|
+
function translate(template, replacements) {
|
|
5674
6236
|
|
|
5675
6237
|
replacements = replacements || {};
|
|
5676
6238
|
|
|
@@ -5680,10 +6242,10 @@
|
|
|
5680
6242
|
}
|
|
5681
6243
|
|
|
5682
6244
|
var TranslateModule = {
|
|
5683
|
-
translate: [ 'value', translate
|
|
6245
|
+
translate: [ 'value', translate ]
|
|
5684
6246
|
};
|
|
5685
6247
|
|
|
5686
|
-
var DEFAULT_LABEL_SIZE
|
|
6248
|
+
var DEFAULT_LABEL_SIZE = {
|
|
5687
6249
|
width: 90,
|
|
5688
6250
|
height: 20
|
|
5689
6251
|
};
|
|
@@ -5698,15 +6260,15 @@
|
|
|
5698
6260
|
* @return {boolean} true if has label
|
|
5699
6261
|
*/
|
|
5700
6262
|
function isLabelExternal(semantic) {
|
|
5701
|
-
return is(semantic, 'bpmn:Event') ||
|
|
5702
|
-
is(semantic, 'bpmn:Gateway') ||
|
|
5703
|
-
is(semantic, 'bpmn:DataStoreReference') ||
|
|
5704
|
-
is(semantic, 'bpmn:DataObjectReference') ||
|
|
5705
|
-
is(semantic, 'bpmn:DataInput') ||
|
|
5706
|
-
is(semantic, 'bpmn:DataOutput') ||
|
|
5707
|
-
is(semantic, 'bpmn:SequenceFlow') ||
|
|
5708
|
-
is(semantic, 'bpmn:MessageFlow') ||
|
|
5709
|
-
is(semantic, 'bpmn:Group');
|
|
6263
|
+
return is$1(semantic, 'bpmn:Event') ||
|
|
6264
|
+
is$1(semantic, 'bpmn:Gateway') ||
|
|
6265
|
+
is$1(semantic, 'bpmn:DataStoreReference') ||
|
|
6266
|
+
is$1(semantic, 'bpmn:DataObjectReference') ||
|
|
6267
|
+
is$1(semantic, 'bpmn:DataInput') ||
|
|
6268
|
+
is$1(semantic, 'bpmn:DataOutput') ||
|
|
6269
|
+
is$1(semantic, 'bpmn:SequenceFlow') ||
|
|
6270
|
+
is$1(semantic, 'bpmn:MessageFlow') ||
|
|
6271
|
+
is$1(semantic, 'bpmn:Group');
|
|
5710
6272
|
}
|
|
5711
6273
|
|
|
5712
6274
|
/**
|
|
@@ -5766,15 +6328,15 @@
|
|
|
5766
6328
|
|
|
5767
6329
|
if (element.waypoints) {
|
|
5768
6330
|
return getFlowLabelPosition(element.waypoints);
|
|
5769
|
-
} else if (is(element, 'bpmn:Group')) {
|
|
6331
|
+
} else if (is$1(element, 'bpmn:Group')) {
|
|
5770
6332
|
return {
|
|
5771
6333
|
x: element.x + element.width / 2,
|
|
5772
|
-
y: element.y + DEFAULT_LABEL_SIZE
|
|
6334
|
+
y: element.y + DEFAULT_LABEL_SIZE.height / 2
|
|
5773
6335
|
};
|
|
5774
6336
|
} else {
|
|
5775
6337
|
return {
|
|
5776
6338
|
x: element.x + element.width / 2,
|
|
5777
|
-
y: element.y + element.height + DEFAULT_LABEL_SIZE
|
|
6339
|
+
y: element.y + element.height + DEFAULT_LABEL_SIZE.height / 2
|
|
5778
6340
|
};
|
|
5779
6341
|
}
|
|
5780
6342
|
}
|
|
@@ -5798,7 +6360,7 @@
|
|
|
5798
6360
|
bounds = label.bounds;
|
|
5799
6361
|
|
|
5800
6362
|
size = {
|
|
5801
|
-
width: Math.max(DEFAULT_LABEL_SIZE
|
|
6363
|
+
width: Math.max(DEFAULT_LABEL_SIZE.width, bounds.width),
|
|
5802
6364
|
height: bounds.height
|
|
5803
6365
|
};
|
|
5804
6366
|
|
|
@@ -5810,7 +6372,7 @@
|
|
|
5810
6372
|
|
|
5811
6373
|
mid = getExternalLabelMid(element);
|
|
5812
6374
|
|
|
5813
|
-
size = DEFAULT_LABEL_SIZE
|
|
6375
|
+
size = DEFAULT_LABEL_SIZE;
|
|
5814
6376
|
}
|
|
5815
6377
|
|
|
5816
6378
|
return assign({
|
|
@@ -5819,6 +6381,12 @@
|
|
|
5819
6381
|
}, size);
|
|
5820
6382
|
}
|
|
5821
6383
|
|
|
6384
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6385
|
+
|
|
6386
|
+
function getDefaultExportFromCjs (x) {
|
|
6387
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
6388
|
+
}
|
|
6389
|
+
|
|
5822
6390
|
function roundPoint(point) {
|
|
5823
6391
|
|
|
5824
6392
|
return {
|
|
@@ -6053,9 +6621,9 @@
|
|
|
6053
6621
|
// ROOT ELEMENT
|
|
6054
6622
|
// handle the special case that we deal with a
|
|
6055
6623
|
// invisible root element (process, subprocess or collaboration)
|
|
6056
|
-
if (is(di, 'bpmndi:BPMNPlane')) {
|
|
6624
|
+
if (is$1(di, 'bpmndi:BPMNPlane')) {
|
|
6057
6625
|
|
|
6058
|
-
var attrs = is(semantic, 'bpmn:SubProcess')
|
|
6626
|
+
var attrs = is$1(semantic, 'bpmn:SubProcess')
|
|
6059
6627
|
? { id: semantic.id + '_plane' }
|
|
6060
6628
|
: {};
|
|
6061
6629
|
|
|
@@ -6066,10 +6634,10 @@
|
|
|
6066
6634
|
}
|
|
6067
6635
|
|
|
6068
6636
|
// SHAPE
|
|
6069
|
-
else if (is(di, 'bpmndi:BPMNShape')) {
|
|
6637
|
+
else if (is$1(di, 'bpmndi:BPMNShape')) {
|
|
6070
6638
|
|
|
6071
6639
|
var collapsed = !isExpanded(semantic, di),
|
|
6072
|
-
isFrame = isFrameElement(semantic);
|
|
6640
|
+
isFrame = isFrameElement$1(semantic);
|
|
6073
6641
|
|
|
6074
6642
|
hidden = parentElement && (parentElement.hidden || parentElement.collapsed);
|
|
6075
6643
|
|
|
@@ -6085,16 +6653,16 @@
|
|
|
6085
6653
|
isFrame: isFrame
|
|
6086
6654
|
}));
|
|
6087
6655
|
|
|
6088
|
-
if (is(semantic, 'bpmn:BoundaryEvent')) {
|
|
6656
|
+
if (is$1(semantic, 'bpmn:BoundaryEvent')) {
|
|
6089
6657
|
this._attachBoundary(semantic, element);
|
|
6090
6658
|
}
|
|
6091
6659
|
|
|
6092
6660
|
// insert lanes behind other flow nodes (cf. #727)
|
|
6093
|
-
if (is(semantic, 'bpmn:Lane')) {
|
|
6661
|
+
if (is$1(semantic, 'bpmn:Lane')) {
|
|
6094
6662
|
parentIndex = 0;
|
|
6095
6663
|
}
|
|
6096
6664
|
|
|
6097
|
-
if (is(semantic, 'bpmn:DataStoreReference')) {
|
|
6665
|
+
if (is$1(semantic, 'bpmn:DataStoreReference')) {
|
|
6098
6666
|
|
|
6099
6667
|
// check whether data store is inside our outside of its semantic parent
|
|
6100
6668
|
if (!isPointInsideBBox(parentElement, getMid(bounds))) {
|
|
@@ -6106,7 +6674,7 @@
|
|
|
6106
6674
|
}
|
|
6107
6675
|
|
|
6108
6676
|
// CONNECTION
|
|
6109
|
-
else if (is(di, 'bpmndi:BPMNEdge')) {
|
|
6677
|
+
else if (is$1(di, 'bpmndi:BPMNEdge')) {
|
|
6110
6678
|
|
|
6111
6679
|
var source = this._getSource(semantic),
|
|
6112
6680
|
target = this._getTarget(semantic);
|
|
@@ -6120,7 +6688,7 @@
|
|
|
6120
6688
|
waypoints: getWaypoints(di, source, target)
|
|
6121
6689
|
}));
|
|
6122
6690
|
|
|
6123
|
-
if (is(semantic, 'bpmn:DataAssociation')) {
|
|
6691
|
+
if (is$1(semantic, 'bpmn:DataAssociation')) {
|
|
6124
6692
|
|
|
6125
6693
|
// render always on top; this ensures DataAssociations
|
|
6126
6694
|
// are rendered correctly across different "hacks" people
|
|
@@ -6285,8 +6853,8 @@
|
|
|
6285
6853
|
y <= bbox.y + bbox.height;
|
|
6286
6854
|
}
|
|
6287
6855
|
|
|
6288
|
-
function isFrameElement(semantic) {
|
|
6289
|
-
return is(semantic, 'bpmn:Group');
|
|
6856
|
+
function isFrameElement$1(semantic) {
|
|
6857
|
+
return is$1(semantic, 'bpmn:Group');
|
|
6290
6858
|
}
|
|
6291
6859
|
|
|
6292
6860
|
var ImportModule = {
|
|
@@ -6296,9 +6864,9 @@
|
|
|
6296
6864
|
bpmnImporter: [ 'type', BpmnImporter ]
|
|
6297
6865
|
};
|
|
6298
6866
|
|
|
6299
|
-
var CoreModule = {
|
|
6867
|
+
var CoreModule$1 = {
|
|
6300
6868
|
__depends__: [
|
|
6301
|
-
DrawModule,
|
|
6869
|
+
DrawModule$1,
|
|
6302
6870
|
ImportModule
|
|
6303
6871
|
]
|
|
6304
6872
|
};
|
|
@@ -6355,7 +6923,7 @@
|
|
|
6355
6923
|
return isPrimaryButton(event) || isAuxiliaryButton(event);
|
|
6356
6924
|
}
|
|
6357
6925
|
|
|
6358
|
-
var LOW_PRIORITY = 500;
|
|
6926
|
+
var LOW_PRIORITY$3 = 500;
|
|
6359
6927
|
|
|
6360
6928
|
|
|
6361
6929
|
/**
|
|
@@ -6515,13 +7083,13 @@
|
|
|
6515
7083
|
}
|
|
6516
7084
|
|
|
6517
7085
|
function registerEvents(svg) {
|
|
6518
|
-
forEach(bindings, function(val, key) {
|
|
7086
|
+
forEach$2(bindings, function(val, key) {
|
|
6519
7087
|
registerEvent(svg, key, val);
|
|
6520
7088
|
});
|
|
6521
7089
|
}
|
|
6522
7090
|
|
|
6523
7091
|
function unregisterEvents(svg) {
|
|
6524
|
-
forEach(bindings, function(val, key) {
|
|
7092
|
+
forEach$2(bindings, function(val, key) {
|
|
6525
7093
|
unregisterEvent(svg, key, val);
|
|
6526
7094
|
});
|
|
6527
7095
|
}
|
|
@@ -6550,7 +7118,7 @@
|
|
|
6550
7118
|
eventBus.on([
|
|
6551
7119
|
'shape.changed',
|
|
6552
7120
|
'connection.changed'
|
|
6553
|
-
], LOW_PRIORITY, function(event) {
|
|
7121
|
+
], LOW_PRIORITY$3, function(event) {
|
|
6554
7122
|
|
|
6555
7123
|
var element = event.element,
|
|
6556
7124
|
gfx = event.gfx;
|
|
@@ -6558,7 +7126,7 @@
|
|
|
6558
7126
|
eventBus.fire('interactionEvents.updateHit', { element: element, gfx: gfx });
|
|
6559
7127
|
});
|
|
6560
7128
|
|
|
6561
|
-
eventBus.on('interactionEvents.createHit', LOW_PRIORITY, function(event) {
|
|
7129
|
+
eventBus.on('interactionEvents.createHit', LOW_PRIORITY$3, function(event) {
|
|
6562
7130
|
var element = event.element,
|
|
6563
7131
|
gfx = event.gfx;
|
|
6564
7132
|
|
|
@@ -6611,13 +7179,13 @@
|
|
|
6611
7179
|
throw new Error('invalid hit type <' + type + '>');
|
|
6612
7180
|
}
|
|
6613
7181
|
|
|
6614
|
-
attr(hit, attrs);
|
|
7182
|
+
attr$2(hit, attrs);
|
|
6615
7183
|
|
|
6616
7184
|
return hit;
|
|
6617
7185
|
}
|
|
6618
7186
|
|
|
6619
7187
|
function appendHit(gfx, hit) {
|
|
6620
|
-
append(gfx, hit);
|
|
7188
|
+
append$1(gfx, hit);
|
|
6621
7189
|
}
|
|
6622
7190
|
|
|
6623
7191
|
|
|
@@ -6631,7 +7199,7 @@
|
|
|
6631
7199
|
this.removeHits = function(gfx) {
|
|
6632
7200
|
var hits = all('.djs-hit', gfx);
|
|
6633
7201
|
|
|
6634
|
-
forEach(hits, remove);
|
|
7202
|
+
forEach$2(hits, remove$4);
|
|
6635
7203
|
};
|
|
6636
7204
|
|
|
6637
7205
|
/**
|
|
@@ -6695,11 +7263,11 @@
|
|
|
6695
7263
|
y: 0
|
|
6696
7264
|
}, attrs);
|
|
6697
7265
|
|
|
6698
|
-
var hit = create('rect');
|
|
7266
|
+
var hit = create$2('rect');
|
|
6699
7267
|
|
|
6700
7268
|
applyStyle(hit, type);
|
|
6701
7269
|
|
|
6702
|
-
attr(hit, attrs);
|
|
7270
|
+
attr$2(hit, attrs);
|
|
6703
7271
|
|
|
6704
7272
|
appendHit(gfx, hit);
|
|
6705
7273
|
|
|
@@ -6725,7 +7293,7 @@
|
|
|
6725
7293
|
if (element.waypoints) {
|
|
6726
7294
|
updateLine(hit, element.waypoints);
|
|
6727
7295
|
} else {
|
|
6728
|
-
attr(hit, {
|
|
7296
|
+
attr$2(hit, {
|
|
6729
7297
|
width: element.width,
|
|
6730
7298
|
height: element.height
|
|
6731
7299
|
});
|
|
@@ -6847,7 +7415,7 @@
|
|
|
6847
7415
|
function getBBox(elements, stopRecursion) {
|
|
6848
7416
|
|
|
6849
7417
|
stopRecursion = !!stopRecursion;
|
|
6850
|
-
if (!isArray(elements)) {
|
|
7418
|
+
if (!isArray$3(elements)) {
|
|
6851
7419
|
elements = [ elements ];
|
|
6852
7420
|
}
|
|
6853
7421
|
|
|
@@ -6856,7 +7424,7 @@
|
|
|
6856
7424
|
maxX,
|
|
6857
7425
|
maxY;
|
|
6858
7426
|
|
|
6859
|
-
forEach(elements, function(element) {
|
|
7427
|
+
forEach$2(elements, function(element) {
|
|
6860
7428
|
|
|
6861
7429
|
// If element is a connection the bbox must be computed first
|
|
6862
7430
|
var bbox = element;
|
|
@@ -6906,12 +7474,12 @@
|
|
|
6906
7474
|
return 'root';
|
|
6907
7475
|
}
|
|
6908
7476
|
|
|
6909
|
-
function isFrameElement
|
|
7477
|
+
function isFrameElement(element) {
|
|
6910
7478
|
|
|
6911
7479
|
return !!(element && element.isFrame);
|
|
6912
7480
|
}
|
|
6913
7481
|
|
|
6914
|
-
var LOW_PRIORITY$
|
|
7482
|
+
var LOW_PRIORITY$2 = 500;
|
|
6915
7483
|
|
|
6916
7484
|
|
|
6917
7485
|
/**
|
|
@@ -6933,9 +7501,9 @@
|
|
|
6933
7501
|
var self = this;
|
|
6934
7502
|
|
|
6935
7503
|
function createOutline(gfx, bounds) {
|
|
6936
|
-
var outline = create('rect');
|
|
7504
|
+
var outline = create$2('rect');
|
|
6937
7505
|
|
|
6938
|
-
attr(outline, assign({
|
|
7506
|
+
attr$2(outline, assign({
|
|
6939
7507
|
x: 10,
|
|
6940
7508
|
y: 10,
|
|
6941
7509
|
rx: 3,
|
|
@@ -6943,14 +7511,14 @@
|
|
|
6943
7511
|
height: 100
|
|
6944
7512
|
}, OUTLINE_STYLE));
|
|
6945
7513
|
|
|
6946
|
-
append(gfx, outline);
|
|
7514
|
+
append$1(gfx, outline);
|
|
6947
7515
|
|
|
6948
7516
|
return outline;
|
|
6949
7517
|
}
|
|
6950
7518
|
|
|
6951
7519
|
// A low priortity is necessary, because outlines of labels have to be updated
|
|
6952
7520
|
// after the label bounds have been updated in the renderer.
|
|
6953
|
-
eventBus.on([ 'shape.added', 'shape.changed' ], LOW_PRIORITY$
|
|
7521
|
+
eventBus.on([ 'shape.added', 'shape.changed' ], LOW_PRIORITY$2, function(event) {
|
|
6954
7522
|
var element = event.element,
|
|
6955
7523
|
gfx = event.gfx;
|
|
6956
7524
|
|
|
@@ -6987,7 +7555,7 @@
|
|
|
6987
7555
|
*/
|
|
6988
7556
|
Outline.prototype.updateShapeOutline = function(outline, element) {
|
|
6989
7557
|
|
|
6990
|
-
attr(outline, {
|
|
7558
|
+
attr$2(outline, {
|
|
6991
7559
|
x: -this.offset,
|
|
6992
7560
|
y: -this.offset,
|
|
6993
7561
|
width: element.width + this.offset * 2,
|
|
@@ -7008,7 +7576,7 @@
|
|
|
7008
7576
|
|
|
7009
7577
|
var bbox = getBBox(connection);
|
|
7010
7578
|
|
|
7011
|
-
attr(outline, {
|
|
7579
|
+
attr$2(outline, {
|
|
7012
7580
|
x: bbox.x - this.offset,
|
|
7013
7581
|
y: bbox.y - this.offset,
|
|
7014
7582
|
width: bbox.width + this.offset * 2,
|
|
@@ -7094,7 +7662,7 @@
|
|
|
7094
7662
|
var selectedElements = this._selectedElements,
|
|
7095
7663
|
oldSelection = selectedElements.slice();
|
|
7096
7664
|
|
|
7097
|
-
if (!isArray(elements)) {
|
|
7665
|
+
if (!isArray$3(elements)) {
|
|
7098
7666
|
elements = elements ? [ elements ] : [];
|
|
7099
7667
|
}
|
|
7100
7668
|
|
|
@@ -7111,7 +7679,7 @@
|
|
|
7111
7679
|
// selection may be cleared by passing an empty array or null
|
|
7112
7680
|
// to the method
|
|
7113
7681
|
if (add) {
|
|
7114
|
-
forEach(elements, function(element) {
|
|
7682
|
+
forEach$2(elements, function(element) {
|
|
7115
7683
|
if (selectedElements.indexOf(element) !== -1) {
|
|
7116
7684
|
|
|
7117
7685
|
// already selected
|
|
@@ -7180,13 +7748,13 @@
|
|
|
7180
7748
|
var oldSelection = event.oldSelection,
|
|
7181
7749
|
newSelection = event.newSelection;
|
|
7182
7750
|
|
|
7183
|
-
forEach(oldSelection, function(e) {
|
|
7751
|
+
forEach$2(oldSelection, function(e) {
|
|
7184
7752
|
if (newSelection.indexOf(e) === -1) {
|
|
7185
7753
|
deselect(e);
|
|
7186
7754
|
}
|
|
7187
7755
|
});
|
|
7188
7756
|
|
|
7189
|
-
forEach(newSelection, function(e) {
|
|
7757
|
+
forEach$2(newSelection, function(e) {
|
|
7190
7758
|
if (oldSelection.indexOf(e) === -1) {
|
|
7191
7759
|
select(e);
|
|
7192
7760
|
}
|
|
@@ -7212,13 +7780,13 @@
|
|
|
7212
7780
|
SelectionVisuals.prototype._updateSelectionOutline = function(selection) {
|
|
7213
7781
|
var layer = this._canvas.getLayer('selectionOutline');
|
|
7214
7782
|
|
|
7215
|
-
clear(layer);
|
|
7783
|
+
clear$2(layer);
|
|
7216
7784
|
|
|
7217
7785
|
var enabled = selection.length > 1;
|
|
7218
7786
|
|
|
7219
7787
|
var container = this._canvas.getContainer();
|
|
7220
7788
|
|
|
7221
|
-
classes(container)[enabled ? 'add' : 'remove']('djs-multi-select');
|
|
7789
|
+
classes$3(container)[enabled ? 'add' : 'remove']('djs-multi-select');
|
|
7222
7790
|
|
|
7223
7791
|
if (!enabled) {
|
|
7224
7792
|
return;
|
|
@@ -7226,15 +7794,15 @@
|
|
|
7226
7794
|
|
|
7227
7795
|
var bBox = addSelectionOutlinePadding(getBBox(selection));
|
|
7228
7796
|
|
|
7229
|
-
var rect = create('rect');
|
|
7797
|
+
var rect = create$2('rect');
|
|
7230
7798
|
|
|
7231
|
-
attr(rect, assign({
|
|
7799
|
+
attr$2(rect, assign({
|
|
7232
7800
|
rx: 3
|
|
7233
7801
|
}, bBox));
|
|
7234
7802
|
|
|
7235
|
-
classes(rect).add('djs-selection-outline');
|
|
7803
|
+
classes$3(rect).add('djs-selection-outline');
|
|
7236
7804
|
|
|
7237
|
-
append(layer, rect);
|
|
7805
|
+
append$1(layer, rect);
|
|
7238
7806
|
};
|
|
7239
7807
|
|
|
7240
7808
|
// helpers //////////
|
|
@@ -7265,7 +7833,7 @@
|
|
|
7265
7833
|
return;
|
|
7266
7834
|
}
|
|
7267
7835
|
|
|
7268
|
-
if (isArray(autoSelect)) {
|
|
7836
|
+
if (isArray$3(autoSelect)) {
|
|
7269
7837
|
selection.select(autoSelect);
|
|
7270
7838
|
} else {
|
|
7271
7839
|
|
|
@@ -7396,7 +7964,7 @@
|
|
|
7396
7964
|
// document wide unique overlay ids
|
|
7397
7965
|
var ids = new IdGenerator('ov');
|
|
7398
7966
|
|
|
7399
|
-
var LOW_PRIORITY$
|
|
7967
|
+
var LOW_PRIORITY$1 = 500;
|
|
7400
7968
|
|
|
7401
7969
|
|
|
7402
7970
|
/**
|
|
@@ -7632,13 +8200,13 @@
|
|
|
7632
8200
|
|
|
7633
8201
|
var overlays = this.get(filter) || [];
|
|
7634
8202
|
|
|
7635
|
-
if (!isArray(overlays)) {
|
|
8203
|
+
if (!isArray$3(overlays)) {
|
|
7636
8204
|
overlays = [ overlays ];
|
|
7637
8205
|
}
|
|
7638
8206
|
|
|
7639
8207
|
var self = this;
|
|
7640
8208
|
|
|
7641
|
-
forEach(overlays, function(overlay) {
|
|
8209
|
+
forEach$2(overlays, function(overlay) {
|
|
7642
8210
|
|
|
7643
8211
|
var container = self._getOverlayContainer(overlay.element, true);
|
|
7644
8212
|
|
|
@@ -7677,7 +8245,7 @@
|
|
|
7677
8245
|
|
|
7678
8246
|
this._overlayContainers = [];
|
|
7679
8247
|
|
|
7680
|
-
clear
|
|
8248
|
+
clear(this._overlayRoot);
|
|
7681
8249
|
};
|
|
7682
8250
|
|
|
7683
8251
|
Overlays.prototype._updateOverlayContainer = function(container) {
|
|
@@ -7698,7 +8266,7 @@
|
|
|
7698
8266
|
|
|
7699
8267
|
setPosition(html, x, y);
|
|
7700
8268
|
|
|
7701
|
-
attr
|
|
8269
|
+
attr(container.html, 'data-container-id', element.id);
|
|
7702
8270
|
};
|
|
7703
8271
|
|
|
7704
8272
|
|
|
@@ -7825,7 +8393,7 @@
|
|
|
7825
8393
|
htmlContainer.appendChild(html);
|
|
7826
8394
|
|
|
7827
8395
|
if (overlay.type) {
|
|
7828
|
-
classes
|
|
8396
|
+
classes(htmlContainer).add('djs-overlay-' + overlay.type);
|
|
7829
8397
|
}
|
|
7830
8398
|
|
|
7831
8399
|
var elementRoot = this._canvas.findRoot(element);
|
|
@@ -7910,7 +8478,7 @@
|
|
|
7910
8478
|
|
|
7911
8479
|
var self = this;
|
|
7912
8480
|
|
|
7913
|
-
forEach(this._overlays, function(overlay) {
|
|
8481
|
+
forEach$2(this._overlays, function(overlay) {
|
|
7914
8482
|
self._updateOverlayVisibilty(overlay, viewbox);
|
|
7915
8483
|
});
|
|
7916
8484
|
};
|
|
@@ -7947,7 +8515,7 @@
|
|
|
7947
8515
|
var element = e.element;
|
|
7948
8516
|
var overlays = self.get({ element: element });
|
|
7949
8517
|
|
|
7950
|
-
forEach(overlays, function(o) {
|
|
8518
|
+
forEach$2(overlays, function(o) {
|
|
7951
8519
|
self.remove(o.id);
|
|
7952
8520
|
});
|
|
7953
8521
|
|
|
@@ -7965,13 +8533,13 @@
|
|
|
7965
8533
|
|
|
7966
8534
|
// move integration
|
|
7967
8535
|
|
|
7968
|
-
eventBus.on('element.changed', LOW_PRIORITY$
|
|
8536
|
+
eventBus.on('element.changed', LOW_PRIORITY$1, function(e) {
|
|
7969
8537
|
var element = e.element;
|
|
7970
8538
|
|
|
7971
8539
|
var container = self._getOverlayContainer(element, true);
|
|
7972
8540
|
|
|
7973
8541
|
if (container) {
|
|
7974
|
-
forEach(container.overlays, function(overlay) {
|
|
8542
|
+
forEach$2(container.overlays, function(overlay) {
|
|
7975
8543
|
self._updateOverlay(overlay);
|
|
7976
8544
|
});
|
|
7977
8545
|
|
|
@@ -7985,7 +8553,7 @@
|
|
|
7985
8553
|
eventBus.on('element.marker.update', function(e) {
|
|
7986
8554
|
var container = self._getOverlayContainer(e.element, true);
|
|
7987
8555
|
if (container) {
|
|
7988
|
-
classes
|
|
8556
|
+
classes(container.html)[e.add ? 'add' : 'remove'](e.marker);
|
|
7989
8557
|
}
|
|
7990
8558
|
});
|
|
7991
8559
|
|
|
@@ -8116,7 +8684,7 @@
|
|
|
8116
8684
|
changeSupport: [ 'type', ChangeSupport ]
|
|
8117
8685
|
};
|
|
8118
8686
|
|
|
8119
|
-
var DEFAULT_PRIORITY = 1000;
|
|
8687
|
+
var DEFAULT_PRIORITY$1 = 1000;
|
|
8120
8688
|
|
|
8121
8689
|
/**
|
|
8122
8690
|
* A utility that can be used to plug-in into the command execution for
|
|
@@ -8178,7 +8746,7 @@
|
|
|
8178
8746
|
that = unwrap;
|
|
8179
8747
|
unwrap = handlerFn;
|
|
8180
8748
|
handlerFn = priority;
|
|
8181
|
-
priority = DEFAULT_PRIORITY;
|
|
8749
|
+
priority = DEFAULT_PRIORITY$1;
|
|
8182
8750
|
}
|
|
8183
8751
|
|
|
8184
8752
|
if (isObject(unwrap)) {
|
|
@@ -8190,13 +8758,13 @@
|
|
|
8190
8758
|
throw new Error('handlerFn must be a function');
|
|
8191
8759
|
}
|
|
8192
8760
|
|
|
8193
|
-
if (!isArray(events)) {
|
|
8761
|
+
if (!isArray$3(events)) {
|
|
8194
8762
|
events = [ events ];
|
|
8195
8763
|
}
|
|
8196
8764
|
|
|
8197
8765
|
var eventBus = this._eventBus;
|
|
8198
8766
|
|
|
8199
|
-
forEach(events, function(event) {
|
|
8767
|
+
forEach$2(events, function(event) {
|
|
8200
8768
|
|
|
8201
8769
|
// concat commandStack(.event)?(.hook)?
|
|
8202
8770
|
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
@@ -8224,7 +8792,7 @@
|
|
|
8224
8792
|
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
8225
8793
|
* which will in term forward to CommandInterceptor#on.
|
|
8226
8794
|
*/
|
|
8227
|
-
forEach(hooks, function(hook) {
|
|
8795
|
+
forEach$2(hooks, function(hook) {
|
|
8228
8796
|
|
|
8229
8797
|
/**
|
|
8230
8798
|
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
@@ -8291,116 +8859,111 @@
|
|
|
8291
8859
|
rootElementsBehavior: [ 'type', RootElementsBehavior ]
|
|
8292
8860
|
};
|
|
8293
8861
|
|
|
8294
|
-
var
|
|
8295
|
-
|
|
8296
|
-
function createCommonjsModule$1(fn) {
|
|
8297
|
-
var module = { exports: {} };
|
|
8298
|
-
return fn(module, module.exports), module.exports;
|
|
8299
|
-
}
|
|
8862
|
+
var css_escape = {exports: {}};
|
|
8300
8863
|
|
|
8301
8864
|
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
|
|
8302
8865
|
|
|
8303
|
-
|
|
8866
|
+
(function (module, exports) {
|
|
8304
8867
|
(function(root, factory) {
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
if (root.CSS && root.CSS.escape) {
|
|
8313
|
-
return root.CSS.escape;
|
|
8314
|
-
}
|
|
8868
|
+
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
|
8869
|
+
{
|
|
8870
|
+
// For Node.js.
|
|
8871
|
+
module.exports = factory(root);
|
|
8872
|
+
}
|
|
8873
|
+
}(typeof commonjsGlobal != 'undefined' ? commonjsGlobal : commonjsGlobal, function(root) {
|
|
8315
8874
|
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
if (arguments.length == 0) {
|
|
8319
|
-
throw new TypeError('`CSS.escape` requires an argument.');
|
|
8875
|
+
if (root.CSS && root.CSS.escape) {
|
|
8876
|
+
return root.CSS.escape;
|
|
8320
8877
|
}
|
|
8321
|
-
var string = String(value);
|
|
8322
|
-
var length = string.length;
|
|
8323
|
-
var index = -1;
|
|
8324
|
-
var codeUnit;
|
|
8325
|
-
var result = '';
|
|
8326
|
-
var firstCodeUnit = string.charCodeAt(0);
|
|
8327
|
-
while (++index < length) {
|
|
8328
|
-
codeUnit = string.charCodeAt(index);
|
|
8329
|
-
// Note: there’s no need to special-case astral symbols, surrogate
|
|
8330
|
-
// pairs, or lone surrogates.
|
|
8331
|
-
|
|
8332
|
-
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
|
|
8333
|
-
// (U+FFFD).
|
|
8334
|
-
if (codeUnit == 0x0000) {
|
|
8335
|
-
result += '\uFFFD';
|
|
8336
|
-
continue;
|
|
8337
|
-
}
|
|
8338
8878
|
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
// If the character is the first character and is in the range [0-9]
|
|
8344
|
-
// (U+0030 to U+0039), […]
|
|
8345
|
-
(index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
|
8346
|
-
// If the character is the second character and is in the range [0-9]
|
|
8347
|
-
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
8348
|
-
(
|
|
8349
|
-
index == 1 &&
|
|
8350
|
-
codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
|
|
8351
|
-
firstCodeUnit == 0x002D
|
|
8352
|
-
)
|
|
8353
|
-
) {
|
|
8354
|
-
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
|
8355
|
-
result += '\\' + codeUnit.toString(16) + ' ';
|
|
8356
|
-
continue;
|
|
8879
|
+
// https://drafts.csswg.org/cssom/#serialize-an-identifier
|
|
8880
|
+
var cssEscape = function(value) {
|
|
8881
|
+
if (arguments.length == 0) {
|
|
8882
|
+
throw new TypeError('`CSS.escape` requires an argument.');
|
|
8357
8883
|
}
|
|
8884
|
+
var string = String(value);
|
|
8885
|
+
var length = string.length;
|
|
8886
|
+
var index = -1;
|
|
8887
|
+
var codeUnit;
|
|
8888
|
+
var result = '';
|
|
8889
|
+
var firstCodeUnit = string.charCodeAt(0);
|
|
8890
|
+
while (++index < length) {
|
|
8891
|
+
codeUnit = string.charCodeAt(index);
|
|
8892
|
+
// Note: there’s no need to special-case astral symbols, surrogate
|
|
8893
|
+
// pairs, or lone surrogates.
|
|
8894
|
+
|
|
8895
|
+
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
|
|
8896
|
+
// (U+FFFD).
|
|
8897
|
+
if (codeUnit == 0x0000) {
|
|
8898
|
+
result += '\uFFFD';
|
|
8899
|
+
continue;
|
|
8900
|
+
}
|
|
8901
|
+
|
|
8902
|
+
if (
|
|
8903
|
+
// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
8904
|
+
// U+007F, […]
|
|
8905
|
+
(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||
|
|
8906
|
+
// If the character is the first character and is in the range [0-9]
|
|
8907
|
+
// (U+0030 to U+0039), […]
|
|
8908
|
+
(index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
|
8909
|
+
// If the character is the second character and is in the range [0-9]
|
|
8910
|
+
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
8911
|
+
(
|
|
8912
|
+
index == 1 &&
|
|
8913
|
+
codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
|
|
8914
|
+
firstCodeUnit == 0x002D
|
|
8915
|
+
)
|
|
8916
|
+
) {
|
|
8917
|
+
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
|
|
8918
|
+
result += '\\' + codeUnit.toString(16) + ' ';
|
|
8919
|
+
continue;
|
|
8920
|
+
}
|
|
8921
|
+
|
|
8922
|
+
if (
|
|
8923
|
+
// If the character is the first character and is a `-` (U+002D), and
|
|
8924
|
+
// there is no second character, […]
|
|
8925
|
+
index == 0 &&
|
|
8926
|
+
length == 1 &&
|
|
8927
|
+
codeUnit == 0x002D
|
|
8928
|
+
) {
|
|
8929
|
+
result += '\\' + string.charAt(index);
|
|
8930
|
+
continue;
|
|
8931
|
+
}
|
|
8358
8932
|
|
|
8359
|
-
|
|
8360
|
-
//
|
|
8361
|
-
//
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8933
|
+
// If the character is not handled by one of the above rules and is
|
|
8934
|
+
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
|
|
8935
|
+
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
|
|
8936
|
+
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
|
8937
|
+
if (
|
|
8938
|
+
codeUnit >= 0x0080 ||
|
|
8939
|
+
codeUnit == 0x002D ||
|
|
8940
|
+
codeUnit == 0x005F ||
|
|
8941
|
+
codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
|
|
8942
|
+
codeUnit >= 0x0041 && codeUnit <= 0x005A ||
|
|
8943
|
+
codeUnit >= 0x0061 && codeUnit <= 0x007A
|
|
8944
|
+
) {
|
|
8945
|
+
// the character itself
|
|
8946
|
+
result += string.charAt(index);
|
|
8947
|
+
continue;
|
|
8948
|
+
}
|
|
8949
|
+
|
|
8950
|
+
// Otherwise, the escaped character.
|
|
8951
|
+
// https://drafts.csswg.org/cssom/#escape-a-character
|
|
8366
8952
|
result += '\\' + string.charAt(index);
|
|
8367
|
-
continue;
|
|
8368
|
-
}
|
|
8369
8953
|
|
|
8370
|
-
// If the character is not handled by one of the above rules and is
|
|
8371
|
-
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
|
|
8372
|
-
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
|
|
8373
|
-
// U+005A), or [a-z] (U+0061 to U+007A), […]
|
|
8374
|
-
if (
|
|
8375
|
-
codeUnit >= 0x0080 ||
|
|
8376
|
-
codeUnit == 0x002D ||
|
|
8377
|
-
codeUnit == 0x005F ||
|
|
8378
|
-
codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
|
|
8379
|
-
codeUnit >= 0x0041 && codeUnit <= 0x005A ||
|
|
8380
|
-
codeUnit >= 0x0061 && codeUnit <= 0x007A
|
|
8381
|
-
) {
|
|
8382
|
-
// the character itself
|
|
8383
|
-
result += string.charAt(index);
|
|
8384
|
-
continue;
|
|
8385
8954
|
}
|
|
8955
|
+
return result;
|
|
8956
|
+
};
|
|
8386
8957
|
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
result += '\\' + string.charAt(index);
|
|
8390
|
-
|
|
8958
|
+
if (!root.CSS) {
|
|
8959
|
+
root.CSS = {};
|
|
8391
8960
|
}
|
|
8392
|
-
return result;
|
|
8393
|
-
};
|
|
8394
8961
|
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
}
|
|
8398
|
-
|
|
8399
|
-
root.CSS.escape = cssEscape;
|
|
8400
|
-
return cssEscape;
|
|
8962
|
+
root.CSS.escape = cssEscape;
|
|
8963
|
+
return cssEscape;
|
|
8401
8964
|
|
|
8402
|
-
|
|
8403
|
-
});
|
|
8965
|
+
}));
|
|
8966
|
+
} (css_escape));
|
|
8404
8967
|
|
|
8405
8968
|
var HTML_ESCAPE_MAP = {
|
|
8406
8969
|
'&': '&',
|
|
@@ -8430,7 +8993,7 @@
|
|
|
8430
8993
|
function getPlaneIdFromShape(element) {
|
|
8431
8994
|
var id = element.id;
|
|
8432
8995
|
|
|
8433
|
-
if (is(element, 'bpmn:SubProcess')) {
|
|
8996
|
+
if (is$1(element, 'bpmn:SubProcess')) {
|
|
8434
8997
|
return addPlaneSuffix(id);
|
|
8435
8998
|
}
|
|
8436
8999
|
|
|
@@ -8453,9 +9016,9 @@
|
|
|
8453
9016
|
* @param {canvas} canvas
|
|
8454
9017
|
*/
|
|
8455
9018
|
function DrilldownBreadcrumbs(eventBus, elementRegistry, overlays, canvas) {
|
|
8456
|
-
var breadcrumbs = domify('<ul class="bjs-breadcrumbs"></ul>');
|
|
9019
|
+
var breadcrumbs = domify$1('<ul class="bjs-breadcrumbs"></ul>');
|
|
8457
9020
|
var container = canvas.getContainer();
|
|
8458
|
-
var containerClasses = classes$
|
|
9021
|
+
var containerClasses = classes$2(container);
|
|
8459
9022
|
container.appendChild(breadcrumbs);
|
|
8460
9023
|
|
|
8461
9024
|
var boParents = [];
|
|
@@ -8489,13 +9052,13 @@
|
|
|
8489
9052
|
|
|
8490
9053
|
var path = boParents.map(function(parent) {
|
|
8491
9054
|
var title = escapeHTML(parent.name || parent.id);
|
|
8492
|
-
var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
9055
|
+
var link = domify$1('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
8493
9056
|
|
|
8494
9057
|
var parentPlane = canvas.findRoot(getPlaneIdFromShape(parent)) || canvas.findRoot(parent.id);
|
|
8495
9058
|
|
|
8496
9059
|
// when the root is a collaboration, the process does not have a corresponding
|
|
8497
9060
|
// element in the elementRegisty. Instead, we search for the corresponding participant
|
|
8498
|
-
if (!parentPlane && is(parent, 'bpmn:Process')) {
|
|
9061
|
+
if (!parentPlane && is$1(parent, 'bpmn:Process')) {
|
|
8499
9062
|
var participant = elementRegistry.find(function(element) {
|
|
8500
9063
|
var bo = getBusinessObject(element);
|
|
8501
9064
|
return bo && bo.processRef && bo.processRef === parent;
|
|
@@ -8547,7 +9110,7 @@
|
|
|
8547
9110
|
var parents = [];
|
|
8548
9111
|
|
|
8549
9112
|
for (var element = bo; element; element = element.$parent) {
|
|
8550
|
-
if (is(element, 'bpmn:SubProcess') || is(element, 'bpmn:Process')) {
|
|
9113
|
+
if (is$1(element, 'bpmn:SubProcess') || is$1(element, 'bpmn:Process')) {
|
|
8551
9114
|
parents.push(element);
|
|
8552
9115
|
}
|
|
8553
9116
|
}
|
|
@@ -8582,7 +9145,7 @@
|
|
|
8582
9145
|
currentRoot = newRoot;
|
|
8583
9146
|
|
|
8584
9147
|
// current root was replaced with a collaboration, we don't update the viewbox
|
|
8585
|
-
if (is(newRoot, 'bpmn:Collaboration') && !storedViewbox) {
|
|
9148
|
+
if (is$1(newRoot, 'bpmn:Collaboration') && !storedViewbox) {
|
|
8586
9149
|
return;
|
|
8587
9150
|
}
|
|
8588
9151
|
|
|
@@ -8745,7 +9308,7 @@
|
|
|
8745
9308
|
|
|
8746
9309
|
var parent = bo.$parent;
|
|
8747
9310
|
|
|
8748
|
-
if (is(bo, 'bpmn:SubProcess') && !diElement.isExpanded) {
|
|
9311
|
+
if (is$1(bo, 'bpmn:SubProcess') && !diElement.isExpanded) {
|
|
8749
9312
|
collapsedElements.push(bo);
|
|
8750
9313
|
}
|
|
8751
9314
|
|
|
@@ -8841,7 +9404,7 @@
|
|
|
8841
9404
|
// helpers //////////////////////////
|
|
8842
9405
|
|
|
8843
9406
|
function findRootDiagram(element) {
|
|
8844
|
-
if (is(element, 'bpmndi:BPMNDiagram')) {
|
|
9407
|
+
if (is$1(element, 'bpmndi:BPMNDiagram')) {
|
|
8845
9408
|
return element;
|
|
8846
9409
|
} else {
|
|
8847
9410
|
return findRootDiagram(element.$parent);
|
|
@@ -8874,7 +9437,7 @@
|
|
|
8874
9437
|
var parent = bo.$parent;
|
|
8875
9438
|
|
|
8876
9439
|
// don't move elements that are already on the plane
|
|
8877
|
-
if (!is(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
|
|
9440
|
+
if (!is$1(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
|
|
8878
9441
|
return false;
|
|
8879
9442
|
}
|
|
8880
9443
|
|
|
@@ -8887,7 +9450,7 @@
|
|
|
8887
9450
|
return true;
|
|
8888
9451
|
}
|
|
8889
9452
|
|
|
8890
|
-
var LOW_PRIORITY
|
|
9453
|
+
var LOW_PRIORITY = 250;
|
|
8891
9454
|
var ARROW_DOWN_SVG = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>';
|
|
8892
9455
|
|
|
8893
9456
|
var EMPTY_MARKER = 'bjs-drilldown-empty';
|
|
@@ -8904,7 +9467,7 @@
|
|
|
8904
9467
|
|
|
8905
9468
|
var self = this;
|
|
8906
9469
|
|
|
8907
|
-
this.executed('shape.toggleCollapse', LOW_PRIORITY
|
|
9470
|
+
this.executed('shape.toggleCollapse', LOW_PRIORITY, function(context) {
|
|
8908
9471
|
var shape = context.shape;
|
|
8909
9472
|
|
|
8910
9473
|
// Add overlay to the collapsed shape
|
|
@@ -8916,7 +9479,7 @@
|
|
|
8916
9479
|
}, true);
|
|
8917
9480
|
|
|
8918
9481
|
|
|
8919
|
-
this.reverted('shape.toggleCollapse', LOW_PRIORITY
|
|
9482
|
+
this.reverted('shape.toggleCollapse', LOW_PRIORITY, function(context) {
|
|
8920
9483
|
var shape = context.shape;
|
|
8921
9484
|
|
|
8922
9485
|
// Add overlay to the collapsed shape
|
|
@@ -8928,7 +9491,7 @@
|
|
|
8928
9491
|
}, true);
|
|
8929
9492
|
|
|
8930
9493
|
|
|
8931
|
-
this.executed([ 'shape.create', 'shape.move', 'shape.delete' ], LOW_PRIORITY
|
|
9494
|
+
this.executed([ 'shape.create', 'shape.move', 'shape.delete' ], LOW_PRIORITY,
|
|
8932
9495
|
function(context) {
|
|
8933
9496
|
var oldParent = context.oldParent,
|
|
8934
9497
|
newParent = context.newParent || context.parent,
|
|
@@ -8945,7 +9508,7 @@
|
|
|
8945
9508
|
}, true);
|
|
8946
9509
|
|
|
8947
9510
|
|
|
8948
|
-
this.reverted([ 'shape.create', 'shape.move', 'shape.delete' ], LOW_PRIORITY
|
|
9511
|
+
this.reverted([ 'shape.create', 'shape.move', 'shape.delete' ], LOW_PRIORITY,
|
|
8949
9512
|
function(context) {
|
|
8950
9513
|
var oldParent = context.oldParent,
|
|
8951
9514
|
newParent = context.newParent || context.parent,
|
|
@@ -8990,7 +9553,7 @@
|
|
|
8990
9553
|
|
|
8991
9554
|
DrilldownOverlayBehavior.prototype.canDrillDown = function(element) {
|
|
8992
9555
|
var canvas = this._canvas;
|
|
8993
|
-
return is(element, 'bpmn:SubProcess') && canvas.findRoot(getPlaneIdFromShape(element));
|
|
9556
|
+
return is$1(element, 'bpmn:SubProcess') && canvas.findRoot(getPlaneIdFromShape(element));
|
|
8994
9557
|
};
|
|
8995
9558
|
|
|
8996
9559
|
/**
|
|
@@ -9011,7 +9574,7 @@
|
|
|
9011
9574
|
}
|
|
9012
9575
|
|
|
9013
9576
|
var hasContent = bo && bo.flowElements && bo.flowElements.length;
|
|
9014
|
-
classes$
|
|
9577
|
+
classes$2(overlay.html).toggle(EMPTY_MARKER, !hasContent);
|
|
9015
9578
|
};
|
|
9016
9579
|
|
|
9017
9580
|
/**
|
|
@@ -9029,7 +9592,7 @@
|
|
|
9029
9592
|
this.removeOverlay(element);
|
|
9030
9593
|
}
|
|
9031
9594
|
|
|
9032
|
-
var button = domify('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
9595
|
+
var button = domify$1('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
9033
9596
|
|
|
9034
9597
|
button.addEventListener('click', function() {
|
|
9035
9598
|
canvas.setRootElement(canvas.findRoot(getPlaneIdFromShape(element)));
|
|
@@ -9088,7 +9651,7 @@
|
|
|
9088
9651
|
*
|
|
9089
9652
|
* @return {boolean}
|
|
9090
9653
|
*/
|
|
9091
|
-
function isArray
|
|
9654
|
+
function isArray(obj) {
|
|
9092
9655
|
return Object.prototype.toString.call(obj) === '[object Array]';
|
|
9093
9656
|
}
|
|
9094
9657
|
|
|
@@ -9116,7 +9679,7 @@
|
|
|
9116
9679
|
function annotate() {
|
|
9117
9680
|
var args = Array.prototype.slice.call(arguments);
|
|
9118
9681
|
|
|
9119
|
-
if (args.length === 1 && isArray
|
|
9682
|
+
if (args.length === 1 && isArray(args[0])) {
|
|
9120
9683
|
args = args[0];
|
|
9121
9684
|
}
|
|
9122
9685
|
|
|
@@ -9255,7 +9818,7 @@
|
|
|
9255
9818
|
}
|
|
9256
9819
|
|
|
9257
9820
|
if (typeof fn !== 'function') {
|
|
9258
|
-
if (isArray
|
|
9821
|
+
if (isArray(fn)) {
|
|
9259
9822
|
fn = annotate(fn.slice());
|
|
9260
9823
|
} else {
|
|
9261
9824
|
throw new Error('Cannot invoke "' + fn + '". Expected a function!');
|
|
@@ -9530,7 +10093,7 @@
|
|
|
9530
10093
|
// helpers ///////////////
|
|
9531
10094
|
|
|
9532
10095
|
function arrayUnwrap(type, value) {
|
|
9533
|
-
if (type !== 'value' && isArray
|
|
10096
|
+
if (type !== 'value' && isArray(value)) {
|
|
9534
10097
|
value = annotate(value.slice());
|
|
9535
10098
|
}
|
|
9536
10099
|
|
|
@@ -9539,7 +10102,7 @@
|
|
|
9539
10102
|
|
|
9540
10103
|
// apply default renderer with lowest possible priority
|
|
9541
10104
|
// so that it only kicks in if noone else could render
|
|
9542
|
-
var DEFAULT_RENDER_PRIORITY
|
|
10105
|
+
var DEFAULT_RENDER_PRIORITY = 1;
|
|
9543
10106
|
|
|
9544
10107
|
/**
|
|
9545
10108
|
* The default renderer used for shapes and connections.
|
|
@@ -9550,7 +10113,7 @@
|
|
|
9550
10113
|
function DefaultRenderer(eventBus, styles) {
|
|
9551
10114
|
|
|
9552
10115
|
//
|
|
9553
|
-
BaseRenderer.call(this, eventBus, DEFAULT_RENDER_PRIORITY
|
|
10116
|
+
BaseRenderer.call(this, eventBus, DEFAULT_RENDER_PRIORITY);
|
|
9554
10117
|
|
|
9555
10118
|
this.CONNECTION_STYLE = styles.style([ 'no-fill' ], { strokeWidth: 5, stroke: 'fuchsia' });
|
|
9556
10119
|
this.SHAPE_STYLE = styles.style({ fill: 'white', stroke: 'fuchsia', strokeWidth: 2 });
|
|
@@ -9565,22 +10128,22 @@
|
|
|
9565
10128
|
};
|
|
9566
10129
|
|
|
9567
10130
|
DefaultRenderer.prototype.drawShape = function drawShape(visuals, element, attrs) {
|
|
9568
|
-
var rect = create('rect');
|
|
10131
|
+
var rect = create$2('rect');
|
|
9569
10132
|
|
|
9570
|
-
attr(rect, {
|
|
10133
|
+
attr$2(rect, {
|
|
9571
10134
|
x: 0,
|
|
9572
10135
|
y: 0,
|
|
9573
10136
|
width: element.width || 0,
|
|
9574
10137
|
height: element.height || 0
|
|
9575
10138
|
});
|
|
9576
10139
|
|
|
9577
|
-
if (isFrameElement
|
|
9578
|
-
attr(rect, assign({}, this.FRAME_STYLE, attrs || {}));
|
|
10140
|
+
if (isFrameElement(element)) {
|
|
10141
|
+
attr$2(rect, assign({}, this.FRAME_STYLE, attrs || {}));
|
|
9579
10142
|
} else {
|
|
9580
|
-
attr(rect, assign({}, this.SHAPE_STYLE, attrs || {}));
|
|
10143
|
+
attr$2(rect, assign({}, this.SHAPE_STYLE, attrs || {}));
|
|
9581
10144
|
}
|
|
9582
10145
|
|
|
9583
|
-
append(visuals, rect);
|
|
10146
|
+
append$1(visuals, rect);
|
|
9584
10147
|
|
|
9585
10148
|
return rect;
|
|
9586
10149
|
};
|
|
@@ -9588,7 +10151,7 @@
|
|
|
9588
10151
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
9589
10152
|
|
|
9590
10153
|
var line = createLine(connection.waypoints, assign({}, this.CONNECTION_STYLE, attrs || {}));
|
|
9591
|
-
append(visuals, line);
|
|
10154
|
+
append$1(visuals, line);
|
|
9592
10155
|
|
|
9593
10156
|
return line;
|
|
9594
10157
|
};
|
|
@@ -9676,7 +10239,7 @@
|
|
|
9676
10239
|
*/
|
|
9677
10240
|
this.style = function(traits, additionalAttrs) {
|
|
9678
10241
|
|
|
9679
|
-
if (!isArray(traits) && !additionalAttrs) {
|
|
10242
|
+
if (!isArray$3(traits) && !additionalAttrs) {
|
|
9680
10243
|
additionalAttrs = traits;
|
|
9681
10244
|
traits = [];
|
|
9682
10245
|
}
|
|
@@ -9689,7 +10252,7 @@
|
|
|
9689
10252
|
};
|
|
9690
10253
|
|
|
9691
10254
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
9692
|
-
if (!isArray(traits)) {
|
|
10255
|
+
if (!isArray$3(traits)) {
|
|
9693
10256
|
defaultStyles = traits;
|
|
9694
10257
|
traits = [];
|
|
9695
10258
|
}
|
|
@@ -9698,7 +10261,7 @@
|
|
|
9698
10261
|
};
|
|
9699
10262
|
}
|
|
9700
10263
|
|
|
9701
|
-
var DrawModule
|
|
10264
|
+
var DrawModule = {
|
|
9702
10265
|
__init__: [ 'defaultRenderer' ],
|
|
9703
10266
|
defaultRenderer: [ 'type', DefaultRenderer ],
|
|
9704
10267
|
styles: [ 'type', Styles ]
|
|
@@ -9712,7 +10275,7 @@
|
|
|
9712
10275
|
*
|
|
9713
10276
|
* @return {number} the previous index of the element
|
|
9714
10277
|
*/
|
|
9715
|
-
function remove
|
|
10278
|
+
function remove(collection, element) {
|
|
9716
10279
|
|
|
9717
10280
|
if (!collection || !element) {
|
|
9718
10281
|
return -1;
|
|
@@ -9826,8 +10389,8 @@
|
|
|
9826
10389
|
}
|
|
9827
10390
|
|
|
9828
10391
|
function createGroup(parent, cls, childIndex) {
|
|
9829
|
-
var group = create('g');
|
|
9830
|
-
classes(group).add(cls);
|
|
10392
|
+
var group = create$2('g');
|
|
10393
|
+
classes$3(group).add(cls);
|
|
9831
10394
|
|
|
9832
10395
|
var index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
|
|
9833
10396
|
|
|
@@ -9905,10 +10468,10 @@
|
|
|
9905
10468
|
// html container
|
|
9906
10469
|
var container = this._container = createContainer(config);
|
|
9907
10470
|
|
|
9908
|
-
var svg = this._svg = create('svg');
|
|
9909
|
-
attr(svg, { width: '100%', height: '100%' });
|
|
10471
|
+
var svg = this._svg = create$2('svg');
|
|
10472
|
+
attr$2(svg, { width: '100%', height: '100%' });
|
|
9910
10473
|
|
|
9911
|
-
append(container, svg);
|
|
10474
|
+
append$1(container, svg);
|
|
9912
10475
|
|
|
9913
10476
|
var viewport = this._viewport = createGroup(svg, 'viewport');
|
|
9914
10477
|
|
|
@@ -10148,7 +10711,7 @@
|
|
|
10148
10711
|
return group;
|
|
10149
10712
|
}
|
|
10150
10713
|
|
|
10151
|
-
remove(group);
|
|
10714
|
+
remove$4(group);
|
|
10152
10715
|
|
|
10153
10716
|
layer.visible = false;
|
|
10154
10717
|
|
|
@@ -10163,7 +10726,7 @@
|
|
|
10163
10726
|
if (layer) {
|
|
10164
10727
|
delete this._layers[name];
|
|
10165
10728
|
|
|
10166
|
-
remove(layer.group);
|
|
10729
|
+
remove$4(layer.group);
|
|
10167
10730
|
}
|
|
10168
10731
|
};
|
|
10169
10732
|
|
|
@@ -10251,14 +10814,14 @@
|
|
|
10251
10814
|
return;
|
|
10252
10815
|
}
|
|
10253
10816
|
|
|
10254
|
-
forEach([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
10817
|
+
forEach$2([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
10255
10818
|
if (gfx) {
|
|
10256
10819
|
|
|
10257
10820
|
// invoke either addClass or removeClass based on mode
|
|
10258
10821
|
if (add) {
|
|
10259
|
-
classes(gfx).add(marker);
|
|
10822
|
+
classes$3(gfx).add(marker);
|
|
10260
10823
|
} else {
|
|
10261
|
-
classes(gfx).remove(marker);
|
|
10824
|
+
classes$3(gfx).remove(marker);
|
|
10262
10825
|
}
|
|
10263
10826
|
}
|
|
10264
10827
|
});
|
|
@@ -10324,7 +10887,7 @@
|
|
|
10324
10887
|
|
|
10325
10888
|
var gfx = this.getGraphics(element);
|
|
10326
10889
|
|
|
10327
|
-
return classes(gfx).has(marker);
|
|
10890
|
+
return classes$3(gfx).has(marker);
|
|
10328
10891
|
};
|
|
10329
10892
|
|
|
10330
10893
|
/**
|
|
@@ -10664,7 +11227,7 @@
|
|
|
10664
11227
|
graphicsFactory.remove(element);
|
|
10665
11228
|
|
|
10666
11229
|
// unset parent <-> child relationship
|
|
10667
|
-
remove
|
|
11230
|
+
remove(element.parent && element.parent.children, element);
|
|
10668
11231
|
element.parent = null;
|
|
10669
11232
|
|
|
10670
11233
|
eventBus.fire(type + '.removed', { element: element });
|
|
@@ -10840,7 +11403,7 @@
|
|
|
10840
11403
|
outerBox = this.getSize(),
|
|
10841
11404
|
matrix,
|
|
10842
11405
|
activeLayer,
|
|
10843
|
-
transform
|
|
11406
|
+
transform,
|
|
10844
11407
|
scale,
|
|
10845
11408
|
x, y;
|
|
10846
11409
|
|
|
@@ -10853,8 +11416,8 @@
|
|
|
10853
11416
|
activeLayer = this._rootElement ? this.getActiveLayer() : null;
|
|
10854
11417
|
innerBox = activeLayer && activeLayer.getBBox() || {};
|
|
10855
11418
|
|
|
10856
|
-
transform
|
|
10857
|
-
matrix = transform
|
|
11419
|
+
transform = transform$1(viewport);
|
|
11420
|
+
matrix = transform ? transform.matrix : createMatrix();
|
|
10858
11421
|
scale = round(matrix.a, 1000);
|
|
10859
11422
|
|
|
10860
11423
|
x = round(-matrix.e || 0, 1000);
|
|
@@ -10885,7 +11448,7 @@
|
|
|
10885
11448
|
.scale(scale)
|
|
10886
11449
|
.translate(-box.x, -box.y);
|
|
10887
11450
|
|
|
10888
|
-
transform(viewport, matrix);
|
|
11451
|
+
transform$1(viewport, matrix);
|
|
10889
11452
|
});
|
|
10890
11453
|
}
|
|
10891
11454
|
|
|
@@ -11222,10 +11785,10 @@
|
|
|
11222
11785
|
this._validateId(id);
|
|
11223
11786
|
|
|
11224
11787
|
// associate dom node with element
|
|
11225
|
-
attr(gfx, ELEMENT_ID, id);
|
|
11788
|
+
attr$2(gfx, ELEMENT_ID, id);
|
|
11226
11789
|
|
|
11227
11790
|
if (secondaryGfx) {
|
|
11228
|
-
attr(secondaryGfx, ELEMENT_ID, id);
|
|
11791
|
+
attr$2(secondaryGfx, ELEMENT_ID, id);
|
|
11229
11792
|
}
|
|
11230
11793
|
|
|
11231
11794
|
this._elements[id] = { element: element, gfx: gfx, secondaryGfx: secondaryGfx };
|
|
@@ -11244,10 +11807,10 @@
|
|
|
11244
11807
|
if (container) {
|
|
11245
11808
|
|
|
11246
11809
|
// unset element id on gfx
|
|
11247
|
-
attr(container.gfx, ELEMENT_ID, '');
|
|
11810
|
+
attr$2(container.gfx, ELEMENT_ID, '');
|
|
11248
11811
|
|
|
11249
11812
|
if (container.secondaryGfx) {
|
|
11250
|
-
attr(container.secondaryGfx, ELEMENT_ID, '');
|
|
11813
|
+
attr$2(container.secondaryGfx, ELEMENT_ID, '');
|
|
11251
11814
|
}
|
|
11252
11815
|
|
|
11253
11816
|
delete elements[id];
|
|
@@ -11302,7 +11865,7 @@
|
|
|
11302
11865
|
}
|
|
11303
11866
|
|
|
11304
11867
|
if (gfx) {
|
|
11305
|
-
attr(gfx, ELEMENT_ID, id);
|
|
11868
|
+
attr$2(gfx, ELEMENT_ID, id);
|
|
11306
11869
|
}
|
|
11307
11870
|
|
|
11308
11871
|
return gfx;
|
|
@@ -11327,7 +11890,7 @@
|
|
|
11327
11890
|
if (typeof filter === 'string') {
|
|
11328
11891
|
id = filter;
|
|
11329
11892
|
} else {
|
|
11330
|
-
id = filter && attr(filter, ELEMENT_ID);
|
|
11893
|
+
id = filter && attr$2(filter, ELEMENT_ID);
|
|
11331
11894
|
}
|
|
11332
11895
|
|
|
11333
11896
|
var container = this._elements[id];
|
|
@@ -11444,6 +12007,10 @@
|
|
|
11444
12007
|
}
|
|
11445
12008
|
};
|
|
11446
12009
|
|
|
12010
|
+
var objectRefs = {exports: {}};
|
|
12011
|
+
|
|
12012
|
+
var collection = {};
|
|
12013
|
+
|
|
11447
12014
|
/**
|
|
11448
12015
|
* An empty collection stub. Use {@link RefsCollection.extend} to extend a
|
|
11449
12016
|
* collection with ref semantics.
|
|
@@ -11464,7 +12031,7 @@
|
|
|
11464
12031
|
*
|
|
11465
12032
|
* @return {RefsCollection<Object>} the extended array
|
|
11466
12033
|
*/
|
|
11467
|
-
function extend
|
|
12034
|
+
function extend(collection, refs, property, target) {
|
|
11468
12035
|
|
|
11469
12036
|
var inverseProperty = property.inverse;
|
|
11470
12037
|
|
|
@@ -11559,38 +12126,35 @@
|
|
|
11559
12126
|
return collection.__refs_collection === true;
|
|
11560
12127
|
}
|
|
11561
12128
|
|
|
11562
|
-
|
|
12129
|
+
collection.extend = extend;
|
|
11563
12130
|
|
|
11564
|
-
|
|
12131
|
+
collection.isExtended = isExtended;
|
|
11565
12132
|
|
|
11566
|
-
var
|
|
11567
|
-
extend: extend_1,
|
|
11568
|
-
isExtended: isExtended_1
|
|
11569
|
-
};
|
|
12133
|
+
var Collection = collection;
|
|
11570
12134
|
|
|
11571
|
-
function hasOwnProperty(e, property) {
|
|
12135
|
+
function hasOwnProperty$1(e, property) {
|
|
11572
12136
|
return Object.prototype.hasOwnProperty.call(e, property.name || property);
|
|
11573
12137
|
}
|
|
11574
12138
|
|
|
11575
12139
|
function defineCollectionProperty(ref, property, target) {
|
|
11576
12140
|
|
|
11577
|
-
var collection
|
|
12141
|
+
var collection = Collection.extend(target[property.name] || [], ref, property, target);
|
|
11578
12142
|
|
|
11579
12143
|
Object.defineProperty(target, property.name, {
|
|
11580
12144
|
enumerable: property.enumerable,
|
|
11581
|
-
value: collection
|
|
12145
|
+
value: collection
|
|
11582
12146
|
});
|
|
11583
12147
|
|
|
11584
|
-
if (collection
|
|
12148
|
+
if (collection.length) {
|
|
11585
12149
|
|
|
11586
|
-
collection
|
|
12150
|
+
collection.forEach(function(o) {
|
|
11587
12151
|
ref.set(o, property.inverse, target);
|
|
11588
12152
|
});
|
|
11589
12153
|
}
|
|
11590
12154
|
}
|
|
11591
12155
|
|
|
11592
12156
|
|
|
11593
|
-
function defineProperty(ref, property, target) {
|
|
12157
|
+
function defineProperty$1(ref, property, target) {
|
|
11594
12158
|
|
|
11595
12159
|
var inverseProperty = property.inverse;
|
|
11596
12160
|
|
|
@@ -11673,10 +12237,10 @@
|
|
|
11673
12237
|
*
|
|
11674
12238
|
* wheels[0].car // undefined
|
|
11675
12239
|
*/
|
|
11676
|
-
function Refs(a, b) {
|
|
12240
|
+
function Refs$1(a, b) {
|
|
11677
12241
|
|
|
11678
|
-
if (!(this instanceof Refs)) {
|
|
11679
|
-
return new Refs(a, b);
|
|
12242
|
+
if (!(this instanceof Refs$1)) {
|
|
12243
|
+
return new Refs$1(a, b);
|
|
11680
12244
|
}
|
|
11681
12245
|
|
|
11682
12246
|
// link
|
|
@@ -11697,7 +12261,7 @@
|
|
|
11697
12261
|
* @param {Object} target
|
|
11698
12262
|
* @param {String} property
|
|
11699
12263
|
*/
|
|
11700
|
-
Refs.prototype.bind = function(target, property) {
|
|
12264
|
+
Refs$1.prototype.bind = function(target, property) {
|
|
11701
12265
|
if (typeof property === 'string') {
|
|
11702
12266
|
if (!this.props[property]) {
|
|
11703
12267
|
throw new Error('no property <' + property + '> in ref');
|
|
@@ -11708,28 +12272,28 @@
|
|
|
11708
12272
|
if (property.collection) {
|
|
11709
12273
|
defineCollectionProperty(this, property, target);
|
|
11710
12274
|
} else {
|
|
11711
|
-
defineProperty(this, property, target);
|
|
12275
|
+
defineProperty$1(this, property, target);
|
|
11712
12276
|
}
|
|
11713
12277
|
};
|
|
11714
12278
|
|
|
11715
|
-
Refs.prototype.ensureRefsCollection = function(target, property) {
|
|
12279
|
+
Refs$1.prototype.ensureRefsCollection = function(target, property) {
|
|
11716
12280
|
|
|
11717
|
-
var collection
|
|
12281
|
+
var collection = target[property.name];
|
|
11718
12282
|
|
|
11719
|
-
if (!
|
|
12283
|
+
if (!Collection.isExtended(collection)) {
|
|
11720
12284
|
defineCollectionProperty(this, property, target);
|
|
11721
12285
|
}
|
|
11722
12286
|
|
|
11723
|
-
return collection
|
|
12287
|
+
return collection;
|
|
11724
12288
|
};
|
|
11725
12289
|
|
|
11726
|
-
Refs.prototype.ensureBound = function(target, property) {
|
|
11727
|
-
if (!hasOwnProperty(target, property)) {
|
|
12290
|
+
Refs$1.prototype.ensureBound = function(target, property) {
|
|
12291
|
+
if (!hasOwnProperty$1(target, property)) {
|
|
11728
12292
|
this.bind(target, property);
|
|
11729
12293
|
}
|
|
11730
12294
|
};
|
|
11731
12295
|
|
|
11732
|
-
Refs.prototype.unset = function(target, property, value) {
|
|
12296
|
+
Refs$1.prototype.unset = function(target, property, value) {
|
|
11733
12297
|
|
|
11734
12298
|
if (target) {
|
|
11735
12299
|
this.ensureBound(target, property);
|
|
@@ -11742,7 +12306,7 @@
|
|
|
11742
12306
|
}
|
|
11743
12307
|
};
|
|
11744
12308
|
|
|
11745
|
-
Refs.prototype.set = function(target, property, value) {
|
|
12309
|
+
Refs$1.prototype.set = function(target, property, value) {
|
|
11746
12310
|
|
|
11747
12311
|
if (target) {
|
|
11748
12312
|
this.ensureBound(target, property);
|
|
@@ -11755,18 +12319,21 @@
|
|
|
11755
12319
|
}
|
|
11756
12320
|
};
|
|
11757
12321
|
|
|
11758
|
-
var refs = Refs;
|
|
12322
|
+
var refs = Refs$1;
|
|
11759
12323
|
|
|
11760
|
-
|
|
12324
|
+
(function (module) {
|
|
12325
|
+
module.exports = refs;
|
|
11761
12326
|
|
|
11762
|
-
|
|
11763
|
-
objectRefs
|
|
12327
|
+
module.exports.Collection = collection;
|
|
12328
|
+
} (objectRefs));
|
|
12329
|
+
|
|
12330
|
+
var Refs = /*@__PURE__*/getDefaultExportFromCjs(objectRefs.exports);
|
|
11764
12331
|
|
|
11765
|
-
var parentRefs = new
|
|
11766
|
-
labelRefs = new
|
|
11767
|
-
attacherRefs = new
|
|
11768
|
-
outgoingRefs = new
|
|
11769
|
-
incomingRefs = new
|
|
12332
|
+
var parentRefs = new Refs({ name: 'children', enumerable: true, collection: true }, { name: 'parent' }),
|
|
12333
|
+
labelRefs = new Refs({ name: 'labels', enumerable: true, collection: true }, { name: 'labelTarget' }),
|
|
12334
|
+
attacherRefs = new Refs({ name: 'attachers', collection: true }, { name: 'host' }),
|
|
12335
|
+
outgoingRefs = new Refs({ name: 'outgoing', collection: true }, { name: 'source' }),
|
|
12336
|
+
incomingRefs = new Refs({ name: 'incoming', collection: true }, { name: 'target' });
|
|
11770
12337
|
|
|
11771
12338
|
/**
|
|
11772
12339
|
* @namespace djs.model
|
|
@@ -11783,7 +12350,7 @@
|
|
|
11783
12350
|
*
|
|
11784
12351
|
* @abstract
|
|
11785
12352
|
*/
|
|
11786
|
-
function Base() {
|
|
12353
|
+
function Base$1() {
|
|
11787
12354
|
|
|
11788
12355
|
/**
|
|
11789
12356
|
* The object that backs up the shape
|
|
@@ -11862,7 +12429,7 @@
|
|
|
11862
12429
|
* @extends Base
|
|
11863
12430
|
*/
|
|
11864
12431
|
function Shape() {
|
|
11865
|
-
Base.call(this);
|
|
12432
|
+
Base$1.call(this);
|
|
11866
12433
|
|
|
11867
12434
|
/**
|
|
11868
12435
|
* Indicates frame shapes
|
|
@@ -11892,7 +12459,7 @@
|
|
|
11892
12459
|
attacherRefs.bind(this, 'attachers');
|
|
11893
12460
|
}
|
|
11894
12461
|
|
|
11895
|
-
e(Shape, Base);
|
|
12462
|
+
e(Shape, Base$1);
|
|
11896
12463
|
|
|
11897
12464
|
|
|
11898
12465
|
/**
|
|
@@ -11942,7 +12509,7 @@
|
|
|
11942
12509
|
* @extends Base
|
|
11943
12510
|
*/
|
|
11944
12511
|
function Connection() {
|
|
11945
|
-
Base.call(this);
|
|
12512
|
+
Base$1.call(this);
|
|
11946
12513
|
|
|
11947
12514
|
/**
|
|
11948
12515
|
* The element this connection originates from
|
|
@@ -11961,10 +12528,10 @@
|
|
|
11961
12528
|
incomingRefs.bind(this, 'target');
|
|
11962
12529
|
}
|
|
11963
12530
|
|
|
11964
|
-
e(Connection, Base);
|
|
12531
|
+
e(Connection, Base$1);
|
|
11965
12532
|
|
|
11966
12533
|
|
|
11967
|
-
var types = {
|
|
12534
|
+
var types$6 = {
|
|
11968
12535
|
connection: Connection,
|
|
11969
12536
|
shape: Shape,
|
|
11970
12537
|
label: Label,
|
|
@@ -11988,8 +12555,8 @@
|
|
|
11988
12555
|
*
|
|
11989
12556
|
* @return {Base} the new model instance
|
|
11990
12557
|
*/
|
|
11991
|
-
function create
|
|
11992
|
-
var Type = types[type];
|
|
12558
|
+
function create(type, attrs) {
|
|
12559
|
+
var Type = types$6[type];
|
|
11993
12560
|
if (!Type) {
|
|
11994
12561
|
throw new Error('unknown type: <' + type + '>');
|
|
11995
12562
|
}
|
|
@@ -12036,14 +12603,14 @@
|
|
|
12036
12603
|
attrs.id = type + '_' + (this._uid++);
|
|
12037
12604
|
}
|
|
12038
12605
|
|
|
12039
|
-
return create
|
|
12606
|
+
return create(type, attrs);
|
|
12040
12607
|
};
|
|
12041
12608
|
|
|
12042
12609
|
var FN_REF = '__fn';
|
|
12043
12610
|
|
|
12044
|
-
var DEFAULT_PRIORITY
|
|
12611
|
+
var DEFAULT_PRIORITY = 1000;
|
|
12045
12612
|
|
|
12046
|
-
var slice
|
|
12613
|
+
var slice = Array.prototype.slice;
|
|
12047
12614
|
|
|
12048
12615
|
/**
|
|
12049
12616
|
* A general purpose event bus.
|
|
@@ -12156,12 +12723,12 @@
|
|
|
12156
12723
|
*/
|
|
12157
12724
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
12158
12725
|
|
|
12159
|
-
events = isArray(events) ? events : [ events ];
|
|
12726
|
+
events = isArray$3(events) ? events : [ events ];
|
|
12160
12727
|
|
|
12161
12728
|
if (isFunction(priority)) {
|
|
12162
12729
|
that = callback;
|
|
12163
12730
|
callback = priority;
|
|
12164
|
-
priority = DEFAULT_PRIORITY
|
|
12731
|
+
priority = DEFAULT_PRIORITY;
|
|
12165
12732
|
}
|
|
12166
12733
|
|
|
12167
12734
|
if (!isNumber(priority)) {
|
|
@@ -12205,7 +12772,7 @@
|
|
|
12205
12772
|
if (isFunction(priority)) {
|
|
12206
12773
|
that = callback;
|
|
12207
12774
|
callback = priority;
|
|
12208
|
-
priority = DEFAULT_PRIORITY
|
|
12775
|
+
priority = DEFAULT_PRIORITY;
|
|
12209
12776
|
}
|
|
12210
12777
|
|
|
12211
12778
|
if (!isNumber(priority)) {
|
|
@@ -12241,7 +12808,7 @@
|
|
|
12241
12808
|
*/
|
|
12242
12809
|
EventBus.prototype.off = function(events, callback) {
|
|
12243
12810
|
|
|
12244
|
-
events = isArray(events) ? events : [ events ];
|
|
12811
|
+
events = isArray$3(events) ? events : [ events ];
|
|
12245
12812
|
|
|
12246
12813
|
var self = this;
|
|
12247
12814
|
|
|
@@ -12304,7 +12871,7 @@
|
|
|
12304
12871
|
returnValue,
|
|
12305
12872
|
args;
|
|
12306
12873
|
|
|
12307
|
-
args = slice
|
|
12874
|
+
args = slice.call(arguments);
|
|
12308
12875
|
|
|
12309
12876
|
if (typeof type === 'object') {
|
|
12310
12877
|
data = type;
|
|
@@ -12606,10 +13173,10 @@
|
|
|
12606
13173
|
} else {
|
|
12607
13174
|
childrenGfx = getChildren(gfx);
|
|
12608
13175
|
if (!childrenGfx) {
|
|
12609
|
-
childrenGfx = create('g');
|
|
12610
|
-
classes(childrenGfx).add('djs-children');
|
|
13176
|
+
childrenGfx = create$2('g');
|
|
13177
|
+
classes$3(childrenGfx).add('djs-children');
|
|
12611
13178
|
|
|
12612
|
-
append(gfx.parentNode, childrenGfx);
|
|
13179
|
+
append$1(gfx.parentNode, childrenGfx);
|
|
12613
13180
|
}
|
|
12614
13181
|
}
|
|
12615
13182
|
|
|
@@ -12623,7 +13190,7 @@
|
|
|
12623
13190
|
GraphicsFactory.prototype._clear = function(gfx) {
|
|
12624
13191
|
var visual = getVisual(gfx);
|
|
12625
13192
|
|
|
12626
|
-
clear
|
|
13193
|
+
clear(visual);
|
|
12627
13194
|
|
|
12628
13195
|
return visual;
|
|
12629
13196
|
};
|
|
@@ -12658,38 +13225,38 @@
|
|
|
12658
13225
|
GraphicsFactory.prototype._createContainer = function(
|
|
12659
13226
|
type, childrenGfx, parentIndex, isFrame
|
|
12660
13227
|
) {
|
|
12661
|
-
var outerGfx = create('g');
|
|
12662
|
-
classes(outerGfx).add('djs-group');
|
|
13228
|
+
var outerGfx = create$2('g');
|
|
13229
|
+
classes$3(outerGfx).add('djs-group');
|
|
12663
13230
|
|
|
12664
13231
|
// insert node at position
|
|
12665
13232
|
if (typeof parentIndex !== 'undefined') {
|
|
12666
13233
|
prependTo(outerGfx, childrenGfx, childrenGfx.childNodes[parentIndex]);
|
|
12667
13234
|
} else {
|
|
12668
|
-
append(childrenGfx, outerGfx);
|
|
13235
|
+
append$1(childrenGfx, outerGfx);
|
|
12669
13236
|
}
|
|
12670
13237
|
|
|
12671
|
-
var gfx = create('g');
|
|
12672
|
-
classes(gfx).add('djs-element');
|
|
12673
|
-
classes(gfx).add('djs-' + type);
|
|
13238
|
+
var gfx = create$2('g');
|
|
13239
|
+
classes$3(gfx).add('djs-element');
|
|
13240
|
+
classes$3(gfx).add('djs-' + type);
|
|
12674
13241
|
|
|
12675
13242
|
if (isFrame) {
|
|
12676
|
-
classes(gfx).add('djs-frame');
|
|
13243
|
+
classes$3(gfx).add('djs-frame');
|
|
12677
13244
|
}
|
|
12678
13245
|
|
|
12679
|
-
append(outerGfx, gfx);
|
|
13246
|
+
append$1(outerGfx, gfx);
|
|
12680
13247
|
|
|
12681
13248
|
// create visual
|
|
12682
|
-
var visual = create('g');
|
|
12683
|
-
classes(visual).add('djs-visual');
|
|
13249
|
+
var visual = create$2('g');
|
|
13250
|
+
classes$3(visual).add('djs-visual');
|
|
12684
13251
|
|
|
12685
|
-
append(gfx, visual);
|
|
13252
|
+
append$1(gfx, visual);
|
|
12686
13253
|
|
|
12687
13254
|
return gfx;
|
|
12688
13255
|
};
|
|
12689
13256
|
|
|
12690
13257
|
GraphicsFactory.prototype.create = function(type, element, parentIndex) {
|
|
12691
13258
|
var childrenGfx = this._getChildrenContainer(element.parent);
|
|
12692
|
-
return this._createContainer(type, childrenGfx, parentIndex, isFrameElement
|
|
13259
|
+
return this._createContainer(type, childrenGfx, parentIndex, isFrameElement(element));
|
|
12693
13260
|
};
|
|
12694
13261
|
|
|
12695
13262
|
GraphicsFactory.prototype.updateContainments = function(elements) {
|
|
@@ -12709,7 +13276,7 @@
|
|
|
12709
13276
|
|
|
12710
13277
|
// update all parents of changed and reorganized their children
|
|
12711
13278
|
// in the correct order (as indicated in our model)
|
|
12712
|
-
forEach(parents, function(parent) {
|
|
13279
|
+
forEach$2(parents, function(parent) {
|
|
12713
13280
|
|
|
12714
13281
|
var children = parent.children;
|
|
12715
13282
|
|
|
@@ -12719,7 +13286,7 @@
|
|
|
12719
13286
|
|
|
12720
13287
|
var childrenGfx = self._getChildrenContainer(parent);
|
|
12721
13288
|
|
|
12722
|
-
forEach(children.slice().reverse(), function(child) {
|
|
13289
|
+
forEach$2(children.slice().reverse(), function(child) {
|
|
12723
13290
|
var childGfx = elementRegistry.getGraphics(child);
|
|
12724
13291
|
|
|
12725
13292
|
prependTo(childGfx.parentNode, childrenGfx);
|
|
@@ -12765,7 +13332,7 @@
|
|
|
12765
13332
|
this.drawShape(visual, element);
|
|
12766
13333
|
|
|
12767
13334
|
// update positioning
|
|
12768
|
-
translate(gfx, element.x, element.y);
|
|
13335
|
+
translate$1(gfx, element.x, element.y);
|
|
12769
13336
|
} else
|
|
12770
13337
|
if (type === 'connection') {
|
|
12771
13338
|
this.drawConnection(visual, element);
|
|
@@ -12774,9 +13341,9 @@
|
|
|
12774
13341
|
}
|
|
12775
13342
|
|
|
12776
13343
|
if (element.hidden) {
|
|
12777
|
-
attr(gfx, 'display', 'none');
|
|
13344
|
+
attr$2(gfx, 'display', 'none');
|
|
12778
13345
|
} else {
|
|
12779
|
-
attr(gfx, 'display', 'block');
|
|
13346
|
+
attr$2(gfx, 'display', 'block');
|
|
12780
13347
|
}
|
|
12781
13348
|
};
|
|
12782
13349
|
|
|
@@ -12784,7 +13351,7 @@
|
|
|
12784
13351
|
var gfx = this._elementRegistry.getGraphics(element);
|
|
12785
13352
|
|
|
12786
13353
|
// remove
|
|
12787
|
-
remove(gfx.parentNode);
|
|
13354
|
+
remove$4(gfx.parentNode);
|
|
12788
13355
|
};
|
|
12789
13356
|
|
|
12790
13357
|
|
|
@@ -12802,8 +13369,8 @@
|
|
|
12802
13369
|
parentNode.insertBefore(newNode, node);
|
|
12803
13370
|
}
|
|
12804
13371
|
|
|
12805
|
-
var CoreModule
|
|
12806
|
-
__depends__: [ DrawModule
|
|
13372
|
+
var CoreModule = {
|
|
13373
|
+
__depends__: [ DrawModule ],
|
|
12807
13374
|
__init__: [ 'canvas' ],
|
|
12808
13375
|
canvas: [ 'type', Canvas ],
|
|
12809
13376
|
elementRegistry: [ 'type', ElementRegistry ],
|
|
@@ -12845,7 +13412,7 @@
|
|
|
12845
13412
|
'config': [ 'value', options ]
|
|
12846
13413
|
};
|
|
12847
13414
|
|
|
12848
|
-
var modules = [ configModule, CoreModule
|
|
13415
|
+
var modules = [ configModule, CoreModule ].concat(options.modules || []);
|
|
12849
13416
|
|
|
12850
13417
|
return bootstrap(modules);
|
|
12851
13418
|
}
|
|
@@ -12972,13 +13539,13 @@
|
|
|
12972
13539
|
/**
|
|
12973
13540
|
* Moddle base element.
|
|
12974
13541
|
*/
|
|
12975
|
-
function Base
|
|
13542
|
+
function Base() { }
|
|
12976
13543
|
|
|
12977
|
-
Base
|
|
13544
|
+
Base.prototype.get = function(name) {
|
|
12978
13545
|
return this.$model.properties.get(this, name);
|
|
12979
13546
|
};
|
|
12980
13547
|
|
|
12981
|
-
Base
|
|
13548
|
+
Base.prototype.set = function(name, value) {
|
|
12982
13549
|
this.$model.properties.set(this, name, value);
|
|
12983
13550
|
};
|
|
12984
13551
|
|
|
@@ -12999,10 +13566,10 @@
|
|
|
12999
13566
|
var model = this.model;
|
|
13000
13567
|
|
|
13001
13568
|
var props = this.properties,
|
|
13002
|
-
prototype = Object.create(Base
|
|
13569
|
+
prototype = Object.create(Base.prototype);
|
|
13003
13570
|
|
|
13004
13571
|
// initialize default values
|
|
13005
|
-
forEach(descriptor.properties, function(p) {
|
|
13572
|
+
forEach$2(descriptor.properties, function(p) {
|
|
13006
13573
|
if (!p.isMany && p.default !== undefined) {
|
|
13007
13574
|
prototype[p.name] = p.default;
|
|
13008
13575
|
}
|
|
@@ -13021,7 +13588,7 @@
|
|
|
13021
13588
|
props.define(this, '$attrs', { value: {} });
|
|
13022
13589
|
props.define(this, '$parent', { writable: true });
|
|
13023
13590
|
|
|
13024
|
-
forEach(attrs, bind(function(val, key) {
|
|
13591
|
+
forEach$2(attrs, bind(function(val, key) {
|
|
13025
13592
|
this.set(key, val);
|
|
13026
13593
|
}, this));
|
|
13027
13594
|
}
|
|
@@ -13310,7 +13877,7 @@
|
|
|
13310
13877
|
return;
|
|
13311
13878
|
}
|
|
13312
13879
|
|
|
13313
|
-
forEach(t.properties, bind(function(p) {
|
|
13880
|
+
forEach$2(t.properties, bind(function(p) {
|
|
13314
13881
|
|
|
13315
13882
|
// clone property to allow extensions
|
|
13316
13883
|
p = assign({}, p, {
|
|
@@ -13357,7 +13924,7 @@
|
|
|
13357
13924
|
|
|
13358
13925
|
this.properties = properties;
|
|
13359
13926
|
|
|
13360
|
-
forEach(packages, bind(this.registerPackage, this));
|
|
13927
|
+
forEach$2(packages, bind(this.registerPackage, this));
|
|
13361
13928
|
}
|
|
13362
13929
|
|
|
13363
13930
|
|
|
@@ -13381,7 +13948,7 @@
|
|
|
13381
13948
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
13382
13949
|
|
|
13383
13950
|
// register types
|
|
13384
|
-
forEach(pkg.types, bind(function(descriptor) {
|
|
13951
|
+
forEach$2(pkg.types, bind(function(descriptor) {
|
|
13385
13952
|
this.registerType(descriptor, pkg);
|
|
13386
13953
|
}, this));
|
|
13387
13954
|
|
|
@@ -13407,7 +13974,7 @@
|
|
|
13407
13974
|
propertiesByName = {};
|
|
13408
13975
|
|
|
13409
13976
|
// parse properties
|
|
13410
|
-
forEach(type.properties, bind(function(p) {
|
|
13977
|
+
forEach$2(type.properties, bind(function(p) {
|
|
13411
13978
|
|
|
13412
13979
|
// namespace property names
|
|
13413
13980
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -13433,7 +14000,7 @@
|
|
|
13433
14000
|
propertiesByName: propertiesByName
|
|
13434
14001
|
});
|
|
13435
14002
|
|
|
13436
|
-
forEach(type.extends, bind(function(extendsName) {
|
|
14003
|
+
forEach$2(type.extends, bind(function(extendsName) {
|
|
13437
14004
|
var extended = this.typeMap[extendsName];
|
|
13438
14005
|
|
|
13439
14006
|
extended.traits = extended.traits || [];
|
|
@@ -13487,12 +14054,12 @@
|
|
|
13487
14054
|
throw new Error('unknown type <' + nsName.name + '>');
|
|
13488
14055
|
}
|
|
13489
14056
|
|
|
13490
|
-
forEach(type.superClass, trait ? traverseTrait : traverseSuper);
|
|
14057
|
+
forEach$2(type.superClass, trait ? traverseTrait : traverseSuper);
|
|
13491
14058
|
|
|
13492
14059
|
// call iterator with (type, inherited=!trait)
|
|
13493
14060
|
iterator(type, !trait);
|
|
13494
14061
|
|
|
13495
|
-
forEach(type.traits, traverseTrait);
|
|
14062
|
+
forEach$2(type.traits, traverseTrait);
|
|
13496
14063
|
};
|
|
13497
14064
|
|
|
13498
14065
|
|
|
@@ -13563,7 +14130,7 @@
|
|
|
13563
14130
|
|
|
13564
14131
|
var propertyName = property && property.name;
|
|
13565
14132
|
|
|
13566
|
-
if (isUndefined
|
|
14133
|
+
if (isUndefined(value)) {
|
|
13567
14134
|
// unset the property, if the specified value is undefined;
|
|
13568
14135
|
// delete from $attrs (for extensions) or the target itself
|
|
13569
14136
|
if (property) {
|
|
@@ -13578,7 +14145,7 @@
|
|
|
13578
14145
|
if (propertyName in target) {
|
|
13579
14146
|
target[propertyName] = value;
|
|
13580
14147
|
} else {
|
|
13581
|
-
defineProperty
|
|
14148
|
+
defineProperty(target, property, value);
|
|
13582
14149
|
}
|
|
13583
14150
|
} else {
|
|
13584
14151
|
target.$attrs[name] = value;
|
|
@@ -13606,7 +14173,7 @@
|
|
|
13606
14173
|
|
|
13607
14174
|
// check if access to collection property and lazily initialize it
|
|
13608
14175
|
if (!target[propertyName] && property.isMany) {
|
|
13609
|
-
defineProperty
|
|
14176
|
+
defineProperty(target, property, []);
|
|
13610
14177
|
}
|
|
13611
14178
|
|
|
13612
14179
|
return target[propertyName];
|
|
@@ -13654,11 +14221,11 @@
|
|
|
13654
14221
|
};
|
|
13655
14222
|
|
|
13656
14223
|
|
|
13657
|
-
function isUndefined
|
|
14224
|
+
function isUndefined(val) {
|
|
13658
14225
|
return typeof val === 'undefined';
|
|
13659
14226
|
}
|
|
13660
14227
|
|
|
13661
|
-
function defineProperty
|
|
14228
|
+
function defineProperty(target, property, value) {
|
|
13662
14229
|
Object.defineProperty(target, property.name, {
|
|
13663
14230
|
enumerable: !property.isReference,
|
|
13664
14231
|
writable: true,
|
|
@@ -13809,7 +14376,7 @@
|
|
|
13809
14376
|
this.properties.define(element, '$parent', { enumerable: false, writable: true });
|
|
13810
14377
|
this.properties.define(element, '$instanceOf', { enumerable: false, writable: true });
|
|
13811
14378
|
|
|
13812
|
-
forEach(properties, function(a, key) {
|
|
14379
|
+
forEach$2(properties, function(a, key) {
|
|
13813
14380
|
if (isObject(a) && a.value !== undefined) {
|
|
13814
14381
|
element[a.name] = a.value;
|
|
13815
14382
|
} else {
|
|
@@ -13878,7 +14445,7 @@
|
|
|
13878
14445
|
|
|
13879
14446
|
var fromCharCode = String.fromCharCode;
|
|
13880
14447
|
|
|
13881
|
-
var hasOwnProperty
|
|
14448
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
13882
14449
|
|
|
13883
14450
|
var ENTITY_PATTERN = /&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig;
|
|
13884
14451
|
|
|
@@ -13900,7 +14467,7 @@
|
|
|
13900
14467
|
|
|
13901
14468
|
// reserved names, i.e.
|
|
13902
14469
|
if (z) {
|
|
13903
|
-
if (hasOwnProperty
|
|
14470
|
+
if (hasOwnProperty.call(ENTITY_MAPPING, z)) {
|
|
13904
14471
|
return ENTITY_MAPPING[z];
|
|
13905
14472
|
} else {
|
|
13906
14473
|
|
|
@@ -13938,11 +14505,11 @@
|
|
|
13938
14505
|
|
|
13939
14506
|
var XSI_URI = 'http://www.w3.org/2001/XMLSchema-instance';
|
|
13940
14507
|
var XSI_PREFIX = 'xsi';
|
|
13941
|
-
var XSI_TYPE = 'xsi:type';
|
|
14508
|
+
var XSI_TYPE$1 = 'xsi:type';
|
|
13942
14509
|
|
|
13943
14510
|
var NON_WHITESPACE_OUTSIDE_ROOT_NODE = 'non-whitespace outside of root node';
|
|
13944
14511
|
|
|
13945
|
-
function error(msg) {
|
|
14512
|
+
function error$1(msg) {
|
|
13946
14513
|
return new Error(msg);
|
|
13947
14514
|
}
|
|
13948
14515
|
|
|
@@ -14063,7 +14630,7 @@
|
|
|
14063
14630
|
*/
|
|
14064
14631
|
function handleError(err) {
|
|
14065
14632
|
if (!(err instanceof Error)) {
|
|
14066
|
-
err = error(err);
|
|
14633
|
+
err = error$1(err);
|
|
14067
14634
|
}
|
|
14068
14635
|
|
|
14069
14636
|
returnError = err;
|
|
@@ -14083,7 +14650,7 @@
|
|
|
14083
14650
|
}
|
|
14084
14651
|
|
|
14085
14652
|
if (!(err instanceof Error)) {
|
|
14086
|
-
err = error(err);
|
|
14653
|
+
err = error$1(err);
|
|
14087
14654
|
}
|
|
14088
14655
|
|
|
14089
14656
|
onWarning(err, getContext);
|
|
@@ -14100,7 +14667,7 @@
|
|
|
14100
14667
|
this['on'] = function(name, cb) {
|
|
14101
14668
|
|
|
14102
14669
|
if (typeof cb !== 'function') {
|
|
14103
|
-
throw error('required args <name, cb>');
|
|
14670
|
+
throw error$1('required args <name, cb>');
|
|
14104
14671
|
}
|
|
14105
14672
|
|
|
14106
14673
|
switch (name) {
|
|
@@ -14114,7 +14681,7 @@
|
|
|
14114
14681
|
case 'question': onQuestion = cb; break; // <? .... ?>
|
|
14115
14682
|
case 'comment': onComment = cb; break;
|
|
14116
14683
|
default:
|
|
14117
|
-
throw error('unsupported event: ' + name);
|
|
14684
|
+
throw error$1('unsupported event: ' + name);
|
|
14118
14685
|
}
|
|
14119
14686
|
|
|
14120
14687
|
return this;
|
|
@@ -14141,7 +14708,7 @@
|
|
|
14141
14708
|
}
|
|
14142
14709
|
|
|
14143
14710
|
if (typeof nsMap !== 'object') {
|
|
14144
|
-
throw error('required args <nsMap={}>');
|
|
14711
|
+
throw error$1('required args <nsMap={}>');
|
|
14145
14712
|
}
|
|
14146
14713
|
|
|
14147
14714
|
var _nsUriToPrefix = {}, k;
|
|
@@ -14168,7 +14735,7 @@
|
|
|
14168
14735
|
*/
|
|
14169
14736
|
this['parse'] = function(xml) {
|
|
14170
14737
|
if (typeof xml !== 'string') {
|
|
14171
|
-
throw error('required args <xml=string>');
|
|
14738
|
+
throw error$1('required args <xml=string>');
|
|
14172
14739
|
}
|
|
14173
14740
|
|
|
14174
14741
|
returnError = null;
|
|
@@ -14477,7 +15044,7 @@
|
|
|
14477
15044
|
// end: normalize ns attribute name
|
|
14478
15045
|
|
|
14479
15046
|
// normalize xsi:type ns attribute value
|
|
14480
|
-
if (name === XSI_TYPE) {
|
|
15047
|
+
if (name === XSI_TYPE$1) {
|
|
14481
15048
|
w = value.indexOf(':');
|
|
14482
15049
|
|
|
14483
15050
|
if (w !== -1) {
|
|
@@ -14523,7 +15090,7 @@
|
|
|
14523
15090
|
// end: normalize ns attribute name
|
|
14524
15091
|
|
|
14525
15092
|
// normalize xsi:type ns attribute value
|
|
14526
|
-
if (name === XSI_TYPE) {
|
|
15093
|
+
if (name === XSI_TYPE$1) {
|
|
14527
15094
|
w = value.indexOf(':');
|
|
14528
15095
|
|
|
14529
15096
|
if (w !== -1) {
|
|
@@ -14966,14 +15533,14 @@
|
|
|
14966
15533
|
'xml': 'http://www.w3.org/XML/1998/namespace'
|
|
14967
15534
|
};
|
|
14968
15535
|
|
|
14969
|
-
var XSI_TYPE
|
|
15536
|
+
var XSI_TYPE = 'xsi:type';
|
|
14970
15537
|
|
|
14971
15538
|
function serializeFormat(element) {
|
|
14972
15539
|
return element.xml && element.xml.serialize;
|
|
14973
15540
|
}
|
|
14974
15541
|
|
|
14975
15542
|
function serializeAsType(element) {
|
|
14976
|
-
return serializeFormat(element) === XSI_TYPE
|
|
15543
|
+
return serializeFormat(element) === XSI_TYPE;
|
|
14977
15544
|
}
|
|
14978
15545
|
|
|
14979
15546
|
function serializeAsProperty(element) {
|
|
@@ -15015,7 +15582,7 @@
|
|
|
15015
15582
|
return prefixedToName(nameNs, pkg);
|
|
15016
15583
|
}
|
|
15017
15584
|
|
|
15018
|
-
function error
|
|
15585
|
+
function error(message) {
|
|
15019
15586
|
return new Error(message);
|
|
15020
15587
|
}
|
|
15021
15588
|
|
|
@@ -15073,7 +15640,7 @@
|
|
|
15073
15640
|
this.addElement = function(element) {
|
|
15074
15641
|
|
|
15075
15642
|
if (!element) {
|
|
15076
|
-
throw error
|
|
15643
|
+
throw error('expected element');
|
|
15077
15644
|
}
|
|
15078
15645
|
|
|
15079
15646
|
var elementsById = this.elementsById;
|
|
@@ -15094,7 +15661,7 @@
|
|
|
15094
15661
|
}
|
|
15095
15662
|
|
|
15096
15663
|
if (elementsById[id]) {
|
|
15097
|
-
throw error
|
|
15664
|
+
throw error('duplicate ID <' + id + '>');
|
|
15098
15665
|
}
|
|
15099
15666
|
|
|
15100
15667
|
elementsById[id] = element;
|
|
@@ -15154,7 +15721,7 @@
|
|
|
15154
15721
|
ReferenceHandler.prototype.handleNode = function(node) {
|
|
15155
15722
|
|
|
15156
15723
|
if (this.element) {
|
|
15157
|
-
throw error
|
|
15724
|
+
throw error('expected no sub nodes');
|
|
15158
15725
|
} else {
|
|
15159
15726
|
this.element = this.createReference(node);
|
|
15160
15727
|
}
|
|
@@ -15238,7 +15805,7 @@
|
|
|
15238
15805
|
bodyProperty = descriptor.bodyProperty;
|
|
15239
15806
|
|
|
15240
15807
|
if (!bodyProperty) {
|
|
15241
|
-
throw error
|
|
15808
|
+
throw error('unexpected body text <' + text + '>');
|
|
15242
15809
|
}
|
|
15243
15810
|
|
|
15244
15811
|
BodyHandler.prototype.handleText.call(this, text);
|
|
@@ -15271,7 +15838,7 @@
|
|
|
15271
15838
|
model = this.model,
|
|
15272
15839
|
propNameNs;
|
|
15273
15840
|
|
|
15274
|
-
forEach(attributes, function(value, name) {
|
|
15841
|
+
forEach$2(attributes, function(value, name) {
|
|
15275
15842
|
|
|
15276
15843
|
var prop = descriptor.propertiesByName[name],
|
|
15277
15844
|
values;
|
|
@@ -15289,7 +15856,7 @@
|
|
|
15289
15856
|
// IDREFS: parse references as whitespace-separated list
|
|
15290
15857
|
values = value.split(' ');
|
|
15291
15858
|
|
|
15292
|
-
forEach(values, function(v) {
|
|
15859
|
+
forEach$2(values, function(v) {
|
|
15293
15860
|
context.addReference({
|
|
15294
15861
|
element: instance,
|
|
15295
15862
|
property: prop.ns.name,
|
|
@@ -15344,7 +15911,7 @@
|
|
|
15344
15911
|
if (property && !property.isAttr) {
|
|
15345
15912
|
|
|
15346
15913
|
if (serializeAsType(property)) {
|
|
15347
|
-
elementTypeName = node.attributes[XSI_TYPE
|
|
15914
|
+
elementTypeName = node.attributes[XSI_TYPE];
|
|
15348
15915
|
|
|
15349
15916
|
// xsi type is optional, if it does not exists the
|
|
15350
15917
|
// default type is assumed
|
|
@@ -15394,7 +15961,7 @@
|
|
|
15394
15961
|
}
|
|
15395
15962
|
}
|
|
15396
15963
|
|
|
15397
|
-
throw error
|
|
15964
|
+
throw error('unrecognized element <' + nameNs.name + '>');
|
|
15398
15965
|
};
|
|
15399
15966
|
|
|
15400
15967
|
ElementHandler.prototype.toString = function() {
|
|
@@ -15497,7 +16064,7 @@
|
|
|
15497
16064
|
//
|
|
15498
16065
|
// this ensures we don't mistakenly import wrong namespace elements
|
|
15499
16066
|
if (!type.hasType(typeName)) {
|
|
15500
|
-
throw error
|
|
16067
|
+
throw error('unexpected element <' + node.originalName + '>');
|
|
15501
16068
|
}
|
|
15502
16069
|
|
|
15503
16070
|
return ElementHandler.prototype.createElement.call(this, node);
|
|
@@ -15665,7 +16232,7 @@
|
|
|
15665
16232
|
|
|
15666
16233
|
return true;
|
|
15667
16234
|
} else {
|
|
15668
|
-
throw error
|
|
16235
|
+
throw error(message);
|
|
15669
16236
|
}
|
|
15670
16237
|
}
|
|
15671
16238
|
|
|
@@ -15846,7 +16413,7 @@
|
|
|
15846
16413
|
var rootElement = rootHandler.element;
|
|
15847
16414
|
|
|
15848
16415
|
if (!err && !rootElement) {
|
|
15849
|
-
err = error
|
|
16416
|
+
err = error('failed to parse document as <' + rootHandler.type.$descriptor.name + '>');
|
|
15850
16417
|
}
|
|
15851
16418
|
|
|
15852
16419
|
var warnings = context.warnings;
|
|
@@ -16033,7 +16600,7 @@
|
|
|
16033
16600
|
}
|
|
16034
16601
|
|
|
16035
16602
|
// do not serialize defaults
|
|
16036
|
-
if (!has(element, name)) {
|
|
16603
|
+
if (!has$2(element, name)) {
|
|
16037
16604
|
return false;
|
|
16038
16605
|
}
|
|
16039
16606
|
|
|
@@ -16069,7 +16636,7 @@
|
|
|
16069
16636
|
'&': 'amp'
|
|
16070
16637
|
};
|
|
16071
16638
|
|
|
16072
|
-
function escape
|
|
16639
|
+
function escape(str, charPattern, replaceMap) {
|
|
16073
16640
|
|
|
16074
16641
|
// ensure we are handling strings here
|
|
16075
16642
|
str = isString(str) ? str : '' + str;
|
|
@@ -16086,11 +16653,11 @@
|
|
|
16086
16653
|
* @return {String} the escaped string
|
|
16087
16654
|
*/
|
|
16088
16655
|
function escapeAttr(str) {
|
|
16089
|
-
return escape
|
|
16656
|
+
return escape(str, ESCAPE_ATTR_CHARS, ESCAPE_ATTR_MAP);
|
|
16090
16657
|
}
|
|
16091
16658
|
|
|
16092
16659
|
function escapeBody(str) {
|
|
16093
|
-
return escape
|
|
16660
|
+
return escape(str, ESCAPE_CHARS, ESCAPE_MAP);
|
|
16094
16661
|
}
|
|
16095
16662
|
|
|
16096
16663
|
function filterAttributes(props) {
|
|
@@ -16262,7 +16829,7 @@
|
|
|
16262
16829
|
|
|
16263
16830
|
var attributes = [];
|
|
16264
16831
|
|
|
16265
|
-
forEach(element, function(val, key) {
|
|
16832
|
+
forEach$2(element, function(val, key) {
|
|
16266
16833
|
|
|
16267
16834
|
var nonNsAttr;
|
|
16268
16835
|
|
|
@@ -16270,7 +16837,7 @@
|
|
|
16270
16837
|
body.push(new BodySerializer().build({ type: 'String' }, val));
|
|
16271
16838
|
} else
|
|
16272
16839
|
if (key === '$children') {
|
|
16273
|
-
forEach(val, function(child) {
|
|
16840
|
+
forEach$2(val, function(child) {
|
|
16274
16841
|
body.push(new ElementSerializer(self).build(child));
|
|
16275
16842
|
});
|
|
16276
16843
|
} else
|
|
@@ -16340,7 +16907,7 @@
|
|
|
16340
16907
|
// parse namespace attributes first
|
|
16341
16908
|
// and log them. push non namespace attributes to a list
|
|
16342
16909
|
// and process them later
|
|
16343
|
-
forEach(genericAttrs, function(value, name) {
|
|
16910
|
+
forEach$2(genericAttrs, function(value, name) {
|
|
16344
16911
|
|
|
16345
16912
|
var nonNsAttr = self.parseNsAttribute(element, name, value);
|
|
16346
16913
|
|
|
@@ -16356,11 +16923,11 @@
|
|
|
16356
16923
|
|
|
16357
16924
|
var self = this;
|
|
16358
16925
|
|
|
16359
|
-
forEach(attributes, function(attr) {
|
|
16926
|
+
forEach$2(attributes, function(attr) {
|
|
16360
16927
|
|
|
16361
16928
|
// do not serialize xsi:type attribute
|
|
16362
16929
|
// it is set manually based on the actual implementation type
|
|
16363
|
-
if (attr.name === XSI_TYPE
|
|
16930
|
+
if (attr.name === XSI_TYPE) {
|
|
16364
16931
|
return;
|
|
16365
16932
|
}
|
|
16366
16933
|
|
|
@@ -16381,7 +16948,7 @@
|
|
|
16381
16948
|
body = this.body,
|
|
16382
16949
|
element = this.element;
|
|
16383
16950
|
|
|
16384
|
-
forEach(properties, function(p) {
|
|
16951
|
+
forEach$2(properties, function(p) {
|
|
16385
16952
|
var value = element.get(p.name),
|
|
16386
16953
|
isReference = p.isReference,
|
|
16387
16954
|
isMany = p.isMany;
|
|
@@ -16394,12 +16961,12 @@
|
|
|
16394
16961
|
body.push(new BodySerializer().build(p, value[0]));
|
|
16395
16962
|
} else
|
|
16396
16963
|
if (isSimple(p.type)) {
|
|
16397
|
-
forEach(value, function(v) {
|
|
16964
|
+
forEach$2(value, function(v) {
|
|
16398
16965
|
body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
|
|
16399
16966
|
});
|
|
16400
16967
|
} else
|
|
16401
16968
|
if (isReference) {
|
|
16402
|
-
forEach(value, function(v) {
|
|
16969
|
+
forEach$2(value, function(v) {
|
|
16403
16970
|
body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
|
|
16404
16971
|
});
|
|
16405
16972
|
} else {
|
|
@@ -16409,7 +16976,7 @@
|
|
|
16409
16976
|
var asType = serializeAsType(p),
|
|
16410
16977
|
asProperty = serializeAsProperty(p);
|
|
16411
16978
|
|
|
16412
|
-
forEach(value, function(v) {
|
|
16979
|
+
forEach$2(value, function(v) {
|
|
16413
16980
|
var serializer;
|
|
16414
16981
|
|
|
16415
16982
|
if (asType) {
|
|
@@ -16517,7 +17084,7 @@
|
|
|
16517
17084
|
var self = this,
|
|
16518
17085
|
element = this.element;
|
|
16519
17086
|
|
|
16520
|
-
forEach(properties, function(p) {
|
|
17087
|
+
forEach$2(properties, function(p) {
|
|
16521
17088
|
|
|
16522
17089
|
var value = element.get(p.name);
|
|
16523
17090
|
|
|
@@ -16528,7 +17095,7 @@
|
|
|
16528
17095
|
}
|
|
16529
17096
|
else {
|
|
16530
17097
|
var values = [];
|
|
16531
|
-
forEach(value, function(v) {
|
|
17098
|
+
forEach$2(value, function(v) {
|
|
16532
17099
|
values.push(v.id);
|
|
16533
17100
|
});
|
|
16534
17101
|
|
|
@@ -16584,7 +17151,7 @@
|
|
|
16584
17151
|
attrs = getNsAttrs(namespaces).concat(attrs);
|
|
16585
17152
|
}
|
|
16586
17153
|
|
|
16587
|
-
forEach(attrs, function(a) {
|
|
17154
|
+
forEach$2(attrs, function(a) {
|
|
16588
17155
|
writer
|
|
16589
17156
|
.append(' ')
|
|
16590
17157
|
.append(nsName(a.name)).append('="').append(a.value).append('"');
|
|
@@ -16611,7 +17178,7 @@
|
|
|
16611
17178
|
.indent();
|
|
16612
17179
|
}
|
|
16613
17180
|
|
|
16614
|
-
forEach(this.body, function(b) {
|
|
17181
|
+
forEach$2(this.body, function(b) {
|
|
16615
17182
|
b.serializeTo(writer);
|
|
16616
17183
|
});
|
|
16617
17184
|
|
|
@@ -16658,7 +17225,7 @@
|
|
|
16658
17225
|
typePrefix = (pkg.xml && pkg.xml.typePrefix) || '';
|
|
16659
17226
|
|
|
16660
17227
|
this.addAttribute(
|
|
16661
|
-
this.nsAttributeName(XSI_TYPE
|
|
17228
|
+
this.nsAttributeName(XSI_TYPE),
|
|
16662
17229
|
(typeNs.prefix ? typeNs.prefix + ':' : '') + typePrefix + descriptor.ns.localName
|
|
16663
17230
|
);
|
|
16664
17231
|
|
|
@@ -20410,8 +20977,8 @@
|
|
|
20410
20977
|
|
|
20411
20978
|
var name = "BPMN in Color";
|
|
20412
20979
|
var uri = "http://www.omg.org/spec/BPMN/non-normative/color/1.0";
|
|
20413
|
-
var prefix
|
|
20414
|
-
var types
|
|
20980
|
+
var prefix = "color";
|
|
20981
|
+
var types = [
|
|
20415
20982
|
{
|
|
20416
20983
|
name: "ColoredLabel",
|
|
20417
20984
|
"extends": [
|
|
@@ -20464,8 +21031,8 @@
|
|
|
20464
21031
|
var BpmnInColorPackage = {
|
|
20465
21032
|
name: name,
|
|
20466
21033
|
uri: uri,
|
|
20467
|
-
prefix: prefix
|
|
20468
|
-
types: types
|
|
21034
|
+
prefix: prefix,
|
|
21035
|
+
types: types,
|
|
20469
21036
|
enumerations: enumerations,
|
|
20470
21037
|
associations: associations
|
|
20471
21038
|
};
|
|
@@ -20545,7 +21112,7 @@
|
|
|
20545
21112
|
function ensureCompatDiRef(businessObject) {
|
|
20546
21113
|
|
|
20547
21114
|
// bpmnElement can have multiple independent DIs
|
|
20548
|
-
if (!has(businessObject, 'di')) {
|
|
21115
|
+
if (!has$2(businessObject, 'di')) {
|
|
20549
21116
|
Object.defineProperty(businessObject, 'di', {
|
|
20550
21117
|
enumerable: false,
|
|
20551
21118
|
get: function() {
|
|
@@ -20563,7 +21130,7 @@
|
|
|
20563
21130
|
*
|
|
20564
21131
|
* @return {boolean}
|
|
20565
21132
|
*/
|
|
20566
|
-
function is
|
|
21133
|
+
function is(element, type) {
|
|
20567
21134
|
return element.$instanceOf(type);
|
|
20568
21135
|
}
|
|
20569
21136
|
|
|
@@ -20574,7 +21141,7 @@
|
|
|
20574
21141
|
*/
|
|
20575
21142
|
function findDisplayCandidate(definitions) {
|
|
20576
21143
|
return find(definitions.rootElements, function(e) {
|
|
20577
|
-
return is
|
|
21144
|
+
return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
|
|
20578
21145
|
});
|
|
20579
21146
|
}
|
|
20580
21147
|
|
|
@@ -20680,7 +21247,7 @@
|
|
|
20680
21247
|
function handlePlane(plane) {
|
|
20681
21248
|
registerDi(plane);
|
|
20682
21249
|
|
|
20683
|
-
forEach(plane.planeElement, handlePlaneElement);
|
|
21250
|
+
forEach$2(plane.planeElement, handlePlaneElement);
|
|
20684
21251
|
}
|
|
20685
21252
|
|
|
20686
21253
|
function handlePlaneElement(planeElement) {
|
|
@@ -20758,9 +21325,9 @@
|
|
|
20758
21325
|
|
|
20759
21326
|
var ctx = visitRoot(rootElement, plane);
|
|
20760
21327
|
|
|
20761
|
-
if (is
|
|
21328
|
+
if (is(rootElement, 'bpmn:Process') || is(rootElement, 'bpmn:SubProcess')) {
|
|
20762
21329
|
handleProcess(rootElement, ctx);
|
|
20763
|
-
} else if (is
|
|
21330
|
+
} else if (is(rootElement, 'bpmn:Collaboration')) {
|
|
20764
21331
|
handleCollaboration(rootElement, ctx);
|
|
20765
21332
|
|
|
20766
21333
|
// force drawing of everything not yet drawn that is part of the target DI
|
|
@@ -20806,7 +21373,7 @@
|
|
|
20806
21373
|
// if they contain lanes with DI information.
|
|
20807
21374
|
// we do this to pass the free-floating lane test cases in the MIWG test suite
|
|
20808
21375
|
var processes = filter(rootElements, function(e) {
|
|
20809
|
-
return !isHandled(e) && is
|
|
21376
|
+
return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
|
|
20810
21377
|
});
|
|
20811
21378
|
|
|
20812
21379
|
processes.forEach(contextual(handleProcess, ctx));
|
|
@@ -20817,7 +21384,7 @@
|
|
|
20817
21384
|
}
|
|
20818
21385
|
|
|
20819
21386
|
function handleMessageFlows(messageFlows, context) {
|
|
20820
|
-
forEach(messageFlows, contextual(handleMessageFlow, context));
|
|
21387
|
+
forEach$2(messageFlows, contextual(handleMessageFlow, context));
|
|
20821
21388
|
}
|
|
20822
21389
|
|
|
20823
21390
|
function handleDataAssociation(association, context) {
|
|
@@ -20843,8 +21410,8 @@
|
|
|
20843
21410
|
|
|
20844
21411
|
function handleArtifacts(artifacts, context) {
|
|
20845
21412
|
|
|
20846
|
-
forEach(artifacts, function(e) {
|
|
20847
|
-
if (is
|
|
21413
|
+
forEach$2(artifacts, function(e) {
|
|
21414
|
+
if (is(e, 'bpmn:Association')) {
|
|
20848
21415
|
deferred.push(function() {
|
|
20849
21416
|
handleArtifact(e, context);
|
|
20850
21417
|
});
|
|
@@ -20860,8 +21427,8 @@
|
|
|
20860
21427
|
return;
|
|
20861
21428
|
}
|
|
20862
21429
|
|
|
20863
|
-
forEach(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20864
|
-
forEach(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
21430
|
+
forEach$2(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
21431
|
+
forEach$2(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
20865
21432
|
}
|
|
20866
21433
|
|
|
20867
21434
|
function handleSubProcess(subProcess, context) {
|
|
@@ -20872,11 +21439,11 @@
|
|
|
20872
21439
|
function handleFlowNode(flowNode, context) {
|
|
20873
21440
|
var childCtx = visitIfDi(flowNode, context);
|
|
20874
21441
|
|
|
20875
|
-
if (is
|
|
21442
|
+
if (is(flowNode, 'bpmn:SubProcess')) {
|
|
20876
21443
|
handleSubProcess(flowNode, childCtx || context);
|
|
20877
21444
|
}
|
|
20878
21445
|
|
|
20879
|
-
if (is
|
|
21446
|
+
if (is(flowNode, 'bpmn:Activity')) {
|
|
20880
21447
|
handleIoSpecification(flowNode.ioSpecification, context);
|
|
20881
21448
|
}
|
|
20882
21449
|
|
|
@@ -20888,8 +21455,8 @@
|
|
|
20888
21455
|
// * bpmn:CatchEvent
|
|
20889
21456
|
//
|
|
20890
21457
|
deferred.push(function() {
|
|
20891
|
-
forEach(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20892
|
-
forEach(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
21458
|
+
forEach$2(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
21459
|
+
forEach$2(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
20893
21460
|
});
|
|
20894
21461
|
}
|
|
20895
21462
|
|
|
@@ -20916,11 +21483,11 @@
|
|
|
20916
21483
|
}
|
|
20917
21484
|
|
|
20918
21485
|
function handleLaneSet(laneSet, context) {
|
|
20919
|
-
forEach(laneSet.lanes, contextual(handleLane, context));
|
|
21486
|
+
forEach$2(laneSet.lanes, contextual(handleLane, context));
|
|
20920
21487
|
}
|
|
20921
21488
|
|
|
20922
21489
|
function handleLaneSets(laneSets, context) {
|
|
20923
|
-
forEach(laneSets, contextual(handleLaneSet, context));
|
|
21490
|
+
forEach$2(laneSets, contextual(handleLaneSet, context));
|
|
20924
21491
|
}
|
|
20925
21492
|
|
|
20926
21493
|
function handleFlowElementsContainer(container, context) {
|
|
@@ -20932,20 +21499,20 @@
|
|
|
20932
21499
|
}
|
|
20933
21500
|
|
|
20934
21501
|
function handleFlowElements(flowElements, context) {
|
|
20935
|
-
forEach(flowElements, function(e) {
|
|
20936
|
-
if (is
|
|
21502
|
+
forEach$2(flowElements, function(e) {
|
|
21503
|
+
if (is(e, 'bpmn:SequenceFlow')) {
|
|
20937
21504
|
deferred.push(function() {
|
|
20938
21505
|
handleSequenceFlow(e, context);
|
|
20939
21506
|
});
|
|
20940
|
-
} else if (is
|
|
21507
|
+
} else if (is(e, 'bpmn:BoundaryEvent')) {
|
|
20941
21508
|
deferred.unshift(function() {
|
|
20942
21509
|
handleFlowNode(e, context);
|
|
20943
21510
|
});
|
|
20944
|
-
} else if (is
|
|
21511
|
+
} else if (is(e, 'bpmn:FlowNode')) {
|
|
20945
21512
|
handleFlowNode(e, context);
|
|
20946
|
-
} else if (is
|
|
21513
|
+
} else if (is(e, 'bpmn:DataObject')) ; else if (is(e, 'bpmn:DataStoreReference')) {
|
|
20947
21514
|
handleDataElement(e, context);
|
|
20948
|
-
} else if (is
|
|
21515
|
+
} else if (is(e, 'bpmn:DataObjectReference')) {
|
|
20949
21516
|
handleDataElement(e, context);
|
|
20950
21517
|
} else {
|
|
20951
21518
|
logError(
|
|
@@ -20970,7 +21537,7 @@
|
|
|
20970
21537
|
|
|
20971
21538
|
function handleCollaboration(collaboration, context) {
|
|
20972
21539
|
|
|
20973
|
-
forEach(collaboration.participants, contextual(handleParticipant, context));
|
|
21540
|
+
forEach$2(collaboration.participants, contextual(handleParticipant, context));
|
|
20974
21541
|
|
|
20975
21542
|
handleArtifacts(collaboration.artifacts, context);
|
|
20976
21543
|
|
|
@@ -20984,7 +21551,7 @@
|
|
|
20984
21551
|
function wireFlowNodeRefs(lane) {
|
|
20985
21552
|
|
|
20986
21553
|
// wire the virtual flowNodeRefs <-> relationship
|
|
20987
|
-
forEach(lane.flowNodeRef, function(flowNode) {
|
|
21554
|
+
forEach$2(lane.flowNodeRef, function(flowNode) {
|
|
20988
21555
|
var lanes = flowNode.get('lanes');
|
|
20989
21556
|
|
|
20990
21557
|
if (lanes) {
|
|
@@ -21078,7 +21645,7 @@
|
|
|
21078
21645
|
|
|
21079
21646
|
// traverse BPMN 2.0 document model,
|
|
21080
21647
|
// starting at definitions
|
|
21081
|
-
forEach(diagramsToImport, function(diagram) {
|
|
21648
|
+
forEach$2(diagramsToImport, function(diagram) {
|
|
21082
21649
|
walker.handleDefinitions(definitions, diagram);
|
|
21083
21650
|
});
|
|
21084
21651
|
|
|
@@ -21134,7 +21701,7 @@
|
|
|
21134
21701
|
var bpmnElement = bpmnDiagram.plane.bpmnElement,
|
|
21135
21702
|
rootElement = bpmnElement;
|
|
21136
21703
|
|
|
21137
|
-
if (!is(bpmnElement, 'bpmn:Process') && !is(bpmnElement, 'bpmn:Collaboration')) {
|
|
21704
|
+
if (!is$1(bpmnElement, 'bpmn:Process') && !is$1(bpmnElement, 'bpmn:Collaboration')) {
|
|
21138
21705
|
rootElement = findRootProcess(bpmnElement);
|
|
21139
21706
|
}
|
|
21140
21707
|
|
|
@@ -21142,11 +21709,11 @@
|
|
|
21142
21709
|
// collaboration, not the process
|
|
21143
21710
|
var collaboration;
|
|
21144
21711
|
|
|
21145
|
-
if (is(rootElement, 'bpmn:Collaboration')) {
|
|
21712
|
+
if (is$1(rootElement, 'bpmn:Collaboration')) {
|
|
21146
21713
|
collaboration = rootElement;
|
|
21147
21714
|
} else {
|
|
21148
21715
|
collaboration = find(definitions.rootElements, function(element) {
|
|
21149
|
-
if (!is(element, 'bpmn:Collaboration')) {
|
|
21716
|
+
if (!is$1(element, 'bpmn:Collaboration')) {
|
|
21150
21717
|
return;
|
|
21151
21718
|
}
|
|
21152
21719
|
|
|
@@ -21174,7 +21741,7 @@
|
|
|
21174
21741
|
var diagramsToImport = [ bpmnDiagram ];
|
|
21175
21742
|
var handledElements = [ bpmnElement ];
|
|
21176
21743
|
|
|
21177
|
-
forEach(definitions.diagrams, function(diagram) {
|
|
21744
|
+
forEach$2(definitions.diagrams, function(diagram) {
|
|
21178
21745
|
var businessObject = diagram.plane.bpmnElement;
|
|
21179
21746
|
|
|
21180
21747
|
if (
|
|
@@ -21193,7 +21760,7 @@
|
|
|
21193
21760
|
function selfAndAllFlowElements(elements) {
|
|
21194
21761
|
var result = [];
|
|
21195
21762
|
|
|
21196
|
-
forEach(elements, function(element) {
|
|
21763
|
+
forEach$2(elements, function(element) {
|
|
21197
21764
|
if (!element) {
|
|
21198
21765
|
return;
|
|
21199
21766
|
}
|
|
@@ -21210,7 +21777,7 @@
|
|
|
21210
21777
|
var parent = element;
|
|
21211
21778
|
|
|
21212
21779
|
while (parent) {
|
|
21213
|
-
if (is(parent, 'bpmn:Process')) {
|
|
21780
|
+
if (is$1(parent, 'bpmn:Process')) {
|
|
21214
21781
|
return parent;
|
|
21215
21782
|
}
|
|
21216
21783
|
|
|
@@ -21286,13 +21853,13 @@
|
|
|
21286
21853
|
var lightbox;
|
|
21287
21854
|
|
|
21288
21855
|
function createLightbox() {
|
|
21289
|
-
lightbox = domify(LIGHTBOX_MARKUP);
|
|
21856
|
+
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
21290
21857
|
|
|
21291
|
-
assign$1(lightbox, LIGHTBOX_STYLES);
|
|
21292
|
-
assign$1(query('svg', lightbox), LOGO_STYLES);
|
|
21293
|
-
assign$1(query('.backdrop', lightbox), BACKDROP_STYLES);
|
|
21294
|
-
assign$1(query('.notice', lightbox), NOTICE_STYLES);
|
|
21295
|
-
assign$1(query('.link', lightbox), LINK_STYLES, {
|
|
21858
|
+
assign$1$1(lightbox, LIGHTBOX_STYLES);
|
|
21859
|
+
assign$1$1(query$1('svg', lightbox), LOGO_STYLES);
|
|
21860
|
+
assign$1$1(query$1('.backdrop', lightbox), BACKDROP_STYLES);
|
|
21861
|
+
assign$1$1(query$1('.notice', lightbox), NOTICE_STYLES);
|
|
21862
|
+
assign$1$1(query$1('.link', lightbox), LINK_STYLES, {
|
|
21296
21863
|
'margin': '15px 20px 15px 10px',
|
|
21297
21864
|
'alignSelf': 'center'
|
|
21298
21865
|
});
|
|
@@ -21303,7 +21870,7 @@
|
|
|
21303
21870
|
if (!lightbox) {
|
|
21304
21871
|
createLightbox();
|
|
21305
21872
|
|
|
21306
|
-
delegate.bind(lightbox, '.backdrop', 'click', function(event) {
|
|
21873
|
+
delegate$1.bind(lightbox, '.backdrop', 'click', function(event) {
|
|
21307
21874
|
document.body.removeChild(lightbox);
|
|
21308
21875
|
});
|
|
21309
21876
|
}
|
|
@@ -21722,7 +22289,7 @@
|
|
|
21722
22289
|
var canvas = self.get('canvas');
|
|
21723
22290
|
|
|
21724
22291
|
var contentNode = canvas.getActiveLayer(),
|
|
21725
|
-
defsNode = query('defs', canvas._svg);
|
|
22292
|
+
defsNode = query$1('defs', canvas._svg);
|
|
21726
22293
|
|
|
21727
22294
|
var contents = innerSVG(contentNode),
|
|
21728
22295
|
defs = defsNode ? '<defs>' + innerSVG(defsNode) + '</defs>' : '';
|
|
@@ -21824,7 +22391,7 @@
|
|
|
21824
22391
|
Diagram.prototype.destroy.call(this);
|
|
21825
22392
|
|
|
21826
22393
|
// dom detach
|
|
21827
|
-
remove$
|
|
22394
|
+
remove$3(this._container);
|
|
21828
22395
|
};
|
|
21829
22396
|
|
|
21830
22397
|
/**
|
|
@@ -21867,7 +22434,7 @@
|
|
|
21867
22434
|
}
|
|
21868
22435
|
|
|
21869
22436
|
if (typeof parentNode === 'string') {
|
|
21870
|
-
parentNode = query(parentNode);
|
|
22437
|
+
parentNode = query$1(parentNode);
|
|
21871
22438
|
}
|
|
21872
22439
|
|
|
21873
22440
|
parentNode.appendChild(this._container);
|
|
@@ -21935,9 +22502,9 @@
|
|
|
21935
22502
|
|
|
21936
22503
|
BaseViewer.prototype._createContainer = function(options) {
|
|
21937
22504
|
|
|
21938
|
-
var container = domify('<div class="bjs-container"></div>');
|
|
22505
|
+
var container = domify$1('<div class="bjs-container"></div>');
|
|
21939
22506
|
|
|
21940
|
-
assign$1(container, {
|
|
22507
|
+
assign$1$1(container, {
|
|
21941
22508
|
width: ensureUnit(options.width),
|
|
21942
22509
|
height: ensureUnit(options.height),
|
|
21943
22510
|
position: options.position
|
|
@@ -22031,10 +22598,10 @@
|
|
|
22031
22598
|
img +
|
|
22032
22599
|
'</a>';
|
|
22033
22600
|
|
|
22034
|
-
var linkElement = domify(linkMarkup);
|
|
22601
|
+
var linkElement = domify$1(linkMarkup);
|
|
22035
22602
|
|
|
22036
|
-
assign$1(query('svg', linkElement), LOGO_STYLES);
|
|
22037
|
-
assign$1(linkElement, LINK_STYLES, {
|
|
22603
|
+
assign$1$1(query$1('svg', linkElement), LOGO_STYLES);
|
|
22604
|
+
assign$1$1(linkElement, LINK_STYLES, {
|
|
22038
22605
|
position: 'absolute',
|
|
22039
22606
|
bottom: '15px',
|
|
22040
22607
|
right: '15px',
|
|
@@ -22043,7 +22610,7 @@
|
|
|
22043
22610
|
|
|
22044
22611
|
container.appendChild(linkElement);
|
|
22045
22612
|
|
|
22046
|
-
componentEvent.bind(linkElement, 'click', function(event) {
|
|
22613
|
+
componentEvent$1.bind(linkElement, 'click', function(event) {
|
|
22047
22614
|
open();
|
|
22048
22615
|
|
|
22049
22616
|
event.preventDefault();
|
|
@@ -22107,7 +22674,7 @@
|
|
|
22107
22674
|
|
|
22108
22675
|
// modules the viewer is composed of
|
|
22109
22676
|
Viewer.prototype._modules = [
|
|
22110
|
-
CoreModule,
|
|
22677
|
+
CoreModule$1,
|
|
22111
22678
|
TranslateModule,
|
|
22112
22679
|
SelectionModule,
|
|
22113
22680
|
OverlaysModule,
|
|
@@ -22119,4 +22686,4 @@
|
|
|
22119
22686
|
|
|
22120
22687
|
return Viewer;
|
|
22121
22688
|
|
|
22122
|
-
}))
|
|
22689
|
+
}));
|