camunda-bpmn-js 0.20.0 → 0.21.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.
@@ -14,10 +14,10 @@
14
14
  * @return {Array<?>}
15
15
  */
16
16
 
17
- const nativeToString$4 = Object.prototype.toString;
18
- const nativeHasOwnProperty$3 = Object.prototype.hasOwnProperty;
17
+ const nativeToString$1 = Object.prototype.toString;
18
+ const nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
19
19
 
20
- function isUndefined$4(obj) {
20
+ function isUndefined$2(obj) {
21
21
  return obj === undefined;
22
22
  }
23
23
 
@@ -25,20 +25,20 @@
25
25
  return obj !== undefined;
26
26
  }
27
27
 
28
- function isArray$4(obj) {
29
- return nativeToString$4.call(obj) === '[object Array]';
28
+ function isArray$2(obj) {
29
+ return nativeToString$1.call(obj) === '[object Array]';
30
30
  }
31
31
 
32
- function isObject$1(obj) {
33
- return nativeToString$4.call(obj) === '[object Object]';
32
+ function isObject(obj) {
33
+ return nativeToString$1.call(obj) === '[object Object]';
34
34
  }
35
35
 
36
36
  function isNumber(obj) {
37
- return nativeToString$4.call(obj) === '[object Number]';
37
+ return nativeToString$1.call(obj) === '[object Number]';
38
38
  }
39
39
 
40
- function isFunction$1(obj) {
41
- const tag = nativeToString$4.call(obj);
40
+ function isFunction(obj) {
41
+ const tag = nativeToString$1.call(obj);
42
42
 
43
43
  return (
44
44
  tag === '[object Function]' ||
@@ -49,8 +49,8 @@
49
49
  );
50
50
  }
51
51
 
52
- function isString$3(obj) {
53
- return nativeToString$4.call(obj) === '[object String]';
52
+ function isString(obj) {
53
+ return nativeToString$1.call(obj) === '[object String]';
54
54
  }
55
55
 
56
56
  /**
@@ -61,8 +61,8 @@
61
61
  *
62
62
  * @return {Boolean}
63
63
  */
64
- function has$3(target, key) {
65
- return nativeHasOwnProperty$3.call(target, key);
64
+ function has$1(target, key) {
65
+ return nativeHasOwnProperty$1.call(target, key);
66
66
  }
67
67
 
68
68
  /**
@@ -73,13 +73,13 @@
73
73
  *
74
74
  * @return {Object}
75
75
  */
76
- function find$1(collection, matcher) {
76
+ function find(collection, matcher) {
77
77
 
78
- matcher = toMatcher$1(matcher);
78
+ matcher = toMatcher(matcher);
79
79
 
80
80
  let match;
81
81
 
82
- forEach$3(collection, function(val, key) {
82
+ forEach$1(collection, function(val, key) {
83
83
  if (matcher(val, key)) {
84
84
  match = val;
85
85
 
@@ -92,6 +92,32 @@
92
92
  }
93
93
 
94
94
 
95
+ /**
96
+ * Find element index in collection.
97
+ *
98
+ * @param {Array|Object} collection
99
+ * @param {Function} matcher
100
+ *
101
+ * @return {Object}
102
+ */
103
+ function findIndex(collection, matcher) {
104
+
105
+ matcher = toMatcher(matcher);
106
+
107
+ let idx = isArray$2(collection) ? -1 : undefined;
108
+
109
+ forEach$1(collection, function(val, key) {
110
+ if (matcher(val, key)) {
111
+ idx = key;
112
+
113
+ return false;
114
+ }
115
+ });
116
+
117
+ return idx;
118
+ }
119
+
120
+
95
121
  /**
96
122
  * Find element in collection.
97
123
  *
@@ -100,11 +126,11 @@
100
126
  *
101
127
  * @return {Array} result
102
128
  */
103
- function filter$1(collection, matcher) {
129
+ function filter(collection, matcher) {
104
130
 
105
131
  let result = [];
106
132
 
107
- forEach$3(collection, function(val, key) {
133
+ forEach$1(collection, function(val, key) {
108
134
  if (matcher(val, key)) {
109
135
  result.push(val);
110
136
  }
@@ -123,20 +149,20 @@
123
149
  *
124
150
  * @return {Object} return result that stopped the iteration
125
151
  */
126
- function forEach$3(collection, iterator) {
152
+ function forEach$1(collection, iterator) {
127
153
 
128
154
  let val,
129
155
  result;
130
156
 
131
- if (isUndefined$4(collection)) {
157
+ if (isUndefined$2(collection)) {
132
158
  return;
133
159
  }
134
160
 
135
- const convertKey = isArray$4(collection) ? toNum$3 : identity$3;
161
+ const convertKey = isArray$2(collection) ? toNum$1 : identity$1;
136
162
 
137
163
  for (let key in collection) {
138
164
 
139
- if (has$3(collection, key)) {
165
+ if (has$1(collection, key)) {
140
166
  val = collection[key];
141
167
 
142
168
  result = iterator(val, convertKey(key));
@@ -160,7 +186,7 @@
160
186
  */
161
187
  function reduce(collection, iterator, result) {
162
188
 
163
- forEach$3(collection, function(value, idx) {
189
+ forEach$1(collection, function(value, idx) {
164
190
  result = iterator(result, value, idx);
165
191
  });
166
192
 
@@ -196,7 +222,7 @@
196
222
  */
197
223
  function some(collection, matcher) {
198
224
 
199
- return !!find$1(collection, matcher);
225
+ return !!find(collection, matcher);
200
226
  }
201
227
 
202
228
 
@@ -213,7 +239,7 @@
213
239
 
214
240
  let result = [];
215
241
 
216
- forEach$3(collection, function(val, key) {
242
+ forEach$1(collection, function(val, key) {
217
243
  result.push(fn(val, key));
218
244
  });
219
245
 
@@ -246,18 +272,18 @@
246
272
  }
247
273
 
248
274
 
249
- function toMatcher$1(matcher) {
250
- return isFunction$1(matcher) ? matcher : (e) => {
275
+ function toMatcher(matcher) {
276
+ return isFunction(matcher) ? matcher : (e) => {
251
277
  return e === matcher;
252
278
  };
253
279
  }
254
280
 
255
281
 
256
- function identity$3(arg) {
282
+ function identity$1(arg) {
257
283
  return arg;
258
284
  }
259
285
 
260
- function toNum$3(arg) {
286
+ function toNum$1(arg) {
261
287
  return Number(arg);
262
288
  }
263
289
 
@@ -343,7 +369,7 @@
343
369
  *
344
370
  * @return {Function} bound function
345
371
  */
346
- function bind$3(fn, target) {
372
+ function bind$2(fn, target) {
347
373
  return fn.bind(target);
348
374
  }
349
375
 
@@ -355,10 +381,34 @@
355
381
  *
356
382
  * @return {Object} the target
357
383
  */
358
- function assign$4(target, ...others) {
384
+ function assign$1(target, ...others) {
359
385
  return Object.assign(target, ...others);
360
386
  }
361
387
 
388
+ /**
389
+ * Pick given properties from the target object.
390
+ *
391
+ * @param {Object} target
392
+ * @param {Array} properties
393
+ *
394
+ * @return {Object} target
395
+ */
396
+ function pick(target, properties) {
397
+
398
+ let result = {};
399
+
400
+ let obj = Object(target);
401
+
402
+ forEach$1(properties, function(prop) {
403
+
404
+ if (prop in obj) {
405
+ result[prop] = target[prop];
406
+ }
407
+ });
408
+
409
+ return result;
410
+ }
411
+
362
412
  /**
363
413
  * Pick all target properties, excluding the given ones.
364
414
  *
@@ -373,7 +423,7 @@
373
423
 
374
424
  let obj = Object(target);
375
425
 
376
- forEach$3(obj, function(prop, key) {
426
+ forEach$1(obj, function(prop, key) {
377
427
 
378
428
  if (properties.indexOf(key) === -1) {
379
429
  result[key] = prop;
@@ -1325,14 +1375,17 @@
1325
1375
  * @return {Array<?>}
1326
1376
  */
1327
1377
 
1328
- var nativeToString$3 = Object.prototype.toString;
1329
- var nativeHasOwnProperty$2 = Object.prototype.hasOwnProperty;
1330
- function isUndefined$3(obj) {
1378
+ const nativeToString = Object.prototype.toString;
1379
+ const nativeHasOwnProperty = Object.prototype.hasOwnProperty;
1380
+
1381
+ function isUndefined$1(obj) {
1331
1382
  return obj === undefined;
1332
1383
  }
1333
- function isArray$3(obj) {
1334
- return nativeToString$3.call(obj) === '[object Array]';
1384
+
1385
+ function isArray$1(obj) {
1386
+ return nativeToString.call(obj) === '[object Array]';
1335
1387
  }
1388
+
1336
1389
  /**
1337
1390
  * Return true, if target owns a property with the given key.
1338
1391
  *
@@ -1341,10 +1394,11 @@
1341
1394
  *
1342
1395
  * @return {Boolean}
1343
1396
  */
1344
-
1345
- function has$2(target, key) {
1346
- return nativeHasOwnProperty$2.call(target, key);
1397
+ function has(target, key) {
1398
+ return nativeHasOwnProperty.call(target, key);
1347
1399
  }
1400
+
1401
+
1348
1402
  /**
1349
1403
  * Iterate over collection; returning something
1350
1404
  * (non-undefined) will stop iteration.
@@ -1354,19 +1408,22 @@
1354
1408
  *
1355
1409
  * @return {Object} return result that stopped the iteration
1356
1410
  */
1411
+ function forEach(collection, iterator) {
1357
1412
 
1358
- function forEach$2(collection, iterator) {
1359
- var val, result;
1413
+ let val,
1414
+ result;
1360
1415
 
1361
- if (isUndefined$3(collection)) {
1416
+ if (isUndefined$1(collection)) {
1362
1417
  return;
1363
1418
  }
1364
1419
 
1365
- var convertKey = isArray$3(collection) ? toNum$2 : identity$2;
1420
+ const convertKey = isArray$1(collection) ? toNum : identity;
1366
1421
 
1367
- for (var key in collection) {
1368
- if (has$2(collection, key)) {
1422
+ for (let key in collection) {
1423
+
1424
+ if (has(collection, key)) {
1369
1425
  val = collection[key];
1426
+
1370
1427
  result = iterator(val, convertKey(key));
1371
1428
 
1372
1429
  if (result === false) {
@@ -1376,11 +1433,12 @@
1376
1433
  }
1377
1434
  }
1378
1435
 
1379
- function identity$2(arg) {
1436
+
1437
+ function identity(arg) {
1380
1438
  return arg;
1381
1439
  }
1382
1440
 
1383
- function toNum$2(arg) {
1441
+ function toNum(arg) {
1384
1442
  return Number(arg);
1385
1443
  }
1386
1444
 
@@ -1392,15 +1450,15 @@
1392
1450
  *
1393
1451
  * @return {Element} the element
1394
1452
  */
1395
- function assign$3(element, ...styleSources) {
1453
+ function assign(element, ...styleSources) {
1396
1454
  const target = element.style;
1397
1455
 
1398
- forEach$2(styleSources, function(style) {
1456
+ forEach(styleSources, function(style) {
1399
1457
  if (!style) {
1400
1458
  return;
1401
1459
  }
1402
1460
 
1403
- forEach$2(style, function(value, key) {
1461
+ forEach(style, function(value, key) {
1404
1462
  target[key] = value;
1405
1463
  });
1406
1464
  });
@@ -1685,7 +1743,7 @@
1685
1743
  // when delegating.
1686
1744
  var forceCaptureEvents = [ 'focus', 'blur' ];
1687
1745
 
1688
- function bind$2(el, selector, type, fn, capture) {
1746
+ function bind(el, selector, type, fn, capture) {
1689
1747
  if (forceCaptureEvents.indexOf(type) !== -1) {
1690
1748
  capture = true;
1691
1749
  }
@@ -1717,7 +1775,7 @@
1717
1775
  }
1718
1776
 
1719
1777
  var delegate = {
1720
- bind: bind$2,
1778
+ bind,
1721
1779
  unbind
1722
1780
  };
1723
1781
 
@@ -2654,7 +2712,7 @@
2654
2712
  var computeStyle = styles.computeStyle;
2655
2713
 
2656
2714
  function addMarker(id, options) {
2657
- var attrs = assign$4({
2715
+ var attrs = assign$1({
2658
2716
  fill: black,
2659
2717
  strokeWidth: 1,
2660
2718
  strokeLinecap: 'round',
@@ -2826,7 +2884,7 @@
2826
2884
 
2827
2885
  function drawCircle(parentGfx, width, height, offset, attrs) {
2828
2886
 
2829
- if (isObject$1(offset)) {
2887
+ if (isObject(offset)) {
2830
2888
  attrs = offset;
2831
2889
  offset = 0;
2832
2890
  }
@@ -2861,7 +2919,7 @@
2861
2919
 
2862
2920
  function drawRect(parentGfx, width, height, r, offset, attrs) {
2863
2921
 
2864
- if (isObject$1(offset)) {
2922
+ if (isObject(offset)) {
2865
2923
  attrs = offset;
2866
2924
  offset = 0;
2867
2925
  }
@@ -2949,7 +3007,7 @@
2949
3007
  }
2950
3008
 
2951
3009
  function drawMarker(type, parentGfx, path, attrs) {
2952
- return drawPath(parentGfx, path, assign$4({ 'data-marker': type }, attrs));
3010
+ return drawPath(parentGfx, path, assign$1({ 'data-marker': type }, attrs));
2953
3011
  }
2954
3012
 
2955
3013
  function renderer(type) {
@@ -3021,7 +3079,7 @@
3021
3079
 
3022
3080
  function renderLabel(parentGfx, label, options) {
3023
3081
 
3024
- options = assign$4({
3082
+ options = assign$1({
3025
3083
  size: {
3026
3084
  width: 100
3027
3085
  }
@@ -3061,7 +3119,7 @@
3061
3119
  return renderLabel(parentGfx, getLabel(element), {
3062
3120
  box: box,
3063
3121
  fitBox: true,
3064
- style: assign$4(
3122
+ style: assign$1(
3065
3123
  {},
3066
3124
  textRenderer.getExternalStyle(),
3067
3125
  {
@@ -3663,7 +3721,7 @@
3663
3721
  return task;
3664
3722
  },
3665
3723
  'bpmn:SubProcess': function(parentGfx, element, attrs) {
3666
- attrs = assign$4({
3724
+ attrs = assign$1({
3667
3725
  fill: getFillColor(element, defaultFillColor),
3668
3726
  stroke: getStrokeColor(element, defaultStrokeColor)
3669
3727
  }, attrs);
@@ -3749,7 +3807,7 @@
3749
3807
  return lane;
3750
3808
  },
3751
3809
  'bpmn:Lane': function(parentGfx, element, attrs) {
3752
- var rect = drawRect(parentGfx, element.width, element.height, 0, assign$4({
3810
+ var rect = drawRect(parentGfx, element.width, element.height, 0, assign$1({
3753
3811
  fill: getFillColor(element, defaultFillColor),
3754
3812
  fillOpacity: HIGH_FILL_OPACITY,
3755
3813
  stroke: getStrokeColor(element, defaultStrokeColor)
@@ -3971,7 +4029,7 @@
3971
4029
  var fill = getFillColor(element, defaultFillColor),
3972
4030
  stroke = getStrokeColor(element, defaultStrokeColor);
3973
4031
 
3974
- attrs = assign$4({
4032
+ attrs = assign$1({
3975
4033
  strokeDasharray: '0.5, 5',
3976
4034
  strokeLinecap: 'round',
3977
4035
  strokeLinejoin: 'round',
@@ -4159,12 +4217,12 @@
4159
4217
  }
4160
4218
 
4161
4219
  // apply fillOpacity
4162
- var outerAttrs = assign$4({}, attrs, {
4220
+ var outerAttrs = assign$1({}, attrs, {
4163
4221
  fillOpacity: 1
4164
4222
  });
4165
4223
 
4166
4224
  // apply no-fill
4167
- var innerAttrs = assign$4({}, attrs, {
4225
+ var innerAttrs = assign$1({}, attrs, {
4168
4226
  fill: 'none'
4169
4227
  });
4170
4228
 
@@ -4387,7 +4445,7 @@
4387
4445
  };
4388
4446
  }
4389
4447
 
4390
- forEach$3(taskMarkers, function(marker) {
4448
+ forEach$1(taskMarkers, function(marker) {
4391
4449
  renderer(marker)(parentGfx, element, position);
4392
4450
  });
4393
4451
 
@@ -4515,8 +4573,8 @@
4515
4573
 
4516
4574
  function parsePadding(padding) {
4517
4575
 
4518
- if (isObject$1(padding)) {
4519
- return assign$4({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
4576
+ if (isObject(padding)) {
4577
+ return assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
4520
4578
  } else {
4521
4579
  return {
4522
4580
  top: padding,
@@ -4680,7 +4738,7 @@
4680
4738
  id: 'helper-svg'
4681
4739
  });
4682
4740
 
4683
- assign$3(helperSvg, {
4741
+ assign(helperSvg, {
4684
4742
  visibility: 'hidden',
4685
4743
  position: 'fixed',
4686
4744
  width: 0,
@@ -4705,7 +4763,7 @@
4705
4763
  */
4706
4764
  function Text(config) {
4707
4765
 
4708
- this._config = assign$4({}, {
4766
+ this._config = assign$1({}, {
4709
4767
  size: DEFAULT_LABEL_SIZE$1,
4710
4768
  padding: DEFAULT_BOX_PADDING,
4711
4769
  style: {},
@@ -4754,8 +4812,8 @@
4754
4812
  * @return {Object} { element, dimensions }
4755
4813
  */
4756
4814
  Text.prototype.layoutText = function(text, options) {
4757
- var box = assign$4({}, this._config.size, options.box),
4758
- style = assign$4({}, this._config.style, options.style),
4815
+ var box = assign$1({}, this._config.size, options.box),
4816
+ style = assign$1({}, this._config.style, options.style),
4759
4817
  align = parseAlign(options.align || this._config.align),
4760
4818
  padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding),
4761
4819
  fitBox = options.fitBox || false;
@@ -4811,7 +4869,7 @@
4811
4869
 
4812
4870
  // layout each line taking into account that parent
4813
4871
  // shape might resize to fit text size
4814
- forEach$3(layouted, function(line) {
4872
+ forEach$1(layouted, function(line) {
4815
4873
 
4816
4874
  var x;
4817
4875
 
@@ -4870,7 +4928,7 @@
4870
4928
 
4871
4929
  function TextRenderer(config) {
4872
4930
 
4873
- var defaultStyle = assign$4({
4931
+ var defaultStyle = assign$1({
4874
4932
  fontFamily: 'Arial, sans-serif',
4875
4933
  fontSize: DEFAULT_FONT_SIZE,
4876
4934
  fontWeight: 'normal',
@@ -4879,7 +4937,7 @@
4879
4937
 
4880
4938
  var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
4881
4939
 
4882
- var externalStyle = assign$4({}, defaultStyle, {
4940
+ var externalStyle = assign$1({}, defaultStyle, {
4883
4941
  fontSize: fontSize
4884
4942
  }, config && config.externalStyle || {});
4885
4943
 
@@ -5615,7 +5673,7 @@
5615
5673
  size = DEFAULT_LABEL_SIZE;
5616
5674
  }
5617
5675
 
5618
- return assign$4({
5676
+ return assign$1({
5619
5677
  x: mid.x - size.width / 2,
5620
5678
  y: mid.y - size.height / 2
5621
5679
  }, size);
@@ -5785,7 +5843,7 @@
5785
5843
  * @return {Object}
5786
5844
  */
5787
5845
  function elementData(semantic, di, attrs) {
5788
- return assign$4({
5846
+ return assign$1({
5789
5847
  id: semantic.id,
5790
5848
  type: semantic.$type,
5791
5849
  businessObject: semantic,
@@ -6323,13 +6381,13 @@
6323
6381
  }
6324
6382
 
6325
6383
  function registerEvents(svg) {
6326
- forEach$3(bindings, function(val, key) {
6384
+ forEach$1(bindings, function(val, key) {
6327
6385
  registerEvent(svg, key, val);
6328
6386
  });
6329
6387
  }
6330
6388
 
6331
6389
  function unregisterEvents(svg) {
6332
- forEach$3(bindings, function(val, key) {
6390
+ forEach$1(bindings, function(val, key) {
6333
6391
  unregisterEvent(svg, key, val);
6334
6392
  });
6335
6393
  }
@@ -6400,7 +6458,7 @@
6400
6458
 
6401
6459
  function createHitStyle(classNames, attrs) {
6402
6460
 
6403
- attrs = assign$4({
6461
+ attrs = assign$1({
6404
6462
  stroke: 'white',
6405
6463
  strokeWidth: 15
6406
6464
  }, attrs || {});
@@ -6439,7 +6497,7 @@
6439
6497
  this.removeHits = function(gfx) {
6440
6498
  var hits = all('.djs-hit', gfx);
6441
6499
 
6442
- forEach$3(hits, remove$3);
6500
+ forEach$1(hits, remove$3);
6443
6501
  };
6444
6502
 
6445
6503
  /**
@@ -6498,7 +6556,7 @@
6498
6556
  */
6499
6557
  this.createBoxHit = function(gfx, type, attrs) {
6500
6558
 
6501
- attrs = assign$4({
6559
+ attrs = assign$1({
6502
6560
  x: 0,
6503
6561
  y: 0
6504
6562
  }, attrs);
@@ -6655,7 +6713,7 @@
6655
6713
  function getBBox(elements, stopRecursion) {
6656
6714
 
6657
6715
  stopRecursion = !!stopRecursion;
6658
- if (!isArray$4(elements)) {
6716
+ if (!isArray$2(elements)) {
6659
6717
  elements = [ elements ];
6660
6718
  }
6661
6719
 
@@ -6664,7 +6722,7 @@
6664
6722
  maxX,
6665
6723
  maxY;
6666
6724
 
6667
- forEach$3(elements, function(element) {
6725
+ forEach$1(elements, function(element) {
6668
6726
 
6669
6727
  // If element is a connection the bbox must be computed first
6670
6728
  var bbox = element;
@@ -6743,7 +6801,7 @@
6743
6801
  function createOutline(gfx, bounds) {
6744
6802
  var outline = create$2('rect');
6745
6803
 
6746
- attr$2(outline, assign$4({
6804
+ attr$2(outline, assign$1({
6747
6805
  x: 10,
6748
6806
  y: 10,
6749
6807
  rx: 3,
@@ -6902,7 +6960,7 @@
6902
6960
  var selectedElements = this._selectedElements,
6903
6961
  oldSelection = selectedElements.slice();
6904
6962
 
6905
- if (!isArray$4(elements)) {
6963
+ if (!isArray$2(elements)) {
6906
6964
  elements = elements ? [ elements ] : [];
6907
6965
  }
6908
6966
 
@@ -6919,7 +6977,7 @@
6919
6977
  // selection may be cleared by passing an empty array or null
6920
6978
  // to the method
6921
6979
  if (add) {
6922
- forEach$3(elements, function(element) {
6980
+ forEach$1(elements, function(element) {
6923
6981
  if (selectedElements.indexOf(element) !== -1) {
6924
6982
 
6925
6983
  // already selected
@@ -6988,13 +7046,13 @@
6988
7046
  var oldSelection = event.oldSelection,
6989
7047
  newSelection = event.newSelection;
6990
7048
 
6991
- forEach$3(oldSelection, function(e) {
7049
+ forEach$1(oldSelection, function(e) {
6992
7050
  if (newSelection.indexOf(e) === -1) {
6993
7051
  deselect(e);
6994
7052
  }
6995
7053
  });
6996
7054
 
6997
- forEach$3(newSelection, function(e) {
7055
+ forEach$1(newSelection, function(e) {
6998
7056
  if (oldSelection.indexOf(e) === -1) {
6999
7057
  select(e);
7000
7058
  }
@@ -7036,7 +7094,7 @@
7036
7094
 
7037
7095
  var rect = create$2('rect');
7038
7096
 
7039
- attr$2(rect, assign$4({
7097
+ attr$2(rect, assign$1({
7040
7098
  rx: 3
7041
7099
  }, bBox));
7042
7100
 
@@ -7073,7 +7131,7 @@
7073
7131
  return;
7074
7132
  }
7075
7133
 
7076
- if (isArray$4(autoSelect)) {
7134
+ if (isArray$2(autoSelect)) {
7077
7135
  selection.select(autoSelect);
7078
7136
  } else {
7079
7137
 
@@ -7100,7 +7158,7 @@
7100
7158
  var shape = elementRegistry.get(event.context.shape.id);
7101
7159
 
7102
7160
  // Always select main shape on move
7103
- var isSelected = find$1(previousSelection, function(selectedShape) {
7161
+ var isSelected = find(previousSelection, function(selectedShape) {
7104
7162
  return shape.id === selectedShape.id;
7105
7163
  });
7106
7164
 
@@ -7279,7 +7337,7 @@
7279
7337
 
7280
7338
  this._ids = ids;
7281
7339
 
7282
- this._overlayDefaults = assign$4({
7340
+ this._overlayDefaults = assign$1({
7283
7341
 
7284
7342
  // no show constraints
7285
7343
  show: null,
@@ -7341,11 +7399,11 @@
7341
7399
  */
7342
7400
  Overlays.prototype.get = function(search) {
7343
7401
 
7344
- if (isString$3(search)) {
7402
+ if (isString(search)) {
7345
7403
  search = { id: search };
7346
7404
  }
7347
7405
 
7348
- if (isString$3(search.element)) {
7406
+ if (isString(search.element)) {
7349
7407
  search.element = this._elementRegistry.get(search.element);
7350
7408
  }
7351
7409
 
@@ -7354,13 +7412,13 @@
7354
7412
 
7355
7413
  // return a list of overlays when searching by element (+type)
7356
7414
  if (container) {
7357
- return search.type ? filter$1(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
7415
+ return search.type ? filter(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
7358
7416
  } else {
7359
7417
  return [];
7360
7418
  }
7361
7419
  } else
7362
7420
  if (search.type) {
7363
- return filter$1(this._overlays, matchPattern({ type: search.type }));
7421
+ return filter(this._overlays, matchPattern({ type: search.type }));
7364
7422
  } else {
7365
7423
 
7366
7424
  // return single element when searching by id
@@ -7393,7 +7451,7 @@
7393
7451
  */
7394
7452
  Overlays.prototype.add = function(element, type, overlay) {
7395
7453
 
7396
- if (isObject$1(type)) {
7454
+ if (isObject(type)) {
7397
7455
  overlay = type;
7398
7456
  type = null;
7399
7457
  }
@@ -7416,7 +7474,7 @@
7416
7474
 
7417
7475
  var id = this._ids.next();
7418
7476
 
7419
- overlay = assign$4({}, this._overlayDefaults, overlay, {
7477
+ overlay = assign$1({}, this._overlayDefaults, overlay, {
7420
7478
  id: id,
7421
7479
  type: type,
7422
7480
  element: element,
@@ -7440,13 +7498,13 @@
7440
7498
 
7441
7499
  var overlays = this.get(filter) || [];
7442
7500
 
7443
- if (!isArray$4(overlays)) {
7501
+ if (!isArray$2(overlays)) {
7444
7502
  overlays = [ overlays ];
7445
7503
  }
7446
7504
 
7447
7505
  var self = this;
7448
7506
 
7449
- forEach$3(overlays, function(overlay) {
7507
+ forEach$1(overlays, function(overlay) {
7450
7508
 
7451
7509
  var container = self._getOverlayContainer(overlay.element, true);
7452
7510
 
@@ -7556,7 +7614,7 @@
7556
7614
 
7557
7615
  Overlays.prototype._createOverlayContainer = function(element) {
7558
7616
  var html = domify$1('<div class="djs-overlays" />');
7559
- assign$3(html, { position: 'absolute' });
7617
+ assign(html, { position: 'absolute' });
7560
7618
 
7561
7619
  this._overlayRoot.appendChild(html);
7562
7620
 
@@ -7593,7 +7651,7 @@
7593
7651
 
7594
7652
 
7595
7653
  Overlays.prototype._getOverlayContainer = function(element, raw) {
7596
- var container = find$1(this._overlayContainers, function(c) {
7654
+ var container = find(this._overlayContainers, function(c) {
7597
7655
  return c.element === element;
7598
7656
  });
7599
7657
 
@@ -7621,14 +7679,14 @@
7621
7679
 
7622
7680
  // create proper html elements from
7623
7681
  // overlay HTML strings
7624
- if (isString$3(html)) {
7682
+ if (isString(html)) {
7625
7683
  html = domify$1(html);
7626
7684
  }
7627
7685
 
7628
7686
  overlayContainer = this._getOverlayContainer(element);
7629
7687
 
7630
7688
  htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
7631
- assign$3(htmlContainer, { position: 'absolute' });
7689
+ assign(htmlContainer, { position: 'absolute' });
7632
7690
 
7633
7691
  htmlContainer.appendChild(html);
7634
7692
 
@@ -7718,7 +7776,7 @@
7718
7776
 
7719
7777
  var self = this;
7720
7778
 
7721
- forEach$3(this._overlays, function(overlay) {
7779
+ forEach$1(this._overlays, function(overlay) {
7722
7780
  self._updateOverlayVisibilty(overlay, viewbox);
7723
7781
  });
7724
7782
  };
@@ -7755,7 +7813,7 @@
7755
7813
  var element = e.element;
7756
7814
  var overlays = self.get({ element: element });
7757
7815
 
7758
- forEach$3(overlays, function(o) {
7816
+ forEach$1(overlays, function(o) {
7759
7817
  self.remove(o.id);
7760
7818
  });
7761
7819
 
@@ -7779,7 +7837,7 @@
7779
7837
  var container = self._getOverlayContainer(element, true);
7780
7838
 
7781
7839
  if (container) {
7782
- forEach$3(container.overlays, function(overlay) {
7840
+ forEach$1(container.overlays, function(overlay) {
7783
7841
  self._updateOverlay(overlay);
7784
7842
  });
7785
7843
 
@@ -7816,7 +7874,7 @@
7816
7874
  '<div class="djs-overlay-container" />'
7817
7875
  );
7818
7876
 
7819
- assign$3(root, {
7877
+ assign(root, {
7820
7878
  position: 'absolute',
7821
7879
  width: 0,
7822
7880
  height: 0
@@ -7828,7 +7886,7 @@
7828
7886
  }
7829
7887
 
7830
7888
  function setPosition(el, x, y) {
7831
- assign$3(el, { left: x + 'px', top: y + 'px' });
7889
+ assign(el, { left: x + 'px', top: y + 'px' });
7832
7890
  }
7833
7891
 
7834
7892
  /**
@@ -7974,7 +8032,7 @@
7974
8032
  */
7975
8033
  CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
7976
8034
 
7977
- if (isFunction$1(hook) || isNumber(hook)) {
8035
+ if (isFunction(hook) || isNumber(hook)) {
7978
8036
  that = unwrap;
7979
8037
  unwrap = handlerFn;
7980
8038
  handlerFn = priority;
@@ -7982,29 +8040,29 @@
7982
8040
  hook = null;
7983
8041
  }
7984
8042
 
7985
- if (isFunction$1(priority)) {
8043
+ if (isFunction(priority)) {
7986
8044
  that = unwrap;
7987
8045
  unwrap = handlerFn;
7988
8046
  handlerFn = priority;
7989
8047
  priority = DEFAULT_PRIORITY$1;
7990
8048
  }
7991
8049
 
7992
- if (isObject$1(unwrap)) {
8050
+ if (isObject(unwrap)) {
7993
8051
  that = unwrap;
7994
8052
  unwrap = false;
7995
8053
  }
7996
8054
 
7997
- if (!isFunction$1(handlerFn)) {
8055
+ if (!isFunction(handlerFn)) {
7998
8056
  throw new Error('handlerFn must be a function');
7999
8057
  }
8000
8058
 
8001
- if (!isArray$4(events)) {
8059
+ if (!isArray$2(events)) {
8002
8060
  events = [ events ];
8003
8061
  }
8004
8062
 
8005
8063
  var eventBus = this._eventBus;
8006
8064
 
8007
- forEach$3(events, function(event) {
8065
+ forEach$1(events, function(event) {
8008
8066
 
8009
8067
  // concat commandStack(.event)?(.hook)?
8010
8068
  var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
@@ -8032,7 +8090,7 @@
8032
8090
  * This will generate the CommandInterceptor#(preExecute|...|reverted) methods
8033
8091
  * which will in term forward to CommandInterceptor#on.
8034
8092
  */
8035
- forEach$3(hooks, function(hook) {
8093
+ forEach$1(hooks, function(hook) {
8036
8094
 
8037
8095
  /**
8038
8096
  * {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
@@ -8048,7 +8106,7 @@
8048
8106
  */
8049
8107
  CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
8050
8108
 
8051
- if (isFunction$1(events) || isNumber(events)) {
8109
+ if (isFunction(events) || isNumber(events)) {
8052
8110
  that = unwrap;
8053
8111
  unwrap = handlerFn;
8054
8112
  handlerFn = priority;
@@ -8268,7 +8326,7 @@
8268
8326
  var shape = e.element,
8269
8327
  bo = getBusinessObject(shape);
8270
8328
 
8271
- var isPresent = find$1(boParents, function(el) {
8329
+ var isPresent = find(boParents, function(el) {
8272
8330
  return el === bo;
8273
8331
  });
8274
8332
 
@@ -8891,7 +8949,7 @@
8891
8949
  *
8892
8950
  * @return {boolean}
8893
8951
  */
8894
- function isArray$2(obj) {
8952
+ function isArray(obj) {
8895
8953
  return Array.isArray(obj);
8896
8954
  }
8897
8955
 
@@ -8918,7 +8976,7 @@
8918
8976
  */
8919
8977
  function annotate(...args) {
8920
8978
 
8921
- if (args.length === 1 && isArray$2(args[0])) {
8979
+ if (args.length === 1 && isArray(args[0])) {
8922
8980
  args = args[0];
8923
8981
  }
8924
8982
 
@@ -9059,7 +9117,7 @@
9059
9117
  }
9060
9118
 
9061
9119
  if (typeof fn !== 'function') {
9062
- if (isArray$2(fn)) {
9120
+ if (isArray(fn)) {
9063
9121
  fn = annotate(fn.slice());
9064
9122
  } else {
9065
9123
  throw error(`Cannot invoke "${ fn }". Expected a function!`);
@@ -9331,7 +9389,7 @@
9331
9389
  // helpers ///////////////
9332
9390
 
9333
9391
  function arrayUnwrap(type, value) {
9334
- if (type !== 'value' && isArray$2(value)) {
9392
+ if (type !== 'value' && isArray(value)) {
9335
9393
  value = annotate(value.slice());
9336
9394
  }
9337
9395
 
@@ -9376,9 +9434,9 @@
9376
9434
  });
9377
9435
 
9378
9436
  if (isFrameElement(element)) {
9379
- attr$2(rect, assign$4({}, this.FRAME_STYLE, attrs || {}));
9437
+ attr$2(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
9380
9438
  } else {
9381
- attr$2(rect, assign$4({}, this.SHAPE_STYLE, attrs || {}));
9439
+ attr$2(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
9382
9440
  }
9383
9441
 
9384
9442
  append$1(visuals, rect);
@@ -9388,7 +9446,7 @@
9388
9446
 
9389
9447
  DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
9390
9448
 
9391
- var line = createLine(connection.waypoints, assign$4({}, this.CONNECTION_STYLE, attrs || {}));
9449
+ var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
9392
9450
  append$1(visuals, line);
9393
9451
 
9394
9452
  return line;
@@ -9464,7 +9522,7 @@
9464
9522
  this.cls = function(className, traits, additionalAttrs) {
9465
9523
  var attrs = this.style(traits, additionalAttrs);
9466
9524
 
9467
- return assign$4(attrs, { 'class': className });
9525
+ return assign$1(attrs, { 'class': className });
9468
9526
  };
9469
9527
 
9470
9528
  /**
@@ -9477,25 +9535,25 @@
9477
9535
  */
9478
9536
  this.style = function(traits, additionalAttrs) {
9479
9537
 
9480
- if (!isArray$4(traits) && !additionalAttrs) {
9538
+ if (!isArray$2(traits) && !additionalAttrs) {
9481
9539
  additionalAttrs = traits;
9482
9540
  traits = [];
9483
9541
  }
9484
9542
 
9485
9543
  var attrs = reduce(traits, function(attrs, t) {
9486
- return assign$4(attrs, defaultTraits[t] || {});
9544
+ return assign$1(attrs, defaultTraits[t] || {});
9487
9545
  }, {});
9488
9546
 
9489
- return additionalAttrs ? assign$4(attrs, additionalAttrs) : attrs;
9547
+ return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
9490
9548
  };
9491
9549
 
9492
9550
  this.computeStyle = function(custom, traits, defaultStyles) {
9493
- if (!isArray$4(traits)) {
9551
+ if (!isArray$2(traits)) {
9494
9552
  defaultStyles = traits;
9495
9553
  traits = [];
9496
9554
  }
9497
9555
 
9498
- return self.style(traits || [], assign$4({}, defaultStyles, custom || {}));
9556
+ return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
9499
9557
  };
9500
9558
  }
9501
9559
 
@@ -9604,7 +9662,7 @@
9604
9662
  */
9605
9663
  function createContainer(options) {
9606
9664
 
9607
- options = assign$4({}, { width: '100%', height: '100%' }, options);
9665
+ options = assign$1({}, { width: '100%', height: '100%' }, options);
9608
9666
 
9609
9667
  const container = options.container || document.body;
9610
9668
 
@@ -9614,7 +9672,7 @@
9614
9672
  const parent = document.createElement('div');
9615
9673
  parent.setAttribute('class', 'djs-container');
9616
9674
 
9617
- assign$3(parent, {
9675
+ assign(parent, {
9618
9676
  position: 'relative',
9619
9677
  overflow: 'hidden',
9620
9678
  width: ensurePx(options.width),
@@ -9716,7 +9774,7 @@
9716
9774
  // debounce canvas.viewbox.changed events
9717
9775
  // for smoother diagram interaction
9718
9776
  if (config.deferUpdate !== false) {
9719
- this._viewboxChanged = debounce(bind$3(this._viewboxChanged, this), 300);
9777
+ this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
9720
9778
  }
9721
9779
 
9722
9780
  eventBus.on('diagram.init', function() {
@@ -10017,7 +10075,7 @@
10017
10075
  };
10018
10076
 
10019
10077
  Canvas.prototype._findPlaneForRoot = function(rootElement) {
10020
- return find$1(this._planes, function(plane) {
10078
+ return find(this._planes, function(plane) {
10021
10079
  return plane.rootElement === rootElement;
10022
10080
  });
10023
10081
  };
@@ -10050,7 +10108,7 @@
10050
10108
  return;
10051
10109
  }
10052
10110
 
10053
- forEach$3([ container.gfx, container.secondaryGfx ], function(gfx) {
10111
+ forEach$1([ container.gfx, container.secondaryGfx ], function(gfx) {
10054
10112
  if (gfx) {
10055
10113
 
10056
10114
  // invoke either addClass or removeClass based on mode
@@ -10707,7 +10765,7 @@
10707
10765
 
10708
10766
  if (delta) {
10709
10767
  this._changeViewbox(function() {
10710
- delta = assign$4({ dx: 0, dy: 0 }, delta || {});
10768
+ delta = assign$1({ dx: 0, dy: 0 }, delta || {});
10711
10769
 
10712
10770
  matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
10713
10771
 
@@ -10902,7 +10960,7 @@
10902
10960
  const currentScale = currentMatrix.a;
10903
10961
 
10904
10962
  if (center) {
10905
- centerPoint = assign$4(point, center);
10963
+ centerPoint = assign$1(point, center);
10906
10964
 
10907
10965
  // revert applied viewport transformations
10908
10966
  originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
@@ -11796,7 +11854,7 @@
11796
11854
  if (!Type) {
11797
11855
  throw new Error('unknown type: <' + type + '>');
11798
11856
  }
11799
- return assign$4(new Type(), attrs);
11857
+ return assign$1(new Type(), attrs);
11800
11858
  }
11801
11859
 
11802
11860
  /**
@@ -11833,7 +11891,7 @@
11833
11891
  */
11834
11892
  ElementFactory.prototype.create = function(type, attrs) {
11835
11893
 
11836
- attrs = assign$4({}, attrs || {});
11894
+ attrs = assign$1({}, attrs || {});
11837
11895
 
11838
11896
  if (!attrs.id) {
11839
11897
  attrs.id = type + '_' + (this._uid++);
@@ -11959,9 +12017,9 @@
11959
12017
  */
11960
12018
  EventBus.prototype.on = function(events, priority, callback, that) {
11961
12019
 
11962
- events = isArray$4(events) ? events : [ events ];
12020
+ events = isArray$2(events) ? events : [ events ];
11963
12021
 
11964
- if (isFunction$1(priority)) {
12022
+ if (isFunction(priority)) {
11965
12023
  that = callback;
11966
12024
  callback = priority;
11967
12025
  priority = DEFAULT_PRIORITY;
@@ -11974,7 +12032,7 @@
11974
12032
  var actualCallback = callback;
11975
12033
 
11976
12034
  if (that) {
11977
- actualCallback = bind$3(callback, that);
12035
+ actualCallback = bind$2(callback, that);
11978
12036
 
11979
12037
  // make sure we remember and are able to remove
11980
12038
  // bound callbacks via {@link #off} using the original
@@ -12005,7 +12063,7 @@
12005
12063
  EventBus.prototype.once = function(event, priority, callback, that) {
12006
12064
  var self = this;
12007
12065
 
12008
- if (isFunction$1(priority)) {
12066
+ if (isFunction(priority)) {
12009
12067
  that = callback;
12010
12068
  callback = priority;
12011
12069
  priority = DEFAULT_PRIORITY;
@@ -12044,7 +12102,7 @@
12044
12102
  */
12045
12103
  EventBus.prototype.off = function(events, callback) {
12046
12104
 
12047
- events = isArray$4(events) ? events : [ events ];
12105
+ events = isArray$2(events) ? events : [ events ];
12048
12106
 
12049
12107
  var self = this;
12050
12108
 
@@ -12339,7 +12397,7 @@
12339
12397
  };
12340
12398
 
12341
12399
  InternalEvent.prototype.init = function(data) {
12342
- assign$4(this, data || {});
12400
+ assign$1(this, data || {});
12343
12401
  };
12344
12402
 
12345
12403
 
@@ -12512,7 +12570,7 @@
12512
12570
 
12513
12571
  // update all parents of changed and reorganized their children
12514
12572
  // in the correct order (as indicated in our model)
12515
- forEach$3(parents, function(parent) {
12573
+ forEach$1(parents, function(parent) {
12516
12574
 
12517
12575
  var children = parent.children;
12518
12576
 
@@ -12522,7 +12580,7 @@
12522
12580
 
12523
12581
  var childrenGfx = self._getChildrenContainer(parent);
12524
12582
 
12525
- forEach$3(children.slice().reverse(), function(child) {
12583
+ forEach$1(children.slice().reverse(), function(child) {
12526
12584
  var childGfx = elementRegistry.getGraphics(child);
12527
12585
 
12528
12586
  prependTo(childGfx.parentNode, childrenGfx);
@@ -12772,193 +12830,6 @@
12772
12830
  this.get('eventBus').fire('diagram.clear');
12773
12831
  };
12774
12832
 
12775
- /**
12776
- * Flatten array, one level deep.
12777
- *
12778
- * @param {Array<?>} arr
12779
- *
12780
- * @return {Array<?>}
12781
- */
12782
-
12783
- var nativeToString$2 = Object.prototype.toString;
12784
- function isString$2(obj) {
12785
- return nativeToString$2.call(obj) === '[object String]';
12786
- }
12787
-
12788
- function _extends$2() {
12789
- _extends$2 = Object.assign || function (target) {
12790
- for (var i = 1; i < arguments.length; i++) {
12791
- var source = arguments[i];
12792
-
12793
- for (var key in source) {
12794
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12795
- target[key] = source[key];
12796
- }
12797
- }
12798
- }
12799
-
12800
- return target;
12801
- };
12802
-
12803
- return _extends$2.apply(this, arguments);
12804
- }
12805
-
12806
- /**
12807
- * Convenience wrapper for `Object.assign`.
12808
- *
12809
- * @param {Object} target
12810
- * @param {...Object} others
12811
- *
12812
- * @return {Object} the target
12813
- */
12814
-
12815
- function assign$2(target) {
12816
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12817
- others[_key - 1] = arguments[_key];
12818
- }
12819
-
12820
- return _extends$2.apply(void 0, [target].concat(others));
12821
- }
12822
-
12823
- /**
12824
- * Flatten array, one level deep.
12825
- *
12826
- * @param {Array<?>} arr
12827
- *
12828
- * @return {Array<?>}
12829
- */
12830
-
12831
- var nativeToString$1 = Object.prototype.toString;
12832
- var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
12833
- function isUndefined$2(obj) {
12834
- return obj === undefined;
12835
- }
12836
- function isArray$1(obj) {
12837
- return nativeToString$1.call(obj) === '[object Array]';
12838
- }
12839
- function isObject(obj) {
12840
- return nativeToString$1.call(obj) === '[object Object]';
12841
- }
12842
- function isString$1(obj) {
12843
- return nativeToString$1.call(obj) === '[object String]';
12844
- }
12845
- /**
12846
- * Return true, if target owns a property with the given key.
12847
- *
12848
- * @param {Object} target
12849
- * @param {String} key
12850
- *
12851
- * @return {Boolean}
12852
- */
12853
-
12854
- function has$1(target, key) {
12855
- return nativeHasOwnProperty$1.call(target, key);
12856
- }
12857
- /**
12858
- * Iterate over collection; returning something
12859
- * (non-undefined) will stop iteration.
12860
- *
12861
- * @param {Array|Object} collection
12862
- * @param {Function} iterator
12863
- *
12864
- * @return {Object} return result that stopped the iteration
12865
- */
12866
-
12867
- function forEach$1(collection, iterator) {
12868
- var val, result;
12869
-
12870
- if (isUndefined$2(collection)) {
12871
- return;
12872
- }
12873
-
12874
- var convertKey = isArray$1(collection) ? toNum$1 : identity$1;
12875
-
12876
- for (var key in collection) {
12877
- if (has$1(collection, key)) {
12878
- val = collection[key];
12879
- result = iterator(val, convertKey(key));
12880
-
12881
- if (result === false) {
12882
- return val;
12883
- }
12884
- }
12885
- }
12886
- }
12887
-
12888
- function identity$1(arg) {
12889
- return arg;
12890
- }
12891
-
12892
- function toNum$1(arg) {
12893
- return Number(arg);
12894
- }
12895
- /**
12896
- * Bind function against target <this>.
12897
- *
12898
- * @param {Function} fn
12899
- * @param {Object} target
12900
- *
12901
- * @return {Function} bound function
12902
- */
12903
-
12904
- function bind(fn, target) {
12905
- return fn.bind(target);
12906
- }
12907
-
12908
- function _extends$1() {
12909
- _extends$1 = Object.assign || function (target) {
12910
- for (var i = 1; i < arguments.length; i++) {
12911
- var source = arguments[i];
12912
-
12913
- for (var key in source) {
12914
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12915
- target[key] = source[key];
12916
- }
12917
- }
12918
- }
12919
-
12920
- return target;
12921
- };
12922
-
12923
- return _extends$1.apply(this, arguments);
12924
- }
12925
-
12926
- /**
12927
- * Convenience wrapper for `Object.assign`.
12928
- *
12929
- * @param {Object} target
12930
- * @param {...Object} others
12931
- *
12932
- * @return {Object} the target
12933
- */
12934
-
12935
- function assign$1(target) {
12936
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12937
- others[_key - 1] = arguments[_key];
12938
- }
12939
-
12940
- return _extends$1.apply(void 0, [target].concat(others));
12941
- }
12942
- /**
12943
- * Pick given properties from the target object.
12944
- *
12945
- * @param {Object} target
12946
- * @param {Array} properties
12947
- *
12948
- * @return {Object} target
12949
- */
12950
-
12951
- function pick(target, properties) {
12952
- var result = {};
12953
- var obj = Object(target);
12954
- forEach$1(properties, function (prop) {
12955
- if (prop in obj) {
12956
- result[prop] = target[prop];
12957
- }
12958
- });
12959
- return result;
12960
- }
12961
-
12962
12833
  /**
12963
12834
  * Moddle base element.
12964
12835
  */
@@ -13011,7 +12882,7 @@
13011
12882
  props.define(this, '$attrs', { value: {} });
13012
12883
  props.define(this, '$parent', { writable: true });
13013
12884
 
13014
- forEach$1(attrs, bind(function(val, key) {
12885
+ forEach$1(attrs, bind$2(function(val, key) {
13015
12886
  this.set(key, val);
13016
12887
  }, this));
13017
12888
  }
@@ -13094,6 +12965,7 @@
13094
12965
  localName = name;
13095
12966
  prefix = defaultPrefix;
13096
12967
  } else
12968
+
13097
12969
  // prefix + local name
13098
12970
  if (parts.length === 2) {
13099
12971
  localName = parts[1];
@@ -13300,7 +13172,7 @@
13300
13172
  return;
13301
13173
  }
13302
13174
 
13303
- forEach$1(t.properties, bind(function(p) {
13175
+ forEach$1(t.properties, bind$2(function(p) {
13304
13176
 
13305
13177
  // clone property to allow extensions
13306
13178
  p = assign$1({}, p, {
@@ -13347,7 +13219,7 @@
13347
13219
 
13348
13220
  this.properties = properties;
13349
13221
 
13350
- forEach$1(packages, bind(this.registerPackage, this));
13222
+ forEach$1(packages, bind$2(this.registerPackage, this));
13351
13223
  }
13352
13224
 
13353
13225
 
@@ -13371,7 +13243,7 @@
13371
13243
  ensureAvailable(pkgMap, pkg, 'uri');
13372
13244
 
13373
13245
  // register types
13374
- forEach$1(pkg.types, bind(function(descriptor) {
13246
+ forEach$1(pkg.types, bind$2(function(descriptor) {
13375
13247
  this.registerType(descriptor, pkg);
13376
13248
  }, this));
13377
13249
 
@@ -13397,7 +13269,7 @@
13397
13269
  propertiesByName = {};
13398
13270
 
13399
13271
  // parse properties
13400
- forEach$1(type.properties, bind(function(p) {
13272
+ forEach$1(type.properties, bind$2(function(p) {
13401
13273
 
13402
13274
  // namespace property names
13403
13275
  var propertyNs = parseName(p.name, ns.prefix),
@@ -13423,7 +13295,7 @@
13423
13295
  propertiesByName: propertiesByName
13424
13296
  });
13425
13297
 
13426
- forEach$1(type.extends, bind(function(extendsName) {
13298
+ forEach$1(type.extends, bind$2(function(extendsName) {
13427
13299
  var extended = this.typeMap[extendsName];
13428
13300
 
13429
13301
  extended.traits = extended.traits || [];
@@ -13518,7 +13390,7 @@
13518
13390
 
13519
13391
 
13520
13392
 
13521
- ///////// helpers ////////////////////////////
13393
+ // helpers ////////////////////////////
13522
13394
 
13523
13395
  function ensureAvailable(packageMap, pkg, identifierKey) {
13524
13396
 
@@ -13549,11 +13421,16 @@
13549
13421
  */
13550
13422
  Properties.prototype.set = function(target, name, value) {
13551
13423
 
13424
+ if (!isString(name) || !name.length) {
13425
+ throw new TypeError('property name must be a non-empty string');
13426
+ }
13427
+
13552
13428
  var property = this.model.getPropertyDescriptor(target, name);
13553
13429
 
13554
13430
  var propertyName = property && property.name;
13555
13431
 
13556
- if (isUndefined$1(value)) {
13432
+ if (isUndefined(value)) {
13433
+
13557
13434
  // unset the property, if the specified value is undefined;
13558
13435
  // delete from $attrs (for extensions) or the target itself
13559
13436
  if (property) {
@@ -13562,6 +13439,7 @@
13562
13439
  delete target.$attrs[name];
13563
13440
  }
13564
13441
  } else {
13442
+
13565
13443
  // set the property, defining well defined properties on the fly
13566
13444
  // or simply updating them in target.$attrs (for extensions)
13567
13445
  if (property) {
@@ -13644,7 +13522,7 @@
13644
13522
  };
13645
13523
 
13646
13524
 
13647
- function isUndefined$1(val) {
13525
+ function isUndefined(val) {
13648
13526
  return typeof val === 'undefined';
13649
13527
  }
13650
13528
 
@@ -13657,7 +13535,7 @@
13657
13535
  });
13658
13536
  }
13659
13537
 
13660
- //// Moddle implementation /////////////////////////////////////////////////
13538
+ // Moddle implementation /////////////////////////////////////////////////
13661
13539
 
13662
13540
  /**
13663
13541
  * @class Moddle
@@ -13733,7 +13611,7 @@
13733
13611
 
13734
13612
  var cache = this.typeCache;
13735
13613
 
13736
- var name = isString$1(descriptor) ? descriptor : descriptor.ns.name;
13614
+ var name = isString(descriptor) ? descriptor : descriptor.ns.name;
13737
13615
 
13738
13616
  var type = cache[name];
13739
13617
 
@@ -13866,180 +13744,6 @@
13866
13744
  return this.registry.typeMap[type];
13867
13745
  };
13868
13746
 
13869
- /**
13870
- * Flatten array, one level deep.
13871
- *
13872
- * @param {Array<?>} arr
13873
- *
13874
- * @return {Array<?>}
13875
- */
13876
-
13877
- var nativeToString = Object.prototype.toString;
13878
- var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
13879
- function isUndefined(obj) {
13880
- return obj === undefined;
13881
- }
13882
- function isArray(obj) {
13883
- return nativeToString.call(obj) === '[object Array]';
13884
- }
13885
- function isFunction(obj) {
13886
- var tag = nativeToString.call(obj);
13887
- return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
13888
- }
13889
- function isString(obj) {
13890
- return nativeToString.call(obj) === '[object String]';
13891
- }
13892
- /**
13893
- * Return true, if target owns a property with the given key.
13894
- *
13895
- * @param {Object} target
13896
- * @param {String} key
13897
- *
13898
- * @return {Boolean}
13899
- */
13900
-
13901
- function has(target, key) {
13902
- return nativeHasOwnProperty.call(target, key);
13903
- }
13904
-
13905
- /**
13906
- * Find element in collection.
13907
- *
13908
- * @param {Array|Object} collection
13909
- * @param {Function|Object} matcher
13910
- *
13911
- * @return {Object}
13912
- */
13913
-
13914
- function find(collection, matcher) {
13915
- matcher = toMatcher(matcher);
13916
- var match;
13917
- forEach(collection, function (val, key) {
13918
- if (matcher(val, key)) {
13919
- match = val;
13920
- return false;
13921
- }
13922
- });
13923
- return match;
13924
- }
13925
- /**
13926
- * Find element index in collection.
13927
- *
13928
- * @param {Array|Object} collection
13929
- * @param {Function} matcher
13930
- *
13931
- * @return {Object}
13932
- */
13933
-
13934
- function findIndex(collection, matcher) {
13935
- matcher = toMatcher(matcher);
13936
- var idx = isArray(collection) ? -1 : undefined;
13937
- forEach(collection, function (val, key) {
13938
- if (matcher(val, key)) {
13939
- idx = key;
13940
- return false;
13941
- }
13942
- });
13943
- return idx;
13944
- }
13945
- /**
13946
- * Find element in collection.
13947
- *
13948
- * @param {Array|Object} collection
13949
- * @param {Function} matcher
13950
- *
13951
- * @return {Array} result
13952
- */
13953
-
13954
- function filter(collection, matcher) {
13955
- var result = [];
13956
- forEach(collection, function (val, key) {
13957
- if (matcher(val, key)) {
13958
- result.push(val);
13959
- }
13960
- });
13961
- return result;
13962
- }
13963
- /**
13964
- * Iterate over collection; returning something
13965
- * (non-undefined) will stop iteration.
13966
- *
13967
- * @param {Array|Object} collection
13968
- * @param {Function} iterator
13969
- *
13970
- * @return {Object} return result that stopped the iteration
13971
- */
13972
-
13973
- function forEach(collection, iterator) {
13974
- var val, result;
13975
-
13976
- if (isUndefined(collection)) {
13977
- return;
13978
- }
13979
-
13980
- var convertKey = isArray(collection) ? toNum : identity;
13981
-
13982
- for (var key in collection) {
13983
- if (has(collection, key)) {
13984
- val = collection[key];
13985
- result = iterator(val, convertKey(key));
13986
-
13987
- if (result === false) {
13988
- return val;
13989
- }
13990
- }
13991
- }
13992
- }
13993
-
13994
- function toMatcher(matcher) {
13995
- return isFunction(matcher) ? matcher : function (e) {
13996
- return e === matcher;
13997
- };
13998
- }
13999
-
14000
- function identity(arg) {
14001
- return arg;
14002
- }
14003
-
14004
- function toNum(arg) {
14005
- return Number(arg);
14006
- }
14007
-
14008
- function _extends() {
14009
- _extends = Object.assign || function (target) {
14010
- for (var i = 1; i < arguments.length; i++) {
14011
- var source = arguments[i];
14012
-
14013
- for (var key in source) {
14014
- if (Object.prototype.hasOwnProperty.call(source, key)) {
14015
- target[key] = source[key];
14016
- }
14017
- }
14018
- }
14019
-
14020
- return target;
14021
- };
14022
-
14023
- return _extends.apply(this, arguments);
14024
- }
14025
-
14026
- /**
14027
- * Convenience wrapper for `Object.assign`.
14028
- *
14029
- * @param {Object} target
14030
- * @param {...Object} others
14031
- *
14032
- * @return {Object} the target
14033
- */
14034
-
14035
- function assign(target) {
14036
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14037
- others[_key - 1] = arguments[_key];
14038
- }
14039
-
14040
- return _extends.apply(void 0, [target].concat(others));
14041
- }
14042
-
14043
13747
  var fromCharCode = String.fromCharCode;
14044
13748
 
14045
13749
  var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -15214,7 +14918,7 @@
15214
14918
  * @property {Boolean} lax
15215
14919
  */
15216
14920
 
15217
- assign(this, options);
14921
+ assign$1(this, options);
15218
14922
 
15219
14923
  this.elementsById = {};
15220
14924
  this.references = [];
@@ -15435,7 +15139,7 @@
15435
15139
  model = this.model,
15436
15140
  propNameNs;
15437
15141
 
15438
- forEach(attributes, function(value, name) {
15142
+ forEach$1(attributes, function(value, name) {
15439
15143
 
15440
15144
  var prop = descriptor.propertiesByName[name],
15441
15145
  values;
@@ -15453,7 +15157,7 @@
15453
15157
  // IDREFS: parse references as whitespace-separated list
15454
15158
  values = value.split(' ');
15455
15159
 
15456
- forEach(values, function(v) {
15160
+ forEach$1(values, function(v) {
15457
15161
  context.addReference({
15458
15162
  element: instance,
15459
15163
  property: prop.ns.name,
@@ -15520,7 +15224,7 @@
15520
15224
 
15521
15225
  elementType = model.getType(elementTypeName);
15522
15226
 
15523
- return assign({}, property, {
15227
+ return assign$1({}, property, {
15524
15228
  effectiveType: getModdleDescriptor(elementType).name
15525
15229
  });
15526
15230
  }
@@ -15542,7 +15246,7 @@
15542
15246
  });
15543
15247
 
15544
15248
  if (property) {
15545
- return assign({}, property, {
15249
+ return assign$1({}, property, {
15546
15250
  effectiveType: getModdleDescriptor(elementType).name
15547
15251
  });
15548
15252
  }
@@ -15617,7 +15321,7 @@
15617
15321
  }
15618
15322
 
15619
15323
  if (propertyDesc.isReference) {
15620
- assign(newElement, {
15324
+ assign$1(newElement, {
15621
15325
  element: element
15622
15326
  });
15623
15327
 
@@ -15726,7 +15430,7 @@
15726
15430
  };
15727
15431
  }
15728
15432
 
15729
- assign(this, { lax: false }, options);
15433
+ assign$1(this, { lax: false }, options);
15730
15434
  }
15731
15435
 
15732
15436
  /**
@@ -15781,7 +15485,7 @@
15781
15485
  var model = this.model,
15782
15486
  lax = this.lax;
15783
15487
 
15784
- var context = new Context(assign({}, options, { rootHandler: rootHandler })),
15488
+ var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
15785
15489
  parser = new Parser({ proxy: true }),
15786
15490
  stack = createStack();
15787
15491
 
@@ -16176,14 +15880,14 @@
16176
15880
 
16177
15881
  function getElementNs(ns, descriptor) {
16178
15882
  if (descriptor.isGeneric) {
16179
- return assign({ localName: descriptor.ns.localName }, ns);
15883
+ return assign$1({ localName: descriptor.ns.localName }, ns);
16180
15884
  } else {
16181
- return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
15885
+ return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
16182
15886
  }
16183
15887
  }
16184
15888
 
16185
15889
  function getPropertyNs(ns, descriptor) {
16186
- return assign({ localName: descriptor.ns.localName }, ns);
15890
+ return assign$1({ localName: descriptor.ns.localName }, ns);
16187
15891
  }
16188
15892
 
16189
15893
  function getSerializableProperties(element) {
@@ -16197,7 +15901,7 @@
16197
15901
  }
16198
15902
 
16199
15903
  // do not serialize defaults
16200
- if (!has(element, name)) {
15904
+ if (!has$1(element, name)) {
16201
15905
  return false;
16202
15906
  }
16203
15907
 
@@ -16415,7 +16119,7 @@
16415
16119
  if (this.isLocalNs(effectiveNs)) {
16416
16120
  return { localName: ns.localName };
16417
16121
  } else {
16418
- return assign({ localName: ns.localName }, effectiveNs);
16122
+ return assign$1({ localName: ns.localName }, effectiveNs);
16419
16123
  }
16420
16124
  };
16421
16125
 
@@ -16426,7 +16130,7 @@
16426
16130
 
16427
16131
  var attributes = [];
16428
16132
 
16429
- forEach(element, function(val, key) {
16133
+ forEach$1(element, function(val, key) {
16430
16134
 
16431
16135
  var nonNsAttr;
16432
16136
 
@@ -16434,7 +16138,7 @@
16434
16138
  body.push(new BodySerializer().build({ type: 'String' }, val));
16435
16139
  } else
16436
16140
  if (key === '$children') {
16437
- forEach(val, function(child) {
16141
+ forEach$1(val, function(child) {
16438
16142
  body.push(new ElementSerializer(self).build(child));
16439
16143
  });
16440
16144
  } else
@@ -16504,7 +16208,7 @@
16504
16208
  // parse namespace attributes first
16505
16209
  // and log them. push non namespace attributes to a list
16506
16210
  // and process them later
16507
- forEach(genericAttrs, function(value, name) {
16211
+ forEach$1(genericAttrs, function(value, name) {
16508
16212
 
16509
16213
  var nonNsAttr = self.parseNsAttribute(element, name, value);
16510
16214
 
@@ -16520,7 +16224,7 @@
16520
16224
 
16521
16225
  var self = this;
16522
16226
 
16523
- forEach(attributes, function(attr) {
16227
+ forEach$1(attributes, function(attr) {
16524
16228
 
16525
16229
  // do not serialize xsi:type attribute
16526
16230
  // it is set manually based on the actual implementation type
@@ -16531,6 +16235,8 @@
16531
16235
  try {
16532
16236
  self.addAttribute(self.nsAttributeName(attr.name), attr.value);
16533
16237
  } catch (e) {
16238
+ /* global console */
16239
+
16534
16240
  console.warn(
16535
16241
  'missing namespace information for ',
16536
16242
  attr.name, '=', attr.value, 'on', element,
@@ -16545,7 +16251,7 @@
16545
16251
  body = this.body,
16546
16252
  element = this.element;
16547
16253
 
16548
- forEach(properties, function(p) {
16254
+ forEach$1(properties, function(p) {
16549
16255
  var value = element.get(p.name),
16550
16256
  isReference = p.isReference,
16551
16257
  isMany = p.isMany;
@@ -16558,12 +16264,12 @@
16558
16264
  body.push(new BodySerializer().build(p, value[0]));
16559
16265
  } else
16560
16266
  if (isSimple(p.type)) {
16561
- forEach(value, function(v) {
16267
+ forEach$1(value, function(v) {
16562
16268
  body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
16563
16269
  });
16564
16270
  } else
16565
16271
  if (isReference) {
16566
- forEach(value, function(v) {
16272
+ forEach$1(value, function(v) {
16567
16273
  body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
16568
16274
  });
16569
16275
  } else {
@@ -16573,7 +16279,7 @@
16573
16279
  var asType = serializeAsType(p),
16574
16280
  asProperty = serializeAsProperty(p);
16575
16281
 
16576
- forEach(value, function(v) {
16282
+ forEach$1(value, function(v) {
16577
16283
  var serializer;
16578
16284
 
16579
16285
  if (asType) {
@@ -16681,7 +16387,7 @@
16681
16387
  var self = this,
16682
16388
  element = this.element;
16683
16389
 
16684
- forEach(properties, function(p) {
16390
+ forEach$1(properties, function(p) {
16685
16391
 
16686
16392
  var value = element.get(p.name);
16687
16393
 
@@ -16692,7 +16398,7 @@
16692
16398
  }
16693
16399
  else {
16694
16400
  var values = [];
16695
- forEach(value, function(v) {
16401
+ forEach$1(value, function(v) {
16696
16402
  values.push(v.id);
16697
16403
  });
16698
16404
 
@@ -16748,7 +16454,7 @@
16748
16454
  attrs = getNsAttrs(namespaces).concat(attrs);
16749
16455
  }
16750
16456
 
16751
- forEach(attrs, function(a) {
16457
+ forEach$1(attrs, function(a) {
16752
16458
  writer
16753
16459
  .append(' ')
16754
16460
  .append(nsName(a.name)).append('="').append(a.value).append('"');
@@ -16775,7 +16481,7 @@
16775
16481
  .indent();
16776
16482
  }
16777
16483
 
16778
- forEach(this.body, function(b) {
16484
+ forEach$1(this.body, function(b) {
16779
16485
  b.serializeTo(writer);
16780
16486
  });
16781
16487
 
@@ -16843,7 +16549,7 @@
16843
16549
 
16844
16550
  function FormatingWriter(out, format) {
16845
16551
 
16846
- var indent = [''];
16552
+ var indent = [ '' ];
16847
16553
 
16848
16554
  this.append = function(str) {
16849
16555
  out.write(str);
@@ -16885,7 +16591,7 @@
16885
16591
  */
16886
16592
  function Writer(options) {
16887
16593
 
16888
- options = assign({ format: false, preamble: true }, options || {});
16594
+ options = assign$1({ format: false, preamble: true }, options || {});
16889
16595
 
16890
16596
  function toXML(tree, writer) {
16891
16597
  var internalWriter = writer || new SavingWriter();
@@ -16952,12 +16658,12 @@
16952
16658
  */
16953
16659
  BpmnModdle.prototype.fromXML = function(xmlStr, typeName, options) {
16954
16660
 
16955
- if (!isString$2(typeName)) {
16661
+ if (!isString(typeName)) {
16956
16662
  options = typeName;
16957
16663
  typeName = 'bpmn:Definitions';
16958
16664
  }
16959
16665
 
16960
- var reader = new Reader(assign$2({ model: this, lax: true }, options));
16666
+ var reader = new Reader(assign$1({ model: this, lax: true }, options));
16961
16667
  var rootHandler = reader.handler(typeName);
16962
16668
 
16963
16669
  return reader.fromXML(xmlStr, rootHandler);
@@ -20644,7 +20350,7 @@
20644
20350
  };
20645
20351
 
20646
20352
  function simple(additionalPackages, options) {
20647
- var pks = assign$2({}, packages, additionalPackages);
20353
+ var pks = assign$1({}, packages, additionalPackages);
20648
20354
 
20649
20355
  return new BpmnModdle(pks, options);
20650
20356
  }
@@ -20668,7 +20374,7 @@
20668
20374
  }
20669
20375
 
20670
20376
  var argLen = arguments.length;
20671
- if (argLen >= 1 && isFunction$1(arguments[argLen - 1])) {
20377
+ if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
20672
20378
 
20673
20379
  var callback = arguments[argLen - 1];
20674
20380
 
@@ -20709,7 +20415,7 @@
20709
20415
  function ensureCompatDiRef(businessObject) {
20710
20416
 
20711
20417
  // bpmnElement can have multiple independent DIs
20712
- if (!has$3(businessObject, 'di')) {
20418
+ if (!has$1(businessObject, 'di')) {
20713
20419
  Object.defineProperty(businessObject, 'di', {
20714
20420
  enumerable: false,
20715
20421
  get: function() {
@@ -20737,7 +20443,7 @@
20737
20443
  * correctly specify one.
20738
20444
  */
20739
20445
  function findDisplayCandidate(definitions) {
20740
- return find$1(definitions.rootElements, function(e) {
20446
+ return find(definitions.rootElements, function(e) {
20741
20447
  return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
20742
20448
  });
20743
20449
  }
@@ -20844,7 +20550,7 @@
20844
20550
  function handlePlane(plane) {
20845
20551
  registerDi(plane);
20846
20552
 
20847
- forEach$3(plane.planeElement, handlePlaneElement);
20553
+ forEach$1(plane.planeElement, handlePlaneElement);
20848
20554
  }
20849
20555
 
20850
20556
  function handlePlaneElement(planeElement) {
@@ -20969,7 +20675,7 @@
20969
20675
  // walk through all processes that have not yet been drawn and draw them
20970
20676
  // if they contain lanes with DI information.
20971
20677
  // we do this to pass the free-floating lane test cases in the MIWG test suite
20972
- var processes = filter$1(rootElements, function(e) {
20678
+ var processes = filter(rootElements, function(e) {
20973
20679
  return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
20974
20680
  });
20975
20681
 
@@ -20981,7 +20687,7 @@
20981
20687
  }
20982
20688
 
20983
20689
  function handleMessageFlows(messageFlows, context) {
20984
- forEach$3(messageFlows, contextual(handleMessageFlow, context));
20690
+ forEach$1(messageFlows, contextual(handleMessageFlow, context));
20985
20691
  }
20986
20692
 
20987
20693
  function handleDataAssociation(association, context) {
@@ -21007,7 +20713,7 @@
21007
20713
 
21008
20714
  function handleArtifacts(artifacts, context) {
21009
20715
 
21010
- forEach$3(artifacts, function(e) {
20716
+ forEach$1(artifacts, function(e) {
21011
20717
  if (is(e, 'bpmn:Association')) {
21012
20718
  deferred.push(function() {
21013
20719
  handleArtifact(e, context);
@@ -21024,8 +20730,8 @@
21024
20730
  return;
21025
20731
  }
21026
20732
 
21027
- forEach$3(ioSpecification.dataInputs, contextual(handleDataInput, context));
21028
- forEach$3(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
20733
+ forEach$1(ioSpecification.dataInputs, contextual(handleDataInput, context));
20734
+ forEach$1(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
21029
20735
  }
21030
20736
 
21031
20737
  function handleSubProcess(subProcess, context) {
@@ -21052,8 +20758,8 @@
21052
20758
  // * bpmn:CatchEvent
21053
20759
  //
21054
20760
  deferred.push(function() {
21055
- forEach$3(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
21056
- forEach$3(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
20761
+ forEach$1(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
20762
+ forEach$1(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
21057
20763
  });
21058
20764
  }
21059
20765
 
@@ -21080,11 +20786,11 @@
21080
20786
  }
21081
20787
 
21082
20788
  function handleLaneSet(laneSet, context) {
21083
- forEach$3(laneSet.lanes, contextual(handleLane, context));
20789
+ forEach$1(laneSet.lanes, contextual(handleLane, context));
21084
20790
  }
21085
20791
 
21086
20792
  function handleLaneSets(laneSets, context) {
21087
- forEach$3(laneSets, contextual(handleLaneSet, context));
20793
+ forEach$1(laneSets, contextual(handleLaneSet, context));
21088
20794
  }
21089
20795
 
21090
20796
  function handleFlowElementsContainer(container, context) {
@@ -21096,7 +20802,7 @@
21096
20802
  }
21097
20803
 
21098
20804
  function handleFlowElements(flowElements, context) {
21099
- forEach$3(flowElements, function(e) {
20805
+ forEach$1(flowElements, function(e) {
21100
20806
  if (is(e, 'bpmn:SequenceFlow')) {
21101
20807
  deferred.push(function() {
21102
20808
  handleSequenceFlow(e, context);
@@ -21134,7 +20840,7 @@
21134
20840
 
21135
20841
  function handleCollaboration(collaboration, context) {
21136
20842
 
21137
- forEach$3(collaboration.participants, contextual(handleParticipant, context));
20843
+ forEach$1(collaboration.participants, contextual(handleParticipant, context));
21138
20844
 
21139
20845
  handleArtifacts(collaboration.artifacts, context);
21140
20846
 
@@ -21148,7 +20854,7 @@
21148
20854
  function wireFlowNodeRefs(lane) {
21149
20855
 
21150
20856
  // wire the virtual flowNodeRefs <-> relationship
21151
- forEach$3(lane.flowNodeRef, function(flowNode) {
20857
+ forEach$1(lane.flowNodeRef, function(flowNode) {
21152
20858
  var lanes = flowNode.get('lanes');
21153
20859
 
21154
20860
  if (lanes) {
@@ -21242,7 +20948,7 @@
21242
20948
 
21243
20949
  // traverse BPMN 2.0 document model,
21244
20950
  // starting at definitions
21245
- forEach$3(diagramsToImport, function(diagram) {
20951
+ forEach$1(diagramsToImport, function(diagram) {
21246
20952
  walker.handleDefinitions(definitions, diagram);
21247
20953
  });
21248
20954
 
@@ -21309,12 +21015,12 @@
21309
21015
  if (is$1(rootElement, 'bpmn:Collaboration')) {
21310
21016
  collaboration = rootElement;
21311
21017
  } else {
21312
- collaboration = find$1(definitions.rootElements, function(element) {
21018
+ collaboration = find(definitions.rootElements, function(element) {
21313
21019
  if (!is$1(element, 'bpmn:Collaboration')) {
21314
21020
  return;
21315
21021
  }
21316
21022
 
21317
- return find$1(element.participants, function(participant) {
21023
+ return find(element.participants, function(participant) {
21318
21024
  return participant.processRef === rootElement;
21319
21025
  });
21320
21026
  });
@@ -21338,7 +21044,7 @@
21338
21044
  var diagramsToImport = [ bpmnDiagram ];
21339
21045
  var handledElements = [ bpmnElement ];
21340
21046
 
21341
- forEach$3(definitions.diagrams, function(diagram) {
21047
+ forEach$1(definitions.diagrams, function(diagram) {
21342
21048
  var businessObject = diagram.plane.bpmnElement;
21343
21049
 
21344
21050
  if (
@@ -21357,7 +21063,7 @@
21357
21063
  function selfAndAllFlowElements(elements) {
21358
21064
  var result = [];
21359
21065
 
21360
- forEach$3(elements, function(element) {
21066
+ forEach$1(elements, function(element) {
21361
21067
  if (!element) {
21362
21068
  return;
21363
21069
  }
@@ -21452,11 +21158,11 @@
21452
21158
  function createLightbox() {
21453
21159
  lightbox = domify$1(LIGHTBOX_MARKUP);
21454
21160
 
21455
- assign$3(lightbox, LIGHTBOX_STYLES);
21456
- assign$3(query('svg', lightbox), LOGO_STYLES);
21457
- assign$3(query('.backdrop', lightbox), BACKDROP_STYLES);
21458
- assign$3(query('.notice', lightbox), NOTICE_STYLES);
21459
- assign$3(query('.link', lightbox), LINK_STYLES, {
21161
+ assign(lightbox, LIGHTBOX_STYLES);
21162
+ assign(query('svg', lightbox), LOGO_STYLES);
21163
+ assign(query('.backdrop', lightbox), BACKDROP_STYLES);
21164
+ assign(query('.notice', lightbox), NOTICE_STYLES);
21165
+ assign(query('.link', lightbox), LINK_STYLES, {
21460
21166
  'margin': '15px 20px 15px 10px',
21461
21167
  'alignSelf': 'center'
21462
21168
  });
@@ -21498,7 +21204,7 @@
21498
21204
  */
21499
21205
  function BaseViewer(options) {
21500
21206
 
21501
- options = assign$4({}, DEFAULT_OPTIONS, options);
21207
+ options = assign$1({}, DEFAULT_OPTIONS, options);
21502
21208
 
21503
21209
  this._moddle = this._createModdle(options);
21504
21210
 
@@ -22040,8 +21746,8 @@
22040
21746
 
22041
21747
  const diagramModules = [].concat(staticModules, baseModules, additionalModules);
22042
21748
 
22043
- const diagramOptions = assign$4(omit(options, [ 'additionalModules' ]), {
22044
- canvas: assign$4({}, options.canvas, { container: container }),
21749
+ const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
21750
+ canvas: assign$1({}, options.canvas, { container: container }),
22045
21751
  modules: diagramModules
22046
21752
  });
22047
21753
 
@@ -22069,7 +21775,7 @@
22069
21775
 
22070
21776
  const container = domify$1('<div class="bjs-container"></div>');
22071
21777
 
22072
- assign$3(container, {
21778
+ assign(container, {
22073
21779
  width: ensureUnit(options.width),
22074
21780
  height: ensureUnit(options.height),
22075
21781
  position: options.position
@@ -22079,7 +21785,7 @@
22079
21785
  };
22080
21786
 
22081
21787
  BaseViewer.prototype._createModdle = function(options) {
22082
- const moddleOptions = assign$4({}, this._moddleExtensions, options.moddleExtensions);
21788
+ const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
22083
21789
 
22084
21790
  return new simple(moddleOptions);
22085
21791
  };
@@ -22138,7 +21844,7 @@
22138
21844
  return null;
22139
21845
  }
22140
21846
 
22141
- return find$1(definitions.diagrams, function(element) {
21847
+ return find(definitions.diagrams, function(element) {
22142
21848
  return element.id === diagramId;
22143
21849
  }) || null;
22144
21850
  }
@@ -22165,8 +21871,8 @@
22165
21871
 
22166
21872
  const linkElement = domify$1(linkMarkup);
22167
21873
 
22168
- assign$3(query('svg', linkElement), LOGO_STYLES);
22169
- assign$3(linkElement, LINK_STYLES, {
21874
+ assign(query('svg', linkElement), LOGO_STYLES);
21875
+ assign(linkElement, LINK_STYLES, {
22170
21876
  position: 'absolute',
22171
21877
  bottom: '15px',
22172
21878
  right: '15px',