camunda-bpmn-js 0.23.1 → 0.24.1

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.
@@ -646,7 +646,7 @@
646
646
  }
647
647
  }
648
648
 
649
- function ensureImported$1(element, target) {
649
+ function ensureImported(element, target) {
650
650
 
651
651
  if (element.ownerDocument !== target.ownerDocument) {
652
652
  try {
@@ -674,8 +674,8 @@
674
674
  *
675
675
  * @return {SVGElement} the appended node
676
676
  */
677
- function appendTo$1(element, target) {
678
- return target.appendChild(ensureImported$1(element, target));
677
+ function appendTo(element, target) {
678
+ return target.appendChild(ensureImported(element, target));
679
679
  }
680
680
 
681
681
  /**
@@ -690,8 +690,8 @@
690
690
  *
691
691
  * @return {SVGElement} the element
692
692
  */
693
- function append$1(target, node) {
694
- appendTo$1(node, target);
693
+ function append(target, node) {
694
+ appendTo(node, target);
695
695
  return target;
696
696
  }
697
697
 
@@ -699,9 +699,9 @@
699
699
  * attribute accessor utility
700
700
  */
701
701
 
702
- var LENGTH_ATTR$1 = 2;
702
+ var LENGTH_ATTR = 2;
703
703
 
704
- var CSS_PROPERTIES$1 = {
704
+ var CSS_PROPERTIES = {
705
705
  'alignment-baseline': 1,
706
706
  'baseline-shift': 1,
707
707
  'clip': 1,
@@ -725,7 +725,7 @@
725
725
  'flood-opacity': 1,
726
726
  'font': 1,
727
727
  'font-family': 1,
728
- 'font-size': LENGTH_ATTR$1,
728
+ 'font-size': LENGTH_ATTR,
729
729
  'font-size-adjust': 1,
730
730
  'font-stretch': 1,
731
731
  'font-style': 1,
@@ -755,7 +755,7 @@
755
755
  'stroke-linejoin': 1,
756
756
  'stroke-miterlimit': 1,
757
757
  'stroke-opacity': 1,
758
- 'stroke-width': LENGTH_ATTR$1,
758
+ 'stroke-width': LENGTH_ATTR,
759
759
  'text-anchor': 1,
760
760
  'text-decoration': 1,
761
761
  'text-rendering': 1,
@@ -766,23 +766,23 @@
766
766
  };
767
767
 
768
768
 
769
- function getAttribute$1(node, name) {
770
- if (CSS_PROPERTIES$1[name]) {
769
+ function getAttribute(node, name) {
770
+ if (CSS_PROPERTIES[name]) {
771
771
  return node.style[name];
772
772
  } else {
773
773
  return node.getAttributeNS(null, name);
774
774
  }
775
775
  }
776
776
 
777
- function setAttribute$1(node, name, value) {
777
+ function setAttribute(node, name, value) {
778
778
  var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
779
779
 
780
- var type = CSS_PROPERTIES$1[hyphenated];
780
+ var type = CSS_PROPERTIES[hyphenated];
781
781
 
782
782
  if (type) {
783
783
 
784
784
  // append pixel unit, unless present
785
- if (type === LENGTH_ATTR$1 && typeof value === 'number') {
785
+ if (type === LENGTH_ATTR && typeof value === 'number') {
786
786
  value = String(value) + 'px';
787
787
  }
788
788
 
@@ -792,12 +792,12 @@
792
792
  }
793
793
  }
794
794
 
795
- function setAttributes$1(node, attrs) {
795
+ function setAttributes(node, attrs) {
796
796
 
797
797
  var names = Object.keys(attrs), i, name;
798
798
 
799
799
  for (i = 0, name; (name = names[i]); i++) {
800
- setAttribute$1(node, name, attrs[name]);
800
+ setAttribute(node, name, attrs[name]);
801
801
  }
802
802
  }
803
803
 
@@ -811,15 +811,15 @@
811
811
  *
812
812
  * @return {String}
813
813
  */
814
- function attr$2(node, name, value) {
814
+ function attr$1(node, name, value) {
815
815
  if (typeof name === 'string') {
816
816
  if (value !== undefined) {
817
- setAttribute$1(node, name, value);
817
+ setAttribute(node, name, value);
818
818
  } else {
819
- return getAttribute$1(node, name);
819
+ return getAttribute(node, name);
820
820
  }
821
821
  } else {
822
- setAttributes$1(node, name);
822
+ setAttributes(node, name);
823
823
  }
824
824
 
825
825
  return node;
@@ -835,7 +835,7 @@
835
835
  * toString reference.
836
836
  */
837
837
 
838
- const toString$2 = Object.prototype.toString;
838
+ const toString$1 = Object.prototype.toString;
839
839
 
840
840
  /**
841
841
  * Wrap `el` in a `ClassList`.
@@ -845,11 +845,11 @@
845
845
  * @api public
846
846
  */
847
847
 
848
- function classes$2(el) {
849
- return new ClassList$2(el);
848
+ function classes$1(el) {
849
+ return new ClassList$1(el);
850
850
  }
851
851
 
852
- function ClassList$2(el) {
852
+ function ClassList$1(el) {
853
853
  if (!el || !el.nodeType) {
854
854
  throw new Error('A DOM element reference is required');
855
855
  }
@@ -865,7 +865,7 @@
865
865
  * @api public
866
866
  */
867
867
 
868
- ClassList$2.prototype.add = function(name) {
868
+ ClassList$1.prototype.add = function(name) {
869
869
  this.list.add(name);
870
870
  return this;
871
871
  };
@@ -880,8 +880,8 @@
880
880
  * @api public
881
881
  */
882
882
 
883
- ClassList$2.prototype.remove = function(name) {
884
- if ('[object RegExp]' == toString$2.call(name)) {
883
+ ClassList$1.prototype.remove = function(name) {
884
+ if ('[object RegExp]' == toString$1.call(name)) {
885
885
  return this.removeMatching(name);
886
886
  }
887
887
 
@@ -897,7 +897,7 @@
897
897
  * @api private
898
898
  */
899
899
 
900
- ClassList$2.prototype.removeMatching = function(re) {
900
+ ClassList$1.prototype.removeMatching = function(re) {
901
901
  const arr = this.array();
902
902
  for (let i = 0; i < arr.length; i++) {
903
903
  if (re.test(arr[i])) {
@@ -919,7 +919,7 @@
919
919
  * @api public
920
920
  */
921
921
 
922
- ClassList$2.prototype.toggle = function(name, force) {
922
+ ClassList$1.prototype.toggle = function(name, force) {
923
923
  if ('undefined' !== typeof force) {
924
924
  if (force !== this.list.toggle(name, force)) {
925
925
  this.list.toggle(name); // toggle again to correct
@@ -937,7 +937,7 @@
937
937
  * @api public
938
938
  */
939
939
 
940
- ClassList$2.prototype.array = function() {
940
+ ClassList$1.prototype.array = function() {
941
941
  return Array.from(this.list);
942
942
  };
943
943
 
@@ -949,12 +949,12 @@
949
949
  * @api public
950
950
  */
951
951
 
952
- ClassList$2.prototype.has =
953
- ClassList$2.prototype.contains = function(name) {
952
+ ClassList$1.prototype.has =
953
+ ClassList$1.prototype.contains = function(name) {
954
954
  return this.list.contains(name);
955
955
  };
956
956
 
957
- function remove$3(element) {
957
+ function remove$2(element) {
958
958
  var parent = element.parentNode;
959
959
 
960
960
  if (parent) {
@@ -974,17 +974,17 @@
974
974
  * @param {DOMElement} element
975
975
  * @return {DOMElement} the element (for chaining)
976
976
  */
977
- function clear$2(element) {
977
+ function clear$1(element) {
978
978
  var child;
979
979
 
980
980
  while ((child = element.firstChild)) {
981
- remove$3(child);
981
+ remove$2(child);
982
982
  }
983
983
 
984
984
  return element;
985
985
  }
986
986
 
987
- var ns$1 = {
987
+ var ns = {
988
988
  svg: 'http://www.w3.org/2000/svg'
989
989
  };
990
990
 
@@ -992,25 +992,25 @@
992
992
  * DOM parsing utility
993
993
  */
994
994
 
995
- var SVG_START$1 = '<svg xmlns="' + ns$1.svg + '"';
995
+ var SVG_START = '<svg xmlns="' + ns.svg + '"';
996
996
 
997
- function parse$2(svg) {
997
+ function parse$1(svg) {
998
998
 
999
999
  var unwrap = false;
1000
1000
 
1001
1001
  // ensure we import a valid svg document
1002
1002
  if (svg.substring(0, 4) === '<svg') {
1003
- if (svg.indexOf(ns$1.svg) === -1) {
1004
- svg = SVG_START$1 + svg.substring(4);
1003
+ if (svg.indexOf(ns.svg) === -1) {
1004
+ svg = SVG_START + svg.substring(4);
1005
1005
  }
1006
1006
  } else {
1007
1007
 
1008
1008
  // namespace svg
1009
- svg = SVG_START$1 + '>' + svg + '</svg>';
1009
+ svg = SVG_START + '>' + svg + '</svg>';
1010
1010
  unwrap = true;
1011
1011
  }
1012
1012
 
1013
- var parsed = parseDocument$1(svg);
1013
+ var parsed = parseDocument(svg);
1014
1014
 
1015
1015
  if (!unwrap) {
1016
1016
  return parsed;
@@ -1027,7 +1027,7 @@
1027
1027
  return fragment;
1028
1028
  }
1029
1029
 
1030
- function parseDocument$1(svg) {
1030
+ function parseDocument(svg) {
1031
1031
 
1032
1032
  var parser;
1033
1033
 
@@ -1051,18 +1051,18 @@
1051
1051
  *
1052
1052
  * @returns {SVGElement}
1053
1053
  */
1054
- function create$2(name, attrs) {
1054
+ function create$1(name, attrs) {
1055
1055
  var element;
1056
1056
 
1057
1057
  if (name.charAt(0) === '<') {
1058
- element = parse$2(name).firstChild;
1058
+ element = parse$1(name).firstChild;
1059
1059
  element = document.importNode(element, true);
1060
1060
  } else {
1061
- element = document.createElementNS(ns$1.svg, name);
1061
+ element = document.createElementNS(ns.svg, name);
1062
1062
  }
1063
1063
 
1064
1064
  if (attrs) {
1065
- attr$2(element, attrs);
1065
+ attr$1(element, attrs);
1066
1066
  }
1067
1067
 
1068
1068
  return element;
@@ -1077,7 +1077,7 @@
1077
1077
 
1078
1078
  function getNode() {
1079
1079
  if (node === null) {
1080
- node = create$2('svg');
1080
+ node = create$1('svg');
1081
1081
  }
1082
1082
 
1083
1083
  return node;
@@ -1132,6 +1132,152 @@
1132
1132
  }
1133
1133
  }
1134
1134
 
1135
+ /**
1136
+ * Serialization util
1137
+ */
1138
+
1139
+ var TEXT_ENTITIES = /([&<>]{1})/g;
1140
+ var ATTR_ENTITIES = /([\n\r"]{1})/g;
1141
+
1142
+ var ENTITY_REPLACEMENT = {
1143
+ '&': '&amp;',
1144
+ '<': '&lt;',
1145
+ '>': '&gt;',
1146
+ '"': '\''
1147
+ };
1148
+
1149
+ function escape$1(str, pattern) {
1150
+
1151
+ function replaceFn(match, entity) {
1152
+ return ENTITY_REPLACEMENT[entity] || entity;
1153
+ }
1154
+
1155
+ return str.replace(pattern, replaceFn);
1156
+ }
1157
+
1158
+ function serialize(node, output) {
1159
+
1160
+ var i, len, attrMap, attrNode, childNodes;
1161
+
1162
+ switch (node.nodeType) {
1163
+
1164
+ // TEXT
1165
+ case 3:
1166
+
1167
+ // replace special XML characters
1168
+ output.push(escape$1(node.textContent, TEXT_ENTITIES));
1169
+ break;
1170
+
1171
+ // ELEMENT
1172
+ case 1:
1173
+ output.push('<', node.tagName);
1174
+
1175
+ if (node.hasAttributes()) {
1176
+ attrMap = node.attributes;
1177
+ for (i = 0, len = attrMap.length; i < len; ++i) {
1178
+ attrNode = attrMap.item(i);
1179
+ output.push(' ', attrNode.name, '="', escape$1(attrNode.value, ATTR_ENTITIES), '"');
1180
+ }
1181
+ }
1182
+
1183
+ if (node.hasChildNodes()) {
1184
+ output.push('>');
1185
+ childNodes = node.childNodes;
1186
+ for (i = 0, len = childNodes.length; i < len; ++i) {
1187
+ serialize(childNodes.item(i), output);
1188
+ }
1189
+ output.push('</', node.tagName, '>');
1190
+ } else {
1191
+ output.push('/>');
1192
+ }
1193
+ break;
1194
+
1195
+ // COMMENT
1196
+ case 8:
1197
+ output.push('<!--', escape$1(node.nodeValue, TEXT_ENTITIES), '-->');
1198
+ break;
1199
+
1200
+ // CDATA
1201
+ case 4:
1202
+ output.push('<![CDATA[', node.nodeValue, ']]>');
1203
+ break;
1204
+
1205
+ default:
1206
+ throw new Error('unable to handle node ' + node.nodeType);
1207
+ }
1208
+
1209
+ return output;
1210
+ }
1211
+
1212
+ /**
1213
+ * innerHTML like functionality for SVG elements.
1214
+ * based on innerSVG (https://code.google.com/p/innersvg)
1215
+ */
1216
+
1217
+
1218
+ function set(element, svg) {
1219
+
1220
+ var parsed = parse$1(svg);
1221
+
1222
+ // clear element contents
1223
+ clear$1(element);
1224
+
1225
+ if (!svg) {
1226
+ return;
1227
+ }
1228
+
1229
+ if (!isFragment(parsed)) {
1230
+
1231
+ // extract <svg> from parsed document
1232
+ parsed = parsed.documentElement;
1233
+ }
1234
+
1235
+ var nodes = slice$1(parsed.childNodes);
1236
+
1237
+ // import + append each node
1238
+ for (var i = 0; i < nodes.length; i++) {
1239
+ appendTo(nodes[i], element);
1240
+ }
1241
+
1242
+ }
1243
+
1244
+ function get(element) {
1245
+ var child = element.firstChild,
1246
+ output = [];
1247
+
1248
+ while (child) {
1249
+ serialize(child, output);
1250
+ child = child.nextSibling;
1251
+ }
1252
+
1253
+ return output.join('');
1254
+ }
1255
+
1256
+ function isFragment(node) {
1257
+ return node.nodeName === '#document-fragment';
1258
+ }
1259
+
1260
+ function innerSVG(element, svg) {
1261
+
1262
+ if (svg !== undefined) {
1263
+
1264
+ try {
1265
+ set(element, svg);
1266
+ } catch (e) {
1267
+ throw new Error('error parsing SVG: ' + e.message);
1268
+ }
1269
+
1270
+ return element;
1271
+ } else {
1272
+ return get(element);
1273
+ }
1274
+ }
1275
+
1276
+
1277
+ function slice$1(arr) {
1278
+ return Array.prototype.slice.call(arr);
1279
+ }
1280
+
1135
1281
  /**
1136
1282
  * transform accessor utility
1137
1283
  */
@@ -1194,18 +1340,18 @@
1194
1340
 
1195
1341
  function createLine(points, attrs) {
1196
1342
 
1197
- var line = create$2('polyline');
1198
- attr$2(line, { points: toSVGPoints(points) });
1343
+ var line = create$1('polyline');
1344
+ attr$1(line, { points: toSVGPoints(points) });
1199
1345
 
1200
1346
  if (attrs) {
1201
- attr$2(line, attrs);
1347
+ attr$1(line, attrs);
1202
1348
  }
1203
1349
 
1204
1350
  return line;
1205
1351
  }
1206
1352
 
1207
1353
  function updateLine(gfx, points) {
1208
- attr$2(gfx, { points: toSVGPoints(points) });
1354
+ attr$1(gfx, { points: toSVGPoints(points) });
1209
1355
 
1210
1356
  return gfx;
1211
1357
  }
@@ -1474,7 +1620,7 @@
1474
1620
  * @param {String} [val]
1475
1621
  * @api public
1476
1622
  */
1477
- function attr$1(el, name, val) {
1623
+ function attr(el, name, val) {
1478
1624
 
1479
1625
  // get
1480
1626
  if (arguments.length == 2) {
@@ -1502,7 +1648,7 @@
1502
1648
  * toString reference.
1503
1649
  */
1504
1650
 
1505
- const toString$1 = Object.prototype.toString;
1651
+ const toString = Object.prototype.toString;
1506
1652
 
1507
1653
  /**
1508
1654
  * Wrap `el` in a `ClassList`.
@@ -1512,8 +1658,8 @@
1512
1658
  * @api public
1513
1659
  */
1514
1660
 
1515
- function classes$1(el) {
1516
- return new ClassList$1(el);
1661
+ function classes(el) {
1662
+ return new ClassList(el);
1517
1663
  }
1518
1664
 
1519
1665
  /**
@@ -1523,7 +1669,7 @@
1523
1669
  * @api private
1524
1670
  */
1525
1671
 
1526
- function ClassList$1(el) {
1672
+ function ClassList(el) {
1527
1673
  if (!el || !el.nodeType) {
1528
1674
  throw new Error('A DOM element reference is required');
1529
1675
  }
@@ -1539,7 +1685,7 @@
1539
1685
  * @api public
1540
1686
  */
1541
1687
 
1542
- ClassList$1.prototype.add = function(name) {
1688
+ ClassList.prototype.add = function(name) {
1543
1689
  this.list.add(name);
1544
1690
  return this;
1545
1691
  };
@@ -1554,8 +1700,8 @@
1554
1700
  * @api public
1555
1701
  */
1556
1702
 
1557
- ClassList$1.prototype.remove = function(name) {
1558
- if ('[object RegExp]' == toString$1.call(name)) {
1703
+ ClassList.prototype.remove = function(name) {
1704
+ if ('[object RegExp]' == toString.call(name)) {
1559
1705
  return this.removeMatching(name);
1560
1706
  }
1561
1707
 
@@ -1571,7 +1717,7 @@
1571
1717
  * @api private
1572
1718
  */
1573
1719
 
1574
- ClassList$1.prototype.removeMatching = function(re) {
1720
+ ClassList.prototype.removeMatching = function(re) {
1575
1721
  const arr = this.array();
1576
1722
  for (let i = 0; i < arr.length; i++) {
1577
1723
  if (re.test(arr[i])) {
@@ -1593,7 +1739,7 @@
1593
1739
  * @api public
1594
1740
  */
1595
1741
 
1596
- ClassList$1.prototype.toggle = function(name, force) {
1742
+ ClassList.prototype.toggle = function(name, force) {
1597
1743
  if ('undefined' !== typeof force) {
1598
1744
  if (force !== this.list.toggle(name, force)) {
1599
1745
  this.list.toggle(name); // toggle again to correct
@@ -1611,7 +1757,7 @@
1611
1757
  * @api public
1612
1758
  */
1613
1759
 
1614
- ClassList$1.prototype.array = function() {
1760
+ ClassList.prototype.array = function() {
1615
1761
  return Array.from(this.list);
1616
1762
  };
1617
1763
 
@@ -1623,15 +1769,15 @@
1623
1769
  * @api public
1624
1770
  */
1625
1771
 
1626
- ClassList$1.prototype.has =
1627
- ClassList$1.prototype.contains = function(name) {
1772
+ ClassList.prototype.has =
1773
+ ClassList.prototype.contains = function(name) {
1628
1774
  return this.list.contains(name);
1629
1775
  };
1630
1776
 
1631
1777
  /**
1632
1778
  * Remove all children from the given element.
1633
1779
  */
1634
- function clear$1(el) {
1780
+ function clear(el) {
1635
1781
 
1636
1782
  var c;
1637
1783
 
@@ -1719,762 +1865,194 @@
1719
1865
  bind: bind_1,
1720
1866
  unbind: unbind_1,
1721
1867
  'default': componentEvent
1722
- }, [componentEvent]);
1723
-
1724
- /**
1725
- * Module dependencies.
1726
- */
1727
-
1728
- /**
1729
- * Delegate event `type` to `selector`
1730
- * and invoke `fn(e)`. A callback function
1731
- * is returned which may be passed to `.unbind()`.
1732
- *
1733
- * @param {Element} el
1734
- * @param {String} selector
1735
- * @param {String} type
1736
- * @param {Function} fn
1737
- * @param {Boolean} capture
1738
- * @return {Function}
1739
- * @api public
1740
- */
1741
-
1742
- // Some events don't bubble, so we want to bind to the capture phase instead
1743
- // when delegating.
1744
- var forceCaptureEvents = [ 'focus', 'blur' ];
1745
-
1746
- function bind(el, selector, type, fn, capture) {
1747
- if (forceCaptureEvents.indexOf(type) !== -1) {
1748
- capture = true;
1749
- }
1750
-
1751
- return event.bind(el, type, function(e) {
1752
- var target = e.target || e.srcElement;
1753
- e.delegateTarget = closest(target, selector, true);
1754
- if (e.delegateTarget) {
1755
- fn.call(el, e);
1756
- }
1757
- }, capture);
1758
- }
1759
-
1760
- /**
1761
- * Unbind event `type`'s callback `fn`.
1762
- *
1763
- * @param {Element} el
1764
- * @param {String} type
1765
- * @param {Function} fn
1766
- * @param {Boolean} capture
1767
- * @api public
1768
- */
1769
- function unbind(el, type, fn, capture) {
1770
- if (forceCaptureEvents.indexOf(type) !== -1) {
1771
- capture = true;
1772
- }
1773
-
1774
- return event.unbind(el, type, fn, capture);
1775
- }
1776
-
1777
- var delegate = {
1778
- bind,
1779
- unbind
1780
- };
1781
-
1782
- /**
1783
- * Expose `parse`.
1784
- */
1785
-
1786
- var domify = parse$1;
1787
-
1788
- /**
1789
- * Tests for browser support.
1790
- */
1791
-
1792
- var innerHTMLBug = false;
1793
- var bugTestDiv;
1794
- if (typeof document !== 'undefined') {
1795
- bugTestDiv = document.createElement('div');
1796
- // Setup
1797
- bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
1798
- // Make sure that link elements get serialized correctly by innerHTML
1799
- // This requires a wrapper element in IE
1800
- innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length;
1801
- bugTestDiv = undefined;
1802
- }
1803
-
1804
- /**
1805
- * Wrap map from jquery.
1806
- */
1807
-
1808
- var map = {
1809
- legend: [1, '<fieldset>', '</fieldset>'],
1810
- tr: [2, '<table><tbody>', '</tbody></table>'],
1811
- col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
1812
- // for script/link/style tags to work in IE6-8, you have to wrap
1813
- // in a div with a non-whitespace character in front, ha!
1814
- _default: innerHTMLBug ? [1, 'X<div>', '</div>'] : [0, '', '']
1815
- };
1816
-
1817
- map.td =
1818
- map.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
1819
-
1820
- map.option =
1821
- map.optgroup = [1, '<select multiple="multiple">', '</select>'];
1822
-
1823
- map.thead =
1824
- map.tbody =
1825
- map.colgroup =
1826
- map.caption =
1827
- map.tfoot = [1, '<table>', '</table>'];
1828
-
1829
- map.polyline =
1830
- map.ellipse =
1831
- map.polygon =
1832
- map.circle =
1833
- map.text =
1834
- map.line =
1835
- map.path =
1836
- map.rect =
1837
- map.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
1838
-
1839
- /**
1840
- * Parse `html` and return a DOM Node instance, which could be a TextNode,
1841
- * HTML DOM Node of some kind (<div> for example), or a DocumentFragment
1842
- * instance, depending on the contents of the `html` string.
1843
- *
1844
- * @param {String} html - HTML string to "domify"
1845
- * @param {Document} doc - The `document` instance to create the Node for
1846
- * @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance
1847
- * @api private
1848
- */
1849
-
1850
- function parse$1(html, doc) {
1851
- if ('string' != typeof html) throw new TypeError('String expected');
1852
-
1853
- // default to the global `document` object
1854
- if (!doc) doc = document;
1855
-
1856
- // tag name
1857
- var m = /<([\w:]+)/.exec(html);
1858
- if (!m) return doc.createTextNode(html);
1859
-
1860
- html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace
1861
-
1862
- var tag = m[1];
1863
-
1864
- // body support
1865
- if (tag == 'body') {
1866
- var el = doc.createElement('html');
1867
- el.innerHTML = html;
1868
- return el.removeChild(el.lastChild);
1869
- }
1870
-
1871
- // wrap map
1872
- var wrap = Object.prototype.hasOwnProperty.call(map, tag) ? map[tag] : map._default;
1873
- var depth = wrap[0];
1874
- var prefix = wrap[1];
1875
- var suffix = wrap[2];
1876
- var el = doc.createElement('div');
1877
- el.innerHTML = prefix + html + suffix;
1878
- while (depth--) el = el.lastChild;
1879
-
1880
- // one element
1881
- if (el.firstChild == el.lastChild) {
1882
- return el.removeChild(el.firstChild);
1883
- }
1884
-
1885
- // several elements
1886
- var fragment = doc.createDocumentFragment();
1887
- while (el.firstChild) {
1888
- fragment.appendChild(el.removeChild(el.firstChild));
1889
- }
1890
-
1891
- return fragment;
1892
- }
1893
-
1894
- var domify$1 = domify;
1895
-
1896
- function query(selector, el) {
1897
- el = el || document;
1898
-
1899
- return el.querySelector(selector);
1900
- }
1901
-
1902
- function all(selector, el) {
1903
- el = el || document;
1904
-
1905
- return el.querySelectorAll(selector);
1906
- }
1907
-
1908
- function remove$2(el) {
1909
- el.parentNode && el.parentNode.removeChild(el);
1910
- }
1911
-
1912
- function ensureImported(element, target) {
1913
-
1914
- if (element.ownerDocument !== target.ownerDocument) {
1915
- try {
1916
-
1917
- // may fail on webkit
1918
- return target.ownerDocument.importNode(element, true);
1919
- } catch (e) {
1920
-
1921
- // ignore
1922
- }
1923
- }
1924
-
1925
- return element;
1926
- }
1927
-
1928
- /**
1929
- * appendTo utility
1930
- */
1931
-
1932
- /**
1933
- * Append a node to a target element and return the appended node.
1934
- *
1935
- * @param {SVGElement} element
1936
- * @param {SVGElement} target
1937
- *
1938
- * @return {SVGElement} the appended node
1939
- */
1940
- function appendTo(element, target) {
1941
- return target.appendChild(ensureImported(element, target));
1942
- }
1943
-
1944
- /**
1945
- * append utility
1946
- */
1947
-
1948
- /**
1949
- * Append a node to an element
1950
- *
1951
- * @param {SVGElement} element
1952
- * @param {SVGElement} node
1953
- *
1954
- * @return {SVGElement} the element
1955
- */
1956
- function append(target, node) {
1957
- appendTo(node, target);
1958
- return target;
1959
- }
1960
-
1961
- /**
1962
- * attribute accessor utility
1963
- */
1964
-
1965
- var LENGTH_ATTR = 2;
1966
-
1967
- var CSS_PROPERTIES = {
1968
- 'alignment-baseline': 1,
1969
- 'baseline-shift': 1,
1970
- 'clip': 1,
1971
- 'clip-path': 1,
1972
- 'clip-rule': 1,
1973
- 'color': 1,
1974
- 'color-interpolation': 1,
1975
- 'color-interpolation-filters': 1,
1976
- 'color-profile': 1,
1977
- 'color-rendering': 1,
1978
- 'cursor': 1,
1979
- 'direction': 1,
1980
- 'display': 1,
1981
- 'dominant-baseline': 1,
1982
- 'enable-background': 1,
1983
- 'fill': 1,
1984
- 'fill-opacity': 1,
1985
- 'fill-rule': 1,
1986
- 'filter': 1,
1987
- 'flood-color': 1,
1988
- 'flood-opacity': 1,
1989
- 'font': 1,
1990
- 'font-family': 1,
1991
- 'font-size': LENGTH_ATTR,
1992
- 'font-size-adjust': 1,
1993
- 'font-stretch': 1,
1994
- 'font-style': 1,
1995
- 'font-variant': 1,
1996
- 'font-weight': 1,
1997
- 'glyph-orientation-horizontal': 1,
1998
- 'glyph-orientation-vertical': 1,
1999
- 'image-rendering': 1,
2000
- 'kerning': 1,
2001
- 'letter-spacing': 1,
2002
- 'lighting-color': 1,
2003
- 'marker': 1,
2004
- 'marker-end': 1,
2005
- 'marker-mid': 1,
2006
- 'marker-start': 1,
2007
- 'mask': 1,
2008
- 'opacity': 1,
2009
- 'overflow': 1,
2010
- 'pointer-events': 1,
2011
- 'shape-rendering': 1,
2012
- 'stop-color': 1,
2013
- 'stop-opacity': 1,
2014
- 'stroke': 1,
2015
- 'stroke-dasharray': 1,
2016
- 'stroke-dashoffset': 1,
2017
- 'stroke-linecap': 1,
2018
- 'stroke-linejoin': 1,
2019
- 'stroke-miterlimit': 1,
2020
- 'stroke-opacity': 1,
2021
- 'stroke-width': LENGTH_ATTR,
2022
- 'text-anchor': 1,
2023
- 'text-decoration': 1,
2024
- 'text-rendering': 1,
2025
- 'unicode-bidi': 1,
2026
- 'visibility': 1,
2027
- 'word-spacing': 1,
2028
- 'writing-mode': 1
2029
- };
2030
-
2031
-
2032
- function getAttribute(node, name) {
2033
- if (CSS_PROPERTIES[name]) {
2034
- return node.style[name];
2035
- } else {
2036
- return node.getAttributeNS(null, name);
2037
- }
2038
- }
2039
-
2040
- function setAttribute(node, name, value) {
2041
- var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
2042
-
2043
- var type = CSS_PROPERTIES[hyphenated];
2044
-
2045
- if (type) {
2046
-
2047
- // append pixel unit, unless present
2048
- if (type === LENGTH_ATTR && typeof value === 'number') {
2049
- value = String(value) + 'px';
2050
- }
2051
-
2052
- node.style[hyphenated] = value;
2053
- } else {
2054
- node.setAttributeNS(null, name, value);
2055
- }
2056
- }
2057
-
2058
- function setAttributes(node, attrs) {
2059
-
2060
- var names = Object.keys(attrs), i, name;
2061
-
2062
- for (i = 0, name; (name = names[i]); i++) {
2063
- setAttribute(node, name, attrs[name]);
2064
- }
2065
- }
2066
-
2067
- /**
2068
- * Gets or sets raw attributes on a node.
2069
- *
2070
- * @param {SVGElement} node
2071
- * @param {Object} [attrs]
2072
- * @param {String} [name]
2073
- * @param {String} [value]
2074
- *
2075
- * @return {String}
2076
- */
2077
- function attr(node, name, value) {
2078
- if (typeof name === 'string') {
2079
- if (value !== undefined) {
2080
- setAttribute(node, name, value);
2081
- } else {
2082
- return getAttribute(node, name);
2083
- }
2084
- } else {
2085
- setAttributes(node, name);
2086
- }
2087
-
2088
- return node;
2089
- }
2090
-
2091
- /**
2092
- * Taken from https://github.com/component/classes
2093
- *
2094
- * Without the component bits.
2095
- */
2096
-
2097
- /**
2098
- * toString reference.
2099
- */
2100
-
2101
- const toString = Object.prototype.toString;
2102
-
2103
- /**
2104
- * Wrap `el` in a `ClassList`.
2105
- *
2106
- * @param {Element} el
2107
- * @return {ClassList}
2108
- * @api public
2109
- */
2110
-
2111
- function classes(el) {
2112
- return new ClassList(el);
2113
- }
2114
-
2115
- function ClassList(el) {
2116
- if (!el || !el.nodeType) {
2117
- throw new Error('A DOM element reference is required');
2118
- }
2119
- this.el = el;
2120
- this.list = el.classList;
2121
- }
2122
-
2123
- /**
2124
- * Add class `name` if not already present.
2125
- *
2126
- * @param {String} name
2127
- * @return {ClassList}
2128
- * @api public
2129
- */
2130
-
2131
- ClassList.prototype.add = function(name) {
2132
- this.list.add(name);
2133
- return this;
2134
- };
2135
-
2136
- /**
2137
- * Remove class `name` when present, or
2138
- * pass a regular expression to remove
2139
- * any which match.
2140
- *
2141
- * @param {String|RegExp} name
2142
- * @return {ClassList}
2143
- * @api public
2144
- */
2145
-
2146
- ClassList.prototype.remove = function(name) {
2147
- if ('[object RegExp]' == toString.call(name)) {
2148
- return this.removeMatching(name);
2149
- }
2150
-
2151
- this.list.remove(name);
2152
- return this;
2153
- };
2154
-
2155
- /**
2156
- * Remove all classes matching `re`.
2157
- *
2158
- * @param {RegExp} re
2159
- * @return {ClassList}
2160
- * @api private
2161
- */
2162
-
2163
- ClassList.prototype.removeMatching = function(re) {
2164
- const arr = this.array();
2165
- for (let i = 0; i < arr.length; i++) {
2166
- if (re.test(arr[i])) {
2167
- this.remove(arr[i]);
2168
- }
2169
- }
2170
- return this;
2171
- };
2172
-
2173
- /**
2174
- * Toggle class `name`, can force state via `force`.
2175
- *
2176
- * For browsers that support classList, but do not support `force` yet,
2177
- * the mistake will be detected and corrected.
2178
- *
2179
- * @param {String} name
2180
- * @param {Boolean} force
2181
- * @return {ClassList}
2182
- * @api public
2183
- */
2184
-
2185
- ClassList.prototype.toggle = function(name, force) {
2186
- if ('undefined' !== typeof force) {
2187
- if (force !== this.list.toggle(name, force)) {
2188
- this.list.toggle(name); // toggle again to correct
2189
- }
2190
- } else {
2191
- this.list.toggle(name);
2192
- }
2193
- return this;
2194
- };
2195
-
2196
- /**
2197
- * Return an array of classes.
2198
- *
2199
- * @return {Array}
2200
- * @api public
2201
- */
2202
-
2203
- ClassList.prototype.array = function() {
2204
- return Array.from(this.list);
2205
- };
2206
-
2207
- /**
2208
- * Check if class `name` is present.
2209
- *
2210
- * @param {String} name
2211
- * @return {ClassList}
2212
- * @api public
2213
- */
2214
-
2215
- ClassList.prototype.has =
2216
- ClassList.prototype.contains = function(name) {
2217
- return this.list.contains(name);
2218
- };
2219
-
2220
- function remove$1(element) {
2221
- var parent = element.parentNode;
2222
-
2223
- if (parent) {
2224
- parent.removeChild(element);
2225
- }
2226
-
2227
- return element;
2228
- }
2229
-
2230
- /**
2231
- * Clear utility
2232
- */
2233
-
2234
- /**
2235
- * Removes all children from the given element
2236
- *
2237
- * @param {DOMElement} element
2238
- * @return {DOMElement} the element (for chaining)
2239
- */
2240
- function clear(element) {
2241
- var child;
2242
-
2243
- while ((child = element.firstChild)) {
2244
- remove$1(child);
2245
- }
2246
-
2247
- return element;
2248
- }
2249
-
2250
- var ns = {
2251
- svg: 'http://www.w3.org/2000/svg'
2252
- };
2253
-
2254
- /**
2255
- * DOM parsing utility
2256
- */
2257
-
2258
- var SVG_START = '<svg xmlns="' + ns.svg + '"';
2259
-
2260
- function parse(svg) {
2261
-
2262
- var unwrap = false;
2263
-
2264
- // ensure we import a valid svg document
2265
- if (svg.substring(0, 4) === '<svg') {
2266
- if (svg.indexOf(ns.svg) === -1) {
2267
- svg = SVG_START + svg.substring(4);
2268
- }
2269
- } else {
2270
-
2271
- // namespace svg
2272
- svg = SVG_START + '>' + svg + '</svg>';
2273
- unwrap = true;
2274
- }
2275
-
2276
- var parsed = parseDocument(svg);
2277
-
2278
- if (!unwrap) {
2279
- return parsed;
2280
- }
2281
-
2282
- var fragment = document.createDocumentFragment();
2283
-
2284
- var parent = parsed.firstChild;
2285
-
2286
- while (parent.firstChild) {
2287
- fragment.appendChild(parent.firstChild);
2288
- }
2289
-
2290
- return fragment;
2291
- }
2292
-
2293
- function parseDocument(svg) {
2294
-
2295
- var parser;
2296
-
2297
- // parse
2298
- parser = new DOMParser();
2299
- parser.async = false;
2300
-
2301
- return parser.parseFromString(svg, 'text/xml');
2302
- }
1868
+ }, [componentEvent]);
2303
1869
 
2304
1870
  /**
2305
- * Create utility for SVG elements
1871
+ * Module dependencies.
2306
1872
  */
2307
1873
 
2308
-
2309
1874
  /**
2310
- * Create a specific type from name or SVG markup.
2311
- *
2312
- * @param {String} name the name or markup of the element
2313
- * @param {Object} [attrs] attributes to set on the element
1875
+ * Delegate event `type` to `selector`
1876
+ * and invoke `fn(e)`. A callback function
1877
+ * is returned which may be passed to `.unbind()`.
2314
1878
  *
2315
- * @returns {SVGElement}
1879
+ * @param {Element} el
1880
+ * @param {String} selector
1881
+ * @param {String} type
1882
+ * @param {Function} fn
1883
+ * @param {Boolean} capture
1884
+ * @return {Function}
1885
+ * @api public
2316
1886
  */
2317
- function create$1(name, attrs) {
2318
- var element;
2319
1887
 
2320
- if (name.charAt(0) === '<') {
2321
- element = parse(name).firstChild;
2322
- element = document.importNode(element, true);
2323
- } else {
2324
- element = document.createElementNS(ns.svg, name);
2325
- }
1888
+ // Some events don't bubble, so we want to bind to the capture phase instead
1889
+ // when delegating.
1890
+ var forceCaptureEvents = [ 'focus', 'blur' ];
2326
1891
 
2327
- if (attrs) {
2328
- attr(element, attrs);
1892
+ function bind(el, selector, type, fn, capture) {
1893
+ if (forceCaptureEvents.indexOf(type) !== -1) {
1894
+ capture = true;
2329
1895
  }
2330
1896
 
2331
- return element;
1897
+ return event.bind(el, type, function(e) {
1898
+ var target = e.target || e.srcElement;
1899
+ e.delegateTarget = closest(target, selector, true);
1900
+ if (e.delegateTarget) {
1901
+ fn.call(el, e);
1902
+ }
1903
+ }, capture);
2332
1904
  }
2333
1905
 
2334
1906
  /**
2335
- * Serialization util
1907
+ * Unbind event `type`'s callback `fn`.
1908
+ *
1909
+ * @param {Element} el
1910
+ * @param {String} type
1911
+ * @param {Function} fn
1912
+ * @param {Boolean} capture
1913
+ * @api public
2336
1914
  */
2337
-
2338
- var TEXT_ENTITIES = /([&<>]{1})/g;
2339
- var ATTR_ENTITIES = /([\n\r"]{1})/g;
2340
-
2341
- var ENTITY_REPLACEMENT = {
2342
- '&': '&amp;',
2343
- '<': '&lt;',
2344
- '>': '&gt;',
2345
- '"': '\''
2346
- };
2347
-
2348
- function escape$1(str, pattern) {
2349
-
2350
- function replaceFn(match, entity) {
2351
- return ENTITY_REPLACEMENT[entity] || entity;
1915
+ function unbind(el, type, fn, capture) {
1916
+ if (forceCaptureEvents.indexOf(type) !== -1) {
1917
+ capture = true;
2352
1918
  }
2353
1919
 
2354
- return str.replace(pattern, replaceFn);
1920
+ return event.unbind(el, type, fn, capture);
2355
1921
  }
2356
1922
 
2357
- function serialize(node, output) {
2358
-
2359
- var i, len, attrMap, attrNode, childNodes;
1923
+ var delegate = {
1924
+ bind,
1925
+ unbind
1926
+ };
2360
1927
 
2361
- switch (node.nodeType) {
1928
+ /**
1929
+ * Expose `parse`.
1930
+ */
2362
1931
 
2363
- // TEXT
2364
- case 3:
1932
+ var domify = parse;
2365
1933
 
2366
- // replace special XML characters
2367
- output.push(escape$1(node.textContent, TEXT_ENTITIES));
2368
- break;
1934
+ /**
1935
+ * Tests for browser support.
1936
+ */
2369
1937
 
2370
- // ELEMENT
2371
- case 1:
2372
- output.push('<', node.tagName);
1938
+ var innerHTMLBug = false;
1939
+ var bugTestDiv;
1940
+ if (typeof document !== 'undefined') {
1941
+ bugTestDiv = document.createElement('div');
1942
+ // Setup
1943
+ bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
1944
+ // Make sure that link elements get serialized correctly by innerHTML
1945
+ // This requires a wrapper element in IE
1946
+ innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length;
1947
+ bugTestDiv = undefined;
1948
+ }
2373
1949
 
2374
- if (node.hasAttributes()) {
2375
- attrMap = node.attributes;
2376
- for (i = 0, len = attrMap.length; i < len; ++i) {
2377
- attrNode = attrMap.item(i);
2378
- output.push(' ', attrNode.name, '="', escape$1(attrNode.value, ATTR_ENTITIES), '"');
2379
- }
2380
- }
1950
+ /**
1951
+ * Wrap map from jquery.
1952
+ */
2381
1953
 
2382
- if (node.hasChildNodes()) {
2383
- output.push('>');
2384
- childNodes = node.childNodes;
2385
- for (i = 0, len = childNodes.length; i < len; ++i) {
2386
- serialize(childNodes.item(i), output);
2387
- }
2388
- output.push('</', node.tagName, '>');
2389
- } else {
2390
- output.push('/>');
2391
- }
2392
- break;
1954
+ var map = {
1955
+ legend: [1, '<fieldset>', '</fieldset>'],
1956
+ tr: [2, '<table><tbody>', '</tbody></table>'],
1957
+ col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
1958
+ // for script/link/style tags to work in IE6-8, you have to wrap
1959
+ // in a div with a non-whitespace character in front, ha!
1960
+ _default: innerHTMLBug ? [1, 'X<div>', '</div>'] : [0, '', '']
1961
+ };
2393
1962
 
2394
- // COMMENT
2395
- case 8:
2396
- output.push('<!--', escape$1(node.nodeValue, TEXT_ENTITIES), '-->');
2397
- break;
1963
+ map.td =
1964
+ map.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
2398
1965
 
2399
- // CDATA
2400
- case 4:
2401
- output.push('<![CDATA[', node.nodeValue, ']]>');
2402
- break;
1966
+ map.option =
1967
+ map.optgroup = [1, '<select multiple="multiple">', '</select>'];
2403
1968
 
2404
- default:
2405
- throw new Error('unable to handle node ' + node.nodeType);
2406
- }
1969
+ map.thead =
1970
+ map.tbody =
1971
+ map.colgroup =
1972
+ map.caption =
1973
+ map.tfoot = [1, '<table>', '</table>'];
2407
1974
 
2408
- return output;
2409
- }
1975
+ map.polyline =
1976
+ map.ellipse =
1977
+ map.polygon =
1978
+ map.circle =
1979
+ map.text =
1980
+ map.line =
1981
+ map.path =
1982
+ map.rect =
1983
+ map.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
2410
1984
 
2411
1985
  /**
2412
- * innerHTML like functionality for SVG elements.
2413
- * based on innerSVG (https://code.google.com/p/innersvg)
1986
+ * Parse `html` and return a DOM Node instance, which could be a TextNode,
1987
+ * HTML DOM Node of some kind (<div> for example), or a DocumentFragment
1988
+ * instance, depending on the contents of the `html` string.
1989
+ *
1990
+ * @param {String} html - HTML string to "domify"
1991
+ * @param {Document} doc - The `document` instance to create the Node for
1992
+ * @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance
1993
+ * @api private
2414
1994
  */
2415
1995
 
1996
+ function parse(html, doc) {
1997
+ if ('string' != typeof html) throw new TypeError('String expected');
2416
1998
 
2417
- function set(element, svg) {
2418
-
2419
- var parsed = parse(svg);
1999
+ // default to the global `document` object
2000
+ if (!doc) doc = document;
2420
2001
 
2421
- // clear element contents
2422
- clear(element);
2002
+ // tag name
2003
+ var m = /<([\w:]+)/.exec(html);
2004
+ if (!m) return doc.createTextNode(html);
2423
2005
 
2424
- if (!svg) {
2425
- return;
2426
- }
2006
+ html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace
2427
2007
 
2428
- if (!isFragment(parsed)) {
2008
+ var tag = m[1];
2429
2009
 
2430
- // extract <svg> from parsed document
2431
- parsed = parsed.documentElement;
2010
+ // body support
2011
+ if (tag == 'body') {
2012
+ var el = doc.createElement('html');
2013
+ el.innerHTML = html;
2014
+ return el.removeChild(el.lastChild);
2432
2015
  }
2433
2016
 
2434
- var nodes = slice$1(parsed.childNodes);
2017
+ // wrap map
2018
+ var wrap = Object.prototype.hasOwnProperty.call(map, tag) ? map[tag] : map._default;
2019
+ var depth = wrap[0];
2020
+ var prefix = wrap[1];
2021
+ var suffix = wrap[2];
2022
+ var el = doc.createElement('div');
2023
+ el.innerHTML = prefix + html + suffix;
2024
+ while (depth--) el = el.lastChild;
2435
2025
 
2436
- // import + append each node
2437
- for (var i = 0; i < nodes.length; i++) {
2438
- appendTo(nodes[i], element);
2026
+ // one element
2027
+ if (el.firstChild == el.lastChild) {
2028
+ return el.removeChild(el.firstChild);
2439
2029
  }
2440
2030
 
2441
- }
2442
-
2443
- function get(element) {
2444
- var child = element.firstChild,
2445
- output = [];
2446
-
2447
- while (child) {
2448
- serialize(child, output);
2449
- child = child.nextSibling;
2031
+ // several elements
2032
+ var fragment = doc.createDocumentFragment();
2033
+ while (el.firstChild) {
2034
+ fragment.appendChild(el.removeChild(el.firstChild));
2450
2035
  }
2451
2036
 
2452
- return output.join('');
2037
+ return fragment;
2453
2038
  }
2454
2039
 
2455
- function isFragment(node) {
2456
- return node.nodeName === '#document-fragment';
2457
- }
2040
+ var domify$1 = domify;
2458
2041
 
2459
- function innerSVG(element, svg) {
2042
+ function query(selector, el) {
2043
+ el = el || document;
2460
2044
 
2461
- if (svg !== undefined) {
2045
+ return el.querySelector(selector);
2046
+ }
2462
2047
 
2463
- try {
2464
- set(element, svg);
2465
- } catch (e) {
2466
- throw new Error('error parsing SVG: ' + e.message);
2467
- }
2048
+ function all(selector, el) {
2049
+ el = el || document;
2468
2050
 
2469
- return element;
2470
- } else {
2471
- return get(element);
2472
- }
2051
+ return el.querySelectorAll(selector);
2473
2052
  }
2474
2053
 
2475
-
2476
- function slice$1(arr) {
2477
- return Array.prototype.slice.call(arr);
2054
+ function remove$1(el) {
2055
+ el.parentNode && el.parentNode.removeChild(el);
2478
2056
  }
2479
2057
 
2480
2058
  /**
@@ -2731,11 +2309,11 @@
2731
2309
 
2732
2310
  var marker = create$1('marker');
2733
2311
 
2734
- attr(options.element, attrs);
2312
+ attr$1(options.element, attrs);
2735
2313
 
2736
2314
  append(marker, options.element);
2737
2315
 
2738
- attr(marker, {
2316
+ attr$1(marker, {
2739
2317
  id: id,
2740
2318
  viewBox: '0 0 20 20',
2741
2319
  refX: ref.x,
@@ -2778,7 +2356,7 @@
2778
2356
 
2779
2357
  if (type === 'sequenceflow-end') {
2780
2358
  var sequenceflowEnd = create$1('path');
2781
- attr(sequenceflowEnd, { d: 'M 1 5 L 11 10 L 1 15 Z' });
2359
+ attr$1(sequenceflowEnd, { d: 'M 1 5 L 11 10 L 1 15 Z' });
2782
2360
 
2783
2361
  addMarker(id, {
2784
2362
  element: sequenceflowEnd,
@@ -2793,7 +2371,7 @@
2793
2371
 
2794
2372
  if (type === 'messageflow-start') {
2795
2373
  var messageflowStart = create$1('circle');
2796
- attr(messageflowStart, { cx: 6, cy: 6, r: 3.5 });
2374
+ attr$1(messageflowStart, { cx: 6, cy: 6, r: 3.5 });
2797
2375
 
2798
2376
  addMarker(id, {
2799
2377
  element: messageflowStart,
@@ -2807,7 +2385,7 @@
2807
2385
 
2808
2386
  if (type === 'messageflow-end') {
2809
2387
  var messageflowEnd = create$1('path');
2810
- attr(messageflowEnd, { d: 'm 1 5 l 0 -3 l 7 3 l -7 3 z' });
2388
+ attr$1(messageflowEnd, { d: 'm 1 5 l 0 -3 l 7 3 l -7 3 z' });
2811
2389
 
2812
2390
  addMarker(id, {
2813
2391
  element: messageflowEnd,
@@ -2822,7 +2400,7 @@
2822
2400
 
2823
2401
  if (type === 'association-start') {
2824
2402
  var associationStart = create$1('path');
2825
- attr(associationStart, { d: 'M 11 5 L 1 10 L 11 15' });
2403
+ attr$1(associationStart, { d: 'M 11 5 L 1 10 L 11 15' });
2826
2404
 
2827
2405
  addMarker(id, {
2828
2406
  element: associationStart,
@@ -2838,7 +2416,7 @@
2838
2416
 
2839
2417
  if (type === 'association-end') {
2840
2418
  var associationEnd = create$1('path');
2841
- attr(associationEnd, { d: 'M 1 5 L 11 10 L 1 15' });
2419
+ attr$1(associationEnd, { d: 'M 1 5 L 11 10 L 1 15' });
2842
2420
 
2843
2421
  addMarker(id, {
2844
2422
  element: associationEnd,
@@ -2854,7 +2432,7 @@
2854
2432
 
2855
2433
  if (type === 'conditional-flow-marker') {
2856
2434
  var conditionalflowMarker = create$1('path');
2857
- attr(conditionalflowMarker, { d: 'M 0 10 L 8 6 L 16 10 L 8 14 Z' });
2435
+ attr$1(conditionalflowMarker, { d: 'M 0 10 L 8 6 L 16 10 L 8 14 Z' });
2858
2436
 
2859
2437
  addMarker(id, {
2860
2438
  element: conditionalflowMarker,
@@ -2869,7 +2447,7 @@
2869
2447
 
2870
2448
  if (type === 'conditional-default-flow-marker') {
2871
2449
  var conditionaldefaultflowMarker = create$1('path');
2872
- attr(conditionaldefaultflowMarker, { d: 'M 6 4 L 10 16' });
2450
+ attr$1(conditionaldefaultflowMarker, { d: 'M 6 4 L 10 16' });
2873
2451
 
2874
2452
  addMarker(id, {
2875
2453
  element: conditionaldefaultflowMarker,
@@ -2905,12 +2483,12 @@
2905
2483
  cy = height / 2;
2906
2484
 
2907
2485
  var circle = create$1('circle');
2908
- attr(circle, {
2486
+ attr$1(circle, {
2909
2487
  cx: cx,
2910
2488
  cy: cy,
2911
2489
  r: Math.round((width + height) / 4 - offset)
2912
2490
  });
2913
- attr(circle, attrs);
2491
+ attr$1(circle, attrs);
2914
2492
 
2915
2493
  append(parentGfx, circle);
2916
2494
 
@@ -2933,7 +2511,7 @@
2933
2511
  });
2934
2512
 
2935
2513
  var rect = create$1('rect');
2936
- attr(rect, {
2514
+ attr$1(rect, {
2937
2515
  x: offset,
2938
2516
  y: offset,
2939
2517
  width: width - offset * 2,
@@ -2941,7 +2519,7 @@
2941
2519
  rx: r,
2942
2520
  ry: r
2943
2521
  });
2944
- attr(rect, attrs);
2522
+ attr$1(rect, attrs);
2945
2523
 
2946
2524
  append(parentGfx, rect);
2947
2525
 
@@ -2966,10 +2544,10 @@
2966
2544
  });
2967
2545
 
2968
2546
  var polygon = create$1('polygon');
2969
- attr(polygon, {
2547
+ attr$1(polygon, {
2970
2548
  points: pointsString
2971
2549
  });
2972
- attr(polygon, attrs);
2550
+ attr$1(polygon, attrs);
2973
2551
 
2974
2552
  append(parentGfx, polygon);
2975
2553
 
@@ -2998,8 +2576,8 @@
2998
2576
  });
2999
2577
 
3000
2578
  var path = create$1('path');
3001
- attr(path, { d: d });
3002
- attr(path, attrs);
2579
+ attr$1(path, { d: d });
2580
+ attr$1(path, attrs);
3003
2581
 
3004
2582
  append(parentGfx, path);
3005
2583
 
@@ -3087,7 +2665,7 @@
3087
2665
 
3088
2666
  var text = textRenderer.createText(label || '', options);
3089
2667
 
3090
- classes(text).add('djs-label');
2668
+ classes$1(text).add('djs-label');
3091
2669
 
3092
2670
  append(parentGfx, text);
3093
2671
 
@@ -3699,7 +3277,7 @@
3699
3277
  });
3700
3278
 
3701
3279
  var businessHeaderPath = drawPath(parentGfx, headerPathData);
3702
- attr(businessHeaderPath, {
3280
+ attr$1(businessHeaderPath, {
3703
3281
  strokeWidth: 1,
3704
3282
  fill: getFillColor(element, '#aaaaaa'),
3705
3283
  stroke: getStrokeColor(element, defaultStrokeColor)
@@ -3713,7 +3291,7 @@
3713
3291
  });
3714
3292
 
3715
3293
  var businessPath = drawPath(parentGfx, headerData);
3716
- attr(businessPath, {
3294
+ attr$1(businessPath, {
3717
3295
  strokeWidth: 1,
3718
3296
  stroke: getStrokeColor(element, defaultStrokeColor)
3719
3297
  });
@@ -3731,7 +3309,7 @@
3731
3309
  var expanded = isExpanded(element);
3732
3310
 
3733
3311
  if (isEventSubProcess(element)) {
3734
- attr(rect, {
3312
+ attr$1(rect, {
3735
3313
  strokeDasharray: '1,2'
3736
3314
  });
3737
3315
  }
@@ -3953,7 +3531,7 @@
3953
3531
  });
3954
3532
 
3955
3533
  var parallelPath = drawPath(parentGfx, pathData);
3956
- attr(parallelPath, {
3534
+ attr$1(parallelPath, {
3957
3535
  strokeWidth: 1,
3958
3536
  fill: 'none'
3959
3537
  });
@@ -3961,7 +3539,7 @@
3961
3539
 
3962
3540
  if (!instantiate) {
3963
3541
  var innerCircle = drawCircle(parentGfx, element.width, element.height, element.height * 0.26);
3964
- attr(innerCircle, {
3542
+ attr$1(innerCircle, {
3965
3543
  strokeWidth: 1,
3966
3544
  fill: 'none',
3967
3545
  stroke: getStrokeColor(element, defaultStrokeColor)
@@ -4006,7 +3584,7 @@
4006
3584
 
4007
3585
  // conditional flow marker
4008
3586
  if (sequenceFlow.conditionExpression && source.$instanceOf('bpmn:Activity')) {
4009
- attr(path, {
3587
+ attr$1(path, {
4010
3588
  markerStart: marker('conditional-flow-marker', fill, stroke)
4011
3589
  });
4012
3590
  }
@@ -4014,7 +3592,7 @@
4014
3592
  // default marker
4015
3593
  if (source.default && (source.$instanceOf('bpmn:Gateway') || source.$instanceOf('bpmn:Activity')) &&
4016
3594
  source.default === sequenceFlow) {
4017
- attr(path, {
3595
+ attr$1(path, {
4018
3596
  markerStart: marker('conditional-default-flow-marker', fill, stroke)
4019
3597
  });
4020
3598
  }
@@ -4732,9 +4310,9 @@
4732
4310
  var helperSvg = document.getElementById('helper-svg');
4733
4311
 
4734
4312
  if (!helperSvg) {
4735
- helperSvg = create$2('svg');
4313
+ helperSvg = create$1('svg');
4736
4314
 
4737
- attr$2(helperSvg, {
4315
+ attr$1(helperSvg, {
4738
4316
  id: 'helper-svg'
4739
4317
  });
4740
4318
 
@@ -4828,13 +4406,13 @@
4828
4406
  var maxWidth = box.width - padding.left - padding.right;
4829
4407
 
4830
4408
  // ensure correct rendering by attaching helper text node to invisible SVG
4831
- var helperText = create$2('text');
4832
- attr$2(helperText, { x: 0, y: 0 });
4833
- attr$2(helperText, style);
4409
+ var helperText = create$1('text');
4410
+ attr$1(helperText, { x: 0, y: 0 });
4411
+ attr$1(helperText, style);
4834
4412
 
4835
4413
  var helperSvg = getHelperSvg();
4836
4414
 
4837
- append$1(helperSvg, helperText);
4415
+ append(helperSvg, helperText);
4838
4416
 
4839
4417
  while (lines.length) {
4840
4418
  layouted.push(layoutNext(lines, maxWidth, helperText));
@@ -4863,9 +4441,9 @@
4863
4441
  y -= (lineHeight || layouted[0].height) / 4;
4864
4442
 
4865
4443
 
4866
- var textElement = create$2('text');
4444
+ var textElement = create$1('text');
4867
4445
 
4868
- attr$2(textElement, style);
4446
+ attr$1(textElement, style);
4869
4447
 
4870
4448
  // layout each line taking into account that parent
4871
4449
  // shape might resize to fit text size
@@ -4892,15 +4470,15 @@
4892
4470
  - line.width) / 2 + padding.left), 0);
4893
4471
  }
4894
4472
 
4895
- var tspan = create$2('tspan');
4896
- attr$2(tspan, { x: x, y: y });
4473
+ var tspan = create$1('tspan');
4474
+ attr$1(tspan, { x: x, y: y });
4897
4475
 
4898
4476
  tspan.textContent = line.text;
4899
4477
 
4900
- append$1(textElement, tspan);
4478
+ append(textElement, tspan);
4901
4479
  });
4902
4480
 
4903
- remove$3(helperText);
4481
+ remove$2(helperText);
4904
4482
 
4905
4483
  var dimensions = {
4906
4484
  width: maxLineWidth,
@@ -6477,13 +6055,13 @@
6477
6055
  throw new Error('invalid hit type <' + type + '>');
6478
6056
  }
6479
6057
 
6480
- attr$2(hit, attrs);
6058
+ attr$1(hit, attrs);
6481
6059
 
6482
6060
  return hit;
6483
6061
  }
6484
6062
 
6485
6063
  function appendHit(gfx, hit) {
6486
- append$1(gfx, hit);
6064
+ append(gfx, hit);
6487
6065
  }
6488
6066
 
6489
6067
 
@@ -6497,7 +6075,7 @@
6497
6075
  this.removeHits = function(gfx) {
6498
6076
  var hits = all('.djs-hit', gfx);
6499
6077
 
6500
- forEach$1(hits, remove$3);
6078
+ forEach$1(hits, remove$2);
6501
6079
  };
6502
6080
 
6503
6081
  /**
@@ -6561,11 +6139,11 @@
6561
6139
  y: 0
6562
6140
  }, attrs);
6563
6141
 
6564
- var hit = create$2('rect');
6142
+ var hit = create$1('rect');
6565
6143
 
6566
6144
  applyStyle(hit, type);
6567
6145
 
6568
- attr$2(hit, attrs);
6146
+ attr$1(hit, attrs);
6569
6147
 
6570
6148
  appendHit(gfx, hit);
6571
6149
 
@@ -6591,7 +6169,7 @@
6591
6169
  if (element.waypoints) {
6592
6170
  updateLine(hit, element.waypoints);
6593
6171
  } else {
6594
- attr$2(hit, {
6172
+ attr$1(hit, {
6595
6173
  width: element.width,
6596
6174
  height: element.height
6597
6175
  });
@@ -6799,9 +6377,9 @@
6799
6377
  var self = this;
6800
6378
 
6801
6379
  function createOutline(gfx, bounds) {
6802
- var outline = create$2('rect');
6380
+ var outline = create$1('rect');
6803
6381
 
6804
- attr$2(outline, assign$1({
6382
+ attr$1(outline, assign$1({
6805
6383
  x: 10,
6806
6384
  y: 10,
6807
6385
  rx: 3,
@@ -6809,7 +6387,7 @@
6809
6387
  height: 100
6810
6388
  }, OUTLINE_STYLE));
6811
6389
 
6812
- append$1(gfx, outline);
6390
+ append(gfx, outline);
6813
6391
 
6814
6392
  return outline;
6815
6393
  }
@@ -6853,7 +6431,7 @@
6853
6431
  */
6854
6432
  Outline.prototype.updateShapeOutline = function(outline, element) {
6855
6433
 
6856
- attr$2(outline, {
6434
+ attr$1(outline, {
6857
6435
  x: -this.offset,
6858
6436
  y: -this.offset,
6859
6437
  width: element.width + this.offset * 2,
@@ -6874,7 +6452,7 @@
6874
6452
 
6875
6453
  var bbox = getBBox(connection);
6876
6454
 
6877
- attr$2(outline, {
6455
+ attr$1(outline, {
6878
6456
  x: bbox.x - this.offset,
6879
6457
  y: bbox.y - this.offset,
6880
6458
  width: bbox.width + this.offset * 2,
@@ -7078,13 +6656,13 @@
7078
6656
  SelectionVisuals.prototype._updateSelectionOutline = function(selection) {
7079
6657
  var layer = this._canvas.getLayer('selectionOutline');
7080
6658
 
7081
- clear$2(layer);
6659
+ clear$1(layer);
7082
6660
 
7083
6661
  var enabled = selection.length > 1;
7084
6662
 
7085
6663
  var container = this._canvas.getContainer();
7086
6664
 
7087
- classes$2(container)[enabled ? 'add' : 'remove']('djs-multi-select');
6665
+ classes$1(container)[enabled ? 'add' : 'remove']('djs-multi-select');
7088
6666
 
7089
6667
  if (!enabled) {
7090
6668
  return;
@@ -7092,15 +6670,15 @@
7092
6670
 
7093
6671
  var bBox = addSelectionOutlinePadding(getBBox(selection));
7094
6672
 
7095
- var rect = create$2('rect');
6673
+ var rect = create$1('rect');
7096
6674
 
7097
- attr$2(rect, assign$1({
6675
+ attr$1(rect, assign$1({
7098
6676
  rx: 3
7099
6677
  }, bBox));
7100
6678
 
7101
- classes$2(rect).add('djs-selection-outline');
6679
+ classes$1(rect).add('djs-selection-outline');
7102
6680
 
7103
- append$1(layer, rect);
6681
+ append(layer, rect);
7104
6682
  };
7105
6683
 
7106
6684
  // helpers //////////
@@ -7509,8 +7087,8 @@
7509
7087
  var container = self._getOverlayContainer(overlay.element, true);
7510
7088
 
7511
7089
  if (overlay) {
7512
- remove$2(overlay.html);
7513
- remove$2(overlay.htmlContainer);
7090
+ remove$1(overlay.html);
7091
+ remove$1(overlay.htmlContainer);
7514
7092
 
7515
7093
  delete overlay.htmlContainer;
7516
7094
  delete overlay.element;
@@ -7543,7 +7121,7 @@
7543
7121
 
7544
7122
  this._overlayContainers = [];
7545
7123
 
7546
- clear$1(this._overlayRoot);
7124
+ clear(this._overlayRoot);
7547
7125
  };
7548
7126
 
7549
7127
  Overlays.prototype._updateOverlayContainer = function(container) {
@@ -7564,7 +7142,7 @@
7564
7142
 
7565
7143
  setPosition(html, x, y);
7566
7144
 
7567
- attr$1(container.html, 'data-container-id', element.id);
7145
+ attr(container.html, 'data-container-id', element.id);
7568
7146
  };
7569
7147
 
7570
7148
 
@@ -7691,7 +7269,7 @@
7691
7269
  htmlContainer.appendChild(html);
7692
7270
 
7693
7271
  if (overlay.type) {
7694
- classes$1(htmlContainer).add('djs-overlay-' + overlay.type);
7272
+ classes(htmlContainer).add('djs-overlay-' + overlay.type);
7695
7273
  }
7696
7274
 
7697
7275
  var elementRoot = this._canvas.findRoot(element);
@@ -7820,7 +7398,7 @@
7820
7398
  var container = self._getOverlayContainer(element);
7821
7399
 
7822
7400
  if (container) {
7823
- remove$2(container.html);
7401
+ remove$1(container.html);
7824
7402
  var i = self._overlayContainers.indexOf(container);
7825
7403
  if (i !== -1) {
7826
7404
  self._overlayContainers.splice(i, 1);
@@ -7851,7 +7429,7 @@
7851
7429
  eventBus.on('element.marker.update', function(e) {
7852
7430
  var container = self._getOverlayContainer(e.element, true);
7853
7431
  if (container) {
7854
- classes$1(container.html)[e.add ? 'add' : 'remove'](e.marker);
7432
+ classes(container.html)[e.add ? 'add' : 'remove'](e.marker);
7855
7433
  }
7856
7434
  });
7857
7435
 
@@ -8316,7 +7894,7 @@
8316
7894
  function DrilldownBreadcrumbs(eventBus, elementRegistry, overlays, canvas) {
8317
7895
  var breadcrumbs = domify$1('<ul class="bjs-breadcrumbs"></ul>');
8318
7896
  var container = canvas.getContainer();
8319
- var containerClasses = classes$1(container);
7897
+ var containerClasses = classes(container);
8320
7898
  container.appendChild(breadcrumbs);
8321
7899
 
8322
7900
  var boParents = [];
@@ -8872,7 +8450,7 @@
8872
8450
  }
8873
8451
 
8874
8452
  var hasContent = bo && bo.flowElements && bo.flowElements.length;
8875
- classes$1(overlay.html).toggle(EMPTY_MARKER, !hasContent);
8453
+ classes(overlay.html).toggle(EMPTY_MARKER, !hasContent);
8876
8454
  };
8877
8455
 
8878
8456
  /**
@@ -9424,9 +9002,9 @@
9424
9002
  };
9425
9003
 
9426
9004
  DefaultRenderer.prototype.drawShape = function drawShape(visuals, element, attrs) {
9427
- var rect = create$2('rect');
9005
+ var rect = create$1('rect');
9428
9006
 
9429
- attr$2(rect, {
9007
+ attr$1(rect, {
9430
9008
  x: 0,
9431
9009
  y: 0,
9432
9010
  width: element.width || 0,
@@ -9434,12 +9012,12 @@
9434
9012
  });
9435
9013
 
9436
9014
  if (isFrameElement(element)) {
9437
- attr$2(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
9015
+ attr$1(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
9438
9016
  } else {
9439
- attr$2(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
9017
+ attr$1(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
9440
9018
  }
9441
9019
 
9442
- append$1(visuals, rect);
9020
+ append(visuals, rect);
9443
9021
 
9444
9022
  return rect;
9445
9023
  };
@@ -9447,7 +9025,7 @@
9447
9025
  DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
9448
9026
 
9449
9027
  var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
9450
- append$1(visuals, line);
9028
+ append(visuals, line);
9451
9029
 
9452
9030
  return line;
9453
9031
  };
@@ -9670,7 +9248,7 @@
9670
9248
  // this way we can always get the correct container size
9671
9249
  // (this is impossible for <svg> elements at the moment)
9672
9250
  const parent = document.createElement('div');
9673
- parent.setAttribute('class', 'djs-container');
9251
+ parent.setAttribute('class', 'djs-container djs-parent');
9674
9252
 
9675
9253
  assign(parent, {
9676
9254
  position: 'relative',
@@ -9685,8 +9263,8 @@
9685
9263
  }
9686
9264
 
9687
9265
  function createGroup(parent, cls, childIndex) {
9688
- const group = create$2('g');
9689
- classes$2(group).add(cls);
9266
+ const group = create$1('g');
9267
+ classes$1(group).add(cls);
9690
9268
 
9691
9269
  const index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
9692
9270
 
@@ -9764,10 +9342,10 @@
9764
9342
  // html container
9765
9343
  const container = this._container = createContainer(config);
9766
9344
 
9767
- const svg = this._svg = create$2('svg');
9768
- attr$2(svg, { width: '100%', height: '100%' });
9345
+ const svg = this._svg = create$1('svg');
9346
+ attr$1(svg, { width: '100%', height: '100%' });
9769
9347
 
9770
- append$1(container, svg);
9348
+ append(container, svg);
9771
9349
 
9772
9350
  const viewport = this._viewport = createGroup(svg, 'viewport');
9773
9351
 
@@ -10005,7 +9583,7 @@
10005
9583
  return group;
10006
9584
  }
10007
9585
 
10008
- remove$3(group);
9586
+ remove$2(group);
10009
9587
 
10010
9588
  layer.visible = false;
10011
9589
 
@@ -10020,7 +9598,7 @@
10020
9598
  if (layer) {
10021
9599
  delete this._layers[name];
10022
9600
 
10023
- remove$3(layer.group);
9601
+ remove$2(layer.group);
10024
9602
  }
10025
9603
  };
10026
9604
 
@@ -10113,9 +9691,9 @@
10113
9691
 
10114
9692
  // invoke either addClass or removeClass based on mode
10115
9693
  if (add) {
10116
- classes$2(gfx).add(marker);
9694
+ classes$1(gfx).add(marker);
10117
9695
  } else {
10118
- classes$2(gfx).remove(marker);
9696
+ classes$1(gfx).remove(marker);
10119
9697
  }
10120
9698
  }
10121
9699
  });
@@ -10181,7 +9759,7 @@
10181
9759
 
10182
9760
  const gfx = this.getGraphics(element);
10183
9761
 
10184
- return classes$2(gfx).has(marker);
9762
+ return classes$1(gfx).has(marker);
10185
9763
  };
10186
9764
 
10187
9765
  /**
@@ -11079,10 +10657,10 @@
11079
10657
  this._validateId(id);
11080
10658
 
11081
10659
  // associate dom node with element
11082
- attr$2(gfx, ELEMENT_ID, id);
10660
+ attr$1(gfx, ELEMENT_ID, id);
11083
10661
 
11084
10662
  if (secondaryGfx) {
11085
- attr$2(secondaryGfx, ELEMENT_ID, id);
10663
+ attr$1(secondaryGfx, ELEMENT_ID, id);
11086
10664
  }
11087
10665
 
11088
10666
  this._elements[id] = { element: element, gfx: gfx, secondaryGfx: secondaryGfx };
@@ -11091,7 +10669,7 @@
11091
10669
  /**
11092
10670
  * Removes an element from the registry.
11093
10671
  *
11094
- * @param {djs.model.Base} element
10672
+ * @param {string|djs.model.Base} element
11095
10673
  */
11096
10674
  ElementRegistry.prototype.remove = function(element) {
11097
10675
  var elements = this._elements,
@@ -11101,10 +10679,10 @@
11101
10679
  if (container) {
11102
10680
 
11103
10681
  // unset element id on gfx
11104
- attr$2(container.gfx, ELEMENT_ID, '');
10682
+ attr$1(container.gfx, ELEMENT_ID, '');
11105
10683
 
11106
10684
  if (container.secondaryGfx) {
11107
- attr$2(container.secondaryGfx, ELEMENT_ID, '');
10685
+ attr$1(container.secondaryGfx, ELEMENT_ID, '');
11108
10686
  }
11109
10687
 
11110
10688
  delete elements[id];
@@ -11114,7 +10692,7 @@
11114
10692
  /**
11115
10693
  * Update the id of an element
11116
10694
  *
11117
- * @param {djs.model.Base} element
10695
+ * @param {string|djs.model.Base} element
11118
10696
  * @param {string} newId
11119
10697
  */
11120
10698
  ElementRegistry.prototype.updateId = function(element, newId) {
@@ -11143,7 +10721,7 @@
11143
10721
  /**
11144
10722
  * Update the graphics of an element
11145
10723
  *
11146
- * @param {djs.model.Base} element
10724
+ * @param {string|djs.model.Base} element
11147
10725
  * @param {SVGElement} gfx
11148
10726
  * @param {boolean} [secondary=false] whether to update the secondary connected element
11149
10727
  */
@@ -11159,7 +10737,7 @@
11159
10737
  }
11160
10738
 
11161
10739
  if (gfx) {
11162
- attr$2(gfx, ELEMENT_ID, id);
10740
+ attr$1(gfx, ELEMENT_ID, id);
11163
10741
  }
11164
10742
 
11165
10743
  return gfx;
@@ -11184,7 +10762,7 @@
11184
10762
  if (typeof filter === 'string') {
11185
10763
  id = filter;
11186
10764
  } else {
11187
- id = filter && attr$2(filter, ELEMENT_ID);
10765
+ id = filter && attr$1(filter, ELEMENT_ID);
11188
10766
  }
11189
10767
 
11190
10768
  var container = this._elements[id];
@@ -12467,10 +12045,10 @@
12467
12045
  } else {
12468
12046
  childrenGfx = getChildren(gfx);
12469
12047
  if (!childrenGfx) {
12470
- childrenGfx = create$2('g');
12471
- classes$2(childrenGfx).add('djs-children');
12048
+ childrenGfx = create$1('g');
12049
+ classes$1(childrenGfx).add('djs-children');
12472
12050
 
12473
- append$1(gfx.parentNode, childrenGfx);
12051
+ append(gfx.parentNode, childrenGfx);
12474
12052
  }
12475
12053
  }
12476
12054
 
@@ -12484,7 +12062,7 @@
12484
12062
  GraphicsFactory.prototype._clear = function(gfx) {
12485
12063
  var visual = getVisual(gfx);
12486
12064
 
12487
- clear$1(visual);
12065
+ clear(visual);
12488
12066
 
12489
12067
  return visual;
12490
12068
  };
@@ -12519,31 +12097,31 @@
12519
12097
  GraphicsFactory.prototype._createContainer = function(
12520
12098
  type, childrenGfx, parentIndex, isFrame
12521
12099
  ) {
12522
- var outerGfx = create$2('g');
12523
- classes$2(outerGfx).add('djs-group');
12100
+ var outerGfx = create$1('g');
12101
+ classes$1(outerGfx).add('djs-group');
12524
12102
 
12525
12103
  // insert node at position
12526
12104
  if (typeof parentIndex !== 'undefined') {
12527
12105
  prependTo(outerGfx, childrenGfx, childrenGfx.childNodes[parentIndex]);
12528
12106
  } else {
12529
- append$1(childrenGfx, outerGfx);
12107
+ append(childrenGfx, outerGfx);
12530
12108
  }
12531
12109
 
12532
- var gfx = create$2('g');
12533
- classes$2(gfx).add('djs-element');
12534
- classes$2(gfx).add('djs-' + type);
12110
+ var gfx = create$1('g');
12111
+ classes$1(gfx).add('djs-element');
12112
+ classes$1(gfx).add('djs-' + type);
12535
12113
 
12536
12114
  if (isFrame) {
12537
- classes$2(gfx).add('djs-frame');
12115
+ classes$1(gfx).add('djs-frame');
12538
12116
  }
12539
12117
 
12540
- append$1(outerGfx, gfx);
12118
+ append(outerGfx, gfx);
12541
12119
 
12542
12120
  // create visual
12543
- var visual = create$2('g');
12544
- classes$2(visual).add('djs-visual');
12121
+ var visual = create$1('g');
12122
+ classes$1(visual).add('djs-visual');
12545
12123
 
12546
- append$1(gfx, visual);
12124
+ append(gfx, visual);
12547
12125
 
12548
12126
  return gfx;
12549
12127
  };
@@ -12635,9 +12213,9 @@
12635
12213
  }
12636
12214
 
12637
12215
  if (element.hidden) {
12638
- attr$2(gfx, 'display', 'none');
12216
+ attr$1(gfx, 'display', 'none');
12639
12217
  } else {
12640
- attr$2(gfx, 'display', 'block');
12218
+ attr$1(gfx, 'display', 'block');
12641
12219
  }
12642
12220
  };
12643
12221
 
@@ -12645,7 +12223,7 @@
12645
12223
  var gfx = this._elementRegistry.getGraphics(element);
12646
12224
 
12647
12225
  // remove
12648
- remove$3(gfx.parentNode);
12226
+ remove$2(gfx.parentNode);
12649
12227
  };
12650
12228
 
12651
12229
 
@@ -21662,7 +21240,7 @@
21662
21240
  Diagram.prototype.destroy.call(this);
21663
21241
 
21664
21242
  // dom detach
21665
- remove$2(this._container);
21243
+ remove$1(this._container);
21666
21244
  };
21667
21245
 
21668
21246
  /**