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.
@@ -50,10 +50,10 @@
50
50
  * @return {Array<?>}
51
51
  */
52
52
 
53
- const nativeToString$4 = Object.prototype.toString;
54
- const nativeHasOwnProperty$3 = Object.prototype.hasOwnProperty;
53
+ const nativeToString$1 = Object.prototype.toString;
54
+ const nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
55
55
 
56
- function isUndefined$4(obj) {
56
+ function isUndefined$2(obj) {
57
57
  return obj === undefined;
58
58
  }
59
59
 
@@ -61,20 +61,20 @@
61
61
  return obj !== undefined;
62
62
  }
63
63
 
64
- function isArray$4(obj) {
65
- return nativeToString$4.call(obj) === '[object Array]';
64
+ function isArray$2(obj) {
65
+ return nativeToString$1.call(obj) === '[object Array]';
66
66
  }
67
67
 
68
- function isObject$1(obj) {
69
- return nativeToString$4.call(obj) === '[object Object]';
68
+ function isObject(obj) {
69
+ return nativeToString$1.call(obj) === '[object Object]';
70
70
  }
71
71
 
72
72
  function isNumber(obj) {
73
- return nativeToString$4.call(obj) === '[object Number]';
73
+ return nativeToString$1.call(obj) === '[object Number]';
74
74
  }
75
75
 
76
- function isFunction$1(obj) {
77
- const tag = nativeToString$4.call(obj);
76
+ function isFunction(obj) {
77
+ const tag = nativeToString$1.call(obj);
78
78
 
79
79
  return (
80
80
  tag === '[object Function]' ||
@@ -85,8 +85,8 @@
85
85
  );
86
86
  }
87
87
 
88
- function isString$3(obj) {
89
- return nativeToString$4.call(obj) === '[object String]';
88
+ function isString(obj) {
89
+ return nativeToString$1.call(obj) === '[object String]';
90
90
  }
91
91
 
92
92
  /**
@@ -97,8 +97,8 @@
97
97
  *
98
98
  * @return {Boolean}
99
99
  */
100
- function has$3(target, key) {
101
- return nativeHasOwnProperty$3.call(target, key);
100
+ function has$1(target, key) {
101
+ return nativeHasOwnProperty$1.call(target, key);
102
102
  }
103
103
 
104
104
  /**
@@ -109,13 +109,13 @@
109
109
  *
110
110
  * @return {Object}
111
111
  */
112
- function find$1(collection, matcher) {
112
+ function find(collection, matcher) {
113
113
 
114
- matcher = toMatcher$1(matcher);
114
+ matcher = toMatcher(matcher);
115
115
 
116
116
  let match;
117
117
 
118
- forEach$3(collection, function(val, key) {
118
+ forEach$1(collection, function(val, key) {
119
119
  if (matcher(val, key)) {
120
120
  match = val;
121
121
 
@@ -128,6 +128,32 @@
128
128
  }
129
129
 
130
130
 
131
+ /**
132
+ * Find element index in collection.
133
+ *
134
+ * @param {Array|Object} collection
135
+ * @param {Function} matcher
136
+ *
137
+ * @return {Object}
138
+ */
139
+ function findIndex(collection, matcher) {
140
+
141
+ matcher = toMatcher(matcher);
142
+
143
+ let idx = isArray$2(collection) ? -1 : undefined;
144
+
145
+ forEach$1(collection, function(val, key) {
146
+ if (matcher(val, key)) {
147
+ idx = key;
148
+
149
+ return false;
150
+ }
151
+ });
152
+
153
+ return idx;
154
+ }
155
+
156
+
131
157
  /**
132
158
  * Find element in collection.
133
159
  *
@@ -136,11 +162,11 @@
136
162
  *
137
163
  * @return {Array} result
138
164
  */
139
- function filter$1(collection, matcher) {
165
+ function filter(collection, matcher) {
140
166
 
141
167
  let result = [];
142
168
 
143
- forEach$3(collection, function(val, key) {
169
+ forEach$1(collection, function(val, key) {
144
170
  if (matcher(val, key)) {
145
171
  result.push(val);
146
172
  }
@@ -159,20 +185,20 @@
159
185
  *
160
186
  * @return {Object} return result that stopped the iteration
161
187
  */
162
- function forEach$3(collection, iterator) {
188
+ function forEach$1(collection, iterator) {
163
189
 
164
190
  let val,
165
191
  result;
166
192
 
167
- if (isUndefined$4(collection)) {
193
+ if (isUndefined$2(collection)) {
168
194
  return;
169
195
  }
170
196
 
171
- const convertKey = isArray$4(collection) ? toNum$3 : identity$3;
197
+ const convertKey = isArray$2(collection) ? toNum$1 : identity$1;
172
198
 
173
199
  for (let key in collection) {
174
200
 
175
- if (has$3(collection, key)) {
201
+ if (has$1(collection, key)) {
176
202
  val = collection[key];
177
203
 
178
204
  result = iterator(val, convertKey(key));
@@ -196,7 +222,7 @@
196
222
  */
197
223
  function reduce(collection, iterator, result) {
198
224
 
199
- forEach$3(collection, function(value, idx) {
225
+ forEach$1(collection, function(value, idx) {
200
226
  result = iterator(result, value, idx);
201
227
  });
202
228
 
@@ -232,7 +258,7 @@
232
258
  */
233
259
  function some(collection, matcher) {
234
260
 
235
- return !!find$1(collection, matcher);
261
+ return !!find(collection, matcher);
236
262
  }
237
263
 
238
264
 
@@ -249,7 +275,7 @@
249
275
 
250
276
  let result = [];
251
277
 
252
- forEach$3(collection, function(val, key) {
278
+ forEach$1(collection, function(val, key) {
253
279
  result.push(fn(val, key));
254
280
  });
255
281
 
@@ -282,18 +308,18 @@
282
308
  }
283
309
 
284
310
 
285
- function toMatcher$1(matcher) {
286
- return isFunction$1(matcher) ? matcher : (e) => {
311
+ function toMatcher(matcher) {
312
+ return isFunction(matcher) ? matcher : (e) => {
287
313
  return e === matcher;
288
314
  };
289
315
  }
290
316
 
291
317
 
292
- function identity$3(arg) {
318
+ function identity$1(arg) {
293
319
  return arg;
294
320
  }
295
321
 
296
- function toNum$3(arg) {
322
+ function toNum$1(arg) {
297
323
  return Number(arg);
298
324
  }
299
325
 
@@ -379,7 +405,7 @@
379
405
  *
380
406
  * @return {Function} bound function
381
407
  */
382
- function bind$3(fn, target) {
408
+ function bind$2(fn, target) {
383
409
  return fn.bind(target);
384
410
  }
385
411
 
@@ -391,10 +417,34 @@
391
417
  *
392
418
  * @return {Object} the target
393
419
  */
394
- function assign$4(target, ...others) {
420
+ function assign$1(target, ...others) {
395
421
  return Object.assign(target, ...others);
396
422
  }
397
423
 
424
+ /**
425
+ * Pick given properties from the target object.
426
+ *
427
+ * @param {Object} target
428
+ * @param {Array} properties
429
+ *
430
+ * @return {Object} target
431
+ */
432
+ function pick(target, properties) {
433
+
434
+ let result = {};
435
+
436
+ let obj = Object(target);
437
+
438
+ forEach$1(properties, function(prop) {
439
+
440
+ if (prop in obj) {
441
+ result[prop] = target[prop];
442
+ }
443
+ });
444
+
445
+ return result;
446
+ }
447
+
398
448
  /**
399
449
  * Pick all target properties, excluding the given ones.
400
450
  *
@@ -409,7 +459,7 @@
409
459
 
410
460
  let obj = Object(target);
411
461
 
412
- forEach$3(obj, function(prop, key) {
462
+ forEach$1(obj, function(prop, key) {
413
463
 
414
464
  if (properties.indexOf(key) === -1) {
415
465
  result[key] = prop;
@@ -1361,14 +1411,17 @@
1361
1411
  * @return {Array<?>}
1362
1412
  */
1363
1413
 
1364
- var nativeToString$3 = Object.prototype.toString;
1365
- var nativeHasOwnProperty$2 = Object.prototype.hasOwnProperty;
1366
- function isUndefined$3(obj) {
1414
+ const nativeToString = Object.prototype.toString;
1415
+ const nativeHasOwnProperty = Object.prototype.hasOwnProperty;
1416
+
1417
+ function isUndefined$1(obj) {
1367
1418
  return obj === undefined;
1368
1419
  }
1369
- function isArray$3(obj) {
1370
- return nativeToString$3.call(obj) === '[object Array]';
1420
+
1421
+ function isArray$1(obj) {
1422
+ return nativeToString.call(obj) === '[object Array]';
1371
1423
  }
1424
+
1372
1425
  /**
1373
1426
  * Return true, if target owns a property with the given key.
1374
1427
  *
@@ -1377,10 +1430,11 @@
1377
1430
  *
1378
1431
  * @return {Boolean}
1379
1432
  */
1380
-
1381
- function has$2(target, key) {
1382
- return nativeHasOwnProperty$2.call(target, key);
1433
+ function has(target, key) {
1434
+ return nativeHasOwnProperty.call(target, key);
1383
1435
  }
1436
+
1437
+
1384
1438
  /**
1385
1439
  * Iterate over collection; returning something
1386
1440
  * (non-undefined) will stop iteration.
@@ -1390,19 +1444,22 @@
1390
1444
  *
1391
1445
  * @return {Object} return result that stopped the iteration
1392
1446
  */
1447
+ function forEach(collection, iterator) {
1393
1448
 
1394
- function forEach$2(collection, iterator) {
1395
- var val, result;
1449
+ let val,
1450
+ result;
1396
1451
 
1397
- if (isUndefined$3(collection)) {
1452
+ if (isUndefined$1(collection)) {
1398
1453
  return;
1399
1454
  }
1400
1455
 
1401
- var convertKey = isArray$3(collection) ? toNum$2 : identity$2;
1456
+ const convertKey = isArray$1(collection) ? toNum : identity;
1402
1457
 
1403
- for (var key in collection) {
1404
- if (has$2(collection, key)) {
1458
+ for (let key in collection) {
1459
+
1460
+ if (has(collection, key)) {
1405
1461
  val = collection[key];
1462
+
1406
1463
  result = iterator(val, convertKey(key));
1407
1464
 
1408
1465
  if (result === false) {
@@ -1412,11 +1469,12 @@
1412
1469
  }
1413
1470
  }
1414
1471
 
1415
- function identity$2(arg) {
1472
+
1473
+ function identity(arg) {
1416
1474
  return arg;
1417
1475
  }
1418
1476
 
1419
- function toNum$2(arg) {
1477
+ function toNum(arg) {
1420
1478
  return Number(arg);
1421
1479
  }
1422
1480
 
@@ -1428,15 +1486,15 @@
1428
1486
  *
1429
1487
  * @return {Element} the element
1430
1488
  */
1431
- function assign$3(element, ...styleSources) {
1489
+ function assign(element, ...styleSources) {
1432
1490
  const target = element.style;
1433
1491
 
1434
- forEach$2(styleSources, function(style) {
1492
+ forEach(styleSources, function(style) {
1435
1493
  if (!style) {
1436
1494
  return;
1437
1495
  }
1438
1496
 
1439
- forEach$2(style, function(value, key) {
1497
+ forEach(style, function(value, key) {
1440
1498
  target[key] = value;
1441
1499
  });
1442
1500
  });
@@ -1721,7 +1779,7 @@
1721
1779
  // when delegating.
1722
1780
  var forceCaptureEvents = [ 'focus', 'blur' ];
1723
1781
 
1724
- function bind$2(el, selector, type, fn, capture) {
1782
+ function bind(el, selector, type, fn, capture) {
1725
1783
  if (forceCaptureEvents.indexOf(type) !== -1) {
1726
1784
  capture = true;
1727
1785
  }
@@ -1753,7 +1811,7 @@
1753
1811
  }
1754
1812
 
1755
1813
  var delegate = {
1756
- bind: bind$2,
1814
+ bind,
1757
1815
  unbind
1758
1816
  };
1759
1817
 
@@ -2690,7 +2748,7 @@
2690
2748
  var computeStyle = styles.computeStyle;
2691
2749
 
2692
2750
  function addMarker(id, options) {
2693
- var attrs = assign$4({
2751
+ var attrs = assign$1({
2694
2752
  fill: black,
2695
2753
  strokeWidth: 1,
2696
2754
  strokeLinecap: 'round',
@@ -2862,7 +2920,7 @@
2862
2920
 
2863
2921
  function drawCircle(parentGfx, width, height, offset, attrs) {
2864
2922
 
2865
- if (isObject$1(offset)) {
2923
+ if (isObject(offset)) {
2866
2924
  attrs = offset;
2867
2925
  offset = 0;
2868
2926
  }
@@ -2897,7 +2955,7 @@
2897
2955
 
2898
2956
  function drawRect(parentGfx, width, height, r, offset, attrs) {
2899
2957
 
2900
- if (isObject$1(offset)) {
2958
+ if (isObject(offset)) {
2901
2959
  attrs = offset;
2902
2960
  offset = 0;
2903
2961
  }
@@ -2985,7 +3043,7 @@
2985
3043
  }
2986
3044
 
2987
3045
  function drawMarker(type, parentGfx, path, attrs) {
2988
- return drawPath(parentGfx, path, assign$4({ 'data-marker': type }, attrs));
3046
+ return drawPath(parentGfx, path, assign$1({ 'data-marker': type }, attrs));
2989
3047
  }
2990
3048
 
2991
3049
  function renderer(type) {
@@ -3057,7 +3115,7 @@
3057
3115
 
3058
3116
  function renderLabel(parentGfx, label, options) {
3059
3117
 
3060
- options = assign$4({
3118
+ options = assign$1({
3061
3119
  size: {
3062
3120
  width: 100
3063
3121
  }
@@ -3097,7 +3155,7 @@
3097
3155
  return renderLabel(parentGfx, getLabel(element), {
3098
3156
  box: box,
3099
3157
  fitBox: true,
3100
- style: assign$4(
3158
+ style: assign$1(
3101
3159
  {},
3102
3160
  textRenderer.getExternalStyle(),
3103
3161
  {
@@ -3699,7 +3757,7 @@
3699
3757
  return task;
3700
3758
  },
3701
3759
  'bpmn:SubProcess': function(parentGfx, element, attrs) {
3702
- attrs = assign$4({
3760
+ attrs = assign$1({
3703
3761
  fill: getFillColor(element, defaultFillColor),
3704
3762
  stroke: getStrokeColor(element, defaultStrokeColor)
3705
3763
  }, attrs);
@@ -3785,7 +3843,7 @@
3785
3843
  return lane;
3786
3844
  },
3787
3845
  'bpmn:Lane': function(parentGfx, element, attrs) {
3788
- var rect = drawRect(parentGfx, element.width, element.height, 0, assign$4({
3846
+ var rect = drawRect(parentGfx, element.width, element.height, 0, assign$1({
3789
3847
  fill: getFillColor(element, defaultFillColor),
3790
3848
  fillOpacity: HIGH_FILL_OPACITY,
3791
3849
  stroke: getStrokeColor(element, defaultStrokeColor)
@@ -4007,7 +4065,7 @@
4007
4065
  var fill = getFillColor(element, defaultFillColor),
4008
4066
  stroke = getStrokeColor(element, defaultStrokeColor);
4009
4067
 
4010
- attrs = assign$4({
4068
+ attrs = assign$1({
4011
4069
  strokeDasharray: '0.5, 5',
4012
4070
  strokeLinecap: 'round',
4013
4071
  strokeLinejoin: 'round',
@@ -4195,12 +4253,12 @@
4195
4253
  }
4196
4254
 
4197
4255
  // apply fillOpacity
4198
- var outerAttrs = assign$4({}, attrs, {
4256
+ var outerAttrs = assign$1({}, attrs, {
4199
4257
  fillOpacity: 1
4200
4258
  });
4201
4259
 
4202
4260
  // apply no-fill
4203
- var innerAttrs = assign$4({}, attrs, {
4261
+ var innerAttrs = assign$1({}, attrs, {
4204
4262
  fill: 'none'
4205
4263
  });
4206
4264
 
@@ -4423,7 +4481,7 @@
4423
4481
  };
4424
4482
  }
4425
4483
 
4426
- forEach$3(taskMarkers, function(marker) {
4484
+ forEach$1(taskMarkers, function(marker) {
4427
4485
  renderer(marker)(parentGfx, element, position);
4428
4486
  });
4429
4487
 
@@ -4551,8 +4609,8 @@
4551
4609
 
4552
4610
  function parsePadding(padding) {
4553
4611
 
4554
- if (isObject$1(padding)) {
4555
- return assign$4({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
4612
+ if (isObject(padding)) {
4613
+ return assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
4556
4614
  } else {
4557
4615
  return {
4558
4616
  top: padding,
@@ -4716,7 +4774,7 @@
4716
4774
  id: 'helper-svg'
4717
4775
  });
4718
4776
 
4719
- assign$3(helperSvg, {
4777
+ assign(helperSvg, {
4720
4778
  visibility: 'hidden',
4721
4779
  position: 'fixed',
4722
4780
  width: 0,
@@ -4741,7 +4799,7 @@
4741
4799
  */
4742
4800
  function Text(config) {
4743
4801
 
4744
- this._config = assign$4({}, {
4802
+ this._config = assign$1({}, {
4745
4803
  size: DEFAULT_LABEL_SIZE$1,
4746
4804
  padding: DEFAULT_BOX_PADDING,
4747
4805
  style: {},
@@ -4790,8 +4848,8 @@
4790
4848
  * @return {Object} { element, dimensions }
4791
4849
  */
4792
4850
  Text.prototype.layoutText = function(text, options) {
4793
- var box = assign$4({}, this._config.size, options.box),
4794
- style = assign$4({}, this._config.style, options.style),
4851
+ var box = assign$1({}, this._config.size, options.box),
4852
+ style = assign$1({}, this._config.style, options.style),
4795
4853
  align = parseAlign(options.align || this._config.align),
4796
4854
  padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding),
4797
4855
  fitBox = options.fitBox || false;
@@ -4847,7 +4905,7 @@
4847
4905
 
4848
4906
  // layout each line taking into account that parent
4849
4907
  // shape might resize to fit text size
4850
- forEach$3(layouted, function(line) {
4908
+ forEach$1(layouted, function(line) {
4851
4909
 
4852
4910
  var x;
4853
4911
 
@@ -4906,7 +4964,7 @@
4906
4964
 
4907
4965
  function TextRenderer(config) {
4908
4966
 
4909
- var defaultStyle = assign$4({
4967
+ var defaultStyle = assign$1({
4910
4968
  fontFamily: 'Arial, sans-serif',
4911
4969
  fontSize: DEFAULT_FONT_SIZE,
4912
4970
  fontWeight: 'normal',
@@ -4915,7 +4973,7 @@
4915
4973
 
4916
4974
  var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
4917
4975
 
4918
- var externalStyle = assign$4({}, defaultStyle, {
4976
+ var externalStyle = assign$1({}, defaultStyle, {
4919
4977
  fontSize: fontSize
4920
4978
  }, config && config.externalStyle || {});
4921
4979
 
@@ -5651,7 +5709,7 @@
5651
5709
  size = DEFAULT_LABEL_SIZE;
5652
5710
  }
5653
5711
 
5654
- return assign$4({
5712
+ return assign$1({
5655
5713
  x: mid.x - size.width / 2,
5656
5714
  y: mid.y - size.height / 2
5657
5715
  }, size);
@@ -5819,7 +5877,7 @@
5819
5877
  * @return {Object}
5820
5878
  */
5821
5879
  function elementData(semantic, di, attrs) {
5822
- return assign$4({
5880
+ return assign$1({
5823
5881
  id: semantic.id,
5824
5882
  type: semantic.$type,
5825
5883
  businessObject: semantic,
@@ -6357,13 +6415,13 @@
6357
6415
  }
6358
6416
 
6359
6417
  function registerEvents(svg) {
6360
- forEach$3(bindings, function(val, key) {
6418
+ forEach$1(bindings, function(val, key) {
6361
6419
  registerEvent(svg, key, val);
6362
6420
  });
6363
6421
  }
6364
6422
 
6365
6423
  function unregisterEvents(svg) {
6366
- forEach$3(bindings, function(val, key) {
6424
+ forEach$1(bindings, function(val, key) {
6367
6425
  unregisterEvent(svg, key, val);
6368
6426
  });
6369
6427
  }
@@ -6434,7 +6492,7 @@
6434
6492
 
6435
6493
  function createHitStyle(classNames, attrs) {
6436
6494
 
6437
- attrs = assign$4({
6495
+ attrs = assign$1({
6438
6496
  stroke: 'white',
6439
6497
  strokeWidth: 15
6440
6498
  }, attrs || {});
@@ -6473,7 +6531,7 @@
6473
6531
  this.removeHits = function(gfx) {
6474
6532
  var hits = all('.djs-hit', gfx);
6475
6533
 
6476
- forEach$3(hits, remove$3);
6534
+ forEach$1(hits, remove$3);
6477
6535
  };
6478
6536
 
6479
6537
  /**
@@ -6532,7 +6590,7 @@
6532
6590
  */
6533
6591
  this.createBoxHit = function(gfx, type, attrs) {
6534
6592
 
6535
- attrs = assign$4({
6593
+ attrs = assign$1({
6536
6594
  x: 0,
6537
6595
  y: 0
6538
6596
  }, attrs);
@@ -6689,7 +6747,7 @@
6689
6747
  function getBBox(elements, stopRecursion) {
6690
6748
 
6691
6749
  stopRecursion = !!stopRecursion;
6692
- if (!isArray$4(elements)) {
6750
+ if (!isArray$2(elements)) {
6693
6751
  elements = [ elements ];
6694
6752
  }
6695
6753
 
@@ -6698,7 +6756,7 @@
6698
6756
  maxX,
6699
6757
  maxY;
6700
6758
 
6701
- forEach$3(elements, function(element) {
6759
+ forEach$1(elements, function(element) {
6702
6760
 
6703
6761
  // If element is a connection the bbox must be computed first
6704
6762
  var bbox = element;
@@ -6777,7 +6835,7 @@
6777
6835
  function createOutline(gfx, bounds) {
6778
6836
  var outline = create$3('rect');
6779
6837
 
6780
- attr$3(outline, assign$4({
6838
+ attr$3(outline, assign$1({
6781
6839
  x: 10,
6782
6840
  y: 10,
6783
6841
  rx: 3,
@@ -6936,7 +6994,7 @@
6936
6994
  var selectedElements = this._selectedElements,
6937
6995
  oldSelection = selectedElements.slice();
6938
6996
 
6939
- if (!isArray$4(elements)) {
6997
+ if (!isArray$2(elements)) {
6940
6998
  elements = elements ? [ elements ] : [];
6941
6999
  }
6942
7000
 
@@ -6953,7 +7011,7 @@
6953
7011
  // selection may be cleared by passing an empty array or null
6954
7012
  // to the method
6955
7013
  if (add) {
6956
- forEach$3(elements, function(element) {
7014
+ forEach$1(elements, function(element) {
6957
7015
  if (selectedElements.indexOf(element) !== -1) {
6958
7016
 
6959
7017
  // already selected
@@ -7022,13 +7080,13 @@
7022
7080
  var oldSelection = event.oldSelection,
7023
7081
  newSelection = event.newSelection;
7024
7082
 
7025
- forEach$3(oldSelection, function(e) {
7083
+ forEach$1(oldSelection, function(e) {
7026
7084
  if (newSelection.indexOf(e) === -1) {
7027
7085
  deselect(e);
7028
7086
  }
7029
7087
  });
7030
7088
 
7031
- forEach$3(newSelection, function(e) {
7089
+ forEach$1(newSelection, function(e) {
7032
7090
  if (oldSelection.indexOf(e) === -1) {
7033
7091
  select(e);
7034
7092
  }
@@ -7070,7 +7128,7 @@
7070
7128
 
7071
7129
  var rect = create$3('rect');
7072
7130
 
7073
- attr$3(rect, assign$4({
7131
+ attr$3(rect, assign$1({
7074
7132
  rx: 3
7075
7133
  }, bBox));
7076
7134
 
@@ -7107,7 +7165,7 @@
7107
7165
  return;
7108
7166
  }
7109
7167
 
7110
- if (isArray$4(autoSelect)) {
7168
+ if (isArray$2(autoSelect)) {
7111
7169
  selection.select(autoSelect);
7112
7170
  } else {
7113
7171
 
@@ -7134,7 +7192,7 @@
7134
7192
  var shape = elementRegistry.get(event.context.shape.id);
7135
7193
 
7136
7194
  // Always select main shape on move
7137
- var isSelected = find$1(previousSelection, function(selectedShape) {
7195
+ var isSelected = find(previousSelection, function(selectedShape) {
7138
7196
  return shape.id === selectedShape.id;
7139
7197
  });
7140
7198
 
@@ -7313,7 +7371,7 @@
7313
7371
 
7314
7372
  this._ids = ids;
7315
7373
 
7316
- this._overlayDefaults = assign$4({
7374
+ this._overlayDefaults = assign$1({
7317
7375
 
7318
7376
  // no show constraints
7319
7377
  show: null,
@@ -7375,11 +7433,11 @@
7375
7433
  */
7376
7434
  Overlays.prototype.get = function(search) {
7377
7435
 
7378
- if (isString$3(search)) {
7436
+ if (isString(search)) {
7379
7437
  search = { id: search };
7380
7438
  }
7381
7439
 
7382
- if (isString$3(search.element)) {
7440
+ if (isString(search.element)) {
7383
7441
  search.element = this._elementRegistry.get(search.element);
7384
7442
  }
7385
7443
 
@@ -7388,13 +7446,13 @@
7388
7446
 
7389
7447
  // return a list of overlays when searching by element (+type)
7390
7448
  if (container) {
7391
- return search.type ? filter$1(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
7449
+ return search.type ? filter(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
7392
7450
  } else {
7393
7451
  return [];
7394
7452
  }
7395
7453
  } else
7396
7454
  if (search.type) {
7397
- return filter$1(this._overlays, matchPattern({ type: search.type }));
7455
+ return filter(this._overlays, matchPattern({ type: search.type }));
7398
7456
  } else {
7399
7457
 
7400
7458
  // return single element when searching by id
@@ -7427,7 +7485,7 @@
7427
7485
  */
7428
7486
  Overlays.prototype.add = function(element, type, overlay) {
7429
7487
 
7430
- if (isObject$1(type)) {
7488
+ if (isObject(type)) {
7431
7489
  overlay = type;
7432
7490
  type = null;
7433
7491
  }
@@ -7450,7 +7508,7 @@
7450
7508
 
7451
7509
  var id = this._ids.next();
7452
7510
 
7453
- overlay = assign$4({}, this._overlayDefaults, overlay, {
7511
+ overlay = assign$1({}, this._overlayDefaults, overlay, {
7454
7512
  id: id,
7455
7513
  type: type,
7456
7514
  element: element,
@@ -7474,13 +7532,13 @@
7474
7532
 
7475
7533
  var overlays = this.get(filter) || [];
7476
7534
 
7477
- if (!isArray$4(overlays)) {
7535
+ if (!isArray$2(overlays)) {
7478
7536
  overlays = [ overlays ];
7479
7537
  }
7480
7538
 
7481
7539
  var self = this;
7482
7540
 
7483
- forEach$3(overlays, function(overlay) {
7541
+ forEach$1(overlays, function(overlay) {
7484
7542
 
7485
7543
  var container = self._getOverlayContainer(overlay.element, true);
7486
7544
 
@@ -7590,7 +7648,7 @@
7590
7648
 
7591
7649
  Overlays.prototype._createOverlayContainer = function(element) {
7592
7650
  var html = domify$1('<div class="djs-overlays" />');
7593
- assign$3(html, { position: 'absolute' });
7651
+ assign(html, { position: 'absolute' });
7594
7652
 
7595
7653
  this._overlayRoot.appendChild(html);
7596
7654
 
@@ -7627,7 +7685,7 @@
7627
7685
 
7628
7686
 
7629
7687
  Overlays.prototype._getOverlayContainer = function(element, raw) {
7630
- var container = find$1(this._overlayContainers, function(c) {
7688
+ var container = find(this._overlayContainers, function(c) {
7631
7689
  return c.element === element;
7632
7690
  });
7633
7691
 
@@ -7655,14 +7713,14 @@
7655
7713
 
7656
7714
  // create proper html elements from
7657
7715
  // overlay HTML strings
7658
- if (isString$3(html)) {
7716
+ if (isString(html)) {
7659
7717
  html = domify$1(html);
7660
7718
  }
7661
7719
 
7662
7720
  overlayContainer = this._getOverlayContainer(element);
7663
7721
 
7664
7722
  htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
7665
- assign$3(htmlContainer, { position: 'absolute' });
7723
+ assign(htmlContainer, { position: 'absolute' });
7666
7724
 
7667
7725
  htmlContainer.appendChild(html);
7668
7726
 
@@ -7752,7 +7810,7 @@
7752
7810
 
7753
7811
  var self = this;
7754
7812
 
7755
- forEach$3(this._overlays, function(overlay) {
7813
+ forEach$1(this._overlays, function(overlay) {
7756
7814
  self._updateOverlayVisibilty(overlay, viewbox);
7757
7815
  });
7758
7816
  };
@@ -7789,7 +7847,7 @@
7789
7847
  var element = e.element;
7790
7848
  var overlays = self.get({ element: element });
7791
7849
 
7792
- forEach$3(overlays, function(o) {
7850
+ forEach$1(overlays, function(o) {
7793
7851
  self.remove(o.id);
7794
7852
  });
7795
7853
 
@@ -7813,7 +7871,7 @@
7813
7871
  var container = self._getOverlayContainer(element, true);
7814
7872
 
7815
7873
  if (container) {
7816
- forEach$3(container.overlays, function(overlay) {
7874
+ forEach$1(container.overlays, function(overlay) {
7817
7875
  self._updateOverlay(overlay);
7818
7876
  });
7819
7877
 
@@ -7850,7 +7908,7 @@
7850
7908
  '<div class="djs-overlay-container" />'
7851
7909
  );
7852
7910
 
7853
- assign$3(root, {
7911
+ assign(root, {
7854
7912
  position: 'absolute',
7855
7913
  width: 0,
7856
7914
  height: 0
@@ -7862,7 +7920,7 @@
7862
7920
  }
7863
7921
 
7864
7922
  function setPosition(el, x, y) {
7865
- assign$3(el, { left: x + 'px', top: y + 'px' });
7923
+ assign(el, { left: x + 'px', top: y + 'px' });
7866
7924
  }
7867
7925
 
7868
7926
  /**
@@ -8008,7 +8066,7 @@
8008
8066
  */
8009
8067
  CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
8010
8068
 
8011
- if (isFunction$1(hook) || isNumber(hook)) {
8069
+ if (isFunction(hook) || isNumber(hook)) {
8012
8070
  that = unwrap;
8013
8071
  unwrap = handlerFn;
8014
8072
  handlerFn = priority;
@@ -8016,29 +8074,29 @@
8016
8074
  hook = null;
8017
8075
  }
8018
8076
 
8019
- if (isFunction$1(priority)) {
8077
+ if (isFunction(priority)) {
8020
8078
  that = unwrap;
8021
8079
  unwrap = handlerFn;
8022
8080
  handlerFn = priority;
8023
8081
  priority = DEFAULT_PRIORITY$1;
8024
8082
  }
8025
8083
 
8026
- if (isObject$1(unwrap)) {
8084
+ if (isObject(unwrap)) {
8027
8085
  that = unwrap;
8028
8086
  unwrap = false;
8029
8087
  }
8030
8088
 
8031
- if (!isFunction$1(handlerFn)) {
8089
+ if (!isFunction(handlerFn)) {
8032
8090
  throw new Error('handlerFn must be a function');
8033
8091
  }
8034
8092
 
8035
- if (!isArray$4(events)) {
8093
+ if (!isArray$2(events)) {
8036
8094
  events = [ events ];
8037
8095
  }
8038
8096
 
8039
8097
  var eventBus = this._eventBus;
8040
8098
 
8041
- forEach$3(events, function(event) {
8099
+ forEach$1(events, function(event) {
8042
8100
 
8043
8101
  // concat commandStack(.event)?(.hook)?
8044
8102
  var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
@@ -8066,7 +8124,7 @@
8066
8124
  * This will generate the CommandInterceptor#(preExecute|...|reverted) methods
8067
8125
  * which will in term forward to CommandInterceptor#on.
8068
8126
  */
8069
- forEach$3(hooks, function(hook) {
8127
+ forEach$1(hooks, function(hook) {
8070
8128
 
8071
8129
  /**
8072
8130
  * {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
@@ -8082,7 +8140,7 @@
8082
8140
  */
8083
8141
  CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
8084
8142
 
8085
- if (isFunction$1(events) || isNumber(events)) {
8143
+ if (isFunction(events) || isNumber(events)) {
8086
8144
  that = unwrap;
8087
8145
  unwrap = handlerFn;
8088
8146
  handlerFn = priority;
@@ -8302,7 +8360,7 @@
8302
8360
  var shape = e.element,
8303
8361
  bo = getBusinessObject(shape);
8304
8362
 
8305
- var isPresent = find$1(boParents, function(el) {
8363
+ var isPresent = find(boParents, function(el) {
8306
8364
  return el === bo;
8307
8365
  });
8308
8366
 
@@ -8925,7 +8983,7 @@
8925
8983
  *
8926
8984
  * @return {boolean}
8927
8985
  */
8928
- function isArray$2(obj) {
8986
+ function isArray(obj) {
8929
8987
  return Array.isArray(obj);
8930
8988
  }
8931
8989
 
@@ -8952,7 +9010,7 @@
8952
9010
  */
8953
9011
  function annotate(...args) {
8954
9012
 
8955
- if (args.length === 1 && isArray$2(args[0])) {
9013
+ if (args.length === 1 && isArray(args[0])) {
8956
9014
  args = args[0];
8957
9015
  }
8958
9016
 
@@ -9093,7 +9151,7 @@
9093
9151
  }
9094
9152
 
9095
9153
  if (typeof fn !== 'function') {
9096
- if (isArray$2(fn)) {
9154
+ if (isArray(fn)) {
9097
9155
  fn = annotate(fn.slice());
9098
9156
  } else {
9099
9157
  throw error(`Cannot invoke "${ fn }". Expected a function!`);
@@ -9365,7 +9423,7 @@
9365
9423
  // helpers ///////////////
9366
9424
 
9367
9425
  function arrayUnwrap(type, value) {
9368
- if (type !== 'value' && isArray$2(value)) {
9426
+ if (type !== 'value' && isArray(value)) {
9369
9427
  value = annotate(value.slice());
9370
9428
  }
9371
9429
 
@@ -9410,9 +9468,9 @@
9410
9468
  });
9411
9469
 
9412
9470
  if (isFrameElement(element)) {
9413
- attr$3(rect, assign$4({}, this.FRAME_STYLE, attrs || {}));
9471
+ attr$3(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
9414
9472
  } else {
9415
- attr$3(rect, assign$4({}, this.SHAPE_STYLE, attrs || {}));
9473
+ attr$3(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
9416
9474
  }
9417
9475
 
9418
9476
  append$2(visuals, rect);
@@ -9422,7 +9480,7 @@
9422
9480
 
9423
9481
  DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
9424
9482
 
9425
- var line = createLine(connection.waypoints, assign$4({}, this.CONNECTION_STYLE, attrs || {}));
9483
+ var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
9426
9484
  append$2(visuals, line);
9427
9485
 
9428
9486
  return line;
@@ -9498,7 +9556,7 @@
9498
9556
  this.cls = function(className, traits, additionalAttrs) {
9499
9557
  var attrs = this.style(traits, additionalAttrs);
9500
9558
 
9501
- return assign$4(attrs, { 'class': className });
9559
+ return assign$1(attrs, { 'class': className });
9502
9560
  };
9503
9561
 
9504
9562
  /**
@@ -9511,25 +9569,25 @@
9511
9569
  */
9512
9570
  this.style = function(traits, additionalAttrs) {
9513
9571
 
9514
- if (!isArray$4(traits) && !additionalAttrs) {
9572
+ if (!isArray$2(traits) && !additionalAttrs) {
9515
9573
  additionalAttrs = traits;
9516
9574
  traits = [];
9517
9575
  }
9518
9576
 
9519
9577
  var attrs = reduce(traits, function(attrs, t) {
9520
- return assign$4(attrs, defaultTraits[t] || {});
9578
+ return assign$1(attrs, defaultTraits[t] || {});
9521
9579
  }, {});
9522
9580
 
9523
- return additionalAttrs ? assign$4(attrs, additionalAttrs) : attrs;
9581
+ return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
9524
9582
  };
9525
9583
 
9526
9584
  this.computeStyle = function(custom, traits, defaultStyles) {
9527
- if (!isArray$4(traits)) {
9585
+ if (!isArray$2(traits)) {
9528
9586
  defaultStyles = traits;
9529
9587
  traits = [];
9530
9588
  }
9531
9589
 
9532
- return self.style(traits || [], assign$4({}, defaultStyles, custom || {}));
9590
+ return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
9533
9591
  };
9534
9592
  }
9535
9593
 
@@ -9638,7 +9696,7 @@
9638
9696
  */
9639
9697
  function createContainer(options) {
9640
9698
 
9641
- options = assign$4({}, { width: '100%', height: '100%' }, options);
9699
+ options = assign$1({}, { width: '100%', height: '100%' }, options);
9642
9700
 
9643
9701
  const container = options.container || document.body;
9644
9702
 
@@ -9648,7 +9706,7 @@
9648
9706
  const parent = document.createElement('div');
9649
9707
  parent.setAttribute('class', 'djs-container');
9650
9708
 
9651
- assign$3(parent, {
9709
+ assign(parent, {
9652
9710
  position: 'relative',
9653
9711
  overflow: 'hidden',
9654
9712
  width: ensurePx(options.width),
@@ -9750,7 +9808,7 @@
9750
9808
  // debounce canvas.viewbox.changed events
9751
9809
  // for smoother diagram interaction
9752
9810
  if (config.deferUpdate !== false) {
9753
- this._viewboxChanged = debounce(bind$3(this._viewboxChanged, this), 300);
9811
+ this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
9754
9812
  }
9755
9813
 
9756
9814
  eventBus.on('diagram.init', function() {
@@ -10051,7 +10109,7 @@
10051
10109
  };
10052
10110
 
10053
10111
  Canvas.prototype._findPlaneForRoot = function(rootElement) {
10054
- return find$1(this._planes, function(plane) {
10112
+ return find(this._planes, function(plane) {
10055
10113
  return plane.rootElement === rootElement;
10056
10114
  });
10057
10115
  };
@@ -10084,7 +10142,7 @@
10084
10142
  return;
10085
10143
  }
10086
10144
 
10087
- forEach$3([ container.gfx, container.secondaryGfx ], function(gfx) {
10145
+ forEach$1([ container.gfx, container.secondaryGfx ], function(gfx) {
10088
10146
  if (gfx) {
10089
10147
 
10090
10148
  // invoke either addClass or removeClass based on mode
@@ -10741,7 +10799,7 @@
10741
10799
 
10742
10800
  if (delta) {
10743
10801
  this._changeViewbox(function() {
10744
- delta = assign$4({ dx: 0, dy: 0 }, delta || {});
10802
+ delta = assign$1({ dx: 0, dy: 0 }, delta || {});
10745
10803
 
10746
10804
  matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
10747
10805
 
@@ -10936,7 +10994,7 @@
10936
10994
  const currentScale = currentMatrix.a;
10937
10995
 
10938
10996
  if (center) {
10939
- centerPoint = assign$4(point, center);
10997
+ centerPoint = assign$1(point, center);
10940
10998
 
10941
10999
  // revert applied viewport transformations
10942
11000
  originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
@@ -11830,7 +11888,7 @@
11830
11888
  if (!Type) {
11831
11889
  throw new Error('unknown type: <' + type + '>');
11832
11890
  }
11833
- return assign$4(new Type(), attrs);
11891
+ return assign$1(new Type(), attrs);
11834
11892
  }
11835
11893
 
11836
11894
  /**
@@ -11867,7 +11925,7 @@
11867
11925
  */
11868
11926
  ElementFactory.prototype.create = function(type, attrs) {
11869
11927
 
11870
- attrs = assign$4({}, attrs || {});
11928
+ attrs = assign$1({}, attrs || {});
11871
11929
 
11872
11930
  if (!attrs.id) {
11873
11931
  attrs.id = type + '_' + (this._uid++);
@@ -11993,9 +12051,9 @@
11993
12051
  */
11994
12052
  EventBus.prototype.on = function(events, priority, callback, that) {
11995
12053
 
11996
- events = isArray$4(events) ? events : [ events ];
12054
+ events = isArray$2(events) ? events : [ events ];
11997
12055
 
11998
- if (isFunction$1(priority)) {
12056
+ if (isFunction(priority)) {
11999
12057
  that = callback;
12000
12058
  callback = priority;
12001
12059
  priority = DEFAULT_PRIORITY;
@@ -12008,7 +12066,7 @@
12008
12066
  var actualCallback = callback;
12009
12067
 
12010
12068
  if (that) {
12011
- actualCallback = bind$3(callback, that);
12069
+ actualCallback = bind$2(callback, that);
12012
12070
 
12013
12071
  // make sure we remember and are able to remove
12014
12072
  // bound callbacks via {@link #off} using the original
@@ -12039,7 +12097,7 @@
12039
12097
  EventBus.prototype.once = function(event, priority, callback, that) {
12040
12098
  var self = this;
12041
12099
 
12042
- if (isFunction$1(priority)) {
12100
+ if (isFunction(priority)) {
12043
12101
  that = callback;
12044
12102
  callback = priority;
12045
12103
  priority = DEFAULT_PRIORITY;
@@ -12078,7 +12136,7 @@
12078
12136
  */
12079
12137
  EventBus.prototype.off = function(events, callback) {
12080
12138
 
12081
- events = isArray$4(events) ? events : [ events ];
12139
+ events = isArray$2(events) ? events : [ events ];
12082
12140
 
12083
12141
  var self = this;
12084
12142
 
@@ -12373,7 +12431,7 @@
12373
12431
  };
12374
12432
 
12375
12433
  InternalEvent.prototype.init = function(data) {
12376
- assign$4(this, data || {});
12434
+ assign$1(this, data || {});
12377
12435
  };
12378
12436
 
12379
12437
 
@@ -12546,7 +12604,7 @@
12546
12604
 
12547
12605
  // update all parents of changed and reorganized their children
12548
12606
  // in the correct order (as indicated in our model)
12549
- forEach$3(parents, function(parent) {
12607
+ forEach$1(parents, function(parent) {
12550
12608
 
12551
12609
  var children = parent.children;
12552
12610
 
@@ -12556,7 +12614,7 @@
12556
12614
 
12557
12615
  var childrenGfx = self._getChildrenContainer(parent);
12558
12616
 
12559
- forEach$3(children.slice().reverse(), function(child) {
12617
+ forEach$1(children.slice().reverse(), function(child) {
12560
12618
  var childGfx = elementRegistry.getGraphics(child);
12561
12619
 
12562
12620
  prependTo(childGfx.parentNode, childrenGfx);
@@ -12806,193 +12864,6 @@
12806
12864
  this.get('eventBus').fire('diagram.clear');
12807
12865
  };
12808
12866
 
12809
- /**
12810
- * Flatten array, one level deep.
12811
- *
12812
- * @param {Array<?>} arr
12813
- *
12814
- * @return {Array<?>}
12815
- */
12816
-
12817
- var nativeToString$2 = Object.prototype.toString;
12818
- function isString$2(obj) {
12819
- return nativeToString$2.call(obj) === '[object String]';
12820
- }
12821
-
12822
- function _extends$2() {
12823
- _extends$2 = Object.assign || function (target) {
12824
- for (var i = 1; i < arguments.length; i++) {
12825
- var source = arguments[i];
12826
-
12827
- for (var key in source) {
12828
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12829
- target[key] = source[key];
12830
- }
12831
- }
12832
- }
12833
-
12834
- return target;
12835
- };
12836
-
12837
- return _extends$2.apply(this, arguments);
12838
- }
12839
-
12840
- /**
12841
- * Convenience wrapper for `Object.assign`.
12842
- *
12843
- * @param {Object} target
12844
- * @param {...Object} others
12845
- *
12846
- * @return {Object} the target
12847
- */
12848
-
12849
- function assign$2(target) {
12850
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12851
- others[_key - 1] = arguments[_key];
12852
- }
12853
-
12854
- return _extends$2.apply(void 0, [target].concat(others));
12855
- }
12856
-
12857
- /**
12858
- * Flatten array, one level deep.
12859
- *
12860
- * @param {Array<?>} arr
12861
- *
12862
- * @return {Array<?>}
12863
- */
12864
-
12865
- var nativeToString$1 = Object.prototype.toString;
12866
- var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
12867
- function isUndefined$2(obj) {
12868
- return obj === undefined;
12869
- }
12870
- function isArray$1(obj) {
12871
- return nativeToString$1.call(obj) === '[object Array]';
12872
- }
12873
- function isObject(obj) {
12874
- return nativeToString$1.call(obj) === '[object Object]';
12875
- }
12876
- function isString$1(obj) {
12877
- return nativeToString$1.call(obj) === '[object String]';
12878
- }
12879
- /**
12880
- * Return true, if target owns a property with the given key.
12881
- *
12882
- * @param {Object} target
12883
- * @param {String} key
12884
- *
12885
- * @return {Boolean}
12886
- */
12887
-
12888
- function has$1(target, key) {
12889
- return nativeHasOwnProperty$1.call(target, key);
12890
- }
12891
- /**
12892
- * Iterate over collection; returning something
12893
- * (non-undefined) will stop iteration.
12894
- *
12895
- * @param {Array|Object} collection
12896
- * @param {Function} iterator
12897
- *
12898
- * @return {Object} return result that stopped the iteration
12899
- */
12900
-
12901
- function forEach$1(collection, iterator) {
12902
- var val, result;
12903
-
12904
- if (isUndefined$2(collection)) {
12905
- return;
12906
- }
12907
-
12908
- var convertKey = isArray$1(collection) ? toNum$1 : identity$1;
12909
-
12910
- for (var key in collection) {
12911
- if (has$1(collection, key)) {
12912
- val = collection[key];
12913
- result = iterator(val, convertKey(key));
12914
-
12915
- if (result === false) {
12916
- return val;
12917
- }
12918
- }
12919
- }
12920
- }
12921
-
12922
- function identity$1(arg) {
12923
- return arg;
12924
- }
12925
-
12926
- function toNum$1(arg) {
12927
- return Number(arg);
12928
- }
12929
- /**
12930
- * Bind function against target <this>.
12931
- *
12932
- * @param {Function} fn
12933
- * @param {Object} target
12934
- *
12935
- * @return {Function} bound function
12936
- */
12937
-
12938
- function bind(fn, target) {
12939
- return fn.bind(target);
12940
- }
12941
-
12942
- function _extends$1() {
12943
- _extends$1 = Object.assign || function (target) {
12944
- for (var i = 1; i < arguments.length; i++) {
12945
- var source = arguments[i];
12946
-
12947
- for (var key in source) {
12948
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12949
- target[key] = source[key];
12950
- }
12951
- }
12952
- }
12953
-
12954
- return target;
12955
- };
12956
-
12957
- return _extends$1.apply(this, arguments);
12958
- }
12959
-
12960
- /**
12961
- * Convenience wrapper for `Object.assign`.
12962
- *
12963
- * @param {Object} target
12964
- * @param {...Object} others
12965
- *
12966
- * @return {Object} the target
12967
- */
12968
-
12969
- function assign$1(target) {
12970
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12971
- others[_key - 1] = arguments[_key];
12972
- }
12973
-
12974
- return _extends$1.apply(void 0, [target].concat(others));
12975
- }
12976
- /**
12977
- * Pick given properties from the target object.
12978
- *
12979
- * @param {Object} target
12980
- * @param {Array} properties
12981
- *
12982
- * @return {Object} target
12983
- */
12984
-
12985
- function pick(target, properties) {
12986
- var result = {};
12987
- var obj = Object(target);
12988
- forEach$1(properties, function (prop) {
12989
- if (prop in obj) {
12990
- result[prop] = target[prop];
12991
- }
12992
- });
12993
- return result;
12994
- }
12995
-
12996
12867
  /**
12997
12868
  * Moddle base element.
12998
12869
  */
@@ -13045,7 +12916,7 @@
13045
12916
  props.define(this, '$attrs', { value: {} });
13046
12917
  props.define(this, '$parent', { writable: true });
13047
12918
 
13048
- forEach$1(attrs, bind(function(val, key) {
12919
+ forEach$1(attrs, bind$2(function(val, key) {
13049
12920
  this.set(key, val);
13050
12921
  }, this));
13051
12922
  }
@@ -13128,6 +12999,7 @@
13128
12999
  localName = name;
13129
13000
  prefix = defaultPrefix;
13130
13001
  } else
13002
+
13131
13003
  // prefix + local name
13132
13004
  if (parts.length === 2) {
13133
13005
  localName = parts[1];
@@ -13334,7 +13206,7 @@
13334
13206
  return;
13335
13207
  }
13336
13208
 
13337
- forEach$1(t.properties, bind(function(p) {
13209
+ forEach$1(t.properties, bind$2(function(p) {
13338
13210
 
13339
13211
  // clone property to allow extensions
13340
13212
  p = assign$1({}, p, {
@@ -13381,7 +13253,7 @@
13381
13253
 
13382
13254
  this.properties = properties;
13383
13255
 
13384
- forEach$1(packages, bind(this.registerPackage, this));
13256
+ forEach$1(packages, bind$2(this.registerPackage, this));
13385
13257
  }
13386
13258
 
13387
13259
 
@@ -13405,7 +13277,7 @@
13405
13277
  ensureAvailable(pkgMap, pkg, 'uri');
13406
13278
 
13407
13279
  // register types
13408
- forEach$1(pkg.types, bind(function(descriptor) {
13280
+ forEach$1(pkg.types, bind$2(function(descriptor) {
13409
13281
  this.registerType(descriptor, pkg);
13410
13282
  }, this));
13411
13283
 
@@ -13431,7 +13303,7 @@
13431
13303
  propertiesByName = {};
13432
13304
 
13433
13305
  // parse properties
13434
- forEach$1(type.properties, bind(function(p) {
13306
+ forEach$1(type.properties, bind$2(function(p) {
13435
13307
 
13436
13308
  // namespace property names
13437
13309
  var propertyNs = parseName(p.name, ns.prefix),
@@ -13457,7 +13329,7 @@
13457
13329
  propertiesByName: propertiesByName
13458
13330
  });
13459
13331
 
13460
- forEach$1(type.extends, bind(function(extendsName) {
13332
+ forEach$1(type.extends, bind$2(function(extendsName) {
13461
13333
  var extended = this.typeMap[extendsName];
13462
13334
 
13463
13335
  extended.traits = extended.traits || [];
@@ -13552,7 +13424,7 @@
13552
13424
 
13553
13425
 
13554
13426
 
13555
- ///////// helpers ////////////////////////////
13427
+ // helpers ////////////////////////////
13556
13428
 
13557
13429
  function ensureAvailable(packageMap, pkg, identifierKey) {
13558
13430
 
@@ -13583,11 +13455,16 @@
13583
13455
  */
13584
13456
  Properties.prototype.set = function(target, name, value) {
13585
13457
 
13458
+ if (!isString(name) || !name.length) {
13459
+ throw new TypeError('property name must be a non-empty string');
13460
+ }
13461
+
13586
13462
  var property = this.model.getPropertyDescriptor(target, name);
13587
13463
 
13588
13464
  var propertyName = property && property.name;
13589
13465
 
13590
- if (isUndefined$1(value)) {
13466
+ if (isUndefined(value)) {
13467
+
13591
13468
  // unset the property, if the specified value is undefined;
13592
13469
  // delete from $attrs (for extensions) or the target itself
13593
13470
  if (property) {
@@ -13596,6 +13473,7 @@
13596
13473
  delete target.$attrs[name];
13597
13474
  }
13598
13475
  } else {
13476
+
13599
13477
  // set the property, defining well defined properties on the fly
13600
13478
  // or simply updating them in target.$attrs (for extensions)
13601
13479
  if (property) {
@@ -13678,7 +13556,7 @@
13678
13556
  };
13679
13557
 
13680
13558
 
13681
- function isUndefined$1(val) {
13559
+ function isUndefined(val) {
13682
13560
  return typeof val === 'undefined';
13683
13561
  }
13684
13562
 
@@ -13691,7 +13569,7 @@
13691
13569
  });
13692
13570
  }
13693
13571
 
13694
- //// Moddle implementation /////////////////////////////////////////////////
13572
+ // Moddle implementation /////////////////////////////////////////////////
13695
13573
 
13696
13574
  /**
13697
13575
  * @class Moddle
@@ -13767,7 +13645,7 @@
13767
13645
 
13768
13646
  var cache = this.typeCache;
13769
13647
 
13770
- var name = isString$1(descriptor) ? descriptor : descriptor.ns.name;
13648
+ var name = isString(descriptor) ? descriptor : descriptor.ns.name;
13771
13649
 
13772
13650
  var type = cache[name];
13773
13651
 
@@ -13900,180 +13778,6 @@
13900
13778
  return this.registry.typeMap[type];
13901
13779
  };
13902
13780
 
13903
- /**
13904
- * Flatten array, one level deep.
13905
- *
13906
- * @param {Array<?>} arr
13907
- *
13908
- * @return {Array<?>}
13909
- */
13910
-
13911
- var nativeToString = Object.prototype.toString;
13912
- var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
13913
- function isUndefined(obj) {
13914
- return obj === undefined;
13915
- }
13916
- function isArray(obj) {
13917
- return nativeToString.call(obj) === '[object Array]';
13918
- }
13919
- function isFunction(obj) {
13920
- var tag = nativeToString.call(obj);
13921
- return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
13922
- }
13923
- function isString(obj) {
13924
- return nativeToString.call(obj) === '[object String]';
13925
- }
13926
- /**
13927
- * Return true, if target owns a property with the given key.
13928
- *
13929
- * @param {Object} target
13930
- * @param {String} key
13931
- *
13932
- * @return {Boolean}
13933
- */
13934
-
13935
- function has(target, key) {
13936
- return nativeHasOwnProperty.call(target, key);
13937
- }
13938
-
13939
- /**
13940
- * Find element in collection.
13941
- *
13942
- * @param {Array|Object} collection
13943
- * @param {Function|Object} matcher
13944
- *
13945
- * @return {Object}
13946
- */
13947
-
13948
- function find(collection, matcher) {
13949
- matcher = toMatcher(matcher);
13950
- var match;
13951
- forEach(collection, function (val, key) {
13952
- if (matcher(val, key)) {
13953
- match = val;
13954
- return false;
13955
- }
13956
- });
13957
- return match;
13958
- }
13959
- /**
13960
- * Find element index in collection.
13961
- *
13962
- * @param {Array|Object} collection
13963
- * @param {Function} matcher
13964
- *
13965
- * @return {Object}
13966
- */
13967
-
13968
- function findIndex(collection, matcher) {
13969
- matcher = toMatcher(matcher);
13970
- var idx = isArray(collection) ? -1 : undefined;
13971
- forEach(collection, function (val, key) {
13972
- if (matcher(val, key)) {
13973
- idx = key;
13974
- return false;
13975
- }
13976
- });
13977
- return idx;
13978
- }
13979
- /**
13980
- * Find element in collection.
13981
- *
13982
- * @param {Array|Object} collection
13983
- * @param {Function} matcher
13984
- *
13985
- * @return {Array} result
13986
- */
13987
-
13988
- function filter(collection, matcher) {
13989
- var result = [];
13990
- forEach(collection, function (val, key) {
13991
- if (matcher(val, key)) {
13992
- result.push(val);
13993
- }
13994
- });
13995
- return result;
13996
- }
13997
- /**
13998
- * Iterate over collection; returning something
13999
- * (non-undefined) will stop iteration.
14000
- *
14001
- * @param {Array|Object} collection
14002
- * @param {Function} iterator
14003
- *
14004
- * @return {Object} return result that stopped the iteration
14005
- */
14006
-
14007
- function forEach(collection, iterator) {
14008
- var val, result;
14009
-
14010
- if (isUndefined(collection)) {
14011
- return;
14012
- }
14013
-
14014
- var convertKey = isArray(collection) ? toNum : identity;
14015
-
14016
- for (var key in collection) {
14017
- if (has(collection, key)) {
14018
- val = collection[key];
14019
- result = iterator(val, convertKey(key));
14020
-
14021
- if (result === false) {
14022
- return val;
14023
- }
14024
- }
14025
- }
14026
- }
14027
-
14028
- function toMatcher(matcher) {
14029
- return isFunction(matcher) ? matcher : function (e) {
14030
- return e === matcher;
14031
- };
14032
- }
14033
-
14034
- function identity(arg) {
14035
- return arg;
14036
- }
14037
-
14038
- function toNum(arg) {
14039
- return Number(arg);
14040
- }
14041
-
14042
- function _extends() {
14043
- _extends = Object.assign || function (target) {
14044
- for (var i = 1; i < arguments.length; i++) {
14045
- var source = arguments[i];
14046
-
14047
- for (var key in source) {
14048
- if (Object.prototype.hasOwnProperty.call(source, key)) {
14049
- target[key] = source[key];
14050
- }
14051
- }
14052
- }
14053
-
14054
- return target;
14055
- };
14056
-
14057
- return _extends.apply(this, arguments);
14058
- }
14059
-
14060
- /**
14061
- * Convenience wrapper for `Object.assign`.
14062
- *
14063
- * @param {Object} target
14064
- * @param {...Object} others
14065
- *
14066
- * @return {Object} the target
14067
- */
14068
-
14069
- function assign(target) {
14070
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14071
- others[_key - 1] = arguments[_key];
14072
- }
14073
-
14074
- return _extends.apply(void 0, [target].concat(others));
14075
- }
14076
-
14077
13781
  var fromCharCode = String.fromCharCode;
14078
13782
 
14079
13783
  var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -15248,7 +14952,7 @@
15248
14952
  * @property {Boolean} lax
15249
14953
  */
15250
14954
 
15251
- assign(this, options);
14955
+ assign$1(this, options);
15252
14956
 
15253
14957
  this.elementsById = {};
15254
14958
  this.references = [];
@@ -15469,7 +15173,7 @@
15469
15173
  model = this.model,
15470
15174
  propNameNs;
15471
15175
 
15472
- forEach(attributes, function(value, name) {
15176
+ forEach$1(attributes, function(value, name) {
15473
15177
 
15474
15178
  var prop = descriptor.propertiesByName[name],
15475
15179
  values;
@@ -15487,7 +15191,7 @@
15487
15191
  // IDREFS: parse references as whitespace-separated list
15488
15192
  values = value.split(' ');
15489
15193
 
15490
- forEach(values, function(v) {
15194
+ forEach$1(values, function(v) {
15491
15195
  context.addReference({
15492
15196
  element: instance,
15493
15197
  property: prop.ns.name,
@@ -15554,7 +15258,7 @@
15554
15258
 
15555
15259
  elementType = model.getType(elementTypeName);
15556
15260
 
15557
- return assign({}, property, {
15261
+ return assign$1({}, property, {
15558
15262
  effectiveType: getModdleDescriptor(elementType).name
15559
15263
  });
15560
15264
  }
@@ -15576,7 +15280,7 @@
15576
15280
  });
15577
15281
 
15578
15282
  if (property) {
15579
- return assign({}, property, {
15283
+ return assign$1({}, property, {
15580
15284
  effectiveType: getModdleDescriptor(elementType).name
15581
15285
  });
15582
15286
  }
@@ -15651,7 +15355,7 @@
15651
15355
  }
15652
15356
 
15653
15357
  if (propertyDesc.isReference) {
15654
- assign(newElement, {
15358
+ assign$1(newElement, {
15655
15359
  element: element
15656
15360
  });
15657
15361
 
@@ -15760,7 +15464,7 @@
15760
15464
  };
15761
15465
  }
15762
15466
 
15763
- assign(this, { lax: false }, options);
15467
+ assign$1(this, { lax: false }, options);
15764
15468
  }
15765
15469
 
15766
15470
  /**
@@ -15815,7 +15519,7 @@
15815
15519
  var model = this.model,
15816
15520
  lax = this.lax;
15817
15521
 
15818
- var context = new Context(assign({}, options, { rootHandler: rootHandler })),
15522
+ var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
15819
15523
  parser = new Parser({ proxy: true }),
15820
15524
  stack = createStack();
15821
15525
 
@@ -16210,14 +15914,14 @@
16210
15914
 
16211
15915
  function getElementNs(ns, descriptor) {
16212
15916
  if (descriptor.isGeneric) {
16213
- return assign({ localName: descriptor.ns.localName }, ns);
15917
+ return assign$1({ localName: descriptor.ns.localName }, ns);
16214
15918
  } else {
16215
- return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
15919
+ return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
16216
15920
  }
16217
15921
  }
16218
15922
 
16219
15923
  function getPropertyNs(ns, descriptor) {
16220
- return assign({ localName: descriptor.ns.localName }, ns);
15924
+ return assign$1({ localName: descriptor.ns.localName }, ns);
16221
15925
  }
16222
15926
 
16223
15927
  function getSerializableProperties(element) {
@@ -16231,7 +15935,7 @@
16231
15935
  }
16232
15936
 
16233
15937
  // do not serialize defaults
16234
- if (!has(element, name)) {
15938
+ if (!has$1(element, name)) {
16235
15939
  return false;
16236
15940
  }
16237
15941
 
@@ -16449,7 +16153,7 @@
16449
16153
  if (this.isLocalNs(effectiveNs)) {
16450
16154
  return { localName: ns.localName };
16451
16155
  } else {
16452
- return assign({ localName: ns.localName }, effectiveNs);
16156
+ return assign$1({ localName: ns.localName }, effectiveNs);
16453
16157
  }
16454
16158
  };
16455
16159
 
@@ -16460,7 +16164,7 @@
16460
16164
 
16461
16165
  var attributes = [];
16462
16166
 
16463
- forEach(element, function(val, key) {
16167
+ forEach$1(element, function(val, key) {
16464
16168
 
16465
16169
  var nonNsAttr;
16466
16170
 
@@ -16468,7 +16172,7 @@
16468
16172
  body.push(new BodySerializer().build({ type: 'String' }, val));
16469
16173
  } else
16470
16174
  if (key === '$children') {
16471
- forEach(val, function(child) {
16175
+ forEach$1(val, function(child) {
16472
16176
  body.push(new ElementSerializer(self).build(child));
16473
16177
  });
16474
16178
  } else
@@ -16538,7 +16242,7 @@
16538
16242
  // parse namespace attributes first
16539
16243
  // and log them. push non namespace attributes to a list
16540
16244
  // and process them later
16541
- forEach(genericAttrs, function(value, name) {
16245
+ forEach$1(genericAttrs, function(value, name) {
16542
16246
 
16543
16247
  var nonNsAttr = self.parseNsAttribute(element, name, value);
16544
16248
 
@@ -16554,7 +16258,7 @@
16554
16258
 
16555
16259
  var self = this;
16556
16260
 
16557
- forEach(attributes, function(attr) {
16261
+ forEach$1(attributes, function(attr) {
16558
16262
 
16559
16263
  // do not serialize xsi:type attribute
16560
16264
  // it is set manually based on the actual implementation type
@@ -16565,6 +16269,8 @@
16565
16269
  try {
16566
16270
  self.addAttribute(self.nsAttributeName(attr.name), attr.value);
16567
16271
  } catch (e) {
16272
+ /* global console */
16273
+
16568
16274
  console.warn(
16569
16275
  'missing namespace information for ',
16570
16276
  attr.name, '=', attr.value, 'on', element,
@@ -16579,7 +16285,7 @@
16579
16285
  body = this.body,
16580
16286
  element = this.element;
16581
16287
 
16582
- forEach(properties, function(p) {
16288
+ forEach$1(properties, function(p) {
16583
16289
  var value = element.get(p.name),
16584
16290
  isReference = p.isReference,
16585
16291
  isMany = p.isMany;
@@ -16592,12 +16298,12 @@
16592
16298
  body.push(new BodySerializer().build(p, value[0]));
16593
16299
  } else
16594
16300
  if (isSimple(p.type)) {
16595
- forEach(value, function(v) {
16301
+ forEach$1(value, function(v) {
16596
16302
  body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
16597
16303
  });
16598
16304
  } else
16599
16305
  if (isReference) {
16600
- forEach(value, function(v) {
16306
+ forEach$1(value, function(v) {
16601
16307
  body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
16602
16308
  });
16603
16309
  } else {
@@ -16607,7 +16313,7 @@
16607
16313
  var asType = serializeAsType(p),
16608
16314
  asProperty = serializeAsProperty(p);
16609
16315
 
16610
- forEach(value, function(v) {
16316
+ forEach$1(value, function(v) {
16611
16317
  var serializer;
16612
16318
 
16613
16319
  if (asType) {
@@ -16715,7 +16421,7 @@
16715
16421
  var self = this,
16716
16422
  element = this.element;
16717
16423
 
16718
- forEach(properties, function(p) {
16424
+ forEach$1(properties, function(p) {
16719
16425
 
16720
16426
  var value = element.get(p.name);
16721
16427
 
@@ -16726,7 +16432,7 @@
16726
16432
  }
16727
16433
  else {
16728
16434
  var values = [];
16729
- forEach(value, function(v) {
16435
+ forEach$1(value, function(v) {
16730
16436
  values.push(v.id);
16731
16437
  });
16732
16438
 
@@ -16782,7 +16488,7 @@
16782
16488
  attrs = getNsAttrs(namespaces).concat(attrs);
16783
16489
  }
16784
16490
 
16785
- forEach(attrs, function(a) {
16491
+ forEach$1(attrs, function(a) {
16786
16492
  writer
16787
16493
  .append(' ')
16788
16494
  .append(nsName(a.name)).append('="').append(a.value).append('"');
@@ -16809,7 +16515,7 @@
16809
16515
  .indent();
16810
16516
  }
16811
16517
 
16812
- forEach(this.body, function(b) {
16518
+ forEach$1(this.body, function(b) {
16813
16519
  b.serializeTo(writer);
16814
16520
  });
16815
16521
 
@@ -16877,7 +16583,7 @@
16877
16583
 
16878
16584
  function FormatingWriter(out, format) {
16879
16585
 
16880
- var indent = [''];
16586
+ var indent = [ '' ];
16881
16587
 
16882
16588
  this.append = function(str) {
16883
16589
  out.write(str);
@@ -16919,7 +16625,7 @@
16919
16625
  */
16920
16626
  function Writer(options) {
16921
16627
 
16922
- options = assign({ format: false, preamble: true }, options || {});
16628
+ options = assign$1({ format: false, preamble: true }, options || {});
16923
16629
 
16924
16630
  function toXML(tree, writer) {
16925
16631
  var internalWriter = writer || new SavingWriter();
@@ -16986,12 +16692,12 @@
16986
16692
  */
16987
16693
  BpmnModdle.prototype.fromXML = function(xmlStr, typeName, options) {
16988
16694
 
16989
- if (!isString$2(typeName)) {
16695
+ if (!isString(typeName)) {
16990
16696
  options = typeName;
16991
16697
  typeName = 'bpmn:Definitions';
16992
16698
  }
16993
16699
 
16994
- var reader = new Reader(assign$2({ model: this, lax: true }, options));
16700
+ var reader = new Reader(assign$1({ model: this, lax: true }, options));
16995
16701
  var rootHandler = reader.handler(typeName);
16996
16702
 
16997
16703
  return reader.fromXML(xmlStr, rootHandler);
@@ -20678,7 +20384,7 @@
20678
20384
  };
20679
20385
 
20680
20386
  function simple(additionalPackages, options) {
20681
- var pks = assign$2({}, packages, additionalPackages);
20387
+ var pks = assign$1({}, packages, additionalPackages);
20682
20388
 
20683
20389
  return new BpmnModdle(pks, options);
20684
20390
  }
@@ -20702,7 +20408,7 @@
20702
20408
  }
20703
20409
 
20704
20410
  var argLen = arguments.length;
20705
- if (argLen >= 1 && isFunction$1(arguments[argLen - 1])) {
20411
+ if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
20706
20412
 
20707
20413
  var callback = arguments[argLen - 1];
20708
20414
 
@@ -20743,7 +20449,7 @@
20743
20449
  function ensureCompatDiRef(businessObject) {
20744
20450
 
20745
20451
  // bpmnElement can have multiple independent DIs
20746
- if (!has$3(businessObject, 'di')) {
20452
+ if (!has$1(businessObject, 'di')) {
20747
20453
  Object.defineProperty(businessObject, 'di', {
20748
20454
  enumerable: false,
20749
20455
  get: function() {
@@ -20771,7 +20477,7 @@
20771
20477
  * correctly specify one.
20772
20478
  */
20773
20479
  function findDisplayCandidate(definitions) {
20774
- return find$1(definitions.rootElements, function(e) {
20480
+ return find(definitions.rootElements, function(e) {
20775
20481
  return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
20776
20482
  });
20777
20483
  }
@@ -20878,7 +20584,7 @@
20878
20584
  function handlePlane(plane) {
20879
20585
  registerDi(plane);
20880
20586
 
20881
- forEach$3(plane.planeElement, handlePlaneElement);
20587
+ forEach$1(plane.planeElement, handlePlaneElement);
20882
20588
  }
20883
20589
 
20884
20590
  function handlePlaneElement(planeElement) {
@@ -21003,7 +20709,7 @@
21003
20709
  // walk through all processes that have not yet been drawn and draw them
21004
20710
  // if they contain lanes with DI information.
21005
20711
  // we do this to pass the free-floating lane test cases in the MIWG test suite
21006
- var processes = filter$1(rootElements, function(e) {
20712
+ var processes = filter(rootElements, function(e) {
21007
20713
  return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
21008
20714
  });
21009
20715
 
@@ -21015,7 +20721,7 @@
21015
20721
  }
21016
20722
 
21017
20723
  function handleMessageFlows(messageFlows, context) {
21018
- forEach$3(messageFlows, contextual(handleMessageFlow, context));
20724
+ forEach$1(messageFlows, contextual(handleMessageFlow, context));
21019
20725
  }
21020
20726
 
21021
20727
  function handleDataAssociation(association, context) {
@@ -21041,7 +20747,7 @@
21041
20747
 
21042
20748
  function handleArtifacts(artifacts, context) {
21043
20749
 
21044
- forEach$3(artifacts, function(e) {
20750
+ forEach$1(artifacts, function(e) {
21045
20751
  if (is(e, 'bpmn:Association')) {
21046
20752
  deferred.push(function() {
21047
20753
  handleArtifact(e, context);
@@ -21058,8 +20764,8 @@
21058
20764
  return;
21059
20765
  }
21060
20766
 
21061
- forEach$3(ioSpecification.dataInputs, contextual(handleDataInput, context));
21062
- forEach$3(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
20767
+ forEach$1(ioSpecification.dataInputs, contextual(handleDataInput, context));
20768
+ forEach$1(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
21063
20769
  }
21064
20770
 
21065
20771
  function handleSubProcess(subProcess, context) {
@@ -21086,8 +20792,8 @@
21086
20792
  // * bpmn:CatchEvent
21087
20793
  //
21088
20794
  deferred.push(function() {
21089
- forEach$3(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
21090
- forEach$3(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
20795
+ forEach$1(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
20796
+ forEach$1(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
21091
20797
  });
21092
20798
  }
21093
20799
 
@@ -21114,11 +20820,11 @@
21114
20820
  }
21115
20821
 
21116
20822
  function handleLaneSet(laneSet, context) {
21117
- forEach$3(laneSet.lanes, contextual(handleLane, context));
20823
+ forEach$1(laneSet.lanes, contextual(handleLane, context));
21118
20824
  }
21119
20825
 
21120
20826
  function handleLaneSets(laneSets, context) {
21121
- forEach$3(laneSets, contextual(handleLaneSet, context));
20827
+ forEach$1(laneSets, contextual(handleLaneSet, context));
21122
20828
  }
21123
20829
 
21124
20830
  function handleFlowElementsContainer(container, context) {
@@ -21130,7 +20836,7 @@
21130
20836
  }
21131
20837
 
21132
20838
  function handleFlowElements(flowElements, context) {
21133
- forEach$3(flowElements, function(e) {
20839
+ forEach$1(flowElements, function(e) {
21134
20840
  if (is(e, 'bpmn:SequenceFlow')) {
21135
20841
  deferred.push(function() {
21136
20842
  handleSequenceFlow(e, context);
@@ -21168,7 +20874,7 @@
21168
20874
 
21169
20875
  function handleCollaboration(collaboration, context) {
21170
20876
 
21171
- forEach$3(collaboration.participants, contextual(handleParticipant, context));
20877
+ forEach$1(collaboration.participants, contextual(handleParticipant, context));
21172
20878
 
21173
20879
  handleArtifacts(collaboration.artifacts, context);
21174
20880
 
@@ -21182,7 +20888,7 @@
21182
20888
  function wireFlowNodeRefs(lane) {
21183
20889
 
21184
20890
  // wire the virtual flowNodeRefs <-> relationship
21185
- forEach$3(lane.flowNodeRef, function(flowNode) {
20891
+ forEach$1(lane.flowNodeRef, function(flowNode) {
21186
20892
  var lanes = flowNode.get('lanes');
21187
20893
 
21188
20894
  if (lanes) {
@@ -21276,7 +20982,7 @@
21276
20982
 
21277
20983
  // traverse BPMN 2.0 document model,
21278
20984
  // starting at definitions
21279
- forEach$3(diagramsToImport, function(diagram) {
20985
+ forEach$1(diagramsToImport, function(diagram) {
21280
20986
  walker.handleDefinitions(definitions, diagram);
21281
20987
  });
21282
20988
 
@@ -21343,12 +21049,12 @@
21343
21049
  if (is$1(rootElement, 'bpmn:Collaboration')) {
21344
21050
  collaboration = rootElement;
21345
21051
  } else {
21346
- collaboration = find$1(definitions.rootElements, function(element) {
21052
+ collaboration = find(definitions.rootElements, function(element) {
21347
21053
  if (!is$1(element, 'bpmn:Collaboration')) {
21348
21054
  return;
21349
21055
  }
21350
21056
 
21351
- return find$1(element.participants, function(participant) {
21057
+ return find(element.participants, function(participant) {
21352
21058
  return participant.processRef === rootElement;
21353
21059
  });
21354
21060
  });
@@ -21372,7 +21078,7 @@
21372
21078
  var diagramsToImport = [ bpmnDiagram ];
21373
21079
  var handledElements = [ bpmnElement ];
21374
21080
 
21375
- forEach$3(definitions.diagrams, function(diagram) {
21081
+ forEach$1(definitions.diagrams, function(diagram) {
21376
21082
  var businessObject = diagram.plane.bpmnElement;
21377
21083
 
21378
21084
  if (
@@ -21391,7 +21097,7 @@
21391
21097
  function selfAndAllFlowElements(elements) {
21392
21098
  var result = [];
21393
21099
 
21394
- forEach$3(elements, function(element) {
21100
+ forEach$1(elements, function(element) {
21395
21101
  if (!element) {
21396
21102
  return;
21397
21103
  }
@@ -21486,11 +21192,11 @@
21486
21192
  function createLightbox() {
21487
21193
  lightbox = domify$1(LIGHTBOX_MARKUP);
21488
21194
 
21489
- assign$3(lightbox, LIGHTBOX_STYLES);
21490
- assign$3(query('svg', lightbox), LOGO_STYLES);
21491
- assign$3(query('.backdrop', lightbox), BACKDROP_STYLES);
21492
- assign$3(query('.notice', lightbox), NOTICE_STYLES);
21493
- assign$3(query('.link', lightbox), LINK_STYLES, {
21195
+ assign(lightbox, LIGHTBOX_STYLES);
21196
+ assign(query('svg', lightbox), LOGO_STYLES);
21197
+ assign(query('.backdrop', lightbox), BACKDROP_STYLES);
21198
+ assign(query('.notice', lightbox), NOTICE_STYLES);
21199
+ assign(query('.link', lightbox), LINK_STYLES, {
21494
21200
  'margin': '15px 20px 15px 10px',
21495
21201
  'alignSelf': 'center'
21496
21202
  });
@@ -21532,7 +21238,7 @@
21532
21238
  */
21533
21239
  function BaseViewer(options) {
21534
21240
 
21535
- options = assign$4({}, DEFAULT_OPTIONS, options);
21241
+ options = assign$1({}, DEFAULT_OPTIONS, options);
21536
21242
 
21537
21243
  this._moddle = this._createModdle(options);
21538
21244
 
@@ -22074,8 +21780,8 @@
22074
21780
 
22075
21781
  const diagramModules = [].concat(staticModules, baseModules, additionalModules);
22076
21782
 
22077
- const diagramOptions = assign$4(omit(options, [ 'additionalModules' ]), {
22078
- canvas: assign$4({}, options.canvas, { container: container }),
21783
+ const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
21784
+ canvas: assign$1({}, options.canvas, { container: container }),
22079
21785
  modules: diagramModules
22080
21786
  });
22081
21787
 
@@ -22103,7 +21809,7 @@
22103
21809
 
22104
21810
  const container = domify$1('<div class="bjs-container"></div>');
22105
21811
 
22106
- assign$3(container, {
21812
+ assign(container, {
22107
21813
  width: ensureUnit(options.width),
22108
21814
  height: ensureUnit(options.height),
22109
21815
  position: options.position
@@ -22113,7 +21819,7 @@
22113
21819
  };
22114
21820
 
22115
21821
  BaseViewer.prototype._createModdle = function(options) {
22116
- const moddleOptions = assign$4({}, this._moddleExtensions, options.moddleExtensions);
21822
+ const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
22117
21823
 
22118
21824
  return new simple(moddleOptions);
22119
21825
  };
@@ -22172,7 +21878,7 @@
22172
21878
  return null;
22173
21879
  }
22174
21880
 
22175
- return find$1(definitions.diagrams, function(element) {
21881
+ return find(definitions.diagrams, function(element) {
22176
21882
  return element.id === diagramId;
22177
21883
  }) || null;
22178
21884
  }
@@ -22199,8 +21905,8 @@
22199
21905
 
22200
21906
  const linkElement = domify$1(linkMarkup);
22201
21907
 
22202
- assign$3(query('svg', linkElement), LOGO_STYLES);
22203
- assign$3(linkElement, LINK_STYLES, {
21908
+ assign(query('svg', linkElement), LOGO_STYLES);
21909
+ assign(linkElement, LINK_STYLES, {
22204
21910
  position: 'absolute',
22205
21911
  bottom: '15px',
22206
21912
  right: '15px',